@cntrl-site/components 1.0.66 → 1.0.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +24 -24
  2. package/dist/index.mjs +838 -840
  3. package/package.json +1 -1
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"),ut=require("classnames"),C=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yn=require("react-dom");function ud(e){return e.type==="object"&&e.version===1}const pd="ControlSlider-module__wrapper___sHEkd",md="ControlSlider-module__hoverArrow___A-dOH",gd="ControlSlider-module__sliderItem___QQSkR",hd="ControlSlider-module__sliderImage___9hRl-",fd="ControlSlider-module__arrow___05ghY",yd="ControlSlider-module__arrowVertical___tBfVN",vd="ControlSlider-module__nextArrow___-30Yc",xd="ControlSlider-module__arrowInner___aEra3",bd="ControlSlider-module__arrowIcon___S4ztF",wd="ControlSlider-module__arrowImg___2dwJW",Sd="ControlSlider-module__mirror___brd6U",$d="ControlSlider-module__pagination___bicLF",Cd="ControlSlider-module__paginationInner___bT-P-",Td="ControlSlider-module__paginationVertical___zYqKw",Ld="ControlSlider-module__paginationItem___nTRbk",Rd="ControlSlider-module__dot___p1Qun",Id="ControlSlider-module__activeDot___LHFaj",Ed="ControlSlider-module__paginationInsideBottom___R3FWn",Md="ControlSlider-module__paginationInsideTop___V-qb-",Pd="ControlSlider-module__paginationOutsideBottom___14w8D",kd="ControlSlider-module__paginationOutsideTop___SCLqB",Ad="ControlSlider-module__paginationInsideLeft___yOBRZ",Fd="ControlSlider-module__paginationInsideRight___Rtt3o",Wd="ControlSlider-module__paginationOutsideLeft___lahaw",_d="ControlSlider-module__paginationOutsideRight___EtuQa",Hd="ControlSlider-module__imgWrapper___UjEgB",Nd="ControlSlider-module__captionBlock___dJ6-j",Od="ControlSlider-module__captionTextWrapper___HFlpf",Dd="ControlSlider-module__captionText___uGBVc",jd="ControlSlider-module__active___WZK4G",zd="ControlSlider-module__withPointerEvents___t-18M",Bd="ControlSlider-module__topLeftAlignment___zjnGM",Vd="ControlSlider-module__topCenterAlignment___gD1xW",Gd="ControlSlider-module__topRightAlignment___NMapS",qd="ControlSlider-module__middleLeftAlignment___OnUrY",Ud="ControlSlider-module__middleCenterAlignment___Tdkl0",Xd="ControlSlider-module__middleRightAlignment___wEbfX",Kd="ControlSlider-module__bottomLeftAlignment___cTP2-",Yd="ControlSlider-module__bottomCenterAlignment___c54fB",Zd="ControlSlider-module__bottomRightAlignment___kEwrz",Jd="ControlSlider-module__clickOverlay___DZA28",Qd="ControlSlider-module__contain___pLyq7",eu="ControlSlider-module__cover___KdDat",ct={wrapper:pd,hoverArrow:md,sliderItem:gd,sliderImage:hd,arrow:fd,arrowVertical:yd,nextArrow:vd,arrowInner:xd,arrowIcon:bd,arrowImg:wd,mirror:Sd,pagination:$d,paginationInner:Cd,paginationVertical:Td,paginationItem:Ld,dot:Rd,activeDot:Id,paginationInsideBottom:Ed,paginationInsideTop:Md,paginationOutsideBottom:Pd,paginationOutsideTop:kd,paginationInsideLeft:Ad,paginationInsideRight:Fd,paginationOutsideLeft:Wd,paginationOutsideRight:_d,imgWrapper:Hd,captionBlock:Nd,captionTextWrapper:Od,captionText:Dd,active:jd,withPointerEvents:zd,topLeftAlignment:Bd,topCenterAlignment:Vd,topRightAlignment:Gd,middleLeftAlignment:qd,middleCenterAlignment:Ud,middleRightAlignment:Xd,bottomLeftAlignment:Kd,bottomCenterAlignment:Yd,bottomRightAlignment:Zd,clickOverlay:Jd,contain:Qd,cover:eu};function tu(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 nu(e,t,n){return t&&tu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var gs="(prefers-reduced-motion: reduce)",Pi=1,iu=2,_i=3,Ki=4,Lo=5,nr=6,cr=7,ou={CREATED:Pi,MOUNTED:iu,IDLE:_i,MOVING:Ki,SCROLLING:Lo,DRAGGING:nr,DESTROYED:cr};function Wn(e){e.length=0}function Zn(e,t,n){return Array.prototype.slice.call(e,t,n)}function qt(e){return e.bind.apply(e,[null].concat(Zn(arguments,1)))}var Nl=setTimeout,ya=function(){};function hs(e){return requestAnimationFrame(e)}function xr(e,t){return typeof t===e}function go(e){return!Fa(e)&&xr("object",e)}var Aa=Array.isArray,Ol=qt(xr,"function"),qn=qt(xr,"string"),Ro=qt(xr,"undefined");function Fa(e){return e===null}function Dl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Io(e){return Aa(e)?e:[e]}function yn(e,t){Io(e).forEach(t)}function Wa(e,t){return e.indexOf(t)>-1}function ir(e,t){return e.push.apply(e,Io(t)),e}function Mn(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){Mn(e,qn(t)?t.split(" "):t,!0)}function Eo(e,t){yn(t,e.appendChild.bind(e))}function _a(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ho(e,t){return Dl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function jl(e,t){var n=e?Zn(e.children):[];return t?n.filter(function(i){return ho(i,t)}):n}function Mo(e,t){return t?jl(e,t)[0]:e.firstElementChild}var fo=Object.keys;function mi(e,t,n){return e&&(n?fo(e).reverse():fo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function yo(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){Aa(n)?e[i]=n.slice():go(n)?e[i]=zn({},go(e[i])?e[i]:{},n):e[i]=n})}),e}function fs(e,t){yn(t||fo(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function $t(e,t,n){go(t)?mi(t,function(i,o){$t(e,o,i)}):yn(e,function(i){Fa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function ki(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Tn(i,t):$t(i,t)),n&&Eo(n,i),i}function xn(e,t,n){if(Ro(n))return getComputedStyle(e)[t];Fa(n)||(e.style[t]=""+n)}function vo(e,t){xn(e,"display",t)}function zl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function ys(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function hi(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Bl(e){return Mo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Vl(e,t){return e&&e.querySelector(t)}function Ha(e,t){return t?Zn(e.querySelectorAll(t)):[]}function Pn(e,t){Mn(e,t,!1)}function va(e){return e.timeStamp}function ii(e){return qn(e)?e:e?e+"px":""}var Po="splide",Na="data-"+Po;function co(e,t){if(!e)throw new Error("["+Po+"] "+(t||""))}var Un=Math.min,dr=Math.max,ur=Math.floor,xo=Math.ceil,cn=Math.abs;function Gl(e,t,n){return cn(e-t)<n}function or(e,t,n,i){var o=Un(t,n),s=dr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function Ri(e,t,n){var i=Un(t,n),o=dr(t,n);return Un(dr(i,e),o)}function xa(e){return+(e>0)-+(e<0)}function ba(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function Oa(e){return e<10?"0"+e:""+e}var vs={};function ru(e){return""+e+Oa(vs[e]=(vs[e]||0)+1)}function ql(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,y){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);g?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,y,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(y){return y[0]===u&&y[1]===p&&y[2]===v&&(!c||y[3]===c)?(y[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){yn(l,function(u){u&&yn(d,function(p){p.split(" ").forEach(function(v){var y=v.split(".");c(u,y[0],y[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Jn="mounted",wa="ready",_n="move",Yi="moved",Da="click",Ul="active",Xl="inactive",Kl="visible",Yl="hidden",en="refresh",sn="updated",Hi="resize",br="resized",Zl="drag",Jl="dragging",Ql="dragged",wr="scroll",vi="scrolled",au="overflow",ja="destroy",ec="arrows:mounted",tc="arrows:updated",nc="pagination:mounted",ic="pagination:updated",za="navigation:mounted",Ba="autoplay:play",oc="autoplay:playing",Va="autoplay:pause",Ga="lazyload:loaded",rc="sk",ac="sh",pr="ei";function Yt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ql();function i(s,l){n.bind(t,Io(s).join(" "),function(d){l.apply(l,Aa(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Zn(arguments,1))}return e&&e.event.on(ja,n.destroy),yo(n,{bus:t,on:i,off:qt(n.unbind,t),emit:o})}function Sr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?Un((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return y();d=hs(p)}}function v(I){I||h(),s=o()-(I?l*e:0),c=!1,d=hs(p)}function y(){c=!0}function g(){s=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function m(I){e=I}function b(){return c}return{start:v,rewind:g,pause:y,cancel:h,set:m,isPaused:b}}function su(e){var t=e;function n(o){t=o}function i(o){return Wa(Io(o),t)}return{set:n,is:i}}function lu(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cu(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=ql(),d=[];function c(){var h=n.mediaQuery==="min";fo(o).sort(function(m,b){return h?+m-+b:+b-+m}).forEach(function(m){p(o[m],"("+(h?"min":"max")+"-width:"+m+"px)")}),p(s,gs),v()}function u(h){h&&l.destroy()}function p(h,m){var b=matchMedia(m);l.bind(b,"change",v),d.push([h,b])}function v(){var h=i.is(cr),m=n.direction,b=d.reduce(function(I,R){return zn(I,R[1].matches?R[0]:{})},{});fs(n),g(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):m!==n.direction&&e.refresh()}function y(h){matchMedia(gs).matches&&(h?zn(n,s):fs(n,fo(s)))}function g(h,m,b){zn(n,h),m&&zn(Object.getPrototypeOf(n),h),(b||!i.is(Pi))&&e.emit(sn,n)}return{setup:c,destroy:u,reduce:y,set:g}}var $r="Arrow",Cr=$r+"Left",Tr=$r+"Right",sc=$r+"Up",lc=$r+"Down",xs="rtl",Lr="ttb",Dr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[sc,Tr],ArrowRight:[lc,Cr]};function du(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===xs&&!l?1:d===Lr?0:-1;return Dr[s]&&Dr[s][c]||s.replace(/width|left|right/i,function(u,p){var v=Dr[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(s){return s*(n.direction===xs?1:-1)}return{resolve:i,orient:o}}var kn="role",Ai="tabindex",uu="disabled",wn="aria-",ko=wn+"controls",cc=wn+"current",bs=wn+"selected",hn=wn+"label",qa=wn+"labelledby",dc=wn+"hidden",Ua=wn+"orientation",bo=wn+"roledescription",ws=wn+"live",Ss=wn+"busy",$s=wn+"atomic",Xa=[kn,Ai,uu,ko,cc,hn,qa,dc,Ua,bo],Rn=Po+"__",Qn="is-",jr=Po,Cs=Rn+"track",pu=Rn+"list",Rr=Rn+"slide",uc=Rr+"--clone",mu=Rr+"__container",Ka=Rn+"arrows",Ir=Rn+"arrow",pc=Ir+"--prev",mc=Ir+"--next",Er=Rn+"pagination",gc=Er+"__page",gu=Rn+"progress",hu=gu+"__bar",fu=Rn+"toggle",yu=Rn+"spinner",vu=Rn+"sr",xu=Qn+"initialized",fi=Qn+"active",hc=Qn+"prev",fc=Qn+"next",Sa=Qn+"visible",$a=Qn+"loading",yc=Qn+"focus-in",vc=Qn+"overflow",bu=[fi,Sa,hc,fc,$a,yc,vc],wu={slide:Rr,clone:uc,arrows:Ka,arrow:Ir,prev:pc,next:mc,pagination:Er,page:gc,spinner:yu};function Su(e,t){if(Ol(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ho(n,t);)n=n.parentElement;return n}var $u=5,Ts=200,xc="touchstart mousedown",zr="touchmove mousemove",Br="touchend touchcancel mouseup click";function Cu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],y,g,h;function m(){T(),q(),R()}function b(){o(en,I),o(en,m),o(sn,R),s(document,xc+" keydown",function(k){h=k.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,yc,!!h)})}function I(k){var L=Xa.concat("style");Wn(u),Pn(l,p),Pn(y,v),Ln([y,g],L),Ln(l,k?L:["style",bo])}function R(){Pn(l,p),Pn(y,v),p=G(jr),v=G(Cs),Tn(l,p),Tn(y,v),$t(l,hn,n.label),$t(l,qa,n.labelledby)}function T(){y=A("."+Cs),g=Mo(y,"."+pu),co(y&&g,"A track/list element is missing."),ir(u,jl(g,"."+Rr+":not(."+uc+")")),mi({arrows:Ka,pagination:Er,prev:pc,next:mc,bar:hu,toggle:fu},function(k,L){c[L]=A("."+k)}),yo(c,{root:l,track:y,list:g,slides:u})}function q(){var k=l.id||ru(Po),L=n.role;l.id=k,y.id=y.id||k+"-track",g.id=g.id||k+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&L&&$t(l,kn,L),$t(l,bo,d.carousel),$t(g,kn,"presentation")}function A(k){var L=Vl(l,k);return L&&Su(L,"."+jr)===l?L:void 0}function G(k){return[k+"--"+n.type,k+"--"+n.direction,n.drag&&k+"--draggable",n.isNavigation&&k+"--nav",k===jr&&fi]}return yo(c,{setup:m,mount:b,destroy:I})}var Ni="slide",Zi="loop",Ao="fade";function Tu(e,t,n,i){var o=Yt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,y=p.updateOnMove,g=p.i18n,h=p.pagination,m=p.slideFocus,b=c.Direction.resolve,I=bn(i,"style"),R=bn(i,hn),T=n>-1,q=Mo(i,"."+mu),A;function G(){T||(i.id=u.id+"-slide"+Oa(t+1),$t(i,kn,h?"tabpanel":"group"),$t(i,bo,g.slide),$t(i,hn,R||ba(g.slideLabel,[t+1,e.length]))),k()}function k(){d(i,"click",qt(l,Da,ie)),d(i,"keydown",qt(l,rc,ie)),s([Yi,ac,vi],W),s(za,D),y&&s(_n,x)}function L(){A=!0,o.destroy(),Pn(i,bu),Ln(i,Xa),$t(i,"style",I),$t(i,hn,R||"")}function D(){var S=e.splides.map(function(E){var O=E.splide.Components.Slides.getAt(t);return O?O.slide.id:""}).join(" ");$t(i,hn,ba(g.slideX,(T?n:t)+1)),$t(i,ko,S),$t(i,kn,m?"button":""),m&&Ln(i,bo)}function x(){A||W()}function W(){if(!A){var S=e.index;M(),Y(),Mn(i,hc,t===S-1),Mn(i,fc,t===S+1)}}function M(){var S=U();S!==ys(i,fi)&&(Mn(i,fi,S),$t(i,cc,v&&S||""),l(S?Ul:Xl,ie))}function Y(){var S=V(),E=!S&&(!U()||T);if(e.state.is([Ki,Lo])||$t(i,dc,E||""),$t(Ha(i,p.focusableNodes||""),Ai,E?-1:""),m&&$t(i,Ai,E?-1:0),S!==ys(i,Sa)&&(Mn(i,Sa,S),l(S?Kl:Yl,ie)),!S&&document.activeElement===i){var O=c.Slides.getAt(e.index);O&&zl(O.slide)}}function F(S,E,O){xn(O&&q||i,S,E)}function U(){var S=e.index;return S===t||p.cloneStatus&&S===n}function V(){if(e.is(Ao))return U();var S=mn(c.Elements.track),E=mn(i),O=b("left",!0),le=b("right",!0);return ur(S[O])<=xo(E[O])&&ur(E[le])<=xo(S[le])}function z(S,E){var O=cn(S-t);return!T&&(p.rewind||e.is(Zi))&&(O=Un(O,e.length-O)),O<=E}var ie={index:t,slideIndex:n,slide:i,container:q,isClone:T,mount:G,destroy:L,update:W,style:F,isWithin:z};return ie}function Lu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function v(){y(),o(en,g),o(en,y)}function y(){c.forEach(function(W,M){m(W,M,-1)})}function g(){A(function(W){W.destroy()}),Wn(p)}function h(){A(function(W){W.update()})}function m(W,M,Y){var F=Tu(e,M,Y,W);F.mount(),p.push(F),p.sort(function(U,V){return U.index-V.index})}function b(W){return W?G(function(M){return!M.isClone}):p}function I(W){var M=t.Controller,Y=M.toIndex(W),F=M.hasFocus()?1:n.perPage;return G(function(U){return or(U.index,Y,Y+F-1)})}function R(W){return G(W)[0]}function T(W,M){yn(W,function(Y){if(qn(Y)&&(Y=Bl(Y)),Dl(Y)){var F=c[M];F?_a(Y,F):Eo(u,Y),Tn(Y,n.classes.slide),L(Y,qt(s,Hi))}}),s(en)}function q(W){hi(G(W).map(function(M){return M.slide})),s(en)}function A(W,M){b(M).forEach(W)}function G(W){return p.filter(Ol(W)?W:function(M){return qn(W)?ho(M.slide,W):Wa(Io(W),M.index)})}function k(W,M,Y){A(function(F){F.style(W,M,Y)})}function L(W,M){var Y=Ha(W,"img"),F=Y.length;F?Y.forEach(function(U){l(U,"load error",function(){--F||M()})}):M()}function D(W){return W?c.length:p.length}function x(){return p.length>n.perPage}return{mount:v,destroy:g,update:h,register:m,get:b,getIn:I,getAt:R,add:T,remove:q,forEach:A,filter:G,style:k,getLength:D,isEnough:x}}function Ru(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,y=u.list,g=d.getAt,h=d.style,m,b,I;function R(){T(),s(window,"resize load",lu(qt(l,Hi))),o([sn,en],T),o(Hi,q)}function T(){m=n.direction===Lr,xn(p,"maxWidth",ii(n.width)),xn(v,c("paddingLeft"),A(!1)),xn(v,c("paddingRight"),A(!0)),q(!0)}function q(ie){var S=mn(p);(ie||b.width!==S.width||b.height!==S.height)&&(xn(v,"height",G()),h(c("marginRight"),ii(n.gap)),h("width",L()),h("height",D(),!0),b=S,l(br),I!==(I=z())&&(Mn(p,vc,I),l(au,I)))}function A(ie){var S=n.padding,E=c(ie?"right":"left");return S&&ii(S[E]||(go(S)?0:S))||"0px"}function G(){var ie="";return m&&(ie=k(),co(ie,"height or heightRatio is missing."),ie="calc("+ie+" - "+A(!1)+" - "+A(!0)+")"),ie}function k(){return ii(n.height||mn(y).width*n.heightRatio)}function L(){return n.autoWidth?null:ii(n.fixedWidth)||(m?"":x())}function D(){return ii(n.fixedHeight)||(m?n.autoHeight?null:x():k())}function x(){var ie=ii(n.gap);return"calc((100%"+(ie&&" + "+ie)+")/"+(n.perPage||1)+(ie&&" - "+ie)+")"}function W(){return mn(y)[c("width")]}function M(ie,S){var E=g(ie||0);return E?mn(E.slide)[c("width")]+(S?0:U()):0}function Y(ie,S){var E=g(ie);if(E){var O=mn(E.slide)[c("right")],le=mn(y)[c("left")];return cn(O-le)+(S?0:U())}return 0}function F(ie){return Y(e.length-1)-Y(0)+M(0,ie)}function U(){var ie=g(0);return ie&&parseFloat(xn(ie.slide,c("marginRight")))||0}function V(ie){return parseFloat(xn(v,c("padding"+(ie?"Right":"Left"))))||0}function z(){return e.is(Ao)||F(!0)>W()}return{mount:R,resize:q,listSize:W,slideSize:M,sliderSize:F,totalSize:Y,getPadding:V,isOverflow:z}}var Iu=2;function Eu(e,t,n){var i=Yt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,v),o([sn,Hi],g),(u=b())&&(h(u),t.Layout.resize(!0))}function v(){y(),p()}function y(){hi(c),Wn(c),i.destroy()}function g(){var I=b();u!==I&&(u<I||!I)&&i.emit(en)}function h(I){var R=l.get().slice(),T=R.length;if(T){for(;R.length<I;)ir(R,R);ir(R.slice(-I),R.slice(0,I)).forEach(function(q,A){var G=A<I,k=m(q.slide,A);G?_a(k,R[0].slide):Eo(s.list,k),ir(c,k),l.register(k,A-I+(G?0:T),q.index)})}}function m(I,R){var T=I.cloneNode(!0);return Tn(T,n.classes.clone),T.id=e.root.id+"-clone"+Oa(R+1),T}function b(){var I=n.clones;if(!e.is(Zi))I=0;else if(Ro(I)){var R=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=R&&xo(mn(s.track)[d("width")]/R);I=T||n[d("autoWidth")]&&e.length||n.perPage*Iu}return I}return{mount:p,destroy:y}}function Mu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,v=d.listSize,y=d.sliderSize,g=t.Direction,h=g.resolve,m=g.orient,b=t.Elements,I=b.list,R=b.track,T;function q(){T=t.Transition,o([Jn,br,sn,en],A)}function A(){t.Controller.isBusy()||(t.Scroll.cancel(),k(e.index),t.Slides.update())}function G(E,O,le,oe){E!==O&&ie(E>le)&&(W(),L(x(F(),E>le),!0)),l(Ki),s(_n,O,le,E),T.start(O,function(){l(_i),s(Yi,O,le,E),oe&&oe()})}function k(E){L(Y(E,!0))}function L(E,O){if(!e.is(Ao)){var le=O?E:D(E);xn(I,"transform","translate"+h("X")+"("+le+"px)"),E!==le&&s(ac)}}function D(E){if(e.is(Zi)){var O=M(E),le=O>t.Controller.getEnd(),oe=O<0;(oe||le)&&(E=x(E,le))}return E}function x(E,O){var le=E-z(O),oe=y();return E-=m(oe*(xo(cn(le)/oe)||1))*(O?1:-1),E}function W(){L(F(),!0),T.cancel()}function M(E){for(var O=t.Slides.get(),le=0,oe=1/0,$=0;$<O.length;$++){var ae=O[$].index,P=cn(Y(ae,!0)-E);if(P<=oe)oe=P,le=ae;else break}return le}function Y(E,O){var le=m(p(E-1)-V(E));return O?U(le):le}function F(){var E=h("left");return mn(I)[E]-mn(R)[E]+m(u(!1))}function U(E){return n.trimSpace&&e.is(Ni)&&(E=Ri(E,0,m(y(!0)-v()))),E}function V(E){var O=n.focus;return O==="center"?(v()-c(E,!0))/2:+O*c(E)||0}function z(E){return Y(E?t.Controller.getEnd():0,!!n.trimSpace)}function ie(E){var O=m(x(F(),E));return E?O>=0:O<=I[h("scrollWidth")]-mn(R)[h("width")]}function S(E,O){O=Ro(O)?F():O;var le=E!==!0&&m(O)<m(z(!1)),oe=E!==!1&&m(O)>m(z(!0));return le||oe}return{mount:q,move:G,jump:k,translate:L,shift:x,cancel:W,toIndex:M,toPosition:Y,getPosition:F,getLimit:z,exceededLimit:S,reposition:A}}function Pu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,y=p.getLength,g=n.omitEnd,h=e.is(Zi),m=e.is(Ni),b=qt(F,!1),I=qt(F,!0),R=n.start||0,T,q=R,A,G,k;function L(){D(),o([sn,en,pr],D),o(br,x)}function D(){A=y(!0),G=n.perMove,k=n.perPage,T=ie();var P=Ri(R,0,g?T:A-1);P!==R&&(R=P,l.reposition())}function x(){T!==ie()&&s(pr)}function W(P,te,K){if(!ae()){var xe=Y(P),Fe=z(xe);Fe>-1&&(te||Fe!==R)&&(le(Fe),l.move(xe,Fe,q,K))}}function M(P,te,K,xe){t.Scroll.scroll(P,te,K,function(){var Fe=z(l.toIndex(d()));le(g?Un(Fe,T):Fe),xe&&xe()})}function Y(P){var te=R;if(qn(P)){var K=P.match(/([+\-<>])(\d+)?/)||[],xe=K[1],Fe=K[2];xe==="+"||xe==="-"?te=U(R+ +(""+xe+(+Fe||1)),R):xe===">"?te=Fe?S(+Fe):b(!0):xe==="<"&&(te=I(!0))}else te=h?P:Ri(P,0,T);return te}function F(P,te){var K=G||($()?1:k),xe=U(R+K*(P?-1:1),R,!(G||$()));return xe===-1&&m&&!Gl(d(),c(!P),1)?P?0:T:te?xe:z(xe)}function U(P,te,K){if(v()||$()){var xe=V(P);xe!==P&&(te=P,P=xe,K=!1),P<0||P>T?!G&&(or(0,P,te,!0)||or(T,te,P,!0))?P=S(E(P)):h?P=K?P<0?-(A%k||k):A:P:n.rewind?P=P<0?T:0:P=-1:K&&P!==te&&(P=S(E(te)+(P<te?-1:1)))}else P=-1;return P}function V(P){if(m&&n.trimSpace==="move"&&P!==R)for(var te=d();te===u(P,!0)&&or(P,0,e.length-1,!n.rewind);)P<R?--P:++P;return P}function z(P){return h?(P+A)%A||0:P}function ie(){for(var P=A-($()||h&&G?1:k);g&&P-- >0;)if(u(A-1,!0)!==u(P,!0)){P++;break}return Ri(P,0,A-1)}function S(P){return Ri($()?P:k*P,0,T)}function E(P){return $()?Un(P,T):ur((P>=T?A-1:P)/k)}function O(P){var te=l.toIndex(P);return m?Ri(te,0,T):te}function le(P){P!==R&&(q=R,R=P)}function oe(P){return P?q:R}function $(){return!Ro(n.focus)||n.isNavigation}function ae(){return e.state.is([Ki,Lo])&&!!n.waitForTransition}return{mount:L,go:W,scroll:M,getNext:b,getPrev:I,getAdjacent:F,getEnd:ie,setIndex:le,getIndex:oe,toIndex:S,toPage:E,toDest:O,hasFocus:$,isBusy:ae}}var ku="http://www.w3.org/2000/svg",Au="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",Do=40;function Fu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,y=u.track,g=v,h=u.prev,m=u.next,b,I,R={};function T(){A(),o(sn,q)}function q(){G(),T()}function A(){var M=n.arrows;M&&!(h&&m)&&D(),h&&m&&(yo(R,{prev:h,next:m}),vo(g,M?"":"none"),Tn(g,I=Ka+"--"+n.direction),M&&(k(),W(),$t([h,m],ko,y.id),l(ec,h,m)))}function G(){i.destroy(),Pn(g,I),b?(hi(v?[h,m]:g),h=m=null):Ln([h,m],Xa)}function k(){o([Jn,Yi,en,vi,pr],W),s(m,"click",qt(L,">")),s(h,"click",qt(L,"<"))}function L(M){p.go(M,!0)}function D(){g=v||ki("div",d.arrows),h=x(!0),m=x(!1),b=!0,Eo(g,[h,m]),!v&&_a(g,y)}function x(M){var Y='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+ku+'" viewBox="0 0 '+Do+" "+Do+'" width="'+Do+'" height="'+Do+'" focusable="false"><path d="'+(n.arrowPath||Au)+'" />';return Bl(Y)}function W(){if(h&&m){var M=e.index,Y=p.getPrev(),F=p.getNext(),U=Y>-1&&M<Y?c.last:c.prev,V=F>-1&&M>F?c.first:c.next;h.disabled=Y<0,m.disabled=F<0,$t(h,hn,U),$t(m,hn,V),l(tc,h,m,Y,F)}}return{arrows:R,mount:T,destroy:G,update:W}}var Wu=Na+"-interval";function _u(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=Sr(n.interval,e.go.bind(e,">"),k),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,y=p.toggle,g=n.autoplay,h,m,b=g==="pause";function I(){g&&(R(),y&&$t(y,ko,u.track.id),b||T(),G())}function R(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(D){h=D.type==="mouseenter",A()}),n.pauseOnFocus&&s(v,"focusin focusout",function(D){m=D.type==="focusin",A()}),y&&s(y,"click",function(){b?T():q(!0)}),o([_n,wr,en],d.rewind),o(_n,L)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),m=h=b=!1,G(),l(Ba))}function q(D){D===void 0&&(D=!0),b=!!D,G(),c()||(d.pause(),l(Va))}function A(){b||(h||m?q(!1):T())}function G(){y&&(Mn(y,fi,!b),$t(y,hn,n.i18n[b?"play":"pause"]))}function k(D){var x=u.bar;x&&xn(x,"width",D*100+"%"),l(oc,D)}function L(D){var x=t.Slides.getAt(D);d.set(x&&+bn(x.slide,Wu)||n.interval)}return{mount:I,destroy:d.cancel,play:T,pause:q,isPaused:c}}function Hu(e,t,n){var i=Yt(e),o=i.on;function s(){n.cover&&(o(Ga,qt(d,!0)),o([Jn,sn,en],qt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Mo(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),vo(u,c?"none":"")}return{mount:s,destroy:qt(l,!1)}}var Nu=10,Ou=600,Du=.6,ju=1.5,zu=800;function Bu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,v=d.translate,y=e.is(Ni),g,h,m=1;function b(){o(_n,q),o([sn,en],A)}function I(k,L,D,x,W){var M=c();if(q(),D&&(!y||!p())){var Y=t.Layout.sliderSize(),F=xa(k)*Y*ur(cn(k)/Y)||0;k=d.toPosition(t.Controller.toDest(k%Y))+F}var U=Gl(M,k,1);m=1,L=U?0:L||dr(cn(k-M)/ju,zu),h=x,g=Sr(L,R,qt(T,M,k,W),1),l(Lo),s(wr),g.start()}function R(){l(_i),h&&h(),s(vi)}function T(k,L,D,x){var W=c(),M=k+(L-k)*G(x),Y=(M-W)*m;v(W+Y),y&&!D&&p()&&(m*=Du,cn(Y)<Nu&&I(u(p(!0)),Ou,!1,h,!0))}function q(){g&&g.cancel()}function A(){g&&!g.isPaused()&&(q(),R())}function G(k){var L=n.easingFunc;return L?L(k):1-Math.pow(1-k,4)}return{mount:b,destroy:q,scroll:I,cancel:A}}var Ii={passive:!1,capture:!0};function Vu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,v=t.Controller,y=t.Elements.track,g=t.Media.reduce,h=t.Direction,m=h.resolve,b=h.orient,I=u.getPosition,R=u.exceededLimit,T,q,A,G,k,L=!1,D,x,W;function M(){l(y,zr,ya,Ii),l(y,Br,ya,Ii),l(y,xc,F,Ii),l(y,"click",z,{capture:!0}),l(y,"dragstart",En),o([Jn,sn],Y)}function Y(){var X=n.drag;ce(!X),G=X==="free"}function F(X){if(D=!1,!x){var ee=Fe(X);xe(X.target)&&(ee||!X.button)&&(v.isBusy()?En(X,!0):(W=ee?y:window,k=c.is([Ki,Lo]),A=null,l(W,zr,U,Ii),l(W,Br,V,Ii),u.cancel(),p.cancel(),ie(X)))}}function U(X){if(c.is(nr)||(c.set(nr),s(Zl)),X.cancelable)if(k){u.translate(T+K($(X)));var ee=ae(X)>Ts,Z=L!==(L=R());(ee||Z)&&ie(X),D=!0,s(Jl),En(X)}else O(X)&&(k=E(X),En(X))}function V(X){c.is(nr)&&(c.set(_i),s(Ql)),k&&(S(X),En(X)),d(W,zr,U),d(W,Br,V),k=!1}function z(X){!x&&D&&En(X,!0)}function ie(X){A=q,q=X,T=I()}function S(X){var ee=le(X),Z=oe(ee),Pe=n.rewind&&n.rewindByDrag;g(!1),G?v.scroll(Z,0,n.snap):e.is(Ao)?v.go(b(xa(ee))<0?Pe?"<":"-":Pe?">":"+"):e.is(Ni)&&L&&Pe?v.go(R(!0)?">":"<"):v.go(v.toDest(Z),!0),g(!0)}function E(X){var ee=n.dragMinThreshold,Z=go(ee),Pe=Z&&ee.mouse||0,$e=(Z?ee.touch:+ee)||10;return cn($(X))>(Fe(X)?$e:Pe)}function O(X){return cn($(X))>cn($(X,!0))}function le(X){if(e.is(Zi)||!L){var ee=ae(X);if(ee&&ee<Ts)return $(X)/ee}return 0}function oe(X){return I()+xa(X)*Un(cn(X)*(n.flickPower||600),G?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function $(X,ee){return te(X,ee)-te(P(X),ee)}function ae(X){return va(X)-va(P(X))}function P(X){return q===X&&A||q}function te(X,ee){return(Fe(X)?X.changedTouches[0]:X)["page"+m(ee?"Y":"X")]}function K(X){return X/(L&&e.is(Ni)?$u:1)}function xe(X){var ee=n.noDrag;return!ho(X,"."+gc+", ."+Ir)&&(!ee||!ho(X,ee))}function Fe(X){return typeof TouchEvent<"u"&&X instanceof TouchEvent}function ge(){return k}function ce(X){x=X}return{mount:M,disable:ce,isDragging:ge}}var Gu={Spacebar:" ",Right:Tr,Left:Cr,Up:sc,Down:lc};function Ya(e){return e=qn(e)?e:e.key,Gu[e]||e}var Ls="keydown";function qu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){y(),o(sn,g),o(sn,y),o(_n,m)}function y(){var I=n.keyboard;I&&(u=I==="global"?window:d,s(u,Ls,b))}function g(){l(u,Ls)}function h(I){p=I}function m(){var I=p;p=!0,Nl(function(){p=I})}function b(I){if(!p){var R=Ya(I);R===c(Cr)?e.go("<"):R===c(Tr)&&e.go(">")}}return{mount:v,destroy:g,disable:h}}var uo=Na+"-lazy",rr=uo+"-srcset",Uu="["+uo+"], ["+rr+"]";function Xu(e,t,n){var i=Yt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Yi,vi],p=[];function v(){n.lazyLoad&&(y(),o(en,y))}function y(){Wn(p),g(),c?I():(s(u),o(u,h),h())}function g(){t.Slides.forEach(function(R){Ha(R.slide,Uu).forEach(function(T){var q=bn(T,uo),A=bn(T,rr);if(q!==T.src||A!==T.srcset){var G=n.classes.spinner,k=T.parentElement,L=Mo(k,"."+G)||ki("span",G,k);p.push([T,R,L]),T.src||vo(T,"none")}})})}function h(){p=p.filter(function(R){var T=n.perPage*((n.preloadPages||1)+1)-1;return R[1].isWithin(e.index,T)?m(R):!0}),p.length||s(u)}function m(R){var T=R[0];Tn(R[1].slide,$a),l(T,"load error",qt(b,R)),$t(T,"src",bn(T,uo)),$t(T,"srcset",bn(T,rr)),Ln(T,uo),Ln(T,rr)}function b(R,T){var q=R[0],A=R[1];Pn(A.slide,$a),T.type!=="error"&&(hi(R[2]),vo(q,""),d(Ga,q,A),d(Hi)),c&&I()}function I(){p.length&&m(p.shift())}return{mount:v,destroy:qt(Wn,p),check:h}}function Ku(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,y=u.go,g=t.Direction.resolve,h=c.pagination,m=[],b,I;function R(){T(),o([sn,en,pr],R);var x=n.pagination;h&&vo(h,x?"":"none"),x&&(o([_n,wr,vi],D),q(),D(),s(nc,{list:b,items:m},L(e.index)))}function T(){b&&(hi(h?Zn(b.children):b),Pn(b,I),Wn(m),b=null),i.destroy()}function q(){var x=e.length,W=n.classes,M=n.i18n,Y=n.perPage,F=p()?u.getEnd()+1:xo(x/Y);b=h||ki("ul",W.pagination,c.track.parentElement),Tn(b,I=Er+"--"+k()),$t(b,kn,"tablist"),$t(b,hn,M.select),$t(b,Ua,k()===Lr?"vertical":"");for(var U=0;U<F;U++){var V=ki("li",null,b),z=ki("button",{class:W.page,type:"button"},V),ie=d.getIn(U).map(function(E){return E.slide.id}),S=!p()&&Y>1?M.pageX:M.slideX;l(z,"click",qt(A,U)),n.paginationKeyboard&&l(z,"keydown",qt(G,U)),$t(V,kn,"presentation"),$t(z,kn,"tab"),$t(z,ko,ie.join(" ")),$t(z,hn,ba(S,U+1)),$t(z,Ai,-1),m.push({li:V,button:z,page:U})}}function A(x){y(">"+x,!0)}function G(x,W){var M=m.length,Y=Ya(W),F=k(),U=-1;Y===g(Tr,!1,F)?U=++x%M:Y===g(Cr,!1,F)?U=(--x+M)%M:Y==="Home"?U=0:Y==="End"&&(U=M-1);var V=m[U];V&&(zl(V.button),y(">"+U),En(W,!0))}function k(){return n.paginationDirection||n.direction}function L(x){return m[u.toPage(x)]}function D(){var x=L(v(!0)),W=L(v());if(x){var M=x.button;Pn(M,fi),Ln(M,bs),$t(M,Ai,-1)}if(W){var Y=W.button;Tn(Y,fi),$t(Y,bs,!0),$t(Y,Ai,"")}s(ic,{list:b,items:m},x,W)}return{items:m,mount:R,destroy:T,getAt:L,update:D}}var Yu=[" ","Enter"];function Zu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){s.forEach(function(h){h.destroy()}),Wn(s)}function c(){d(),l()}function u(h,m){var b=Yt(h);b.on(_n,function(I,R,T){m.go(m.is(Zi)?T:I)}),s.push(b)}function p(){var h=Yt(e),m=h.on;m(Da,y),m(rc,g),m([Jn,sn],v),s.push(h),h.emit(za,e.splides)}function v(){$t(t.Elements.list,Ua,n.direction===Lr?"vertical":"")}function y(h){e.go(h.index)}function g(h,m){Wa(Yu,Ya(m))&&(y(h),En(m))}return{setup:qt(t.Media.set,{slideFocus:Ro(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Ju(e,t,n){var i=Yt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Ii)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,y=va(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;cn(p)>g&&y-s>h&&(e.go(v?"<":">"),s=y),c(v)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(Ki)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Qu=90;function ep(e,t,n){var i=Yt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=ki("span",vu),c=Sr(Qu,qt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),$t(s,$s,!0),d.textContent="…",o(Ba,qt(y,!0)),o(Va,qt(y,!1)),o([Yi,vi],qt(p,!0)))}function p(g){$t(s,Ss,g),g?(Eo(s,d),c.start()):(hi(d),c.cancel())}function v(){Ln(s,[ws,$s,Ss]),hi(d)}function y(g){l&&$t(s,ws,g?"off":"polite")}return{mount:u,disable:y,destroy:v}}var tp=Object.freeze({__proto__:null,Media:cu,Direction:du,Elements:Cu,Slides:Lu,Layout:Ru,Clones:Eu,Move:Mu,Controller:Pu,Arrows:Fu,Autoplay:_u,Cover:Hu,Scroll:Bu,Drag:Vu,Keyboard:qu,LazyLoad:Xu,Pagination:Ku,Sync:Zu,Wheel:Ju,Live:ep}),np={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"},ip={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:wu,i18n:np,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function op(e,t,n){var i=t.Slides;function o(){Yt(e).on([Jn,en],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Nl(c)}return{mount:o,start:l,cancel:ya}}function rp(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=qt(xn,l,"transition"),c;function u(){Yt(e).bind(l,"transitionend",function(g){g.target===l&&c&&(v(),c())})}function p(g,h){var m=i.toPosition(g,!0),b=i.getPosition(),I=y(g);cn(m-b)>=1&&I>=1?n.useScroll?s.scroll(m,I,!1,h):(d("transform "+I+"ms "+n.easing),i.translate(m,!0),c=h):(i.jump(g),h())}function v(){d(""),s.cancel()}function y(g){var h=n.rewindSpeed;if(e.is(Ni)&&h){var m=o.getIndex(!0),b=o.getEnd();if(m===0&&g>=b||m>=b&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var ap=(function(){function e(n,i){this.event=Yt(),this.Components={},this.state=su(Pi),this.splides=[],this._o={},this._E={};var o=qn(n)?Vl(document,n):n;co(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,qa)||""},ip,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Na)))}catch{co(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;co(l.is([Pi,cr]),"Already mounted!"),l.set(Pi),this._C=d,this._T=o||this._T||(this.is(Ao)?op:rp),this._E=i||this._E;var c=yo({},tp,this._E,{Transition:this._T});return mi(c,function(u,p){var v=u(s,d,s._o);d[p]=v,v.setup&&v.setup()}),mi(d,function(u){u.mount&&u.mount()}),this.emit(Jn),Tn(this.root,xu),l.set(_i),this.emit(wa),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(Zn(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(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Pi)?Yt(this).on(wa,this.destroy.bind(this,i)):(mi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(ja),o.destroy(),i&&Wn(this.splides),s.set(cr)),this},nu(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})(),Za=ap;Za.defaults={};Za.STATES=ou;var Rs=[[Jn,"onMounted"],[wa,"onReady"],[_n,"onMove"],[Yi,"onMoved"],[Da,"onClick"],[Ul,"onActive"],[Xl,"onInactive"],[Kl,"onVisible"],[Yl,"onHidden"],[en,"onRefresh"],[sn,"onUpdated"],[Hi,"onResize"],[br,"onResized"],[Zl,"onDrag"],[Jl,"onDragging"],[Ql,"onDragged"],[wr,"onScroll"],[vi,"onScrolled"],[ja,"onDestroy"],[ec,"onArrowsMounted"],[tc,"onArrowsUpdated"],[nc,"onPaginationMounted"],[ic,"onPaginationUpdated"],[za,"onNavigationMounted"],[Ba,"onAutoplayPlay"],[oc,"onAutoplayPlaying"],[Va,"onAutoplayPause"],[Ga,"onLazyLoadLoaded"]];function Ja(...e){return e.filter(Boolean).join(" ")}function mr(e){return e!==null&&typeof e=="object"}function Ca(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Ca(n,t[i]));if(mr(e)&&mr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Ca(e[o],t[o]))}return e===t}function sp(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lp(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 Ta(e,t){const n=e;return lp(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():mr(i)?n[o]=Ta(mr(n[o])?n[o]:{},i):n[o]=i}),n}var cp=({children:e,className:t,...n})=>a.createElement("div",{className:Ja("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Qa=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 Za(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ta({},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&&!Ca(this.options,e)&&(this.splide.options=e,this.options=Ta({},e));const t=this.getSlides();sp(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){Rs.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:Ja("splide",e),ref:this.splideRef,...this.omit(o,["options",...Rs.map(s=>s[1])])},n?a.createElement(cp,null,i):i)}},es=({children:e,className:t,...n})=>a.createElement("li",{className:Ja("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react"),ut=require("classnames"),C=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Yn=require("react-dom");function ud(e){return e.type==="object"&&e.version===1}const pd="ControlSlider-module__wrapper___sHEkd",md="ControlSlider-module__hoverArrow___A-dOH",gd="ControlSlider-module__sliderItem___QQSkR",hd="ControlSlider-module__sliderImage___9hRl-",fd="ControlSlider-module__arrow___05ghY",yd="ControlSlider-module__arrowVertical___tBfVN",vd="ControlSlider-module__nextArrow___-30Yc",xd="ControlSlider-module__arrowInner___aEra3",bd="ControlSlider-module__arrowIcon___S4ztF",wd="ControlSlider-module__arrowImg___2dwJW",Sd="ControlSlider-module__mirror___brd6U",$d="ControlSlider-module__pagination___bicLF",Cd="ControlSlider-module__paginationInner___bT-P-",Td="ControlSlider-module__paginationVertical___zYqKw",Ld="ControlSlider-module__paginationItem___nTRbk",Rd="ControlSlider-module__dot___p1Qun",Id="ControlSlider-module__activeDot___LHFaj",Ed="ControlSlider-module__paginationInsideBottom___R3FWn",Md="ControlSlider-module__paginationInsideTop___V-qb-",Pd="ControlSlider-module__paginationOutsideBottom___14w8D",kd="ControlSlider-module__paginationOutsideTop___SCLqB",Ad="ControlSlider-module__paginationInsideLeft___yOBRZ",Fd="ControlSlider-module__paginationInsideRight___Rtt3o",Wd="ControlSlider-module__paginationOutsideLeft___lahaw",_d="ControlSlider-module__paginationOutsideRight___EtuQa",Hd="ControlSlider-module__imgWrapper___UjEgB",Nd="ControlSlider-module__captionBlock___dJ6-j",Od="ControlSlider-module__captionTextWrapper___HFlpf",Dd="ControlSlider-module__captionText___uGBVc",jd="ControlSlider-module__active___WZK4G",zd="ControlSlider-module__withPointerEvents___t-18M",Bd="ControlSlider-module__topLeftAlignment___zjnGM",Vd="ControlSlider-module__topCenterAlignment___gD1xW",Gd="ControlSlider-module__topRightAlignment___NMapS",qd="ControlSlider-module__middleLeftAlignment___OnUrY",Ud="ControlSlider-module__middleCenterAlignment___Tdkl0",Xd="ControlSlider-module__middleRightAlignment___wEbfX",Kd="ControlSlider-module__bottomLeftAlignment___cTP2-",Yd="ControlSlider-module__bottomCenterAlignment___c54fB",Zd="ControlSlider-module__bottomRightAlignment___kEwrz",Jd="ControlSlider-module__clickOverlay___DZA28",Qd="ControlSlider-module__contain___pLyq7",eu="ControlSlider-module__cover___KdDat",ct={wrapper:pd,hoverArrow:md,sliderItem:gd,sliderImage:hd,arrow:fd,arrowVertical:yd,nextArrow:vd,arrowInner:xd,arrowIcon:bd,arrowImg:wd,mirror:Sd,pagination:$d,paginationInner:Cd,paginationVertical:Td,paginationItem:Ld,dot:Rd,activeDot:Id,paginationInsideBottom:Ed,paginationInsideTop:Md,paginationOutsideBottom:Pd,paginationOutsideTop:kd,paginationInsideLeft:Ad,paginationInsideRight:Fd,paginationOutsideLeft:Wd,paginationOutsideRight:_d,imgWrapper:Hd,captionBlock:Nd,captionTextWrapper:Od,captionText:Dd,active:jd,withPointerEvents:zd,topLeftAlignment:Bd,topCenterAlignment:Vd,topRightAlignment:Gd,middleLeftAlignment:qd,middleCenterAlignment:Ud,middleRightAlignment:Xd,bottomLeftAlignment:Kd,bottomCenterAlignment:Yd,bottomRightAlignment:Zd,clickOverlay:Jd,contain:Qd,cover:eu};function tu(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 nu(e,t,n){return t&&tu(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var gs="(prefers-reduced-motion: reduce)",Pi=1,iu=2,_i=3,Ki=4,Lo=5,nr=6,cr=7,ou={CREATED:Pi,MOUNTED:iu,IDLE:_i,MOVING:Ki,SCROLLING:Lo,DRAGGING:nr,DESTROYED:cr};function Wn(e){e.length=0}function Zn(e,t,n){return Array.prototype.slice.call(e,t,n)}function qt(e){return e.bind.apply(e,[null].concat(Zn(arguments,1)))}var Nl=setTimeout,ya=function(){};function hs(e){return requestAnimationFrame(e)}function xr(e,t){return typeof t===e}function go(e){return!Fa(e)&&xr("object",e)}var Aa=Array.isArray,Ol=qt(xr,"function"),qn=qt(xr,"string"),Ro=qt(xr,"undefined");function Fa(e){return e===null}function Dl(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Io(e){return Aa(e)?e:[e]}function yn(e,t){Io(e).forEach(t)}function Wa(e,t){return e.indexOf(t)>-1}function ir(e,t){return e.push.apply(e,Io(t)),e}function Mn(e,t,n){e&&yn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Tn(e,t){Mn(e,qn(t)?t.split(" "):t,!0)}function Eo(e,t){yn(t,e.appendChild.bind(e))}function _a(e,t){yn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ho(e,t){return Dl(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function jl(e,t){var n=e?Zn(e.children):[];return t?n.filter(function(i){return ho(i,t)}):n}function Mo(e,t){return t?jl(e,t)[0]:e.firstElementChild}var fo=Object.keys;function mi(e,t,n){return e&&(n?fo(e).reverse():fo(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function yo(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){e[i]=t[i]})}),e}function zn(e){return Zn(arguments,1).forEach(function(t){mi(t,function(n,i){Aa(n)?e[i]=n.slice():go(n)?e[i]=zn({},go(e[i])?e[i]:{},n):e[i]=n})}),e}function fs(e,t){yn(t||fo(e),function(n){delete e[n]})}function Ln(e,t){yn(e,function(n){yn(t,function(i){n&&n.removeAttribute(i)})})}function $t(e,t,n){go(t)?mi(t,function(i,o){$t(e,o,i)}):yn(e,function(i){Fa(n)||n===""?Ln(i,t):i.setAttribute(t,String(n))})}function ki(e,t,n){var i=document.createElement(e);return t&&(qn(t)?Tn(i,t):$t(i,t)),n&&Eo(n,i),i}function xn(e,t,n){if(Ro(n))return getComputedStyle(e)[t];Fa(n)||(e.style[t]=""+n)}function vo(e,t){xn(e,"display",t)}function zl(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function bn(e,t){return e.getAttribute(t)}function ys(e,t){return e&&e.classList.contains(t)}function mn(e){return e.getBoundingClientRect()}function hi(e){yn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Bl(e){return Mo(new DOMParser().parseFromString(e,"text/html").body)}function En(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Vl(e,t){return e&&e.querySelector(t)}function Ha(e,t){return t?Zn(e.querySelectorAll(t)):[]}function Pn(e,t){Mn(e,t,!1)}function va(e){return e.timeStamp}function ii(e){return qn(e)?e:e?e+"px":""}var Po="splide",Na="data-"+Po;function co(e,t){if(!e)throw new Error("["+Po+"] "+(t||""))}var Un=Math.min,dr=Math.max,ur=Math.floor,xo=Math.ceil,cn=Math.abs;function Gl(e,t,n){return cn(e-t)<n}function or(e,t,n,i){var o=Un(t,n),s=dr(t,n);return i?o<e&&e<s:o<=e&&e<=s}function Ri(e,t,n){var i=Un(t,n),o=dr(t,n);return Un(dr(i,e),o)}function xa(e){return+(e>0)-+(e<0)}function ba(e,t){return yn(t,function(n){e=e.replace("%s",""+n)}),e}function Oa(e){return e<10?"0"+e:""+e}var vs={};function ru(e){return""+e+Oa(vs[e]=(vs[e]||0)+1)}function ql(){var e=[];function t(l,d,c,u){o(l,d,function(p,v,y){var g="addEventListener"in p,h=g?p.removeEventListener.bind(p,v,c,u):p.removeListener.bind(p,c);g?p.addEventListener(v,c,u):p.addListener(c),e.push([p,v,y,c,h])})}function n(l,d,c){o(l,d,function(u,p,v){e=e.filter(function(y){return y[0]===u&&y[1]===p&&y[2]===v&&(!c||y[3]===c)?(y[4](),!1):!0})})}function i(l,d,c){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(d,{bubbles:p,detail:c}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(d,p,!1,c)),l.dispatchEvent(u),u}function o(l,d,c){yn(l,function(u){u&&yn(d,function(p){p.split(" ").forEach(function(v){var y=v.split(".");c(u,y[0],y[1])})})})}function s(){e.forEach(function(l){l[4]()}),Wn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Jn="mounted",wa="ready",_n="move",Yi="moved",Da="click",Ul="active",Xl="inactive",Kl="visible",Yl="hidden",en="refresh",sn="updated",Hi="resize",br="resized",Zl="drag",Jl="dragging",Ql="dragged",wr="scroll",vi="scrolled",au="overflow",ja="destroy",ec="arrows:mounted",tc="arrows:updated",nc="pagination:mounted",ic="pagination:updated",za="navigation:mounted",Ba="autoplay:play",oc="autoplay:playing",Va="autoplay:pause",Ga="lazyload:loaded",rc="sk",ac="sh",pr="ei";function Yt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ql();function i(s,l){n.bind(t,Io(s).join(" "),function(d){l.apply(l,Aa(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Zn(arguments,1))}return e&&e.event.on(ja,n.destroy),yo(n,{bus:t,on:i,off:qt(n.unbind,t),emit:o})}function Sr(e,t,n,i){var o=Date.now,s,l=0,d,c=!0,u=0;function p(){if(!c){if(l=e?Un((o()-s)/e,1):1,n&&n(l),l>=1&&(t(),s=o(),i&&++u>=i))return y();d=hs(p)}}function v(I){I||h(),s=o()-(I?l*e:0),c=!1,d=hs(p)}function y(){c=!0}function g(){s=o(),l=0,n&&n(l)}function h(){d&&cancelAnimationFrame(d),l=0,d=0,c=!0}function m(I){e=I}function b(){return c}return{start:v,rewind:g,pause:y,cancel:h,set:m,isPaused:b}}function su(e){var t=e;function n(o){t=o}function i(o){return Wa(Io(o),t)}return{set:n,is:i}}function lu(e,t){var n=Sr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function cu(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},l=ql(),d=[];function c(){var h=n.mediaQuery==="min";fo(o).sort(function(m,b){return h?+m-+b:+b-+m}).forEach(function(m){p(o[m],"("+(h?"min":"max")+"-width:"+m+"px)")}),p(s,gs),v()}function u(h){h&&l.destroy()}function p(h,m){var b=matchMedia(m);l.bind(b,"change",v),d.push([h,b])}function v(){var h=i.is(cr),m=n.direction,b=d.reduce(function(I,R){return zn(I,R[1].matches?R[0]:{})},{});fs(n),g(b),n.destroy?e.destroy(n.destroy==="completely"):h?(u(!0),e.mount()):m!==n.direction&&e.refresh()}function y(h){matchMedia(gs).matches&&(h?zn(n,s):fs(n,fo(s)))}function g(h,m,b){zn(n,h),m&&zn(Object.getPrototypeOf(n),h),(b||!i.is(Pi))&&e.emit(sn,n)}return{setup:c,destroy:u,reduce:y,set:g}}var $r="Arrow",Cr=$r+"Left",Tr=$r+"Right",sc=$r+"Up",lc=$r+"Down",xs="rtl",Lr="ttb",Dr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[sc,Tr],ArrowRight:[lc,Cr]};function du(e,t,n){function i(s,l,d){d=d||n.direction;var c=d===xs&&!l?1:d===Lr?0:-1;return Dr[s]&&Dr[s][c]||s.replace(/width|left|right/i,function(u,p){var v=Dr[u.toLowerCase()][c]||u;return p>0?v.charAt(0).toUpperCase()+v.slice(1):v})}function o(s){return s*(n.direction===xs?1:-1)}return{resolve:i,orient:o}}var kn="role",Ai="tabindex",uu="disabled",wn="aria-",ko=wn+"controls",cc=wn+"current",bs=wn+"selected",hn=wn+"label",qa=wn+"labelledby",dc=wn+"hidden",Ua=wn+"orientation",bo=wn+"roledescription",ws=wn+"live",Ss=wn+"busy",$s=wn+"atomic",Xa=[kn,Ai,uu,ko,cc,hn,qa,dc,Ua,bo],Rn=Po+"__",Qn="is-",jr=Po,Cs=Rn+"track",pu=Rn+"list",Rr=Rn+"slide",uc=Rr+"--clone",mu=Rr+"__container",Ka=Rn+"arrows",Ir=Rn+"arrow",pc=Ir+"--prev",mc=Ir+"--next",Er=Rn+"pagination",gc=Er+"__page",gu=Rn+"progress",hu=gu+"__bar",fu=Rn+"toggle",yu=Rn+"spinner",vu=Rn+"sr",xu=Qn+"initialized",fi=Qn+"active",hc=Qn+"prev",fc=Qn+"next",Sa=Qn+"visible",$a=Qn+"loading",yc=Qn+"focus-in",vc=Qn+"overflow",bu=[fi,Sa,hc,fc,$a,yc,vc],wu={slide:Rr,clone:uc,arrows:Ka,arrow:Ir,prev:pc,next:mc,pagination:Er,page:gc,spinner:yu};function Su(e,t){if(Ol(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ho(n,t);)n=n.parentElement;return n}var $u=5,Ts=200,xc="touchstart mousedown",zr="touchmove mousemove",Br="touchend touchcancel mouseup click";function Cu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=e.root,d=n.i18n,c={},u=[],p=[],v=[],y,g,h;function m(){T(),G(),R()}function b(){o(en,I),o(en,m),o(sn,R),s(document,xc+" keydown",function(k){h=k.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,yc,!!h)})}function I(k){var L=Xa.concat("style");Wn(u),Pn(l,p),Pn(y,v),Ln([y,g],L),Ln(l,k?L:["style",bo])}function R(){Pn(l,p),Pn(y,v),p=V(jr),v=V(Cs),Tn(l,p),Tn(y,v),$t(l,hn,n.label),$t(l,qa,n.labelledby)}function T(){y=A("."+Cs),g=Mo(y,"."+pu),co(y&&g,"A track/list element is missing."),ir(u,jl(g,"."+Rr+":not(."+uc+")")),mi({arrows:Ka,pagination:Er,prev:pc,next:mc,bar:hu,toggle:fu},function(k,L){c[L]=A("."+k)}),yo(c,{root:l,track:y,list:g,slides:u})}function G(){var k=l.id||ru(Po),L=n.role;l.id=k,y.id=y.id||k+"-track",g.id=g.id||k+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&L&&$t(l,kn,L),$t(l,bo,d.carousel),$t(g,kn,"presentation")}function A(k){var L=Vl(l,k);return L&&Su(L,"."+jr)===l?L:void 0}function V(k){return[k+"--"+n.type,k+"--"+n.direction,n.drag&&k+"--draggable",n.isNavigation&&k+"--nav",k===jr&&fi]}return yo(c,{setup:m,mount:b,destroy:I})}var Ni="slide",Zi="loop",Ao="fade";function Tu(e,t,n,i){var o=Yt(e),s=o.on,l=o.emit,d=o.bind,c=e.Components,u=e.root,p=e.options,v=p.isNavigation,y=p.updateOnMove,g=p.i18n,h=p.pagination,m=p.slideFocus,b=c.Direction.resolve,I=bn(i,"style"),R=bn(i,hn),T=n>-1,G=Mo(i,"."+mu),A;function V(){T||(i.id=u.id+"-slide"+Oa(t+1),$t(i,kn,h?"tabpanel":"group"),$t(i,bo,g.slide),$t(i,hn,R||ba(g.slideLabel,[t+1,e.length]))),k()}function k(){d(i,"click",qt(l,Da,ie)),d(i,"keydown",qt(l,rc,ie)),s([Yi,ac,vi],W),s(za,D),y&&s(_n,x)}function L(){A=!0,o.destroy(),Pn(i,bu),Ln(i,Xa),$t(i,"style",I),$t(i,hn,R||"")}function D(){var S=e.splides.map(function(E){var O=E.splide.Components.Slides.getAt(t);return O?O.slide.id:""}).join(" ");$t(i,hn,ba(g.slideX,(T?n:t)+1)),$t(i,ko,S),$t(i,kn,m?"button":""),m&&Ln(i,bo)}function x(){A||W()}function W(){if(!A){var S=e.index;M(),Y(),Mn(i,hc,t===S-1),Mn(i,fc,t===S+1)}}function M(){var S=U();S!==ys(i,fi)&&(Mn(i,fi,S),$t(i,cc,v&&S||""),l(S?Ul:Xl,ie))}function Y(){var S=B(),E=!S&&(!U()||T);if(e.state.is([Ki,Lo])||$t(i,dc,E||""),$t(Ha(i,p.focusableNodes||""),Ai,E?-1:""),m&&$t(i,Ai,E?-1:0),S!==ys(i,Sa)&&(Mn(i,Sa,S),l(S?Kl:Yl,ie)),!S&&document.activeElement===i){var O=c.Slides.getAt(e.index);O&&zl(O.slide)}}function F(S,E,O){xn(O&&G||i,S,E)}function U(){var S=e.index;return S===t||p.cloneStatus&&S===n}function B(){if(e.is(Ao))return U();var S=mn(c.Elements.track),E=mn(i),O=b("left",!0),le=b("right",!0);return ur(S[O])<=xo(E[O])&&ur(E[le])<=xo(S[le])}function j(S,E){var O=cn(S-t);return!T&&(p.rewind||e.is(Zi))&&(O=Un(O,e.length-O)),O<=E}var ie={index:t,slideIndex:n,slide:i,container:G,isClone:T,mount:V,destroy:L,update:W,style:F,isWithin:j};return ie}function Lu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Elements,c=d.slides,u=d.list,p=[];function v(){y(),o(en,g),o(en,y)}function y(){c.forEach(function(W,M){m(W,M,-1)})}function g(){A(function(W){W.destroy()}),Wn(p)}function h(){A(function(W){W.update()})}function m(W,M,Y){var F=Tu(e,M,Y,W);F.mount(),p.push(F),p.sort(function(U,B){return U.index-B.index})}function b(W){return W?V(function(M){return!M.isClone}):p}function I(W){var M=t.Controller,Y=M.toIndex(W),F=M.hasFocus()?1:n.perPage;return V(function(U){return or(U.index,Y,Y+F-1)})}function R(W){return V(W)[0]}function T(W,M){yn(W,function(Y){if(qn(Y)&&(Y=Bl(Y)),Dl(Y)){var F=c[M];F?_a(Y,F):Eo(u,Y),Tn(Y,n.classes.slide),L(Y,qt(s,Hi))}}),s(en)}function G(W){hi(V(W).map(function(M){return M.slide})),s(en)}function A(W,M){b(M).forEach(W)}function V(W){return p.filter(Ol(W)?W:function(M){return qn(W)?ho(M.slide,W):Wa(Io(W),M.index)})}function k(W,M,Y){A(function(F){F.style(W,M,Y)})}function L(W,M){var Y=Ha(W,"img"),F=Y.length;F?Y.forEach(function(U){l(U,"load error",function(){--F||M()})}):M()}function D(W){return W?c.length:p.length}function x(){return p.length>n.perPage}return{mount:v,destroy:g,update:h,register:m,get:b,getIn:I,getAt:R,add:T,remove:G,forEach:A,filter:V,style:k,getLength:D,isEnough:x}}function Ru(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=t.Slides,c=t.Direction.resolve,u=t.Elements,p=u.root,v=u.track,y=u.list,g=d.getAt,h=d.style,m,b,I;function R(){T(),s(window,"resize load",lu(qt(l,Hi))),o([sn,en],T),o(Hi,G)}function T(){m=n.direction===Lr,xn(p,"maxWidth",ii(n.width)),xn(v,c("paddingLeft"),A(!1)),xn(v,c("paddingRight"),A(!0)),G(!0)}function G(ie){var S=mn(p);(ie||b.width!==S.width||b.height!==S.height)&&(xn(v,"height",V()),h(c("marginRight"),ii(n.gap)),h("width",L()),h("height",D(),!0),b=S,l(br),I!==(I=j())&&(Mn(p,vc,I),l(au,I)))}function A(ie){var S=n.padding,E=c(ie?"right":"left");return S&&ii(S[E]||(go(S)?0:S))||"0px"}function V(){var ie="";return m&&(ie=k(),co(ie,"height or heightRatio is missing."),ie="calc("+ie+" - "+A(!1)+" - "+A(!0)+")"),ie}function k(){return ii(n.height||mn(y).width*n.heightRatio)}function L(){return n.autoWidth?null:ii(n.fixedWidth)||(m?"":x())}function D(){return ii(n.fixedHeight)||(m?n.autoHeight?null:x():k())}function x(){var ie=ii(n.gap);return"calc((100%"+(ie&&" + "+ie)+")/"+(n.perPage||1)+(ie&&" - "+ie)+")"}function W(){return mn(y)[c("width")]}function M(ie,S){var E=g(ie||0);return E?mn(E.slide)[c("width")]+(S?0:U()):0}function Y(ie,S){var E=g(ie);if(E){var O=mn(E.slide)[c("right")],le=mn(y)[c("left")];return cn(O-le)+(S?0:U())}return 0}function F(ie){return Y(e.length-1)-Y(0)+M(0,ie)}function U(){var ie=g(0);return ie&&parseFloat(xn(ie.slide,c("marginRight")))||0}function B(ie){return parseFloat(xn(v,c("padding"+(ie?"Right":"Left"))))||0}function j(){return e.is(Ao)||F(!0)>W()}return{mount:R,resize:G,listSize:W,slideSize:M,sliderSize:F,totalSize:Y,getPadding:B,isOverflow:j}}var Iu=2;function Eu(e,t,n){var i=Yt(e),o=i.on,s=t.Elements,l=t.Slides,d=t.Direction.resolve,c=[],u;function p(){o(en,v),o([sn,Hi],g),(u=b())&&(h(u),t.Layout.resize(!0))}function v(){y(),p()}function y(){hi(c),Wn(c),i.destroy()}function g(){var I=b();u!==I&&(u<I||!I)&&i.emit(en)}function h(I){var R=l.get().slice(),T=R.length;if(T){for(;R.length<I;)ir(R,R);ir(R.slice(-I),R.slice(0,I)).forEach(function(G,A){var V=A<I,k=m(G.slide,A);V?_a(k,R[0].slide):Eo(s.list,k),ir(c,k),l.register(k,A-I+(V?0:T),G.index)})}}function m(I,R){var T=I.cloneNode(!0);return Tn(T,n.classes.clone),T.id=e.root.id+"-clone"+Oa(R+1),T}function b(){var I=n.clones;if(!e.is(Zi))I=0;else if(Ro(I)){var R=n[d("fixedWidth")]&&t.Layout.slideSize(0),T=R&&xo(mn(s.track)[d("width")]/R);I=T||n[d("autoWidth")]&&e.length||n.perPage*Iu}return I}return{mount:p,destroy:y}}function Mu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Layout,c=d.slideSize,u=d.getPadding,p=d.totalSize,v=d.listSize,y=d.sliderSize,g=t.Direction,h=g.resolve,m=g.orient,b=t.Elements,I=b.list,R=b.track,T;function G(){T=t.Transition,o([Jn,br,sn,en],A)}function A(){t.Controller.isBusy()||(t.Scroll.cancel(),k(e.index),t.Slides.update())}function V(E,O,le,oe){E!==O&&ie(E>le)&&(W(),L(x(F(),E>le),!0)),l(Ki),s(_n,O,le,E),T.start(O,function(){l(_i),s(Yi,O,le,E),oe&&oe()})}function k(E){L(Y(E,!0))}function L(E,O){if(!e.is(Ao)){var le=O?E:D(E);xn(I,"transform","translate"+h("X")+"("+le+"px)"),E!==le&&s(ac)}}function D(E){if(e.is(Zi)){var O=M(E),le=O>t.Controller.getEnd(),oe=O<0;(oe||le)&&(E=x(E,le))}return E}function x(E,O){var le=E-j(O),oe=y();return E-=m(oe*(xo(cn(le)/oe)||1))*(O?1:-1),E}function W(){L(F(),!0),T.cancel()}function M(E){for(var O=t.Slides.get(),le=0,oe=1/0,$=0;$<O.length;$++){var ae=O[$].index,P=cn(Y(ae,!0)-E);if(P<=oe)oe=P,le=ae;else break}return le}function Y(E,O){var le=m(p(E-1)-B(E));return O?U(le):le}function F(){var E=h("left");return mn(I)[E]-mn(R)[E]+m(u(!1))}function U(E){return n.trimSpace&&e.is(Ni)&&(E=Ri(E,0,m(y(!0)-v()))),E}function B(E){var O=n.focus;return O==="center"?(v()-c(E,!0))/2:+O*c(E)||0}function j(E){return Y(E?t.Controller.getEnd():0,!!n.trimSpace)}function ie(E){var O=m(x(F(),E));return E?O>=0:O<=I[h("scrollWidth")]-mn(R)[h("width")]}function S(E,O){O=Ro(O)?F():O;var le=E!==!0&&m(O)<m(j(!1)),oe=E!==!1&&m(O)>m(j(!0));return le||oe}return{mount:G,move:V,jump:k,translate:L,shift:x,cancel:W,toIndex:M,toPosition:Y,getPosition:F,getLimit:j,exceededLimit:S,reposition:A}}function Pu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=t.Move,d=l.getPosition,c=l.getLimit,u=l.toPosition,p=t.Slides,v=p.isEnough,y=p.getLength,g=n.omitEnd,h=e.is(Zi),m=e.is(Ni),b=qt(F,!1),I=qt(F,!0),R=n.start||0,T,G=R,A,V,k;function L(){D(),o([sn,en,pr],D),o(br,x)}function D(){A=y(!0),V=n.perMove,k=n.perPage,T=ie();var P=Ri(R,0,g?T:A-1);P!==R&&(R=P,l.reposition())}function x(){T!==ie()&&s(pr)}function W(P,te,K){if(!ae()){var xe=Y(P),Fe=j(xe);Fe>-1&&(te||Fe!==R)&&(le(Fe),l.move(xe,Fe,G,K))}}function M(P,te,K,xe){t.Scroll.scroll(P,te,K,function(){var Fe=j(l.toIndex(d()));le(g?Un(Fe,T):Fe),xe&&xe()})}function Y(P){var te=R;if(qn(P)){var K=P.match(/([+\-<>])(\d+)?/)||[],xe=K[1],Fe=K[2];xe==="+"||xe==="-"?te=U(R+ +(""+xe+(+Fe||1)),R):xe===">"?te=Fe?S(+Fe):b(!0):xe==="<"&&(te=I(!0))}else te=h?P:Ri(P,0,T);return te}function F(P,te){var K=V||($()?1:k),xe=U(R+K*(P?-1:1),R,!(V||$()));return xe===-1&&m&&!Gl(d(),c(!P),1)?P?0:T:te?xe:j(xe)}function U(P,te,K){if(v()||$()){var xe=B(P);xe!==P&&(te=P,P=xe,K=!1),P<0||P>T?!V&&(or(0,P,te,!0)||or(T,te,P,!0))?P=S(E(P)):h?P=K?P<0?-(A%k||k):A:P:n.rewind?P=P<0?T:0:P=-1:K&&P!==te&&(P=S(E(te)+(P<te?-1:1)))}else P=-1;return P}function B(P){if(m&&n.trimSpace==="move"&&P!==R)for(var te=d();te===u(P,!0)&&or(P,0,e.length-1,!n.rewind);)P<R?--P:++P;return P}function j(P){return h?(P+A)%A||0:P}function ie(){for(var P=A-($()||h&&V?1:k);g&&P-- >0;)if(u(A-1,!0)!==u(P,!0)){P++;break}return Ri(P,0,A-1)}function S(P){return Ri($()?P:k*P,0,T)}function E(P){return $()?Un(P,T):ur((P>=T?A-1:P)/k)}function O(P){var te=l.toIndex(P);return m?Ri(te,0,T):te}function le(P){P!==R&&(G=R,R=P)}function oe(P){return P?G:R}function $(){return!Ro(n.focus)||n.isNavigation}function ae(){return e.state.is([Ki,Lo])&&!!n.waitForTransition}return{mount:L,go:W,scroll:M,getNext:b,getPrev:I,getAdjacent:F,getEnd:ie,setIndex:le,getIndex:oe,toIndex:S,toPage:E,toDest:O,hasFocus:$,isBusy:ae}}var ku="http://www.w3.org/2000/svg",Au="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",Do=40;function Fu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=n.classes,c=n.i18n,u=t.Elements,p=t.Controller,v=u.arrows,y=u.track,g=v,h=u.prev,m=u.next,b,I,R={};function T(){A(),o(sn,G)}function G(){V(),T()}function A(){var M=n.arrows;M&&!(h&&m)&&D(),h&&m&&(yo(R,{prev:h,next:m}),vo(g,M?"":"none"),Tn(g,I=Ka+"--"+n.direction),M&&(k(),W(),$t([h,m],ko,y.id),l(ec,h,m)))}function V(){i.destroy(),Pn(g,I),b?(hi(v?[h,m]:g),h=m=null):Ln([h,m],Xa)}function k(){o([Jn,Yi,en,vi,pr],W),s(m,"click",qt(L,">")),s(h,"click",qt(L,"<"))}function L(M){p.go(M,!0)}function D(){g=v||ki("div",d.arrows),h=x(!0),m=x(!1),b=!0,Eo(g,[h,m]),!v&&_a(g,y)}function x(M){var Y='<button class="'+d.arrow+" "+(M?d.prev:d.next)+'" type="button"><svg xmlns="'+ku+'" viewBox="0 0 '+Do+" "+Do+'" width="'+Do+'" height="'+Do+'" focusable="false"><path d="'+(n.arrowPath||Au)+'" />';return Bl(Y)}function W(){if(h&&m){var M=e.index,Y=p.getPrev(),F=p.getNext(),U=Y>-1&&M<Y?c.last:c.prev,B=F>-1&&M>F?c.first:c.next;h.disabled=Y<0,m.disabled=F<0,$t(h,hn,U),$t(m,hn,B),l(tc,h,m,Y,F)}}return{arrows:R,mount:T,destroy:V,update:W}}var Wu=Na+"-interval";function _u(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.emit,d=Sr(n.interval,e.go.bind(e,">"),k),c=d.isPaused,u=t.Elements,p=t.Elements,v=p.root,y=p.toggle,g=n.autoplay,h,m,b=g==="pause";function I(){g&&(R(),y&&$t(y,ko,u.track.id),b||T(),V())}function R(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(D){h=D.type==="mouseenter",A()}),n.pauseOnFocus&&s(v,"focusin focusout",function(D){m=D.type==="focusin",A()}),y&&s(y,"click",function(){b?T():G(!0)}),o([_n,wr,en],d.rewind),o(_n,L)}function T(){c()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),m=h=b=!1,V(),l(Ba))}function G(D){D===void 0&&(D=!0),b=!!D,V(),c()||(d.pause(),l(Va))}function A(){b||(h||m?G(!1):T())}function V(){y&&(Mn(y,fi,!b),$t(y,hn,n.i18n[b?"play":"pause"]))}function k(D){var x=u.bar;x&&xn(x,"width",D*100+"%"),l(oc,D)}function L(D){var x=t.Slides.getAt(D);d.set(x&&+bn(x.slide,Wu)||n.interval)}return{mount:I,destroy:d.cancel,play:T,pause:G,isPaused:c}}function Hu(e,t,n){var i=Yt(e),o=i.on;function s(){n.cover&&(o(Ga,qt(d,!0)),o([Jn,sn,en],qt(l,!0)))}function l(c){t.Slides.forEach(function(u){var p=Mo(u.container||u.slide,"img");p&&p.src&&d(c,p,u)})}function d(c,u,p){p.style("background",c?'center/cover no-repeat url("'+u.src+'")':"",!0),vo(u,c?"none":"")}return{mount:s,destroy:qt(l,!1)}}var Nu=10,Ou=600,Du=.6,ju=1.5,zu=800;function Bu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=e.state.set,d=t.Move,c=d.getPosition,u=d.getLimit,p=d.exceededLimit,v=d.translate,y=e.is(Ni),g,h,m=1;function b(){o(_n,G),o([sn,en],A)}function I(k,L,D,x,W){var M=c();if(G(),D&&(!y||!p())){var Y=t.Layout.sliderSize(),F=xa(k)*Y*ur(cn(k)/Y)||0;k=d.toPosition(t.Controller.toDest(k%Y))+F}var U=Gl(M,k,1);m=1,L=U?0:L||dr(cn(k-M)/ju,zu),h=x,g=Sr(L,R,qt(T,M,k,W),1),l(Lo),s(wr),g.start()}function R(){l(_i),h&&h(),s(vi)}function T(k,L,D,x){var W=c(),M=k+(L-k)*V(x),Y=(M-W)*m;v(W+Y),y&&!D&&p()&&(m*=Du,cn(Y)<Nu&&I(u(p(!0)),Ou,!1,h,!0))}function G(){g&&g.cancel()}function A(){g&&!g.isPaused()&&(G(),R())}function V(k){var L=n.easingFunc;return L?L(k):1-Math.pow(1-k,4)}return{mount:b,destroy:G,scroll:I,cancel:A}}var Ii={passive:!1,capture:!0};function Vu(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=i.unbind,c=e.state,u=t.Move,p=t.Scroll,v=t.Controller,y=t.Elements.track,g=t.Media.reduce,h=t.Direction,m=h.resolve,b=h.orient,I=u.getPosition,R=u.exceededLimit,T,G,A,V,k,L=!1,D,x,W;function M(){l(y,zr,ya,Ii),l(y,Br,ya,Ii),l(y,xc,F,Ii),l(y,"click",j,{capture:!0}),l(y,"dragstart",En),o([Jn,sn],Y)}function Y(){var X=n.drag;ce(!X),V=X==="free"}function F(X){if(D=!1,!x){var ee=Fe(X);xe(X.target)&&(ee||!X.button)&&(v.isBusy()?En(X,!0):(W=ee?y:window,k=c.is([Ki,Lo]),A=null,l(W,zr,U,Ii),l(W,Br,B,Ii),u.cancel(),p.cancel(),ie(X)))}}function U(X){if(c.is(nr)||(c.set(nr),s(Zl)),X.cancelable)if(k){u.translate(T+K($(X)));var ee=ae(X)>Ts,Z=L!==(L=R());(ee||Z)&&ie(X),D=!0,s(Jl),En(X)}else O(X)&&(k=E(X),En(X))}function B(X){c.is(nr)&&(c.set(_i),s(Ql)),k&&(S(X),En(X)),d(W,zr,U),d(W,Br,B),k=!1}function j(X){!x&&D&&En(X,!0)}function ie(X){A=G,G=X,T=I()}function S(X){var ee=le(X),Z=oe(ee),Pe=n.rewind&&n.rewindByDrag;g(!1),V?v.scroll(Z,0,n.snap):e.is(Ao)?v.go(b(xa(ee))<0?Pe?"<":"-":Pe?">":"+"):e.is(Ni)&&L&&Pe?v.go(R(!0)?">":"<"):v.go(v.toDest(Z),!0),g(!0)}function E(X){var ee=n.dragMinThreshold,Z=go(ee),Pe=Z&&ee.mouse||0,$e=(Z?ee.touch:+ee)||10;return cn($(X))>(Fe(X)?$e:Pe)}function O(X){return cn($(X))>cn($(X,!0))}function le(X){if(e.is(Zi)||!L){var ee=ae(X);if(ee&&ee<Ts)return $(X)/ee}return 0}function oe(X){return I()+xa(X)*Un(cn(X)*(n.flickPower||600),V?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function $(X,ee){return te(X,ee)-te(P(X),ee)}function ae(X){return va(X)-va(P(X))}function P(X){return G===X&&A||G}function te(X,ee){return(Fe(X)?X.changedTouches[0]:X)["page"+m(ee?"Y":"X")]}function K(X){return X/(L&&e.is(Ni)?$u:1)}function xe(X){var ee=n.noDrag;return!ho(X,"."+gc+", ."+Ir)&&(!ee||!ho(X,ee))}function Fe(X){return typeof TouchEvent<"u"&&X instanceof TouchEvent}function ge(){return k}function ce(X){x=X}return{mount:M,disable:ce,isDragging:ge}}var Gu={Spacebar:" ",Right:Tr,Left:Cr,Up:sc,Down:lc};function Ya(e){return e=qn(e)?e:e.key,Gu[e]||e}var Ls="keydown";function qu(e,t,n){var i=Yt(e),o=i.on,s=i.bind,l=i.unbind,d=e.root,c=t.Direction.resolve,u,p;function v(){y(),o(sn,g),o(sn,y),o(_n,m)}function y(){var I=n.keyboard;I&&(u=I==="global"?window:d,s(u,Ls,b))}function g(){l(u,Ls)}function h(I){p=I}function m(){var I=p;p=!0,Nl(function(){p=I})}function b(I){if(!p){var R=Ya(I);R===c(Cr)?e.go("<"):R===c(Tr)&&e.go(">")}}return{mount:v,destroy:g,disable:h}}var uo=Na+"-lazy",rr=uo+"-srcset",Uu="["+uo+"], ["+rr+"]";function Xu(e,t,n){var i=Yt(e),o=i.on,s=i.off,l=i.bind,d=i.emit,c=n.lazyLoad==="sequential",u=[Yi,vi],p=[];function v(){n.lazyLoad&&(y(),o(en,y))}function y(){Wn(p),g(),c?I():(s(u),o(u,h),h())}function g(){t.Slides.forEach(function(R){Ha(R.slide,Uu).forEach(function(T){var G=bn(T,uo),A=bn(T,rr);if(G!==T.src||A!==T.srcset){var V=n.classes.spinner,k=T.parentElement,L=Mo(k,"."+V)||ki("span",V,k);p.push([T,R,L]),T.src||vo(T,"none")}})})}function h(){p=p.filter(function(R){var T=n.perPage*((n.preloadPages||1)+1)-1;return R[1].isWithin(e.index,T)?m(R):!0}),p.length||s(u)}function m(R){var T=R[0];Tn(R[1].slide,$a),l(T,"load error",qt(b,R)),$t(T,"src",bn(T,uo)),$t(T,"srcset",bn(T,rr)),Ln(T,uo),Ln(T,rr)}function b(R,T){var G=R[0],A=R[1];Pn(A.slide,$a),T.type!=="error"&&(hi(R[2]),vo(G,""),d(Ga,G,A),d(Hi)),c&&I()}function I(){p.length&&m(p.shift())}return{mount:v,destroy:qt(Wn,p),check:h}}function Ku(e,t,n){var i=Yt(e),o=i.on,s=i.emit,l=i.bind,d=t.Slides,c=t.Elements,u=t.Controller,p=u.hasFocus,v=u.getIndex,y=u.go,g=t.Direction.resolve,h=c.pagination,m=[],b,I;function R(){T(),o([sn,en,pr],R);var x=n.pagination;h&&vo(h,x?"":"none"),x&&(o([_n,wr,vi],D),G(),D(),s(nc,{list:b,items:m},L(e.index)))}function T(){b&&(hi(h?Zn(b.children):b),Pn(b,I),Wn(m),b=null),i.destroy()}function G(){var x=e.length,W=n.classes,M=n.i18n,Y=n.perPage,F=p()?u.getEnd()+1:xo(x/Y);b=h||ki("ul",W.pagination,c.track.parentElement),Tn(b,I=Er+"--"+k()),$t(b,kn,"tablist"),$t(b,hn,M.select),$t(b,Ua,k()===Lr?"vertical":"");for(var U=0;U<F;U++){var B=ki("li",null,b),j=ki("button",{class:W.page,type:"button"},B),ie=d.getIn(U).map(function(E){return E.slide.id}),S=!p()&&Y>1?M.pageX:M.slideX;l(j,"click",qt(A,U)),n.paginationKeyboard&&l(j,"keydown",qt(V,U)),$t(B,kn,"presentation"),$t(j,kn,"tab"),$t(j,ko,ie.join(" ")),$t(j,hn,ba(S,U+1)),$t(j,Ai,-1),m.push({li:B,button:j,page:U})}}function A(x){y(">"+x,!0)}function V(x,W){var M=m.length,Y=Ya(W),F=k(),U=-1;Y===g(Tr,!1,F)?U=++x%M:Y===g(Cr,!1,F)?U=(--x+M)%M:Y==="Home"?U=0:Y==="End"&&(U=M-1);var B=m[U];B&&(zl(B.button),y(">"+U),En(W,!0))}function k(){return n.paginationDirection||n.direction}function L(x){return m[u.toPage(x)]}function D(){var x=L(v(!0)),W=L(v());if(x){var M=x.button;Pn(M,fi),Ln(M,bs),$t(M,Ai,-1)}if(W){var Y=W.button;Tn(Y,fi),$t(Y,bs,!0),$t(Y,Ai,"")}s(ic,{list:b,items:m},x,W)}return{items:m,mount:R,destroy:T,getAt:L,update:D}}var Yu=[" ","Enter"];function Zu(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function l(){e.splides.forEach(function(h){h.isParent||(u(e,h.splide),u(h.splide,e))}),i&&p()}function d(){s.forEach(function(h){h.destroy()}),Wn(s)}function c(){d(),l()}function u(h,m){var b=Yt(h);b.on(_n,function(I,R,T){m.go(m.is(Zi)?T:I)}),s.push(b)}function p(){var h=Yt(e),m=h.on;m(Da,y),m(rc,g),m([Jn,sn],v),s.push(h),h.emit(za,e.splides)}function v(){$t(t.Elements.list,Ua,n.direction===Lr?"vertical":"")}function y(h){e.go(h.index)}function g(h,m){Wa(Yu,Ya(m))&&(y(h),En(m))}return{setup:qt(t.Media.set,{slideFocus:Ro(o)?i:o},!0),mount:l,destroy:d,remount:c}}function Ju(e,t,n){var i=Yt(e),o=i.bind,s=0;function l(){n.wheel&&o(t.Elements.track,"wheel",d,Ii)}function d(u){if(u.cancelable){var p=u.deltaY,v=p<0,y=va(u),g=n.wheelMinThreshold||0,h=n.wheelSleep||0;cn(p)>g&&y-s>h&&(e.go(v?"<":">"),s=y),c(v)&&En(u)}}function c(u){return!n.releaseWheel||e.state.is(Ki)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Qu=90;function ep(e,t,n){var i=Yt(e),o=i.on,s=t.Elements.track,l=n.live&&!n.isNavigation,d=ki("span",vu),c=Sr(Qu,qt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),$t(s,$s,!0),d.textContent="…",o(Ba,qt(y,!0)),o(Va,qt(y,!1)),o([Yi,vi],qt(p,!0)))}function p(g){$t(s,Ss,g),g?(Eo(s,d),c.start()):(hi(d),c.cancel())}function v(){Ln(s,[ws,$s,Ss]),hi(d)}function y(g){l&&$t(s,ws,g?"off":"polite")}return{mount:u,disable:y,destroy:v}}var tp=Object.freeze({__proto__:null,Media:cu,Direction:du,Elements:Cu,Slides:Lu,Layout:Ru,Clones:Eu,Move:Mu,Controller:Pu,Arrows:Fu,Autoplay:_u,Cover:Hu,Scroll:Bu,Drag:Vu,Keyboard:qu,LazyLoad:Xu,Pagination:Ku,Sync:Zu,Wheel:Ju,Live:ep}),np={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"},ip={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:wu,i18n:np,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function op(e,t,n){var i=t.Slides;function o(){Yt(e).on([Jn,en],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function l(d,c){i.style("transition","opacity "+n.speed+"ms "+n.easing),Nl(c)}return{mount:o,start:l,cancel:ya}}function rp(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,l=t.Elements.list,d=qt(xn,l,"transition"),c;function u(){Yt(e).bind(l,"transitionend",function(g){g.target===l&&c&&(v(),c())})}function p(g,h){var m=i.toPosition(g,!0),b=i.getPosition(),I=y(g);cn(m-b)>=1&&I>=1?n.useScroll?s.scroll(m,I,!1,h):(d("transform "+I+"ms "+n.easing),i.translate(m,!0),c=h):(i.jump(g),h())}function v(){d(""),s.cancel()}function y(g){var h=n.rewindSpeed;if(e.is(Ni)&&h){var m=o.getIndex(!0),b=o.getEnd();if(m===0&&g>=b||m>=b&&g===0)return h}return n.speed}return{mount:u,start:p,cancel:v}}var ap=(function(){function e(n,i){this.event=Yt(),this.Components={},this.state=su(Pi),this.splides=[],this._o={},this._E={};var o=qn(n)?Vl(document,n):n;co(o,o+" is invalid."),this.root=o,i=zn({label:bn(o,hn)||"",labelledby:bn(o,qa)||""},ip,e.defaults,i||{});try{zn(i,JSON.parse(bn(o,Na)))}catch{co(!1,"Invalid JSON")}this._o=Object.create(zn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,l=this.state,d=this.Components;co(l.is([Pi,cr]),"Already mounted!"),l.set(Pi),this._C=d,this._T=o||this._T||(this.is(Ao)?op:rp),this._E=i||this._E;var c=yo({},tp,this._E,{Transition:this._T});return mi(c,function(u,p){var v=u(s,d,s._o);d[p]=v,v.setup&&v.setup()}),mi(d,function(u){u.mount&&u.mount()}),this.emit(Jn),Tn(this.root,xu),l.set(_i),this.emit(wa),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(Zn(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(en),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(Pi)?Yt(this).on(wa,this.destroy.bind(this,i)):(mi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(ja),o.destroy(),i&&Wn(this.splides),s.set(cr)),this},nu(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})(),Za=ap;Za.defaults={};Za.STATES=ou;var Rs=[[Jn,"onMounted"],[wa,"onReady"],[_n,"onMove"],[Yi,"onMoved"],[Da,"onClick"],[Ul,"onActive"],[Xl,"onInactive"],[Kl,"onVisible"],[Yl,"onHidden"],[en,"onRefresh"],[sn,"onUpdated"],[Hi,"onResize"],[br,"onResized"],[Zl,"onDrag"],[Jl,"onDragging"],[Ql,"onDragged"],[wr,"onScroll"],[vi,"onScrolled"],[ja,"onDestroy"],[ec,"onArrowsMounted"],[tc,"onArrowsUpdated"],[nc,"onPaginationMounted"],[ic,"onPaginationUpdated"],[za,"onNavigationMounted"],[Ba,"onAutoplayPlay"],[oc,"onAutoplayPlaying"],[Va,"onAutoplayPause"],[Ga,"onLazyLoadLoaded"]];function Ja(...e){return e.filter(Boolean).join(" ")}function mr(e){return e!==null&&typeof e=="object"}function Ca(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Ca(n,t[i]));if(mr(e)&&mr(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Ca(e[o],t[o]))}return e===t}function sp(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function lp(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 Ta(e,t){const n=e;return lp(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():mr(i)?n[o]=Ta(mr(n[o])?n[o]:{},i):n[o]=i}),n}var cp=({children:e,className:t,...n})=>a.createElement("div",{className:Ja("splide__track",t),...n},a.createElement("ul",{className:"splide__list"},e)),Qa=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 Za(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ta({},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&&!Ca(this.options,e)&&(this.splide.options=e,this.options=Ta({},e));const t=this.getSlides();sp(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){Rs.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:Ja("splide",e),ref:this.splideRef,...this.omit(o,["options",...Rs.map(s=>s[1])])},n?a.createElement(cp,null,i):i)}},es=({children:e,className:t,...n})=>a.createElement("li",{className:Ja("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 dp="RichTextRenderer-module__link___BWeZ2",up={link:dp},pp=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))},Mr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>pp(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function rn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Mr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:C.scalingValue(e.letterSpacing,t),wordSpacing:C.scalingValue(e.wordSpacing,t),fontSize:C.scalingValue(n,t),lineHeight:i!==void 0?C.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:up.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:mp(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 mp(e){return{...e.fontFamily&&{fontFamily:Mr(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 gp="SvgImage-module__svg___q3xE-",hp="SvgImage-module__img___VsTm-",Is={svg:gp,img:hp},fp=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yp=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,an=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=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("")');l(d)}},[]),!fp(e)||!s?r.jsx("img",{src:e,alt:"",className:ut(Is.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:ut(Is.svg,i),style:{"--svg":yp(e),"--fill":t,"--hover-fill":n,...o??{}}})},vp={"top-left":ct.topLeftAlignment,"top-center":ct.topCenterAlignment,"top-right":ct.topRightAlignment,"middle-left":ct.middleLeftAlignment,"middle-center":ct.middleCenterAlignment,"middle-right":ct.middleRightAlignment,"bottom-left":ct.bottomLeftAlignment,"bottom-center":ct.bottomCenterAlignment,"bottom-right":ct.bottomRightAlignment};function xp({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:y,color:g}=n.imageCaption??{},[h,m]=a.useState(void 0),[b,I]=a.useState(null),[R,T]=a.useState(0),[q,A]=a.useState(0),{direction:G,transition:k,controls:L,pagination:D,imageCaption:x,triggers:W}=e,M=a.useRef(k.type),{x:Y,y:F}=e.controls.offset,U=V=>{o&&o.go(V)};return a.useEffect(()=>{if(!b)return;const V=new ResizeObserver(z=>{if(!o)return;const[ie]=z;m({width:Math.round(ie.contentRect.width),height:Math.round(ie.contentRect.height)})});return V.observe(b),()=>V.unobserve(b)},[b]),a.useEffect(()=>{!o||M.current===k.type||(A(V=>V+1),M.current=k.type)},[k.type]),r.jsx("div",{className:ut(ct.wrapper,{[ct.editor]:i}),ref:I,children:r.jsxs("div",{className:ct.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:k.backgroundColor&&k.type==="fade in"?k.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:ut(ct.captionBlock),children:r.jsx("div",{className:ct.captionTextWrapper,children:t.map((V,z)=>r.jsx("div",{className:ut(ct.captionText,vp[x.alignment],{[ct.withPointerEvents]:z===R&&i,[ct.active]:z===R}),style:{fontFamily:Mr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":C.scalingValue(l.width,i),letterSpacing:C.scalingValue(c,i),wordSpacing:C.scalingValue(p,i),textAlign:u,fontSize:C.scalingValue(v.fontSize,i),lineHeight:C.scalingValue(v.lineHeight,i),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:g,transitionDuration:k.duration?`${Math.round(parseInt(k.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:ct.captionTextInner,style:{"--link-hover-color":x.linkHoverColor,"--link-color":x.linkColor,position:"relative",top:C.scalingValue(x.offset.y,i),left:C.scalingValue(x.offset.x,i)},children:r.jsx(yi,{content:V.imageCaption})})},z))})}),r.jsx(Qa,{onMove:V=>{T(V.index)},ref:s,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:G==="horiz"||k.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:k.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,z)=>r.jsx(es,{children:r.jsx("div",{className:ct.sliderItem,children:r.jsx("div",{className:ct.imgWrapper,children:r.jsx("img",{className:ut(ct.sliderImage,{[ct.contain]:V.image.objectFit==="contain",[ct.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},z))},q),L.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(ct.arrow,{[ct.arrowVertical]:G==="vert",[ct.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{onClick:()=>{U("-1")},className:ct.arrowInner,style:{transform:`translate(${C.scalingValue(Y,i)}, ${C.scalingValue(F*(G==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${G==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ut(ct.arrowImg,ct.mirror)}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:ut(ct.arrowIcon,ct.arrowImg,ct.mirror)})]})}),r.jsx("div",{className:ut(ct.arrow,ct.nextArrow,{[ct.arrowVertical]:G==="vert",[ct.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{className:ct.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${C.scalingValue(Y*(G==="horiz"?-1:1),i)}, ${C.scalingValue(F,i)}) scale(${e.controls.scale/100}) rotate(${G==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ct.arrowImg}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:ut(ct.arrowIcon,ct.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:ct.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&r.jsx("div",{className:ut(ct.pagination,{[ct.paginationInsideBottom]:D.position==="inside-1"&&G==="horiz",[ct.paginationInsideTop]:D.position==="inside-2"&&G==="horiz",[ct.paginationOutsideBottom]:D.position==="outside-1"&&G==="horiz",[ct.paginationOutsideTop]:D.position==="outside-2"&&G==="horiz",[ct.paginationInsideLeft]:D.position==="inside-1"&&G==="vert",[ct.paginationInsideRight]:D.position==="inside-2"&&G==="vert",[ct.paginationOutsideLeft]:D.position==="outside-1"&&G==="vert",[ct.paginationOutsideRight]:D.position==="outside-2"&&G==="vert",[ct.paginationVertical]:G==="vert"}),children:r.jsx("div",{className:ct.paginationInner,style:{backgroundColor:D.colors[2],transform:`scale(${D.scale/100}) translate(${C.scalingValue(D.offset.x,i)}, ${C.scalingValue(D.offset.y,i)}) rotate(${G==="horiz"?"0deg":"90deg"})`},children:t.map((V,z)=>r.jsx("button",{onClick:()=>{o&&o.go(z)},className:ut(ct.paginationItem),children:r.jsx("div",{className:ut(ct.dot,{[ct.activeDot]:z===R}),style:{backgroundColor:z===R?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},z))})})]})})}function Es({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 bp={element:xp,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"]}},wp="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Sp="ImageRevealSlider-module__image___Qjt-e",$p="ImageRevealSlider-module__link___N-iLG",Cp="ImageRevealSlider-module__cursor___2U03d",wi={imageRevealSlider:wp,image:Sp,link:$p,cursor:Cp};function Ms(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Vr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Tp(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Vr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Vr(e);s=l.height/l.width*o}else{const l=await Vr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Lp({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[p,v]=a.useState({x:0,y:0}),[y,g]=a.useState(1),[h,m]=a.useState("none"),b=a.useRef({x:0,y:0}),[I,R]=a.useState(!1),{sizeType:T,imageWidth:q,randomRangeImageWidth:A}=e.imageSize,{revealPosition:G,visible:k}=e.position,{cursorType:L,target:D,defaultCursorScale:x,defaultCursor:W,hoverCursorScale:M,hoverCursor:Y}=e.cursor;a.useEffect(()=>{if(!i)return;const V=(S,E)=>{const O=i.getBoundingClientRect(),le=S-O.left,oe=E-O.top;if(v({x:le,y:oe}),L==="system"){m("none"),g(1);return}const $=le,ae=oe,P=document.elementFromPoint(O.left+$,O.top+ae);if(P&&P.closest("a")){m("none"),g(1);return}const te=Ms($,ae,s)||D==="area"?{img:Y??"none",scale:M}:{img:W??"none",scale:x};m(te.img),g(te.scale)},z=S=>{S.stopPropagation(),b.current={x:S.clientX,y:S.clientY},V(S.clientX,S.clientY)},ie=()=>{I&&V(b.current.x,b.current.y)};return i.addEventListener("mousemove",z),window.addEventListener("scroll",ie,!0),()=>{i.removeEventListener("mousemove",z),window.removeEventListener("scroll",ie,!0)}},[i,I,p,L,D,Y,W,M,x,s]),a.useEffect(()=>{I||(m("none"),g(0))},[I]);const F=async(V,z,ie,S={})=>{const{width:E,height:O,finalWidth:le}=await Tp(V.image.url,T,q,A);let oe=0,$=0;G==="same"?(oe=z/2,$=ie/2):(oe=S.x??Math.random()*z,$=S.y??Math.random()*ie);const ae=Math.min(Math.max(oe,E/2),z-E/2),P=Math.min(Math.max($,O/2),ie-O/2);return{id:u.current++,url:V.image.url,link:V.link,name:V.image.name,x:ae,y:P,width:le}};a.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),z=V.width,ie=V.height,S=[];(async()=>{const O=t[0],le=await F(O,z,ie);S.push(le),l(S),c(1)})()},[T,q,A,G,i]),a.useEffect(()=>{k==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[k]);const U=async V=>{if(!i)return;const z=i.getBoundingClientRect(),ie=V.clientX-z.left,S=V.clientY-z.top;if(D==="image"&&!Ms(ie,S,s))return;let E=0,O=0;G==="on Click"?(E=ie,O=S):G==="same"?(E=z.width/2,O=z.height/2):(E=Math.random()*z.width,O=Math.random()*z.height);const le=t[d],oe=await F(le,z.width,z.height,{x:E,y:O});l($=>k==="all"?[...$,oe]:[oe]),c($=>$>=t.length-1?0:$+1)};return r.jsxs("div",{ref:o,onClick:U,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(V=>r.jsx("div",{className:wi.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:D==="area"&&V.link?r.jsx("a",{href:V.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:V.url,alt:V.name,className:wi.image},V.id)}):r.jsx("img",{src:V.url,alt:V.name,className:wi.image},V.id)},V.id)),I&&r.jsx("div",{className:wi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Rp={element:Lp,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:""}]}}}},Ip="LightBox-module__hidden___9s-9x",Ep="LightBox-module__heroImage___sTxNF",Mp="LightBox-module__background___rm9ml",Pp="LightBox-module__editor___4ACaY",kp="LightBox-module__contentStyle___Bgnsq",Ap="LightBox-module__imageStyle___tLIlB",Fp="LightBox-module__imgWrapper___LuFUp",Wp="LightBox-module__contain___8-yaS",_p="LightBox-module__cover___hNvOG",Hp="LightBox-module__caption___b6L2I",Np="LightBox-module__captionTextInner___rCGNH",Op="LightBox-module__lightboxSplide___XFuWC",Dp="LightBox-module__arrow___iz38X",jp="LightBox-module__arrowVertical___Zfz81",zp="LightBox-module__nextArrow___zkAQN",Bp="LightBox-module__arrowInner___p48sW",Vp="LightBox-module__arrowIcon___3VaFf",Gp="LightBox-module__arrowImg___pNV88",qp="LightBox-module__mirror___pjeXc",Up="LightBox-module__thumbsWrapper___GB-nU",Xp="LightBox-module__thumbsContainerVertical___wttk5",Kp="LightBox-module__thumbsContainer___osSma",Yp="LightBox-module__thumbsAlignStart___MO6tY",Zp="LightBox-module__thumbsAlignCenter___Q4sUx",Jp="LightBox-module__thumbsAlignEnd___p4y9R",Qp="LightBox-module__thumbItem___HvnF3",em="LightBox-module__closeButton___g2khP",tm="LightBox-module__fadeIn___0m5GW",nm="LightBox-module__slideInLeft___gPYwC",im="LightBox-module__slideInRight___S-pPp",om="LightBox-module__slideInTop___DFdAj",rm="LightBox-module__slideInBottom___m27kZ",am="LightBox-module__fadeOut___55qBR",sm="LightBox-module__slideOutLeft___NvU7P",lm="LightBox-module__slideOutRight___SK7eC",cm="LightBox-module__slideOutTop___Vgg0z",dm="LightBox-module__slideOutBottom___nJ0Ef",um="LightBox-module__scaleSlide___vZriG",Xe={hidden:Ip,heroImage:Ep,background:Mp,editor:Pp,contentStyle:kp,imageStyle:Ap,imgWrapper:Fp,contain:Wp,cover:_p,caption:Hp,captionTextInner:Np,lightboxSplide:Op,arrow:Dp,arrowVertical:jp,nextArrow:zp,arrowInner:Bp,arrowIcon:Vp,arrowImg:Gp,mirror:qp,thumbsWrapper:Up,thumbsContainerVertical:Xp,thumbsContainer:Kp,thumbsAlignStart:Yp,thumbsAlignCenter:Zp,thumbsAlignEnd:Jp,thumbItem:Qp,closeButton:em,fadeIn:tm,slideInLeft:nm,slideInRight:im,slideInTop:om,slideInBottom:rm,fadeOut:am,slideOutLeft:sm,slideOutRight:lm,slideOutTop:cm,slideOutBottom:dm,scaleSlide:um},jo=(e,t,n)=>{const i={},[o,s]=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"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), calc(-50% + ${C.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${C.scalingValue(t.x,n)}, calc(-50% + ${C.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), ${C.scalingValue(t.y,n)})`:i.transform=`translate(${C.scalingValue(t.x,n)}, ${C.scalingValue(t.y,n)})`,i};function bc(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 pm(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function wc(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function mm(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function Sc(e,t,n,i,o){const{x:s,y:l}=pm(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function gm(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?mm:wc,{renderedW:u,renderedH:p}=c(n,i,o,s),{offsetX:v,offsetY:y}=Sc(n,i,u,p,d),g=(v+u/2)/n*100,h=(y+p/2)/i*100;return`${g}% ${h}%`}function hm(e){return gm(e)}function gr(e){const t=e.getBoundingClientRect(),n=bc(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=wc(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Sc(i,o,d,c,u),y=t.left+n.left,g=t.top+n.top;return{x:p+y,y:v+g,width:d,height:c}}function Ps(e){const t=e.getBoundingClientRect(),n=bc(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ks(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 fm(e,t){const n=(()=>{if(e==="fade in")return Xe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Xe.slideInLeft;case"right":return Xe.slideInRight;case"top":return Xe.slideInTop;case"bottom":return Xe.slideInBottom;default:return Xe.slideInRight}return Xe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Xe.fadeIn;if(e==="slide in")switch(t){case"left":return Xe.slideInLeft;case"right":return Xe.slideInRight;case"top":return Xe.slideInTop;case"bottom":return Xe.slideInBottom;default:return Xe.slideInRight}return Xe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Xe.fadeOut;if(e==="slide in")switch(t){case"left":return Xe.slideOutLeft;case"right":return Xe.slideOutRight;case"top":return Xe.slideOutTop;case"bottom":return Xe.slideOutBottom;default:return Xe.slideOutRight}return Xe.fadeOut})(),s=(()=>{if(e==="fade in")return Xe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Xe.slideOutLeft;case"right":return Xe.slideOutRight;case"top":return Xe.slideOutTop;case"bottom":return Xe.slideOutBottom;default:return Xe.slideOutRight}return Xe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const ym=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{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:Xe.heroImage,onClick:()=>c(!0)}),r.jsx(vm,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},vm=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:y,fontSizeLineHeight:g,textAppearance:h,color:m}=i.imageCaption??{},[b,I]=a.useState(0),[R,T]=a.useState(0),[q,A]=a.useState(!1),[G,k]=a.useState(!1),[L,D]=a.useState({}),x=a.useRef(null),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),V=a.useRef(null),z=a.useRef(null),ie=a.useRef(!1),S=a.useRef(null),[E,O]=a.useState(!1),{appear:le,triggers:oe,slider:$,thumbnail:ae,controls:P,area:te,caption:K,layout:xe}=o.lightboxBlock,{appearClass:Fe,backdropAppearClass:ge,backdropDisappearClass:ce,disappearClass:X}=fm(le.type,le.direction),ee=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const B=()=>{setTimeout(()=>{var ye,ve;(ve=(ye=x.current)==null?void 0:ye.splide)==null||ve.refresh()},16)},se=()=>{T(ye=>ye+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",se),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",se)}},[]),a.useEffect(()=>{if(!e||!ae.isActive){O(!1);return}const B=S.current;if(!B)return;const se=()=>{$.direction==="horiz"?O(B.scrollWidth>B.clientWidth):O(B.scrollHeight>B.clientHeight)};se();const ye=new ResizeObserver(se);return ye.observe(B),()=>ye.disconnect()},[e,ae.isActive,n.length,L,$.direction]);const Z=a.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,se=ks(te.color);B&&!l&&se>.9&&(document.body.style.backgroundColor=""),A(!0),Y.current=!0;const ye=ve=>{ve.target===F.current&&ve.animationName&&(F.current&&U.current&&F.current.removeEventListener("animationend",U.current),U.current=null,Y.current&&(Y.current=!1,t()),A(!1))};F.current&&(U.current=ye,F.current.addEventListener("animationend",ye))},[t,te.color,l]),Pe=(B,se,ye)=>{var ve,Me;if(B){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&b===n.length-1?Z():(ve=x.current)==null||ve.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const Te=B.getBoundingClientRect(),H=se-Te.left,he=ye-Te.top,re=Te.width,_=Te.height;let Q;$.direction==="horiz"?Q=H<re/2?"-1":"+1":Q=he<_/2?"-1":"+1",(Me=x.current)==null||Me.go(Q)}}},$e=B=>{if(ie.current){ie.current=!1;return}const se=n[b],ye=(se==null?void 0:se.image.objectFit)==="cover";let ve,Me;if("changedTouches"in B&&B.changedTouches.length>0)ve=B.changedTouches[0].clientX,Me=B.changedTouches[0].clientY;else if("clientX"in B)ve=B.clientX,Me=B.clientY;else return;let Te;if(ye&&M.current){const H=Ps(M.current);Te=ve>=H.left&&ve<=H.right&&Me>=H.top&&Me<=H.bottom}else{const H=M.current?gr(M.current):null;if(!H){B.target===B.currentTarget&&Z();return}Te=ve>=H.x&&ve<=H.x+H.width&&Me>=H.y&&Me<=H.y+H.height}Te?Pe(M.current,ve,Me):Z()},ke=B=>{const se=B.target;(se.classList.contains(Xe.thumbsWrapper)||se.classList.contains(Xe.thumbsContainer))&&$e(B)};a.useEffect(()=>{if(!e)return;const B=se=>{var ye,ve;if(se.key==="Escape"){Z();return}if(se.key==="ArrowRight"){I(Me=>(Me+1)%Math.max(n.length,1)),(ye=x.current)==null||ye.go("+1");return}se.key==="ArrowLeft"&&(I(Me=>(Me-1+Math.max(n.length,1))%Math.max(n.length,1)),(ve=x.current)==null||ve.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,Z,n.length]),a.useEffect(()=>{if(e){if(I(0),T(se=>se+1),Y.current=!1,A(!1),k(!1),D({}),!ee)return;const B=new CustomEvent("page-overlay",{detail:{itemId:ee}});window.dispatchEvent(B)}return()=>{F.current&&U.current&&(F.current.removeEventListener("animationend",U.current),U.current=null),k(!1)}},[e,ee]),a.useEffect(()=>{W.current!==null&&W.current!==$.type&&T(B=>B+1),W.current=$.type},[$.type]),a.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,se=window.matchMedia("(max-width: 768px)").matches,ye=ks(te.color);document.body.style.overflow="hidden",k(!1);const ve=Te=>{Te.target===F.current&&!Y.current&&Te.animationName&&(se&&!l&&ye>.9&&(document.body.style.backgroundColor=te.color),k(!0),F.current&&V.current&&F.current.removeEventListener("animationend",V.current),V.current=null)};F.current&&(V.current=ve,F.current.addEventListener("animationend",ve));const Me=Te=>{const H=Te.target;H&&(H.closest(`.${Xe.thumbsWrapper}`)||H.closest(`.${Xe.thumbsContainer}`))||$.type!=="slide"&&Te.preventDefault()};return document.addEventListener("touchmove",Me,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",Me),F.current&&V.current&&(F.current.removeEventListener("animationend",V.current),V.current=null),k(!1)}},[e,l,te.color,$.type]),a.useEffect(()=>{if(!e)return;const B=se=>{var ve,Me;if(Y.current){se.stopPropagation();return}if(ie.current){ie.current=!1;return}const ye=se.target;if(!(ye&&(ye.closest(`.${Xe.thumbsContainer}`)||ye.closest(`.${Xe.thumbItem}`)||ye.closest(`.${Xe.arrow}`)||ye.closest(`.${Xe.closeButton}`)||ye.closest(`.${Xe.caption}`)))){if($.type==="slide"&&oe.type==="drag"&&((Me=(ve=x.current)==null?void 0:ve.splide)!=null&&Me.root)){const Te=x.current.splide.root;if(ye&&(Te.contains(ye)||Te===ye))return}if(se.touches.length===0&&se.changedTouches.length>0){const Te=n[b],H=(Te==null?void 0:Te.image.objectFit)==="cover",he=se.changedTouches[0];let re;if(H&&M.current){const _=Ps(M.current);re=he.clientX>=_.left&&he.clientX<=_.right&&he.clientY>=_.top&&he.clientY<=_.bottom}else{const _=M.current?gr(M.current):null;if(!_)return;re=he.clientX>=_.x&&he.clientX<=_.x+_.width&&he.clientY>=_.y&&he.clientY<=_.y+_.height}if(!re){se.stopPropagation(),Y.current=!0;const _=Q=>{Q.stopPropagation(),Q.preventDefault(),document.removeEventListener("click",_,!0)};document.addEventListener("click",_,!0),Z()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,Z,b,n]);const ue=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&oe.type==="drag";a.useEffect(()=>{var Q,Ae;if(!e||!ue||!((Ae=(Q=x.current)==null?void 0:Q.splide)!=null&&Ae.root))return;const B=x.current.splide.root,se=30,ye=(de,N)=>{if(z.current){const Ue=Math.abs(de-z.current.x),Oe=Math.abs(N-z.current.y);(Ue>0||Oe>0)&&(ie.current=!0)}},ve=de=>{z.current&&(de.preventDefault(),ye(de.clientX,de.clientY))},Me=de=>{z.current&&de.touches.length>0&&(de.preventDefault(),ye(de.touches[0].clientX,de.touches[0].clientY))},Te=(de,N)=>{if(!z.current||!x.current){z.current=null;return}const Ue=Math.abs(de-z.current.x),Oe=Math.abs(N-z.current.y);Oe>se&&Oe>Ue&&x.current.go(N<z.current.y?"+1":"-1"),z.current=null},H=de=>{z.current&&Te(de.clientX,de.clientY),document.removeEventListener("pointerup",H),document.removeEventListener("pointercancel",H),document.removeEventListener("pointermove",ve)},he=de=>{if(z.current){if(de.changedTouches.length>0){const N=de.changedTouches[0];Te(N.clientX,N.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",Me)}},re=de=>{z.current={x:de.clientX,y:de.clientY},ie.current=!1,document.addEventListener("pointermove",ve,{passive:!1}),document.addEventListener("pointerup",H),document.addEventListener("pointercancel",H)},_=de=>{de.touches.length>0&&(z.current={x:de.touches[0].clientX,y:de.touches[0].clientY},ie.current=!1,document.addEventListener("touchmove",Me,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return B.addEventListener("pointerdown",re),B.addEventListener("touchstart",_),()=>{B.removeEventListener("pointerdown",re),B.removeEventListener("touchstart",_),document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",H),document.removeEventListener("pointercancel",H),document.removeEventListener("touchmove",Me),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),z.current=null,ie.current=!1}},[e,ue,R]);const fe={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yn.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:F,className:ut(Xe.background,q?ce:ge,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{...fe,...G&&!l&&!q?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?F:null,className:ut(Xe.contentStyle,q?X:Fe,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Qa,{onMove:B=>I(B.index),ref:x,className:Xe.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!ue,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((B,se)=>{const ye=jo(xe.position,xe.offset,l),ve=`${C.scalingValue(xe.padding.top,l)} ${C.scalingValue(xe.padding.right,l)} ${C.scalingValue(xe.padding.bottom,l)} ${C.scalingValue(xe.padding.left,l)}`,Me=$.type==="scale"?(()=>{const{transform:Te,...H}=ye;return{...H,position:"absolute",padding:ve,boxSizing:"border-box","--position-transform":Te||"none"}})():{...ye,position:"absolute",padding:ve,boxSizing:"border-box"};return r.jsx(es,{children:r.jsx("div",{className:Xe.imgWrapper,onClick:$e,children:r.jsx("img",{ref:se===b?M:null,className:ut(Xe.imageStyle,{[Xe.contain]:B.image.objectFit==="contain",[Xe.cover]:B.image.objectFit==="cover",[Xe.scaleSlide]:$.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...Me,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},se)})},R),P.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(Xe.arrow,{[Xe.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Xe.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x,l)}, ${C.scalingValue(P.offset.y*($.direction==="horiz"?1:-1),l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=x.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:ut(Xe.arrowImg,Xe.mirror)}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:ut(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:ut(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Xe.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x*($.direction==="horiz"?-1:1),l)}, ${C.scalingValue(P.offset.y,l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=x.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Xe.arrowImg}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:ut(Xe.arrowIcon,Xe.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const B=jo(te.closeIconAlign,te.closeIconOffset,l),se=`scale(${te.closeIconScale})`,ye=B.transform?`${B.transform} ${se}`:se;return r.jsx("button",{className:Xe.closeButton,style:{...B,transform:ye},onClick:Z,"aria-label":"Close lightbox",children:r.jsx(an,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),K&&K.isActive&&i.imageCaption&&((Se=n[b])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:Xe.caption,style:{...jo(K.alignment,K.offset,l),fontFamily:Mr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":C.scalingValue(c.width,l),letterSpacing:C.scalingValue(p,l),wordSpacing:C.scalingValue(y,l),textAlign:v,fontSize:C.scalingValue(g.fontSize,l),lineHeight:C.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:m},onClick:B=>B.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-color":K.linkColor,"--link-hover-color":K.linkHoverColor},children:r.jsx(yi,{content:n[b].imageCaption})})}),ae.isActive&&(()=>{const[B,se]=ae.position.split("-"),ye=$.direction==="horiz"?`${B}-left`:ae.position,ve=jo(ye,ae.offset,l),Me=()=>{if($.direction==="horiz"){if(se==="left")return"flex-start";if(se==="center")return"center";if(se==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:S,className:Xe.thumbsWrapper,onClick:Te=>ke(Te),style:{position:l?"absolute":"fixed",...ve,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:ut(Xe.thumbsContainer,{[Xe.thumbsContainerVertical]:$.direction==="vert",[Xe.thumbsAlignStart]:ae.align==="start",[Xe.thumbsAlignCenter]:ae.align==="center",[Xe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:C.scalingValue(ae.grid.gap,l),justifyContent:E?"flex-start":Me()},children:n.map((Te,H)=>{const he=H===b,re=L[H],Q=ae.grid.size*(he?ae.activeState.scale:1),Ae=()=>{if(ae.fit!=="fit")return{};if(!re)return $.direction==="horiz"?{height:C.scalingValue(Q,l)}:{width:C.scalingValue(Q,l)};const de=re.width/re.height;if($.direction==="horiz"){const N=Q,Ue=N*de;return{width:C.scalingValue(Ue,l),height:C.scalingValue(N,l)}}else{const N=Q,Ue=N/de;return{width:C.scalingValue(N,l),height:C.scalingValue(Ue,l)}}};return r.jsx("button",{className:Xe.thumbItem,style:{...$.direction==="horiz"&&ae.fit!=="fit"?{height:C.scalingValue(Q,l)}:{},...$.direction==="vert"&&ae.fit!=="fit"?{width:C.scalingValue(Q,l)}:{},...ae.fit==="cover"?{width:C.scalingValue(Q,l),height:C.scalingValue(Q,l)}:{},...Ae(),transition:he?"all 0.25s ease-out":"none",opacity:he?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:de=>{var N;de.stopPropagation(),I(H),(N=x.current)==null||N.go(H)},onMouseEnter:()=>{var de;ae.triggers==="hov"&&((de=x.current)==null||de.go(H))},children:r.jsx("img",{src:Te.image.url,alt:Te.image.name??"",onLoad:de=>{const N=de.currentTarget;N.naturalWidth&&N.naturalHeight&&D(Ue=>({...Ue,[H]:{width:N.naturalWidth,height:N.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Te.image.name}-${H}`)})})})})()]})]}),document.getElementById(s))};function As({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 xm={element:ym,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 zo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bm(e){return`
6
+ */const dp="RichTextRenderer-module__link___BWeZ2",up={link:dp},pp=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))},Mr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>pp(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function rn(e){const{color:t,...n}=e;return n}function Xt(e,t){var o,s,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Mr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:C.scalingValue(e.letterSpacing,t),wordSpacing:C.scalingValue(e.wordSpacing,t),fontSize:C.scalingValue(n,t),lineHeight:i!==void 0?C.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}const yi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:up.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:mp(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 mp(e){return{...e.fontFamily&&{fontFamily:Mr(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 gp="SvgImage-module__svg___q3xE-",hp="SvgImage-module__img___VsTm-",Is={svg:gp,img:hp},fp=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},yp=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,an=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,l]=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("")');l(d)}},[]),!fp(e)||!s?r.jsx("img",{src:e,alt:"",className:ut(Is.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:ut(Is.svg,i),style:{"--svg":yp(e),"--fill":t,"--hover-fill":n,...o??{}}})},vp={"top-left":ct.topLeftAlignment,"top-center":ct.topCenterAlignment,"top-right":ct.topRightAlignment,"middle-left":ct.middleLeftAlignment,"middle-center":ct.middleCenterAlignment,"middle-right":ct.middleRightAlignment,"bottom-left":ct.bottomLeftAlignment,"bottom-center":ct.bottomCenterAlignment,"bottom-right":ct.bottomRightAlignment};function xp({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=a.useState(null),{widthSettings:l,fontSettings:d,letterSpacing:c,textAlign:u,wordSpacing:p,fontSizeLineHeight:v,textAppearance:y,color:g}=n.imageCaption??{},[h,m]=a.useState(void 0),[b,I]=a.useState(null),[R,T]=a.useState(0),[G,A]=a.useState(0),{direction:V,transition:k,controls:L,pagination:D,imageCaption:x,triggers:W}=e,M=a.useRef(k.type),{x:Y,y:F}=e.controls.offset,U=B=>{o&&o.go(B)};return a.useEffect(()=>{if(!b)return;const B=new ResizeObserver(j=>{if(!o)return;const[ie]=j;m({width:Math.round(ie.contentRect.width),height:Math.round(ie.contentRect.height)})});return B.observe(b),()=>B.unobserve(b)},[b]),a.useEffect(()=>{!o||M.current===k.type||(A(B=>B+1),M.current=k.type)},[k.type]),r.jsx("div",{className:ut(ct.wrapper,{[ct.editor]:i}),ref:I,children:r.jsxs("div",{className:ct.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:k.backgroundColor&&k.type==="fade in"?k.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:ut(ct.captionBlock),children:r.jsx("div",{className:ct.captionTextWrapper,children:t.map((B,j)=>r.jsx("div",{className:ut(ct.captionText,vp[x.alignment],{[ct.withPointerEvents]:j===R&&i,[ct.active]:j===R}),style:{fontFamily:Mr(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:l.sizing==="auto"?"max-content":C.scalingValue(l.width,i),letterSpacing:C.scalingValue(c,i),wordSpacing:C.scalingValue(p,i),textAlign:u,fontSize:C.scalingValue(v.fontSize,i),lineHeight:C.scalingValue(v.lineHeight,i),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:g,transitionDuration:k.duration?`${Math.round(parseInt(k.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:ct.captionTextInner,style:{"--link-hover-color":x.linkHoverColor,"--link-color":x.linkColor,position:"relative",top:C.scalingValue(x.offset.y,i),left:C.scalingValue(x.offset.x,i)},children:r.jsx(yi,{content:B.imageCaption})})},j))})}),r.jsx(Qa,{onMove:B=>{T(B.index)},ref:s,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:V==="horiz"||k.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:k.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((B,j)=>r.jsx(es,{children:r.jsx("div",{className:ct.sliderItem,children:r.jsx("div",{className:ct.imgWrapper,children:r.jsx("img",{className:ut(ct.sliderImage,{[ct.contain]:B.image.objectFit==="contain",[ct.cover]:B.image.objectFit==="cover"}),src:B.image.url,alt:B.image.name??""})})})},j))},G),L.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(ct.arrow,{[ct.arrowVertical]:V==="vert",[ct.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{onClick:()=>{U("-1")},className:ct.arrowInner,style:{transform:`translate(${C.scalingValue(Y,i)}, ${C.scalingValue(F*(V==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ut(ct.arrowImg,ct.mirror)}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:ut(ct.arrowIcon,ct.arrowImg,ct.mirror)})]})}),r.jsx("div",{className:ut(ct.arrow,ct.nextArrow,{[ct.arrowVertical]:V==="vert",[ct.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{className:ct.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${C.scalingValue(Y*(V==="horiz"?-1:1),i)}, ${C.scalingValue(F,i)}) scale(${e.controls.scale/100}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&r.jsx(an,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ct.arrowImg}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:ut(ct.arrowIcon,ct.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:ct.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&r.jsx("div",{className:ut(ct.pagination,{[ct.paginationInsideBottom]:D.position==="inside-1"&&V==="horiz",[ct.paginationInsideTop]:D.position==="inside-2"&&V==="horiz",[ct.paginationOutsideBottom]:D.position==="outside-1"&&V==="horiz",[ct.paginationOutsideTop]:D.position==="outside-2"&&V==="horiz",[ct.paginationInsideLeft]:D.position==="inside-1"&&V==="vert",[ct.paginationInsideRight]:D.position==="inside-2"&&V==="vert",[ct.paginationOutsideLeft]:D.position==="outside-1"&&V==="vert",[ct.paginationOutsideRight]:D.position==="outside-2"&&V==="vert",[ct.paginationVertical]:V==="vert"}),children:r.jsx("div",{className:ct.paginationInner,style:{backgroundColor:D.colors[2],transform:`scale(${D.scale/100}) translate(${C.scalingValue(D.offset.x,i)}, ${C.scalingValue(D.offset.y,i)}) rotate(${V==="horiz"?"0deg":"90deg"})`},children:t.map((B,j)=>r.jsx("button",{onClick:()=>{o&&o.go(j)},className:ut(ct.paginationItem),children:r.jsx("div",{className:ut(ct.dot,{[ct.activeDot]:j===R}),style:{backgroundColor:j===R?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},j))})})]})})}function Es({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 bp={element:xp,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"]}},wp="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Sp="ImageRevealSlider-module__image___Qjt-e",$p="ImageRevealSlider-module__link___N-iLG",Cp="ImageRevealSlider-module__cursor___2U03d",wi={imageRevealSlider:wp,image:Sp,link:$p,cursor:Cp};function Ms(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*s,d=s/2,c=l/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-c&&t<=i.y+c)return!0}return!1}function Vr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Tp(e,t,n,i){let o,s;if(t==="custom"){o=n;const l=await Vr(e);s=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Vr(e);s=l.height/l.width*o}else{const l=await Vr(e);o=l.width,s=l.height}return{width:o,height:s,finalWidth:`${o}px`}}function Lp({settings:e,content:t,isEditor:n}){const[i,o]=a.useState(null),[s,l]=a.useState([]),[d,c]=a.useState(0),u=a.useRef(0),[p,v]=a.useState({x:0,y:0}),[y,g]=a.useState(1),[h,m]=a.useState("none"),b=a.useRef({x:0,y:0}),[I,R]=a.useState(!1),{sizeType:T,imageWidth:G,randomRangeImageWidth:A}=e.imageSize,{revealPosition:V,visible:k}=e.position,{cursorType:L,target:D,defaultCursorScale:x,defaultCursor:W,hoverCursorScale:M,hoverCursor:Y}=e.cursor;a.useEffect(()=>{if(!i)return;const B=(S,E)=>{const O=i.getBoundingClientRect(),le=S-O.left,oe=E-O.top;if(v({x:le,y:oe}),L==="system"){m("none"),g(1);return}const $=le,ae=oe,P=document.elementFromPoint(O.left+$,O.top+ae);if(P&&P.closest("a")){m("none"),g(1);return}const te=Ms($,ae,s)||D==="area"?{img:Y??"none",scale:M}:{img:W??"none",scale:x};m(te.img),g(te.scale)},j=S=>{S.stopPropagation(),b.current={x:S.clientX,y:S.clientY},B(S.clientX,S.clientY)},ie=()=>{I&&B(b.current.x,b.current.y)};return i.addEventListener("mousemove",j),window.addEventListener("scroll",ie,!0),()=>{i.removeEventListener("mousemove",j),window.removeEventListener("scroll",ie,!0)}},[i,I,p,L,D,Y,W,M,x,s]),a.useEffect(()=>{I||(m("none"),g(0))},[I]);const F=async(B,j,ie,S={})=>{const{width:E,height:O,finalWidth:le}=await Tp(B.image.url,T,G,A);let oe=0,$=0;V==="same"?(oe=j/2,$=ie/2):(oe=S.x??Math.random()*j,$=S.y??Math.random()*ie);const ae=Math.min(Math.max(oe,E/2),j-E/2),P=Math.min(Math.max($,O/2),ie-O/2);return{id:u.current++,url:B.image.url,link:B.link,name:B.image.name,x:ae,y:P,width:le}};a.useEffect(()=>{if(!i||t.length===0)return;const B=i.getBoundingClientRect(),j=B.width,ie=B.height,S=[];(async()=>{const O=t[0],le=await F(O,j,ie);S.push(le),l(S),c(1)})()},[T,G,A,V,i]),a.useEffect(()=>{k==="last One"&&l(B=>B.length>0?[B[B.length-1]]:[])},[k]);const U=async B=>{if(!i)return;const j=i.getBoundingClientRect(),ie=B.clientX-j.left,S=B.clientY-j.top;if(D==="image"&&!Ms(ie,S,s))return;let E=0,O=0;V==="on Click"?(E=ie,O=S):V==="same"?(E=j.width/2,O=j.height/2):(E=Math.random()*j.width,O=Math.random()*j.height);const le=t[d],oe=await F(le,j.width,j.height,{x:E,y:O});l($=>k==="all"?[...$,oe]:[oe]),c($=>$>=t.length-1?0:$+1)};return r.jsxs("div",{ref:o,onClick:U,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(B=>r.jsx("div",{className:wi.wrapper,style:{top:`${B.y}px`,left:`${B.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:B.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:D==="area"&&B.link?r.jsx("a",{href:B.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:B.url,alt:B.name,className:wi.image},B.id)}):r.jsx("img",{src:B.url,alt:B.name,className:wi.image},B.id)},B.id)),I&&r.jsx("div",{className:wi.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Rp={element:Lp,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:""}]}}}},Ip="LightBox-module__hidden___9s-9x",Ep="LightBox-module__heroImage___sTxNF",Mp="LightBox-module__background___rm9ml",Pp="LightBox-module__editor___4ACaY",kp="LightBox-module__contentStyle___Bgnsq",Ap="LightBox-module__imageStyle___tLIlB",Fp="LightBox-module__imgWrapper___LuFUp",Wp="LightBox-module__contain___8-yaS",_p="LightBox-module__cover___hNvOG",Hp="LightBox-module__caption___b6L2I",Np="LightBox-module__captionTextInner___rCGNH",Op="LightBox-module__lightboxSplide___XFuWC",Dp="LightBox-module__arrow___iz38X",jp="LightBox-module__arrowVertical___Zfz81",zp="LightBox-module__nextArrow___zkAQN",Bp="LightBox-module__arrowInner___p48sW",Vp="LightBox-module__arrowIcon___3VaFf",Gp="LightBox-module__arrowImg___pNV88",qp="LightBox-module__mirror___pjeXc",Up="LightBox-module__thumbsWrapper___GB-nU",Xp="LightBox-module__thumbsContainerVertical___wttk5",Kp="LightBox-module__thumbsContainer___osSma",Yp="LightBox-module__thumbsAlignStart___MO6tY",Zp="LightBox-module__thumbsAlignCenter___Q4sUx",Jp="LightBox-module__thumbsAlignEnd___p4y9R",Qp="LightBox-module__thumbItem___HvnF3",em="LightBox-module__closeButton___g2khP",tm="LightBox-module__fadeIn___0m5GW",nm="LightBox-module__slideInLeft___gPYwC",im="LightBox-module__slideInRight___S-pPp",om="LightBox-module__slideInTop___DFdAj",rm="LightBox-module__slideInBottom___m27kZ",am="LightBox-module__fadeOut___55qBR",sm="LightBox-module__slideOutLeft___NvU7P",lm="LightBox-module__slideOutRight___SK7eC",cm="LightBox-module__slideOutTop___Vgg0z",dm="LightBox-module__slideOutBottom___nJ0Ef",um="LightBox-module__scaleSlide___vZriG",Xe={hidden:Ip,heroImage:Ep,background:Mp,editor:Pp,contentStyle:kp,imageStyle:Ap,imgWrapper:Fp,contain:Wp,cover:_p,caption:Hp,captionTextInner:Np,lightboxSplide:Op,arrow:Dp,arrowVertical:jp,nextArrow:zp,arrowInner:Bp,arrowIcon:Vp,arrowImg:Gp,mirror:qp,thumbsWrapper:Up,thumbsContainerVertical:Xp,thumbsContainer:Kp,thumbsAlignStart:Yp,thumbsAlignCenter:Zp,thumbsAlignEnd:Jp,thumbItem:Qp,closeButton:em,fadeIn:tm,slideInLeft:nm,slideInRight:im,slideInTop:om,slideInBottom:rm,fadeOut:am,slideOutLeft:sm,slideOutRight:lm,slideOutTop:cm,slideOutBottom:dm,scaleSlide:um},jo=(e,t,n)=>{const i={},[o,s]=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"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), calc(-50% + ${C.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${C.scalingValue(t.x,n)}, calc(-50% + ${C.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), ${C.scalingValue(t.y,n)})`:i.transform=`translate(${C.scalingValue(t.x,n)}, ${C.scalingValue(t.y,n)})`,i};function bc(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 pm(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function wc(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=e;return{renderedW:d,renderedH:d/s}}const l=t;return{renderedW:l*s,renderedH:l}}function mm(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,s=n/i;if(s>o){const d=t;return{renderedW:d*s,renderedH:d}}const l=e;return{renderedW:l,renderedH:l/s}}function Sc(e,t,n,i,o){const{x:s,y:l}=pm(o);return{offsetX:s*(e-n),offsetY:l*(t-i)}}function gm(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,s=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:d}=window.getComputedStyle(e),c=l==="cover"?mm:wc,{renderedW:u,renderedH:p}=c(n,i,o,s),{offsetX:v,offsetY:y}=Sc(n,i,u,p,d),g=(v+u/2)/n*100,h=(y+p/2)/i*100;return`${g}% ${h}%`}function hm(e){return gm(e)}function gr(e){const t=e.getBoundingClientRect(),n=bc(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,l=e.naturalHeight,{renderedW:d,renderedH:c}=wc(i,o,s,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:v}=Sc(i,o,d,c,u),y=t.left+n.left,g=t.top+n.top;return{x:p+y,y:v+g,width:d,height:c}}function Ps(e){const t=e.getBoundingClientRect(),n=bc(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ks(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 fm(e,t){const n=(()=>{if(e==="fade in")return Xe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Xe.slideInLeft;case"right":return Xe.slideInRight;case"top":return Xe.slideInTop;case"bottom":return Xe.slideInBottom;default:return Xe.slideInRight}return Xe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Xe.fadeIn;if(e==="slide in")switch(t){case"left":return Xe.slideInLeft;case"right":return Xe.slideInRight;case"top":return Xe.slideInTop;case"bottom":return Xe.slideInBottom;default:return Xe.slideInRight}return Xe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return Xe.fadeOut;if(e==="slide in")switch(t){case"left":return Xe.slideOutLeft;case"right":return Xe.slideOutRight;case"top":return Xe.slideOutTop;case"bottom":return Xe.slideOutBottom;default:return Xe.slideOutRight}return Xe.fadeOut})(),s=(()=>{if(e==="fade in")return Xe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Xe.slideOutLeft;case"right":return Xe.slideOutRight;case"top":return Xe.slideOutTop;case"bottom":return Xe.slideOutBottom;default:return Xe.slideOutRight}return Xe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const ym=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:l})=>{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:Xe.heroImage,onClick:()=>c(!0)}),r.jsx(vm,{isOpen:d,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},vm=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:l,metadata:d})=>{var Se;const{widthSettings:c,fontSettings:u,letterSpacing:p,textAlign:v,wordSpacing:y,fontSizeLineHeight:g,textAppearance:h,color:m}=i.imageCaption??{},[b,I]=a.useState(0),[R,T]=a.useState(0),[G,A]=a.useState(!1),[V,k]=a.useState(!1),[L,D]=a.useState({}),x=a.useRef(null),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),B=a.useRef(null),j=a.useRef(null),ie=a.useRef(!1),S=a.useRef(null),[E,O]=a.useState(!1),{appear:le,triggers:oe,slider:$,thumbnail:ae,controls:P,area:te,caption:K,layout:xe}=o.lightboxBlock,{appearClass:Fe,backdropAppearClass:ge,backdropDisappearClass:ce,disappearClass:X}=fm(le.type,le.direction),ee=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const z=()=>{setTimeout(()=>{var ye,ve;(ve=(ye=x.current)==null?void 0:ye.splide)==null||ve.refresh()},16)},se=()=>{T(ye=>ye+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",se),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",se)}},[]),a.useEffect(()=>{if(!e||!ae.isActive){O(!1);return}const z=S.current;if(!z)return;const se=()=>{$.direction==="horiz"?O(z.scrollWidth>z.clientWidth):O(z.scrollHeight>z.clientHeight)};se();const ye=new ResizeObserver(se);return ye.observe(z),()=>ye.disconnect()},[e,ae.isActive,n.length,L,$.direction]);const Z=a.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,se=ks(te.color);z&&!l&&se>.9&&(document.body.style.backgroundColor=""),A(!0),Y.current=!0;const ye=ve=>{ve.target===F.current&&ve.animationName&&(F.current&&U.current&&F.current.removeEventListener("animationend",U.current),U.current=null,Y.current&&(Y.current=!1,t()),A(!1))};F.current&&(U.current=ye,F.current.addEventListener("animationend",ye))},[t,te.color,l]),Pe=(z,se,ye)=>{var ve,Me;if(z){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&b===n.length-1?Z():(ve=x.current)==null||ve.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const Te=z.getBoundingClientRect(),H=se-Te.left,he=ye-Te.top,re=Te.width,_=Te.height;let Q;$.direction==="horiz"?Q=H<re/2?"-1":"+1":Q=he<_/2?"-1":"+1",(Me=x.current)==null||Me.go(Q)}}},$e=z=>{if(ie.current){ie.current=!1;return}const se=n[b],ye=(se==null?void 0:se.image.objectFit)==="cover";let ve,Me;if("changedTouches"in z&&z.changedTouches.length>0)ve=z.changedTouches[0].clientX,Me=z.changedTouches[0].clientY;else if("clientX"in z)ve=z.clientX,Me=z.clientY;else return;let Te;if(ye&&M.current){const H=Ps(M.current);Te=ve>=H.left&&ve<=H.right&&Me>=H.top&&Me<=H.bottom}else{const H=M.current?gr(M.current):null;if(!H){z.target===z.currentTarget&&Z();return}Te=ve>=H.x&&ve<=H.x+H.width&&Me>=H.y&&Me<=H.y+H.height}Te?Pe(M.current,ve,Me):Z()},ke=z=>{const se=z.target;(se.classList.contains(Xe.thumbsWrapper)||se.classList.contains(Xe.thumbsContainer))&&$e(z)};a.useEffect(()=>{if(!e)return;const z=se=>{var ye,ve;if(se.key==="Escape"){Z();return}if(se.key==="ArrowRight"){I(Me=>(Me+1)%Math.max(n.length,1)),(ye=x.current)==null||ye.go("+1");return}se.key==="ArrowLeft"&&(I(Me=>(Me-1+Math.max(n.length,1))%Math.max(n.length,1)),(ve=x.current)==null||ve.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,Z,n.length]),a.useEffect(()=>{if(e){if(I(0),T(se=>se+1),Y.current=!1,A(!1),k(!1),D({}),!ee)return;const z=new CustomEvent("page-overlay",{detail:{itemId:ee}});window.dispatchEvent(z)}return()=>{F.current&&U.current&&(F.current.removeEventListener("animationend",U.current),U.current=null),k(!1)}},[e,ee]),a.useEffect(()=>{W.current!==null&&W.current!==$.type&&T(z=>z+1),W.current=$.type},[$.type]),a.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,se=window.matchMedia("(max-width: 768px)").matches,ye=ks(te.color);document.body.style.overflow="hidden",k(!1);const ve=Te=>{Te.target===F.current&&!Y.current&&Te.animationName&&(se&&!l&&ye>.9&&(document.body.style.backgroundColor=te.color),k(!0),F.current&&B.current&&F.current.removeEventListener("animationend",B.current),B.current=null)};F.current&&(B.current=ve,F.current.addEventListener("animationend",ve));const Me=Te=>{const H=Te.target;H&&(H.closest(`.${Xe.thumbsWrapper}`)||H.closest(`.${Xe.thumbsContainer}`))||$.type!=="slide"&&Te.preventDefault()};return document.addEventListener("touchmove",Me,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",Me),F.current&&B.current&&(F.current.removeEventListener("animationend",B.current),B.current=null),k(!1)}},[e,l,te.color,$.type]),a.useEffect(()=>{if(!e)return;const z=se=>{var ve,Me;if(Y.current){se.stopPropagation();return}if(ie.current){ie.current=!1;return}const ye=se.target;if(!(ye&&(ye.closest(`.${Xe.thumbsContainer}`)||ye.closest(`.${Xe.thumbItem}`)||ye.closest(`.${Xe.arrow}`)||ye.closest(`.${Xe.closeButton}`)||ye.closest(`.${Xe.caption}`)))){if($.type==="slide"&&oe.type==="drag"&&((Me=(ve=x.current)==null?void 0:ve.splide)!=null&&Me.root)){const Te=x.current.splide.root;if(ye&&(Te.contains(ye)||Te===ye))return}if(se.touches.length===0&&se.changedTouches.length>0){const Te=n[b],H=(Te==null?void 0:Te.image.objectFit)==="cover",he=se.changedTouches[0];let re;if(H&&M.current){const _=Ps(M.current);re=he.clientX>=_.left&&he.clientX<=_.right&&he.clientY>=_.top&&he.clientY<=_.bottom}else{const _=M.current?gr(M.current):null;if(!_)return;re=he.clientX>=_.x&&he.clientX<=_.x+_.width&&he.clientY>=_.y&&he.clientY<=_.y+_.height}if(!re){se.stopPropagation(),Y.current=!0;const _=Q=>{Q.stopPropagation(),Q.preventDefault(),document.removeEventListener("click",_,!0)};document.addEventListener("click",_,!0),Z()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,Z,b,n]);const ue=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&oe.type==="drag";a.useEffect(()=>{var Q,Ae;if(!e||!ue||!((Ae=(Q=x.current)==null?void 0:Q.splide)!=null&&Ae.root))return;const z=x.current.splide.root,se=30,ye=(de,N)=>{if(j.current){const Ue=Math.abs(de-j.current.x),Oe=Math.abs(N-j.current.y);(Ue>0||Oe>0)&&(ie.current=!0)}},ve=de=>{j.current&&(de.preventDefault(),ye(de.clientX,de.clientY))},Me=de=>{j.current&&de.touches.length>0&&(de.preventDefault(),ye(de.touches[0].clientX,de.touches[0].clientY))},Te=(de,N)=>{if(!j.current||!x.current){j.current=null;return}const Ue=Math.abs(de-j.current.x),Oe=Math.abs(N-j.current.y);Oe>se&&Oe>Ue&&x.current.go(N<j.current.y?"+1":"-1"),j.current=null},H=de=>{j.current&&Te(de.clientX,de.clientY),document.removeEventListener("pointerup",H),document.removeEventListener("pointercancel",H),document.removeEventListener("pointermove",ve)},he=de=>{if(j.current){if(de.changedTouches.length>0){const N=de.changedTouches[0];Te(N.clientX,N.clientY)}document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),document.removeEventListener("touchmove",Me)}},re=de=>{j.current={x:de.clientX,y:de.clientY},ie.current=!1,document.addEventListener("pointermove",ve,{passive:!1}),document.addEventListener("pointerup",H),document.addEventListener("pointercancel",H)},_=de=>{de.touches.length>0&&(j.current={x:de.touches[0].clientX,y:de.touches[0].clientY},ie.current=!1,document.addEventListener("touchmove",Me,{passive:!1}),document.addEventListener("touchend",he),document.addEventListener("touchcancel",he))};return z.addEventListener("pointerdown",re),z.addEventListener("touchstart",_),()=>{z.removeEventListener("pointerdown",re),z.removeEventListener("touchstart",_),document.removeEventListener("pointermove",ve),document.removeEventListener("pointerup",H),document.removeEventListener("pointercancel",H),document.removeEventListener("touchmove",Me),document.removeEventListener("touchend",he),document.removeEventListener("touchcancel",he),j.current=null,ie.current=!1}},[e,ue,R]);const fe={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Yn.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:l?null:F,className:ut(Xe.background,G?ce:ge,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{...fe,...V&&!l&&!G?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?F:null,className:ut(Xe.contentStyle,G?X:Fe,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{animationDuration:`${parseInt(le.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Qa,{onMove:z=>I(z.index),ref:x,className:Xe.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!ue,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((z,se)=>{const ye=jo(xe.position,xe.offset,l),ve=`${C.scalingValue(xe.padding.top,l)} ${C.scalingValue(xe.padding.right,l)} ${C.scalingValue(xe.padding.bottom,l)} ${C.scalingValue(xe.padding.left,l)}`,Me=$.type==="scale"?(()=>{const{transform:Te,...H}=ye;return{...H,position:"absolute",padding:ve,boxSizing:"border-box","--position-transform":Te||"none"}})():{...ye,position:"absolute",padding:ve,boxSizing:"border-box"};return r.jsx(es,{children:r.jsx("div",{className:Xe.imgWrapper,onClick:$e,children:r.jsx("img",{ref:se===b?M:null,className:ut(Xe.imageStyle,{[Xe.contain]:z.image.objectFit==="contain",[Xe.cover]:z.image.objectFit==="cover",[Xe.scaleSlide]:$.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...Me,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},se)})},R),P.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(Xe.arrow,{[Xe.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Xe.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x,l)}, ${C.scalingValue(P.offset.y*($.direction==="horiz"?1:-1),l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=x.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:ut(Xe.arrowImg,Xe.mirror)}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:ut(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:ut(Xe.arrow,Xe.nextArrow,{[Xe.arrowVertical]:$.direction==="vert"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:r.jsxs("button",{className:Xe.arrowInner,style:{transform:`translate(${C.scalingValue(P.offset.x*($.direction==="horiz"?-1:1),l)}, ${C.scalingValue(P.offset.y,l)}) scale(${P.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=x.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[P.arrowsImgUrl&&r.jsx(an,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Xe.arrowImg}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:ut(Xe.arrowIcon,Xe.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const z=jo(te.closeIconAlign,te.closeIconOffset,l),se=`scale(${te.closeIconScale})`,ye=z.transform?`${z.transform} ${se}`:se;return r.jsx("button",{className:Xe.closeButton,style:{...z,transform:ye},onClick:Z,"aria-label":"Close lightbox",children:r.jsx(an,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),K&&K.isActive&&i.imageCaption&&((Se=n[b])==null?void 0:Se.imageCaption)&&r.jsx("div",{className:Xe.caption,style:{...jo(K.alignment,K.offset,l),fontFamily:Mr(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:c.sizing==="auto"?"max-content":C.scalingValue(c.width,l),letterSpacing:C.scalingValue(p,l),wordSpacing:C.scalingValue(y,l),textAlign:v,fontSize:C.scalingValue(g.fontSize,l),lineHeight:C.scalingValue(g.lineHeight,l),textTransform:h.textTransform??"none",textDecoration:h.textDecoration??"none",fontVariant:h.fontVariant??"normal",color:m},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:Xe.captionTextInner,style:{"--link-color":K.linkColor,"--link-hover-color":K.linkHoverColor},children:r.jsx(yi,{content:n[b].imageCaption})})}),ae.isActive&&(()=>{const[z,se]=ae.position.split("-"),ye=$.direction==="horiz"?`${z}-left`:ae.position,ve=jo(ye,ae.offset,l),Me=()=>{if($.direction==="horiz"){if(se==="left")return"flex-start";if(se==="center")return"center";if(se==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:S,className:Xe.thumbsWrapper,onClick:Te=>ke(Te),style:{position:l?"absolute":"fixed",...ve,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:ut(Xe.thumbsContainer,{[Xe.thumbsContainerVertical]:$.direction==="vert",[Xe.thumbsAlignStart]:ae.align==="start",[Xe.thumbsAlignCenter]:ae.align==="center",[Xe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:C.scalingValue(ae.grid.gap,l),justifyContent:E?"flex-start":Me()},children:n.map((Te,H)=>{const he=H===b,re=L[H],Q=ae.grid.size*(he?ae.activeState.scale:1),Ae=()=>{if(ae.fit!=="fit")return{};if(!re)return $.direction==="horiz"?{height:C.scalingValue(Q,l)}:{width:C.scalingValue(Q,l)};const de=re.width/re.height;if($.direction==="horiz"){const N=Q,Ue=N*de;return{width:C.scalingValue(Ue,l),height:C.scalingValue(N,l)}}else{const N=Q,Ue=N/de;return{width:C.scalingValue(N,l),height:C.scalingValue(Ue,l)}}};return r.jsx("button",{className:Xe.thumbItem,style:{...$.direction==="horiz"&&ae.fit!=="fit"?{height:C.scalingValue(Q,l)}:{},...$.direction==="vert"&&ae.fit!=="fit"?{width:C.scalingValue(Q,l)}:{},...ae.fit==="cover"?{width:C.scalingValue(Q,l),height:C.scalingValue(Q,l)}:{},...Ae(),transition:he?"all 0.25s ease-out":"none",opacity:he?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:de=>{var N;de.stopPropagation(),I(H),(N=x.current)==null||N.go(H)},onMouseEnter:()=>{var de;ae.triggers==="hov"&&((de=x.current)==null||de.go(H))},children:r.jsx("img",{src:Te.image.url,alt:Te.image.name??"",onLoad:de=>{const N=de.currentTarget;N.naturalWidth&&N.naturalHeight&&D(Ue=>({...Ue,[H]:{width:N.naturalWidth,height:N.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Te.image.name}-${H}`)})})})})()]})]}),document.getElementById(s))};function As({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 xm={element:ym,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 zo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function bm(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 wm({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=C.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:y,gap:g,fieldsGap:h,buttonCorners:m,buttonStroke:b,buttonPadding:I,isButtonFullWidth:R,inputCorners:T,inputStroke:q,inputPadding:A,inputColor:G,inputTextColor:k,inputBorderColor:L,placeholderColor:D,buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:U,fontFamily:V,inputFontSettings:z,inputFontSize:ie,inputLineHeight:S,inputLetterSpacing:E,inputWordSpacing:O,inputTextAppearance:le,buttonFontSettings:oe,buttonFontSize:$,buttonLineHeight:ae,buttonLetterSpacing:P,buttonWordSpacing:te,buttonTextAppearance:K,labelFontSettings:xe,labelFontSize:Fe,labelLineHeight:ge,labelLetterSpacing:ce,labelWordSpacing:X,labelTextAppearance:ee,statusFontSettings:Z,statusFontSize:Pe,statusLineHeight:$e,statusLetterSpacing:ke,statusWordSpacing:ue,statusTextAppearance:fe,successMessage:Se,errorMessage:B,stateOverrides:se}=e,ye=u==="B",ve=v.slice(0,Math.min(p,v.length)),Me={fontSettings:{fontFamily:V,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:O??0,textAppearance:le,color:k},Te=rn(Xt(Me,t)),H=C.scalingValue(q??0,t),he=C.scalingValue((S??ie??.01)+((A==null?void 0:A.top)??0)+((A==null?void 0:A.bottom)??0)+(u==="C"?q??0:(q??0)*2),t),re={...Te,borderStyle:"solid",borderRadius:u==="C"?0:C.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:H,borderLeftWidth:0}:{borderWidth:H},paddingTop:C.scalingValue((A==null?void 0:A.top)??0,t),paddingRight:C.scalingValue((A==null?void 0:A.right)??0,t),paddingBottom:C.scalingValue((A==null?void 0:A.bottom)??0,t),paddingLeft:C.scalingValue((A==null?void 0:A.left)??0,t),height:he,minHeight:he},_={fontSettings:{fontFamily:V,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:$??.01,lineHeight:ae,letterSpacing:P??0,wordSpacing:te??0,textAppearance:K,color:W},Q=rn(Xt(_,t)),Ae=C.scalingValue(b??0,t),de={fontSettings:{fontFamily:V,fontWeight:(xe==null?void 0:xe.fontWeight)??400,fontStyle:(xe==null?void 0:xe.fontStyle)??"normal"},fontSize:Fe??.01,lineHeight:ge,letterSpacing:ce??0,wordSpacing:X??0,textAppearance:ee,color:Y},N=Xt(de,t),Ue={fontSettings:{fontFamily:V,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:$e,letterSpacing:ke??0,wordSpacing:ue??0,textAppearance:fe,color:F},Oe=rn(Xt(Ue,t)),dt=C.buildColorVars(c,{inputColor:G,inputTextColor:k,inputBorderColor:L,placeholderColor:D!=null&&D.trim()?D:"#cccccc",buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:U},Sm,$m,se),[nt,ht]=a.useState(()=>Object.fromEntries(ve.map(Ee=>[Ee.name,""]))),[st,Be]=a.useState("idle"),[be,We]=a.useState(null),je=s==="success"?"success":s==="error"?"error":st,Ke=s==="error"?B:be,ne=s==="filled",me=a.useMemo(()=>{if(!ne)return nt;let Ee=null;for(const qe of ve)(nt[qe.name]??"").trim().length>0||(Ee=Ee??{...nt},Ee[qe.name]="Filled");return Ee??nt},[nt,ne,ve]),Ie=je==="error"?C.getFormFieldValidationError(ve,me):null,Ze=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Ve=o==null?void 0:o.submitUrl,at=(Ee,qe)=>{ht(_e=>({..._e,[Ee]:qe}))},Je=async Ee=>{if(Ee.preventDefault(),!d)return;const qe=Object.fromEntries(ve.map(tt=>{var rt;return[tt.name,((rt=nt[tt.name])==null?void 0:rt.trim())??""]}).filter(([,tt])=>tt));if(!Ve){Be("error"),We("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const _e=C.getFormFieldValidationError(ve,nt);if(_e){Be("error"),We(_e);return}Be("submitting"),We(null);try{const tt=await fetch(Ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!tt.ok){const rt=await tt.text();throw new Error(rt||`Request failed: ${tt.status}`)}Be("success"),ht(Object.fromEntries(ve.map(rt=>[rt.name,""])))}catch(tt){Be("error"),We(tt instanceof Error?tt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ze}`.trim(),style:dt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:bm(c)}}),r.jsxs("form",{onSubmit:Je,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:ve.map((Ee,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${ye?` ${c}-labeled`:""}`,children:[ye&&r.jsx("span",{className:`${c}-field-label`,style:N?{...N,lineHeight:N.fontSize}:void 0,children:Ee.label||Ee.name}),Ee.type==="textarea"?r.jsx("textarea",{name:Ee.name,autoComplete:"off",value:me[Ee.name]??"",onChange:_e=>at(Ee.name,_e.target.value),placeholder:Ee.placeholder,className:`${c}-input`,style:re,rows:1,"data-filled":ne||(me[Ee.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ee.type==="phone"?"tel":Ee.type==="email"?"email":"text",name:Ee.name,autoComplete:"off",value:me[Ee.name]??"",onChange:_e=>at(Ee.name,_e.target.value),placeholder:Ee.placeholder,required:Ee.isRequired??Ee.type==="email",className:`${c}-input`,style:re,"data-filled":ne||(me[Ee.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(g??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:C.scalingValue(m??0,t),borderWidth:Ae,paddingTop:C.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:C.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:C.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:C.scalingValue((I==null?void 0:I.left)??0,t),pointerEvents:d?"auto":void 0,...Q,...R?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:R?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:st==="submitting"?"...":y})})})]}),je==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Oe},children:Se}),je==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Oe},role:"alert",children:Ie??Ke??B})]})}const Sm={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"},$m=["hover","focus","filled","success","error"],Cm=`import React, { useMemo, useState } from 'react';
158
+ `}function wm({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const l=!!n,d=i&&t||!t,{prefix:c}=C.useScopedStyles(),{type:u="A",fieldsToShow:p=2,fields:v=[],buttonLabel:y,gap:g,fieldsGap:h,buttonCorners:m,buttonStroke:b,buttonPadding:I,isButtonFullWidth:R,inputCorners:T,inputStroke:G,inputPadding:A,inputColor:V,inputTextColor:k,inputBorderColor:L,placeholderColor:D,buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:U,fontFamily:B,inputFontSettings:j,inputFontSize:ie,inputLineHeight:S,inputLetterSpacing:E,inputWordSpacing:O,inputTextAppearance:le,buttonFontSettings:oe,buttonFontSize:$,buttonLineHeight:ae,buttonLetterSpacing:P,buttonWordSpacing:te,buttonTextAppearance:K,labelFontSettings:xe,labelFontSize:Fe,labelLineHeight:ge,labelLetterSpacing:ce,labelWordSpacing:X,labelTextAppearance:ee,statusFontSettings:Z,statusFontSize:Pe,statusLineHeight:$e,statusLetterSpacing:ke,statusWordSpacing:ue,statusTextAppearance:fe,successMessage:Se,errorMessage:z,stateOverrides:se}=e,ye=u==="B",ve=v.slice(0,Math.min(p,v.length)),Me={fontSettings:{fontFamily:B,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:O??0,textAppearance:le,color:k},Te=rn(Xt(Me,t)),H=C.scalingValue(G??0,t),he=C.scalingValue((S??ie??.01)+((A==null?void 0:A.top)??0)+((A==null?void 0:A.bottom)??0)+(u==="C"?G??0:(G??0)*2),t),re={...Te,borderStyle:"solid",borderRadius:u==="C"?0:C.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:H,borderLeftWidth:0}:{borderWidth:H},paddingTop:C.scalingValue((A==null?void 0:A.top)??0,t),paddingRight:C.scalingValue((A==null?void 0:A.right)??0,t),paddingBottom:C.scalingValue((A==null?void 0:A.bottom)??0,t),paddingLeft:C.scalingValue((A==null?void 0:A.left)??0,t),height:he,minHeight:he},_={fontSettings:{fontFamily:B,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:$??.01,lineHeight:ae,letterSpacing:P??0,wordSpacing:te??0,textAppearance:K,color:W},Q=rn(Xt(_,t)),Ae=C.scalingValue(b??0,t),de={fontSettings:{fontFamily:B,fontWeight:(xe==null?void 0:xe.fontWeight)??400,fontStyle:(xe==null?void 0:xe.fontStyle)??"normal"},fontSize:Fe??.01,lineHeight:ge,letterSpacing:ce??0,wordSpacing:X??0,textAppearance:ee,color:Y},N=Xt(de,t),Ue={fontSettings:{fontFamily:B,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:Pe??.01,lineHeight:$e,letterSpacing:ke??0,wordSpacing:ue??0,textAppearance:fe,color:F},Oe=rn(Xt(Ue,t)),dt=C.buildColorVars(c,{inputColor:V,inputTextColor:k,inputBorderColor:L,placeholderColor:D!=null&&D.trim()?D:"#cccccc",buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:U},Sm,$m,se),[nt,ht]=a.useState(()=>Object.fromEntries(ve.map(Ee=>[Ee.name,""]))),[st,Be]=a.useState("idle"),[be,We]=a.useState(null),je=s==="success"?"success":s==="error"?"error":st,Ke=s==="error"?z:be,ne=s==="filled",me=a.useMemo(()=>{if(!ne)return nt;let Ee=null;for(const qe of ve)(nt[qe.name]??"").trim().length>0||(Ee=Ee??{...nt},Ee[qe.name]="Filled");return Ee??nt},[nt,ne,ve]),Ie=je==="error"?C.getFormFieldValidationError(ve,me):null,Ze=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),Ve=o==null?void 0:o.submitUrl,at=(Ee,qe)=>{ht(_e=>({..._e,[Ee]:qe}))},Je=async Ee=>{if(Ee.preventDefault(),!d)return;const qe=Object.fromEntries(ve.map(tt=>{var rt;return[tt.name,((rt=nt[tt.name])==null?void 0:rt.trim())??""]}).filter(([,tt])=>tt));if(!Ve){Be("error"),We("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const _e=C.getFormFieldValidationError(ve,nt);if(_e){Be("error"),We(_e);return}Be("submitting"),We(null);try{const tt=await fetch(Ve,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!tt.ok){const rt=await tt.text();throw new Error(rt||`Request failed: ${tt.status}`)}Be("success"),ht(Object.fromEntries(ve.map(rt=>[rt.name,""])))}catch(tt){Be("error"),We(tt instanceof Error?tt.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ze}`.trim(),style:dt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:bm(c)}}),r.jsxs("form",{onSubmit:Je,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:ve.map((Ee,qe)=>r.jsxs(a.Fragment,{children:[qe>0&&r.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(h??0,t)}}),r.jsxs("div",{className:`${c}-field-group${ye?` ${c}-labeled`:""}`,children:[ye&&r.jsx("span",{className:`${c}-field-label`,style:N?{...N,lineHeight:N.fontSize}:void 0,children:Ee.label||Ee.name}),Ee.type==="textarea"?r.jsx("textarea",{name:Ee.name,autoComplete:"off",value:me[Ee.name]??"",onChange:_e=>at(Ee.name,_e.target.value),placeholder:Ee.placeholder,className:`${c}-input`,style:re,rows:1,"data-filled":ne||(me[Ee.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ee.type==="phone"?"tel":Ee.type==="email"?"email":"text",name:Ee.name,autoComplete:"off",value:me[Ee.name]??"",onChange:_e=>at(Ee.name,_e.target.value),placeholder:Ee.placeholder,required:Ee.isRequired??Ee.type==="email",className:`${c}-input`,style:re,"data-filled":ne||(me[Ee.name]??"").trim().length>0})]})]},qe))}),r.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${c}-control`:void 0,style:{height:C.scalingValue(g??0,t)}}),r.jsx("div",{className:`${c}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${c}-button`,style:{borderStyle:"solid",borderRadius:C.scalingValue(m??0,t),borderWidth:Ae,paddingTop:C.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:C.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:C.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:C.scalingValue((I==null?void 0:I.left)??0,t),pointerEvents:d?"auto":void 0,...Q,...R?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${c}-overlay-anchor`,style:R?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:st==="submitting"?"...":y})})})]}),je==="success"&&r.jsx("p",{className:`${c}-success`,style:{...Oe},children:Se}),je==="error"&&r.jsx("p",{className:`${c}-error`,style:{...Oe},role:"alert",children:Ie??Ke??z})]})}const Sm={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"},$m=["hover","focus","filled","success","error"],Cm=`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';
@@ -982,7 +982,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
982
982
  font-size: ${Vo(14)};
983
983
  color: var(--${e}-error-error-color, var(--${e}-error-color));
984
984
  }
985
- `}const Mm=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=C.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:y,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:m,inputWordSpacing:b,inputTextAppearance:I,buttonFontSettings:R,buttonFontSize:T,buttonLineHeight:q,buttonLetterSpacing:A,buttonWordSpacing:G,buttonTextAppearance:k,statusFontSettings:L,statusFontSize:D,statusLineHeight:x,statusLetterSpacing:W,statusWordSpacing:M,statusTextAppearance:Y,iconMaxWidth:F,minHeight:U,corners:V,stroke:z,stateOverrides:ie,inputPadding:S,buttonPadding:E,successMessage:O="Thanks for subscribing!",errorMessage:le="Please, fill all required fields."}=e,oe=d.slice(0,Math.min(p,d.length)),[$,ae]=a.useState(()=>Object.fromEntries(oe.map(de=>[de.name,""]))),[P,te]=a.useState("idle"),[K,xe]=a.useState(null),Fe=o==="success"?"success":o==="error"?"error":P,ge=o==="error"?le:K,ce=o==="filled",X=a.useMemo(()=>{if(!ce)return $;let de=null;for(const N of oe)($[N.name]??"").trim().length>0||(de=de??{...$},de[N.name]="Filled");return de??$},[ce,$,oe]),ee=Fe==="error"?C.getFormFieldValidationError(oe,X):null,Z=o&&o!=="default"?`${s}-state-${o}`:"",Pe=oe.some(de=>(X[de.name]??"").trim().length>0),$e=Z!==`${s}-state-filled`&&Pe?`${s}-state-filled`:"",ke=`${Z} ${$e}`.trim(),ue=i==null?void 0:i.submitUrl,fe=u??"",Se=(c==null?void 0:c.icon)??"",B=(c==null?void 0:c.mode)==="On",se=fe||"Submit",ye={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:m??0,wordSpacing:b??0,textAppearance:I,color:e.inputTextColor??"#111111"},ve={fontSettings:{fontFamily:v,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:q,letterSpacing:A??0,wordSpacing:G??0,textAppearance:k,color:e.buttonTextColor??"#ffffff"},Me={fontSettings:{fontFamily:v,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:D??.01,lineHeight:x,letterSpacing:W??0,wordSpacing:M??0,textAppearance:Y,color:e.successColor??"#22c55e"},Te=rn(Xt(ye,t)),H=rn(Xt(ve,t)),he=rn(Xt(Me,t)),re=C.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ye==null?void 0:ye.color)??"#111111",buttonTextColor:e.buttonTextColor??(ve==null?void 0:ve.color)??"#ffffff"},Pm,km,ie),_={borderRadius:C.scalingValue(V,t),borderWidth:C.scalingValue(z,t),borderStyle:"solid"},Q={borderLeftWidth:C.scalingValue(z,t)},Ae=async de=>{if(de.preventDefault(),!l)return;const N=Object.fromEntries(oe.map(Oe=>{var dt;return[Oe.name,((dt=$[Oe.name])==null?void 0:dt.trim())??""]}).filter(([,Oe])=>Oe));if(!ue){te("error"),xe("No integrations were found for this form.");return}if(Object.keys(N).length===0)return;const Ue=C.getFormFieldValidationError(oe,$);if(Ue){te("error"),xe(Ue);return}te("submitting"),xe(null);try{const Oe=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!Oe.ok){const dt=await Oe.text();throw new Error(dt||`Request failed: ${Oe.status}`)}te("success"),ae(Object.fromEntries(oe.map(dt=>[dt.name,""])))}catch(Oe){te("error"),xe(Oe instanceof Error?Oe.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${ke}`.trim(),style:re,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Em(s)}}),r.jsxs("form",{onSubmit:Ae,className:`${s}-form`,style:{..._,height:C.scalingValue(U,t),minHeight:C.scalingValue(U,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:X[de.name]??"",onChange:N=>ae(Ue=>({...Ue,[de.name]:N.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...Te,paddingRight:C.scalingValue(S.right,t),paddingLeft:C.scalingValue(S.left,t),paddingTop:C.scalingValue(S.top,t),paddingBottom:C.scalingValue(S.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":se,style:{...H,...Q,paddingRight:C.scalingValue(E.right,t),paddingLeft:C.scalingValue(E.left,t),paddingTop:C.scalingValue(E.top,t),paddingBottom:C.scalingValue(E.bottom,t),pointerEvents:l?"auto":void 0},children:P==="submitting"?"...":B?Se&&r.jsx(an,{url:Se,className:`${s}-submitBtnIcon`,style:{maxWidth:C.scalingValue(F??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):fe})})]}),Fe==="success"&&r.jsx("p",{className:`${s}-success`,style:{...he},children:O}),Fe==="error"&&r.jsx("p",{className:`${s}-error`,style:{...he},role:"alert",children:ee??ge??le})]})},Pm={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"},km=["hover","focus","filled","success","error"],Am=`import React, { useMemo, useState } from 'react';
985
+ `}const Mm=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=C.useScopedStyles(),l=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:c,buttonLabel:u,fieldsToShow:p=1,fontFamily:v,inputFontSettings:y,inputFontSize:g,inputLineHeight:h,inputLetterSpacing:m,inputWordSpacing:b,inputTextAppearance:I,buttonFontSettings:R,buttonFontSize:T,buttonLineHeight:G,buttonLetterSpacing:A,buttonWordSpacing:V,buttonTextAppearance:k,statusFontSettings:L,statusFontSize:D,statusLineHeight:x,statusLetterSpacing:W,statusWordSpacing:M,statusTextAppearance:Y,iconMaxWidth:F,minHeight:U,corners:B,stroke:j,stateOverrides:ie,inputPadding:S,buttonPadding:E,successMessage:O="Thanks for subscribing!",errorMessage:le="Please, fill all required fields."}=e,oe=d.slice(0,Math.min(p,d.length)),[$,ae]=a.useState(()=>Object.fromEntries(oe.map(de=>[de.name,""]))),[P,te]=a.useState("idle"),[K,xe]=a.useState(null),Fe=o==="success"?"success":o==="error"?"error":P,ge=o==="error"?le:K,ce=o==="filled",X=a.useMemo(()=>{if(!ce)return $;let de=null;for(const N of oe)($[N.name]??"").trim().length>0||(de=de??{...$},de[N.name]="Filled");return de??$},[ce,$,oe]),ee=Fe==="error"?C.getFormFieldValidationError(oe,X):null,Z=o&&o!=="default"?`${s}-state-${o}`:"",Pe=oe.some(de=>(X[de.name]??"").trim().length>0),$e=Z!==`${s}-state-filled`&&Pe?`${s}-state-filled`:"",ke=`${Z} ${$e}`.trim(),ue=i==null?void 0:i.submitUrl,fe=u??"",Se=(c==null?void 0:c.icon)??"",z=(c==null?void 0:c.mode)==="On",se=fe||"Submit",ye={fontSettings:{fontFamily:v,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:g??.01,lineHeight:h,letterSpacing:m??0,wordSpacing:b??0,textAppearance:I,color:e.inputTextColor??"#111111"},ve={fontSettings:{fontFamily:v,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:T??.01,lineHeight:G,letterSpacing:A??0,wordSpacing:V??0,textAppearance:k,color:e.buttonTextColor??"#ffffff"},Me={fontSettings:{fontFamily:v,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:D??.01,lineHeight:x,letterSpacing:W??0,wordSpacing:M??0,textAppearance:Y,color:e.successColor??"#22c55e"},Te=rn(Xt(ye,t)),H=rn(Xt(ve,t)),he=rn(Xt(Me,t)),re=C.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ye==null?void 0:ye.color)??"#111111",buttonTextColor:e.buttonTextColor??(ve==null?void 0:ve.color)??"#ffffff"},Pm,km,ie),_={borderRadius:C.scalingValue(B,t),borderWidth:C.scalingValue(j,t),borderStyle:"solid"},Q={borderLeftWidth:C.scalingValue(j,t)},Ae=async de=>{if(de.preventDefault(),!l)return;const N=Object.fromEntries(oe.map(Oe=>{var dt;return[Oe.name,((dt=$[Oe.name])==null?void 0:dt.trim())??""]}).filter(([,Oe])=>Oe));if(!ue){te("error"),xe("No integrations were found for this form.");return}if(Object.keys(N).length===0)return;const Ue=C.getFormFieldValidationError(oe,$);if(Ue){te("error"),xe(Ue);return}te("submitting"),xe(null);try{const Oe=await fetch(ue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!Oe.ok){const dt=await Oe.text();throw new Error(dt||`Request failed: ${Oe.status}`)}te("success"),ae(Object.fromEntries(oe.map(dt=>[dt.name,""])))}catch(Oe){te("error"),xe(Oe instanceof Error?Oe.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${ke}`.trim(),style:re,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Em(s)}}),r.jsxs("form",{onSubmit:Ae,className:`${s}-form`,style:{..._,height:C.scalingValue(U,t),minHeight:C.scalingValue(U,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:X[de.name]??"",onChange:N=>ae(Ue=>({...Ue,[de.name]:N.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...Te,paddingRight:C.scalingValue(S.right,t),paddingLeft:C.scalingValue(S.left,t),paddingTop:C.scalingValue(S.top,t),paddingBottom:C.scalingValue(S.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":se,style:{...H,...Q,paddingRight:C.scalingValue(E.right,t),paddingLeft:C.scalingValue(E.left,t),paddingTop:C.scalingValue(E.top,t),paddingBottom:C.scalingValue(E.bottom,t),pointerEvents:l?"auto":void 0},children:P==="submitting"?"...":z?Se&&r.jsx(an,{url:Se,className:`${s}-submitBtnIcon`,style:{maxWidth:C.scalingValue(F??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):fe})})]}),Fe==="success"&&r.jsx("p",{className:`${s}-success`,style:{...he},children:O}),Fe==="error"&&r.jsx("p",{className:`${s}-error`,style:{...he},role:"alert",children:ee??ge??le})]})},Pm={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"},km=["hover","focus","filled","success","error"],Am=`import React, { useMemo, useState } from 'react';
986
986
  import { CommonComponentProps } from '../props';
987
987
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
988
988
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1693,7 +1693,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1693
1693
  .${e}-image-hover-grayscale:hover video {
1694
1694
  filter: grayscale(100%);
1695
1695
  }
1696
- `}const Dm=30,jm=20,qr=3,zm=12,Bm=32,Vm=3,Gm=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")},qm=(e,t)=>Array.from({length:t},()=>e).flat(),Um=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},$c=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Fs=(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),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=$c(d);return c<=0?0:c+s*Math.max(0,t-1)},Xm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=$c(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},Km=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ym=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Km(i,e))},Zm=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},Jm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Qm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,Y,F,U;const p=a.useRef(null),v=!!((M=e.image)!=null&&M.url&&Zm(e.image));a.useLayoutEffect(()=>{d&&Jm(p.current)&&(u==null||u())},[d,(Y=e.image)==null?void 0:Y.url,u]);const y=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[m,b]=g.split(":").map(Number),T=(h?b:m)/(h?m:b),q=i/T,A=q>o?o:q,G=q>o?o*T:i,k=c(G),L=c(A),D={borderRadius:c(s)},x=y?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...D}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...D},W=((F=e.image)==null?void 0:F.url)&&(v?r.jsx("video",{ref:V=>{p.current=V},src:e.image.url,style:x,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:V=>{p.current=V},src:e.image.url,alt:((U=e.image)==null?void 0:U.name)??"",style:x,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...y?{width:k}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...y?{width:k,height:L,overflow:"hidden",...D}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:ut(`${t}-marquee-link`,!y&&`${t}-marquee-link-contain`),children:W}):W})})},eg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Om(s,c),[s,c]),{speed:p,direction:v,pauseOnHover:y,gap:g,imageMaxWidth:h,imageMaxHeight:m,hoverEffect:b,cornerRadius:I=0}=e,R=a.useMemo(()=>Um(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,q=!!o,A=!n||!!i,G=A&&b!=="off"&&b!=="randomize"?`${s}-image-hover-${b}`:void 0,k=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(k||!!n),x=Math.max(0,p)*Dm,W=$e=>C.scalingValue($e,n??!1),M=a.useRef(null),Y=a.useRef(null),F=a.useRef(null),[U,V]=a.useState(0),z=k&&y==="on",[ie,S]=a.useState(!1),[E,O]=a.useState({}),le=a.useRef(E);le.current=E;const oe=a.useRef(null),$=a.useRef(0),ae=a.useRef(null),P=a.useMemo(()=>(t??[]).map($e=>{var ke;return((ke=$e.image)==null?void 0:ke.url)??""}).join("\0"),[t]),[te,K]=a.useState(qr),xe=a.useMemo(()=>{const $e=t??[];return $e.length===0||!(k||!!n)?$e:qm($e,te)},[t,k,te,n]),Fe=a.useMemo(()=>(t??[]).filter($e=>{var ke;return!!((ke=$e.image)!=null&&ke.url)}).length,[t]),ge=D?Vm:1;a.useLayoutEffect(()=>{$.current=0,O({}),oe.current=null,K(qr),d(0)},[P]),a.useEffect(()=>{if(!A||b!=="randomize")return;const $e=M.current;if(!$e)return;const ke=B=>{O(se=>{const ye=Array.from(B).filter(Me=>Me in se&&!Ym($e,Me));if(ye.length===0)return se;const ve={...se};return ye.forEach(Me=>{delete ve[Me]}),ve})},ue=new IntersectionObserver(B=>{const se=new Set;for(const ye of B){const ve=ye.target.dataset.marqueeItemIndex,Me=ve!==void 0?Number(ve):NaN;Number.isNaN(Me)||se.add(Me)}se.size>0&&ke(se)},{root:$e,threshold:0});Object.keys(E).forEach(B=>{const se=Number(B);$e.querySelectorAll(`[data-marquee-item-index="${se}"]`).forEach(ye=>ue.observe(ye))});const fe={current:0},Se=()=>{const B=Object.keys(le.current);B.length!==0&&(ke(B.map(Number)),fe.current=requestAnimationFrame(Se))};return Object.keys(le.current).length>0&&(fe.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(fe.current),ue.disconnect()}},[b,E,A]),a.useLayoutEffect(()=>{if(!D)return;const $e=M.current,ke=F.current;if(!$e||!ke)return;const ue={current:0},fe=()=>{const se=$e.getBoundingClientRect().width||$e.offsetWidth,ye=Xm(ke),ve=oe.current,Me=typeof ve=="number"&&Math.abs(ve-ye)<=.25;oe.current=ye;let Te=te,H=0;if((k||n)&&T>0&&se>0){const _=Fs(ke,T);if(_>=Bm){H=_;const Q=Math.min(zm,Math.max(qr,Math.ceil(se/_)+1));Te=Q,Q!==te&&K(Q)}}const re=Te!==te&&H>0?H*Te:ye>0?ye:H>0?H*Te:(()=>{const _=Fs(ke,T);return _>0?_*Te:0})();re>0?d(_=>_<=0?re:!Me||Math.round(_)===Math.round(re)?_:re):!Me&&l<=0&&(cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(fe))},Se=()=>{cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(fe)};ae.current=Se,Se();const B=new ResizeObserver(Se);return B.observe($e),B.observe(ke),()=>{ae.current=null,cancelAnimationFrame(ue.current),B.disconnect()}},[k,D,l,P,te,T,n]),a.useLayoutEffect(()=>{if(!D||c<=0)return;const $e=Y.current;$e&&Gm($e)},[D,c,v,x]),a.useLayoutEffect(()=>{if(!D||l<=0){V(0);return}const $e=Y.current,ke=F.current;if(!$e||!ke)return;const ue=()=>{const Se=$e.offsetHeight||$e.getBoundingClientRect().height,B=Array.from(ke.children).reduce((ye,ve)=>Math.max(ye,ve.offsetHeight||ve.getBoundingClientRect().height),0),se=Se>0?Se:B;V(se>0?se:0)};ue();const fe=new ResizeObserver(ue);return fe.observe($e),fe.observe(ke),()=>fe.disconnect()},[D,ge,xe,n,g,h,m,l,R,E]),a.useLayoutEffect(()=>{if(!n||!q||!D||typeof window>"u")return;const $e=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame($e)},[n,q,D,v,l,U,g,xe]);const ce=()=>{z&&S(!0)},X=()=>{z&&S(!1)},ee=a.useCallback(()=>{var $e;$.current=Math.min(Fe,$.current+1),($e=ae.current)==null||$e.call(ae)},[Fe]),Z=a.useCallback(($e,ke)=>{O(ue=>{const fe=ue[$e]??ke,Se=(t??[]).filter(se=>se!==fe);if(Se.length===0)return ue;const B=Se[Math.floor(Math.random()*Se.length)];return{...ue,[$e]:B}})},[t]),Pe=($e,ke,ue,fe)=>{const Se=A&&b==="randomize"&&R.display==="cover"?E[ue]??$e:$e,B=`max(${W(g)}, ${jm}px)`,se=`calc(-0.5 * (${B} + ${W(g)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":ue,onMouseEnter:A&&b==="randomize"&&R.display==="cover"?()=>Z(ue,$e):void 0,children:[r.jsx(Qm,{item:Se,prefix:s,imageFit:R,imageMaxWidth:h,imageMaxHeight:m,cornerRadius:I,imageHoverClass:G,isEditor:n,isFirstSet:fe,scaled:W,onFirstSetImageDone:ee}),q&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:se,width:B,height:"100%"}})]},`${ke}-${ue}`)};if(D){const $e=k?z&&ie?"paused":"running":"paused",ke=c>0&&x>0?c/x*1e3:0,ue=`${Math.max(0,ke)/1e3}s`;return r.jsxs("div",{ref:M,className:ut(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:U>0?{height:U}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:Y,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:ce,onMouseLeave:X,style:{WebkitAnimationDuration:ue,animationDuration:ue,WebkitAnimationPlayState:$e,animationPlayState:$e},children:Array.from({length:ge},(fe,Se)=>r.jsx("div",{ref:Se===0?F:void 0,className:ut(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(g),paddingRight:W(g)},"aria-hidden":Se>0,children:xe.map((B,se)=>Pe(B,Se,se,Se===0&&se<T))},`set-${Se}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:ut(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map(($e,ke)=>Pe($e,0,ke))},"marquee-static")]})},tg=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1696
+ `}const Dm=30,jm=20,qr=3,zm=12,Bm=32,Vm=3,Gm=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")},qm=(e,t)=>Array.from({length:t},()=>e).flat(),Um=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},$c=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),Fs=(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),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const d=Array.from({length:t},(u,p)=>e.children[p]),c=$c(d);return c<=0?0:c+s*Math.max(0,t-1)},Xm=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=$c(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),s=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+s*Math.max(0,e.children.length-1)+l},Km=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},Ym=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Km(i,e))},Zm=e=>{if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")},Jm=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Qm=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:s,imageHoverClass:l,isFirstSet:d,scaled:c,onFirstSetImageDone:u})=>{var M,Y,F,U;const p=a.useRef(null),v=!!((M=e.image)!=null&&M.url&&Zm(e.image));a.useLayoutEffect(()=>{d&&Jm(p.current)&&(u==null||u())},[d,(Y=e.image)==null?void 0:Y.url,u]);const y=n.display==="cover",g=n.ratioValue??"1:1",h=n.reversed??!1,[m,b]=g.split(":").map(Number),T=(h?b:m)/(h?m:b),G=i/T,A=G>o?o:G,V=G>o?o*T:i,k=c(V),L=c(A),D={borderRadius:c(s)},x=y?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...D}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:c(i),maxHeight:c(o),objectFit:"contain",...D},W=((F=e.image)==null?void 0:F.url)&&(v?r.jsx("video",{ref:B=>{p.current=B},src:e.image.url,style:x,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:d?u:void 0,onError:d?u:void 0}):r.jsx("img",{ref:B=>{p.current=B},src:e.image.url,alt:((U=e.image)==null?void 0:U.name)??"",style:x,onLoad:d?u:void 0,onError:d?u:void 0}));return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...y?{width:k}:{width:"max-content",maxWidth:c(i),minWidth:0}},children:r.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...y?{width:k,height:L,overflow:"hidden",...D}:{width:"max-content",maxWidth:c(i),height:c(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:ut(`${t}-marquee-link`,!y&&`${t}-marquee-link-contain`),children:W}):W})})},eg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),[l,d]=a.useState(0),c=l>0?Math.round(l):0,u=a.useMemo(()=>Om(s,c),[s,c]),{speed:p,direction:v,pauseOnHover:y,gap:g,imageMaxWidth:h,imageMaxHeight:m,hoverEffect:b,cornerRadius:I=0}=e,R=a.useMemo(()=>Um(e.imageFit),[e.imageFit]),T=(t==null?void 0:t.length)??0,G=!!o,A=!n||!!i,V=A&&b!=="off"&&b!=="randomize"?`${s}-image-hover-${b}`:void 0,k=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(k||!!n),x=Math.max(0,p)*Dm,W=$e=>C.scalingValue($e,n??!1),M=a.useRef(null),Y=a.useRef(null),F=a.useRef(null),[U,B]=a.useState(0),j=k&&y==="on",[ie,S]=a.useState(!1),[E,O]=a.useState({}),le=a.useRef(E);le.current=E;const oe=a.useRef(null),$=a.useRef(0),ae=a.useRef(null),P=a.useMemo(()=>(t??[]).map($e=>{var ke;return((ke=$e.image)==null?void 0:ke.url)??""}).join("\0"),[t]),[te,K]=a.useState(qr),xe=a.useMemo(()=>{const $e=t??[];return $e.length===0||!(k||!!n)?$e:qm($e,te)},[t,k,te,n]),Fe=a.useMemo(()=>(t??[]).filter($e=>{var ke;return!!((ke=$e.image)!=null&&ke.url)}).length,[t]),ge=D?Vm:1;a.useLayoutEffect(()=>{$.current=0,O({}),oe.current=null,K(qr),d(0)},[P]),a.useEffect(()=>{if(!A||b!=="randomize")return;const $e=M.current;if(!$e)return;const ke=z=>{O(se=>{const ye=Array.from(z).filter(Me=>Me in se&&!Ym($e,Me));if(ye.length===0)return se;const ve={...se};return ye.forEach(Me=>{delete ve[Me]}),ve})},ue=new IntersectionObserver(z=>{const se=new Set;for(const ye of z){const ve=ye.target.dataset.marqueeItemIndex,Me=ve!==void 0?Number(ve):NaN;Number.isNaN(Me)||se.add(Me)}se.size>0&&ke(se)},{root:$e,threshold:0});Object.keys(E).forEach(z=>{const se=Number(z);$e.querySelectorAll(`[data-marquee-item-index="${se}"]`).forEach(ye=>ue.observe(ye))});const fe={current:0},Se=()=>{const z=Object.keys(le.current);z.length!==0&&(ke(z.map(Number)),fe.current=requestAnimationFrame(Se))};return Object.keys(le.current).length>0&&(fe.current=requestAnimationFrame(Se)),()=>{cancelAnimationFrame(fe.current),ue.disconnect()}},[b,E,A]),a.useLayoutEffect(()=>{if(!D)return;const $e=M.current,ke=F.current;if(!$e||!ke)return;const ue={current:0},fe=()=>{const se=$e.getBoundingClientRect().width||$e.offsetWidth,ye=Xm(ke),ve=oe.current,Me=typeof ve=="number"&&Math.abs(ve-ye)<=.25;oe.current=ye;let Te=te,H=0;if((k||n)&&T>0&&se>0){const _=Fs(ke,T);if(_>=Bm){H=_;const Q=Math.min(zm,Math.max(qr,Math.ceil(se/_)+1));Te=Q,Q!==te&&K(Q)}}const re=Te!==te&&H>0?H*Te:ye>0?ye:H>0?H*Te:(()=>{const _=Fs(ke,T);return _>0?_*Te:0})();re>0?d(_=>_<=0?re:!Me||Math.round(_)===Math.round(re)?_:re):!Me&&l<=0&&(cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(fe))},Se=()=>{cancelAnimationFrame(ue.current),ue.current=requestAnimationFrame(fe)};ae.current=Se,Se();const z=new ResizeObserver(Se);return z.observe($e),z.observe(ke),()=>{ae.current=null,cancelAnimationFrame(ue.current),z.disconnect()}},[k,D,l,P,te,T,n]),a.useLayoutEffect(()=>{if(!D||c<=0)return;const $e=Y.current;$e&&Gm($e)},[D,c,v,x]),a.useLayoutEffect(()=>{if(!D||l<=0){B(0);return}const $e=Y.current,ke=F.current;if(!$e||!ke)return;const ue=()=>{const Se=$e.offsetHeight||$e.getBoundingClientRect().height,z=Array.from(ke.children).reduce((ye,ve)=>Math.max(ye,ve.offsetHeight||ve.getBoundingClientRect().height),0),se=Se>0?Se:z;B(se>0?se:0)};ue();const fe=new ResizeObserver(ue);return fe.observe($e),fe.observe(ke),()=>fe.disconnect()},[D,ge,xe,n,g,h,m,l,R,E]),a.useLayoutEffect(()=>{if(!n||!G||!D||typeof window>"u")return;const $e=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame($e)},[n,G,D,v,l,U,g,xe]);const ce=()=>{j&&S(!0)},X=()=>{j&&S(!1)},ee=a.useCallback(()=>{var $e;$.current=Math.min(Fe,$.current+1),($e=ae.current)==null||$e.call(ae)},[Fe]),Z=a.useCallback(($e,ke)=>{O(ue=>{const fe=ue[$e]??ke,Se=(t??[]).filter(se=>se!==fe);if(Se.length===0)return ue;const z=Se[Math.floor(Math.random()*Se.length)];return{...ue,[$e]:z}})},[t]),Pe=($e,ke,ue,fe)=>{const Se=A&&b==="randomize"&&R.display==="cover"?E[ue]??$e:$e,z=`max(${W(g)}, ${jm}px)`,se=`calc(-0.5 * (${z} + ${W(g)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":ue,onMouseEnter:A&&b==="randomize"&&R.display==="cover"?()=>Z(ue,$e):void 0,children:[r.jsx(Qm,{item:Se,prefix:s,imageFit:R,imageMaxWidth:h,imageMaxHeight:m,cornerRadius:I,imageHoverClass:V,isEditor:n,isFirstSet:fe,scaled:W,onFirstSetImageDone:ee}),G&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:se,width:z,height:"100%"}})]},`${ke}-${ue}`)};if(D){const $e=k?j&&ie?"paused":"running":"paused",ke=c>0&&x>0?c/x*1e3:0,ue=`${Math.max(0,ke)/1e3}s`;return r.jsxs("div",{ref:M,className:ut(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:U>0?{height:U}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:Y,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:ce,onMouseLeave:X,style:{WebkitAnimationDuration:ue,animationDuration:ue,WebkitAnimationPlayState:$e,animationPlayState:$e},children:Array.from({length:ge},(fe,Se)=>r.jsx("div",{ref:Se===0?F:void 0,className:ut(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(g),paddingRight:W(g)},"aria-hidden":Se>0,children:xe.map((z,se)=>Pe(z,Se,se,Se===0&&se<T))},`set-${Se}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:ut(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map(($e,ke)=>Pe($e,0,ke))},"marquee-static")]})},tg=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1697
1697
  import cn from 'classnames';
1698
1698
  import { CommonComponentProps } from '../props';
1699
1699
  import { scalingValue } from '../utils/scalingValue';
@@ -2605,7 +2605,7 @@ ${o}
2605
2605
  left: -9999px;
2606
2606
  top: 0;
2607
2607
  }
2608
- `}const rg=30,Ur=3,ag=12,sg=3,La=.72,lg=100,cg=10,dg=e=>Math.max(0,e)/lg,ug=e=>Math.max(0,e)/cg,pg=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")},mg=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),Si={ctx:void 0},gg=()=>Si.ctx!==void 0?Si.ctx:typeof document>"u"?(Si.ctx=null,Si.ctx):(Si.ctx=document.createElement("canvas").getContext("2d"),Si.ctx),hg=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},fg=e=>{e.style.transform=""},yg=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vg=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const s=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?s:n(l,s)};return n(e,e.offsetWidth/2)},xg=96,bg=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),s=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const v=p*c,y=v+c;o[p+1]=y,s[p+1]=s[p]+(d(v)+d(y))*.5*c}),{wavelength:i,periodArc:s[n],x:o,s}},wg=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),s=i-o*e.periodArc,{s:l,x:d}=e,c=(g,h)=>{if(h-g<=1)return[g,h];const m=g+h>>1;return l[m]<=s?c(m,h):c(g,m)},[u,p]=c(0,l.length-1),v=l[p]-l[u],y=v>0?(s-l[u])/v:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*y)},Sg=(e,t,n,i)=>{const o=Math.max(0,n),s=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(s*p),d=p=>t*s*Math.cos(s*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,v)=>{const y=v/c*e,g=(v+1)/c*e,h=g-y,m=l(y),b=l(g),I=y+h/3,R=m+d(y)*h/3,T=g-h/3,q=b-d(g)*h/3;return`C${I.toFixed(2)} ${R.toFixed(2)} ${T.toFixed(2)} ${q.toFixed(2)} ${g.toFixed(2)} ${b.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},$g=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:s,isCurve:l})=>{var g;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${La}em`},u=((g=e.image)==null?void 0:g.url)&&r.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?r.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?r.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,m)=>r.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:r.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},m))}):r.jsx("span",{className:`${t}-text`,style:d,children:e.text}),y=r.jsxs(r.Fragment,{children:[p,v]});return r.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:s},children:e.link?r.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:s},children:y}):y})},Cg=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=C.useScopedStyles(),[s,l]=a.useState(0),d=s>0?Math.round(s):0,{speed:c,direction:u,pauseOnHover:p,gap:v,layoutType:y,curveAmplitude:g,curveFrequency:h,textFontFamily:m,textFontSettings:b,textFontSize:I,textLineHeight:R,textLetterSpacing:T,textWordSpacing:q,textTextAppearance:A,textColor:G,backgroundColor:k,ribbonWidth:L}=e,D=L??R,x=y==="curve",W=dg(g),M=ug(h),Y=a.useMemo(()=>og(o,d,x),[o,d,x]),F=a.useMemo(()=>Xt({fontSettings:{fontFamily:m,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:T,wordSpacing:q,fontSize:I,lineHeight:R,textAppearance:A,color:G},n),[m,b,T,q,I,R,A,G,n]),U=ne=>C.scalingValue(ne,n??!1),V=((t==null?void 0:t.length)??0)>0,z=n?!!i:!0,ie=V&&(z||!!n),S=Math.max(0,c)*rg,E=z&&p==="on",[O,le]=a.useState(!1),oe=z?E&&O?"paused":"running":"paused",$=oe==="running"&&S>0&&d>0,ae=a.useRef(null),P=a.useRef(null),te=a.useRef(null),K=a.useRef(null),xe=a.useRef(null),Fe=a.useRef(null),ge=a.useRef($),ce=a.useRef(null);ge.current=$;const[X,ee]=a.useState(0),[Z,Pe]=a.useState(0),[$e,ke]=a.useState(0),[ue,fe]=a.useState(0),[Se,B]=a.useState(0),se=a.useMemo(()=>(t??[]).map(ne=>{var me;return`${ne.text}\0${((me=ne.image)==null?void 0:me.url)??""}`}).join("\0"),[t]),[ye,ve]=a.useState(Ur),Me=a.useMemo(()=>{const ne=t??[];return ne.length===0||!(z||n)?ne:mg(ne,ye)},[t,z,ye,n]),Te=ie?sg:1;a.useLayoutEffect(()=>{ve(Ur),l(0)},[se]),a.useLayoutEffect(()=>{var Ze;const ne=Fe.current;if(!ne)return;const me=()=>{const Ve=getComputedStyle(ne),at=parseFloat(Ve.fontSize)||0;if(at<=0)return;const Je=gg();if(!Je){ee(at*La),Pe(0);return}Je.font=`${Ve.fontStyle} ${Ve.fontWeight} ${at}px ${Ve.fontFamily}`;const Ee=Je.measureText("H"),qe=Ee.actualBoundingBoxAscent>0?Ee.actualBoundingBoxAscent:at*La,_e=Math.max(0,Ee.actualBoundingBoxDescent||0),tt=Ee.fontBoundingBoxAscent||0,rt=Ee.fontBoundingBoxDescent||0;ee(Tt=>Math.abs(Tt-qe)>.5?qe:Tt);const lt=tt>0||rt>0?(rt-_e-(tt-qe))/2:0;Pe(Tt=>Math.abs(Tt-lt)>.25?lt:Tt)};me();const Ie=typeof document<"u"?document.fonts:void 0;(Ze=Ie==null?void 0:Ie.ready)==null||Ze.then(me).catch(()=>{});const Ge=new ResizeObserver(me);return Ge.observe(ne),()=>Ge.disconnect()},[F.fontFamily,F.fontWeight,F.fontStyle,F.fontSize,F.lineHeight]),a.useLayoutEffect(()=>{if(!ie)return;const ne=ae.current,me=K.current;if(!ne||!me)return;const Ie={id:0},Ge=()=>{const Ve=ne.offsetWidth||ne.getBoundingClientRect().width,at=me.offsetWidth||me.getBoundingClientRect().width;if(V&&Ve>0&&at>0){const Je=at/ye;if(Je>0){const Ee=Math.min(ag,Math.max(Ur,Math.ceil(Ve/Je)+1));if(Ee!==ye){ve(Ee);return}}}at>0&&l(at)};Ie.id=requestAnimationFrame(Ge);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ge)});return Ze.observe(ne),Ze.observe(me),()=>{cancelAnimationFrame(Ie.id),Ze.disconnect()}},[ie,se,ye,V,X]),a.useLayoutEffect(()=>{const ne=xe.current;if(!ne)return;const me={id:0},Ie=()=>{const Ze=ne.offsetHeight;Ze>0&&B(Ve=>Math.abs(Ve-Ze)>.5?Ze:Ve)};me.id=requestAnimationFrame(Ie);const Ge=new ResizeObserver(()=>{cancelAnimationFrame(me.id),me.id=requestAnimationFrame(Ie)});return Ge.observe(ne),()=>{cancelAnimationFrame(me.id),Ge.disconnect()}},[D,n]),a.useLayoutEffect(()=>{if(!x){ke(0),fe(0);return}const ne=ae.current,me=K.current;if(!ne||!me)return;const Ie={id:0},Ge=()=>{const Ve=ne.offsetWidth,at=me.offsetHeight;Ve>0&&fe(Je=>Math.abs(Je-Ve)>.5?Ve:Je),at>0&&ke(Je=>Math.abs(Je-at)>.5?at:Je)};Ie.id=requestAnimationFrame(Ge);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ge)});return Ze.observe(ne),Ze.observe(me),()=>{cancelAnimationFrame(Ie.id),Ze.disconnect()}},[x,se,X,R,I,ie]),a.useLayoutEffect(()=>{if(!ie||d<=0)return;const ne=te.current;ne&&pg(ne)},[ie,d,u,S]),a.useLayoutEffect(()=>{if(!x||!V)return;const ne=ae.current;if(!ne)return;const me={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ie=()=>{for(const Ee of me.itemsCache)for(const qe of Ee.glyphs)fg(qe.inner)},Ge=()=>{const Ee=P.current??ne;me.itemsCache=Array.from(ne.querySelectorAll("[data-marquee-text-item]"),qe=>{const _e=[];return qe.querySelectorAll("[data-marquee-wave-node]").forEach(tt=>{const rt=tt.firstElementChild;rt&&_e.push({inner:rt,layoutLocalX:vg(tt,Ee)})}),{item:qe,glyphs:_e}}),me.cacheDirty=!1},Ze=()=>{me.cacheDirty&&Ge();const qe=(P.current??ne).offsetWidth||1,_e=qe*W,tt=2*Math.PI*M/qe,rt=`${qe}|${_e}|${tt}`;rt!==me.lutKey&&(me.lutKey=rt,me.lut=bg(_e,tt,xg));const lt=te.current,Tt=lt?yg(getComputedStyle(lt).transform):0,Ut=ne.getBoundingClientRect(),Zt=Ut.left,xt=Ut.right,wt=me.lut&&me.lut.wavelength>0?Math.max(0,(me.lut.periodArc/me.lut.wavelength-1)*qe):0;for(const{item:jt,glyphs:At}of me.itemsCache){const vt=jt.getBoundingClientRect();if(!(vt.right<Zt||vt.left>xt+wt))for(const Ft of At){const _t=Ft.layoutLocalX+Tt,Kt=me.lut?wg(me.lut,_t):_t,Jt=tt*Kt,Ct=_e*Math.sin(Jt),Ht=_e*tt*Math.cos(Jt),on=Math.atan(Ht)*(180/Math.PI);hg(Ft.inner,Kt-_t,Ct,on)}}},Ve=()=>{me.cancelled||(me.raf=0,Ze(),ge.current&&!document.hidden&&(me.raf=requestAnimationFrame(Ve)))},at=()=>{me.cancelled||me.raf||(me.raf=requestAnimationFrame(Ve))};ce.current=at,at();const Je=()=>{if(document.hidden){cancelAnimationFrame(me.raf),me.raf=0;return}at()};return document.addEventListener("visibilitychange",Je),()=>{me.cancelled=!0,ce.current=null,cancelAnimationFrame(me.raf),document.removeEventListener("visibilitychange",Je),Ie()}},[x,W,M,V,s,se,ye,X]),a.useLayoutEffect(()=>{var ne;(ne=ce.current)==null||ne.call(ce)},[$]);const H=()=>{E&&le(!0)},he=()=>{E&&le(!1)},re=x?W*100:0,_=U(D),Q={minHeight:_,...x?{paddingTop:`${re}%`,paddingBottom:`${re}%`}:{}},Ae={height:_,...x?{visibility:"hidden"}:{backgroundColor:k}},de={gap:U(v),minHeight:_},N=ue*W,Ue=Se>0?Se:$e,Oe=Math.max($e,Ue),dt=x&&ue>0&&Oe>0?Sg(ue,N,M,N+Oe/2):"",nt=N*2+Oe,ht=dt?r.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${ue} ${nt}`,preserveAspectRatio:"none","aria-hidden":!0,children:r.jsx("path",{d:dt,fill:"none",stroke:k,strokeWidth:Ue,strokeLinecap:"round",strokeLinejoin:"round"})}):null,st=r.jsx("div",{ref:xe,className:`${o}-ribbon`,style:Ae,"aria-hidden":!0}),Be=(ne,me,Ie)=>r.jsx($g,{item:ne,prefix:o,textCss:F,capHeightPx:X,opticalOffsetY:Z,imageGapPx:U(v),isCurve:x},`${me}-${Ie}`),be=r.jsx("span",{ref:Fe,"aria-hidden":!0,className:`${o}-cap-ref`,style:F,children:"H"}),We=d>0&&S>0?d/S*1e3:0,je=`${Math.max(0,We)/1e3}s`,Ke=ie?r.jsx("div",{ref:te,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:H,onMouseLeave:he,style:{WebkitAnimationDuration:je,animationDuration:je,WebkitAnimationPlayState:oe,animationPlayState:oe},children:Array.from({length:Te},(ne,me)=>r.jsx("div",{ref:me===0?K:void 0,className:`${o}-marquee-set`,style:{...de,paddingRight:U(v)},"aria-hidden":me>0,children:Me.map((Ie,Ge)=>Be(Ie,me,Ge))},`set-${me}`))}):r.jsx("div",{ref:K,className:ut(`${o}-marquee-set`,`${o}-marquee-static`),style:de,children:t==null?void 0:t.map((ne,me)=>Be(ne,0,me))});return r.jsxs("div",{ref:ae,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),be,r.jsxs("div",{ref:P,className:`${o}-marquee-wrapper`,style:Q,children:[st,ht,Ke]})]})},Tg=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2608
+ `}const rg=30,Ur=3,ag=12,sg=3,La=.72,lg=100,cg=10,dg=e=>Math.max(0,e)/lg,ug=e=>Math.max(0,e)/cg,pg=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")},mg=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),Si={ctx:void 0},gg=()=>Si.ctx!==void 0?Si.ctx:typeof document>"u"?(Si.ctx=null,Si.ctx):(Si.ctx=document.createElement("canvas").getContext("2d"),Si.ctx),hg=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},fg=e=>{e.style.transform=""},yg=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},vg=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const s=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?s:n(l,s)};return n(e,e.offsetWidth/2)},xg=96,bg=(e,t,n)=>{if(t<=0||e<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),s=new Float64Array(n+1),l=e*t,d=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),c=i/n;return Array.from({length:n},(u,p)=>{const v=p*c,y=v+c;o[p+1]=y,s[p+1]=s[p]+(d(v)+d(y))*.5*c}),{wavelength:i,periodArc:s[n],x:o,s}},wg=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),s=i-o*e.periodArc,{s:l,x:d}=e,c=(g,h)=>{if(h-g<=1)return[g,h];const m=g+h>>1;return l[m]<=s?c(m,h):c(g,m)},[u,p]=c(0,l.length-1),v=l[p]-l[u],y=v>0?(s-l[u])/v:0;return n*(o*e.wavelength+d[u]+(d[p]-d[u])*y)},Sg=(e,t,n,i)=>{const o=Math.max(0,n),s=e>0?2*Math.PI*o/e:0,l=p=>i+t*Math.sin(s*p),d=p=>t*s*Math.cos(s*p),c=Math.max(4,Math.ceil(o*4)),u=Array.from({length:c},(p,v)=>{const y=v/c*e,g=(v+1)/c*e,h=g-y,m=l(y),b=l(g),I=y+h/3,R=m+d(y)*h/3,T=g-h/3,G=b-d(g)*h/3;return`C${I.toFixed(2)} ${R.toFixed(2)} ${T.toFixed(2)} ${G.toFixed(2)} ${g.toFixed(2)} ${b.toFixed(2)}`});return[`M0 ${l(0).toFixed(2)}`,...u].join(" ")},$g=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:s,isCurve:l})=>{var g;const d=o!==0?{...n,transform:`translateY(${o}px)`}:n,c=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${La}em`},u=((g=e.image)==null?void 0:g.url)&&r.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:c}),p=u&&(l?r.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),v=l?r.jsx("span",{className:`${t}-text`,style:d,children:Array.from(e.text).map((h,m)=>r.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:r.jsx("span",{className:`${t}-glyph-inner`,children:h===" "?" ":h})},m))}):r.jsx("span",{className:`${t}-text`,style:d,children:e.text}),y=r.jsxs(r.Fragment,{children:[p,v]});return r.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:s},children:e.link?r.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:s},children:y}):y})},Cg=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=C.useScopedStyles(),[s,l]=a.useState(0),d=s>0?Math.round(s):0,{speed:c,direction:u,pauseOnHover:p,gap:v,layoutType:y,curveAmplitude:g,curveFrequency:h,textFontFamily:m,textFontSettings:b,textFontSize:I,textLineHeight:R,textLetterSpacing:T,textWordSpacing:G,textTextAppearance:A,textColor:V,backgroundColor:k,ribbonWidth:L}=e,D=L??R,x=y==="curve",W=dg(g),M=ug(h),Y=a.useMemo(()=>og(o,d,x),[o,d,x]),F=a.useMemo(()=>Xt({fontSettings:{fontFamily:m,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:T,wordSpacing:G,fontSize:I,lineHeight:R,textAppearance:A,color:V},n),[m,b,T,G,I,R,A,V,n]),U=ne=>C.scalingValue(ne,n??!1),B=((t==null?void 0:t.length)??0)>0,j=n?!!i:!0,ie=B&&(j||!!n),S=Math.max(0,c)*rg,E=j&&p==="on",[O,le]=a.useState(!1),oe=j?E&&O?"paused":"running":"paused",$=oe==="running"&&S>0&&d>0,ae=a.useRef(null),P=a.useRef(null),te=a.useRef(null),K=a.useRef(null),xe=a.useRef(null),Fe=a.useRef(null),ge=a.useRef($),ce=a.useRef(null);ge.current=$;const[X,ee]=a.useState(0),[Z,Pe]=a.useState(0),[$e,ke]=a.useState(0),[ue,fe]=a.useState(0),[Se,z]=a.useState(0),se=a.useMemo(()=>(t??[]).map(ne=>{var me;return`${ne.text}\0${((me=ne.image)==null?void 0:me.url)??""}`}).join("\0"),[t]),[ye,ve]=a.useState(Ur),Me=a.useMemo(()=>{const ne=t??[];return ne.length===0||!(j||n)?ne:mg(ne,ye)},[t,j,ye,n]),Te=ie?sg:1;a.useLayoutEffect(()=>{ve(Ur),l(0)},[se]),a.useLayoutEffect(()=>{var Ze;const ne=Fe.current;if(!ne)return;const me=()=>{const Ve=getComputedStyle(ne),at=parseFloat(Ve.fontSize)||0;if(at<=0)return;const Je=gg();if(!Je){ee(at*La),Pe(0);return}Je.font=`${Ve.fontStyle} ${Ve.fontWeight} ${at}px ${Ve.fontFamily}`;const Ee=Je.measureText("H"),qe=Ee.actualBoundingBoxAscent>0?Ee.actualBoundingBoxAscent:at*La,_e=Math.max(0,Ee.actualBoundingBoxDescent||0),tt=Ee.fontBoundingBoxAscent||0,rt=Ee.fontBoundingBoxDescent||0;ee(Tt=>Math.abs(Tt-qe)>.5?qe:Tt);const lt=tt>0||rt>0?(rt-_e-(tt-qe))/2:0;Pe(Tt=>Math.abs(Tt-lt)>.25?lt:Tt)};me();const Ie=typeof document<"u"?document.fonts:void 0;(Ze=Ie==null?void 0:Ie.ready)==null||Ze.then(me).catch(()=>{});const Ge=new ResizeObserver(me);return Ge.observe(ne),()=>Ge.disconnect()},[F.fontFamily,F.fontWeight,F.fontStyle,F.fontSize,F.lineHeight]),a.useLayoutEffect(()=>{if(!ie)return;const ne=ae.current,me=K.current;if(!ne||!me)return;const Ie={id:0},Ge=()=>{const Ve=ne.offsetWidth||ne.getBoundingClientRect().width,at=me.offsetWidth||me.getBoundingClientRect().width;if(B&&Ve>0&&at>0){const Je=at/ye;if(Je>0){const Ee=Math.min(ag,Math.max(Ur,Math.ceil(Ve/Je)+1));if(Ee!==ye){ve(Ee);return}}}at>0&&l(at)};Ie.id=requestAnimationFrame(Ge);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ge)});return Ze.observe(ne),Ze.observe(me),()=>{cancelAnimationFrame(Ie.id),Ze.disconnect()}},[ie,se,ye,B,X]),a.useLayoutEffect(()=>{const ne=xe.current;if(!ne)return;const me={id:0},Ie=()=>{const Ze=ne.offsetHeight;Ze>0&&z(Ve=>Math.abs(Ve-Ze)>.5?Ze:Ve)};me.id=requestAnimationFrame(Ie);const Ge=new ResizeObserver(()=>{cancelAnimationFrame(me.id),me.id=requestAnimationFrame(Ie)});return Ge.observe(ne),()=>{cancelAnimationFrame(me.id),Ge.disconnect()}},[D,n]),a.useLayoutEffect(()=>{if(!x){ke(0),fe(0);return}const ne=ae.current,me=K.current;if(!ne||!me)return;const Ie={id:0},Ge=()=>{const Ve=ne.offsetWidth,at=me.offsetHeight;Ve>0&&fe(Je=>Math.abs(Je-Ve)>.5?Ve:Je),at>0&&ke(Je=>Math.abs(Je-at)>.5?at:Je)};Ie.id=requestAnimationFrame(Ge);const Ze=new ResizeObserver(()=>{cancelAnimationFrame(Ie.id),Ie.id=requestAnimationFrame(Ge)});return Ze.observe(ne),Ze.observe(me),()=>{cancelAnimationFrame(Ie.id),Ze.disconnect()}},[x,se,X,R,I,ie]),a.useLayoutEffect(()=>{if(!ie||d<=0)return;const ne=te.current;ne&&pg(ne)},[ie,d,u,S]),a.useLayoutEffect(()=>{if(!x||!B)return;const ne=ae.current;if(!ne)return;const me={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},Ie=()=>{for(const Ee of me.itemsCache)for(const qe of Ee.glyphs)fg(qe.inner)},Ge=()=>{const Ee=P.current??ne;me.itemsCache=Array.from(ne.querySelectorAll("[data-marquee-text-item]"),qe=>{const _e=[];return qe.querySelectorAll("[data-marquee-wave-node]").forEach(tt=>{const rt=tt.firstElementChild;rt&&_e.push({inner:rt,layoutLocalX:vg(tt,Ee)})}),{item:qe,glyphs:_e}}),me.cacheDirty=!1},Ze=()=>{me.cacheDirty&&Ge();const qe=(P.current??ne).offsetWidth||1,_e=qe*W,tt=2*Math.PI*M/qe,rt=`${qe}|${_e}|${tt}`;rt!==me.lutKey&&(me.lutKey=rt,me.lut=bg(_e,tt,xg));const lt=te.current,Tt=lt?yg(getComputedStyle(lt).transform):0,Ut=ne.getBoundingClientRect(),Zt=Ut.left,xt=Ut.right,wt=me.lut&&me.lut.wavelength>0?Math.max(0,(me.lut.periodArc/me.lut.wavelength-1)*qe):0;for(const{item:jt,glyphs:At}of me.itemsCache){const vt=jt.getBoundingClientRect();if(!(vt.right<Zt||vt.left>xt+wt))for(const Ft of At){const _t=Ft.layoutLocalX+Tt,Kt=me.lut?wg(me.lut,_t):_t,Jt=tt*Kt,Ct=_e*Math.sin(Jt),Ht=_e*tt*Math.cos(Jt),on=Math.atan(Ht)*(180/Math.PI);hg(Ft.inner,Kt-_t,Ct,on)}}},Ve=()=>{me.cancelled||(me.raf=0,Ze(),ge.current&&!document.hidden&&(me.raf=requestAnimationFrame(Ve)))},at=()=>{me.cancelled||me.raf||(me.raf=requestAnimationFrame(Ve))};ce.current=at,at();const Je=()=>{if(document.hidden){cancelAnimationFrame(me.raf),me.raf=0;return}at()};return document.addEventListener("visibilitychange",Je),()=>{me.cancelled=!0,ce.current=null,cancelAnimationFrame(me.raf),document.removeEventListener("visibilitychange",Je),Ie()}},[x,W,M,B,s,se,ye,X]),a.useLayoutEffect(()=>{var ne;(ne=ce.current)==null||ne.call(ce)},[$]);const H=()=>{E&&le(!0)},he=()=>{E&&le(!1)},re=x?W*100:0,_=U(D),Q={minHeight:_,...x?{paddingTop:`${re}%`,paddingBottom:`${re}%`}:{}},Ae={height:_,...x?{visibility:"hidden"}:{backgroundColor:k}},de={gap:U(v),minHeight:_},N=ue*W,Ue=Se>0?Se:$e,Oe=Math.max($e,Ue),dt=x&&ue>0&&Oe>0?Sg(ue,N,M,N+Oe/2):"",nt=N*2+Oe,ht=dt?r.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${ue} ${nt}`,preserveAspectRatio:"none","aria-hidden":!0,children:r.jsx("path",{d:dt,fill:"none",stroke:k,strokeWidth:Ue,strokeLinecap:"round",strokeLinejoin:"round"})}):null,st=r.jsx("div",{ref:xe,className:`${o}-ribbon`,style:Ae,"aria-hidden":!0}),Be=(ne,me,Ie)=>r.jsx($g,{item:ne,prefix:o,textCss:F,capHeightPx:X,opticalOffsetY:Z,imageGapPx:U(v),isCurve:x},`${me}-${Ie}`),be=r.jsx("span",{ref:Fe,"aria-hidden":!0,className:`${o}-cap-ref`,style:F,children:"H"}),We=d>0&&S>0?d/S*1e3:0,je=`${Math.max(0,We)/1e3}s`,Ke=ie?r.jsx("div",{ref:te,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:H,onMouseLeave:he,style:{WebkitAnimationDuration:je,animationDuration:je,WebkitAnimationPlayState:oe,animationPlayState:oe},children:Array.from({length:Te},(ne,me)=>r.jsx("div",{ref:me===0?K:void 0,className:`${o}-marquee-set`,style:{...de,paddingRight:U(v)},"aria-hidden":me>0,children:Me.map((Ie,Ge)=>Be(Ie,me,Ge))},`set-${me}`))}):r.jsx("div",{ref:K,className:ut(`${o}-marquee-set`,`${o}-marquee-static`),style:de,children:t==null?void 0:t.map((ne,me)=>Be(ne,0,me))});return r.jsxs("div",{ref:ae,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),be,r.jsxs("div",{ref:P,className:`${o}-marquee-wrapper`,style:Q,children:[st,ht,Ke]})]})},Tg=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
2609
2609
  import cn from 'classnames';
2610
2610
  import { CommonComponentProps } from '../props';
2611
2611
  import { scalingValue } from '../utils/scalingValue';
@@ -3535,7 +3535,7 @@ type MarqueeTextProps = {
3535
3535
  pointer-events: auto;
3536
3536
  z-index: 10;
3537
3537
  }
3538
- `}const Mg=30,Ws=2,Pg=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")},kg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:y,stroke:g,strokeColor:h,bgColor:m,padding:b,logoMarginTop:I,logoWidth:R,logoHeight:T,captionMarginTop:q}=e,A=!!o,G=((t==null?void 0:t.length)??0)>0,k=d>0&&(!n||i),L=G&&(k||n),D=Math.max(0,d)*Mg,x=H=>C.scalingValue(H,n??!1),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(null),[F,U]=a.useState(0),[V,z]=a.useState(0),ie=V>0?V:0,S=a.useMemo(()=>Eg(s,ie),[s,ie]),[E,O]=a.useState(0),le=k&&u==="on",[oe,$]=a.useState(!1),ae=a.useRef(null),[P,te]=a.useState(0),[K,xe]=a.useState(0),Fe=a.useRef(null),ge=H=>{var re,_,Q,Ae,de;return{fontSettings:{fontFamily:(e==null?void 0:e[`${H}FontFamily`])??"Arial",fontWeight:((re=e==null?void 0:e[`${H}FontSettings`])==null?void 0:re.fontWeight)??400,fontStyle:((_=e==null?void 0:e[`${H}FontSettings`])==null?void 0:_.fontStyle)??"normal"},textAppearance:{textTransform:((Q=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:Q.textTransform)??"none",textDecoration:((Ae=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:Ae.textDecoration)??"none",fontVariant:((de=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:de.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${H}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${H}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${H}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${H}LineHeight`])??.01,color:(e==null?void 0:e[`${H}Color`])??"#000000"}},ce=ge("text"),X=ge("caption"),ee=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(H=>{var he,re;return(((he=H.text)==null?void 0:he.length)??0)>0||(((re=H.caption)==null?void 0:re.length)??0)>0}),[t]),Z=a.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:V<=0||F<=0?Ws:Math.max(Ws,Math.ceil(F/V)+1),[L,t==null?void 0:t.length,V,F]);a.useLayoutEffect(()=>{if(!L)return;const H=W.current,he=Y.current;if(!H||!he)return;let re=0;const _=()=>{const de=H.getBoundingClientRect().width,N=he.getBoundingClientRect().width,Ue=Fe.current,Oe=typeof Ue=="number"&&Math.abs(Ue-N)<=.25;if(Fe.current=N,U(de),typeof N=="number"&&N>0&&V<=0){z(N);return}Oe&&N!==V?z(N):!Oe&&V<=0&&(cancelAnimationFrame(re),re=requestAnimationFrame(_))},Q=()=>{cancelAnimationFrame(re),re=requestAnimationFrame(_)};Q();const Ae=new ResizeObserver(Q);return Ae.observe(H),Ae.observe(he),()=>{cancelAnimationFrame(re),Ae.disconnect()}},[k,L,V]);const Pe=ie>0&&D>0?ie/D*1e3:0,$e=`${Math.max(0,Pe)/1e3}s`;a.useLayoutEffect(()=>{if(!L||ie<=0)return;const H=M.current;H&&Pg(H)},[L,ie,c]),a.useLayoutEffect(()=>{if(!L){O(0);return}const H=Y.current,he=M.current;if(!H||!he)return;const re=()=>{let Q=0;for(let Ae=0;Ae<H.children.length;Ae++){const N=H.children[Ae].firstElementChild;N&&(Q=Math.max(Q,N.offsetHeight))}Q<=0&&(Q=he.offsetHeight),O(Q>0?Q:0)};re();const _=new ResizeObserver(re);return _.observe(H),_.observe(he),()=>{_.disconnect()}},[L,Z,t,n,p,v,b,g,y,R,T,P,K]);const ke=()=>{le&&$(!0)},ue=()=>{le&&$(!1)},fe=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Se=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),B=a.useCallback((H,he,re,_)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[r.jsx("div",{"data-controls":A?_==null?void 0:_.controlsName:void 0,"data-controls-axis":A?"y":void 0,className:A?`${s}-control`:void 0,style:{height:x((_==null?void 0:_.marginTop)??0)}}),r.jsx("div",{..._!=null&&_.dataMeasureKind?{"data-testimonial-measure":_.dataMeasureKind}:{},style:{...Xt(H,n),textAlign:Se,pointerEvents:"auto",...typeof(_==null?void 0:_.minHeightPx)=="number"&&_.minHeightPx>0?{minHeight:_.minHeightPx}:{}},children:r.jsx(yi,{content:he})})]},re),[fe,Se,n,A,s,x]),se=a.useCallback((H,he,re)=>{var _,Q,Ae;return r.jsxs("div",{style:{padding:`${x(b.top)} ${x(b.right)} ${x(b.bottom)} ${x(b.left)}`,width:x(v+g*2),height:"100%",borderRadius:x(y),border:`${x(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:m}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:fe,textAlign:Se},children:[H.text&&B(ce,H.text,"text",re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(re==null?void 0:re.textMinHeightPx)=="number"&&re.textMinHeightPx>0?{minHeightPx:re.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[r.jsx("div",{"data-controls":A&&!(re!=null&&re.dataMeasureAttrs)?"logoMarginTop":void 0,className:A&&!(re!=null&&re.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:x(I)}}),r.jsx("div",{style:{width:x(R),height:x(T)},children:((_=H.logo)==null?void 0:_.url)&&r.jsx("img",{src:H.logo.url,alt:((Q=H.logo)==null?void 0:Q.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ae=H.logo)==null?void 0:Ae.objectFit)||"contain"}})})]}),H.caption&&B(X,H.caption,"caption",{...re!=null&&re.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:q,...re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(re==null?void 0:re.captionMinHeightPx)=="number"&&re.captionMinHeightPx>0?{minHeightPx:re.captionMinHeightPx}:{}})]})]},he)},[m,q,X,v,y,T,I,R,fe,Se,b.bottom,b.left,b.right,b.top,B,g,h,ce,n,A,s]),ye=a.useCallback(H=>{te(H.maxTextPx),xe(H.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ee){ye({maxTextPx:0,maxCaptionPx:0});return}const H=ae.current;if(!H)return;const he=()=>{C.readTestimonialTextMeasure(H,ye)};he();const re=new ResizeObserver(he);return re.observe(H),()=>{re.disconnect()}},[ee,ye,t,se]);const ve=ee?{textMinHeightPx:P,captionMinHeightPx:K}:void 0,Me=ee?r.jsx("div",{ref:ae,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((H,he)=>se(H,`measure-${he}`,{dataMeasureAttrs:!0}))}):null,Te=(H,he)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[se(H,`card-${he}`,ve),A&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${x(p)})`,width:x(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},he);if(L){const H=k?le&&oe?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:ut(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...E>0?{height:E}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:ke,onMouseLeave:ue,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:$e,WebkitAnimationDuration:$e,animationPlayState:H,WebkitAnimationPlayState:H},children:Array.from({length:Z},(he,re)=>r.jsx("div",{ref:re===0?Y:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:x(p),paddingRight:x(p)},"aria-hidden":re>0,children:t==null?void 0:t.map((_,Q)=>Te(_,`${re}-${Q}`))},`set-${re}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{style:{gap:x(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((H,he)=>Te(H,he))})]})},Ag=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3538
+ `}const Mg=30,Ws=2,Pg=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")},kg=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),{align:l,speed:d,direction:c,pauseOnHover:u,gap:p,cardWidth:v,corners:y,stroke:g,strokeColor:h,bgColor:m,padding:b,logoMarginTop:I,logoWidth:R,logoHeight:T,captionMarginTop:G}=e,A=!!o,V=((t==null?void 0:t.length)??0)>0,k=d>0&&(!n||i),L=V&&(k||n),D=Math.max(0,d)*Mg,x=H=>C.scalingValue(H,n??!1),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(null),[F,U]=a.useState(0),[B,j]=a.useState(0),ie=B>0?B:0,S=a.useMemo(()=>Eg(s,ie),[s,ie]),[E,O]=a.useState(0),le=k&&u==="on",[oe,$]=a.useState(!1),ae=a.useRef(null),[P,te]=a.useState(0),[K,xe]=a.useState(0),Fe=a.useRef(null),ge=H=>{var re,_,Q,Ae,de;return{fontSettings:{fontFamily:(e==null?void 0:e[`${H}FontFamily`])??"Arial",fontWeight:((re=e==null?void 0:e[`${H}FontSettings`])==null?void 0:re.fontWeight)??400,fontStyle:((_=e==null?void 0:e[`${H}FontSettings`])==null?void 0:_.fontStyle)??"normal"},textAppearance:{textTransform:((Q=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:Q.textTransform)??"none",textDecoration:((Ae=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:Ae.textDecoration)??"none",fontVariant:((de=e==null?void 0:e[`${H}TextAppearance`])==null?void 0:de.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${H}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${H}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${H}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${H}LineHeight`])??.01,color:(e==null?void 0:e[`${H}Color`])??"#000000"}},ce=ge("text"),X=ge("caption"),ee=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(H=>{var he,re;return(((he=H.text)==null?void 0:he.length)??0)>0||(((re=H.caption)==null?void 0:re.length)??0)>0}),[t]),Z=a.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:B<=0||F<=0?Ws:Math.max(Ws,Math.ceil(F/B)+1),[L,t==null?void 0:t.length,B,F]);a.useLayoutEffect(()=>{if(!L)return;const H=W.current,he=Y.current;if(!H||!he)return;let re=0;const _=()=>{const de=H.getBoundingClientRect().width,N=he.getBoundingClientRect().width,Ue=Fe.current,Oe=typeof Ue=="number"&&Math.abs(Ue-N)<=.25;if(Fe.current=N,U(de),typeof N=="number"&&N>0&&B<=0){j(N);return}Oe&&N!==B?j(N):!Oe&&B<=0&&(cancelAnimationFrame(re),re=requestAnimationFrame(_))},Q=()=>{cancelAnimationFrame(re),re=requestAnimationFrame(_)};Q();const Ae=new ResizeObserver(Q);return Ae.observe(H),Ae.observe(he),()=>{cancelAnimationFrame(re),Ae.disconnect()}},[k,L,B]);const Pe=ie>0&&D>0?ie/D*1e3:0,$e=`${Math.max(0,Pe)/1e3}s`;a.useLayoutEffect(()=>{if(!L||ie<=0)return;const H=M.current;H&&Pg(H)},[L,ie,c]),a.useLayoutEffect(()=>{if(!L){O(0);return}const H=Y.current,he=M.current;if(!H||!he)return;const re=()=>{let Q=0;for(let Ae=0;Ae<H.children.length;Ae++){const N=H.children[Ae].firstElementChild;N&&(Q=Math.max(Q,N.offsetHeight))}Q<=0&&(Q=he.offsetHeight),O(Q>0?Q:0)};re();const _=new ResizeObserver(re);return _.observe(H),_.observe(he),()=>{_.disconnect()}},[L,Z,t,n,p,v,b,g,y,R,T,P,K]);const ke=()=>{le&&$(!0)},ue=()=>{le&&$(!1)},fe=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Se=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),z=a.useCallback((H,he,re,_)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[r.jsx("div",{"data-controls":A?_==null?void 0:_.controlsName:void 0,"data-controls-axis":A?"y":void 0,className:A?`${s}-control`:void 0,style:{height:x((_==null?void 0:_.marginTop)??0)}}),r.jsx("div",{..._!=null&&_.dataMeasureKind?{"data-testimonial-measure":_.dataMeasureKind}:{},style:{...Xt(H,n),textAlign:Se,pointerEvents:"auto",...typeof(_==null?void 0:_.minHeightPx)=="number"&&_.minHeightPx>0?{minHeight:_.minHeightPx}:{}},children:r.jsx(yi,{content:he})})]},re),[fe,Se,n,A,s,x]),se=a.useCallback((H,he,re)=>{var _,Q,Ae;return r.jsxs("div",{style:{padding:`${x(b.top)} ${x(b.right)} ${x(b.bottom)} ${x(b.left)}`,width:x(v+g*2),height:"100%",borderRadius:x(y),border:`${x(g)} solid ${h}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:m}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:fe,textAlign:Se},children:[H.text&&z(ce,H.text,"text",re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(re==null?void 0:re.textMinHeightPx)=="number"&&re.textMinHeightPx>0?{minHeightPx:re.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[r.jsx("div",{"data-controls":A&&!(re!=null&&re.dataMeasureAttrs)?"logoMarginTop":void 0,className:A&&!(re!=null&&re.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:x(I)}}),r.jsx("div",{style:{width:x(R),height:x(T)},children:((_=H.logo)==null?void 0:_.url)&&r.jsx("img",{src:H.logo.url,alt:((Q=H.logo)==null?void 0:Q.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ae=H.logo)==null?void 0:Ae.objectFit)||"contain"}})})]}),H.caption&&z(X,H.caption,"caption",{...re!=null&&re.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:G,...re!=null&&re.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(re==null?void 0:re.captionMinHeightPx)=="number"&&re.captionMinHeightPx>0?{minHeightPx:re.captionMinHeightPx}:{}})]})]},he)},[m,G,X,v,y,T,I,R,fe,Se,b.bottom,b.left,b.right,b.top,z,g,h,ce,n,A,s]),ye=a.useCallback(H=>{te(H.maxTextPx),xe(H.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!ee){ye({maxTextPx:0,maxCaptionPx:0});return}const H=ae.current;if(!H)return;const he=()=>{C.readTestimonialTextMeasure(H,ye)};he();const re=new ResizeObserver(he);return re.observe(H),()=>{re.disconnect()}},[ee,ye,t,se]);const ve=ee?{textMinHeightPx:P,captionMinHeightPx:K}:void 0,Me=ee?r.jsx("div",{ref:ae,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((H,he)=>se(H,`measure-${he}`,{dataMeasureAttrs:!0}))}):null,Te=(H,he)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[se(H,`card-${he}`,ve),A&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${x(p)})`,width:x(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},he);if(L){const H=k?le&&oe?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:ut(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...E>0?{height:E}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{ref:M,className:`${s}-marquee-track`,"data-direction":c,onMouseEnter:ke,onMouseLeave:ue,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:$e,WebkitAnimationDuration:$e,animationPlayState:H,WebkitAnimationPlayState:H},children:Array.from({length:Z},(he,re)=>r.jsx("div",{ref:re===0?Y:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:x(p),paddingRight:x(p)},"aria-hidden":re>0,children:t==null?void 0:t.map((_,Q)=>Te(_,`${re}-${Q}`))},`set-${re}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:S}}),Me,r.jsx("div",{style:{gap:x(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((H,he)=>Te(H,he))})]})},Ag=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3539
3539
  import cn from 'classnames';
3540
3540
  import { CommonComponentProps } from '../props';
3541
3541
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4290,7 +4290,7 @@ type TestimonialsSettings = {
4290
4290
  width: 100%;
4291
4291
  height: 100%;
4292
4292
  }
4293
- `}const Hg=3e3,Ng=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:m,controlsColor:b,controlsHoverColor:I}=e,R=d>0&&(!n||!!i),[T,q]=a.useState(0),[A,G]=a.useState(null),[k,L]=a.useState(!1),D=a.useRef(null),x=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{q(0),G(null),L(!1)},[l.length]);const M=l[T],Y=A===null?null:l[A],F=ge=>{var X,ee,Z,Pe,$e;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ge}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${ge}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${ge}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((Z=e==null?void 0:e[`${ge}TextAppearance`])==null?void 0:Z.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${ge}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:(($e=e==null?void 0:e[`${ge}TextAppearance`])==null?void 0:$e.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ge}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ge}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ge}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ge}WordSpacing`])??0,color:(e==null?void 0:e[`${ge}Color`])??"#000000"}},U=F("text"),V=F("caption"),z=l.length>1&&l.some(ge=>{var ce,X;return(((ce=ge.text)==null?void 0:ce.length)??0)>0||(((X=ge.caption)==null?void 0:X.length)??0)>0}),ie=a.useRef(null),[S,E]=a.useState(0),[O,le]=a.useState(0),oe=e.controls??{mode:"Off",icon:null},$=l.length>1,ae=a.useCallback((ge,ce)=>!$||ce===ge?ge:(D.current&&window.clearTimeout(D.current),G(ge),L(!0),D.current=window.setTimeout(()=>{G(null),L(!1),D.current=null},300),ce),[$]),P=a.useCallback(()=>{$&&q(ge=>ae(ge,(ge-1+l.length)%l.length))},[$,ae,l.length]),te=a.useCallback(()=>{$&&q(ge=>ae(ge,(ge+1)%l.length))},[$,ae,l.length]);a.useEffect(()=>{if(!R||!$)return;const ge=Math.max(300,Hg/d),ce=window.setInterval(()=>{q(X=>ae(X,(X+1)%l.length))},ge);return()=>{window.clearInterval(ce)}},[R,$,ae,l.length,d]),a.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const K=(ge,ce)=>{var $e,ke,ue,fe;const X=ce==null?void 0:ce.textMinHeightPx,ee=ce==null?void 0:ce.captionMinHeightPx,Z=ce==null?void 0:ce.dataMeasureAttrs,Pe=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[ge.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":Pe?"textMarginTop":void 0,className:Pe?`${s}-control`:void 0,style:{height:C.scalingValue(v??0,n??!1)}}),r.jsx("div",{...Z&&{"data-testimonial-measure":"text"},style:{...Xt(U,n),...X&&X>0?{minHeight:X}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:ge.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":Pe?"imageMarginTop":void 0,className:Pe?`${s}-control`:void 0,style:{height:C.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:C.scalingValue(g??0,n??!1),height:C.scalingValue(h??0,n??!1)},children:(($e=ge.image)==null?void 0:$e.url)&&r.jsx("img",{src:(ke=ge.image)==null?void 0:ke.url,alt:((ue=ge.image)==null?void 0:ue.name)??"",className:`${s}-icon`,style:{objectFit:((fe=ge.image)==null?void 0:fe.objectFit)||"contain"}})})]}),ge.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":Pe?"captionMarginTop":void 0,className:Pe?`${s}-control`:void 0,style:{height:C.scalingValue(y??0,n??!1)}}),r.jsx("div",{...Z?{"data-testimonial-measure":"caption"}:{},style:{...Xt(V,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:ge.caption})})]})]})},xe=a.useCallback(ge=>{E(ge.maxTextPx),le(ge.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!z){xe({maxTextPx:0,maxCaptionPx:0});return}const ge=ie.current;if(!ge)return;const ce=()=>{C.readTestimonialTextMeasure(ge,xe)};ce();const X=new ResizeObserver(ce);return X.observe(ge),()=>{X.disconnect()}},[z,xe,t]),!M)return r.jsx(r.Fragment,{});const Fe=z?{textMinHeightPx:S,captionMinHeightPx:O}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_g(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:C.scalingValue(u??0,n??!1),alignItems:x},children:[z&&r.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ge,ce)=>r.jsx("div",{style:{width:"100%"},children:K(ge,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[Y&&k&&r.jsx("div",{className:ut(`${s}-fade-item-prev`,`${s}-fade-out`),children:K(Y,{...Fe,hideControls:!0})}),r.jsx("div",{className:ut(`${s}-fade-item-current`,k?`${s}-fade-in`:void 0),children:K(M,Fe)})]})]}),oe.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:P,disabled:!$,"aria-label":"Previous testimonial",children:oe.icon&&r.jsx(an,{url:oe.icon,fill:b,hoverFill:I,className:ut(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:ut(`${s}-arrow`,`${s}-next-arrow`),style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:te,disabled:!$,"aria-label":"Next testimonial",children:oe.icon&&r.jsx(an,{url:oe.icon,fill:b,hoverFill:I,className:`${s}-arrow-img`})})})]})]})})},Og=`import cn from 'classnames';
4293
+ `}const Hg=3e3,Ng=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=C.useScopedStyles(),l=t||[],{speed:d,align:c,width:u,imageMarginTop:p,textMarginTop:v,captionMarginTop:y,imageWidth:g,imageHeight:h,controlsWidth:m,controlsColor:b,controlsHoverColor:I}=e,R=d>0&&(!n||!!i),[T,G]=a.useState(0),[A,V]=a.useState(null),[k,L]=a.useState(!1),D=a.useRef(null),x=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=a.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);a.useEffect(()=>{G(0),V(null),L(!1)},[l.length]);const M=l[T],Y=A===null?null:l[A],F=ge=>{var X,ee,Z,Pe,$e;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ge}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${ge}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${ge}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((Z=e==null?void 0:e[`${ge}TextAppearance`])==null?void 0:Z.textTransform)??"none",textDecoration:((Pe=e==null?void 0:e[`${ge}TextAppearance`])==null?void 0:Pe.textDecoration)??"none",fontVariant:(($e=e==null?void 0:e[`${ge}TextAppearance`])==null?void 0:$e.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ge}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ge}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ge}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ge}WordSpacing`])??0,color:(e==null?void 0:e[`${ge}Color`])??"#000000"}},U=F("text"),B=F("caption"),j=l.length>1&&l.some(ge=>{var ce,X;return(((ce=ge.text)==null?void 0:ce.length)??0)>0||(((X=ge.caption)==null?void 0:X.length)??0)>0}),ie=a.useRef(null),[S,E]=a.useState(0),[O,le]=a.useState(0),oe=e.controls??{mode:"Off",icon:null},$=l.length>1,ae=a.useCallback((ge,ce)=>!$||ce===ge?ge:(D.current&&window.clearTimeout(D.current),V(ge),L(!0),D.current=window.setTimeout(()=>{V(null),L(!1),D.current=null},300),ce),[$]),P=a.useCallback(()=>{$&&G(ge=>ae(ge,(ge-1+l.length)%l.length))},[$,ae,l.length]),te=a.useCallback(()=>{$&&G(ge=>ae(ge,(ge+1)%l.length))},[$,ae,l.length]);a.useEffect(()=>{if(!R||!$)return;const ge=Math.max(300,Hg/d),ce=window.setInterval(()=>{G(X=>ae(X,(X+1)%l.length))},ge);return()=>{window.clearInterval(ce)}},[R,$,ae,l.length,d]),a.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const K=(ge,ce)=>{var $e,ke,ue,fe;const X=ce==null?void 0:ce.textMinHeightPx,ee=ce==null?void 0:ce.captionMinHeightPx,Z=ce==null?void 0:ce.dataMeasureAttrs,Pe=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[ge.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":Pe?"textMarginTop":void 0,className:Pe?`${s}-control`:void 0,style:{height:C.scalingValue(v??0,n??!1)}}),r.jsx("div",{...Z&&{"data-testimonial-measure":"text"},style:{...Xt(U,n),...X&&X>0?{minHeight:X}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:ge.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":Pe?"imageMarginTop":void 0,className:Pe?`${s}-control`:void 0,style:{height:C.scalingValue(p??0,n??!1)}}),r.jsx("div",{style:{width:C.scalingValue(g??0,n??!1),height:C.scalingValue(h??0,n??!1)},children:(($e=ge.image)==null?void 0:$e.url)&&r.jsx("img",{src:(ke=ge.image)==null?void 0:ke.url,alt:((ue=ge.image)==null?void 0:ue.name)??"",className:`${s}-icon`,style:{objectFit:((fe=ge.image)==null?void 0:fe.objectFit)||"contain"}})})]}),ge.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":Pe?"captionMarginTop":void 0,className:Pe?`${s}-control`:void 0,style:{height:C.scalingValue(y??0,n??!1)}}),r.jsx("div",{...Z?{"data-testimonial-measure":"caption"}:{},style:{...Xt(B,n),...ee&&ee>0?{minHeight:ee}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:ge.caption})})]})]})},xe=a.useCallback(ge=>{E(ge.maxTextPx),le(ge.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!j){xe({maxTextPx:0,maxCaptionPx:0});return}const ge=ie.current;if(!ge)return;const ce=()=>{C.readTestimonialTextMeasure(ge,xe)};ce();const X=new ResizeObserver(ce);return X.observe(ge),()=>{X.disconnect()}},[j,xe,t]),!M)return r.jsx(r.Fragment,{});const Fe=j?{textMinHeightPx:S,captionMinHeightPx:O}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_g(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:C.scalingValue(u??0,n??!1),alignItems:x},children:[j&&r.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ge,ce)=>r.jsx("div",{style:{width:"100%"},children:K(ge,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[Y&&k&&r.jsx("div",{className:ut(`${s}-fade-item-prev`,`${s}-fade-out`),children:K(Y,{...Fe,hideControls:!0})}),r.jsx("div",{className:ut(`${s}-fade-item-current`,k?`${s}-fade-in`:void 0),children:K(M,Fe)})]})]}),oe.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:P,disabled:!$,"aria-label":"Previous testimonial",children:oe.icon&&r.jsx(an,{url:oe.icon,fill:b,hoverFill:I,className:ut(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:ut(`${s}-arrow`,`${s}-next-arrow`),style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":I},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:te,disabled:!$,"aria-label":"Next testimonial",children:oe.icon&&r.jsx(an,{url:oe.icon,fill:b,hoverFill:I,className:`${s}-arrow-img`})})})]})]})})},Og=`import cn from 'classnames';
4294
4294
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4295
4295
  import { CommonComponentProps } from '../props';
4296
4296
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -5133,7 +5133,7 @@ type TestimonialsSettings = {
5133
5133
  z-index: 2;
5134
5134
  width: 100%;
5135
5135
  }
5136
- `}function Gg(){return Math.random()<.5?"ltr":"ttb"}function qg(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Ug(e){const t=Gg();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{qg(e)})})}const vn=500,Xg=750,Hn="cubic-bezier(0.22, 1, 0.36, 1)",Kg=72,Yg=50;function Zg(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 Jg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Qg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Cc(e){return!Array.isArray(e)||e.length===0?[]:Zg(e)?e.flatMap(t=>{const n=Jg(t);if(!n)return[];const i=Qg(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 gi(e){return e.type==="video"}function eh(e){const t=new Set,n=[];for(const i of e){const o=Cc(i.gallery);for(const s of o){const l=s.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function th({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=>gi(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 nh(e){e.pause(),e.removeAttribute("src"),e.load()}function Os({media:e,className:t,style:n,onMediaClick:i}){return gi(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 Ds(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ih(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function oh({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{nh(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function rh({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=a.useRef(null),y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),q=a.useRef(null),A=a.useRef(0),G=a.useRef(null),k=a.useRef(!1),L=a.useRef(null),D=a.useRef(null),x=a.useRef(null),W=a.useRef(()=>{}),[M,Y]=a.useState(null),[F,U]=a.useState(null),[V,z]=a.useState("opening"),[ie,S]=a.useState(0),[E,O]=a.useState(0),[le,oe]=a.useState(null),[$,ae]=a.useState(!1),[P,te]=a.useState(!1),[K,xe]=a.useState(!1),[Fe,ge]=a.useState(null),ce=a.useRef(n),X=a.useRef(void 0),ee=t[n],Z=ee?gi(ee):!1,Pe=E!==0||$,$e=le!==null,ke=a.useCallback(ne=>{const me=ne.currentTarget,Ie=me instanceof HTMLVideoElement?{width:me.videoWidth,height:me.videoHeight}:{width:me.naturalWidth,height:me.naturalHeight};!Ie.width||!Ie.height||ge(Ie)},[]);a.useEffect(()=>{q.current=F},[F]),a.useEffect(()=>{const ne=v.current;if(!ne)return;const me=()=>U(Ds(ne));me();const Ie=new ResizeObserver(me);return Ie.observe(ne),()=>Ie.disconnect()},[]);const ue=a.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),fe=a.useCallback(()=>{const ne=D.current;D.current=null,ue(),G.current=null,k.current=!1,oe(null),ae(!1),O(0),A.current=0,te(!1),R.current=!1,b.current=0,I.current="none",ne===1?d():ne===-1&&l()},[ue,d,l]),Se=a.useCallback(()=>{ue(),D.current=null,G.current=null,k.current=!1,oe(null),ae(!1),O(0),A.current=0},[ue]),B=a.useCallback(()=>{ue(),L.current=window.setTimeout(()=>{D.current!==null&&fe()},vn+32)},[ue,fe]),se=a.useCallback((ne,me)=>{var Ge;const Ie=((Ge=q.current)==null?void 0:Ge.width)??0;if(ue(),G.current=ne,oe(ne),k.current=!0,ae(!0),me){D.current=ne;const Ze=-ne*Ie;A.current=Ze,O(Ze),B();return}A.current=0,O(0),L.current=window.setTimeout(()=>{L.current=null,Se()},vn+32)},[ue,Se,B]),ye=a.useCallback(ne=>{if(!(t.length<=1)){if(k.current){if(D.current===ne){x.current=ne,fe();return}Se()}ue(),G.current=ne,oe(ne),k.current=!1,ae(!1),A.current=0,O(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(ne,!0)})})}},[t.length,se,fe,Se,ue]);W.current=ye;const ve=a.useCallback(ne=>{ne.propertyName!=="transform"||!k.current||D.current!==null&&fe()},[fe]),Me=a.useCallback(()=>{const ne=y.current;if(!ne)return;const me=Ds(ne);!me.width||!me.height||Y(me)},[]);a.useEffect(()=>{Me();const ne=y.current;if(!ne)return;const me=new ResizeObserver(()=>Me());return me.observe(ne),()=>me.disconnect()},[Me]),a.useEffect(()=>{V==="opening"&&M&&z("open")},[V,M]),a.useEffect(()=>{if(V!=="closing")return;const ne=setTimeout(()=>s(),vn);return()=>clearTimeout(ne)},[V,s]),a.useEffect(()=>()=>{ue()},[ue]),a.useLayoutEffect(()=>{ce.current===n&&X.current===(ee==null?void 0:ee.url)||(ue(),D.current=null,oe(null),S(0),O(0),ae(!1),xe(!1),te(!1),ge(null),m.current=0,b.current=0,I.current="none",R.current=!1,k.current=!1,A.current=0,G.current=null,h.current=null,T.current=!1,ce.current=n,X.current=ee==null?void 0:ee.url)},[n,ee==null?void 0:ee.url,ue]),a.useLayoutEffect(()=>{const ne=x.current;ne!==null&&(x.current=null,requestAnimationFrame(()=>{W.current(ne)}))},[n,ee==null?void 0:ee.url]),a.useEffect(()=>{if(V!=="open")return;let ne=null;const me=()=>{ne&&(document.removeEventListener("click",ne,!0),ne=null)},Ie=()=>{me(),ne=Je=>{Je.stopPropagation(),Je.preventDefault(),me()},document.addEventListener("click",ne,!0)},Ge=Je=>{const Ee=Je<0?1:-1;if(Math.abs(Je)>Yg&&t.length>1){se(Ee,!0);return}se(Ee,!1)},Ze=Je=>{if(Je.touches.length!==1||k.current)return;const Ee=Je.touches[0];T.current=!0,h.current={x:Ee.clientX,y:Ee.clientY},I.current="none",b.current=0,R.current=!1},Ve=Je=>{if(!h.current||Je.touches.length!==1||k.current)return;const Ee=Je.touches[0],qe=Ee.clientX-h.current.x,_e=Ee.clientY-h.current.y;if(I.current==="none"){if(Math.abs(qe)<10&&Math.abs(_e)<10)return;if(Math.abs(qe)>Math.abs(_e)){if(t.length<=1)return;I.current="horizontal"}else if(_e>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,te(!0),b.current=qe;const tt=qe<0?1:-1;G.current!==tt&&(G.current=tt,oe(tt)),A.current=qe,O(qe),Je.preventDefault();return}I.current==="vertical"&&(R.current=!0,te(!0),m.current=_e,S(_e),Je.preventDefault())},at=()=>{if(!h.current)return;const Je=I.current,Ee=R.current;if(Ee&&Je==="horizontal")Ge(b.current),Ie();else if(Ee&&Je==="vertical")if(m.current>Kg){const _e=window.innerHeight;m.current=_e,xe(!0),S(_e),z("closing")}else m.current=0,S(0),Ie();else Je==="horizontal"&&Math.abs(b.current)>0&&(Ge(b.current),Ie());h.current=null,I.current="none",b.current=0,R.current=!1,te(!1)};return document.addEventListener("touchstart",Ze,{passive:!0}),document.addEventListener("touchmove",Ve,{passive:!1}),document.addEventListener("touchend",at),document.addEventListener("touchcancel",at),()=>{document.removeEventListener("touchstart",Ze),document.removeEventListener("touchmove",Ve),document.removeEventListener("touchend",at),document.removeEventListener("touchcancel",at),me()}},[V,t.length,se]),a.useEffect(()=>{const ne=me=>{me.key==="Escape"&&(me.preventDefault(),me.stopPropagation(),V!=="closing"&&z("closing"))};return window.addEventListener("keydown",ne,!0),()=>window.removeEventListener("keydown",ne,!0)},[V]);const Te=()=>{V!=="closing"&&z("closing")},H=V==="open",he=V==="closing",re=ie>0?Math.max(0,1-ie/500):1,_=ie>0?Math.max(.35,1-ie/500):1,Q=M?p?M:ih(M,Fe):null,Ae=ne=>{if(ne.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const me=Q??ne.currentTarget.getBoundingClientRect(),Ie=ne.clientY-me.top,Ge=Math.min(52,me.height*.2);if(!(Ie>me.height-Ge)){if(ne.clientX-me.left<me.width/2){ye(-1);return}ye(1)}},de=ne=>{if(t.length<=1)return;const me=Q??ne.currentTarget.getBoundingClientRect(),Ie=ne.clientX-me.left,Ge=ne.clientY-me.top,Ze=Math.min(52,me.height*.2);if(Ge>me.height-Ze){ne.currentTarget.style.cursor="default";return}ne.currentTarget.style.cursor=Ie<me.width/2?"w-resize":"e-resize"},N={position:"fixed",top:F==null?void 0:F.top,left:F==null?void 0:F.left,width:F==null?void 0:F.width,height:F==null?void 0:F.height,zIndex:9998},Ue=p?"cover":"contain",Oe=E!==0||ie>0?`translate(${E}px, ${ie}px)`:void 0,dt=P&&!$?"none":$?`transform ${vn}ms ${Hn}`:K?`transform ${vn}ms ${Hn}, opacity ${vn}ms ${Hn}`:V==="opening"||he?`opacity ${vn}ms ${Hn}`:"none",nt={...N,transform:Oe,opacity:ie>0?_:V==="opening"||he?0:1,transition:dt,pointerEvents:"none"},ht={position:"absolute",top:((Q==null?void 0:Q.top)??0)-((F==null?void 0:F.top)??0),left:((Q==null?void 0:Q.left)??0)-((F==null?void 0:F.left)??0),width:Q==null?void 0:Q.width,height:Q==null?void 0:Q.height,objectFit:Ue,pointerEvents:Z&&H&&!Pe?"auto":"none",touchAction:Z&&H?"none":void 0},st=(F==null?void 0:F.width)??0,Be=$e?(n+le+t.length)%t.length:null,be=Be!==null?t[Be]:null,We={...N,transform:$e?`translateX(${le*st+E}px)`:void 0,opacity:1,transition:$?`transform ${vn}ms ${Hn}`:"none",pointerEvents:"none"},je={position:"absolute",top:((M==null?void 0:M.top)??0)-((F==null?void 0:F.top)??0),left:((M==null?void 0:M.left)??0)-((F==null?void 0:F.left)??0),width:M==null?void 0:M.width,height:M==null?void 0:M.height,objectFit:Ue,pointerEvents:"none"},Ke=Q?{position:"fixed",top:Q.top,height:Q.height,width:Q.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:Te,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?re:0,transition:P?"none":`opacity ${vn}ms ${Hn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,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:H?1:0,transition:`opacity ${vn}ms ${Hn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.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:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${vn}ms ${Hn}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),M&&F&&be&&r.jsx("div",{style:We,onTransitionEnd:ve,children:gi(be)?r.jsx("video",{src:be.url,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Be}-${be.url}`):r.jsx("img",{src:be.url,alt:be.name,style:je},`neighbor-${Be}-${be.url}`)}),M&&F&&ee&&r.jsx("div",{style:nt,onTransitionEnd:ve,children:Z?r.jsx(oh,{src:ee.url,phase:V,mediaRef:g,mediaStyle:ht,onLoadedMetadata:ke,onClick:Ae,onMouseMove:de},`${n}-${ee.url}`):r.jsx("img",{ref:g,src:ee.url,alt:ee.name,onLoad:ke,style:ht},`${n}-${ee.url}`)}),H&&Ke&&t.length>1&&!Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ke,left:Q.left,cursor:"w-resize",pointerEvents:P?"none":"auto"},onClick:ne=>{if(T.current){T.current=!1;return}ne.stopPropagation(),ye(-1)}}),r.jsx("div",{style:{...Ke,left:Q.left+Q.width/2,cursor:"e-resize",pointerEvents:P?"none":"auto"},onClick:ne=>{if(T.current){T.current=!1;return}ne.stopPropagation(),ye(1)}})]})]})}function ah(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=C.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:y=100,verticalGap:g,entriesCount:h,lightbox:m,imageDisplay:b,imageCorners:I,lightboxImageDisplay:R,slider:T,sliderTiming:q,direction:A,transition:G,titleMarginTop:k,subtitleMarginTop:L,titleColor:D,subtitleColor:x,lightboxCounterColor:W,titleFontFamily:M,titleFontSettings:Y,titleFontSize:F,titleLineHeight:U,titleLetterSpacing:V,titleWordSpacing:z,titleTextAppearance:ie,subtitleFontFamily:S,subtitleFontSettings:E,subtitleFontSize:O,subtitleLineHeight:le,subtitleLetterSpacing:oe,subtitleWordSpacing:$,subtitleTextAppearance:ae,lightboxCounterFontFamily:P,lightboxCounterFontSettings:te,lightboxCounterFontSize:K,lightboxCounterLineHeight:xe,lightboxCounterLetterSpacing:Fe,lightboxCounterWordSpacing:ge,lightboxCounterTextAppearance:ce,showText:X="always",alignEntries:ee="off",align:Z="top"}=e,Pe={fontSettings:{fontFamily:M,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:F??.01,lineHeight:U,letterSpacing:V??0,wordSpacing:z??0,textAppearance:ie,color:D},ke={...rn(Xt(Pe,n))},ue={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:O??.01,lineHeight:le,letterSpacing:oe??0,wordSpacing:$??0,textAppearance:ae,color:x},Se={...rn(Xt(ue,n))},B={fontSettings:{fontFamily:P,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:K??.01,lineHeight:xe,letterSpacing:Fe??0,wordSpacing:ge??0,textAppearance:ce,color:W},ye={...rn(Xt(B,n)),...Kr(K,xe,u,n)},ve=Xr(F,U,`${u}-item-title`,`${u}-text-tight-leading`),Me=Xr(O,le,`${u}-item-subtitle`,`${u}-text-tight-leading`),Te=Kr(F,U,u,n),H=Kr(O,le,u,n),he=Xr(K,xe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),re=C.buildColorVars(u,{titleColor:D,subtitleColor:x,lightboxCounterColor:W},lh,ch),Ae=`${l&&l!=="default"?`${u}-state-${l}`:""}${X==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),de=h===0?1/0:h,N=(t??[]).slice(0,de),Ue=a.useMemo(()=>m==="on"?eh(N):[],[N,m]),Oe=v.entryWidth??.2,dt=(b==null?void 0:b.display)==="cover",nt=(b==null?void 0:b.ratioValue)??"1:1",ht=(b==null?void 0:b.reversed)??!1,[st,Be]=nt.split(":").map(Number),je=`${ht?Be:st} / ${ht?st:Be}`,Ke=v.columnsCount,ne=C.scalingValue(Oe??0,n),me=ne,Ie=!dt&&T!=="off",Ge=N.length%Ke||Ke,Ze=Ge<Ke&&N.length>0,Ve=N.length-Ge,at=Ze?Math.floor((Ke-Ge)/2)+1:1,Je=I?C.scalingValue(I,n):void 0,Ee={width:me,...dt?{aspectRatio:je,height:"auto",overflow:"hidden"}:{height:"auto"},...Je?{borderRadius:Je,overflow:"hidden"}:{}},qe=`${u}-item-image-wrapper${Ie?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),_e=p==="d"||p==="e"||p==="f",tt=ee==="on",rt=`calc(${C.scalingValue(Oe??0,n)} * (${y} / 100))`,lt=C.scalingValue(Oe*y/100,n),Tt=dt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Je?{borderRadius:Je}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Je?{borderRadius:Je}:{}},[Ut,Zt]=a.useState(0),xt=a.useRef(null),wt=G==="fade"||A==="horizontal"?"ltr":A==="vertical"?"ttb":"ltr";a.useEffect(()=>{const mt=xt.current;if(!mt)return;const Le=new ResizeObserver(De=>{Zt(Math.round(De[0].contentRect.width))});return Le.observe(mt),()=>Le.disconnect()},[]);const jt=(()=>{const mt={...re},Le=xt.current?getComputedStyle(xt.current).getPropertyValue("--cntrl-article-width").trim():"";return Le&&(mt["--cntrl-article-width"]=Le),mt})(),[At,vt]=a.useState(!1),[Ft,_t]=a.useState([]),[Kt,Jt]=a.useState(0),Ct=m==="on"&&(!n||i),Ht=(mt,Le)=>{n&&!i||m!=="off"&&(_t(mt),Jt(Le),vt(!0))};a.useEffect(()=>{if(!At||m!=="on"||typeof document>"u")return;const mt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=mt}},[At,m]),a.useEffect(()=>{!n||i||vt(!1)},[n,i]);const on=a.useMemo(()=>Vg(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:on}}),m==="on"&&r.jsx(th,{mediaList:Ue}),r.jsx("div",{style:re,children:r.jsx("div",{ref:xt,className:`${u}-wrapper ${u}-type-${p}${tt?` ${u}-align-entries`:""} ${u}-image-align-${Z} ${Ae}`.trim(),style:{gridTemplateColumns:`repeat(${Ke}, ${ne})`,rowGap:tt?0:C.scalingValue(g??0,n),columnGap:C.scalingValue(v.horizontalGap??0,n),width:C.scalingValue(v.wrapperWidth??0,n),...tt?{[`--${u}-align-entries-row-gap`]:C.scalingValue(g??0,n)}:{}},children:N.map((mt,Le)=>{var Wt;const De=Ns(mt.title),it=Ns(mt.subtitle),gt=(((Wt=mt.link)==null?void 0:Wt.length)??0)>0&&m==="off"?mt.link:void 0,ft=Math.floor(Le/Ke)===Math.ceil(N.length/Ke)-1,It=Ze&&Le>=Ve?`${at+(Le-Ve)}`:void 0,pt=_e?r.jsxs("div",{className:`${u}-item-text-block`,children:[De&&r.jsx("p",{className:ve,style:{width:rt,...ke,...Te},children:mt.title}),De&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(k??0,n),width:lt}}),it&&r.jsx("p",{className:Me,style:{width:rt,...Se,...H},children:mt.subtitle}),it&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:lt}})]}):null,zt=tt?r.jsxs("div",{className:`${u}-item-title-row`,children:[!_e&&r.jsx("div",{"data-controls":o&&De?"titleMarginTop":void 0,className:o&&De?`${u}-control`:void 0,style:{height:De?C.scalingValue(k??0,n):0,width:lt}}),De&&r.jsx("p",{className:ve,style:{width:rt,...ke,...Te},children:mt.title}),_e&&De&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(k??0,n),width:lt}})]}):null,kt=tt?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!_e&&r.jsx("div",{"data-controls":o&&it?"subtitleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?C.scalingValue(L??0,n):0,width:lt}}),it&&r.jsx("p",{className:Me,style:{width:rt,...Se,...H},children:mt.subtitle}),_e&&it&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:lt}})]}):null,Pt=gt?r.jsxs("a",{href:gt,target:"_blank",className:`${u}-item-text-link`,children:[zt,kt]}):r.jsxs(r.Fragment,{children:[zt,kt]}),Vt=Cc(mt.gallery),Gt=Vt.filter(St=>St.lightboxMedia).map(St=>St.lightboxMedia),Nt=r.jsx("div",{className:qe,style:Ee,children:Vt.length===0?null:T==="off"?(()=>{const{displayMedia:St,lightboxMedia:w}=Vt[0],we=w?Gt.findIndex(Re=>Re.url===w.url):-1;return r.jsx(Os,{media:St,className:`${u}-item-${gi(St)?"video":"image"}`.trim(),style:Tt,onMediaClick:Ct&&we>=0?()=>Ht(Gt,we):void 0})})():r.jsxs(r.Fragment,{children:[Ie&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Vt.map(({displayMedia:St})=>gi(St)?r.jsx("video",{src:St.url,muted:!0,playsInline:!0},`sizer-${St.url}`):r.jsx("img",{src:St.url,alt:""},`sizer-${St.url}`))}),r.jsx(Qa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:q*1e3,width:"100%",height:"100%",speed:Xg,type:G==="fade"?"fade":"loop",rewind:G==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:wt},onMoved:St=>{A!=="random"||G==="fade"||Ug(St)},children:Vt.map(({displayMedia:St,lightboxMedia:w},we)=>{const Re=w?Gt.findIndex(He=>He.url===w.url):-1;return r.jsx(es,{children:r.jsx(Os,{media:St,className:`${u}-item-${gi(St)?"video":"image"}`.trim(),style:Tt,onMediaClick:Ct&&Re>=0?()=>Ht(Gt,Re):void 0})},we)})},`${G}-${Oe}-${A}-${q}-${Ut}-${d}`)]})}),Ot=_e?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&De?"titleMarginTop":void 0,className:o&&De?`${u}-control`:void 0,style:{height:De?C.scalingValue(k??0,n):0,width:lt}}),r.jsx("p",{className:ve,style:{width:rt,...ke,...Te},children:mt.title}),r.jsx("div",{"data-controls":o&&it?"subtitleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?C.scalingValue(L??0,n):0,width:lt}}),r.jsx("p",{className:Me,style:{width:rt,...Se,...H},children:mt.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:It&&!tt?{gridColumn:It}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${tt&&ft?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${ne} * (${y} / 100))`:ne,...It&&tt?{gridColumn:It}:{}},children:tt?r.jsx(r.Fragment,{children:_e?r.jsxs(r.Fragment,{children:[Pt,r.jsx("a",{href:gt,target:"_blank",className:`${u}-item-image-link`,children:Nt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:gt,target:"_blank",className:`${u}-item-image-link`,children:Nt}),Pt]})}):gt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:gt,target:"_blank",className:`${u}-item-image-link`,children:[pt,Nt]}),!_e&&r.jsx("a",{href:gt,target:"_blank",className:`${u}-item-text-link`,children:Ot})]}):r.jsxs(r.Fragment,{children:[pt,Nt,Ot]})})},Le)})})}),(!n||i)&&At&&typeof document<"u"&&m==="on"&&(()=>{const mt=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:jt,"data-selection":"none",children:r.jsx(rh,{prefix:u,items:Ft,index:Kt,imageDisplay:ah(R),isEditor:n,onClose:()=>vt(!1),onPrev:()=>Jt(Le=>(Le-1+Ft.length)%Ft.length),onNext:()=>Jt(Le=>(Le+1)%Ft.length),counterClassName:he,counterStyle:ye})}),mt)})()]})}const lh={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},ch=["hover","focus","filled","success","error"],dh=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5136
+ `}function Gg(){return Math.random()<.5?"ltr":"ttb"}function qg(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Ug(e){const t=Gg();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{qg(e)})})}const vn=500,Xg=750,Hn="cubic-bezier(0.22, 1, 0.36, 1)",Kg=72,Yg=50;function Zg(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 Jg(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Qg(e){const[t]=e.media;return t!=null&&t.url?t:null}function Cc(e){return!Array.isArray(e)||e.length===0?[]:Zg(e)?e.flatMap(t=>{const n=Jg(t);if(!n)return[];const i=Qg(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 gi(e){return e.type==="video"}function eh(e){const t=new Set,n=[];for(const i of e){const o=Cc(i.gallery);for(const s of o){const l=s.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function th({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=>gi(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 nh(e){e.pause(),e.removeAttribute("src"),e.load()}function Os({media:e,className:t,style:n,onMediaClick:i}){return gi(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 Ds(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function ih(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const s=e.width/n;return{width:e.width,height:s,left:e.left,top:e.top+(e.height-s)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function oh({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l}){return a.useEffect(()=>{const d=n.current;if(d)return()=>{nh(d)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,style:i})}function rh({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u}){const p=i==="cover",v=a.useRef(null),y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),G=a.useRef(null),A=a.useRef(0),V=a.useRef(null),k=a.useRef(!1),L=a.useRef(null),D=a.useRef(null),x=a.useRef(null),W=a.useRef(()=>{}),[M,Y]=a.useState(null),[F,U]=a.useState(null),[B,j]=a.useState("opening"),[ie,S]=a.useState(0),[E,O]=a.useState(0),[le,oe]=a.useState(null),[$,ae]=a.useState(!1),[P,te]=a.useState(!1),[K,xe]=a.useState(!1),[Fe,ge]=a.useState(null),ce=a.useRef(n),X=a.useRef(void 0),ee=t[n],Z=ee?gi(ee):!1,Pe=E!==0||$,$e=le!==null,ke=a.useCallback(ne=>{const me=ne.currentTarget,Ie=me instanceof HTMLVideoElement?{width:me.videoWidth,height:me.videoHeight}:{width:me.naturalWidth,height:me.naturalHeight};!Ie.width||!Ie.height||ge(Ie)},[]);a.useEffect(()=>{G.current=F},[F]),a.useEffect(()=>{const ne=v.current;if(!ne)return;const me=()=>U(Ds(ne));me();const Ie=new ResizeObserver(me);return Ie.observe(ne),()=>Ie.disconnect()},[]);const ue=a.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),fe=a.useCallback(()=>{const ne=D.current;D.current=null,ue(),V.current=null,k.current=!1,oe(null),ae(!1),O(0),A.current=0,te(!1),R.current=!1,b.current=0,I.current="none",ne===1?d():ne===-1&&l()},[ue,d,l]),Se=a.useCallback(()=>{ue(),D.current=null,V.current=null,k.current=!1,oe(null),ae(!1),O(0),A.current=0},[ue]),z=a.useCallback(()=>{ue(),L.current=window.setTimeout(()=>{D.current!==null&&fe()},vn+32)},[ue,fe]),se=a.useCallback((ne,me)=>{var Ge;const Ie=((Ge=G.current)==null?void 0:Ge.width)??0;if(ue(),V.current=ne,oe(ne),k.current=!0,ae(!0),me){D.current=ne;const Ze=-ne*Ie;A.current=Ze,O(Ze),z();return}A.current=0,O(0),L.current=window.setTimeout(()=>{L.current=null,Se()},vn+32)},[ue,Se,z]),ye=a.useCallback(ne=>{if(!(t.length<=1)){if(k.current){if(D.current===ne){x.current=ne,fe();return}Se()}ue(),V.current=ne,oe(ne),k.current=!1,ae(!1),A.current=0,O(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(ne,!0)})})}},[t.length,se,fe,Se,ue]);W.current=ye;const ve=a.useCallback(ne=>{ne.propertyName!=="transform"||!k.current||D.current!==null&&fe()},[fe]),Me=a.useCallback(()=>{const ne=y.current;if(!ne)return;const me=Ds(ne);!me.width||!me.height||Y(me)},[]);a.useEffect(()=>{Me();const ne=y.current;if(!ne)return;const me=new ResizeObserver(()=>Me());return me.observe(ne),()=>me.disconnect()},[Me]),a.useEffect(()=>{B==="opening"&&M&&j("open")},[B,M]),a.useEffect(()=>{if(B!=="closing")return;const ne=setTimeout(()=>s(),vn);return()=>clearTimeout(ne)},[B,s]),a.useEffect(()=>()=>{ue()},[ue]),a.useLayoutEffect(()=>{ce.current===n&&X.current===(ee==null?void 0:ee.url)||(ue(),D.current=null,oe(null),S(0),O(0),ae(!1),xe(!1),te(!1),ge(null),m.current=0,b.current=0,I.current="none",R.current=!1,k.current=!1,A.current=0,V.current=null,h.current=null,T.current=!1,ce.current=n,X.current=ee==null?void 0:ee.url)},[n,ee==null?void 0:ee.url,ue]),a.useLayoutEffect(()=>{const ne=x.current;ne!==null&&(x.current=null,requestAnimationFrame(()=>{W.current(ne)}))},[n,ee==null?void 0:ee.url]),a.useEffect(()=>{if(B!=="open")return;let ne=null;const me=()=>{ne&&(document.removeEventListener("click",ne,!0),ne=null)},Ie=()=>{me(),ne=Je=>{Je.stopPropagation(),Je.preventDefault(),me()},document.addEventListener("click",ne,!0)},Ge=Je=>{const Ee=Je<0?1:-1;if(Math.abs(Je)>Yg&&t.length>1){se(Ee,!0);return}se(Ee,!1)},Ze=Je=>{if(Je.touches.length!==1||k.current)return;const Ee=Je.touches[0];T.current=!0,h.current={x:Ee.clientX,y:Ee.clientY},I.current="none",b.current=0,R.current=!1},Ve=Je=>{if(!h.current||Je.touches.length!==1||k.current)return;const Ee=Je.touches[0],qe=Ee.clientX-h.current.x,_e=Ee.clientY-h.current.y;if(I.current==="none"){if(Math.abs(qe)<10&&Math.abs(_e)<10)return;if(Math.abs(qe)>Math.abs(_e)){if(t.length<=1)return;I.current="horizontal"}else if(_e>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,te(!0),b.current=qe;const tt=qe<0?1:-1;V.current!==tt&&(V.current=tt,oe(tt)),A.current=qe,O(qe),Je.preventDefault();return}I.current==="vertical"&&(R.current=!0,te(!0),m.current=_e,S(_e),Je.preventDefault())},at=()=>{if(!h.current)return;const Je=I.current,Ee=R.current;if(Ee&&Je==="horizontal")Ge(b.current),Ie();else if(Ee&&Je==="vertical")if(m.current>Kg){const _e=window.innerHeight;m.current=_e,xe(!0),S(_e),j("closing")}else m.current=0,S(0),Ie();else Je==="horizontal"&&Math.abs(b.current)>0&&(Ge(b.current),Ie());h.current=null,I.current="none",b.current=0,R.current=!1,te(!1)};return document.addEventListener("touchstart",Ze,{passive:!0}),document.addEventListener("touchmove",Ve,{passive:!1}),document.addEventListener("touchend",at),document.addEventListener("touchcancel",at),()=>{document.removeEventListener("touchstart",Ze),document.removeEventListener("touchmove",Ve),document.removeEventListener("touchend",at),document.removeEventListener("touchcancel",at),me()}},[B,t.length,se]),a.useEffect(()=>{const ne=me=>{me.key==="Escape"&&(me.preventDefault(),me.stopPropagation(),B!=="closing"&&j("closing"))};return window.addEventListener("keydown",ne,!0),()=>window.removeEventListener("keydown",ne,!0)},[B]);const Te=()=>{B!=="closing"&&j("closing")},H=B==="open",he=B==="closing",re=ie>0?Math.max(0,1-ie/500):1,_=ie>0?Math.max(.35,1-ie/500):1,Q=M?p?M:ih(M,Fe):null,Ae=ne=>{if(ne.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const me=Q??ne.currentTarget.getBoundingClientRect(),Ie=ne.clientY-me.top,Ge=Math.min(52,me.height*.2);if(!(Ie>me.height-Ge)){if(ne.clientX-me.left<me.width/2){ye(-1);return}ye(1)}},de=ne=>{if(t.length<=1)return;const me=Q??ne.currentTarget.getBoundingClientRect(),Ie=ne.clientX-me.left,Ge=ne.clientY-me.top,Ze=Math.min(52,me.height*.2);if(Ge>me.height-Ze){ne.currentTarget.style.cursor="default";return}ne.currentTarget.style.cursor=Ie<me.width/2?"w-resize":"e-resize"},N={position:"fixed",top:F==null?void 0:F.top,left:F==null?void 0:F.left,width:F==null?void 0:F.width,height:F==null?void 0:F.height,zIndex:9998},Ue=p?"cover":"contain",Oe=E!==0||ie>0?`translate(${E}px, ${ie}px)`:void 0,dt=P&&!$?"none":$?`transform ${vn}ms ${Hn}`:K?`transform ${vn}ms ${Hn}, opacity ${vn}ms ${Hn}`:B==="opening"||he?`opacity ${vn}ms ${Hn}`:"none",nt={...N,transform:Oe,opacity:ie>0?_:B==="opening"||he?0:1,transition:dt,pointerEvents:"none"},ht={position:"absolute",top:((Q==null?void 0:Q.top)??0)-((F==null?void 0:F.top)??0),left:((Q==null?void 0:Q.left)??0)-((F==null?void 0:F.left)??0),width:Q==null?void 0:Q.width,height:Q==null?void 0:Q.height,objectFit:Ue,pointerEvents:Z&&H&&!Pe?"auto":"none",touchAction:Z&&H?"none":void 0},st=(F==null?void 0:F.width)??0,Be=$e?(n+le+t.length)%t.length:null,be=Be!==null?t[Be]:null,We={...N,transform:$e?`translateX(${le*st+E}px)`:void 0,opacity:1,transition:$?`transform ${vn}ms ${Hn}`:"none",pointerEvents:"none"},je={position:"absolute",top:((M==null?void 0:M.top)??0)-((F==null?void 0:F.top)??0),left:((M==null?void 0:M.left)??0)-((F==null?void 0:F.left)??0),width:M==null?void 0:M.width,height:M==null?void 0:M.height,objectFit:Ue,pointerEvents:"none"},Ke=Q?{position:"fixed",top:Q.top,height:Q.height,width:Q.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:B==="open"?"none":void 0},onClick:Te,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?re:0,transition:P?"none":`opacity ${vn}ms ${Hn}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,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:H?1:0,transition:`opacity ${vn}ms ${Hn}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.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:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${vn}ms ${Hn}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),M&&F&&be&&r.jsx("div",{style:We,onTransitionEnd:ve,children:gi(be)?r.jsx("video",{src:be.url,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Be}-${be.url}`):r.jsx("img",{src:be.url,alt:be.name,style:je},`neighbor-${Be}-${be.url}`)}),M&&F&&ee&&r.jsx("div",{style:nt,onTransitionEnd:ve,children:Z?r.jsx(oh,{src:ee.url,phase:B,mediaRef:g,mediaStyle:ht,onLoadedMetadata:ke,onClick:Ae,onMouseMove:de},`${n}-${ee.url}`):r.jsx("img",{ref:g,src:ee.url,alt:ee.name,onLoad:ke,style:ht},`${n}-${ee.url}`)}),H&&Ke&&t.length>1&&!Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ke,left:Q.left,cursor:"w-resize",pointerEvents:P?"none":"auto"},onClick:ne=>{if(T.current){T.current=!1;return}ne.stopPropagation(),ye(-1)}}),r.jsx("div",{style:{...Ke,left:Q.left+Q.width/2,cursor:"e-resize",pointerEvents:P?"none":"auto"},onClick:ne=>{if(T.current){T.current=!1;return}ne.stopPropagation(),ye(1)}})]})]})}function ah(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function sh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:l,layoutId:d,portalId:c}){const{prefix:u}=C.useScopedStyles(),{type:p="a",gridLayout:v,textBoxWidth:y=100,verticalGap:g,entriesCount:h,lightbox:m,imageDisplay:b,imageCorners:I,lightboxImageDisplay:R,slider:T,sliderTiming:G,direction:A,transition:V,titleMarginTop:k,subtitleMarginTop:L,titleColor:D,subtitleColor:x,lightboxCounterColor:W,titleFontFamily:M,titleFontSettings:Y,titleFontSize:F,titleLineHeight:U,titleLetterSpacing:B,titleWordSpacing:j,titleTextAppearance:ie,subtitleFontFamily:S,subtitleFontSettings:E,subtitleFontSize:O,subtitleLineHeight:le,subtitleLetterSpacing:oe,subtitleWordSpacing:$,subtitleTextAppearance:ae,lightboxCounterFontFamily:P,lightboxCounterFontSettings:te,lightboxCounterFontSize:K,lightboxCounterLineHeight:xe,lightboxCounterLetterSpacing:Fe,lightboxCounterWordSpacing:ge,lightboxCounterTextAppearance:ce,showText:X="always",alignEntries:ee="off",align:Z="top"}=e,Pe={fontSettings:{fontFamily:M,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:F??.01,lineHeight:U,letterSpacing:B??0,wordSpacing:j??0,textAppearance:ie,color:D},ke={...rn(Xt(Pe,n))},ue={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:O??.01,lineHeight:le,letterSpacing:oe??0,wordSpacing:$??0,textAppearance:ae,color:x},Se={...rn(Xt(ue,n))},z={fontSettings:{fontFamily:P,fontWeight:(te==null?void 0:te.fontWeight)??400,fontStyle:(te==null?void 0:te.fontStyle)??"normal"},fontSize:K??.01,lineHeight:xe,letterSpacing:Fe??0,wordSpacing:ge??0,textAppearance:ce,color:W},ye={...rn(Xt(z,n)),...Kr(K,xe,u,n)},ve=Xr(F,U,`${u}-item-title`,`${u}-text-tight-leading`),Me=Xr(O,le,`${u}-item-subtitle`,`${u}-text-tight-leading`),Te=Kr(F,U,u,n),H=Kr(O,le,u,n),he=Xr(K,xe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),re=C.buildColorVars(u,{titleColor:D,subtitleColor:x,lightboxCounterColor:W},lh,ch),Ae=`${l&&l!=="default"?`${u}-state-${l}`:""}${X==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),de=h===0?1/0:h,N=(t??[]).slice(0,de),Ue=a.useMemo(()=>m==="on"?eh(N):[],[N,m]),Oe=v.entryWidth??.2,dt=(b==null?void 0:b.display)==="cover",nt=(b==null?void 0:b.ratioValue)??"1:1",ht=(b==null?void 0:b.reversed)??!1,[st,Be]=nt.split(":").map(Number),je=`${ht?Be:st} / ${ht?st:Be}`,Ke=v.columnsCount,ne=C.scalingValue(Oe??0,n),me=ne,Ie=!dt&&T!=="off",Ge=N.length%Ke||Ke,Ze=Ge<Ke&&N.length>0,Ve=N.length-Ge,at=Ze?Math.floor((Ke-Ge)/2)+1:1,Je=I?C.scalingValue(I,n):void 0,Ee={width:me,...dt?{aspectRatio:je,height:"auto",overflow:"hidden"}:{height:"auto"},...Je?{borderRadius:Je,overflow:"hidden"}:{}},qe=`${u}-item-image-wrapper${Ie?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),_e=p==="d"||p==="e"||p==="f",tt=ee==="on",rt=`calc(${C.scalingValue(Oe??0,n)} * (${y} / 100))`,lt=C.scalingValue(Oe*y/100,n),Tt=dt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Je?{borderRadius:Je}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Je?{borderRadius:Je}:{}},[Ut,Zt]=a.useState(0),xt=a.useRef(null),wt=V==="fade"||A==="horizontal"?"ltr":A==="vertical"?"ttb":"ltr";a.useEffect(()=>{const mt=xt.current;if(!mt)return;const Le=new ResizeObserver(De=>{Zt(Math.round(De[0].contentRect.width))});return Le.observe(mt),()=>Le.disconnect()},[]);const jt=(()=>{const mt={...re},Le=xt.current?getComputedStyle(xt.current).getPropertyValue("--cntrl-article-width").trim():"";return Le&&(mt["--cntrl-article-width"]=Le),mt})(),[At,vt]=a.useState(!1),[Ft,_t]=a.useState([]),[Kt,Jt]=a.useState(0),Ct=m==="on"&&(!n||i),Ht=(mt,Le)=>{n&&!i||m!=="off"&&(_t(mt),Jt(Le),vt(!0))};a.useEffect(()=>{if(!At||m!=="on"||typeof document>"u")return;const mt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=mt}},[At,m]),a.useEffect(()=>{!n||i||vt(!1)},[n,i]);const on=a.useMemo(()=>Vg(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:on}}),m==="on"&&r.jsx(th,{mediaList:Ue}),r.jsx("div",{style:re,children:r.jsx("div",{ref:xt,className:`${u}-wrapper ${u}-type-${p}${tt?` ${u}-align-entries`:""} ${u}-image-align-${Z} ${Ae}`.trim(),style:{gridTemplateColumns:`repeat(${Ke}, ${ne})`,rowGap:tt?0:C.scalingValue(g??0,n),columnGap:C.scalingValue(v.horizontalGap??0,n),width:C.scalingValue(v.wrapperWidth??0,n),...tt?{[`--${u}-align-entries-row-gap`]:C.scalingValue(g??0,n)}:{}},children:N.map((mt,Le)=>{var Wt;const De=Ns(mt.title),it=Ns(mt.subtitle),gt=(((Wt=mt.link)==null?void 0:Wt.length)??0)>0&&m==="off"?mt.link:void 0,ft=Math.floor(Le/Ke)===Math.ceil(N.length/Ke)-1,It=Ze&&Le>=Ve?`${at+(Le-Ve)}`:void 0,pt=_e?r.jsxs("div",{className:`${u}-item-text-block`,children:[De&&r.jsx("p",{className:ve,style:{width:rt,...ke,...Te},children:mt.title}),De&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(k??0,n),width:lt}}),it&&r.jsx("p",{className:Me,style:{width:rt,...Se,...H},children:mt.subtitle}),it&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:lt}})]}):null,zt=tt?r.jsxs("div",{className:`${u}-item-title-row`,children:[!_e&&r.jsx("div",{"data-controls":o&&De?"titleMarginTop":void 0,className:o&&De?`${u}-control`:void 0,style:{height:De?C.scalingValue(k??0,n):0,width:lt}}),De&&r.jsx("p",{className:ve,style:{width:rt,...ke,...Te},children:mt.title}),_e&&De&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(k??0,n),width:lt}})]}):null,kt=tt?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!_e&&r.jsx("div",{"data-controls":o&&it?"subtitleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?C.scalingValue(L??0,n):0,width:lt}}),it&&r.jsx("p",{className:Me,style:{width:rt,...Se,...H},children:mt.subtitle}),_e&&it&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:lt}})]}):null,Pt=gt?r.jsxs("a",{href:gt,target:"_blank",className:`${u}-item-text-link`,children:[zt,kt]}):r.jsxs(r.Fragment,{children:[zt,kt]}),Vt=Cc(mt.gallery),Gt=Vt.filter(St=>St.lightboxMedia).map(St=>St.lightboxMedia),Nt=r.jsx("div",{className:qe,style:Ee,children:Vt.length===0?null:T==="off"?(()=>{const{displayMedia:St,lightboxMedia:w}=Vt[0],we=w?Gt.findIndex(Re=>Re.url===w.url):-1;return r.jsx(Os,{media:St,className:`${u}-item-${gi(St)?"video":"image"}`.trim(),style:Tt,onMediaClick:Ct&&we>=0?()=>Ht(Gt,we):void 0})})():r.jsxs(r.Fragment,{children:[Ie&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Vt.map(({displayMedia:St})=>gi(St)?r.jsx("video",{src:St.url,muted:!0,playsInline:!0},`sizer-${St.url}`):r.jsx("img",{src:St.url,alt:""},`sizer-${St.url}`))}),r.jsx(Qa,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:G*1e3,width:"100%",height:"100%",speed:Xg,type:V==="fade"?"fade":"loop",rewind:V==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:wt},onMoved:St=>{A!=="random"||V==="fade"||Ug(St)},children:Vt.map(({displayMedia:St,lightboxMedia:w},we)=>{const Re=w?Gt.findIndex(He=>He.url===w.url):-1;return r.jsx(es,{children:r.jsx(Os,{media:St,className:`${u}-item-${gi(St)?"video":"image"}`.trim(),style:Tt,onMediaClick:Ct&&Re>=0?()=>Ht(Gt,Re):void 0})},we)})},`${V}-${Oe}-${A}-${G}-${Ut}-${d}`)]})}),Ot=_e?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&De?"titleMarginTop":void 0,className:o&&De?`${u}-control`:void 0,style:{height:De?C.scalingValue(k??0,n):0,width:lt}}),r.jsx("p",{className:ve,style:{width:rt,...ke,...Te},children:mt.title}),r.jsx("div",{"data-controls":o&&it?"subtitleMarginTop":void 0,className:o&&it?`${u}-control`:void 0,style:{height:it?C.scalingValue(L??0,n):0,width:lt}}),r.jsx("p",{className:Me,style:{width:rt,...Se,...H},children:mt.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:It&&!tt?{gridColumn:It}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${tt&&ft?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${ne} * (${y} / 100))`:ne,...It&&tt?{gridColumn:It}:{}},children:tt?r.jsx(r.Fragment,{children:_e?r.jsxs(r.Fragment,{children:[Pt,r.jsx("a",{href:gt,target:"_blank",className:`${u}-item-image-link`,children:Nt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:gt,target:"_blank",className:`${u}-item-image-link`,children:Nt}),Pt]})}):gt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:gt,target:"_blank",className:`${u}-item-image-link`,children:[pt,Nt]}),!_e&&r.jsx("a",{href:gt,target:"_blank",className:`${u}-item-text-link`,children:Ot})]}):r.jsxs(r.Fragment,{children:[pt,Nt,Ot]})})},Le)})})}),(!n||i)&&At&&typeof document<"u"&&m==="on"&&(()=>{const mt=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:jt,"data-selection":"none",children:r.jsx(rh,{prefix:u,items:Ft,index:Kt,imageDisplay:ah(R),isEditor:n,onClose:()=>vt(!1),onPrev:()=>Jt(Le=>(Le-1+Ft.length)%Ft.length),onNext:()=>Jt(Le=>(Le+1)%Ft.length),counterClassName:he,counterStyle:ye})}),mt)})()]})}const lh={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},ch=["hover","focus","filled","success","error"],dh=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5137
5137
  import '@splidejs/react-splide/css/core';
5138
5138
  import { CommonComponentProps } from '../props';
5139
5139
  import {
@@ -7186,7 +7186,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7186
7186
  };
7187
7187
 
7188
7188
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7189
- `,Yr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uh=["titleColor","subtitleColor","lightboxCounterColor"],ph={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:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...Yr.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:{...Yr.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:{...Yr.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:"fit",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,imageCorners:0,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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,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,imageCorners:0,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","imageCorners","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","imageCorners"]},{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:[...uh],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},mh={element:sh,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:ph,sourceCode:dh},gh=50,js=10,ts="cntrl-lightbox-journal",Pr=ts,Ra=`${ts}-`,kr=e=>`${ts}-${e}`,ns=e=>e===Pr||e.startsWith(Ra),zs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Bs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=zs(t.get(kr(e)));if(i)return i}const n=zs(t.get(Pr));if(n)return n;for(const[i]of t){if(!i.startsWith(Ra))continue;const o=i.slice(Ra.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Vs=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Tc=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ns(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(kr(t),String(e)):i.searchParams.set(Pr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hh=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===kr(e)||i===Pr:ns(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)}},Lc=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(kr(e)):[...t.keys()].some(n=>ns(n))},fh=(e,t)=>{if(Lc(t)){if(e){window.history.back();return}hh(t)}},yh=20,vh=2,Zr=e=>`max(${e}, ${yh}px)`,Oi=e=>((e==null?void 0:e.image)??[]).slice(0,vh),Rc=e=>e.reduce((t,n)=>t+Oi(n).length,0),xh=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Oi(s).length,1),i=Oi(e[t]).length;return{start:n,end:n+i-1}},bh=(e,t)=>{const n=Rc(e),{start:i,end:o}=xh(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ar=(e,t)=>t==="B"?e.flatMap((n,i)=>Oi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Oi(n)})),wh=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return bh(i,o)},Gs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sh=(e,t,n)=>e==="B"?t.length>1:Rc(n)>1,gn=.004,Bn=.004,Fi={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Di=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},wo=(e,t)=>Di(e,t),ln=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Di(e.length,n),effective:wo(e.length,n)}},Ic=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Ec=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xn=["title1","title2","title3","count"],et=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,is={title1:"1",title2:"2",title3:"3",count:"Count"},os=e=>[et(e,"fontFamily"),et(e,"fontSettings"),{type:"row",items:[et(e,"fontSize"),et(e,"lineHeight"),et(e,"letterSpacing"),et(e,"wordSpacing")]},et(e,"textAlign"),et(e,"textAppearance")],$h=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xn.map(e=>[is[e],os(e)]))}),Ch={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Th={title1:.02,title2:.02,title3:.02,count:.017},ui=(e,t)=>{const n=i=>{const o=et(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[Ch[t]]}},pi=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Th[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function Mc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:y=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:m=0,iconMarginRight:b=0,closeIcon:I=null,closeIconMaxWidth:R=0,closeIconColor:T="#000000",closeIconHoverColor:q="#cccccc"}=n,A=C.scalingValue(m,i),G=C.scalingValue(b,i),k=C.scalingValue(g,i),L=h==="mobile",D=pi("title1",ui(n,"title1"),i),x=pi("title2",ui(n,"title2"),i),W=pi("title3",ui(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Fi.title1Width,title2Width:c??Fi.title2Width,title3Width:u??Fi.title3Width}),[d,c,u]),Y=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:y}),[v,y]),F=a.useMemo(()=>Vn(e,t,D,x,W),[e,t,D,x,W]),U=a.useMemo(()=>F.map(_=>M[_.widthKey]),[F,M]),V=a.useMemo(()=>Di(F.length,U),[F.length,U]),z=a.useMemo(()=>wo(F.length,U),[F.length,U]),ie=a.useMemo(()=>F.filter(_=>_.prefix==="title1"),[F]),S=a.useMemo(()=>F.filter(_=>_.prefix==="title2"||_.prefix==="title3"),[F]),E=a.useMemo(()=>Gn(ie,M),[ie,M]),O=a.useMemo(()=>Gn(S,M),[S,M]),le=!!(t.title1||t.title2||t.title3),oe=I!==null;if(!(le||oe))return null;const ae=(p??0)>0||o,P=(_,Q)=>{const Ae=F.findIndex(N=>N.prefix===_.prefix);if(!L||Q==="single-row")return{effectiveWidth:z[Ae]??0,resolvedWidth:V[Ae]??0,maxWidth:ln(Ae,V)};if(Q==="two-row-top"){const N=ie.findIndex(Ue=>Ue.prefix===_.prefix);return{effectiveWidth:E.effective[N]??0,resolvedWidth:E.resolved[N]??0,maxWidth:ln(N,E.resolved)}}const de=S.findIndex(N=>N.prefix===_.prefix);return{effectiveWidth:O.effective[de]??0,resolvedWidth:O.resolved[de]??0,maxWidth:ln(de,O.resolved)}},te=(_,Q,Ae)=>{if(!L||Ae==="single-row"){const dt=_.findIndex(Be=>Be.prefix===Q.prefix),nt=_.map(Be=>M[Be.widthKey]),ht=Di(_.length,nt);return{effectiveWidth:wo(_.length,nt)[dt]??0,resolvedWidth:ht[dt]??0,maxWidth:ln(dt,ht)}}if(Ae==="two-row-top"){const dt=_.filter(Be=>Be.prefix==="title1"),nt=dt.findIndex(Be=>Be.prefix===Q.prefix),{resolved:ht,effective:st}=Gn(dt,M);return{effectiveWidth:st[nt]??0,resolvedWidth:ht[nt]??0,maxWidth:ln(nt,ht)}}const de=_.filter(dt=>dt.prefix==="title2"||dt.prefix==="title3"),N=de.findIndex(dt=>dt.prefix===Q.prefix),{resolved:Ue,effective:Oe}=Gn(de,M);return{effectiveWidth:Oe[N]??0,resolvedWidth:Ue[N]??0,maxWidth:ln(N,Ue)}},K=_=>Ec(F,V,Y,_)+(L?0:p??0),xe=()=>L?0:p??0,Fe=_=>S.slice(0,_).reduce((Q,Ae,de)=>Q+(Ae.marginLeftKey?Y[Ae.marginLeftKey]??0:0)+(O.resolved[de]??0),0),ge=_=>{const Q=S[_];return Fe(_)+(Q.marginLeftKey?Y[Q.marginLeftKey]??0:0)+(O.resolved[_]??0)},ce=(_,Q,Ae)=>{const de=_.marginLeftKey?Y[_.marginLeftKey]??0:0,{effectiveWidth:N,resolvedWidth:Ue,maxWidth:Oe}=Ae??P(_,Q),dt=Math.max(de,Bn),nt=o&&Q==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":_.prefix,style:{width:C.scalingValue(N,i),...de>0?{marginLeft:C.scalingValue(de,i)}:{}},children:[r.jsx("p",{className:_.className,style:_.style,children:_.text}),nt&&_.marginLeftKey?r.jsx("div",{"data-controls":_.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(-de,i),width:C.scalingValue(dt,i),height:"100%",pointerEvents:"auto"}}):null,nt?r.jsx("div",{"data-controls":_.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Oe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:C.scalingValue(-gn/2,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},_.className)},X=(_="two-row")=>{const Q=F.findIndex(N=>N.prefix==="title1"),Ae=Q>=0?V[Q]:M.title1Width,de=_==="two-row"&&o;return r.jsx("div",{...de?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:C.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...de?{pointerEvents:"auto"}:{}}})},ee=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:D,"aria-hidden":"true",children:" "}),Z=_=>{const Q=Vn(e,_,D,x,W);return r.jsx(r.Fragment,{children:Q.map(Ae=>ce(Ae,"single-row",te(Q,Ae,"single-row")))})},Pe=_=>{const Q=Vn(e,_,D,x,W),Ae=Q.find(de=>de.prefix==="title1");return Ae?ce(Ae,"two-row-top",te(Q,Ae,"two-row-top")):null},$e=(_,Q=!1)=>{const Ae=Vn(e,_,D,x,W),de=Ae.filter(Oe=>Oe.prefix==="title2"||Oe.prefix==="title3"),N=o&&Q;return de.length>0||N||(g??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[de.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:de.map(Oe=>ce(Oe,"two-row-bottom",te(Ae,Oe,"two-row-bottom")))}),Q&&o?r.jsxs(r.Fragment,{children:[ve(),Me()]}):null]}):null,(g??0)>0||N?r.jsx("div",{"data-controls":N?"titleRowMarginBottom":void 0,"data-controls-axis":N?"y":void 0,"data-controls-reverse":N?"":void 0,className:N?`${e}-control`:void 0,style:{height:k,width:"100%",flexShrink:0,pointerEvents:N?"auto":"none"}}):null]}):null},ke=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(R??0,i),height:C.scalingValue(R??0,i),marginRight:G,"--close-icon-hover-color":q},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:_=>{_.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(an,{url:I??"",fill:T,hoverFill:i&&!s?T: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:G,height:"100%",pointerEvents:"auto"}})]}),ue=()=>oe?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:ke()}):null,fe=_=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:_})}),Se=_=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[oe||le?ee():null,ae?X("two-row"):null,fe(_),ue()]}),B=(_,Q=!1)=>r.jsxs(r.Fragment,{children:[Se(Pe(_)),$e(_,Q)]}),se=()=>{const _=L?-1:F.findIndex(de=>de.prefix==="title1"),Q=!L&&(o||(p??0)>0)?(()=>{const de=p??0,N=_>=0?V[_]:M.title1Width,Ue=Math.max(de,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(N),style:{position:"absolute",top:0,left:0,width:C.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=F.flatMap((de,N)=>{if(!de.marginLeftKey)return[];const Ue=Y[de.marginLeftKey]??0,Oe=Ic(F,V,Y,N)+xe(),dt=Math.max(Ue,Bn);return r.jsx("div",{"data-controls":de.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(V[N]),style:{position:"absolute",top:0,left:C.scalingValue(Oe,i),width:C.scalingValue(dt,i),height:"100%",pointerEvents:"auto"}},de.marginLeftKey)});return Q?[Q,...Ae]:Ae},ye=()=>F.map((_,Q)=>{const Ae=ln(Q,V),N=K(Q)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":_.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${_.widthKey}-junction`)}),ve=()=>S.flatMap((_,Q)=>{if(!_.marginLeftKey)return[];const Ae=Y[_.marginLeftKey]??0,de=Fe(Q),N=Math.max(Ae,Bn),{resolvedWidth:Ue}=P(_,"two-row-bottom");return r.jsx("div",{"data-controls":_.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(de,i),width:C.scalingValue(N,i),height:"100%",pointerEvents:"auto"}},_.marginLeftKey)}),Me=()=>S.map((_,Q)=>{const{maxWidth:Ae}=P(_,"two-row-bottom"),N=ge(Q)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":_.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${_.widthKey}-junction`)}),Te=()=>!o||L?null:r.jsxs(r.Fragment,{children:[se(),ye()]}),H=!!(t.title2||t.title3||(g??0)>0||o),he=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[oe||le?ee():null,ae?X("single-row"):null,le?fe(Z(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ue(),Te()]}),re=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...H?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:H?void 0:{flex:"0 0 auto",height:"auto"},children:B(t,!0)}),Te()]});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:A,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...L?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${L?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${L?` ${e}-text-bar-cell-stacked`:""}`,style:L?void 0:{flex:1,minWidth:0,width:"100%"},children:L?re():he()})})})]})}function Lh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rh(e){return`
7189
+ `,Yr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},uh=["titleColor","subtitleColor","lightboxCounterColor"],ph={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:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...Yr.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:{...Yr.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:{...Yr.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:"fit",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,imageCorners:0,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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,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,imageCorners:0,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","imageCorners","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","imageCorners"]},{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:[...uh],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},mh={element:sh,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:ph,sourceCode:dh},gh=50,js=10,ts="cntrl-lightbox-journal",Pr=ts,Ra=`${ts}-`,kr=e=>`${ts}-${e}`,ns=e=>e===Pr||e.startsWith(Ra),zs=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Bs=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=zs(t.get(kr(e)));if(i)return i}const n=zs(t.get(Pr));if(n)return n;for(const[i]of t){if(!i.startsWith(Ra))continue;const o=i.slice(Ra.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Vs=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Tc=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{ns(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(kr(t),String(e)):i.searchParams.set(Pr,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},hh=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===kr(e)||i===Pr:ns(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)}},Lc=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(kr(e)):[...t.keys()].some(n=>ns(n))},fh=(e,t)=>{if(Lc(t)){if(e){window.history.back();return}hh(t)}},yh=20,vh=2,Zr=e=>`max(${e}, ${yh}px)`,Oi=e=>((e==null?void 0:e.image)??[]).slice(0,vh),Rc=e=>e.reduce((t,n)=>t+Oi(n).length,0),xh=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+Oi(s).length,1),i=Oi(e[t]).length;return{start:n,end:n+i-1}},bh=(e,t)=>{const n=Rc(e),{start:i,end:o}=xh(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},ar=(e,t)=>t==="B"?e.flatMap((n,i)=>Oi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Oi(n)})),wh=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return bh(i,o)},Gs=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Sh=(e,t,n)=>e==="B"?t.length>1:Rc(n)>1,gn=.004,Bn=.004,Fi={title1Width:.13,title2Width:.13,title3Width:.14},Vn=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Di=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},wo=(e,t)=>Di(e,t),ln=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Gn=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Di(e.length,n),effective:wo(e.length,n)}},Ic=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Ec=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),Xn=["title1","title2","title3","count"],et=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,is={title1:"1",title2:"2",title3:"3",count:"Count"},os=e=>[et(e,"fontFamily"),et(e,"fontSettings"),{type:"row",items:[et(e,"fontSize"),et(e,"lineHeight"),et(e,"letterSpacing"),et(e,"wordSpacing")]},et(e,"textAlign"),et(e,"textAppearance")],$h=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xn.map(e=>[is[e],os(e)]))}),Ch={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},Th={title1:.02,title2:.02,title3:.02,count:.017},ui=(e,t)=>{const n=i=>{const o=et(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[Ch[t]]}},pi=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Th[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)};function Mc({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l}){const{title1Width:d,title2Width:c,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:v=0,title3MarginLeft:y=0,titleRowMarginBottom:g=0,titleHeaderLayout:h="desktop",contentMarginTop:m=0,iconMarginRight:b=0,closeIcon:I=null,closeIconMaxWidth:R=0,closeIconColor:T="#000000",closeIconHoverColor:G="#cccccc"}=n,A=C.scalingValue(m,i),V=C.scalingValue(b,i),k=C.scalingValue(g,i),L=h==="mobile",D=pi("title1",ui(n,"title1"),i),x=pi("title2",ui(n,"title2"),i),W=pi("title3",ui(n,"title3"),i),M=a.useMemo(()=>({title1Width:d??Fi.title1Width,title2Width:c??Fi.title2Width,title3Width:u??Fi.title3Width}),[d,c,u]),Y=a.useMemo(()=>({title2MarginLeft:v,title3MarginLeft:y}),[v,y]),F=a.useMemo(()=>Vn(e,t,D,x,W),[e,t,D,x,W]),U=a.useMemo(()=>F.map(_=>M[_.widthKey]),[F,M]),B=a.useMemo(()=>Di(F.length,U),[F.length,U]),j=a.useMemo(()=>wo(F.length,U),[F.length,U]),ie=a.useMemo(()=>F.filter(_=>_.prefix==="title1"),[F]),S=a.useMemo(()=>F.filter(_=>_.prefix==="title2"||_.prefix==="title3"),[F]),E=a.useMemo(()=>Gn(ie,M),[ie,M]),O=a.useMemo(()=>Gn(S,M),[S,M]),le=!!(t.title1||t.title2||t.title3),oe=I!==null;if(!(le||oe))return null;const ae=(p??0)>0||o,P=(_,Q)=>{const Ae=F.findIndex(N=>N.prefix===_.prefix);if(!L||Q==="single-row")return{effectiveWidth:j[Ae]??0,resolvedWidth:B[Ae]??0,maxWidth:ln(Ae,B)};if(Q==="two-row-top"){const N=ie.findIndex(Ue=>Ue.prefix===_.prefix);return{effectiveWidth:E.effective[N]??0,resolvedWidth:E.resolved[N]??0,maxWidth:ln(N,E.resolved)}}const de=S.findIndex(N=>N.prefix===_.prefix);return{effectiveWidth:O.effective[de]??0,resolvedWidth:O.resolved[de]??0,maxWidth:ln(de,O.resolved)}},te=(_,Q,Ae)=>{if(!L||Ae==="single-row"){const dt=_.findIndex(Be=>Be.prefix===Q.prefix),nt=_.map(Be=>M[Be.widthKey]),ht=Di(_.length,nt);return{effectiveWidth:wo(_.length,nt)[dt]??0,resolvedWidth:ht[dt]??0,maxWidth:ln(dt,ht)}}if(Ae==="two-row-top"){const dt=_.filter(Be=>Be.prefix==="title1"),nt=dt.findIndex(Be=>Be.prefix===Q.prefix),{resolved:ht,effective:st}=Gn(dt,M);return{effectiveWidth:st[nt]??0,resolvedWidth:ht[nt]??0,maxWidth:ln(nt,ht)}}const de=_.filter(dt=>dt.prefix==="title2"||dt.prefix==="title3"),N=de.findIndex(dt=>dt.prefix===Q.prefix),{resolved:Ue,effective:Oe}=Gn(de,M);return{effectiveWidth:Oe[N]??0,resolvedWidth:Ue[N]??0,maxWidth:ln(N,Ue)}},K=_=>Ec(F,B,Y,_)+(L?0:p??0),xe=()=>L?0:p??0,Fe=_=>S.slice(0,_).reduce((Q,Ae,de)=>Q+(Ae.marginLeftKey?Y[Ae.marginLeftKey]??0:0)+(O.resolved[de]??0),0),ge=_=>{const Q=S[_];return Fe(_)+(Q.marginLeftKey?Y[Q.marginLeftKey]??0:0)+(O.resolved[_]??0)},ce=(_,Q,Ae)=>{const de=_.marginLeftKey?Y[_.marginLeftKey]??0:0,{effectiveWidth:N,resolvedWidth:Ue,maxWidth:Oe}=Ae??P(_,Q),dt=Math.max(de,Bn),nt=o&&Q==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":_.prefix,style:{width:C.scalingValue(N,i),...de>0?{marginLeft:C.scalingValue(de,i)}:{}},children:[r.jsx("p",{className:_.className,style:_.style,children:_.text}),nt&&_.marginLeftKey?r.jsx("div",{"data-controls":_.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(-de,i),width:C.scalingValue(dt,i),height:"100%",pointerEvents:"auto"}}):null,nt?r.jsx("div",{"data-controls":_.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Oe),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:C.scalingValue(-gn/2,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}}):null]},_.className)},X=(_="two-row")=>{const Q=F.findIndex(N=>N.prefix==="title1"),Ae=Q>=0?B[Q]:M.title1Width,de=_==="two-row"&&o;return r.jsx("div",{...de?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ae)}:{},style:{width:C.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...de?{pointerEvents:"auto"}:{}}})},ee=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:D,"aria-hidden":"true",children:" "}),Z=_=>{const Q=Vn(e,_,D,x,W);return r.jsx(r.Fragment,{children:Q.map(Ae=>ce(Ae,"single-row",te(Q,Ae,"single-row")))})},Pe=_=>{const Q=Vn(e,_,D,x,W),Ae=Q.find(de=>de.prefix==="title1");return Ae?ce(Ae,"two-row-top",te(Q,Ae,"two-row-top")):null},$e=(_,Q=!1)=>{const Ae=Vn(e,_,D,x,W),de=Ae.filter(Oe=>Oe.prefix==="title2"||Oe.prefix==="title3"),N=o&&Q;return de.length>0||N||(g??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[de.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:de.map(Oe=>ce(Oe,"two-row-bottom",te(Ae,Oe,"two-row-bottom")))}),Q&&o?r.jsxs(r.Fragment,{children:[ve(),Me()]}):null]}):null,(g??0)>0||N?r.jsx("div",{"data-controls":N?"titleRowMarginBottom":void 0,"data-controls-axis":N?"y":void 0,"data-controls-reverse":N?"":void 0,className:N?`${e}-control`:void 0,style:{height:k,width:"100%",flexShrink:0,pointerEvents:N?"auto":"none"}}):null]}):null},ke=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(R??0,i),height:C.scalingValue(R??0,i),marginRight:V,"--close-icon-hover-color":G},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:_=>{_.stopPropagation(),l==null||l()},"aria-label":"Close",children:r.jsx(an,{url:I??"",fill:T,hoverFill:i&&!s?T:G,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:V,height:"100%",pointerEvents:"auto"}})]}),ue=()=>oe?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:ke()}):null,fe=_=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:_})}),Se=_=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[oe||le?ee():null,ae?X("two-row"):null,fe(_),ue()]}),z=(_,Q=!1)=>r.jsxs(r.Fragment,{children:[Se(Pe(_)),$e(_,Q)]}),se=()=>{const _=L?-1:F.findIndex(de=>de.prefix==="title1"),Q=!L&&(o||(p??0)>0)?(()=>{const de=p??0,N=_>=0?B[_]:M.title1Width,Ue=Math.max(de,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(N),style:{position:"absolute",top:0,left:0,width:C.scalingValue(Ue,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Ae=F.flatMap((de,N)=>{if(!de.marginLeftKey)return[];const Ue=Y[de.marginLeftKey]??0,Oe=Ic(F,B,Y,N)+xe(),dt=Math.max(Ue,Bn);return r.jsx("div",{"data-controls":de.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(B[N]),style:{position:"absolute",top:0,left:C.scalingValue(Oe,i),width:C.scalingValue(dt,i),height:"100%",pointerEvents:"auto"}},de.marginLeftKey)});return Q?[Q,...Ae]:Ae},ye=()=>F.map((_,Q)=>{const Ae=ln(Q,B),N=K(Q)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":_.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${_.widthKey}-junction`)}),ve=()=>S.flatMap((_,Q)=>{if(!_.marginLeftKey)return[];const Ae=Y[_.marginLeftKey]??0,de=Fe(Q),N=Math.max(Ae,Bn),{resolvedWidth:Ue}=P(_,"two-row-bottom");return r.jsx("div",{"data-controls":_.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(de,i),width:C.scalingValue(N,i),height:"100%",pointerEvents:"auto"}},_.marginLeftKey)}),Me=()=>S.map((_,Q)=>{const{maxWidth:Ae}=P(_,"two-row-bottom"),N=ge(Q)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":_.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:C.scalingValue(N,i),width:C.scalingValue(gn,i),height:"100%",pointerEvents:"auto"}})},`${_.widthKey}-junction`)}),Te=()=>!o||L?null:r.jsxs(r.Fragment,{children:[se(),ye()]}),H=!!(t.title2||t.title3||(g??0)>0||o),he=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[oe||le?ee():null,ae?X("single-row"):null,le?fe(Z(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),ue(),Te()]}),re=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...H?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:H?void 0:{flex:"0 0 auto",height:"auto"},children:z(t,!0)}),Te()]});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:A,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...L?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${L?` ${e}-lightbox-content-area-stacked`:""}`,children:r.jsx("div",{className:`${e}-text-bar-cell${L?` ${e}-text-bar-cell-stacked`:""}`,style:L?void 0:{flex:1,minWidth:0,width:"100%"},children:L?re():he()})})})]})}function Lh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rh(e){return`
7190
7190
  .${e}-wrapper {
7191
7191
  display: grid;
7192
7192
  align-items: start;
@@ -7506,7 +7506,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7506
7506
  pointer-events: auto;
7507
7507
  flex-shrink: 0;
7508
7508
  }
7509
- `}const qs={url:"",name:"",objectFit:"cover"},$n=500,to=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Ih=72,Eh=50,Mh=1e4,Ph=650,kh=500;function Ah(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Pc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Fh(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Pc(i,n):null}function Wh(e){return e.reduce((t,n,i)=>{const o=rs(n.gallery),l=as(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ao(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 Us(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ao(e,i,n)}const _h=.03;function kc(e){return e.width*_h}const Jr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Go(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Xs(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Hh(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ia(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Nh(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ia(e,t.width,t.height)}function Oh(e,t){if(Ji(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 Dh(e){const t=new Set,n=[];for(const i of e){const o=rs(i.gallery),s=as(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function jh({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=>Ji(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 ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function hr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function zh(e,t,n){const{left:i,width:o}=n,s=kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Ac(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=hr(e,"left",i),d=hr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Bh(e,t,n,i){const{start:o,end:s}=Ac(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Vh(e,t,n){const i=ji(e,t,n),o=hr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Fc(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 rs(e){if(!e)return;if(Fc(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??qs,i??o??qs]}]}function Gh(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function qh(e){const[t]=e.media;return t!=null&&t.url?t:null}function as(e){if(!Array.isArray(e)||e.length===0)return[];if(Fc(e)){const t=[];for(const n of e){const i=Gh(n);if(!i)continue;const o=qh(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 Ji(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Uh({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Ji(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 Xh({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){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:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ji(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Kh({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),q=a.useRef(new Map),[A,G]=a.useState(0),k=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),V=a.useRef(null),z=a.useRef(()=>{}),ie=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[le,oe]=a.useState(null),[$,ae]=a.useState(Jr),[P,te]=a.useState(0),[K,xe]=a.useState("opening"),[Fe,ge]=a.useState(0),[ce,X]=a.useState(0),[ee,Z]=a.useState(!1),[Pe,$e]=a.useState(null),[ke,ue]=a.useState(null),[fe,Se]=a.useState(null),[B,se]=a.useState(!1),[ye,ve]=a.useState(null),[Me,Te]=a.useState(!1),H=a.useRef(!1),[he,re]=a.useState(!1),[_,Q]=a.useState(!1),Ae=a.useRef(n),de=a.useRef(void 0),N=t[n],Ue=N?Ji(N):!1,Oe=ce!==0||ee,dt=!l&&(!s||!!d),nt=c&&!l,ht=u.length>1,st=a.useCallback((w,we)=>t.length<=1?null:t[(w+we+t.length)%t.length]??null,[t]),Be=ht?ao(u,p,-1):st(n,-1),be=ht?ao(u,p,1):st(n,1),We=Pe===-1&&Oe?ht&&ke!==null?ao(u,ke,-1):fe!==null?st(fe,-1):null:null,je=Pe===1&&Oe?ht&&ke!==null?ao(u,ke,1):fe!==null?st(fe,1):null:null,Ke=We&&We.url!==(Be==null?void 0:Be.url)?We:null,ne=je&&je.url!==(be==null?void 0:be.url)?je:null,me=Be&&nt?(()=>{const w=ht?Us(u,p,-1):t.length>2?st((n-1+t.length)%t.length,-1):null;return w&&w.url!==Be.url?w:null})():null,Ie=be&&nt?(()=>{const w=ht?Us(u,p,1):t.length>2?st((n+1)%t.length,1):null;return w&&w.url!==be.url?w:null})():null,Ge=Ke??me,Ze=ne??Ie,Ve=a.useCallback((w,we,Re)=>{if(!w||!we||!Re)return;const He=q.current,ot=He.get(w);(ot==null?void 0:ot.width)===we&&(ot==null?void 0:ot.height)===Re||(He.set(w,{width:we,height:Re}),G(Mt=>Mt+1))},[]),at=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const we=q.current.get(w.url);return Nh(R.current,we)},[A,P]),Je=a.useCallback(()=>{if(!N)return;const w=at(N);if(w){oe(w);return}const we=R.current;we&&oe(Xs(we))},[N,at]),Ee=a.useCallback(w=>{if(ht){const we=u.length;ue((p+w+we)%we),Se(null);return}t.length>1&&(Se((n+w+t.length)%t.length),ue(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),_e=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),tt=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{_e(),qe(!1)},to+32)},[_e,qe]),rt=a.useCallback(()=>{const w=I.current;if(!w){ae({left:0,top:0,width:typeof window<"u"?window.innerWidth:Jr.width,height:typeof window<"u"?window.innerHeight:Jr.height});return}const we=w.getBoundingClientRect();ae({left:we.left,top:we.top,width:we.width,height:we.height})},[]),lt=a.useCallback((w,we)=>{if(Oe){if(he&&!ee)return`translate(${ce}px, 0px)`;if(ee&&Pe!==null){const Re=at(w);if(!Re)return;const{x:He,y:ot}=Bh(Re,we,Pe,$);return`translate(${He}px, ${ot}px)`}if(ee)return"translate(0px, 0px)"}},[Oe,he,ee,ce,Pe,$,at]),Tt=a.useCallback(()=>{const w=U.current;U.current=null,_e(),qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[_e,qe,m,b]),Ut=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{U.current!==null&&Tt()},to+32)},[_e,Tt]),Zt=a.useCallback(()=>{_e(),U.current=null,qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none"},[_e,qe]),xt=a.useCallback(w=>{if(!(!nt||!le)){if(Y.current){if(U.current===w){V.current=w,Tt();return}Zt()}_e(),Ee(w),U.current=w,$e(w),qe(!0),Ut()}},[nt,le,Tt,Zt,_e,Ee,qe,Ut]);z.current=xt;const wt=a.useCallback(()=>{ie.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),jt=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const we=O.current?kh:Ph;S.current=window.setInterval(()=>{z.current(w)},we)},[]),At=a.useCallback(w=>{ie.current!==w&&(wt(),ie.current=w,O.current=!1,z.current(w),jt(w),E.current=window.setTimeout(()=>{E.current=null,ie.current===w&&(O.current=!0,jt(w))},Mh))},[wt,jt]),vt=a.useCallback(()=>{const w=R.current;if(!w)return;const we=N==null?void 0:N.url,Re=we?q.current.get(we):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){oe(Ia(w,Re.width,Re.height));return}const He=T.current;if(He&&we&&(He.src===we||He.currentSrc===we)){const{width:Mt,height:Qe}=Hh(He);if(Mt&&Qe){Ve(we,Mt,Qe),oe(Ia(w,Mt,Qe));return}}const ot=Xs(w);!ot.width||!ot.height||oe(ot)},[N==null?void 0:N.url,Ve]),Ft=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&vt();return}w.complete&&w.naturalWidth>0&&vt()}},[vt]),_t=a.useCallback(()=>{rt(),vt(),te(w=>w+1)},[rt,vt]);a.useEffect(()=>{_t();const w=R.current,we=I.current,Re=new ResizeObserver(()=>_t());return w&&Re.observe(w),we&&Re.observe(we),window.addEventListener("resize",_t),()=>{Re.disconnect(),window.removeEventListener("resize",_t)}},[_t,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){vt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&vt()}},[N==null?void 0:N.url,n,vt]),a.useEffect(()=>{Je()},[Je,A]),a.useEffect(()=>{const w=new Set,we=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),we.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),we.forEach(He=>{q.current.has(He.url)||Oh(He,Ve)})},[t,u,Ve]),a.useEffect(()=>{if(K!=="opening"||!le)return;if(!y){xe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),xe("open")})});return()=>cancelAnimationFrame(w)},[K,le,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),$n);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{_e()},[_e]),a.useLayoutEffect(()=>{Ae.current===n&&de.current===(N==null?void 0:N.url)||(_e(),U.current=null,$e(null),ue(null),Se(null),ge(0),X(0),qe(!1),Q(!1),re(!1),L.current=0,D.current=0,x.current="none",W.current=!1,k.current=null,M.current=!1,T.current=null,Je(),Ae.current=n,de.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,_e,Je]),a.useLayoutEffect(()=>{const w=V.current;w!==null&&(V.current=null,requestAnimationFrame(()=>{z.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){H.current=!1,Te(!1);return}if(K!=="open"||H.current)return;if(!Be&&!be){H.current=!0;return}Te(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Te(!0),H.current=!0})});return()=>cancelAnimationFrame(w)},[K,Be==null?void 0:Be.url,be==null?void 0:be.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const Qe=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",Qe,!0)};document.addEventListener("click",Qe,!0)},we=Qe=>{const yt=Qe<0?1:-1;_e(),Ee(yt),U.current=yt,$e(yt),qe(!0),Ut()},Re=Qe=>{if(Math.abs(Qe)>Eh&&nt){we(Qe);return}U.current=null,$e(null),ue(null),Se(null),qe(!0),X(0),tt()},He=Qe=>{if(Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0];M.current=!0,k.current={x:yt.clientX,y:yt.clientY},x.current="none",D.current=0,W.current=!1},ot=Qe=>{if(!k.current||Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0],Dt=yt.clientX-k.current.x,Lt=yt.clientY-k.current.y;if(x.current==="none"){if(Math.abs(Dt)<10&&Math.abs(Lt)<10)return;if(Math.abs(Dt)>Math.abs(Lt)){if(!nt)return;x.current="horizontal"}else if(Lt>0){if(!dt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,re(!0),D.current=Dt,X(Dt),Qe.preventDefault();return}x.current==="vertical"&&(W.current=!0,re(!0),L.current=Lt,ge(Lt),Qe.preventDefault())},Mt=()=>{if(!k.current)return;const Qe=x.current,yt=W.current;if(yt&&Qe==="horizontal")Re(D.current),w();else if(yt&&Qe==="vertical"){const Dt=L.current;if(dt&&Dt>Ih){const Lt=window.innerHeight;L.current=Lt,Q(!0),ge(Lt),xe("closing")}else L.current=0,ge(0);w()}else Qe==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());k.current=null,x.current="none",D.current=0,W.current=!1,re(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,nt,qe,tt,_e,dt,Ut,Ee]);const Kt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&le&&(ve(w),se(!0)),xe("closing")},[g,y,le]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;wt(),Kt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!nt)return;He.preventDefault();const ot=He.key==="ArrowLeft"?-1:1;He.repeat&&ie.current===ot||At(ot)},we=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const ot=He.key==="ArrowLeft"?-1:1;ie.current===ot&&wt()},Re=()=>{wt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",we),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",we),window.removeEventListener("blur",Re),wt()}},[K,s,d,Kt,nt,At,wt]),a.useEffect(()=>{K!=="open"&&wt()},[K,wt]);const Jt=()=>{K==="closing"||l||Kt()},Ct=K==="open",Ht=K==="closing",on=Fe>0?Math.max(0,1-Fe/500):1,mt=Fe>0?Math.max(.35,1-Fe/500):1,Le=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(U.current!==null){Tt();return}_e(),qe(!1)}},[_e,qe,Tt]),De=K==="closing"?ye??y:y,it=De&&le&&(K==="opening"||Ht)?Ah(De,le):void 0,gt=Oe&&N?lt(N,"center"):Fe>0?`translateY(${Fe}px)`:it,ft=le?Go(le,$):null,It=!!(De&&le),pt=It&&(K==="closing"||K==="open"&&B),zt={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:gt,opacity:Fe>0?mt:It?1:K==="opening"||Ht?0:1,transition:he&&!ee?"none":ee?`transform ${to}ms ${un}`:_?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:pt?`transform ${$n}ms ${un}`:K==="opening"||Ht?`opacity ${$n}ms ${un}`:"none",pointerEvents:Ue&&Ct&&!Oe?"auto":"none",touchAction:Ue&&Ct?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Oe?"auto":"none"},Pt=(w,we,Re="adjacent")=>{const He=at(w);if(!He)return{display:"none"};const ot=Re==="far"?we==="left"?"far-left":"far-right":we==="left"?"left-adjacent":"right-adjacent",{start:Mt}=Pe!==null?Ac(He,ot,Pe,$):{start:Re==="far"?hr(He,we,$):ji(He,we,$)},Qe=Go(Mt,$),yt=lt(w,ot),Dt=!Oe&&Re==="adjacent"&&Ct&&!Me?Vh(He,we,$):null,Lt=Re==="far"&&Oe&&Pe===(we==="left"?-1:1),nn=he&&!ee?!1:ee,dn=Re==="adjacent"&&Ct&&Me&&!Oe;return{position:"absolute",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,objectFit:"contain",transform:yt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:Re==="far"?Ct&&Lt?1:0:Ct?1:0,transition:nn?Re==="far"?`transform ${to}ms ${un}`:`transform ${to}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:K==="opening"||Ht?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Vt=(w,we)=>{const Re=at(w);return Re?zh(ji(Re,we,$),we,$):null},Gt=w=>we=>{if(!l){if(M.current){M.current=!1;return}we.stopPropagation(),xt(w)}},Nt=Be?Vt(Be,"left"):null,Ot=be?Vt(be,"right"):null,Wt=Nt?Go(Nt,$):null,St=Ot?Go(Ot,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:Jt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?on:0,transition:he?"none":`opacity ${$n}ms ${un}`,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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:he?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Ct&&Ge&&r.jsx(qo,{media:Ge,style:Pt(Ge,"left","far"),onMeasure:Ve,onTransitionEnd:Le},`far-prev-${Ge.url}`),Ct&&Be&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:Be,style:Pt(Be,"left"),onMeasure:Ve,onTransitionEnd:Le},`prev-${Be.url}`),Wt&&r.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Ct&&be&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:be,style:Pt(be,"right"),onMeasure:Ve,onTransitionEnd:Le},`next-${be.url}`),St&&r.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Ct&&Ze&&r.jsx(qo,{media:Ze,style:Pt(Ze,"right","far"),onMeasure:Ve,onTransitionEnd:Le},`far-next-${Ze.url}`),le&&N&&(Ue?r.jsx(Xh,{src:N.url,phase:K,onMediaElement:Ft,wrapperStyle:zt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Le},`${n}-${N.url}`):r.jsx("img",{ref:Ft,src:N.url,alt:N.name,onLoad:vt,onTransitionEnd:Le,style:zt},`${n}-${N.url}`))]})}function Yh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,y=(v==null?void 0:v.display)==="cover",g=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[m,b]=g.split(":").map(Number),T=`${h?b:m} / ${h?m:b}`,q=c.entryWidth??.2,A=c.columnsCount,G=C.scalingValue(q,n),k=C.scalingValue(c.horizontalGap??0,n),L=G,D=G,x={width:L,...y?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},W=y?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[Y,F]=a.useState(!1),[U,V]=a.useState([]),[z,ie]=a.useState(0),[S,E]=a.useState(0),[O,le]=a.useState(null),[oe,$]=a.useState({title1:"",title2:"",title3:""}),ae=(()=>{const fe={},Se=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(fe["--cntrl-article-width"]=Se),fe})(),P=!n||i||o,te=a.useMemo(()=>Rh(d),[d]),K=t??[],xe=K.length%A||A,Fe=xe<A&&K.length>0,ge=K.length-xe,ce=Fe?Math.floor((A-xe)/2)+1:1,X=a.useMemo(()=>Wh(K),[K]),ee=a.useMemo(()=>Dh(K),[K]),Z=(fe,Se,B)=>{if(n&&!o&&!i)return;const se=X.findIndex(ve=>ve.gridIndex===fe);if(se<0)return;const ye=X[se];E(se),V(ye.items),ie(Se),$(ye.entry),le(B??null),F(!0)},Pe=a.useCallback(()=>{F(!1),le(null)},[]),$e=a.useCallback(()=>{const fe=X[S];return!fe||!M.current?O:Fh(M.current,fe.gridIndex,y?"cover":"contain")??O},[X,S,O,y]),ke=a.useCallback(fe=>{if(X.length>1){const Se=X.length,B=(S+fe+Se)%Se,se=X[B],ye=Math.min(z,se.items.length-1);E(B),V(se.items),ie(ye),$(se.entry);return}ie(Se=>(Se+fe+U.length)%U.length)},[X,S,z,U.length]),ue=X.length>1||U.length>1;return a.useEffect(()=>{if(!Y||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[Y]),a.useEffect(()=>{!n||o||i||F(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:te}}),r.jsx(jh,{mediaList:ee}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${A}, ${G})`,rowGap:0,columnGap:k,width:C.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:C.scalingValue(u??0,n)},children:K.map((fe,Se)=>{const B=rs(fe.gallery),se=as(B),ye=se.filter(re=>re.lightboxMedia).map(re=>re.lightboxMedia),ve=Math.floor(Se/A)===Math.ceil(K.length/A)-1,Me=Fe&&Se>=ge?`${ce+(Se-ge)}`:void 0,Te=se[0],H=Te!=null&&Te.lightboxMedia?ye.findIndex(re=>re.url===Te.lightboxMedia.url):-1,he=r.jsx("div",{className:`${d}-item-image-wrapper`,style:x,children:se.length>0&&r.jsx(Uh,{media:Te.displayMedia,gridIndex:Se,className:`${d}-item-${Ji(Te.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:P&&H>=0?re=>Z(Se,H,Pc(re.currentTarget,y?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,ve?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:G,...Me?{gridColumn:Me}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:D}})}),r.jsx("a",{className:`${d}-item-image-link`,children:he}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:D}})})]})},Se)})}),Y&&typeof document<"u"&&(()=>{const fe=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:ae,"data-selection":"none",children:r.jsx(Kh,{prefix:d,items:U,index:z,entry:oe,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ue,lightboxEntries:X,entryIdx:S,layoutId:s,sourceRect:O,resolveCloseSourceRect:$e,onClose:Pe,onPrev:()=>ke(-1),onNext:()=>ke(1)})}),fe)})()]})}const Zh=`import { CommonComponentProps } from '../props';
7509
+ `}const qs={url:"",name:"",objectFit:"cover"},$n=500,to=650,un="cubic-bezier(0.22, 1, 0.36, 1)",Ih=72,Eh=50,Mh=1e4,Ph=650,kh=500;function Ah(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Pc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Fh(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?Pc(i,n):null}function Wh(e){return e.reduce((t,n,i)=>{const o=rs(n.gallery),l=as(o).filter(d=>d.lightboxMedia).map(d=>d.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ao(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 Us(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ao(e,i,n)}const _h=.03;function kc(e){return e.width*_h}const Jr={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Go(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Xs(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Hh(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Ia(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function Nh(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Ia(e,t.width,t.height)}function Oh(e,t){if(Ji(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 Dh(e){const t=new Set,n=[];for(const i of e){const o=rs(i.gallery),s=as(o);for(const l of s)for(const d of[l.displayMedia,l.lightboxMedia])d!=null&&d.url&&!t.has(d.url)&&(t.add(d.url),n.push(d))}return n}function jh({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=>Ji(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 ji(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function hr(e,t,n){const i=ji(e,t,n);return{...i,left:2*i.left-e.left}}function zh(e,t,n){const{left:i,width:o}=n,s=kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Ac(e,t,n,i){const o=ji(e,"left",i),s=ji(e,"right",i),l=hr(e,"left",i),d=hr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Bh(e,t,n,i){const{start:o,end:s}=Ac(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function Vh(e,t,n){const i=ji(e,t,n),o=hr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Fc(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 rs(e){if(!e)return;if(Fc(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??qs,i??o??qs]}]}function Gh(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function qh(e){const[t]=e.media;return t!=null&&t.url?t:null}function as(e){if(!Array.isArray(e)||e.length===0)return[];if(Fc(e)){const t=[];for(const n of e){const i=Gh(n);if(!i)continue;const o=qh(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 Ji(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Uh({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Ji(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 Xh({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){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:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Ji(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function Kh({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),G=a.useRef(new Map),[A,V]=a.useState(0),k=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),B=a.useRef(null),j=a.useRef(()=>{}),ie=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[le,oe]=a.useState(null),[$,ae]=a.useState(Jr),[P,te]=a.useState(0),[K,xe]=a.useState("opening"),[Fe,ge]=a.useState(0),[ce,X]=a.useState(0),[ee,Z]=a.useState(!1),[Pe,$e]=a.useState(null),[ke,ue]=a.useState(null),[fe,Se]=a.useState(null),[z,se]=a.useState(!1),[ye,ve]=a.useState(null),[Me,Te]=a.useState(!1),H=a.useRef(!1),[he,re]=a.useState(!1),[_,Q]=a.useState(!1),Ae=a.useRef(n),de=a.useRef(void 0),N=t[n],Ue=N?Ji(N):!1,Oe=ce!==0||ee,dt=!l&&(!s||!!d),nt=c&&!l,ht=u.length>1,st=a.useCallback((w,we)=>t.length<=1?null:t[(w+we+t.length)%t.length]??null,[t]),Be=ht?ao(u,p,-1):st(n,-1),be=ht?ao(u,p,1):st(n,1),We=Pe===-1&&Oe?ht&&ke!==null?ao(u,ke,-1):fe!==null?st(fe,-1):null:null,je=Pe===1&&Oe?ht&&ke!==null?ao(u,ke,1):fe!==null?st(fe,1):null:null,Ke=We&&We.url!==(Be==null?void 0:Be.url)?We:null,ne=je&&je.url!==(be==null?void 0:be.url)?je:null,me=Be&&nt?(()=>{const w=ht?Us(u,p,-1):t.length>2?st((n-1+t.length)%t.length,-1):null;return w&&w.url!==Be.url?w:null})():null,Ie=be&&nt?(()=>{const w=ht?Us(u,p,1):t.length>2?st((n+1)%t.length,1):null;return w&&w.url!==be.url?w:null})():null,Ge=Ke??me,Ze=ne??Ie,Ve=a.useCallback((w,we,Re)=>{if(!w||!we||!Re)return;const He=G.current,ot=He.get(w);(ot==null?void 0:ot.width)===we&&(ot==null?void 0:ot.height)===Re||(He.set(w,{width:we,height:Re}),V(Mt=>Mt+1))},[]),at=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const we=G.current.get(w.url);return Nh(R.current,we)},[A,P]),Je=a.useCallback(()=>{if(!N)return;const w=at(N);if(w){oe(w);return}const we=R.current;we&&oe(Xs(we))},[N,at]),Ee=a.useCallback(w=>{if(ht){const we=u.length;ue((p+w+we)%we),Se(null);return}t.length>1&&(Se((n+w+t.length)%t.length),ue(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),_e=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),tt=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{_e(),qe(!1)},to+32)},[_e,qe]),rt=a.useCallback(()=>{const w=I.current;if(!w){ae({left:0,top:0,width:typeof window<"u"?window.innerWidth:Jr.width,height:typeof window<"u"?window.innerHeight:Jr.height});return}const we=w.getBoundingClientRect();ae({left:we.left,top:we.top,width:we.width,height:we.height})},[]),lt=a.useCallback((w,we)=>{if(Oe){if(he&&!ee)return`translate(${ce}px, 0px)`;if(ee&&Pe!==null){const Re=at(w);if(!Re)return;const{x:He,y:ot}=Bh(Re,we,Pe,$);return`translate(${He}px, ${ot}px)`}if(ee)return"translate(0px, 0px)"}},[Oe,he,ee,ce,Pe,$,at]),Tt=a.useCallback(()=>{const w=U.current;U.current=null,_e(),qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[_e,qe,m,b]),Ut=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{U.current!==null&&Tt()},to+32)},[_e,Tt]),Zt=a.useCallback(()=>{_e(),U.current=null,qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none"},[_e,qe]),xt=a.useCallback(w=>{if(!(!nt||!le)){if(Y.current){if(U.current===w){B.current=w,Tt();return}Zt()}_e(),Ee(w),U.current=w,$e(w),qe(!0),Ut()}},[nt,le,Tt,Zt,_e,Ee,qe,Ut]);j.current=xt;const wt=a.useCallback(()=>{ie.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),jt=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const we=O.current?kh:Ph;S.current=window.setInterval(()=>{j.current(w)},we)},[]),At=a.useCallback(w=>{ie.current!==w&&(wt(),ie.current=w,O.current=!1,j.current(w),jt(w),E.current=window.setTimeout(()=>{E.current=null,ie.current===w&&(O.current=!0,jt(w))},Mh))},[wt,jt]),vt=a.useCallback(()=>{const w=R.current;if(!w)return;const we=N==null?void 0:N.url,Re=we?G.current.get(we):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){oe(Ia(w,Re.width,Re.height));return}const He=T.current;if(He&&we&&(He.src===we||He.currentSrc===we)){const{width:Mt,height:Qe}=Hh(He);if(Mt&&Qe){Ve(we,Mt,Qe),oe(Ia(w,Mt,Qe));return}}const ot=Xs(w);!ot.width||!ot.height||oe(ot)},[N==null?void 0:N.url,Ve]),Ft=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&vt();return}w.complete&&w.naturalWidth>0&&vt()}},[vt]),_t=a.useCallback(()=>{rt(),vt(),te(w=>w+1)},[rt,vt]);a.useEffect(()=>{_t();const w=R.current,we=I.current,Re=new ResizeObserver(()=>_t());return w&&Re.observe(w),we&&Re.observe(we),window.addEventListener("resize",_t),()=>{Re.disconnect(),window.removeEventListener("resize",_t)}},[_t,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){vt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&vt()}},[N==null?void 0:N.url,n,vt]),a.useEffect(()=>{Je()},[Je,A]),a.useEffect(()=>{const w=new Set,we=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),we.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),we.forEach(He=>{G.current.has(He.url)||Oh(He,Ve)})},[t,u,Ve]),a.useEffect(()=>{if(K!=="opening"||!le)return;if(!y){xe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),xe("open")})});return()=>cancelAnimationFrame(w)},[K,le,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),$n);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{_e()},[_e]),a.useLayoutEffect(()=>{Ae.current===n&&de.current===(N==null?void 0:N.url)||(_e(),U.current=null,$e(null),ue(null),Se(null),ge(0),X(0),qe(!1),Q(!1),re(!1),L.current=0,D.current=0,x.current="none",W.current=!1,k.current=null,M.current=!1,T.current=null,Je(),Ae.current=n,de.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,_e,Je]),a.useLayoutEffect(()=>{const w=B.current;w!==null&&(B.current=null,requestAnimationFrame(()=>{j.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){H.current=!1,Te(!1);return}if(K!=="open"||H.current)return;if(!Be&&!be){H.current=!0;return}Te(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Te(!0),H.current=!0})});return()=>cancelAnimationFrame(w)},[K,Be==null?void 0:Be.url,be==null?void 0:be.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const Qe=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",Qe,!0)};document.addEventListener("click",Qe,!0)},we=Qe=>{const yt=Qe<0?1:-1;_e(),Ee(yt),U.current=yt,$e(yt),qe(!0),Ut()},Re=Qe=>{if(Math.abs(Qe)>Eh&&nt){we(Qe);return}U.current=null,$e(null),ue(null),Se(null),qe(!0),X(0),tt()},He=Qe=>{if(Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0];M.current=!0,k.current={x:yt.clientX,y:yt.clientY},x.current="none",D.current=0,W.current=!1},ot=Qe=>{if(!k.current||Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0],Dt=yt.clientX-k.current.x,Lt=yt.clientY-k.current.y;if(x.current==="none"){if(Math.abs(Dt)<10&&Math.abs(Lt)<10)return;if(Math.abs(Dt)>Math.abs(Lt)){if(!nt)return;x.current="horizontal"}else if(Lt>0){if(!dt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,re(!0),D.current=Dt,X(Dt),Qe.preventDefault();return}x.current==="vertical"&&(W.current=!0,re(!0),L.current=Lt,ge(Lt),Qe.preventDefault())},Mt=()=>{if(!k.current)return;const Qe=x.current,yt=W.current;if(yt&&Qe==="horizontal")Re(D.current),w();else if(yt&&Qe==="vertical"){const Dt=L.current;if(dt&&Dt>Ih){const Lt=window.innerHeight;L.current=Lt,Q(!0),ge(Lt),xe("closing")}else L.current=0,ge(0);w()}else Qe==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());k.current=null,x.current="none",D.current=0,W.current=!1,re(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,nt,qe,tt,_e,dt,Ut,Ee]);const Kt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&le&&(ve(w),se(!0)),xe("closing")},[g,y,le]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;wt(),Kt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!nt)return;He.preventDefault();const ot=He.key==="ArrowLeft"?-1:1;He.repeat&&ie.current===ot||At(ot)},we=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const ot=He.key==="ArrowLeft"?-1:1;ie.current===ot&&wt()},Re=()=>{wt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",we),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",we),window.removeEventListener("blur",Re),wt()}},[K,s,d,Kt,nt,At,wt]),a.useEffect(()=>{K!=="open"&&wt()},[K,wt]);const Jt=()=>{K==="closing"||l||Kt()},Ct=K==="open",Ht=K==="closing",on=Fe>0?Math.max(0,1-Fe/500):1,mt=Fe>0?Math.max(.35,1-Fe/500):1,Le=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(U.current!==null){Tt();return}_e(),qe(!1)}},[_e,qe,Tt]),De=K==="closing"?ye??y:y,it=De&&le&&(K==="opening"||Ht)?Ah(De,le):void 0,gt=Oe&&N?lt(N,"center"):Fe>0?`translateY(${Fe}px)`:it,ft=le?Go(le,$):null,It=!!(De&&le),pt=It&&(K==="closing"||K==="open"&&z),zt={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:gt,opacity:Fe>0?mt:It?1:K==="opening"||Ht?0:1,transition:he&&!ee?"none":ee?`transform ${to}ms ${un}`:_?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:pt?`transform ${$n}ms ${un}`:K==="opening"||Ht?`opacity ${$n}ms ${un}`:"none",pointerEvents:Ue&&Ct&&!Oe?"auto":"none",touchAction:Ue&&Ct?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Oe?"auto":"none"},Pt=(w,we,Re="adjacent")=>{const He=at(w);if(!He)return{display:"none"};const ot=Re==="far"?we==="left"?"far-left":"far-right":we==="left"?"left-adjacent":"right-adjacent",{start:Mt}=Pe!==null?Ac(He,ot,Pe,$):{start:Re==="far"?hr(He,we,$):ji(He,we,$)},Qe=Go(Mt,$),yt=lt(w,ot),Dt=!Oe&&Re==="adjacent"&&Ct&&!Me?Vh(He,we,$):null,Lt=Re==="far"&&Oe&&Pe===(we==="left"?-1:1),nn=he&&!ee?!1:ee,dn=Re==="adjacent"&&Ct&&Me&&!Oe;return{position:"absolute",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,objectFit:"contain",transform:yt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:Re==="far"?Ct&&Lt?1:0:Ct?1:0,transition:nn?Re==="far"?`transform ${to}ms ${un}`:`transform ${to}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:K==="opening"||Ht?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},Vt=(w,we)=>{const Re=at(w);return Re?zh(ji(Re,we,$),we,$):null},Gt=w=>we=>{if(!l){if(M.current){M.current=!1;return}we.stopPropagation(),xt(w)}},Nt=Be?Vt(Be,"left"):null,Ot=be?Vt(be,"right"):null,Wt=Nt?Go(Nt,$):null,St=Ot?Go(Ot,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:Jt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?on:0,transition:he?"none":`opacity ${$n}ms ${un}`,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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:he?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Ct&&Ge&&r.jsx(qo,{media:Ge,style:Pt(Ge,"left","far"),onMeasure:Ve,onTransitionEnd:Le},`far-prev-${Ge.url}`),Ct&&Be&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:Be,style:Pt(Be,"left"),onMeasure:Ve,onTransitionEnd:Le},`prev-${Be.url}`),Wt&&r.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Ct&&be&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:be,style:Pt(be,"right"),onMeasure:Ve,onTransitionEnd:Le},`next-${be.url}`),St&&r.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Ct&&Ze&&r.jsx(qo,{media:Ze,style:Pt(Ze,"right","far"),onMeasure:Ve,onTransitionEnd:Le},`far-next-${Ze.url}`),le&&N&&(Ue?r.jsx(Xh,{src:N.url,phase:K,onMediaElement:Ft,wrapperStyle:zt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Le},`${n}-${N.url}`):r.jsx("img",{ref:Ft,src:N.url,alt:N.name,onLoad:vt,onTransitionEnd:Le,style:zt},`${n}-${N.url}`))]})}function Yh({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),{gridLayout:c,verticalGap:u,align:p="top",imageDisplay:v}=e,y=(v==null?void 0:v.display)==="cover",g=(v==null?void 0:v.ratioValue)??"1:1",h=(v==null?void 0:v.reversed)??!1,[m,b]=g.split(":").map(Number),T=`${h?b:m} / ${h?m:b}`,G=c.entryWidth??.2,A=c.columnsCount,V=C.scalingValue(G,n),k=C.scalingValue(c.horizontalGap??0,n),L=V,D=V,x={width:L,...y?{aspectRatio:T,height:"auto",overflow:"hidden"}:{height:"auto"}},W=y?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},M=a.useRef(null),[Y,F]=a.useState(!1),[U,B]=a.useState([]),[j,ie]=a.useState(0),[S,E]=a.useState(0),[O,le]=a.useState(null),[oe,$]=a.useState({title1:"",title2:"",title3:""}),ae=(()=>{const fe={},Se=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return Se&&(fe["--cntrl-article-width"]=Se),fe})(),P=!n||i||o,te=a.useMemo(()=>Rh(d),[d]),K=t??[],xe=K.length%A||A,Fe=xe<A&&K.length>0,ge=K.length-xe,ce=Fe?Math.floor((A-xe)/2)+1:1,X=a.useMemo(()=>Wh(K),[K]),ee=a.useMemo(()=>Dh(K),[K]),Z=(fe,Se,z)=>{if(n&&!o&&!i)return;const se=X.findIndex(ve=>ve.gridIndex===fe);if(se<0)return;const ye=X[se];E(se),B(ye.items),ie(Se),$(ye.entry),le(z??null),F(!0)},Pe=a.useCallback(()=>{F(!1),le(null)},[]),$e=a.useCallback(()=>{const fe=X[S];return!fe||!M.current?O:Fh(M.current,fe.gridIndex,y?"cover":"contain")??O},[X,S,O,y]),ke=a.useCallback(fe=>{if(X.length>1){const Se=X.length,z=(S+fe+Se)%Se,se=X[z],ye=Math.min(j,se.items.length-1);E(z),B(se.items),ie(ye),$(se.entry);return}ie(Se=>(Se+fe+U.length)%U.length)},[X,S,j,U.length]),ue=X.length>1||U.length>1;return a.useEffect(()=>{if(!Y||typeof document>"u")return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[Y]),a.useEffect(()=>{!n||o||i||F(!1)},[n,o,i]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:te}}),r.jsx(jh,{mediaList:ee}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${A}, ${V})`,rowGap:0,columnGap:k,width:C.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:C.scalingValue(u??0,n)},children:K.map((fe,Se)=>{const z=rs(fe.gallery),se=as(z),ye=se.filter(re=>re.lightboxMedia).map(re=>re.lightboxMedia),ve=Math.floor(Se/A)===Math.ceil(K.length/A)-1,Me=Fe&&Se>=ge?`${ce+(Se-ge)}`:void 0,Te=se[0],H=Te!=null&&Te.lightboxMedia?ye.findIndex(re=>re.url===Te.lightboxMedia.url):-1,he=r.jsx("div",{className:`${d}-item-image-wrapper`,style:x,children:se.length>0&&r.jsx(Uh,{media:Te.displayMedia,gridIndex:Se,className:`${d}-item-${Ji(Te.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:P&&H>=0?re=>Z(Se,H,Pc(re.currentTarget,y?"cover":"contain")):void 0})});return r.jsx("div",{className:`${d}-item`,children:r.jsxs("div",{className:[o?`${d}-item-inner`:`${d}-item-inner-hidden`,ve?`${d}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:V,...Me?{gridColumn:Me}:{}},children:[r.jsx("div",{className:`${d}-item-title-row`,children:r.jsx("div",{style:{height:0,width:D}})}),r.jsx("a",{className:`${d}-item-image-link`,children:he}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:D}})})]})},Se)})}),Y&&typeof document<"u"&&(()=>{const fe=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:ae,"data-selection":"none",children:r.jsx(Kh,{prefix:d,items:U,index:j,entry:oe,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ue,lightboxEntries:X,entryIdx:S,layoutId:s,sourceRect:O,resolveCloseSourceRect:$e,onClose:Pe,onPrev:()=>ke(-1),onNext:()=>ke(1)})}),fe)})()]})}const Zh=`import { CommonComponentProps } from '../props';
7510
7510
  import { scalingValue, useScopedStyles } from '../utils/index';
7511
7511
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7512
7512
  import { createPortal } from 'react-dom';
@@ -10225,7 +10225,7 @@ a.${e}-list-item {
10225
10225
  overflow-wrap: anywhere;
10226
10226
  word-break: break-word;
10227
10227
  }
10228
- `}const Kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ss=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",So=[...ss,An],Ar=["A","B","C","D","E"];function Wc(e){return`${e}ColumnVerticalAlign`}const Ea=["Top","Center","Bottom"];function ls(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ar.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function ff(e){const t=ls(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function yf(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ar.includes(n)?n:null}function _c(e,t,n){const i=yf(e);return i?i===t?!1:ff(n[Wc(i)]):!0}function $o(e){const t=ls(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ar.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function vf(e,t,n){if(Hc(e,t,n))return $o(e);const i=$o(e);return i.kind==="baseline"?{kind:"top"}:i}function xf(e){const t=$o(e);return t.kind==="baseline"?{kind:"top"}:t}function Hc(e,t,n){return _c(e,n,t)?$o(e).kind==="baseline":!1}function bf(e){const t={};let n=!1;for(const i of Ar){const o=Wc(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}_c(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function wf(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Sf(e){const t=$o(e).kind;return t==="baseline"?"center":t}function $f(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function el(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Cf(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(),s=o-i;return n.remove(),s}function na(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Cf(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.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+l}function Tf(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Lf(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Rf={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Et(e,t){return`${e}${t.replace(/^text/,"Text")}`}const If={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ef(e){return[Et(e,"textFontFamily"),Et(e,"textFontSettings"),{type:"row",items:[Et(e,"textFontSize"),Et(e,"textLineHeight"),Et(e,"textLetterSpacing"),Et(e,"textWordSpacing")]},Et(e,"textTextAlign"),Et(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mf(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(So.map(e=>[If[e],Ef(e)]))}}function fr(e,t){const n=i=>{const o=Et(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===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function tl(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 rn(Xt(n,t))}function nl(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function il(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:C.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Bi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Vi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Pf={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},kf=["hover","focus","filled","success","error"],ol=.004,Ei=.004,ia=Ei,cs=50,Co=1440,To=cs/Co;function Nc(e){const t=typeof e=="number"&&e>0?e:Co;return cs/t}function Af(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 Co}const Oc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function po(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ff(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function Wf(){return Object.fromEntries([...Bi.map(e=>[e,0]),...Vi.map(e=>[e,0])])}function _f(){return Object.fromEntries(Gi.map(e=>[e,0]))}function Uo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function Dc(e,t,n){const i=e-To,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function sr(e,t,n){const i=ds(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Hf(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Bi[o],l=Vi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=Dc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function ds(e,t,n){if(e<=0)return[];const i=fn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+To;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const p=d[u]-To;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function Nf(e,t,n){if(e<=1)return{};const i=ds(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function rl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Kn]}function Of(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Df(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],p=Bi[c],v=Vi[c],y=Gi[c],g=fn[l],h=Bi[l],m=Vi[l],b=Gi[l],I=n[u],R=n[p],T=n[v],q=n[y];typeof I=="number"&&(s[g]=I),typeof R=="number"&&(s[h]=R),typeof T=="number"&&(s[m]=T),typeof q=="number"&&(s[b]=q)}return s}function jc(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 jf(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=po(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Ff(n,o),...Wf()};if(s)for(const d of Gi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,_f());return jc(e,l)?l:e}function zf(e,t,n){const i=bf(e);i&&(e={...e,...i});const o=Nc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=po(e),c=po(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof l=="number"?l:Kn.length,v=T=>{if(u)return T;const q=Uo({...t,...T}),A=po(T),G=sr(p,A,q),k=Hf(p,G,{...t,...T});return Object.keys(k).length===0?T:{...T,...k}};if(typeof s=="number"&&s!==l)return e;const y=rl(e),g=rl(t);if(!Of(y,g))return v({...e,...Df(y,g,t,p)});if(d<c&&typeof p=="number"&&!u){const T=Uo({...t,...e});return v({...e,...Nf(p,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,q=Math.max(0,(d-o)/2);return T>q?{...e,textPaddingLR:q}:e}const h=Uo({...t,...e}),m=sr(p,c,Uo(t)),I=sr(p,d,h).some((T,q)=>T<(m[q]??T)),R=fn.some(T=>{const q=e[T],A=t[T];return typeof q=="number"&&typeof A=="number"&&q!==A});return I||R?v(e):e}function Bf(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(To,i-o-s-To)}function Vf(e,t){return Math.random()*(t-e)+e}function Gf(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function oa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function qf(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Bi[d],u=Vi[d],p=Gi[d];return{key:l,textPrefix:Rf[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[p]}})}function Uf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=C.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:y,entriesCount:g,cellMinHeight:h,dividerWidth:m,showVisibility:b,cut:I,showCut:R,cutCellMinHeight:T,cutLabel:q,imageSize:A,imageOnHover:G,imagePosition:k="cursor",imageInterpolation:L="on",entryHoverEffect:D,entryHoverShowOption:x,rowPaddingTop:W,rowPaddingBottom:M,rowPaddingTopB:Y,columnsOrder:F,textPaddingLR:U,textColor:V,backgroundColor:z,dividerColor:ie,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O}=e,[le,oe]=a.useState(void 0),[$,ae]=a.useState(null),P=a.useRef(null),te=G==="on"&&(!n||i),K=k==="cursor",xe=K&&L==="on",{anchorRef:Fe,onShow:ge,onCursorMove:ce,exit:X}=gf(!!(te&&$!==null),xe),ee=(I??0)>0,Z=v==="b",Pe=a.useRef(null),$e=a.useRef(null),[ke,ue]=a.useState(null),[fe,Se]=a.useState(Co),B=Nc(fe),se=Math.max(0,((y??0)-B)/2),ye=Math.min(U??0,se),ve=Math.max(ye,Ei),Me=((y??0)+B)/2;a.useLayoutEffect(()=>{if(!n){Se(Co);return}const Le=()=>{Se(Af(Pe.current))};Le();const De=Pe.current;if(!De)return;const it=new ResizeObserver(Le);it.observe(De);let gt=De;for(;gt&&!gt.style.getPropertyValue("--cntrl-article-width");)gt=gt.parentElement;return gt&&it.observe(gt),()=>it.disconnect()},[n,l]),a.useEffect(()=>{oe(void 0)},[I,R,t,g]),a.useEffect(()=>{n&&!i&&oe(void 0)},[n,i]);const Te=C.buildColorVars(c,{textColor:V,backgroundColor:z,dividerColor:ie,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O},Pf,kf),H=s&&s!=="default"?`${c}-state-${s}`:"",re=`${!n||i?D==="default"?`${c}-entry-hover-default`:D==="blinds"?`${c}-entry-hover-blinds`:D==="reveal"?`${c}-entry-hover-reveal`:"":""} ${H}`.trim(),_=D==="reveal"&&(!n||i),Q=(b==null?void 0:b[0])??!1,Ae=(b==null?void 0:b[1])??!1,de=a.useRef(e),N=a.useRef(l);a.useEffect(()=>{if(!d||!n){de.current=e,N.current=l;return}if(N.current!==l){de.current=e,N.current=l;return}const Le=de.current;if(!(Le!==e))return;if(typeof Le.columns=="number"&&typeof e.columns=="number"&&Le.columns!==e.columns){de.current=e;return}const it=zf(e,Le,{designWidth:fe});de.current=e,jc(e,it)&&d(it)},[e,d,n,l,fe]);const Ue=a.useMemo(()=>Gf(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Oe=a.useMemo(()=>oa(e,Bi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),dt=a.useMemo(()=>oa(e,Vi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),nt=a.useMemo(()=>oa(e,Gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ht=a.useMemo(()=>Array.isArray(F)&&F.length>0?F:[...Kn],[F]),st=a.useMemo(()=>qf(ht,p,Ue,Oe,dt,nt),[ht,p,Ue,Oe,dt,nt]),Be=po(e),be=a.useMemo(()=>fn.slice(0,p).map(Le=>Ue[Le]),[p,Ue]),We=a.useMemo(()=>ds(p,Be,Ue),[p,Be,Ue]),je=a.useMemo(()=>sr(p,Be,Ue),[p,Be,Ue]),Ke=a.useMemo(()=>st.map((Le,De)=>Dc(je[De]??0,Le.paddingLeft,Le.paddingRight)),[st,je]),ne=a.useMemo(()=>{const Le=g===0?1/0:g;return(t??[]).slice(0,Le).map((it,gt)=>({id:gt,cells:Object.fromEntries(Kn.map(ft=>[ft,it[ft]??""])),image:it.image,link:it.link}))},[t,g]),me=ee?le??I:ne.length,Ie=a.useMemo(()=>ee?ne.slice(0,me):ne,[ne,ee,me]),Ge=ee&&me<ne.length,Ze=Ie.length>1||Ge,Ve=[Q?`${c}-divider-top`:"",Ae||Ze?`${c}-divider-bottom`:""].filter(Boolean).join(" "),at=!n||i,Je=()=>{if(!at)return;const Le=le??I;if(!R){oe(ne.length);return}oe(Math.min(Le+R,ne.length))},Ee=Le=>C.scalingValue(Le,n??!1),qe=Z?Y??0:W??0,_e=M??0,tt=h??0,rt=Math.max(_e,ia),lt=Zs(0,Ie.length,Q,Ae,Ge,m??0,n??!1).borderTopWidth,Tt=Z?"rowPaddingTopB":"rowPaddingTop",Ut=st[0],Zt=st[st.length-1],xt=Ke[0],wt=Ke[Ke.length-1],jt=Ut&&xt?Math.max(xt.paddingLeft,Ei):0,At=Zt&&wt?Math.max(wt.paddingRight,Ei):0,vt=Be,Ft=(Le,De)=>mf(k,Pe.current,K?Le:null,De),_t=(Le,De)=>{if(!te)return;const it=Le.image;if(!(it!=null&&it.url)){X(()=>ae(null));return}const gt=(A==null?void 0:A.min)??80,ft=(A==null?void 0:A.max)??320,It=($==null?void 0:$.rowId)===Le.id,pt=It?$.widthPx:Vf(gt,ft),{x:zt,y:kt}=Ft(De,pt);if(It&&K){ce(zt,kt);return}ae({rowId:Le.id,url:it.url,objectFit:"contain",isVideo:lf(it),widthPx:pt}),P.current={x:zt,y:kt}},Kt=Le=>{if(!te||!$||!K)return;const{x:De,y:it}=Ft(Le,$.widthPx);ce(De,it)},Jt=()=>{$&&X(()=>ae(null))},Ct=Le=>{_&&Ks(Le,c),!(!te||!$)&&X(()=>ae(null))},Ht=Le=>{_&&Ys(Le,c)};a.useLayoutEffect(()=>{if(!$||!P.current)return;const{x:Le,y:De}=P.current;P.current=null,ge(Le,De)},[$==null?void 0:$.rowId,$==null?void 0:$.url,ge]),a.useLayoutEffect(()=>{if(!u||Z){ue(null);return}const Le=$e.current,De=Le==null?void 0:Le.parentElement;if(!Le||!De){ue(null);return}const it=()=>{const ft=Le.querySelector("[data-list-row]");if(!ft){ue(null);return}const It=De.getBoundingClientRect(),pt=ft.getBoundingClientRect();ue(pt.top-It.top+pt.height/2)};it();const gt=new ResizeObserver(it);return gt.observe(Le),gt.observe(De),()=>gt.disconnect()},[u,Z,Ie,qe,_e,tt,t,e,st,je,fe,m,Q,Ae,Ge]);const on=a.useMemo(()=>!Z&&ss.some(Le=>{const De=Le.charAt(0),it=e[`${Le}VerticalAlign`];return Hc(it,e,De)}),[Z,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var zt;const Le=Pe.current;if(!Le)return;const De=()=>{Le.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Pt=kt.querySelector(`.${c}-list-col`);Pt&&(Pt.style.minHeight="",Pt.style.height="");const Vt=kt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})};if(Z||!on){De();return}const it=()=>{const kt=Array.from(Le.querySelectorAll("[data-list-row]")),Pt=`${c}-list-col`,Vt=`${c}-baseline-probe`;kt.forEach(Gt=>{Gt.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const Ot=Nt.querySelector(`.${Pt}`);Ot&&(Ot.style.minHeight="",Ot.style.height="");const Wt=Nt.querySelector(`.${c}-list-col-title`);Wt&&(Wt.style.transform="")})}),kt.forEach(Gt=>{const Nt=Array.from(Gt.querySelectorAll("[data-list-col]"));Tf(Gt,Nt,Pt)}),Le.offsetHeight,kt.forEach(Gt=>{const Nt=Array.from(Gt.querySelectorAll("[data-list-col]")),Ot=Gt.getBoundingClientRect().top,Wt=new Map,St=Nt.map(Re=>{const He=Re.querySelector(`.${c}-list-col-title`),ot={el:Re,titleEl:He,letter:Re.getAttribute("data-col-letter")??"",kind:Re.getAttribute("data-valign")??"top",anchor:Re.getAttribute("data-valign-anchor")};return Wt.set(ot.letter,ot),ot}),w=new Map,we=(Re,He)=>{const ot=w.get(Re.letter);if(ot!==void 0)return ot;const Mt=Re.anchor?Wt.get(Re.anchor):void 0;if(Re.kind!=="baseline"||!Mt||He.has(Re.letter)){const nn=na(Re,Ot,Pt,Vt);return w.set(Re.letter,nn),nn}He.add(Re.letter);const Qe=we(Mt,He);He.delete(Re.letter);const yt=na(Re,Ot,Pt,Vt),Dt=Qe-yt;Lf(Re.titleEl,Dt);const Lt=na(Re,Ot,Pt,Vt);return w.set(Re.letter,Lt),Lt};St.forEach(Re=>we(Re,new Set))})};let gt=null;const ft=()=>{gt===null&&(gt=requestAnimationFrame(()=>{gt=null,it()}))};it();const It=new ResizeObserver(()=>ft());It.observe(Le);let pt=!1;return typeof document<"u"&&((zt=document.fonts)!=null&&zt.ready)&&document.fonts.ready.then(()=>{pt||ft()}),()=>{pt=!0,gt!==null&&(cancelAnimationFrame(gt),gt=null),It.disconnect(),De()}},[on,Z,e,t,fe,Ie,je]);const mt=a.useMemo(()=>hf(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:mt}}),r.jsx("div",{style:Te,children:r.jsxs("div",{ref:Pe,className:`${c}-wrapper ${re}${Ve?` ${Ve}`:""}${Z?` ${c}-type-b`:""}`.trim(),style:{width:C.scalingValue(y??0,n)},onMouseMove:te?Kt:void 0,onMouseLeave:te?Jt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ie.map((Le,De)=>{var It;const it=(((It=Le.link)==null?void 0:It.length)??0)>0,gt=it&&(!n||i)?"a":"div",ft=Zs(De,Ie.length,Q,Ae,Ge,m??0,n??!1);return r.jsxs(gt,{ref:De===0?pt=>{$e.current=pt}:void 0,className:`${c}-list-item${it||x==="always"?` ${c}-list-item-has-link`:""}${Ge&&De===Ie.length-1?` ${c}-list-item-before-cut`:""}`,...it?{href:Le.link,target:"_blank"}:{},style:ft,onMouseEnter:pt=>{_&&(it||x==="always")&&Ks(pt,c),te&&_t(Le,pt)},onMouseLeave:pt=>{_&&(it||x==="always")&&Ys(pt,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${Z?"":` ${c}-list-cols-row-h`}${u&&De===0&&Z?` ${c}-list-cols-row-controls`:""}`,...Z?{}:{"data-list-row":""},style:Z?void 0:{minHeight:Ee(tt)},children:[st.map((pt,zt)=>{const kt=zt===st.length-1,Pt=Ke[zt],Vt=pt.paddingBottom,Gt=df(Le.cells[pt.key]),Nt=Z&&Gt&&Vt>0,Ot=Z?{minHeight:Ee(tt)}:{width:Ee(je[zt])},Wt=Z?{paddingLeft:Ee(ye),paddingRight:Ee(ye)}:{paddingLeft:Ee(Pt.paddingLeft),paddingRight:Ee(Pt.paddingRight)},St=pt.textPrefix.charAt(0),w=Z?xf(e[`${pt.textPrefix}VerticalAlign`]):vf(e[`${pt.textPrefix}VerticalAlign`],e,St),we=Z&&Gt&&u&&De===0;return Z&&!Gt?null:r.jsxs("div",{className:Z?`${c}-list-col-wrap`:void 0,...Z?{}:{"data-list-col":"","data-col-letter":St,"data-valign":w.kind,...w.kind==="baseline"?{"data-valign-anchor":w.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{...Wt,...Ot,...Z?{justifyContent:el(w.kind)}:{}},"data-test":pt.width,children:r.jsx("span",{className:nl(e,pt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...tl(fr(e,pt.textPrefix),n),...il(e,pt.textPrefix,c,n),...Z?{}:wf(w.kind)},children:Le.cells[pt.key]??null})}),Nt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(Vt)}}),we&&r.jsx("div",{"data-controls":pt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ee(Math.max(Vt,ia))}})]},pt.key)}),u&&De===0&&Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(ve),height:"100%"}}),r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ee(Math.max(ve,Be-ve)),width:Ee(ve),height:"100%"}})]})]}),!Z&&_e>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(_e)}}),u&&De===0&&!Z&&r.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ee(rt)}})]},Le.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Tt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":Z?"center":"left-y",className:`${c}-control-anchor`,style:{top:lt,left:0,width:"100%",height:Ee(Math.max(qe,ia))}})},"row-padding-handles"),u&&!Z&&Ut&&Zt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Ut.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((xt==null?void 0:xt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(jt),height:"100%"}}),r.jsx("div",{"data-controls":Zt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[st.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(vt-At),width:Ee(At),height:"100%"}})]},"column-edge-padding-handles"),u&&!Z&&st.slice(0,-1).map((Le,De)=>{const it=st[De+1],gt=We.slice(0,De+1).reduce((kt,Pt)=>kt+Pt,0),ft=Ke[De],It=Ke[De+1],pt=Math.max(ft.paddingRight,Ei),zt=Math.max(It.paddingLeft,Ei);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Le.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[De]-ft.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(gt-pt),width:Ee(pt),height:"100%"}}),r.jsx("div",{"data-controls":it.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[De+1]-It.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(gt),width:Ee(zt),height:"100%"}})]},`${Le.paddingRightKey}-padding`)}),u&&!Z&&st.slice(0,-1).map((Le,De)=>{const it=Bf(De,We,be,Be),ft=We.slice(0,De+1).reduce((It,pt)=>It+pt,0)-ol/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Le.widthKey,"data-controls-axis":"x","data-controls-min":String(cs),"data-controls-max-fraction":String(it),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(ft),width:Ee(ol),height:"calc(100%)",pointerEvents:"auto"}})},`${Le.widthKey}-junction`)})]}),Ge&&(()=>{const Le=fr(e,An),De=Sf(e.cutLabelVerticalAlign),it=Le.textTextAlign==="justify"||Z;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ee(T??0),cursor:at?"pointer":"default",...uf(Ae,m??0,n??!1)},onClick:at?Je:void 0,onMouseEnter:_||te?Ct:void 0,onMouseLeave:_?Ht:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...Z?{paddingLeft:Ee(ye),paddingRight:Ee(ye)}:{},justifyContent:$f(Le.textTextAlign),alignItems:el(De)},children:r.jsx("span",{className:nl(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...tl(Le,n),...il(e,An,c,n),...it?{width:"100%"}:{}},children:q})})})})(),te&&$&&(()=>{const Le=`${$.widthPx}px`,De={width:Le,height:"auto",maxHeight:Le,objectFit:"contain"};return r.jsx("div",{ref:Fe,className:`${c}-hover-media-anchor`,children:r.jsx(cf,{media:$,className:$.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:De},`${$.rowId}-${$.url}`)})})()]})})]})}const Xf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10228
+ `}const Kn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ss=["AColumn","BColumn","CColumn","DColumn","EColumn"],An="cutLabel",So=[...ss,An],Ar=["A","B","C","D","E"];function Wc(e){return`${e}ColumnVerticalAlign`}const Ea=["Top","Center","Bottom"];function ls(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Ar.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function ff(e){const t=ls(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function yf(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Ar.includes(n)?n:null}function _c(e,t,n){const i=yf(e);return i?i===t?!1:ff(n[Wc(i)]):!0}function $o(e){const t=ls(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Ar.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function vf(e,t,n){if(Hc(e,t,n))return $o(e);const i=$o(e);return i.kind==="baseline"?{kind:"top"}:i}function xf(e){const t=$o(e);return t.kind==="baseline"?{kind:"top"}:t}function Hc(e,t,n){return _c(e,n,t)?$o(e).kind==="baseline":!1}function bf(e){const t={};let n=!1;for(const i of Ar){const o=Wc(i),s=e[o];if(e.type==="b"){const l=String(s??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}_c(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function wf(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Sf(e){const t=$o(e).kind;return t==="baseline"?"center":t}function $f(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function el(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function Cf(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(),s=o-i;return n.remove(),s}function na(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const l=Cf(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const d=s.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+l}function Tf(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function Lf(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Rf={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Et(e,t){return`${e}${t.replace(/^text/,"Text")}`}const If={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ef(e){return[Et(e,"textFontFamily"),Et(e,"textFontSettings"),{type:"row",items:[Et(e,"textFontSize"),Et(e,"textLineHeight"),Et(e,"textLetterSpacing"),Et(e,"textWordSpacing")]},Et(e,"textTextAlign"),Et(e,"textTextAppearance"),`${e}VerticalAlign`]}function Mf(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(So.map(e=>[If[e],Ef(e)]))}}function fr(e,t){const n=i=>{const o=Et(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===An?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function tl(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 rn(Xt(n,t))}function nl(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<s?`${n} ${i}`:n}function il(e,t,n,i){const o=fr(e,t),s=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=s?{}:{[`--${n}-title-leading-gap`]:C.scalingValue((s-l)/2,i)}}const fn=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Bi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Vi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Pf={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},kf=["hover","focus","filled","success","error"],ol=.004,Ei=.004,ia=Ei,cs=50,Co=1440,To=cs/Co;function Nc(e){const t=typeof e=="number"&&e>0?e:Co;return cs/t}function Af(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 Co}const Oc={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function po(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Ff(e,t=1){const n=t/e;return Object.fromEntries(fn.map(i=>[i,n]))}function Wf(){return Object.fromEntries([...Bi.map(e=>[e,0]),...Vi.map(e=>[e,0])])}function _f(){return Object.fromEntries(Gi.map(e=>[e,0]))}function Uo(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function Dc(e,t,n){const i=e-To,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function sr(e,t,n){const i=ds(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,l)=>s+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Hf(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=Bi[o],l=Vi[o],d=typeof n[s]=="number"?n[s]:0,c=typeof n[l]=="number"?n[l]:0,u=Dc(t[o]??0,d,c);u.paddingLeft!==d&&(i[s]=u.paddingLeft),u.paddingRight!==c&&(i[l]=u.paddingRight)}return i}function ds(e,t,n){if(e<=0)return[];const i=fn.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+To;if(t>=l)return i;const d=[...o];let c=l-t;for(let u=d.length-1;u>=0&&c>0;u-=1){const p=d[u]-To;if(p<=0)continue;const v=Math.min(c,p);d[u]-=v,c-=v}return[...d,i[e-1]]}function Nf(e,t,n){if(e<=1)return{};const i=ds(e,t,n),o={};for(let s=0;s<e-1;s+=1){const l=fn[s];i[s]!==n[l]&&(o[l]=i[s])}return o}function rl(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Kn]}function Of(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Df(e,t,n,i){const o=Math.min(i,e.length,fn.length),s={};for(let l=0;l<o;l+=1){const d=e[l],c=t.indexOf(d);if(c===-1)continue;const u=fn[c],p=Bi[c],v=Vi[c],y=Gi[c],g=fn[l],h=Bi[l],m=Vi[l],b=Gi[l],I=n[u],R=n[p],T=n[v],G=n[y];typeof I=="number"&&(s[g]=I),typeof R=="number"&&(s[h]=R),typeof T=="number"&&(s[m]=T),typeof G=="number"&&(s[b]=G)}return s}function jc(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 jf(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=po(e),s=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...Ff(n,o),...Wf()};if(s)for(const d of Gi)typeof t[d]=="number"&&(l[d]=t[d]);else Object.assign(l,_f());return jc(e,l)?l:e}function zf(e,t,n){const i=bf(e);i&&(e={...e,...i});const o=Nc(n==null?void 0:n.designWidth),s=e.columns,l=t.columns,d=po(e),c=po(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof s=="number"?s:typeof l=="number"?l:Kn.length,v=T=>{if(u)return T;const G=Uo({...t,...T}),A=po(T),V=sr(p,A,G),k=Hf(p,V,{...t,...T});return Object.keys(k).length===0?T:{...T,...k}};if(typeof s=="number"&&s!==l)return e;const y=rl(e),g=rl(t);if(!Of(y,g))return v({...e,...Df(y,g,t,p)});if(d<c&&typeof p=="number"&&!u){const T=Uo({...t,...e});return v({...e,...Nf(p,d,T)})}if(u){const T=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,G=Math.max(0,(d-o)/2);return T>G?{...e,textPaddingLR:G}:e}const h=Uo({...t,...e}),m=sr(p,c,Uo(t)),I=sr(p,d,h).some((T,G)=>T<(m[G]??T)),R=fn.some(T=>{const G=e[T],A=t[T];return typeof G=="number"&&typeof A=="number"&&G!==A});return I||R?v(e):e}function Bf(e,t,n,i){const o=t.slice(0,e).reduce((l,d)=>l+d,0),s=n.slice(e+1,t.length-1).reduce((l,d)=>l+d,0);return Math.max(To,i-o-s-To)}function Vf(e,t){return Math.random()*(t-e)+e}function Gf(e){return Object.fromEntries(fn.map(t=>[t,typeof e[t]=="number"?e[t]:Oc[t]]))}function oa(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function qf(e,t,n,i,o,s){return e.slice(0,t).map((l,d)=>{const c=Bi[d],u=Vi[d],p=Gi[d];return{key:l,textPrefix:Rf[l],widthKey:fn[d],width:n[fn[d]],paddingLeftKey:c,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[c],paddingRight:o[u],paddingBottom:s[p]}})}function Uf({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:l,onUpdateSettings:d}){const{prefix:c}=C.useScopedStyles(),u=!!o,{columns:p,type:v,wrapperWidth:y,entriesCount:g,cellMinHeight:h,dividerWidth:m,showVisibility:b,cut:I,showCut:R,cutCellMinHeight:T,cutLabel:G,imageSize:A,imageOnHover:V,imagePosition:k="cursor",imageInterpolation:L="on",entryHoverEffect:D,entryHoverShowOption:x,rowPaddingTop:W,rowPaddingBottom:M,rowPaddingTopB:Y,columnsOrder:F,textPaddingLR:U,textColor:B,backgroundColor:j,dividerColor:ie,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O}=e,[le,oe]=a.useState(void 0),[$,ae]=a.useState(null),P=a.useRef(null),te=V==="on"&&(!n||i),K=k==="cursor",xe=K&&L==="on",{anchorRef:Fe,onShow:ge,onCursorMove:ce,exit:X}=gf(!!(te&&$!==null),xe),ee=(I??0)>0,Z=v==="b",Pe=a.useRef(null),$e=a.useRef(null),[ke,ue]=a.useState(null),[fe,Se]=a.useState(Co),z=Nc(fe),se=Math.max(0,((y??0)-z)/2),ye=Math.min(U??0,se),ve=Math.max(ye,Ei),Me=((y??0)+z)/2;a.useLayoutEffect(()=>{if(!n){Se(Co);return}const Le=()=>{Se(Af(Pe.current))};Le();const De=Pe.current;if(!De)return;const it=new ResizeObserver(Le);it.observe(De);let gt=De;for(;gt&&!gt.style.getPropertyValue("--cntrl-article-width");)gt=gt.parentElement;return gt&&it.observe(gt),()=>it.disconnect()},[n,l]),a.useEffect(()=>{oe(void 0)},[I,R,t,g]),a.useEffect(()=>{n&&!i&&oe(void 0)},[n,i]);const Te=C.buildColorVars(c,{textColor:B,backgroundColor:j,dividerColor:ie,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O},Pf,kf),H=s&&s!=="default"?`${c}-state-${s}`:"",re=`${!n||i?D==="default"?`${c}-entry-hover-default`:D==="blinds"?`${c}-entry-hover-blinds`:D==="reveal"?`${c}-entry-hover-reveal`:"":""} ${H}`.trim(),_=D==="reveal"&&(!n||i),Q=(b==null?void 0:b[0])??!1,Ae=(b==null?void 0:b[1])??!1,de=a.useRef(e),N=a.useRef(l);a.useEffect(()=>{if(!d||!n){de.current=e,N.current=l;return}if(N.current!==l){de.current=e,N.current=l;return}const Le=de.current;if(!(Le!==e))return;if(typeof Le.columns=="number"&&typeof e.columns=="number"&&Le.columns!==e.columns){de.current=e;return}const it=zf(e,Le,{designWidth:fe});de.current=e,jc(e,it)&&d(it)},[e,d,n,l,fe]);const Ue=a.useMemo(()=>Gf(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Oe=a.useMemo(()=>oa(e,Bi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),dt=a.useMemo(()=>oa(e,Vi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),nt=a.useMemo(()=>oa(e,Gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ht=a.useMemo(()=>Array.isArray(F)&&F.length>0?F:[...Kn],[F]),st=a.useMemo(()=>qf(ht,p,Ue,Oe,dt,nt),[ht,p,Ue,Oe,dt,nt]),Be=po(e),be=a.useMemo(()=>fn.slice(0,p).map(Le=>Ue[Le]),[p,Ue]),We=a.useMemo(()=>ds(p,Be,Ue),[p,Be,Ue]),je=a.useMemo(()=>sr(p,Be,Ue),[p,Be,Ue]),Ke=a.useMemo(()=>st.map((Le,De)=>Dc(je[De]??0,Le.paddingLeft,Le.paddingRight)),[st,je]),ne=a.useMemo(()=>{const Le=g===0?1/0:g;return(t??[]).slice(0,Le).map((it,gt)=>({id:gt,cells:Object.fromEntries(Kn.map(ft=>[ft,it[ft]??""])),image:it.image,link:it.link}))},[t,g]),me=ee?le??I:ne.length,Ie=a.useMemo(()=>ee?ne.slice(0,me):ne,[ne,ee,me]),Ge=ee&&me<ne.length,Ze=Ie.length>1||Ge,Ve=[Q?`${c}-divider-top`:"",Ae||Ze?`${c}-divider-bottom`:""].filter(Boolean).join(" "),at=!n||i,Je=()=>{if(!at)return;const Le=le??I;if(!R){oe(ne.length);return}oe(Math.min(Le+R,ne.length))},Ee=Le=>C.scalingValue(Le,n??!1),qe=Z?Y??0:W??0,_e=M??0,tt=h??0,rt=Math.max(_e,ia),lt=Zs(0,Ie.length,Q,Ae,Ge,m??0,n??!1).borderTopWidth,Tt=Z?"rowPaddingTopB":"rowPaddingTop",Ut=st[0],Zt=st[st.length-1],xt=Ke[0],wt=Ke[Ke.length-1],jt=Ut&&xt?Math.max(xt.paddingLeft,Ei):0,At=Zt&&wt?Math.max(wt.paddingRight,Ei):0,vt=Be,Ft=(Le,De)=>mf(k,Pe.current,K?Le:null,De),_t=(Le,De)=>{if(!te)return;const it=Le.image;if(!(it!=null&&it.url)){X(()=>ae(null));return}const gt=(A==null?void 0:A.min)??80,ft=(A==null?void 0:A.max)??320,It=($==null?void 0:$.rowId)===Le.id,pt=It?$.widthPx:Vf(gt,ft),{x:zt,y:kt}=Ft(De,pt);if(It&&K){ce(zt,kt);return}ae({rowId:Le.id,url:it.url,objectFit:"contain",isVideo:lf(it),widthPx:pt}),P.current={x:zt,y:kt}},Kt=Le=>{if(!te||!$||!K)return;const{x:De,y:it}=Ft(Le,$.widthPx);ce(De,it)},Jt=()=>{$&&X(()=>ae(null))},Ct=Le=>{_&&Ks(Le,c),!(!te||!$)&&X(()=>ae(null))},Ht=Le=>{_&&Ys(Le,c)};a.useLayoutEffect(()=>{if(!$||!P.current)return;const{x:Le,y:De}=P.current;P.current=null,ge(Le,De)},[$==null?void 0:$.rowId,$==null?void 0:$.url,ge]),a.useLayoutEffect(()=>{if(!u||Z){ue(null);return}const Le=$e.current,De=Le==null?void 0:Le.parentElement;if(!Le||!De){ue(null);return}const it=()=>{const ft=Le.querySelector("[data-list-row]");if(!ft){ue(null);return}const It=De.getBoundingClientRect(),pt=ft.getBoundingClientRect();ue(pt.top-It.top+pt.height/2)};it();const gt=new ResizeObserver(it);return gt.observe(Le),gt.observe(De),()=>gt.disconnect()},[u,Z,Ie,qe,_e,tt,t,e,st,je,fe,m,Q,Ae,Ge]);const on=a.useMemo(()=>!Z&&ss.some(Le=>{const De=Le.charAt(0),it=e[`${Le}VerticalAlign`];return Hc(it,e,De)}),[Z,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var zt;const Le=Pe.current;if(!Le)return;const De=()=>{Le.querySelectorAll("[data-list-col]").forEach(kt=>{kt.style.transform="";const Pt=kt.querySelector(`.${c}-list-col`);Pt&&(Pt.style.minHeight="",Pt.style.height="");const Vt=kt.querySelector(`.${c}-list-col-title`);Vt&&(Vt.style.transform="")})};if(Z||!on){De();return}const it=()=>{const kt=Array.from(Le.querySelectorAll("[data-list-row]")),Pt=`${c}-list-col`,Vt=`${c}-baseline-probe`;kt.forEach(Gt=>{Gt.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const Ot=Nt.querySelector(`.${Pt}`);Ot&&(Ot.style.minHeight="",Ot.style.height="");const Wt=Nt.querySelector(`.${c}-list-col-title`);Wt&&(Wt.style.transform="")})}),kt.forEach(Gt=>{const Nt=Array.from(Gt.querySelectorAll("[data-list-col]"));Tf(Gt,Nt,Pt)}),Le.offsetHeight,kt.forEach(Gt=>{const Nt=Array.from(Gt.querySelectorAll("[data-list-col]")),Ot=Gt.getBoundingClientRect().top,Wt=new Map,St=Nt.map(Re=>{const He=Re.querySelector(`.${c}-list-col-title`),ot={el:Re,titleEl:He,letter:Re.getAttribute("data-col-letter")??"",kind:Re.getAttribute("data-valign")??"top",anchor:Re.getAttribute("data-valign-anchor")};return Wt.set(ot.letter,ot),ot}),w=new Map,we=(Re,He)=>{const ot=w.get(Re.letter);if(ot!==void 0)return ot;const Mt=Re.anchor?Wt.get(Re.anchor):void 0;if(Re.kind!=="baseline"||!Mt||He.has(Re.letter)){const nn=na(Re,Ot,Pt,Vt);return w.set(Re.letter,nn),nn}He.add(Re.letter);const Qe=we(Mt,He);He.delete(Re.letter);const yt=na(Re,Ot,Pt,Vt),Dt=Qe-yt;Lf(Re.titleEl,Dt);const Lt=na(Re,Ot,Pt,Vt);return w.set(Re.letter,Lt),Lt};St.forEach(Re=>we(Re,new Set))})};let gt=null;const ft=()=>{gt===null&&(gt=requestAnimationFrame(()=>{gt=null,it()}))};it();const It=new ResizeObserver(()=>ft());It.observe(Le);let pt=!1;return typeof document<"u"&&((zt=document.fonts)!=null&&zt.ready)&&document.fonts.ready.then(()=>{pt||ft()}),()=>{pt=!0,gt!==null&&(cancelAnimationFrame(gt),gt=null),It.disconnect(),De()}},[on,Z,e,t,fe,Ie,je]);const mt=a.useMemo(()=>hf(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:mt}}),r.jsx("div",{style:Te,children:r.jsxs("div",{ref:Pe,className:`${c}-wrapper ${re}${Ve?` ${Ve}`:""}${Z?` ${c}-type-b`:""}`.trim(),style:{width:C.scalingValue(y??0,n)},onMouseMove:te?Kt:void 0,onMouseLeave:te?Jt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ie.map((Le,De)=>{var It;const it=(((It=Le.link)==null?void 0:It.length)??0)>0,gt=it&&(!n||i)?"a":"div",ft=Zs(De,Ie.length,Q,Ae,Ge,m??0,n??!1);return r.jsxs(gt,{ref:De===0?pt=>{$e.current=pt}:void 0,className:`${c}-list-item${it||x==="always"?` ${c}-list-item-has-link`:""}${Ge&&De===Ie.length-1?` ${c}-list-item-before-cut`:""}`,...it?{href:Le.link,target:"_blank"}:{},style:ft,onMouseEnter:pt=>{_&&(it||x==="always")&&Ks(pt,c),te&&_t(Le,pt)},onMouseLeave:pt=>{_&&(it||x==="always")&&Ys(pt,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${Z?"":` ${c}-list-cols-row-h`}${u&&De===0&&Z?` ${c}-list-cols-row-controls`:""}`,...Z?{}:{"data-list-row":""},style:Z?void 0:{minHeight:Ee(tt)},children:[st.map((pt,zt)=>{const kt=zt===st.length-1,Pt=Ke[zt],Vt=pt.paddingBottom,Gt=df(Le.cells[pt.key]),Nt=Z&&Gt&&Vt>0,Ot=Z?{minHeight:Ee(tt)}:{width:Ee(je[zt])},Wt=Z?{paddingLeft:Ee(ye),paddingRight:Ee(ye)}:{paddingLeft:Ee(Pt.paddingLeft),paddingRight:Ee(Pt.paddingRight)},St=pt.textPrefix.charAt(0),w=Z?xf(e[`${pt.textPrefix}VerticalAlign`]):vf(e[`${pt.textPrefix}VerticalAlign`],e,St),we=Z&&Gt&&u&&De===0;return Z&&!Gt?null:r.jsxs("div",{className:Z?`${c}-list-col-wrap`:void 0,...Z?{}:{"data-list-col":"","data-col-letter":St,"data-valign":w.kind,...w.kind==="baseline"?{"data-valign-anchor":w.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${kt?` ${c}-list-col-last`:""}`,style:{...Wt,...Ot,...Z?{justifyContent:el(w.kind)}:{}},"data-test":pt.width,children:r.jsx("span",{className:nl(e,pt.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...tl(fr(e,pt.textPrefix),n),...il(e,pt.textPrefix,c,n),...Z?{}:wf(w.kind)},children:Le.cells[pt.key]??null})}),Nt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(Vt)}}),we&&r.jsx("div",{"data-controls":pt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ee(Math.max(Vt,ia))}})]},pt.key)}),u&&De===0&&Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(ve),height:"100%"}}),r.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Me),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${c}-control-anchor`,style:{top:0,left:Ee(Math.max(ve,Be-ve)),width:Ee(ve),height:"100%"}})]})]}),!Z&&_e>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ee(_e)}}),u&&De===0&&!Z&&r.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${c}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Ee(rt)}})]},Le.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Tt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":Z?"center":"left-y",className:`${c}-control-anchor`,style:{top:lt,left:0,width:"100%",height:Ee(Math.max(qe,ia))}})},"row-padding-handles"),u&&!Z&&Ut&&Zt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Ut.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[0]-((xt==null?void 0:xt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ee(jt),height:"100%"}}),r.jsx("div",{"data-controls":Zt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[st.length-1]-((wt==null?void 0:wt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(vt-At),width:Ee(At),height:"100%"}})]},"column-edge-padding-handles"),u&&!Z&&st.slice(0,-1).map((Le,De)=>{const it=st[De+1],gt=We.slice(0,De+1).reduce((kt,Pt)=>kt+Pt,0),ft=Ke[De],It=Ke[De+1],pt=Math.max(ft.paddingRight,Ei),zt=Math.max(It.paddingLeft,Ei);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Le.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(je[De]-ft.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(gt-pt),width:Ee(pt),height:"100%"}}),r.jsx("div",{"data-controls":it.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(je[De+1]-It.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ke??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ee(gt),width:Ee(zt),height:"100%"}})]},`${Le.paddingRightKey}-padding`)}),u&&!Z&&st.slice(0,-1).map((Le,De)=>{const it=Bf(De,We,be,Be),ft=We.slice(0,De+1).reduce((It,pt)=>It+pt,0)-ol/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Le.widthKey,"data-controls-axis":"x","data-controls-min":String(cs),"data-controls-max-fraction":String(it),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ee(ft),width:Ee(ol),height:"calc(100%)",pointerEvents:"auto"}})},`${Le.widthKey}-junction`)})]}),Ge&&(()=>{const Le=fr(e,An),De=Sf(e.cutLabelVerticalAlign),it=Le.textTextAlign==="justify"||Z;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ee(T??0),cursor:at?"pointer":"default",...uf(Ae,m??0,n??!1)},onClick:at?Je:void 0,onMouseEnter:_||te?Ct:void 0,onMouseLeave:_?Ht:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...Z?{paddingLeft:Ee(ye),paddingRight:Ee(ye)}:{},justifyContent:$f(Le.textTextAlign),alignItems:el(De)},children:r.jsx("span",{className:nl(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...tl(Le,n),...il(e,An,c,n),...it?{width:"100%"}:{}},children:G})})})})(),te&&$&&(()=>{const Le=`${$.widthPx}px`,De={width:Le,height:"auto",maxHeight:Le,objectFit:"contain"};return r.jsx("div",{ref:Fe,className:`${c}-hover-media-anchor`,children:r.jsx(cf,{media:$,className:$.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:De},`${$.rowId}-${$.url}`)})})()]})})]})}const Xf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10229
10229
  import { CommonComponentProps } from '../props';
10230
10230
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10231
10231
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -13478,7 +13478,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13478
13478
  pointer-events: none;
13479
13479
  z-index: 2;
13480
13480
  }
13481
- `}function pl(e,t,n,i,o,s,l,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:s??0,textAppearance:l,color:d??"#000000"}}function fy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=C.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:y="default",autoclose:g="off",icon:h,iconMaxWidth:m=.00833,iconPaddingRight:b=0,iconAnimation:I="rotate 45",questionColor:R="#000000",answerColor:T="#000000",dividerColor:q="#0000001F",iconColor:A="#000000",questionHoverColor:G="#666666",iconHoverColor:k="#666666",iconActiveColor:L="#000000",dividerHoverColor:D="#000000",questionFontFamily:x,questionFontSettings:W,questionFontSize:M,questionLineHeight:Y,questionLetterSpacing:F,questionWordSpacing:U,questionTextAppearance:V,answerFontFamily:z,answerFontSettings:ie,answerFontSize:S,answerLineHeight:E,answerLetterSpacing:O,answerWordSpacing:le,answerTextAppearance:oe,questionPaddingLeft:$=0,questionPaddingTop:ae=0,questionPaddingBottom:P=0,answerPaddingLeft:te=0,answerPaddingRight:K=0,answerPaddingTop:xe=0,answerPaddingBottom:Fe=0}=e,ge=t??[],[ce,X]=a.useState(()=>new Set),ee=!n||i;a.useEffect(()=>{X(new Set)},[g]),a.useEffect(()=>{n&&!o&&!i&&X(new Set)},[n,o,i]);const Z=Ke=>C.scalingValue(Ke,n??!1),Pe=Math.max($,Nn),$e=Math.max(ae,Nn),ke=Math.max(P,Nn),ue=Math.max(te,Nn),fe=Math.max(K,Nn),Se=Math.max(xe,Nn),B=Math.max(Fe,Nn),se=Math.max(0,(c??1)-b-m),ye=Math.max(0,(c??1)-K),ve=Math.max(0,(c??1)-te),Me=Math.max(b,Nn),Te=Math.max(0,(c??1)-$-m),H=a.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),he=a.useCallback(Ke=>ce.has(Ke),[ce]),re=ee&&y==="default"?`${l}-entry-hover-default`:"",_=h??"",Q=_!=="",Ae=I.replace(/^rotate /,""),de=`${l}-icon-anim-${Ae}`,N=rn(Xt(pl(x,W,M,Y,F,U,V,R),n)),Ue=rn(Xt(pl(z,ie,S,E,O,le,oe,T),n)),Oe=dl(M,Y,`${l}-question`,`${l}-text-tight-leading`),dt=dl(S,E,`${l}-answer-text`,`${l}-text-tight-leading`),nt=ul(M,Y,l,n),ht=ul(S,E,l,n),st=C.buildColorVars(l,{questionColor:R,answerColor:T,dividerColor:q,iconColor:A,questionHoverColor:G,iconHoverColor:k,iconActiveColor:L,dividerHoverColor:D},py,my),Be=s&&s!=="default"?`${l}-state-${s}`:"",be=a.useCallback(Ke=>{ee&&X(ne=>{if(ne.has(Ke)){const Ie=new Set(ne);return Ie.delete(Ke),Ie}if(g==="on")return new Set([Ke]);const me=new Set(ne);return me.add(Ke),me})},[ee,g]),We=a.useMemo(()=>hy(l),[l]),je={[`--${l}-divider-width`]:C.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:C.scalingValue(m,n??!1),...u>0?{[`--${l}-question-min-height`]:C.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:We}}),r.jsx("div",{style:st,children:r.jsx("div",{className:ut(`${l}-wrapper`,n&&!i&&`${l}-editor`,re,Be),style:{width:C.scalingValue(c,n??!1),maxWidth:"100%",...je},children:ge.map((Ke,ne)=>{var at;const me=he(ne),Ie=((at=Ke.question)==null?void 0:at.trim())??"",Ge=Ke.answer,Ze=((Ge==null?void 0:Ge.length)??0)>0,Ve=d&&ne===H;return r.jsxs("div",{className:ut(`${l}-item`,me&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[Ve&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:Z($e)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(se),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(Pe),height:"100%"}}),r.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(Me),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":me,style:{...N,...nt,paddingLeft:Z($),paddingRight:Z(b)},onClick:()=>be(ne),children:[ae>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Oe,children:Ie}),Ze&&(Q?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(an,{url:_,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${de}`,"aria-hidden":"true"}))]}),P>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(P)},"aria-hidden":"true"})]}),Ve&&r.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Z(ke)}})]}),Ze&&Ge&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!me,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[Ve&&me&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:Z(Se)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(ue),height:"100%"}}),r.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ve),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(fe),height:"100%"}})]}),xe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(xe)}}),r.jsx("div",{className:`${l}-answer`,style:{...Ue,...ht,paddingLeft:Z(te),paddingRight:Z(K)},children:r.jsx("div",{className:dt,children:r.jsx(yi,{content:Ge})})}),Fe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(Fe)}}),Ve&&me&&r.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Z(B)}})]})})})]},ne)})})})]})}const yy=`import { useCallback, useEffect, useMemo, useState } from 'react';
13481
+ `}function pl(e,t,n,i,o,s,l,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:s??0,textAppearance:l,color:d??"#000000"}}function fy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:l}=C.useScopedStyles(),d=o??!1,{wrapperWidth:c=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:v="solid",entryHoverEffect:y="default",autoclose:g="off",icon:h,iconMaxWidth:m=.00833,iconPaddingRight:b=0,iconAnimation:I="rotate 45",questionColor:R="#000000",answerColor:T="#000000",dividerColor:G="#0000001F",iconColor:A="#000000",questionHoverColor:V="#666666",iconHoverColor:k="#666666",iconActiveColor:L="#000000",dividerHoverColor:D="#000000",questionFontFamily:x,questionFontSettings:W,questionFontSize:M,questionLineHeight:Y,questionLetterSpacing:F,questionWordSpacing:U,questionTextAppearance:B,answerFontFamily:j,answerFontSettings:ie,answerFontSize:S,answerLineHeight:E,answerLetterSpacing:O,answerWordSpacing:le,answerTextAppearance:oe,questionPaddingLeft:$=0,questionPaddingTop:ae=0,questionPaddingBottom:P=0,answerPaddingLeft:te=0,answerPaddingRight:K=0,answerPaddingTop:xe=0,answerPaddingBottom:Fe=0}=e,ge=t??[],[ce,X]=a.useState(()=>new Set),ee=!n||i;a.useEffect(()=>{X(new Set)},[g]),a.useEffect(()=>{n&&!o&&!i&&X(new Set)},[n,o,i]);const Z=Ke=>C.scalingValue(Ke,n??!1),Pe=Math.max($,Nn),$e=Math.max(ae,Nn),ke=Math.max(P,Nn),ue=Math.max(te,Nn),fe=Math.max(K,Nn),Se=Math.max(xe,Nn),z=Math.max(Fe,Nn),se=Math.max(0,(c??1)-b-m),ye=Math.max(0,(c??1)-K),ve=Math.max(0,(c??1)-te),Me=Math.max(b,Nn),Te=Math.max(0,(c??1)-$-m),H=a.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),he=a.useCallback(Ke=>ce.has(Ke),[ce]),re=ee&&y==="default"?`${l}-entry-hover-default`:"",_=h??"",Q=_!=="",Ae=I.replace(/^rotate /,""),de=`${l}-icon-anim-${Ae}`,N=rn(Xt(pl(x,W,M,Y,F,U,B,R),n)),Ue=rn(Xt(pl(j,ie,S,E,O,le,oe,T),n)),Oe=dl(M,Y,`${l}-question`,`${l}-text-tight-leading`),dt=dl(S,E,`${l}-answer-text`,`${l}-text-tight-leading`),nt=ul(M,Y,l,n),ht=ul(S,E,l,n),st=C.buildColorVars(l,{questionColor:R,answerColor:T,dividerColor:G,iconColor:A,questionHoverColor:V,iconHoverColor:k,iconActiveColor:L,dividerHoverColor:D},py,my),Be=s&&s!=="default"?`${l}-state-${s}`:"",be=a.useCallback(Ke=>{ee&&X(ne=>{if(ne.has(Ke)){const Ie=new Set(ne);return Ie.delete(Ke),Ie}if(g==="on")return new Set([Ke]);const me=new Set(ne);return me.add(Ke),me})},[ee,g]),We=a.useMemo(()=>hy(l),[l]),je={[`--${l}-divider-width`]:C.scalingValue(p,n??!1),[`--${l}-divider-style`]:v,[`--${l}-icon-max-width`]:C.scalingValue(m,n??!1),...u>0?{[`--${l}-question-min-height`]:C.scalingValue(u,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:We}}),r.jsx("div",{style:st,children:r.jsx("div",{className:ut(`${l}-wrapper`,n&&!i&&`${l}-editor`,re,Be),style:{width:C.scalingValue(c,n??!1),maxWidth:"100%",...je},children:ge.map((Ke,ne)=>{var at;const me=he(ne),Ie=((at=Ke.question)==null?void 0:at.trim())??"",Ge=Ke.answer,Ze=((Ge==null?void 0:Ge.length)??0)>0,Ve=d&&ne===H;return r.jsxs("div",{className:ut(`${l}-item`,me&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[Ve&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:Z($e)}}),r.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(se),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(Pe),height:"100%"}}),r.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Te),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(Me),height:"100%"}})]}),r.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":me,style:{...N,...nt,paddingLeft:Z($),paddingRight:Z(b)},onClick:()=>be(ne),children:[ae>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:Oe,children:Ie}),Ze&&(Q?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(an,{url:_,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):r.jsx("span",{className:`${l}-icon ${l}-icon-default ${de}`,"aria-hidden":"true"}))]}),P>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(P)},"aria-hidden":"true"})]}),Ve&&r.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Z(ke)}})]}),Ze&&Ge&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!me,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[Ve&&me&&r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:Z(Se)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(ue),height:"100%"}}),r.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ve),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(fe),height:"100%"}})]}),xe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(xe)}}),r.jsx("div",{className:`${l}-answer`,style:{...Ue,...ht,paddingLeft:Z(te),paddingRight:Z(K)},children:r.jsx("div",{className:dt,children:r.jsx(yi,{content:Ge})})}),Fe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(Fe)}}),Ve&&me&&r.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:Z(z)}})]})})})]},ne)})})})]})}const yy=`import { useCallback, useEffect, useMemo, useState } from 'react';
13482
13482
  import cn from 'classnames';
13483
13483
  import { CommonComponentProps } from '../props';
13484
13484
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14226,7 +14226,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14226
14226
  </>
14227
14227
  );
14228
14228
  }
14229
- `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ml={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vy=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],xy={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:On("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:{...ml.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:{...ml.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:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...vy],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},by={element:fy,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:xy,sourceCode:yy},Fn=e=>e.display==="cover",Fr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},gl=100,wy=.2,hl=8,Bc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const p=a.useMemo(()=>typeof window>"u"?gl:Math.max(gl,window.innerHeight*wy),[]),v=a.useCallback(x=>Math.max(0,1-x/(p*1.5)),[p]),y=a.useCallback(x=>Math.max(0,1-x/(p*.45)),[p]),g=a.useCallback(x=>{const W=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-x/W*.12);return`translateY(${x}px) scale(${M})`},[]),h=a.useCallback(()=>{c.current=null},[]),m=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),b=a.useCallback(()=>{const x=typeof window<"u"?window.innerHeight:800;d(!0),s(x),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),I=a.useCallback(x=>{!e||l||x.pointerType==="touch"&&(i!=null&&i(x.target)||(c.current={startX:x.clientX,startY:x.clientY,isLocked:null,pointerId:x.pointerId}))},[e,l,i]),R=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=x.clientX-W.startX,Y=x.clientY-W.startY;if(W.isLocked===null){if(Math.abs(M)<hl&&Math.abs(Y)<hl)return;if(Y>0&&Y>Math.abs(M))W.isLocked=!0,x.currentTarget.setPointerCapture(x.pointerId);else{W.isLocked=!1,h();return}}if(!W.isLocked)return;x.preventDefault();const F=Math.max(0,Y);u.current=F,s(F)},[e,h]),T=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=W.isLocked===!0;if(x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),!M){h();return}x.clientY-W.startY>=p?b():m()},[p,b,e,h,m]),q=a.useCallback(x=>{T(x)},[T]),A=a.useCallback(x=>{T(x)},[T]),G=o>0,k=l?`transform ${n}ms ease`:"none",L=l?`opacity ${n}ms ease`:"none",D=o>0||l;return{isSwipeDragging:G,backdropStyle:{opacity:v(o),transition:L},mediaAreaStyle:{transform:g(o),transition:k,touchAction:G?"none":void 0,willChange:G?"transform":void 0},overlayContentStyle:D?{opacity:y(o),transition:L}:void 0,swipeHandlers:e?{onPointerDown:I,onPointerMove:R,onPointerUp:q,onPointerCancel:A}:{},dismissAreaStyle:e?{touchAction:G?"none":"pan-x"}:void 0}},Sy="[data-lightbox-scrollable]",Vc=()=>{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,s=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 l=d=>{const c=d.target;c instanceof Element&&c.closest(Sy)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},$y=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Cy=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ty=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Ly=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,m)=>{Cy(t),e.scrollLeft=h,m&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const y=()=>{t.removeEventListener("transitionend",g),clearTimeout(v)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,y(),u(n,!0))};return t.addEventListener("transitionend",g),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(()=>{p||(p=!0,y(),u(n,!0))},i+64),()=>{p||(p=!0,y(),u(l-Ty(t),!1))}},mo=300,Ry=900,Iy=1500,Ey="cubic-bezier(0.16, 1, 0.3, 1)",My=3e3,Py=2,ky=16,Ay=.05,Fy=1,Ko=.3,Wy=50,_y=20,$i=.004,qi=["title1","title2","title3"],Hy={title1:"1",title2:"2",title3:"3"},Ny={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Oy={title1:.02,title2:.02,title3:.02},Yo=e=>`max(${e}, ${_y}px)`,Dy=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]}},jy=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=Dy(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,zy=e=>[Bt(e,"fontFamily"),Bt(e,"fontSettings"),{type:"row",items:[Bt(e,"fontSize"),Bt(e,"lineHeight"),Bt(e,"letterSpacing"),Bt(e,"wordSpacing")]},Bt(e,"textAlign"),Bt(e,"textAppearance")],By=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(qi.map(e=>[Hy[e],zy(e)]))}),us=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Gc=(e,t)=>us(e,t),Zo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},fl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:us(e.length,n),effective:Gc(e.length,n)}},Vy=(e,t,n,i,o,s,l)=>{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:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},ra=(e,t)=>{const n=i=>{const o=Bt(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[Ny[t]]}},Gy=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),aa=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Oy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},qy=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:y,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:m,thumbnailTrigger:b,thumbnailVisibility:I,thumbnailObjectFit:R,thumbnailActive:T,thumbnailActiveColor:q,title1Width:A,title2Width:G,title3Width:k,title1MarginLeft:L=0,title2MarginLeft:D=0,title3MarginLeft:x=0,titleRowMarginBottom:W=0,titleHeaderLayout:M="desktop",contentMarginTop:Y,iconMarginLeft:F}=n,U=f=>C.scalingValue(f,i??!1),V=c??n.thumnailSize??.03,z=U(V),ie=U(u),S=U(p??.02),E=U(v??0),O=U(Y??0),le=Yo(O),oe=U(F??0),[$,ae]=a.useState(0),P=a.useRef($);P.current=$;const te=t[$],{title1:K,title2:xe,title3:Fe}=jy(te),ge=aa("title1",ra(n,"title1"),i),ce=aa("title2",ra(n,"title2"),i),X=aa("title3",ra(n,"title3"),i),ee=M==="mobile",Z=!o&&(!i||s),Pe=Z,$e=Z,ke=Z,ue=Fn(R),fe=ue?{"--image-aspect-ratio":Fr(R)}:void 0,Se=!!(K||xe||Fe),B=a.useMemo(()=>Vy(e,K,xe,Fe,ge,ce,X),[e,$,K,xe,Fe,ge,ce,X]),se=a.useMemo(()=>({title1Width:A,title2Width:G,title3Width:k}),[A,G,k]),ye=a.useMemo(()=>B.map(f=>se[f.widthKey]),[B,se]),ve=a.useMemo(()=>us(B.length,ye),[B.length,ye]),Me=a.useMemo(()=>Gc(B.length,ye),[B.length,ye]),Te=a.useMemo(()=>B.filter(f=>f.prefix==="title1"),[B]),H=a.useMemo(()=>B.filter(f=>f.prefix==="title2"||f.prefix==="title3"),[B]),he=a.useMemo(()=>fl(Te,se),[Te,se]),re=a.useMemo(()=>fl(H,se),[H,se]),_=a.useCallback((f,j)=>{const J=B.indexOf(f);if(!ee||j==="single-row")return{effectiveWidth:Me[J]??0,resolvedWidth:ve[J]??0,maxWidth:Zo(J,ve)};if(j==="two-row-top"){const Ne=Te.indexOf(f);return{effectiveWidth:he.effective[Ne]??0,resolvedWidth:he.resolved[Ne]??0,maxWidth:Zo(Ne,he.resolved)}}const Ce=H.indexOf(f);return{effectiveWidth:re.effective[Ce]??0,resolvedWidth:re.resolved[Ce]??0,maxWidth:Zo(Ce,re.resolved)}},[H,re,Me,ve,B,Te,he,ee]),Q=a.useCallback(f=>C.scalingValue(f,i??!1),[i]),Ae=Q(W??0),de=a.useMemo(()=>({title1MarginLeft:L,title2MarginLeft:D,title3MarginLeft:x}),[L,D,x]),N=a.useCallback(f=>B.slice(0,f+1).reduce((j,J,Ce)=>j+(J!=null&&J.marginLeftKey?de[J.marginLeftKey]??0:0)+(ve[Ce]??0),0)+(ee?0:L??0),[B,de,ve,ee,L]),Ue=a.useCallback(()=>ee?0:L??0,[ee,L]),Oe=a.useCallback(f=>H.slice(0,f).reduce((j,J,Ce)=>j+(J.marginLeftKey?de[J.marginLeftKey]??0:0)+(re.resolved[Ce]??0),0),[H,re.resolved,de]),dt=a.useCallback(f=>{const j=H[f];return Oe(f)+(j.marginLeftKey?de[j.marginLeftKey]??0:0)+(re.resolved[f]??0)},[H,re.resolved,Oe,de]),nt=(f,j)=>{const J=f.marginLeftKey?de[f.marginLeftKey]??0:0,{effectiveWidth:Ce,resolvedWidth:Ne,maxWidth:Ye}=_(f,j),bt=o&&j==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":f.prefix,style:{...j==="single-row"?{gridArea:f.prefix}:{},width:Q(Ce),...J>0?{marginLeft:Q(J)}:{}},children:[r.jsx("p",{className:f.className,style:f.style,children:f.text}),bt&&f.marginLeftKey&&r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:Q(-J),width:`max(${Q(J)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ye),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:Q(-$i/2),width:Q($i),height:"100%",pointerEvents:"auto"}})]},f.className)},ht=()=>{const f=ee?-1:B.findIndex(Ce=>Ce.prefix==="title1"),j=!ee&&(o||(L??0)>0)?(()=>{const Ce=L??0,Ne=f>=0?ve[f]:A??0;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:`max(${Q(Ce)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,J=B.flatMap((Ce,Ne)=>{if(!Ce.marginLeftKey)return[];const Ye=de[Ce.marginLeftKey]??0,bt=Gy(B,ve,de,Ne)+Ue();return r.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ve[Ne]),style:{position:"absolute",top:0,left:Q(bt),width:`max(${Q(Ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)});return j?[j,...J]:J},st=()=>B.map((f,j)=>{const J=Zo(j,ve),Ne=N(j)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:Q(Ne),width:Q($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),Be=()=>H.flatMap((f,j)=>{if(!f.marginLeftKey)return[];const J=de[f.marginLeftKey]??0,Ce=Oe(j),{resolvedWidth:Ne}=_(f,"two-row-bottom");return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:Q(Ce),width:`max(${Q(J)}, 10px)`,height:"100%",pointerEvents:"auto"}},f.marginLeftKey)}),be=()=>H.map((f,j)=>{const{maxWidth:J}=_(f,"two-row-bottom"),Ne=dt(j)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:Q(Ne),width:Q($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),We=a.useRef(null),je=a.useRef(null),Ke=a.useRef(null),ne=a.useRef(null),me=a.useRef([]),Ie=a.useRef([]),Ge=a.useRef(0),Ze=a.useRef(null),Ve=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),at=a.useRef(null),Je=a.useRef(null),Ee=a.useRef(0),qe=a.useRef("forward"),_e=a.useRef(0),tt=a.useRef(null),rt=a.useRef(!1),lt=t.length>1&&(!o||!!s),Tt=lt?3:1,Ut=a.useMemo(()=>Array.from({length:Tt},()=>t).flat(),[t,Tt]),[Zt,xt]=a.useState(!1),[wt,jt]=a.useState(!1),[At,vt]=a.useState(!0),Ft=a.useRef(null),_t=a.useRef(null),Kt=a.useRef(!1),Jt=a.useRef(!1),Ct=a.useRef(null),Ht=a.useRef(null),on=Pe&&!At,mt=a.useCallback(()=>{Pe&&(vt(!0),Ht.current&&clearTimeout(Ht.current),Ht.current=setTimeout(()=>{Ve.current.isActive||vt(!1)},My))},[Pe]),Le=a.useCallback(()=>{o||Jt.current||(Jt.current=!0,jt(!1),Ct.current=setTimeout(()=>{l()},mo))},[o,l]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:C.scalingValue(g??0,i),height:C.scalingValue(g??0,i),marginRight:oe,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Le,"aria-label":"Close",children:r.jsx(an,{url:y,fill:h,hoverFill:i&&!s?h:m,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:oe,height:"100%",pointerEvents:"auto"}})]}),it=(f="two-row")=>r.jsx("div",{...f==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:Q(L??0),flexShrink:0,...f==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...f==="two-row"&&o?{pointerEvents:"auto"}:{}}}),gt=()=>{const f=B.find(Ce=>Ce.prefix==="title1"),j=B.filter(Ce=>Ce.prefix==="title2"||Ce.prefix==="title3"),J=j.length>0||o||(W??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(L??0)>0||o?it():null,f&&nt(f,"two-row-top"),y&&De()]}),J?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[j.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[j.map(Ce=>nt(Ce,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Be(),be()]})]}):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:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>r.jsxs(r.Fragment,{children:[(L??0)>0||o?it("single-row"):null,B.map(f=>nt(f,"single-row")),o?r.jsxs(r.Fragment,{children:[ht(),st()]}):null,y?De():null]}),It=a.useCallback(f=>!!(f.closest("[data-controls]")||f.closest(`.${e}-thumbnails`)||f.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:pt,backdropStyle:zt,mediaAreaStyle:kt,overlayContentStyle:Pt,swipeHandlers:Vt,dismissAreaStyle:Gt}=Bc({enabled:Z??!1,onClose:Le,animMs:mo,isBlockedTarget:It}),Nt=()=>{if(!lt||t.length===0)return Ge.current=0,0;const f=Ie.current[0],j=Ie.current[t.length];if(!f||!j)return Ge.current;const J=j.offsetLeft-f.offsetLeft;return J>0&&(Ge.current=J),Ge.current},Ot=(f=!1)=>{if(!lt)return;const j=je.current,J=Nt();!j||J<=0||J<j.clientWidth*.25||(j.scrollLeft<=0?(j.scrollLeft+=J,f&&(Ve.current.scrollLeft+=J),rt.current&&(_e.current+=J)):j.scrollLeft>=J*2&&(j.scrollLeft-=J,f&&(Ve.current.scrollLeft-=J),rt.current&&(_e.current-=J)))},Wt=(f,j=(J=>(J=je.current)==null?void 0:J.scrollLeft)()??0)=>{if(!lt)return f;let Ce=t.length+f,Ne=1/0;for(let Ye=0;Ye<Tt;Ye++){const bt=Ye*t.length+f,Rt=Ie.current[bt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-j);tn<Ne&&(Ne=tn,Ce=bt)}return Ce},St=f=>{const j=je.current;return!f||!j?!1:f.offsetWidth>j.clientWidth+1},w=f=>{const j=je.current;if(!f||!j||!St(f))return!1;const J=f.offsetLeft,Ce=J+f.offsetWidth;return j.scrollLeft>=J-1&&j.scrollLeft+j.clientWidth<=Ce+1},we=(f=(j=>(j=je.current)==null?void 0:j.scrollLeft)()??0)=>{for(let Ce=0;Ce<Ie.current.length;Ce+=1){const Ne=Ie.current[Ce];if(Ne&&w(Ne))return Ce}let J={flatIndex:0,distance:1/0};return Ie.current.forEach((Ce,Ne)=>{if(!Ce)return;const Ye=Math.abs(Ce.offsetLeft-f);Ye<J.distance&&(J={flatIndex:Ne,distance:Ye})}),J.flatIndex},Re=f=>{je.current&&Ie.current.forEach(j=>{j&&(j.style.scrollSnapAlign=St(j)&&f==="backward"?"end":"start")})},He=(f,j,J)=>{const Ce=f-j,Ne=we(j),Ye=Ie.current[Ne];if(w(Ye))return we(f)%t.length;const bt=Ie.current[Ne+1],Rt=Ye?bt?bt.offsetLeft-Ye.offsetLeft:Ye.offsetWidth:0,tn=Rt>0?Ce>Rt*Ko?1:Ce<-Rt*Ko?-1:0:0;return tn===0?J:lt?(J+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,J+tn))},ot=a.useCallback((f=!1)=>{if(I!=="on"||o)return;const j=ne.current,J=P.current,Ce=me.current[J];if(!j||!Ce||j.scrollWidth<=j.clientWidth)return;const Ne=j.scrollLeft,Ye=Ne+j.clientWidth,bt=Ce.offsetLeft,Rt=bt+Ce.offsetWidth;if(bt>=Ne&&Rt<=Ye)return;const tn=j.scrollWidth-j.clientWidth;let Qt=Ne;if(!f&&Ft.current===null){const bi=me.current[J-1],eo=me.current[J+1],Oo=bi?Ce.offsetLeft-bi.offsetLeft:eo?eo.offsetLeft-Ce.offsetLeft:Ce.offsetWidth;Rt>Ye?Qt+=Oo:bt<Ne&&(Qt-=Oo)}else Rt>Ye?Qt=Rt-j.clientWidth:Qt=bt;j.scrollLeft=Math.max(0,Math.min(tn,Qt))},[o,I]),Mt=a.useCallback((f=!1)=>{f&&(Kt.current=!0),_t.current===null&&(_t.current=requestAnimationFrame(()=>{_t.current=null;const j=Kt.current;Kt.current=!1,ot(j)}))},[ot]),Qe=a.useCallback(f=>{if(f===P.current)return;const j=P.current;P.current=f;const J=Math.abs(f-j)>1,Ce=lt&&t.length>1&&(j===t.length-1&&f===0||j===0&&f===t.length-1);ae(f),Mt(J||Ce)},[t.length,lt,Mt]),yt=()=>{if(!je.current||t.length===0||Ft.current!==null||Ve.current.isActive&&Ve.current.hasMoved)return;const f=je.current.scrollLeft,j=we(f)%t.length;j!==P.current&&Qe(j)},Dt=()=>{Ft.current=null},Lt=f=>{const j=je.current;j&&(j.style.scrollSnapType=f?"":"none")},nn=()=>{var f;(f=Je.current)==null||f.call(Je),Je.current=null},dn=()=>{tt.current!==null&&(cancelAnimationFrame(tt.current),tt.current=null),rt.current=!1},ei=()=>{const f=je.current;if(!f){tt.current=null,rt.current=!1;return}const j=_e.current-f.scrollLeft;if(Math.abs(j)<.5){f.scrollLeft=_e.current,Ot(),yt(),tt.current=null,rt.current=!1;return}f.scrollLeft+=j*Ay,Ot(),yt(),mt(),tt.current=requestAnimationFrame(ei)},ti=()=>{const f=Ke.current;f&&(f.style.transition="",f.style.transform="",f.style.willChange="")},Wo=(f,j,J,Ce)=>{ti(),f.scrollLeft=j,Ee.current=f.scrollLeft,Ot(),J!==void 0?(P.current=J,ae(J)):yt(),Lt(!0),Ce==null||Ce()},_o=(f,{behavior:j="smooth",activeIndex:J,onComplete:Ce}={})=>{const Ne=je.current,Ye=Ke.current;if(!Ne||!Ye)return;if(dn(),nn(),Lt(!1),j==="auto"){Wo(Ne,f,J,Ce);return}const bt=Math.abs(f-Ne.scrollLeft),Rt=$y(bt,Ry,Iy,Ne.clientWidth*.55);Je.current=Ly(Ne,Ye,f,{duration:Rt,easing:Ey,onComplete:()=>{Je.current=null,Wo(Ne,f,J,Ce)}})},_r=(f="smooth")=>{const j=je.current;if(!j||t.length===0)return;const J=we()%t.length,Ce=Wt(J,j.scrollLeft),Ne=Ie.current[Ce];Ne&&_o(Ne.offsetLeft,{behavior:f,activeIndex:J})},Hr=(f,j="smooth",J,Ce)=>{const Ne=je.current;if(!Ne||t.length===0)return;const Ye=(Ce??Ne.scrollLeft)-f,bt=we(f),Rt=Ie.current[bt];if(w(Rt)){Lt(!0),yt();return}const tn=Ie.current[bt+1],Qt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?Ye>Qt*Ko?1:Ye<-Qt*Ko?-1:0:0)!==0){const cd=J??bt%t.length,dd=He(Ce??Ne.scrollLeft,f,cd);Sn(dd,j);return}const eo=Ce??Ne.scrollLeft,Oo=we(eo),ms=Ie.current[Oo];if(ms&&Math.abs(ms.offsetLeft-eo)<1){Lt(!0),yt();return}_r("auto")},Sn=(f,j="smooth")=>{const J=je.current;if(!J||t.length===0)return;const Ce=Wt(f,J.scrollLeft),Ne=Ie.current[Ce];Ne&&(j==="smooth"?Ft.current=f:Ft.current=null,P.current=f,ae(f),Mt(!0),_o(Ne.offsetLeft,{behavior:j,activeIndex:f,onComplete:j==="smooth"?Dt:void 0}))},xi=()=>{at.current&&(window.removeEventListener("pointerup",at.current),window.removeEventListener("pointercancel",at.current),at.current=null)},Ho=(f,j,J,Ce,Ne)=>{const Ye=J-f,bt=Ce-j,Rt=Math.abs(Ye),tn=Math.abs(bt);if(Rt<Wy||Rt<=tn)return!1;const Qt=Ye<0?1:-1,bi=lt?(Ne+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ne+Qt));return bi===Ne?!1:(Sn(bi),!0)},ni=f=>{if(!Ve.current.isActive)return;xi();const j=je.current;if(!j)return;const{scrollLeft:J,startActiveIndex:Ce,hasMoved:Ne}=Ve.current,Ye=j.scrollLeft;Ot(!0),Ve.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},xt(!1),f!==void 0&&j.hasPointerCapture(f)&&j.releasePointerCapture(f),Ne?Hr(J,"smooth",Ce,Ye):(Lt(!0),yt()),mt()},No=(f,j)=>{const J=Ze.current;Ze.current=null,J&&(Ho(J.startX,J.startY,f,j,J.startActiveIndex),mt())},Nr=f=>{if(!$e)return;if(f.pointerType==="touch"){if(dn(),Lt(!0),It(f.target))return;Ze.current={startX:f.clientX,startY:f.clientY,startActiveIndex:P.current};return}if(f.pointerType!=="mouse"||f.button!==0||It(f.target))return;const j=je.current;if(!j)return;dn(),nn(),ti(),Ft.current=null,Ve.current={isActive:!0,startX:f.clientX,scrollLeft:j.scrollLeft,startActiveIndex:P.current,hasMoved:!1},Lt(!1),mt(),j.setPointerCapture(f.pointerId),xi();const J=Ce=>{Ce.pointerType==="mouse"&&ni(Ce.pointerId)};at.current=J,window.addEventListener("pointerup",J),window.addEventListener("pointercancel",J)},Or=f=>{if(!$e||f.pointerType!=="mouse")return;const j=je.current;if(!j||!Ve.current.isActive)return;if(f.buttons===0){ni(f.pointerId);return}const J=f.clientX-Ve.current.startX;Math.abs(J)>Fy&&(Ve.current.hasMoved=!0,xt(!0)),Ve.current.hasMoved&&(f.preventDefault(),j.scrollLeft=Ve.current.scrollLeft-J,Ot(!0),yt(),mt())},pe=f=>{if($e){if(f.pointerType==="touch"){f.type==="pointerup"?No(f.clientX,f.clientY):Ze.current=null;return}f.pointerType==="mouse"&&ni(f.pointerId)}},ze=f=>{!$e||f.pointerType!=="mouse"||ni(f.pointerId)};return Vc(),a.useEffect(()=>{const f=requestAnimationFrame(()=>jt(!0));return()=>{cancelAnimationFrame(f),nn(),xi(),_t.current!==null&&(cancelAnimationFrame(_t.current),_t.current=null),Ct.current&&clearTimeout(Ct.current),Ht.current&&clearTimeout(Ht.current)}},[]),a.useEffect(()=>{if(!Pe){vt(!0);return}mt();const f=We.current;if(!f)return;const j=()=>mt();return f.addEventListener("pointermove",j),f.addEventListener("pointerdown",j),()=>{f.removeEventListener("pointermove",j),f.removeEventListener("pointerdown",j),Ht.current&&clearTimeout(Ht.current)}},[Pe,mt]),a.useEffect(()=>{const f=j=>{j.key==="Escape"&&Le()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[Le]),a.useLayoutEffect(()=>{Nt()},[E,t.length,lt]),a.useLayoutEffect(()=>{o||Sn(P.current,"auto")},[E,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,lt]),a.useEffect(()=>{const f=je.current;if(!f||o||!Z)return;const j=J=>{if(J.preventDefault(),Math.abs(J.deltaY)<=Math.abs(J.deltaX))return;const Ce=J.deltaMode===1?ky:J.deltaMode===2?f.clientHeight:1,Ne=J.deltaY*Ce*Py;if(Ne!==0){if(nn(),rt.current||(rt.current=!0,_e.current=f.scrollLeft,Ft.current=null,Lt(!1)),_e.current+=Ne,!lt){const Ye=f.scrollWidth-f.clientWidth;_e.current=Math.max(0,Math.min(Ye,_e.current))}mt(),tt.current===null&&(tt.current=requestAnimationFrame(ei))}};return f.addEventListener("wheel",j,{passive:!1}),()=>{f.removeEventListener("wheel",j),dn()}},[o,Z,lt]),a.useEffect(()=>{const f=je.current;if(!f)return;const j=()=>{Ot(Ve.current.isActive);const Ce=f.scrollLeft,Ne=Ce-Ee.current;Ee.current=Ce;const Ye=Ge.current>0?Ge.current*.5:1/0;if(Ne!==0&&Math.abs(Ne)<Ye){const bt=Ne>0?"forward":"backward";bt!==qe.current&&(qe.current=bt,Re(bt))}Ve.current.isActive&&Ve.current.hasMoved||yt()};f.addEventListener("scroll",j,{passive:!0});const J=new ResizeObserver(()=>{Nt(),Ot(Ve.current.isActive),Re(qe.current),yt()});return J.observe(f),()=>{nn(),f.removeEventListener("scroll",j),J.disconnect()}},[t.length,lt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{pt||Le()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${mo}ms ease`,pointerEvents:wt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...zt}}),r.jsxs("div",{ref:We,className:`${e}-lightbox-dismiss-area`,style:Gt,...Vt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:f=>f.stopPropagation(),children:r.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":$e&&t.length>0?"true":"false","data-mouse-dragging":Zt?"true":"false",onPointerDown:Nr,onPointerMove:Or,onPointerUp:pe,onPointerCancel:pe,onLostPointerCapture:ze,children:r.jsx("div",{ref:Ke,className:`${e}-lightbox-strip-track`,style:{gap:E},children:Ut.map((f,j)=>{const J=f.image.objectFit??"contain",Ce=j%t.length,Ne=Math.floor(j/t.length),Ye=Yo(E),bt=`calc(-0.5 * (${Ye} + ${E}))`;return r.jsxs("div",{ref:Rt=>Ie.current[j]=Rt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:f.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:J}}),o&&Ce<t.length-1&&Ne===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:Ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ne}-${f.image.url}-${Ce}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:O,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:le,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${ee?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||y)&&r.jsx("div",{className:`${e}-header ${ee?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ee?gt():Se||y?ft():null})})})]}),t.length>1&&I==="on"&&(()=>{const f=Yo(S),j=`calc(-0.5 * (${S} + ${f}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:S},children:r.jsx("div",{ref:ne,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:J=>J.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:ie,"--thumbnail-active-color":q},children:[t.map((J,Ce)=>{const Ne=Yo(ie),Ye=`calc(-0.5 * (${Ne} + ${ie}))`;return r.jsxs("div",{ref:bt=>{me.current[Ce]=bt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":$===Ce?"true":"false",onClick:()=>Z&&b==="click"&&Sn(Ce),onMouseEnter:()=>ke&&b==="hover"&&Sn(Ce),"aria-label":J.image.name?`View ${J.image.name}`:`View image ${Ce+1}`,"aria-current":$===Ce?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ue?` ${e}-thumb-image-cover`:""}`,src:J.image.url,alt:"",draggable:!1,style:{...fe,maxWidth:z,maxHeight:z,width:R.display==="cover"?"auto":"100%",height:"auto",objectFit:R.display==="cover"?"cover":"contain"}})}),o&&Ce<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ye,width:Ne,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${J.image.url}-${Ce}`)}),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:j,height:f,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Uy(e){return`
14229
+ `;function On(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const ml={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vy=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],xy={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:On("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:{...ml.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:{...ml.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:On("Question Padding Left"),questionPaddingTop:On("Question Padding Top"),questionPaddingBottom:On("Question Padding Bottom"),answerPaddingLeft:On("Answer Padding Left"),answerPaddingRight:On("Answer Padding Right"),answerPaddingTop:On("Answer Padding Top"),answerPaddingBottom:On("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...vy],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},by={element:fy,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:xy,sourceCode:yy},Fn=e=>e.display==="cover",Fr=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},gl=100,wy=.2,hl=8,Bc=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=a.useState(0),[l,d]=a.useState(!1),c=a.useRef(null),u=a.useRef(0);u.current=o;const p=a.useMemo(()=>typeof window>"u"?gl:Math.max(gl,window.innerHeight*wy),[]),v=a.useCallback(x=>Math.max(0,1-x/(p*1.5)),[p]),y=a.useCallback(x=>Math.max(0,1-x/(p*.45)),[p]),g=a.useCallback(x=>{const W=typeof window<"u"?window.innerHeight:800,M=Math.max(.88,1-x/W*.12);return`translateY(${x}px) scale(${M})`},[]),h=a.useCallback(()=>{c.current=null},[]),m=a.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),h()},[n,h]),b=a.useCallback(()=>{const x=typeof window<"u"?window.innerHeight:800;d(!0),s(x),window.setTimeout(()=>{t(),h(),d(!1)},Math.min(n,200))},[n,t,h]),I=a.useCallback(x=>{!e||l||x.pointerType==="touch"&&(i!=null&&i(x.target)||(c.current={startX:x.clientX,startY:x.clientY,isLocked:null,pointerId:x.pointerId}))},[e,l,i]),R=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=x.clientX-W.startX,Y=x.clientY-W.startY;if(W.isLocked===null){if(Math.abs(M)<hl&&Math.abs(Y)<hl)return;if(Y>0&&Y>Math.abs(M))W.isLocked=!0,x.currentTarget.setPointerCapture(x.pointerId);else{W.isLocked=!1,h();return}}if(!W.isLocked)return;x.preventDefault();const F=Math.max(0,Y);u.current=F,s(F)},[e,h]),T=a.useCallback(x=>{const W=c.current;if(!e||!W||x.pointerType!=="touch"||W.pointerId!==x.pointerId)return;const M=W.isLocked===!0;if(x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),!M){h();return}x.clientY-W.startY>=p?b():m()},[p,b,e,h,m]),G=a.useCallback(x=>{T(x)},[T]),A=a.useCallback(x=>{T(x)},[T]),V=o>0,k=l?`transform ${n}ms ease`:"none",L=l?`opacity ${n}ms ease`:"none",D=o>0||l;return{isSwipeDragging:V,backdropStyle:{opacity:v(o),transition:L},mediaAreaStyle:{transform:g(o),transition:k,touchAction:V?"none":void 0,willChange:V?"transform":void 0},overlayContentStyle:D?{opacity:y(o),transition:L}:void 0,swipeHandlers:e?{onPointerDown:I,onPointerMove:R,onPointerUp:G,onPointerCancel:A}:{},dismissAreaStyle:e?{touchAction:V?"none":"pan-x"}:void 0}},Sy="[data-lightbox-scrollable]",Vc=()=>{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,s=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 l=d=>{const c=d.target;c instanceof Element&&c.closest(Sy)||d.preventDefault()};return document.addEventListener("touchmove",l,{passive:!1}),()=>{document.removeEventListener("touchmove",l),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo({top:e,left:0,behavior:"instant"})}},[])},$y=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},Cy=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},Ty=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},Ly=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const l=e.scrollLeft,d=n-l,c=l-n,u=(h,m)=>{Cy(t),e.scrollLeft=h,m&&(s==null||s())};if(Math.abs(d)<.5)return u(n,!0),()=>{};let p=!1,v=0;const y=()=>{t.removeEventListener("transitionend",g),clearTimeout(v)},g=h=>{h.target!==t||h.propertyName!=="transform"||p||(p=!0,y(),u(n,!0))};return t.addEventListener("transitionend",g),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(()=>{p||(p=!0,y(),u(n,!0))},i+64),()=>{p||(p=!0,y(),u(l-Ty(t),!1))}},mo=300,Ry=900,Iy=1500,Ey="cubic-bezier(0.16, 1, 0.3, 1)",My=3e3,Py=2,ky=16,Ay=.05,Fy=1,Ko=.3,Wy=50,_y=20,$i=.004,qi=["title1","title2","title3"],Hy={title1:"1",title2:"2",title3:"3"},Ny={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Oy={title1:.02,title2:.02,title3:.02},Yo=e=>`max(${e}, ${_y}px)`,Dy=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]}},jy=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=Dy(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,zy=e=>[Bt(e,"fontFamily"),Bt(e,"fontSettings"),{type:"row",items:[Bt(e,"fontSize"),Bt(e,"lineHeight"),Bt(e,"letterSpacing"),Bt(e,"wordSpacing")]},Bt(e,"textAlign"),Bt(e,"textAppearance")],By=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(qi.map(e=>[Hy[e],zy(e)]))}),us=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,l)=>s+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:l},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...l]};const c=Math.min(s,d);return{overflow:s-c,widths:[d-c,...l]}},{overflow:i-1,widths:[]});return o},Gc=(e,t)=>us(e,t),Zo=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},fl=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:us(e.length,n),effective:Gc(e.length,n)}},Vy=(e,t,n,i,o,s,l)=>{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:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),d},ra=(e,t)=>{const n=i=>{const o=Bt(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[Ny[t]]}},Gy=(e,t,n,i)=>e.slice(0,i).reduce((o,s,l)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[l]??0),0),aa=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Oy[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Xt(i,n)},qy=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:l})=>{const{backgroundColor:d,thumbnailSize:c,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:v,closeIcon:y,closeIconMaxWidth:g,closeIconColor:h,closeIconHoverColor:m,thumbnailTrigger:b,thumbnailVisibility:I,thumbnailObjectFit:R,thumbnailActive:T,thumbnailActiveColor:G,title1Width:A,title2Width:V,title3Width:k,title1MarginLeft:L=0,title2MarginLeft:D=0,title3MarginLeft:x=0,titleRowMarginBottom:W=0,titleHeaderLayout:M="desktop",contentMarginTop:Y,iconMarginLeft:F}=n,U=f=>C.scalingValue(f,i??!1),B=c??n.thumnailSize??.03,j=U(B),ie=U(u),S=U(p??.02),E=U(v??0),O=U(Y??0),le=Yo(O),oe=U(F??0),[$,ae]=a.useState(0),P=a.useRef($);P.current=$;const te=t[$],{title1:K,title2:xe,title3:Fe}=jy(te),ge=aa("title1",ra(n,"title1"),i),ce=aa("title2",ra(n,"title2"),i),X=aa("title3",ra(n,"title3"),i),ee=M==="mobile",Z=!o&&(!i||s),Pe=Z,$e=Z,ke=Z,ue=Fn(R),fe=ue?{"--image-aspect-ratio":Fr(R)}:void 0,Se=!!(K||xe||Fe),z=a.useMemo(()=>Vy(e,K,xe,Fe,ge,ce,X),[e,$,K,xe,Fe,ge,ce,X]),se=a.useMemo(()=>({title1Width:A,title2Width:V,title3Width:k}),[A,V,k]),ye=a.useMemo(()=>z.map(f=>se[f.widthKey]),[z,se]),ve=a.useMemo(()=>us(z.length,ye),[z.length,ye]),Me=a.useMemo(()=>Gc(z.length,ye),[z.length,ye]),Te=a.useMemo(()=>z.filter(f=>f.prefix==="title1"),[z]),H=a.useMemo(()=>z.filter(f=>f.prefix==="title2"||f.prefix==="title3"),[z]),he=a.useMemo(()=>fl(Te,se),[Te,se]),re=a.useMemo(()=>fl(H,se),[H,se]),_=a.useCallback((f,q)=>{const J=z.indexOf(f);if(!ee||q==="single-row")return{effectiveWidth:Me[J]??0,resolvedWidth:ve[J]??0,maxWidth:Zo(J,ve)};if(q==="two-row-top"){const Ne=Te.indexOf(f);return{effectiveWidth:he.effective[Ne]??0,resolvedWidth:he.resolved[Ne]??0,maxWidth:Zo(Ne,he.resolved)}}const Ce=H.indexOf(f);return{effectiveWidth:re.effective[Ce]??0,resolvedWidth:re.resolved[Ce]??0,maxWidth:Zo(Ce,re.resolved)}},[H,re,Me,ve,z,Te,he,ee]),Q=a.useCallback(f=>C.scalingValue(f,i??!1),[i]),Ae=Q(W??0),de=a.useMemo(()=>({title1MarginLeft:L,title2MarginLeft:D,title3MarginLeft:x}),[L,D,x]),N=a.useCallback(f=>z.slice(0,f+1).reduce((q,J,Ce)=>q+(J!=null&&J.marginLeftKey?de[J.marginLeftKey]??0:0)+(ve[Ce]??0),0)+(ee?0:L??0),[z,de,ve,ee,L]),Ue=a.useCallback(()=>ee?0:L??0,[ee,L]),Oe=a.useCallback(f=>H.slice(0,f).reduce((q,J,Ce)=>q+(J.marginLeftKey?de[J.marginLeftKey]??0:0)+(re.resolved[Ce]??0),0),[H,re.resolved,de]),dt=a.useCallback(f=>{const q=H[f];return Oe(f)+(q.marginLeftKey?de[q.marginLeftKey]??0:0)+(re.resolved[f]??0)},[H,re.resolved,Oe,de]),nt=(f,q)=>{const J=f.marginLeftKey?de[f.marginLeftKey]??0:0,{effectiveWidth:Ce,resolvedWidth:Ne,maxWidth:Ye}=_(f,q),bt=o&&q==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":f.prefix,style:{...q==="single-row"?{gridArea:f.prefix}:{},width:Q(Ce),...J>0?{marginLeft:Q(J)}:{}},children:[r.jsx("p",{className:f.className,style:f.style,children:f.text}),bt&&f.marginLeftKey&&r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:Q(-J),width:`max(${Q(J)}, 10px)`,height:"100%",pointerEvents:"auto"}}),bt&&r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ye),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:Q(-$i/2),width:Q($i),height:"100%",pointerEvents:"auto"}})]},f.className)},ht=()=>{const f=ee?-1:z.findIndex(Ce=>Ce.prefix==="title1"),q=!ee&&(o||(L??0)>0)?(()=>{const Ce=L??0,Ne=f>=0?ve[f]:A??0;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:`max(${Q(Ce)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,J=z.flatMap((Ce,Ne)=>{if(!Ce.marginLeftKey)return[];const Ye=de[Ce.marginLeftKey]??0,bt=Gy(z,ve,de,Ne)+Ue();return r.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ve[Ne]),style:{position:"absolute",top:0,left:Q(bt),width:`max(${Q(Ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)});return q?[q,...J]:J},st=()=>z.map((f,q)=>{const J=Zo(q,ve),Ne=N(q)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:Q(Ne),width:Q($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),Be=()=>H.flatMap((f,q)=>{if(!f.marginLeftKey)return[];const J=de[f.marginLeftKey]??0,Ce=Oe(q),{resolvedWidth:Ne}=_(f,"two-row-bottom");return r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ne),style:{position:"absolute",top:0,left:Q(Ce),width:`max(${Q(J)}, 10px)`,height:"100%",pointerEvents:"auto"}},f.marginLeftKey)}),be=()=>H.map((f,q)=>{const{maxWidth:J}=_(f,"two-row-bottom"),Ne=dt(q)-$i/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":f.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(J),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:Q(Ne),width:Q($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),We=a.useRef(null),je=a.useRef(null),Ke=a.useRef(null),ne=a.useRef(null),me=a.useRef([]),Ie=a.useRef([]),Ge=a.useRef(0),Ze=a.useRef(null),Ve=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),at=a.useRef(null),Je=a.useRef(null),Ee=a.useRef(0),qe=a.useRef("forward"),_e=a.useRef(0),tt=a.useRef(null),rt=a.useRef(!1),lt=t.length>1&&(!o||!!s),Tt=lt?3:1,Ut=a.useMemo(()=>Array.from({length:Tt},()=>t).flat(),[t,Tt]),[Zt,xt]=a.useState(!1),[wt,jt]=a.useState(!1),[At,vt]=a.useState(!0),Ft=a.useRef(null),_t=a.useRef(null),Kt=a.useRef(!1),Jt=a.useRef(!1),Ct=a.useRef(null),Ht=a.useRef(null),on=Pe&&!At,mt=a.useCallback(()=>{Pe&&(vt(!0),Ht.current&&clearTimeout(Ht.current),Ht.current=setTimeout(()=>{Ve.current.isActive||vt(!1)},My))},[Pe]),Le=a.useCallback(()=>{o||Jt.current||(Jt.current=!0,jt(!1),Ct.current=setTimeout(()=>{l()},mo))},[o,l]),De=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":on?"true":"false",style:{width:C.scalingValue(g??0,i),height:C.scalingValue(g??0,i),marginRight:oe,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Le,"aria-label":"Close",children:r.jsx(an,{url:y,fill:h,hoverFill:i&&!s?h:m,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:oe,height:"100%",pointerEvents:"auto"}})]}),it=(f="two-row")=>r.jsx("div",{...f==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:Q(L??0),flexShrink:0,...f==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...f==="two-row"&&o?{pointerEvents:"auto"}:{}}}),gt=()=>{const f=z.find(Ce=>Ce.prefix==="title1"),q=z.filter(Ce=>Ce.prefix==="title2"||Ce.prefix==="title3"),J=q.length>0||o||(W??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(L??0)>0||o?it():null,f&&nt(f,"two-row-top"),y&&De()]}),J?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[q.map(Ce=>nt(Ce,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Be(),be()]})]}):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:Ae,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},ft=()=>r.jsxs(r.Fragment,{children:[(L??0)>0||o?it("single-row"):null,z.map(f=>nt(f,"single-row")),o?r.jsxs(r.Fragment,{children:[ht(),st()]}):null,y?De():null]}),It=a.useCallback(f=>!!(f.closest("[data-controls]")||f.closest(`.${e}-thumbnails`)||f.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:pt,backdropStyle:zt,mediaAreaStyle:kt,overlayContentStyle:Pt,swipeHandlers:Vt,dismissAreaStyle:Gt}=Bc({enabled:Z??!1,onClose:Le,animMs:mo,isBlockedTarget:It}),Nt=()=>{if(!lt||t.length===0)return Ge.current=0,0;const f=Ie.current[0],q=Ie.current[t.length];if(!f||!q)return Ge.current;const J=q.offsetLeft-f.offsetLeft;return J>0&&(Ge.current=J),Ge.current},Ot=(f=!1)=>{if(!lt)return;const q=je.current,J=Nt();!q||J<=0||J<q.clientWidth*.25||(q.scrollLeft<=0?(q.scrollLeft+=J,f&&(Ve.current.scrollLeft+=J),rt.current&&(_e.current+=J)):q.scrollLeft>=J*2&&(q.scrollLeft-=J,f&&(Ve.current.scrollLeft-=J),rt.current&&(_e.current-=J)))},Wt=(f,q=(J=>(J=je.current)==null?void 0:J.scrollLeft)()??0)=>{if(!lt)return f;let Ce=t.length+f,Ne=1/0;for(let Ye=0;Ye<Tt;Ye++){const bt=Ye*t.length+f,Rt=Ie.current[bt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-q);tn<Ne&&(Ne=tn,Ce=bt)}return Ce},St=f=>{const q=je.current;return!f||!q?!1:f.offsetWidth>q.clientWidth+1},w=f=>{const q=je.current;if(!f||!q||!St(f))return!1;const J=f.offsetLeft,Ce=J+f.offsetWidth;return q.scrollLeft>=J-1&&q.scrollLeft+q.clientWidth<=Ce+1},we=(f=(q=>(q=je.current)==null?void 0:q.scrollLeft)()??0)=>{for(let Ce=0;Ce<Ie.current.length;Ce+=1){const Ne=Ie.current[Ce];if(Ne&&w(Ne))return Ce}let J={flatIndex:0,distance:1/0};return Ie.current.forEach((Ce,Ne)=>{if(!Ce)return;const Ye=Math.abs(Ce.offsetLeft-f);Ye<J.distance&&(J={flatIndex:Ne,distance:Ye})}),J.flatIndex},Re=f=>{je.current&&Ie.current.forEach(q=>{q&&(q.style.scrollSnapAlign=St(q)&&f==="backward"?"end":"start")})},He=(f,q,J)=>{const Ce=f-q,Ne=we(q),Ye=Ie.current[Ne];if(w(Ye))return we(f)%t.length;const bt=Ie.current[Ne+1],Rt=Ye?bt?bt.offsetLeft-Ye.offsetLeft:Ye.offsetWidth:0,tn=Rt>0?Ce>Rt*Ko?1:Ce<-Rt*Ko?-1:0:0;return tn===0?J:lt?(J+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,J+tn))},ot=a.useCallback((f=!1)=>{if(I!=="on"||o)return;const q=ne.current,J=P.current,Ce=me.current[J];if(!q||!Ce||q.scrollWidth<=q.clientWidth)return;const Ne=q.scrollLeft,Ye=Ne+q.clientWidth,bt=Ce.offsetLeft,Rt=bt+Ce.offsetWidth;if(bt>=Ne&&Rt<=Ye)return;const tn=q.scrollWidth-q.clientWidth;let Qt=Ne;if(!f&&Ft.current===null){const bi=me.current[J-1],eo=me.current[J+1],Oo=bi?Ce.offsetLeft-bi.offsetLeft:eo?eo.offsetLeft-Ce.offsetLeft:Ce.offsetWidth;Rt>Ye?Qt+=Oo:bt<Ne&&(Qt-=Oo)}else Rt>Ye?Qt=Rt-q.clientWidth:Qt=bt;q.scrollLeft=Math.max(0,Math.min(tn,Qt))},[o,I]),Mt=a.useCallback((f=!1)=>{f&&(Kt.current=!0),_t.current===null&&(_t.current=requestAnimationFrame(()=>{_t.current=null;const q=Kt.current;Kt.current=!1,ot(q)}))},[ot]),Qe=a.useCallback(f=>{if(f===P.current)return;const q=P.current;P.current=f;const J=Math.abs(f-q)>1,Ce=lt&&t.length>1&&(q===t.length-1&&f===0||q===0&&f===t.length-1);ae(f),Mt(J||Ce)},[t.length,lt,Mt]),yt=()=>{if(!je.current||t.length===0||Ft.current!==null||Ve.current.isActive&&Ve.current.hasMoved)return;const f=je.current.scrollLeft,q=we(f)%t.length;q!==P.current&&Qe(q)},Dt=()=>{Ft.current=null},Lt=f=>{const q=je.current;q&&(q.style.scrollSnapType=f?"":"none")},nn=()=>{var f;(f=Je.current)==null||f.call(Je),Je.current=null},dn=()=>{tt.current!==null&&(cancelAnimationFrame(tt.current),tt.current=null),rt.current=!1},ei=()=>{const f=je.current;if(!f){tt.current=null,rt.current=!1;return}const q=_e.current-f.scrollLeft;if(Math.abs(q)<.5){f.scrollLeft=_e.current,Ot(),yt(),tt.current=null,rt.current=!1;return}f.scrollLeft+=q*Ay,Ot(),yt(),mt(),tt.current=requestAnimationFrame(ei)},ti=()=>{const f=Ke.current;f&&(f.style.transition="",f.style.transform="",f.style.willChange="")},Wo=(f,q,J,Ce)=>{ti(),f.scrollLeft=q,Ee.current=f.scrollLeft,Ot(),J!==void 0?(P.current=J,ae(J)):yt(),Lt(!0),Ce==null||Ce()},_o=(f,{behavior:q="smooth",activeIndex:J,onComplete:Ce}={})=>{const Ne=je.current,Ye=Ke.current;if(!Ne||!Ye)return;if(dn(),nn(),Lt(!1),q==="auto"){Wo(Ne,f,J,Ce);return}const bt=Math.abs(f-Ne.scrollLeft),Rt=$y(bt,Ry,Iy,Ne.clientWidth*.55);Je.current=Ly(Ne,Ye,f,{duration:Rt,easing:Ey,onComplete:()=>{Je.current=null,Wo(Ne,f,J,Ce)}})},_r=(f="smooth")=>{const q=je.current;if(!q||t.length===0)return;const J=we()%t.length,Ce=Wt(J,q.scrollLeft),Ne=Ie.current[Ce];Ne&&_o(Ne.offsetLeft,{behavior:f,activeIndex:J})},Hr=(f,q="smooth",J,Ce)=>{const Ne=je.current;if(!Ne||t.length===0)return;const Ye=(Ce??Ne.scrollLeft)-f,bt=we(f),Rt=Ie.current[bt];if(w(Rt)){Lt(!0),yt();return}const tn=Ie.current[bt+1],Qt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Qt>0?Ye>Qt*Ko?1:Ye<-Qt*Ko?-1:0:0)!==0){const cd=J??bt%t.length,dd=He(Ce??Ne.scrollLeft,f,cd);Sn(dd,q);return}const eo=Ce??Ne.scrollLeft,Oo=we(eo),ms=Ie.current[Oo];if(ms&&Math.abs(ms.offsetLeft-eo)<1){Lt(!0),yt();return}_r("auto")},Sn=(f,q="smooth")=>{const J=je.current;if(!J||t.length===0)return;const Ce=Wt(f,J.scrollLeft),Ne=Ie.current[Ce];Ne&&(q==="smooth"?Ft.current=f:Ft.current=null,P.current=f,ae(f),Mt(!0),_o(Ne.offsetLeft,{behavior:q,activeIndex:f,onComplete:q==="smooth"?Dt:void 0}))},xi=()=>{at.current&&(window.removeEventListener("pointerup",at.current),window.removeEventListener("pointercancel",at.current),at.current=null)},Ho=(f,q,J,Ce,Ne)=>{const Ye=J-f,bt=Ce-q,Rt=Math.abs(Ye),tn=Math.abs(bt);if(Rt<Wy||Rt<=tn)return!1;const Qt=Ye<0?1:-1,bi=lt?(Ne+Qt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ne+Qt));return bi===Ne?!1:(Sn(bi),!0)},ni=f=>{if(!Ve.current.isActive)return;xi();const q=je.current;if(!q)return;const{scrollLeft:J,startActiveIndex:Ce,hasMoved:Ne}=Ve.current,Ye=q.scrollLeft;Ot(!0),Ve.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},xt(!1),f!==void 0&&q.hasPointerCapture(f)&&q.releasePointerCapture(f),Ne?Hr(J,"smooth",Ce,Ye):(Lt(!0),yt()),mt()},No=(f,q)=>{const J=Ze.current;Ze.current=null,J&&(Ho(J.startX,J.startY,f,q,J.startActiveIndex),mt())},Nr=f=>{if(!$e)return;if(f.pointerType==="touch"){if(dn(),Lt(!0),It(f.target))return;Ze.current={startX:f.clientX,startY:f.clientY,startActiveIndex:P.current};return}if(f.pointerType!=="mouse"||f.button!==0||It(f.target))return;const q=je.current;if(!q)return;dn(),nn(),ti(),Ft.current=null,Ve.current={isActive:!0,startX:f.clientX,scrollLeft:q.scrollLeft,startActiveIndex:P.current,hasMoved:!1},Lt(!1),mt(),q.setPointerCapture(f.pointerId),xi();const J=Ce=>{Ce.pointerType==="mouse"&&ni(Ce.pointerId)};at.current=J,window.addEventListener("pointerup",J),window.addEventListener("pointercancel",J)},Or=f=>{if(!$e||f.pointerType!=="mouse")return;const q=je.current;if(!q||!Ve.current.isActive)return;if(f.buttons===0){ni(f.pointerId);return}const J=f.clientX-Ve.current.startX;Math.abs(J)>Fy&&(Ve.current.hasMoved=!0,xt(!0)),Ve.current.hasMoved&&(f.preventDefault(),q.scrollLeft=Ve.current.scrollLeft-J,Ot(!0),yt(),mt())},pe=f=>{if($e){if(f.pointerType==="touch"){f.type==="pointerup"?No(f.clientX,f.clientY):Ze.current=null;return}f.pointerType==="mouse"&&ni(f.pointerId)}},ze=f=>{!$e||f.pointerType!=="mouse"||ni(f.pointerId)};return Vc(),a.useEffect(()=>{const f=requestAnimationFrame(()=>jt(!0));return()=>{cancelAnimationFrame(f),nn(),xi(),_t.current!==null&&(cancelAnimationFrame(_t.current),_t.current=null),Ct.current&&clearTimeout(Ct.current),Ht.current&&clearTimeout(Ht.current)}},[]),a.useEffect(()=>{if(!Pe){vt(!0);return}mt();const f=()=>mt();return document.addEventListener("pointermove",f,{passive:!0}),document.addEventListener("pointerdown",f,{passive:!0}),()=>{document.removeEventListener("pointermove",f),document.removeEventListener("pointerdown",f),Ht.current&&clearTimeout(Ht.current)}},[Pe,mt]),a.useEffect(()=>{const f=q=>{q.key==="Escape"&&Le()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[Le]),a.useLayoutEffect(()=>{Nt()},[E,t.length,lt]),a.useLayoutEffect(()=>{o||Sn(P.current,"auto")},[E,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,lt]),a.useEffect(()=>{const f=je.current;if(!f||o||!Z)return;const q=J=>{if(J.preventDefault(),Math.abs(J.deltaY)<=Math.abs(J.deltaX))return;const Ce=J.deltaMode===1?ky:J.deltaMode===2?f.clientHeight:1,Ne=J.deltaY*Ce*Py;if(Ne!==0){if(nn(),rt.current||(rt.current=!0,_e.current=f.scrollLeft,Ft.current=null,Lt(!1)),_e.current+=Ne,!lt){const Ye=f.scrollWidth-f.clientWidth;_e.current=Math.max(0,Math.min(Ye,_e.current))}mt(),tt.current===null&&(tt.current=requestAnimationFrame(ei))}};return f.addEventListener("wheel",q,{passive:!1}),()=>{f.removeEventListener("wheel",q),dn()}},[o,Z,lt]),a.useEffect(()=>{const f=je.current;if(!f)return;const q=()=>{Ot(Ve.current.isActive);const Ce=f.scrollLeft,Ne=Ce-Ee.current;Ee.current=Ce;const Ye=Ge.current>0?Ge.current*.5:1/0;if(Ne!==0&&Math.abs(Ne)<Ye){const bt=Ne>0?"forward":"backward";bt!==qe.current&&(qe.current=bt,Re(bt))}Ve.current.isActive&&Ve.current.hasMoved||yt()};f.addEventListener("scroll",q,{passive:!0});const J=new ResizeObserver(()=>{Nt(),Ot(Ve.current.isActive),Re(qe.current),yt()});return J.observe(f),()=>{nn(),f.removeEventListener("scroll",q),J.disconnect()}},[t.length,lt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{pt||Le()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:wt?1:0,transition:`opacity ${mo}ms ease`,pointerEvents:wt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...zt}}),r.jsxs("div",{ref:We,className:`${e}-lightbox-dismiss-area`,style:Gt,...Vt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:kt,onClick:f=>f.stopPropagation(),children:r.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":$e&&t.length>0?"true":"false","data-mouse-dragging":Zt?"true":"false",onPointerDown:Nr,onPointerMove:Or,onPointerUp:pe,onPointerCancel:pe,onLostPointerCapture:ze,children:r.jsx("div",{ref:Ke,className:`${e}-lightbox-strip-track`,style:{gap:E},children:Ut.map((f,q)=>{const J=f.image.objectFit??"contain",Ce=q%t.length,Ne=Math.floor(q/t.length),Ye=Yo(E),bt=`calc(-0.5 * (${Ye} + ${E}))`;return r.jsxs("div",{ref:Rt=>Ie.current[q]=Rt,className:`${e}-strip-item`,style:{height:M==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[r.jsx("img",{src:f.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:J}}),o&&Ce<t.length-1&&Ne===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:bt,width:Ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ne}-${f.image.url}-${Ce}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":on?"true":"false",style:Pt,children:[r.jsx("div",{style:{position:"relative",width:"100%",height:O,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:le,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${ee?` ${e}-lightbox-content-area-stacked`:""}`,children:(Se||y)&&r.jsx("div",{className:`${e}-header ${ee?`${e}-header-two-row`:`${e}-header-single-row`}`,children:ee?gt():Se||y?ft():null})})})]}),t.length>1&&I==="on"&&(()=>{const f=Yo(S),q=`calc(-0.5 * (${S} + ${f}))`;return r.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:S},children:r.jsx("div",{ref:ne,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:J=>J.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:ie,"--thumbnail-active-color":G},children:[t.map((J,Ce)=>{const Ne=Yo(ie),Ye=`calc(-0.5 * (${Ne} + ${ie}))`;return r.jsxs("div",{ref:bt=>{me.current[Ce]=bt},style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":$===Ce?"true":"false",onClick:()=>Z&&b==="click"&&Sn(Ce),onMouseEnter:()=>ke&&b==="hover"&&Sn(Ce),"aria-label":J.image.name?`View ${J.image.name}`:`View image ${Ce+1}`,"aria-current":$===Ce?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${ue?` ${e}-thumb-image-cover`:""}`,src:J.image.url,alt:"",draggable:!1,style:{...fe,maxWidth:j,maxHeight:j,width:R.display==="cover"?"auto":"100%",height:"auto",objectFit:R.display==="cover"?"cover":"contain"}})}),o&&Ce<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ye,width:Ne,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${J.image.url}-${Ce}`)}),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:q,height:f,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Uy(e){return`
14230
14230
  .${e}-wrapper {
14231
14231
  position: relative;
14232
14232
  width: 100%;
@@ -15157,7 +15157,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15157
15157
  </>
15158
15158
  );
15159
15159
  };
15160
- `,Yy="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>'),si={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 Zy(e){const t={};return t[Bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Bt(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Bt(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Bt(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Bt(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Bt(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Bt(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Bt(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Jy=qi.reduce((e,t)=>({...e,...Zy(t)}),{}),Qy=qi.reduce((e,t)=>({...e,[Bt(t,"fontFamily")]:"Goudy Bookletter 1911",[Bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Bt(t,"letterSpacing")]:0,[Bt(t,"wordSpacing")]:0,[Bt(t,"textAlign")]:"left",[Bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function sa(e){return qi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Bt(n,"fontSize")]=i),o!==void 0&&(t[Bt(n,"lineHeight")]=o),t},{})}const ev=By(),tv={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:"layout",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:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",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","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",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:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Jy,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Yy,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Qy},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...sa({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...sa({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...sa({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:[ev]}],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/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},nv={element:Xy,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:tv,sourceCode:Ky,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...qi.map(e=>({path:`${Bt(e,"fontFamily")}`}))]},fontRelations:{...qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Bt(t,"fontFamily")}`}),{})}},iv=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:y,backgroundColor:g,imageGap:h,maxWidth:m,maxHeight:b,textTransition:I,title1Width:R,title2Width:T,title3Width:q,title1MarginLeft:A=0,title2MarginLeft:G=0,title3MarginLeft:k=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="single-row",countCloseGap:x=0,closeIcon:W,closeIconMaxWidth:M,closeIconColor:Y,closeIconHoverColor:F,contentMarginTop:U=0,iconMarginRight:V=0}=n,z=a.useCallback(pe=>C.scalingValue(pe,i??!1),[i]),ie=z(h??0),S=`${m}%`,E=`${b}%`,O=z(x),le=z(U),oe=z(V),$=pi("title1",ui(n,"title1"),i),ae=pi("title2",ui(n,"title2"),i),P=pi("title3",ui(n,"title3"),i),te=pi("count",ui(n,"count"),i),K=D==="mobile",xe=!i||!!s,Fe=!o&&(!i||!!s),ge=a.useMemo(()=>ar(t,v),[t,v]),[ce,X]=a.useState(l),ee=ge[ce],Z=ee==null?void 0:ee.entry,[Pe,$e]=a.useState(!1),[ke,ue]=a.useState(null),[fe,Se]=a.useState(!1),[B,se]=a.useState(null),[ye,ve]=a.useState(!1),[Me,Te]=a.useState(0),[H,he]=a.useState(),[re,_]=a.useState(),[Q,Ae]=a.useState(null),de=a.useRef(null),N=a.useRef(0),Ue=a.useRef(0),Oe=a.useRef(0),dt=a.useRef(!1),nt=a.useRef(null),ht=a.useRef(null),st=a.useRef(null),Be=a.useRef(null),be=a.useRef(null),We=a.useRef(null),je=a.useRef(null),Ke=a.useCallback(()=>{const pe=ht.current;if(!pe)return;const ze=pe.closest(`.${e}-lightbox-content-area`);if(!ze)return pe.getBoundingClientRect().width;const f=Array.from(ze.children).reduce((j,J)=>!(J instanceof HTMLElement)||J.contains(pe)?j:j+J.getBoundingClientRect().width,0);return ze.getBoundingClientRect().width-f},[e]),ne=a.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),me=a.useCallback(pe=>{pe===N.current&&(se(null),ve(!1))},[]),Ie=a.useCallback(()=>{o||dt.current||(dt.current=!0,u==null||u(),$e(!1),nt.current=setTimeout(()=>{p()},300))},[o,u,p]),Ge=a.useCallback(pe=>!!(pe.closest("[data-controls]")||pe.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ze,backdropStyle:Ve,mediaAreaStyle:at,overlayContentStyle:Je,swipeHandlers:Ee,dismissAreaStyle:qe}=Bc({enabled:Fe,onClose:Ie,animMs:300,isBlockedTarget:Ge}),_e=a.useCallback(pe=>{d&&Tc(pe+1,c,!0)},[d,c]),tt=a.useCallback(pe=>{if(pe)return pe.getBoundingClientRect().height},[]),rt=a.useCallback(pe=>{if(ge.length===0)return;const ze=(pe%ge.length+ge.length)%ge.length;if(ze===ce)return;const f=ge[ce],j=ge[ze];N.current+=1;const J=N.current,Ce=I==="fade"&&Gs(f==null?void 0:f.entry)!==Gs(j==null?void 0:j.entry),Ne=tt(st.current),Ye=Ce?(()=>{const Rt=Ke();Yn.flushSync(()=>{Ae(j.entry)}),st.current&&Rt&&(st.current.style.width=`${Rt}px`);const tn=tt(st.current);return st.current&&(st.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,bt=Math.max(Ne??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;Te(J),se(ce),ve(!0),X(ze),_e(ze),Oe.current=ze,Ce?(ne(),bt&&he(bt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&_(Ye.incomingTitlesMeasureWidth),ue((f==null?void 0:f.entryIndex)??null),Se(!0),Ue.current=j.entryIndex,de.current=setTimeout(()=>{ue(null),Se(!1),he(void 0),_(void 0),Ae(null),de.current=null},400)):(ne(),ue(null),Se(!1),he(void 0),_(void 0),Ae(null),Ue.current=j.entryIndex)},[ce,ne,Ke,tt,ge,_e,I]),lt=a.useCallback(()=>{je.current=null},[]),Tt=a.useCallback(pe=>{!xe||ge.length<=1||pe.pointerType==="mouse"&&pe.button!==0||pe.target.closest("[data-controls]")||(je.current={startX:pe.clientX,startY:pe.clientY,pointerId:pe.pointerId})},[xe,ge.length]),Ut=a.useCallback(pe=>{var Rt;if(!xe||ge.length<=1||pe.pointerType==="mouse"&&pe.button!==0)return;if(Ze){lt();return}const ze=je.current;if(!ze||ze.pointerId!==pe.pointerId||(lt(),pe.target.closest("[data-controls]")))return;const j=pe.clientX-ze.startX,J=pe.clientY-ze.startY,Ce=Math.abs(j),Ne=Math.abs(J);if(Ce>=gh&&Ce>Ne){rt(j>0?ce-1:ce+1);return}if(Ce>js||Ne>js)return;const Ye=(Rt=Be.current)==null?void 0:Rt.getBoundingClientRect(),bt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;rt(pe.clientX<bt?ce-1:ce+1)},[ce,xe,rt,Ze,lt,ge.length]),Zt=a.useCallback(pe=>{const ze=je.current;(ze==null?void 0:ze.pointerId)===pe.pointerId&&lt()},[lt]);Vc(),a.useEffect(()=>{We.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const pe=requestAnimationFrame(()=>{$e(!0),requestAnimationFrame(()=>{be.current?be.current.focus():Be.current&&Be.current.focus()})});return()=>{cancelAnimationFrame(pe),nt.current&&clearTimeout(nt.current),de.current&&clearTimeout(de.current);const ze=We.current;ze&&document.contains(ze)&&ze.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var pe;I!=="fade"&&(Ue.current=((pe=ge[ce])==null?void 0:pe.entryIndex)??0,ne(),ue(null),Se(!1),he(void 0),_(void 0))},[ce,ne,ge,I]),a.useEffect(()=>{const pe=ze=>{if(ze.key==="Escape"){Ie();return}if(ze.key==="ArrowLeft"&&ge.length>1){rt(ce-1);return}if(ze.key==="ArrowRight"&&ge.length>1){rt(ce+1);return}if(ze.key==="Tab"&&Be.current){const f=Be.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),j=Array.from(f).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(j.length===0)return;const J=j[0],Ce=j[j.length-1],Ne=document.activeElement;ze.shiftKey?(Ne===J||!Be.current.contains(Ne))&&(ze.preventDefault(),Ce.focus()):(Ne===Ce||!Be.current.contains(Ne))&&(ze.preventDefault(),J.focus())}};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[rt,Ie,ce,ge.length]),a.useLayoutEffect(()=>{ne(),N.current=0,Te(0),se(null),ve(!1),ue(null),Se(!1),he(void 0),_(void 0),Ae(null),X(pe=>{const ze=Math.max(0,ge.length-1);return Math.min(pe,ze)})},[ne,t.length,v,ge.length]),a.useLayoutEffect(()=>{var f;const pe=Math.max(0,ge.length-1),ze=Math.min(Math.max(0,l),pe);Oe.current=ze,Ue.current=((f=ge[ze])==null?void 0:f.entryIndex)??0,X(ze)},[l]);const xt=ke!==null?t[ke]:null,wt=B!==null?ge[B]:null,jt=(Z==null?void 0:Z.title1)||(Z==null?void 0:Z.title2)||(Z==null?void 0:Z.title3)||(xt==null?void 0:xt.title1)||(xt==null?void 0:xt.title2)||(xt==null?void 0:xt.title3),At=Sh(v,ge,t),vt=W!==null,Ft=jt||At||vt,_t=At&&vt?{gap:O}:void 0,Kt=`${e}-titles-stack${K?` ${e}-titles-stack-stacked`:""}`,Jt=`${e}-titles-layer-out${K?` ${e}-titles-layer-out-stacked`:""}`,Ct=`${e}-titles-layer-out`,Ht=(A??0)>0||o,on=z(L),mt=a.useMemo(()=>({title1Width:R??Fi.title1Width,title2Width:T??Fi.title2Width,title3Width:q??Fi.title3Width}),[R,T,q]),Le=a.useMemo(()=>({title2MarginLeft:G,title3MarginLeft:k}),[G,k]),De=a.useMemo(()=>Z?Vn(e,Z,$,ae,P):[],[e,Z,$,ae,P]),it=a.useMemo(()=>De.map(pe=>mt[pe.widthKey]),[De,mt]),gt=a.useMemo(()=>Di(De.length,it),[De.length,it]),ft=a.useMemo(()=>wo(De.length,it),[De.length,it]),It=a.useMemo(()=>De.filter(pe=>pe.prefix==="title1"),[De]),pt=a.useMemo(()=>De.filter(pe=>pe.prefix==="title2"||pe.prefix==="title3"),[De]),zt=a.useMemo(()=>Gn(It,mt),[It,mt]),kt=a.useMemo(()=>Gn(pt,mt),[pt,mt]),Pt=a.useCallback((pe,ze)=>{const f=De.findIndex(J=>J.prefix===pe.prefix);if(!K||ze==="single-row")return{effectiveWidth:ft[f]??0,resolvedWidth:gt[f]??0,maxWidth:ln(f,gt)};if(ze==="two-row-top"){const J=It.findIndex(Ce=>Ce.prefix===pe.prefix);return{effectiveWidth:zt.effective[J]??0,resolvedWidth:zt.resolved[J]??0,maxWidth:ln(J,zt.resolved)}}const j=pt.findIndex(J=>J.prefix===pe.prefix);return{effectiveWidth:kt.effective[j]??0,resolvedWidth:kt.resolved[j]??0,maxWidth:ln(j,kt.resolved)}},[De,pt,kt,ft,gt,It,zt,K]),Vt=a.useCallback(pe=>Ec(De,gt,Le,pe)+(K?0:A??0),[De,gt,Le,K,A]),Gt=a.useCallback(()=>K?0:A??0,[K,A]),Nt=a.useCallback(pe=>pt.slice(0,pe).reduce((ze,f,j)=>ze+(f.marginLeftKey?Le[f.marginLeftKey]??0:0)+(kt.resolved[j]??0),0),[pt,kt.resolved,Le]),Ot=a.useCallback(pe=>{const ze=pt[pe];return Nt(pe)+(ze.marginLeftKey?Le[ze.marginLeftKey]??0:0)+(kt.resolved[pe]??0)},[pt,kt.resolved,Nt,Le]),Wt=a.useCallback((pe,ze,f)=>{if(!K||f==="single-row"){const Ye=pe.findIndex(Qt=>Qt.prefix===ze.prefix),bt=pe.map(Qt=>mt[Qt.widthKey]),Rt=Di(pe.length,bt);return{effectiveWidth:wo(pe.length,bt)[Ye]??0,resolvedWidth:Rt[Ye]??0,maxWidth:ln(Ye,Rt)}}if(f==="two-row-top"){const Ye=pe.filter(Qt=>Qt.prefix==="title1"),bt=Ye.findIndex(Qt=>Qt.prefix===ze.prefix),{resolved:Rt,effective:tn}=Gn(Ye,mt);return{effectiveWidth:tn[bt]??0,resolvedWidth:Rt[bt]??0,maxWidth:ln(bt,Rt)}}const j=pe.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),J=j.findIndex(Ye=>Ye.prefix===ze.prefix),{resolved:Ce,effective:Ne}=Gn(j,mt);return{effectiveWidth:Ne[J]??0,resolvedWidth:Ce[J]??0,maxWidth:ln(J,Ce)}},[mt,K]),St=(pe,ze,f)=>{const j=pe.marginLeftKey?Le[pe.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:Ce,maxWidth:Ne}=f??Pt(pe,ze),Ye=Math.max(j,Bn),bt=o&&ze==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":pe.prefix,style:{width:z(J),...j>0?{marginLeft:z(j)}:{}},children:[r.jsx("p",{className:pe.className,style:pe.style,children:pe.text}),bt&&pe.marginLeftKey?r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:z(-j),width:z(Ye),height:"100%",pointerEvents:"auto"}}):null,bt?r.jsx("div",{"data-controls":pe.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:z(-gn/2),width:z(gn),height:"100%",pointerEvents:"auto"}}):null]},pe.className)},w=(pe="two-row")=>{const ze=De.findIndex(J=>J.prefix==="title1"),f=ze>=0?gt[ze]:mt.title1Width,j=pe==="two-row"&&o;return r.jsx("div",{...j?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(f)}:{},style:{width:z(A??0),flexShrink:0,alignSelf:"stretch",...j?{pointerEvents:"auto"}:{}}})},we=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:te,"aria-live":"polite","aria-atomic":"true",children:wh(ge,ce,v,t)}),He=()=>At?o&&vt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Zr(O)} + ${O}))`,width:Zr(O),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,ot=()=>!At&&!vt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:_t,children:[He(),vt?yt():null]}),Mt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?we():null,Ht?w("single-row"):null,Lt(Z),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ot(),Sn()]}),Qe=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?we():null,Ht?w("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:fe&&H?{minHeight:H}:void 0,children:[r.jsx("div",{ref:st,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(Q||Z)}),r.jsxs("div",{ref:ht,className:Kt,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%",...fe&&re?{width:re,maxWidth:"100%"}:void 0},children:[xt&&fe?r.jsx("div",{className:`${Jt} ${e}-titles-fade-out`,children:ti(xt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(Z)})]})]}),ot(),Sn()]}),yt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(M??0,i),height:C.scalingValue(M??0,i),marginRight:oe,"--close-icon-hover-color":F},children:[r.jsx("button",{ref:be,type:"button",className:`${e}-close-icon-inner`,onClick:Ie,"aria-label":"Close",children:r.jsx(an,{url:W??"",fill:Y,hoverFill:i&&!s?Y:F,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:oe,height:"100%",pointerEvents:"auto"}})]}),Dt=(pe,ze)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[At||jt?we():null,Ht?w("two-row"):null,ze!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:ze},children:pe}):r.jsxs(r.Fragment,{children:[pe,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ot()]}),Lt=pe=>{if(!pe)return null;const ze=Vn(e,pe,$,ae,P);return r.jsx(r.Fragment,{children:ze.map(f=>St(f,"single-row",Wt(ze,f,"single-row")))})},nn=pe=>{if(!pe)return null;const ze=Vn(e,pe,$,ae,P),f=ze.find(j=>j.prefix==="title1");return f?St(f,"two-row-top",Wt(ze,f,"two-row-top")):null},dn=(pe,ze=!1)=>{const f=pe?Vn(e,pe,$,ae,P):[],j=f.filter(Ne=>Ne.prefix==="title2"||Ne.prefix==="title3"),J=o&&ze;return j.length>0||J||(L??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[j.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[j.map(Ne=>St(Ne,"two-row-bottom",Wt(f,Ne,"two-row-bottom"))),ze&&o?r.jsxs(r.Fragment,{children:[_r(),Hr()]}):null]}):null,(L??0)>0||J?r.jsx("div",{"data-controls":J?"titleRowMarginBottom":void 0,"data-controls-axis":J?"y":void 0,"data-controls-reverse":J?"":void 0,className:J?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},ei=(pe,ze=!1)=>r.jsxs(r.Fragment,{children:[Dt(nn(pe)),dn(pe,ze)]}),ti=pe=>K?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(pe)}):pe?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Lt(pe)}):null,Wo=()=>{const pe=K?-1:De.findIndex(j=>j.prefix==="title1"),ze=!K&&(o||(A??0)>0)?(()=>{const j=A??0,J=pe>=0?gt[pe]:mt.title1Width,Ce=Math.max(j,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J),style:{position:"absolute",top:0,left:0,width:z(Ce),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,f=De.flatMap((j,J)=>{if(!j.marginLeftKey)return[];const Ce=Le[j.marginLeftKey]??0,Ne=Ic(De,gt,Le,J)+Gt(),Ye=Math.max(Ce,Bn);return r.jsx("div",{"data-controls":j.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(gt[J]),style:{position:"absolute",top:0,left:z(Ne),width:z(Ye),height:"100%",pointerEvents:"auto"}},j.marginLeftKey)});return ze?[ze,...f]:f},_o=()=>De.map((pe,ze)=>{const f=ln(ze,gt),J=Vt(ze)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":pe.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:z(J),width:z(gn),height:"100%",pointerEvents:"auto"}})},`${pe.widthKey}-junction`)}),_r=()=>pt.flatMap((pe,ze)=>{if(!pe.marginLeftKey)return[];const f=Le[pe.marginLeftKey]??0,j=Nt(ze),J=Math.max(f,Bn),{resolvedWidth:Ce}=Pt(pe,"two-row-bottom");return r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:z(j),width:z(J),height:"100%",pointerEvents:"auto"}},pe.marginLeftKey)}),Hr=()=>pt.map((pe,ze)=>{const{maxWidth:f}=Pt(pe,"two-row-bottom"),J=Ot(ze)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":pe.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:z(J),width:z(gn),height:"100%",pointerEvents:"auto"}})},`${pe.widthKey}-junction`)}),Sn=()=>!o||K?null:r.jsxs(r.Fragment,{children:[Wo(),_o()]}),xi=pe=>{const ze=!pe.objectFit&&Fn(y);return{className:`${e}-slide-image-cell${ze?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:S,maxHeight:E,...ze?{"--image-aspect-ratio":Fr(y)}:{}}}},Ho=pe=>pe.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":pe.objectFit}}:Fn(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=pe=>{if(pe.length===0)return null;const ze=pe.length>1,f=Zr(ie),j=`calc(-0.5 * (${f} + ${ie}))`;if(pe.length===1){const J=pe[0];return r.jsx("div",{...xi(J),children:r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ze?{gap:ie}:void 0,children:pe.map((J,Ce)=>r.jsxs("div",{...xi(J),children:[r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1}),o&&ze&&Ce<pe.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:j,width:f,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${J.url}-${Ce}`))})},No=!!(Z!=null&&Z.title2||Z!=null&&Z.title3||xt!=null&&xt.title2||xt!=null&&xt.title3||(L??0)>0||o),Nr=()=>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:st,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(Q||Z)}),r.jsxs("div",{ref:ht,className:`${e}-titles-row-two-row`,style:{...fe&&H?{minHeight:H}:void 0,...fe&&re?{width:re,maxWidth:"100%"}:void 0},children:[Dt(r.jsxs("div",{className:Kt,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%"},children:[xt&&fe?r.jsx("div",{className:`${Ct} ${e}-titles-fade-out`,children:nn(xt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(Z)})]}),fe&&H?H:void 0),No?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[xt&&fe?r.jsx("div",{className:`${Jt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(xt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${K?` ${e}-titles-layer-in-stacked`:""}`,children:dn(Z,!0)})]}):null]})]}),Or=()=>{const pe=No;return 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:ei(Z,!0)}),Sn()]})};return r.jsxs("div",{ref:Be,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ze||Ie()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:vt?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:g,...Ve}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ee,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:at,onClick:pe=>pe.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":xe&&ge.length>1?"true":"false",onPointerDown:xe?Tt:void 0,onPointerUp:xe?Ut:void 0,onPointerCancel:xe?Zt:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ye?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:pe=>{pe.target===pe.currentTarget&&me(Me)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(wt.images)})},`slide-out-${Me}`):null,r.jsx("div",{className:`${e}-slide-layer-in${ye?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:ee?ni(ee.images):null})},`slide-in-${Me}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Je,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:le,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...K?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${K?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&r.jsx("div",{className:`${e}-text-bar-cell${K?` ${e}-text-bar-cell-stacked`:""}`,style:K?void 0:{flex:1,minWidth:0,width:"100%"},children:K?I==="fade"?Nr():Or():I==="fade"?Qe():Mt()})})})]})]})]})};function ov(e){return`
15160
+ `,Yy="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>'),si={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 Zy(e){const t={};return t[Bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Bt(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Bt(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Bt(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Bt(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Bt(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Bt(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Bt(e,"textAppearance")]={...si.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Jy=qi.reduce((e,t)=>({...e,...Zy(t)}),{}),Qy=qi.reduce((e,t)=>({...e,[Bt(t,"fontFamily")]:"Goudy Bookletter 1911",[Bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Bt(t,"letterSpacing")]:0,[Bt(t,"wordSpacing")]:0,[Bt(t,"textAlign")]:"left",[Bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function sa(e){return qi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Bt(n,"fontSize")]=i),o!==void 0&&(t[Bt(n,"lineHeight")]=o),t},{})}const ev=By(),tv={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:"layout",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:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",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","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",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:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Jy,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Yy,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Qy},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...sa({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...sa({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,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...sa({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:[ev]}],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/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},nv={element:Xy,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:tv,sourceCode:Ky,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...qi.map(e=>({path:`${Bt(e,"fontFamily")}`}))]},fontRelations:{...qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Bt(t,"fontFamily")}`}),{})}},iv=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:l=0,enableUrlSync:d=!1,journalItemId:c=null,onBeforeClose:u,onClose:p})=>{const{type:v,coverFit:y,backgroundColor:g,imageGap:h,maxWidth:m,maxHeight:b,textTransition:I,title1Width:R,title2Width:T,title3Width:G,title1MarginLeft:A=0,title2MarginLeft:V=0,title3MarginLeft:k=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="single-row",countCloseGap:x=0,closeIcon:W,closeIconMaxWidth:M,closeIconColor:Y,closeIconHoverColor:F,contentMarginTop:U=0,iconMarginRight:B=0}=n,j=a.useCallback(pe=>C.scalingValue(pe,i??!1),[i]),ie=j(h??0),S=`${m}%`,E=`${b}%`,O=j(x),le=j(U),oe=j(B),$=pi("title1",ui(n,"title1"),i),ae=pi("title2",ui(n,"title2"),i),P=pi("title3",ui(n,"title3"),i),te=pi("count",ui(n,"count"),i),K=D==="mobile",xe=!i||!!s,Fe=!o&&(!i||!!s),ge=a.useMemo(()=>ar(t,v),[t,v]),[ce,X]=a.useState(l),ee=ge[ce],Z=ee==null?void 0:ee.entry,[Pe,$e]=a.useState(!1),[ke,ue]=a.useState(null),[fe,Se]=a.useState(!1),[z,se]=a.useState(null),[ye,ve]=a.useState(!1),[Me,Te]=a.useState(0),[H,he]=a.useState(),[re,_]=a.useState(),[Q,Ae]=a.useState(null),de=a.useRef(null),N=a.useRef(0),Ue=a.useRef(0),Oe=a.useRef(0),dt=a.useRef(!1),nt=a.useRef(null),ht=a.useRef(null),st=a.useRef(null),Be=a.useRef(null),be=a.useRef(null),We=a.useRef(null),je=a.useRef(null),Ke=a.useCallback(()=>{const pe=ht.current;if(!pe)return;const ze=pe.closest(`.${e}-lightbox-content-area`);if(!ze)return pe.getBoundingClientRect().width;const f=Array.from(ze.children).reduce((q,J)=>!(J instanceof HTMLElement)||J.contains(pe)?q:q+J.getBoundingClientRect().width,0);return ze.getBoundingClientRect().width-f},[e]),ne=a.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),me=a.useCallback(pe=>{pe===N.current&&(se(null),ve(!1))},[]),Ie=a.useCallback(()=>{o||dt.current||(dt.current=!0,u==null||u(),$e(!1),nt.current=setTimeout(()=>{p()},300))},[o,u,p]),Ge=a.useCallback(pe=>!!(pe.closest("[data-controls]")||pe.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ze,backdropStyle:Ve,mediaAreaStyle:at,overlayContentStyle:Je,swipeHandlers:Ee,dismissAreaStyle:qe}=Bc({enabled:Fe,onClose:Ie,animMs:300,isBlockedTarget:Ge}),_e=a.useCallback(pe=>{d&&Tc(pe+1,c,!0)},[d,c]),tt=a.useCallback(pe=>{if(pe)return pe.getBoundingClientRect().height},[]),rt=a.useCallback(pe=>{if(ge.length===0)return;const ze=(pe%ge.length+ge.length)%ge.length;if(ze===ce)return;const f=ge[ce],q=ge[ze];N.current+=1;const J=N.current,Ce=I==="fade"&&Gs(f==null?void 0:f.entry)!==Gs(q==null?void 0:q.entry),Ne=tt(st.current),Ye=Ce?(()=>{const Rt=Ke();Yn.flushSync(()=>{Ae(q.entry)}),st.current&&Rt&&(st.current.style.width=`${Rt}px`);const tn=tt(st.current);return st.current&&(st.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,bt=Math.max(Ne??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;Te(J),se(ce),ve(!0),X(ze),_e(ze),Oe.current=ze,Ce?(ne(),bt&&he(bt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&_(Ye.incomingTitlesMeasureWidth),ue((f==null?void 0:f.entryIndex)??null),Se(!0),Ue.current=q.entryIndex,de.current=setTimeout(()=>{ue(null),Se(!1),he(void 0),_(void 0),Ae(null),de.current=null},400)):(ne(),ue(null),Se(!1),he(void 0),_(void 0),Ae(null),Ue.current=q.entryIndex)},[ce,ne,Ke,tt,ge,_e,I]),lt=a.useCallback(()=>{je.current=null},[]),Tt=a.useCallback(pe=>{!xe||ge.length<=1||pe.pointerType==="mouse"&&pe.button!==0||pe.target.closest("[data-controls]")||(je.current={startX:pe.clientX,startY:pe.clientY,pointerId:pe.pointerId})},[xe,ge.length]),Ut=a.useCallback(pe=>{var Rt;if(!xe||ge.length<=1||pe.pointerType==="mouse"&&pe.button!==0)return;if(Ze){lt();return}const ze=je.current;if(!ze||ze.pointerId!==pe.pointerId||(lt(),pe.target.closest("[data-controls]")))return;const q=pe.clientX-ze.startX,J=pe.clientY-ze.startY,Ce=Math.abs(q),Ne=Math.abs(J);if(Ce>=gh&&Ce>Ne){rt(q>0?ce-1:ce+1);return}if(Ce>js||Ne>js)return;const Ye=(Rt=Be.current)==null?void 0:Rt.getBoundingClientRect(),bt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;rt(pe.clientX<bt?ce-1:ce+1)},[ce,xe,rt,Ze,lt,ge.length]),Zt=a.useCallback(pe=>{const ze=je.current;(ze==null?void 0:ze.pointerId)===pe.pointerId&&lt()},[lt]);Vc(),a.useEffect(()=>{We.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const pe=requestAnimationFrame(()=>{$e(!0),requestAnimationFrame(()=>{be.current?be.current.focus():Be.current&&Be.current.focus()})});return()=>{cancelAnimationFrame(pe),nt.current&&clearTimeout(nt.current),de.current&&clearTimeout(de.current);const ze=We.current;ze&&document.contains(ze)&&ze.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var pe;I!=="fade"&&(Ue.current=((pe=ge[ce])==null?void 0:pe.entryIndex)??0,ne(),ue(null),Se(!1),he(void 0),_(void 0))},[ce,ne,ge,I]),a.useEffect(()=>{const pe=ze=>{if(ze.key==="Escape"){Ie();return}if(ze.key==="ArrowLeft"&&ge.length>1){rt(ce-1);return}if(ze.key==="ArrowRight"&&ge.length>1){rt(ce+1);return}if(ze.key==="Tab"&&Be.current){const f=Be.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),q=Array.from(f).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(q.length===0)return;const J=q[0],Ce=q[q.length-1],Ne=document.activeElement;ze.shiftKey?(Ne===J||!Be.current.contains(Ne))&&(ze.preventDefault(),Ce.focus()):(Ne===Ce||!Be.current.contains(Ne))&&(ze.preventDefault(),J.focus())}};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[rt,Ie,ce,ge.length]),a.useLayoutEffect(()=>{ne(),N.current=0,Te(0),se(null),ve(!1),ue(null),Se(!1),he(void 0),_(void 0),Ae(null),X(pe=>{const ze=Math.max(0,ge.length-1);return Math.min(pe,ze)})},[ne,t.length,v,ge.length]),a.useLayoutEffect(()=>{var f;const pe=Math.max(0,ge.length-1),ze=Math.min(Math.max(0,l),pe);Oe.current=ze,Ue.current=((f=ge[ze])==null?void 0:f.entryIndex)??0,X(ze)},[l]);const xt=ke!==null?t[ke]:null,wt=z!==null?ge[z]:null,jt=(Z==null?void 0:Z.title1)||(Z==null?void 0:Z.title2)||(Z==null?void 0:Z.title3)||(xt==null?void 0:xt.title1)||(xt==null?void 0:xt.title2)||(xt==null?void 0:xt.title3),At=Sh(v,ge,t),vt=W!==null,Ft=jt||At||vt,_t=At&&vt?{gap:O}:void 0,Kt=`${e}-titles-stack${K?` ${e}-titles-stack-stacked`:""}`,Jt=`${e}-titles-layer-out${K?` ${e}-titles-layer-out-stacked`:""}`,Ct=`${e}-titles-layer-out`,Ht=(A??0)>0||o,on=j(L),mt=a.useMemo(()=>({title1Width:R??Fi.title1Width,title2Width:T??Fi.title2Width,title3Width:G??Fi.title3Width}),[R,T,G]),Le=a.useMemo(()=>({title2MarginLeft:V,title3MarginLeft:k}),[V,k]),De=a.useMemo(()=>Z?Vn(e,Z,$,ae,P):[],[e,Z,$,ae,P]),it=a.useMemo(()=>De.map(pe=>mt[pe.widthKey]),[De,mt]),gt=a.useMemo(()=>Di(De.length,it),[De.length,it]),ft=a.useMemo(()=>wo(De.length,it),[De.length,it]),It=a.useMemo(()=>De.filter(pe=>pe.prefix==="title1"),[De]),pt=a.useMemo(()=>De.filter(pe=>pe.prefix==="title2"||pe.prefix==="title3"),[De]),zt=a.useMemo(()=>Gn(It,mt),[It,mt]),kt=a.useMemo(()=>Gn(pt,mt),[pt,mt]),Pt=a.useCallback((pe,ze)=>{const f=De.findIndex(J=>J.prefix===pe.prefix);if(!K||ze==="single-row")return{effectiveWidth:ft[f]??0,resolvedWidth:gt[f]??0,maxWidth:ln(f,gt)};if(ze==="two-row-top"){const J=It.findIndex(Ce=>Ce.prefix===pe.prefix);return{effectiveWidth:zt.effective[J]??0,resolvedWidth:zt.resolved[J]??0,maxWidth:ln(J,zt.resolved)}}const q=pt.findIndex(J=>J.prefix===pe.prefix);return{effectiveWidth:kt.effective[q]??0,resolvedWidth:kt.resolved[q]??0,maxWidth:ln(q,kt.resolved)}},[De,pt,kt,ft,gt,It,zt,K]),Vt=a.useCallback(pe=>Ec(De,gt,Le,pe)+(K?0:A??0),[De,gt,Le,K,A]),Gt=a.useCallback(()=>K?0:A??0,[K,A]),Nt=a.useCallback(pe=>pt.slice(0,pe).reduce((ze,f,q)=>ze+(f.marginLeftKey?Le[f.marginLeftKey]??0:0)+(kt.resolved[q]??0),0),[pt,kt.resolved,Le]),Ot=a.useCallback(pe=>{const ze=pt[pe];return Nt(pe)+(ze.marginLeftKey?Le[ze.marginLeftKey]??0:0)+(kt.resolved[pe]??0)},[pt,kt.resolved,Nt,Le]),Wt=a.useCallback((pe,ze,f)=>{if(!K||f==="single-row"){const Ye=pe.findIndex(Qt=>Qt.prefix===ze.prefix),bt=pe.map(Qt=>mt[Qt.widthKey]),Rt=Di(pe.length,bt);return{effectiveWidth:wo(pe.length,bt)[Ye]??0,resolvedWidth:Rt[Ye]??0,maxWidth:ln(Ye,Rt)}}if(f==="two-row-top"){const Ye=pe.filter(Qt=>Qt.prefix==="title1"),bt=Ye.findIndex(Qt=>Qt.prefix===ze.prefix),{resolved:Rt,effective:tn}=Gn(Ye,mt);return{effectiveWidth:tn[bt]??0,resolvedWidth:Rt[bt]??0,maxWidth:ln(bt,Rt)}}const q=pe.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),J=q.findIndex(Ye=>Ye.prefix===ze.prefix),{resolved:Ce,effective:Ne}=Gn(q,mt);return{effectiveWidth:Ne[J]??0,resolvedWidth:Ce[J]??0,maxWidth:ln(J,Ce)}},[mt,K]),St=(pe,ze,f)=>{const q=pe.marginLeftKey?Le[pe.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:Ce,maxWidth:Ne}=f??Pt(pe,ze),Ye=Math.max(q,Bn),bt=o&&ze==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":pe.prefix,style:{width:j(J),...q>0?{marginLeft:j(q)}:{}},children:[r.jsx("p",{className:pe.className,style:pe.style,children:pe.text}),bt&&pe.marginLeftKey?r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:j(-q),width:j(Ye),height:"100%",pointerEvents:"auto"}}):null,bt?r.jsx("div",{"data-controls":pe.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ne),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:j(-gn/2),width:j(gn),height:"100%",pointerEvents:"auto"}}):null]},pe.className)},w=(pe="two-row")=>{const ze=De.findIndex(J=>J.prefix==="title1"),f=ze>=0?gt[ze]:mt.title1Width,q=pe==="two-row"&&o;return r.jsx("div",{...q?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(f)}:{},style:{width:j(A??0),flexShrink:0,alignSelf:"stretch",...q?{pointerEvents:"auto"}:{}}})},we=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),Re=()=>r.jsx("span",{className:`${e}-entry-counter`,style:te,"aria-live":"polite","aria-atomic":"true",children:wh(ge,ce,v,t)}),He=()=>At?o&&vt?r.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Re(),r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${Zr(O)} + ${O}))`,width:Zr(O),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Re():null,ot=()=>!At&&!vt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:_t,children:[He(),vt?yt():null]}),Mt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?we():null,Ht?w("single-row"):null,Lt(Z),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ot(),Sn()]}),Qe=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||jt?we():null,Ht?w("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:fe&&H?{minHeight:H}:void 0,children:[r.jsx("div",{ref:st,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(Q||Z)}),r.jsxs("div",{ref:ht,className:Kt,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%",...fe&&re?{width:re,maxWidth:"100%"}:void 0},children:[xt&&fe?r.jsx("div",{className:`${Jt} ${e}-titles-fade-out`,children:ti(xt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(Z)})]})]}),ot(),Sn()]}),yt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(M??0,i),height:C.scalingValue(M??0,i),marginRight:oe,"--close-icon-hover-color":F},children:[r.jsx("button",{ref:be,type:"button",className:`${e}-close-icon-inner`,onClick:Ie,"aria-label":"Close",children:r.jsx(an,{url:W??"",fill:Y,hoverFill:i&&!s?Y:F,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:oe,height:"100%",pointerEvents:"auto"}})]}),Dt=(pe,ze)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[At||jt?we():null,Ht?w("two-row"):null,ze!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:ze},children:pe}):r.jsxs(r.Fragment,{children:[pe,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ot()]}),Lt=pe=>{if(!pe)return null;const ze=Vn(e,pe,$,ae,P);return r.jsx(r.Fragment,{children:ze.map(f=>St(f,"single-row",Wt(ze,f,"single-row")))})},nn=pe=>{if(!pe)return null;const ze=Vn(e,pe,$,ae,P),f=ze.find(q=>q.prefix==="title1");return f?St(f,"two-row-top",Wt(ze,f,"two-row-top")):null},dn=(pe,ze=!1)=>{const f=pe?Vn(e,pe,$,ae,P):[],q=f.filter(Ne=>Ne.prefix==="title2"||Ne.prefix==="title3"),J=o&&ze;return q.length>0||J||(L??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[q.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[q.map(Ne=>St(Ne,"two-row-bottom",Wt(f,Ne,"two-row-bottom"))),ze&&o?r.jsxs(r.Fragment,{children:[_r(),Hr()]}):null]}):null,(L??0)>0||J?r.jsx("div",{"data-controls":J?"titleRowMarginBottom":void 0,"data-controls-axis":J?"y":void 0,"data-controls-reverse":J?"":void 0,className:J?`${e}-control`:void 0,style:{height:on,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},ei=(pe,ze=!1)=>r.jsxs(r.Fragment,{children:[Dt(nn(pe)),dn(pe,ze)]}),ti=pe=>K?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(pe)}):pe?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Lt(pe)}):null,Wo=()=>{const pe=K?-1:De.findIndex(q=>q.prefix==="title1"),ze=!K&&(o||(A??0)>0)?(()=>{const q=A??0,J=pe>=0?gt[pe]:mt.title1Width,Ce=Math.max(q,Bn);return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(J),style:{position:"absolute",top:0,left:0,width:j(Ce),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,f=De.flatMap((q,J)=>{if(!q.marginLeftKey)return[];const Ce=Le[q.marginLeftKey]??0,Ne=Ic(De,gt,Le,J)+Gt(),Ye=Math.max(Ce,Bn);return r.jsx("div",{"data-controls":q.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(gt[J]),style:{position:"absolute",top:0,left:j(Ne),width:j(Ye),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return ze?[ze,...f]:f},_o=()=>De.map((pe,ze)=>{const f=ln(ze,gt),J=Vt(ze)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":pe.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:j(J),width:j(gn),height:"100%",pointerEvents:"auto"}})},`${pe.widthKey}-junction`)}),_r=()=>pt.flatMap((pe,ze)=>{if(!pe.marginLeftKey)return[];const f=Le[pe.marginLeftKey]??0,q=Nt(ze),J=Math.max(f,Bn),{resolvedWidth:Ce}=Pt(pe,"two-row-bottom");return r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:j(q),width:j(J),height:"100%",pointerEvents:"auto"}},pe.marginLeftKey)}),Hr=()=>pt.map((pe,ze)=>{const{maxWidth:f}=Pt(pe,"two-row-bottom"),J=Ot(ze)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":pe.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:j(J),width:j(gn),height:"100%",pointerEvents:"auto"}})},`${pe.widthKey}-junction`)}),Sn=()=>!o||K?null:r.jsxs(r.Fragment,{children:[Wo(),_o()]}),xi=pe=>{const ze=!pe.objectFit&&Fn(y);return{className:`${e}-slide-image-cell${ze?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:S,maxHeight:E,...ze?{"--image-aspect-ratio":Fr(y)}:{}}}},Ho=pe=>pe.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":pe.objectFit}}:Fn(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=pe=>{if(pe.length===0)return null;const ze=pe.length>1,f=Zr(ie),q=`calc(-0.5 * (${f} + ${ie}))`;if(pe.length===1){const J=pe[0];return r.jsx("div",{...xi(J),children:r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ze?{gap:ie}:void 0,children:pe.map((J,Ce)=>r.jsxs("div",{...xi(J),children:[r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1}),o&&ze&&Ce<pe.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:q,width:f,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${J.url}-${Ce}`))})},No=!!(Z!=null&&Z.title2||Z!=null&&Z.title3||xt!=null&&xt.title2||xt!=null&&xt.title3||(L??0)>0||o),Nr=()=>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:st,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(Q||Z)}),r.jsxs("div",{ref:ht,className:`${e}-titles-row-two-row`,style:{...fe&&H?{minHeight:H}:void 0,...fe&&re?{width:re,maxWidth:"100%"}:void 0},children:[Dt(r.jsxs("div",{className:Kt,style:{position:fe?"absolute":"relative",inset:fe?0:void 0,width:"100%"},children:[xt&&fe?r.jsx("div",{className:`${Ct} ${e}-titles-fade-out`,children:nn(xt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:nn(Z)})]}),fe&&H?H:void 0),No?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[xt&&fe?r.jsx("div",{className:`${Jt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(xt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${fe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${K?` ${e}-titles-layer-in-stacked`:""}`,children:dn(Z,!0)})]}):null]})]}),Or=()=>{const pe=No;return 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:ei(Z,!0)}),Sn()]})};return r.jsxs("div",{ref:Be,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ze||Ie()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:vt?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:g,...Ve}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ee,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:at,onClick:pe=>pe.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":xe&&ge.length>1?"true":"false",onPointerDown:xe?Tt:void 0,onPointerUp:xe?Ut:void 0,onPointerCancel:xe?Zt:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[wt&&ye?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:pe=>{pe.target===pe.currentTarget&&me(Me)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(wt.images)})},`slide-out-${Me}`):null,r.jsx("div",{className:`${e}-slide-layer-in${ye?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:ee?ni(ee.images):null})},`slide-in-${Me}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Je,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:le,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...K?{flex:1,minHeight:0}:{}},children:r.jsx("div",{className:`${e}-lightbox-content-area${K?` ${e}-lightbox-content-area-stacked`:""}`,children:Ft&&r.jsx("div",{className:`${e}-text-bar-cell${K?` ${e}-text-bar-cell-stacked`:""}`,style:K?void 0:{flex:1,minWidth:0,width:"100%"},children:K?I==="fade"?Nr():Or():I==="fade"?Qe():Mt()})})})]})]})]})};function ov(e){return`
15161
15161
  .${e}-wrapper {
15162
15162
  position: relative;
15163
15163
  width: 100%;
@@ -15679,7 +15679,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15679
15679
  pointer-events: auto;
15680
15680
  z-index: 10;
15681
15681
  }
15682
- `}const rv=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=C.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,y=a.useRef(null),[g,h]=a.useState(!1),[m,b]=a.useState(0),I=a.useRef(!1),R=a.useRef(!1),T=a.useRef(!1),q=a.useMemo(()=>(t??[]).filter(x=>Oi(x).length>0),[t]),A=g&&q.length>0,G=!n,k=a.useCallback(()=>{G&&(T.current=!0,fh(R.current,c),R.current=!1)},[G,c]),L=(x=0)=>{if(q.length===0||n&&!i&&!o)return;const W=ar(q,v),M=Math.max(0,Math.min(x,W.length-1));if(b(M),G){const Y=Lc();Tc(M+1,c,Y),R.current=!Y}h(!0)},D=a.useCallback(()=>{h(!1),T.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!G||I.current)return;I.current=!0;const x=Bs(c);if(!x)return;const W=Vs(x,ar(q,v).length);W<0||(b(W),h(!0))},[q,c,G,v]),a.useEffect(()=>{if(!G)return;const x=()=>{if(T.current){T.current=!1,h(!1);return}const W=Bs(c);if(!W){h(!1);return}const M=Vs(W,ar(q,v).length);if(M<0){h(!1);return}R.current=!1,b(M),h(!0)};return window.addEventListener("popstate",x),()=>window.removeEventListener("popstate",x)},[q,c,G,v]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:y,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ov(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>L(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(p)?{"--image-aspect-ratio":Fr(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),A&&typeof document<"u"&&(()=>{const x=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx(iv,{prefix:d,entries:q,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:m,enableUrlSync:G,journalItemId:c,onBeforeClose:k,onClose:D}),x)})()]})},av=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15682
+ `}const rv=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:l})=>{const{prefix:d}=C.useScopedStyles(),c=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:v}=e,y=a.useRef(null),[g,h]=a.useState(!1),[m,b]=a.useState(0),I=a.useRef(!1),R=a.useRef(!1),T=a.useRef(!1),G=a.useMemo(()=>(t??[]).filter(x=>Oi(x).length>0),[t]),A=g&&G.length>0,V=!n,k=a.useCallback(()=>{V&&(T.current=!0,fh(R.current,c),R.current=!1)},[V,c]),L=(x=0)=>{if(G.length===0||n&&!i&&!o)return;const W=ar(G,v),M=Math.max(0,Math.min(x,W.length-1));if(b(M),V){const Y=Lc();Tc(M+1,c,Y),R.current=!Y}h(!0)},D=a.useCallback(()=>{h(!1),T.current=!1},[]);return a.useEffect(()=>{!n||i||o||h(!1)},[n,i,o]),a.useEffect(()=>{if(!V||I.current)return;I.current=!0;const x=Bs(c);if(!x)return;const W=Vs(x,ar(G,v).length);W<0||(b(W),h(!0))},[G,c,V,v]),a.useEffect(()=>{if(!V)return;const x=()=>{if(T.current){T.current=!1,h(!1);return}const W=Bs(c);if(!W){h(!1);return}const M=Vs(W,ar(G,v).length);if(M<0){h(!1);return}R.current=!1,b(M),h(!0)};return window.addEventListener("popstate",x),()=>window.removeEventListener("popstate",x)},[G,c,V,v]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:y,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ov(d)}}),u?r.jsx("button",{type:"button",className:`${d}-cover ${Fn(p)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>L(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...Fn(p)?{"--image-aspect-ratio":Fr(p)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${Fn(p)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),A&&typeof document<"u"&&(()=>{const x=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx(iv,{prefix:d,entries:G,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:m,enableUrlSync:V,journalItemId:c,onBeforeClose:k,onClose:D}),x)})()]})},av=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15683
15683
  import { createPortal } from 'react-dom';
15684
15684
  import { CommonComponentProps } from '../props';
15685
15685
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16470,7 +16470,7 @@ export type LightboxJournalSettings = {
16470
16470
  width: 32px;
16471
16471
  height: 32px;
16472
16472
  }
16473
- `}function yv(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 vv(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yv(i)]));return new Map(n)}function xv({settings:e,content:t=[],isEditor:n}){const{prefix:i}=C.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),p=a.useRef(0),[v,y]=a.useState({x:0,y:0}),[g,h]=a.useState("none"),m=a.useRef({x:0,y:0}),[b,I]=a.useState(!1),[R,T]=a.useState(!1),q=a.useRef(new Map),{imageSize:A=gv,cursor:G="system",target:k="area",position:L="random",visible:D="all",defaultCursor:x=null,hoverCursor:W=null}=e,M=t.filter(S=>{var E;return!!((E=S==null?void 0:S.image)!=null&&E.url)}),Y=a.useMemo(()=>fv(i),[i]),F=a.useCallback((S,E,O=l)=>{if(!o)return;const le=o.getBoundingClientRect(),oe=S-le.left,$=E-le.top;y({x:oe,y:$}),h(hv(oe,$,O,o,G,k,W,x))},[o,l,G,k,W,x]);a.useEffect(()=>{const S=[...M.map(O=>O.image.url),x,W].filter(O=>!!O);if(S.length===0){q.current=new Map,T(!0);return}let E=!1;return T(!1),vv(S).then(O=>{E||(q.current=O,T(!0))}),()=>{E=!0}},[t,x,W]),a.useEffect(()=>{if(!o)return;const S=O=>{O.stopPropagation(),m.current={x:O.clientX,y:O.clientY},F(O.clientX,O.clientY)},E=()=>{b&&F(m.current.x,m.current.y)};return o.addEventListener("mousemove",S),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",S),window.removeEventListener("scroll",E,!0)}},[o,b,F]),a.useEffect(()=>{!o||!b||F(m.current.x,m.current.y)},[l,o,b,F]),a.useEffect(()=>{b||h("none")},[b]);const U=(S,E,O,le={})=>{var K,xe;if(!((K=S==null?void 0:S.image)!=null&&K.url))return null;const oe=((xe=q.current.get(S.image.url))==null?void 0:xe.aspectRatio)??1,$=vl(S.image.url,A,q.current),{heightPx:ae}=yr($,oe);let P=0,te=0;return L==="same"?{x:P,y:te}=yl(E,O,$,oe):(P=le.x??Math.random()*E,te=le.y??Math.random()*O,{x:P,y:te}=Ma(P,te,E,O,$,ae)),{id:p.current++,url:S.image.url,link:S.link,name:S.image.name,x:P,y:te,xRatio:P/E,yRatio:te/O,aspectRatio:oe,widthPx:$}},V=()=>{if(!o)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height;E===0||O===0||d(le=>le.length===0?le:le.map(oe=>{const $=A.sizeType==="random"?oe.widthPx:vl(oe.url,A,q.current),{heightPx:ae}=yr($,oe.aspectRatio);if(L==="same"){const{x:K,y:xe}=yl(E,O,$,oe.aspectRatio);return{...oe,x:K,y:xe,widthPx:$}}const{x:P,y:te}=Ma(oe.xRatio*E,oe.yRatio*O,E,O,$,ae);return{...oe,x:P,y:te,widthPx:$}}))};a.useEffect(()=>{if(!o||M.length===0||!R)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height,le=U(M[0],E,O);le&&(d([le]),u(M.length>1?1:0))},[A,L,o,t,R]),a.useEffect(()=>{if(!o)return;V();const S=new ResizeObserver(V);return S.observe(o),window.addEventListener("resize",V),()=>{S.disconnect(),window.removeEventListener("resize",V)}},[o,L,A,l.length]),a.useEffect(()=>{D==="last One"&&d(S=>S.length>0?[S[S.length-1]]:[])},[D]);const z=S=>{if(!o||M.length===0||!R)return;const E=o.getBoundingClientRect(),O=S.clientX-E.left,le=S.clientY-E.top;if(k==="image"&&!qc(O,le,l))return;let oe=0,$=0;L==="on Click"?(oe=O,$=le):L==="same"?(oe=E.width/2,$=E.height/2):(oe=Math.random()*E.width,$=Math.random()*E.height);const ae=M[c%M.length],P=U(ae,E.width,E.height,{x:oe,y:$});if(!P)return;const te=D==="all"?[...l,P]:[P];d(te),u(K=>(K+1)%M.length),F(S.clientX,S.clientY,te)},ie=G==="custom"&&g!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),r.jsxs("div",{ref:s,onClick:z,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:`${i}-root`,style:{cursor:ie?"none":"default"},children:[l.map(S=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${S.y}px`,left:`${S.x}px`,width:`${S.widthPx}px`,cursor:ie?"none":"default"},children:k==="area"&&S.link?r.jsx("a",{href:S.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})}):r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})},S.id)),b&&ie&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16473
+ `}function yv(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 vv(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await yv(i)]));return new Map(n)}function xv({settings:e,content:t=[],isEditor:n}){const{prefix:i}=C.useScopedStyles(),[o,s]=a.useState(null),[l,d]=a.useState([]),[c,u]=a.useState(0),p=a.useRef(0),[v,y]=a.useState({x:0,y:0}),[g,h]=a.useState("none"),m=a.useRef({x:0,y:0}),[b,I]=a.useState(!1),[R,T]=a.useState(!1),G=a.useRef(new Map),{imageSize:A=gv,cursor:V="system",target:k="area",position:L="random",visible:D="all",defaultCursor:x=null,hoverCursor:W=null}=e,M=t.filter(S=>{var E;return!!((E=S==null?void 0:S.image)!=null&&E.url)}),Y=a.useMemo(()=>fv(i),[i]),F=a.useCallback((S,E,O=l)=>{if(!o)return;const le=o.getBoundingClientRect(),oe=S-le.left,$=E-le.top;y({x:oe,y:$}),h(hv(oe,$,O,o,V,k,W,x))},[o,l,V,k,W,x]);a.useEffect(()=>{const S=[...M.map(O=>O.image.url),x,W].filter(O=>!!O);if(S.length===0){G.current=new Map,T(!0);return}let E=!1;return T(!1),vv(S).then(O=>{E||(G.current=O,T(!0))}),()=>{E=!0}},[t,x,W]),a.useEffect(()=>{if(!o)return;const S=O=>{O.stopPropagation(),m.current={x:O.clientX,y:O.clientY},F(O.clientX,O.clientY)},E=()=>{b&&F(m.current.x,m.current.y)};return o.addEventListener("mousemove",S),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",S),window.removeEventListener("scroll",E,!0)}},[o,b,F]),a.useEffect(()=>{!o||!b||F(m.current.x,m.current.y)},[l,o,b,F]),a.useEffect(()=>{b||h("none")},[b]);const U=(S,E,O,le={})=>{var K,xe;if(!((K=S==null?void 0:S.image)!=null&&K.url))return null;const oe=((xe=G.current.get(S.image.url))==null?void 0:xe.aspectRatio)??1,$=vl(S.image.url,A,G.current),{heightPx:ae}=yr($,oe);let P=0,te=0;return L==="same"?{x:P,y:te}=yl(E,O,$,oe):(P=le.x??Math.random()*E,te=le.y??Math.random()*O,{x:P,y:te}=Ma(P,te,E,O,$,ae)),{id:p.current++,url:S.image.url,link:S.link,name:S.image.name,x:P,y:te,xRatio:P/E,yRatio:te/O,aspectRatio:oe,widthPx:$}},B=()=>{if(!o)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height;E===0||O===0||d(le=>le.length===0?le:le.map(oe=>{const $=A.sizeType==="random"?oe.widthPx:vl(oe.url,A,G.current),{heightPx:ae}=yr($,oe.aspectRatio);if(L==="same"){const{x:K,y:xe}=yl(E,O,$,oe.aspectRatio);return{...oe,x:K,y:xe,widthPx:$}}const{x:P,y:te}=Ma(oe.xRatio*E,oe.yRatio*O,E,O,$,ae);return{...oe,x:P,y:te,widthPx:$}}))};a.useEffect(()=>{if(!o||M.length===0||!R)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height,le=U(M[0],E,O);le&&(d([le]),u(M.length>1?1:0))},[A,L,o,t,R]),a.useEffect(()=>{if(!o)return;B();const S=new ResizeObserver(B);return S.observe(o),window.addEventListener("resize",B),()=>{S.disconnect(),window.removeEventListener("resize",B)}},[o,L,A,l.length]),a.useEffect(()=>{D==="last One"&&d(S=>S.length>0?[S[S.length-1]]:[])},[D]);const j=S=>{if(!o||M.length===0||!R)return;const E=o.getBoundingClientRect(),O=S.clientX-E.left,le=S.clientY-E.top;if(k==="image"&&!qc(O,le,l))return;let oe=0,$=0;L==="on Click"?(oe=O,$=le):L==="same"?(oe=E.width/2,$=E.height/2):(oe=Math.random()*E.width,$=Math.random()*E.height);const ae=M[c%M.length],P=U(ae,E.width,E.height,{x:oe,y:$});if(!P)return;const te=D==="all"?[...l,P]:[P];d(te),u(K=>(K+1)%M.length),F(S.clientX,S.clientY,te)},ie=V==="custom"&&g!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),r.jsxs("div",{ref:s,onClick:j,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:`${i}-root`,style:{cursor:ie?"none":"default"},children:[l.map(S=>r.jsx("div",{className:`${i}-wrapper`,style:{top:`${S.y}px`,left:`${S.x}px`,width:`${S.widthPx}px`,cursor:ie?"none":"default"},children:k==="area"&&S.link?r.jsx("a",{href:S.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})}):r.jsx("img",{src:S.url,alt:S.name,className:`${i}-image`})},S.id)),b&&ie&&r.jsx("div",{className:`${i}-cursor`,style:{left:`${v.x}px`,top:`${v.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const bv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16474
16474
  import { CommonComponentProps } from '../props';
16475
16475
  import { useScopedStyles } from '../utils/index';
16476
16476
 
@@ -17110,7 +17110,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17110
17110
  display: block;
17111
17111
  pointer-events: none;
17112
17112
  }
17113
- `}function Lv(e){return e==="blur"?Cv:e==="greyscale"?$v:0}function io(e,t=1,n=1){const i=Lv(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 xl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Rv(e,t){return t<=1?0:(e-1+t)%t}function Iv(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ev(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function bl(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 Uc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function wl(e,t,n){return{...Uc(e),[`--${n}-stage-scale`]:t}}function Mv(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 Pv({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,B,se,ye,ve,Me,Te;const{prefix:o}=C.useScopedStyles(),s=a.useMemo(()=>Tv(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],y=xl(v.length),[g,h]=a.useState(y.activeIndex),[m,b]=a.useState(y.backgroundIndex),[I,R]=a.useState(!1),[T,q]=a.useState(!1),[A,G]=a.useState(null),[k,L]=a.useState(null),[D,x]=a.useState(0),[W,M]=a.useState(1),[Y,F]=a.useState("none"),[U,V]=a.useState("next"),[z,ie]=a.useState({}),[S,E]=a.useState({width:0,height:0}),O=a.useRef(null),le=a.useRef(null),oe=!n||!!i,$=l??60,ae=Math.max(10,Math.min(100,d??$)),P=Math.max(10,Math.min(100,c??$)),te=Math.max(100,u),K=io(p),xe=a.useCallback(H=>{const he=Iv(H?z[H]:void 0);return Ev(S.width,S.height,he,ae,P)},[S.height,S.width,z,P,ae]);a.useEffect(()=>{const H=le.current;if(!H)return;const he=new ResizeObserver(([re])=>{const{width:_,height:Q}=re.contentRect;E({width:_,height:Q})});return he.observe(H),()=>he.disconnect()},[]),a.useEffect(()=>{const H=(t??[]).map(he=>{var re;return(re=he.image)==null?void 0:re.url}).filter(he=>!!he);Mv(H,(he,re)=>{ie(_=>{var Q,Ae;return((Q=_[he])==null?void 0:Q.width)===re.width&&((Ae=_[he])==null?void 0:Ae.height)===re.height?_:{..._,[he]:re}})})},[t]),a.useEffect(()=>{const{backgroundIndex:H,activeIndex:he}=xl(v.length);h(he),b(H),R(!1),q(!1),G(null),L(null),x(0),M(1),F("none"),V("next")},[v.length,t]),a.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const Fe=a.useCallback(H=>{var de,N,Ue,Oe;if(!oe||I||v.length<=1)return;const he=H==="next"?(g+1)%v.length:(g-1+v.length)%v.length,re=xe((N=(de=v[g])==null?void 0:de.image)==null?void 0:N.url),_=xe((Oe=(Ue=v[he])==null?void 0:Ue.image)==null?void 0:Oe.url),Q=bl(S.width,S.height,re),Ae=bl(S.width,S.height,_);O.current&&clearTimeout(O.current),V(H),q(!0),R(!0),H==="next"?(G(g),L(he),x(0),M(1),F(io(p,0,1))):(b(Rv(he,v.length)),G(he),L(g),x(1),M(Ae),F(io(p,1,Ae))),requestAnimationFrame(()=>{q(!1),requestAnimationFrame(()=>{H==="next"?(x(1),M(Q),F(io(p,1,Q))):(x(0),M(1),F(io(p,0,1)))})}),O.current=setTimeout(()=>{H==="next"&&b(g),h(he),G(null),L(null),R(!1)},te)},[g,p,S.height,S.width,xe,I,oe,v,te]),ge=v[g],ce=m!==null?v[m]:null,X=A!==null?v[A]:null,ee=k!==null?v[k]:null,Z=v.length<=1?0:(g-1+v.length)%v.length,Pe=v.length<=1?0:(g+1)%v.length,$e=xe((Se=ge==null?void 0:ge.image)==null?void 0:Se.url),ke=xe((B=X==null?void 0:X.image)==null?void 0:B.url),ue=xe((se=ee==null?void 0:ee.image)==null?void 0:se.url),fe={[`--${o}-transition-ms`]:`${te}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:le,className:ut(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:fe,"aria-label":"Zoom gallery",children:[((ye=ce==null?void 0:ce.image)==null?void 0:ye.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:K}})}),I&&((ve=X==null?void 0:X.image)==null?void 0:ve.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${U}`),style:wl(ke,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:X.image.url,alt:"",style:{filter:Y}})}),I&&((Me=ee==null?void 0:ee.image)==null?void 0:Me.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${U}`),style:wl(ue,D,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:ee.image.url,alt:""})}),!I&&((Te=ge==null?void 0:ge.image)==null?void 0:Te.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-foreground`),style:Uc($e),children:r.jsx("img",{className:`${o}-image`,src:ge.image.url,alt:ge.image.name??""})}),oe&&v.length>1&&!I&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Fe("prev"),"aria-label":`Show previous image (${Z+1} of ${v.length})`}),r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-next`),onClick:()=>Fe("next"),"aria-label":`Show next image (${Pe+1} of ${v.length})`})]})]})]})}const kv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17113
+ `}function Lv(e){return e==="blur"?Cv:e==="greyscale"?$v:0}function io(e,t=1,n=1){const i=Lv(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 xl(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function Rv(e,t){return t<=1?0:(e-1+t)%t}function Iv(e,t=1){return!e||e.height===0?t:e.width/e.height}function Ev(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const s=e*i/100,l=t*o/100;let d=s,c=d/n;return c>l&&(c=l,d=c*n),{widthPercent:d/e*100,heightPercent:c/t*100}}function bl(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 Uc(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function wl(e,t,n){return{...Uc(e),[`--${n}-stage-scale`]:t}}function Mv(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 Pv({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Se,z,se,ye,ve,Me,Te;const{prefix:o}=C.useScopedStyles(),s=a.useMemo(()=>Tv(o),[o]),{imageSize:l,maxWidth:d,maxHeight:c,transition:u=1e3,bgImage:p="greyscale"}=e,v=t??[],y=xl(v.length),[g,h]=a.useState(y.activeIndex),[m,b]=a.useState(y.backgroundIndex),[I,R]=a.useState(!1),[T,G]=a.useState(!1),[A,V]=a.useState(null),[k,L]=a.useState(null),[D,x]=a.useState(0),[W,M]=a.useState(1),[Y,F]=a.useState("none"),[U,B]=a.useState("next"),[j,ie]=a.useState({}),[S,E]=a.useState({width:0,height:0}),O=a.useRef(null),le=a.useRef(null),oe=!n||!!i,$=l??60,ae=Math.max(10,Math.min(100,d??$)),P=Math.max(10,Math.min(100,c??$)),te=Math.max(100,u),K=io(p),xe=a.useCallback(H=>{const he=Iv(H?j[H]:void 0);return Ev(S.width,S.height,he,ae,P)},[S.height,S.width,j,P,ae]);a.useEffect(()=>{const H=le.current;if(!H)return;const he=new ResizeObserver(([re])=>{const{width:_,height:Q}=re.contentRect;E({width:_,height:Q})});return he.observe(H),()=>he.disconnect()},[]),a.useEffect(()=>{const H=(t??[]).map(he=>{var re;return(re=he.image)==null?void 0:re.url}).filter(he=>!!he);Mv(H,(he,re)=>{ie(_=>{var Q,Ae;return((Q=_[he])==null?void 0:Q.width)===re.width&&((Ae=_[he])==null?void 0:Ae.height)===re.height?_:{..._,[he]:re}})})},[t]),a.useEffect(()=>{const{backgroundIndex:H,activeIndex:he}=xl(v.length);h(he),b(H),R(!1),G(!1),V(null),L(null),x(0),M(1),F("none"),B("next")},[v.length,t]),a.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const Fe=a.useCallback(H=>{var de,N,Ue,Oe;if(!oe||I||v.length<=1)return;const he=H==="next"?(g+1)%v.length:(g-1+v.length)%v.length,re=xe((N=(de=v[g])==null?void 0:de.image)==null?void 0:N.url),_=xe((Oe=(Ue=v[he])==null?void 0:Ue.image)==null?void 0:Oe.url),Q=bl(S.width,S.height,re),Ae=bl(S.width,S.height,_);O.current&&clearTimeout(O.current),B(H),G(!0),R(!0),H==="next"?(V(g),L(he),x(0),M(1),F(io(p,0,1))):(b(Rv(he,v.length)),V(he),L(g),x(1),M(Ae),F(io(p,1,Ae))),requestAnimationFrame(()=>{G(!1),requestAnimationFrame(()=>{H==="next"?(x(1),M(Q),F(io(p,1,Q))):(x(0),M(1),F(io(p,0,1)))})}),O.current=setTimeout(()=>{H==="next"&&b(g),h(he),V(null),L(null),R(!1)},te)},[g,p,S.height,S.width,xe,I,oe,v,te]),ge=v[g],ce=m!==null?v[m]:null,X=A!==null?v[A]:null,ee=k!==null?v[k]:null,Z=v.length<=1?0:(g-1+v.length)%v.length,Pe=v.length<=1?0:(g+1)%v.length,$e=xe((Se=ge==null?void 0:ge.image)==null?void 0:Se.url),ke=xe((z=X==null?void 0:X.image)==null?void 0:z.url),ue=xe((se=ee==null?void 0:ee.image)==null?void 0:se.url),fe={[`--${o}-transition-ms`]:`${te}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:le,className:ut(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:fe,"aria-label":"Zoom gallery",children:[((ye=ce==null?void 0:ce.image)==null?void 0:ye.url)&&r.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:K}})}),I&&((ve=X==null?void 0:X.image)==null?void 0:ve.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${U}`),style:wl(ke,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:X.image.url,alt:"",style:{filter:Y}})}),I&&((Me=ee==null?void 0:ee.image)==null?void 0:Me.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${U}`),style:wl(ue,D,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:ee.image.url,alt:""})}),!I&&((Te=ge==null?void 0:ge.image)==null?void 0:Te.url)&&r.jsx("div",{className:ut(`${o}-stage`,`${o}-foreground`),style:Uc($e),children:r.jsx("img",{className:`${o}-image`,src:ge.image.url,alt:ge.image.name??""})}),oe&&v.length>1&&!I&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Fe("prev"),"aria-label":`Show previous image (${Z+1} of ${v.length})`}),r.jsx("button",{type:"button",className:ut(`${o}-nav`,`${o}-nav-next`),onClick:()=>Fe("next"),"aria-label":`Show next image (${Pe+1} of ${v.length})`})]})]})]})}const kv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17114
17114
  import cn from 'classnames';
17115
17115
  import { CommonComponentProps } from '../props';
17116
17116
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17871,7 +17871,7 @@ a:active .${e}-button .${e}-icon-image,
17871
17871
  height: calc(1em * var(--${e}-icon-scale, 1));
17872
17872
  width: calc(1em * var(--${e}-icon-scale, 1));
17873
17873
  }
17874
- `}function da(e,t,n="",i,o){const s=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:s}),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 Sl(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(an,{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:l});if(n==="fixed"&&o>0){const d=C.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Dv({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=C.useScopedStyles(),l=a.useMemo(()=>Ov(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:y="text-icon",gap:g=0,iconSize:h=0,iconWidthC:m=0,dimensions:b=!1,padding:I={top:0,right:0,bottom:0,left:0},cornerRadius:R=0,boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:q="rgba(0, 0, 0, 0)",innerBoxShadow:A={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:G="rgba(0, 0, 0, 0)",stroke:k=0,blur:L=0,backgroundColor:D="#000000",textColor:x="#ffffff",borderColor:W="#ffffff",iconColor:M="#ffffff",hoverEffect:Y="none",fontFamily:F,fontSettings:U,fontSize:V,lineHeight:z,letterSpacing:ie=0,wordSpacing:S=0,textAppearance:E,stateOverrides:O,minWidth:le=0,minHeight:oe=0,width:$=0,height:ae=0}=e,P=C.buildColorVars(s,{backgroundColor:D,textColor:x,borderColor:W,iconColor:M,boxShadowColor:q,innerBoxShadowColor:G},Wv,_v,O),te=i&&i!=="default"?`${s}-state-${i}`:"",K=t&&!n?`${s}-editing`:"",xe=Y!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${Y}`:"",Fe=Y==="reveal"||Y==="swipe",ge=Y==="content-roll",ce=Y==="reveal"&&(!t||n),X=b===!0,Z=d==="a"?v??p:p,Pe=d==="c",$e=d!=="b",ke={fontSettings:{fontFamily:F,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:V??.01,lineHeight:z,letterSpacing:ie,wordSpacing:S,textAppearance:E,color:x},fe={...$e?rn(Xt(ke,t)):{},[`--${s}-box-shadow-x`]:C.scalingValue(T.left,t),[`--${s}-box-shadow-y`]:C.scalingValue(T.top,t),[`--${s}-box-shadow-blur`]:C.scalingValue(T.right,t),[`--${s}-box-shadow-spread`]:C.scalingValue(T.bottom,t),[`--${s}-inner-box-shadow-x`]:C.scalingValue(A.left,t),[`--${s}-inner-box-shadow-y`]:C.scalingValue(A.top,t),[`--${s}-inner-box-shadow-blur`]:C.scalingValue(A.right,t),[`--${s}-inner-box-shadow-spread`]:C.scalingValue(A.bottom,t),[`--${s}-backdrop-blur`]:L>0?`blur(${C.scalingValue(L,t)})`:void 0,paddingTop:C.scalingValue(I.top,t),paddingRight:C.scalingValue(I.right,t),paddingBottom:C.scalingValue(I.bottom,t),paddingLeft:C.scalingValue(I.left,t),borderRadius:C.scalingValue(R,t),borderWidth:C.scalingValue(k,t),...Pe?{}:{justifyContent:ca[Z],textAlign:Z},...Pe&&!ge?{gap:C.scalingValue(g,t)}:{},...X?{width:C.scalingValue($,t),height:C.scalingValue(ae,t)}:{minWidth:C.scalingValue(le,t),minHeight:C.scalingValue(oe,t),...Pe?{width:"100%"}:{}}};let Se;const B={display:"inline-flex",alignItems:"center",justifyContent:Pe?ca[Z]:ca[d==="a"?Z:"center"],gap:Pe?C.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Z}:{}};if(d==="b"){const ve=()=>Sl(s,u,h>0?"fixed":"fill",100,h,t);Se=ge?da(s,ve,`${s}-icon-roll`,void 0,B):ve()}else if(d==="c"){const ve=()=>{const Me=r.jsx("span",{className:`${s}-text`,style:{textAlign:Z},children:c}),Te=Sl(s,u,m>0?"fixed":"fill",100,m,t);return y==="icon-text"?r.jsxs(r.Fragment,{children:[Te,Me]}):r.jsxs(r.Fragment,{children:[Me,Te]})};Se=ge?da(s,ve,`${s}-icon-text-roll`,void 0,B):ve()}else Se=ge?da(s,()=>c,`${s}-label-roll`,void 0,B):Fe?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const se=ce?ve=>Hv(ve,s):void 0,ye=ce?ve=>Nv(ve,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:P,children:r.jsx("div",{className:`${s}-wrapper ${te} ${K}`.trim(),children:r.jsx("div",{className:`${s}-button ${xe}`.trim(),style:fe,onMouseEnter:se,onMouseLeave:ye,role:"button",tabIndex:o||t&&!n?void 0:0,children:Se})})})]})}const jv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17874
+ `}function da(e,t,n="",i,o){const s=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:s}),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 Sl(e,t,n="fill",i=100,o=0,s){if(!t)return null;const l=r.jsx(an,{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:l});if(n==="fixed"&&o>0){const d=C.scalingValue(o,s);return r.jsx("span",{className:`${e}-icon`,style:{width:d,height:d},"aria-hidden":"true",children:l})}return r.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Dv({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:s}=C.useScopedStyles(),l=a.useMemo(()=>Ov(s),[s]),{type:d="a",label:c="Button",icon:u,alignment:p="center",alignA:v,order:y="text-icon",gap:g=0,iconSize:h=0,iconWidthC:m=0,dimensions:b=!1,padding:I={top:0,right:0,bottom:0,left:0},cornerRadius:R=0,boxShadow:T={top:0,left:0,right:0,bottom:0},boxShadowColor:G="rgba(0, 0, 0, 0)",innerBoxShadow:A={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:V="rgba(0, 0, 0, 0)",stroke:k=0,blur:L=0,backgroundColor:D="#000000",textColor:x="#ffffff",borderColor:W="#ffffff",iconColor:M="#ffffff",hoverEffect:Y="none",fontFamily:F,fontSettings:U,fontSize:B,lineHeight:j,letterSpacing:ie=0,wordSpacing:S=0,textAppearance:E,stateOverrides:O,minWidth:le=0,minHeight:oe=0,width:$=0,height:ae=0}=e,P=C.buildColorVars(s,{backgroundColor:D,textColor:x,borderColor:W,iconColor:M,boxShadowColor:G,innerBoxShadowColor:V},Wv,_v,O),te=i&&i!=="default"?`${s}-state-${i}`:"",K=t&&!n?`${s}-editing`:"",xe=Y!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${Y}`:"",Fe=Y==="reveal"||Y==="swipe",ge=Y==="content-roll",ce=Y==="reveal"&&(!t||n),X=b===!0,Z=d==="a"?v??p:p,Pe=d==="c",$e=d!=="b",ke={fontSettings:{fontFamily:F,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:B??.01,lineHeight:j,letterSpacing:ie,wordSpacing:S,textAppearance:E,color:x},fe={...$e?rn(Xt(ke,t)):{},[`--${s}-box-shadow-x`]:C.scalingValue(T.left,t),[`--${s}-box-shadow-y`]:C.scalingValue(T.top,t),[`--${s}-box-shadow-blur`]:C.scalingValue(T.right,t),[`--${s}-box-shadow-spread`]:C.scalingValue(T.bottom,t),[`--${s}-inner-box-shadow-x`]:C.scalingValue(A.left,t),[`--${s}-inner-box-shadow-y`]:C.scalingValue(A.top,t),[`--${s}-inner-box-shadow-blur`]:C.scalingValue(A.right,t),[`--${s}-inner-box-shadow-spread`]:C.scalingValue(A.bottom,t),[`--${s}-backdrop-blur`]:L>0?`blur(${C.scalingValue(L,t)})`:void 0,paddingTop:C.scalingValue(I.top,t),paddingRight:C.scalingValue(I.right,t),paddingBottom:C.scalingValue(I.bottom,t),paddingLeft:C.scalingValue(I.left,t),borderRadius:C.scalingValue(R,t),borderWidth:C.scalingValue(k,t),...Pe?{}:{justifyContent:ca[Z],textAlign:Z},...Pe&&!ge?{gap:C.scalingValue(g,t)}:{},...X?{width:C.scalingValue($,t),height:C.scalingValue(ae,t)}:{minWidth:C.scalingValue(le,t),minHeight:C.scalingValue(oe,t),...Pe?{width:"100%"}:{}}};let Se;const z={display:"inline-flex",alignItems:"center",justifyContent:Pe?ca[Z]:ca[d==="a"?Z:"center"],gap:Pe?C.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Z}:{}};if(d==="b"){const ve=()=>Sl(s,u,h>0?"fixed":"fill",100,h,t);Se=ge?da(s,ve,`${s}-icon-roll`,void 0,z):ve()}else if(d==="c"){const ve=()=>{const Me=r.jsx("span",{className:`${s}-text`,style:{textAlign:Z},children:c}),Te=Sl(s,u,m>0?"fixed":"fill",100,m,t);return y==="icon-text"?r.jsxs(r.Fragment,{children:[Te,Me]}):r.jsxs(r.Fragment,{children:[Me,Te]})};Se=ge?da(s,ve,`${s}-icon-text-roll`,void 0,z):ve()}else Se=ge?da(s,()=>c,`${s}-label-roll`,void 0,z):Fe?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const se=ce?ve=>Hv(ve,s):void 0,ye=ce?ve=>Nv(ve,s):void 0;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),r.jsx("div",{className:`${s}-root`,style:P,children:r.jsx("div",{className:`${s}-wrapper ${te} ${K}`.trim(),children:r.jsx("div",{className:`${s}-button ${xe}`.trim(),style:fe,onMouseEnter:se,onMouseLeave:ye,role:"button",tabIndex:o||t&&!n?void 0:0,children:Se})})})]})}const jv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17875
17875
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17876
17876
  import { CommonComponentProps } from '../props';
17877
17877
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18701,7 +18701,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18701
18701
  pointer-events: auto;
18702
18702
  flex-shrink: 0;
18703
18703
  }
18704
- `}const Cn=500,oo=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Uv=72,Xv=50,Kv=1e4,Yv=650,Zv=500;function Jv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Xc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Qv(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Xc(i,n):null}function e0(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function so(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 $l(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return so(e,i,n)}const t0=.03;function Kc(e){return e.width*t0}const ua={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Jo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Cl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function n0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Pa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function i0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Pa(e,t.width,t.height)}function o0(e,t){if(Wr(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 r0(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function a0({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=>Wr(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 Ui(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=Kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function vr(e,t,n){const i=Ui(e,t,n);return{...i,left:2*i.left-e.left}}function s0(e,t,n){const{left:i,width:o}=n,s=Kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Yc(e,t,n,i){const o=Ui(e,"left",i),s=Ui(e,"right",i),l=vr(e,"left",i),d=vr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function l0(e,t,n,i){const{start:o,end:s}=Yc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function c0(e,t,n){const i=Ui(e,t,n),o=vr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Wr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function d0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){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:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Wr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function u0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),q=a.useRef(new Map),[A,G]=a.useState(0),k=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),V=a.useRef(null),z=a.useRef(()=>{}),ie=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[le,oe]=a.useState(null),[$,ae]=a.useState(ua),[P,te]=a.useState(0),[K,xe]=a.useState("opening"),[Fe,ge]=a.useState(0),[ce,X]=a.useState(0),[ee,Z]=a.useState(!1),[Pe,$e]=a.useState(null),[ke,ue]=a.useState(null),[fe,Se]=a.useState(null),[B,se]=a.useState(!1),[ye,ve]=a.useState(null),[Me,Te]=a.useState(!1),H=a.useRef(!1),[he,re]=a.useState(!1),[_,Q]=a.useState(!1),Ae=a.useRef(n),de=a.useRef(void 0),N=t[n],Ue=N?Wr(N):!1,Oe=ce!==0||ee,dt=!l&&(!s||!!d),nt=c&&!l,ht=u.length>1,st=a.useCallback((w,we)=>t.length<=1?null:t[(w+we+t.length)%t.length]??null,[t]),Be=ht?so(u,p,-1):st(n,-1),be=ht?so(u,p,1):st(n,1),We=Pe===-1&&Oe?ht&&ke!==null?so(u,ke,-1):fe!==null?st(fe,-1):null:null,je=Pe===1&&Oe?ht&&ke!==null?so(u,ke,1):fe!==null?st(fe,1):null:null,Ke=We&&We.url!==(Be==null?void 0:Be.url)?We:null,ne=je&&je.url!==(be==null?void 0:be.url)?je:null,me=Be&&nt?(()=>{const w=ht?$l(u,p,-1):t.length>2?st((n-1+t.length)%t.length,-1):null;return w&&w.url!==Be.url?w:null})():null,Ie=be&&nt?(()=>{const w=ht?$l(u,p,1):t.length>2?st((n+1)%t.length,1):null;return w&&w.url!==be.url?w:null})():null,Ge=Ke??me,Ze=ne??Ie,Ve=a.useCallback((w,we,Re)=>{if(!w||!we||!Re)return;const He=q.current,ot=He.get(w);(ot==null?void 0:ot.width)===we&&(ot==null?void 0:ot.height)===Re||(He.set(w,{width:we,height:Re}),G(Mt=>Mt+1))},[]),at=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const we=q.current.get(w.url);return i0(R.current,we)},[A,P]),Je=a.useCallback(()=>{if(!N)return;const w=at(N);if(w){oe(w);return}const we=R.current;we&&oe(Cl(we))},[N,at]),Ee=a.useCallback(w=>{if(ht){const we=u.length;ue((p+w+we)%we),Se(null);return}t.length>1&&(Se((n+w+t.length)%t.length),ue(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),_e=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),tt=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{_e(),qe(!1)},oo+32)},[_e,qe]),rt=a.useCallback(()=>{const w=I.current;if(!w){ae({left:0,top:0,width:typeof window<"u"?window.innerWidth:ua.width,height:typeof window<"u"?window.innerHeight:ua.height});return}const we=w.getBoundingClientRect();ae({left:we.left,top:we.top,width:we.width,height:we.height})},[]),lt=a.useCallback((w,we)=>{if(Oe){if(he&&!ee)return`translate(${ce}px, 0px)`;if(ee&&Pe!==null){const Re=at(w);if(!Re)return;const{x:He,y:ot}=l0(Re,we,Pe,$);return`translate(${He}px, ${ot}px)`}if(ee)return"translate(0px, 0px)"}},[Oe,he,ee,ce,Pe,$,at]),Tt=a.useCallback(()=>{const w=U.current;U.current=null,_e(),qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[_e,qe,m,b]),Ut=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{U.current!==null&&Tt()},oo+32)},[_e,Tt]),Zt=a.useCallback(()=>{_e(),U.current=null,qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none"},[_e,qe]),xt=a.useCallback(w=>{if(!(!nt||!le)){if(Y.current){if(U.current===w){V.current=w,Tt();return}Zt()}_e(),Ee(w),U.current=w,$e(w),qe(!0),Ut()}},[nt,le,Tt,Zt,_e,Ee,qe,Ut]);z.current=xt;const wt=a.useCallback(()=>{ie.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),jt=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const we=O.current?Zv:Yv;S.current=window.setInterval(()=>{z.current(w)},we)},[]),At=a.useCallback(w=>{ie.current!==w&&(wt(),ie.current=w,O.current=!1,z.current(w),jt(w),E.current=window.setTimeout(()=>{E.current=null,ie.current===w&&(O.current=!0,jt(w))},Kv))},[wt,jt]),vt=a.useCallback(()=>{const w=R.current;if(!w)return;const we=N==null?void 0:N.url,Re=we?q.current.get(we):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){oe(Pa(w,Re.width,Re.height));return}const He=T.current;if(He&&we&&(He.src===we||He.currentSrc===we)){const{width:Mt,height:Qe}=n0(He);if(Mt&&Qe){Ve(we,Mt,Qe),oe(Pa(w,Mt,Qe));return}}const ot=Cl(w);!ot.width||!ot.height||oe(ot)},[N==null?void 0:N.url,Ve]),Ft=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&vt();return}w.complete&&w.naturalWidth>0&&vt()}},[vt]),_t=a.useCallback(()=>{rt(),vt(),te(w=>w+1)},[rt,vt]);a.useEffect(()=>{_t();const w=R.current,we=I.current,Re=new ResizeObserver(()=>_t());return w&&Re.observe(w),we&&Re.observe(we),window.addEventListener("resize",_t),()=>{Re.disconnect(),window.removeEventListener("resize",_t)}},[_t,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){vt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&vt()}},[N==null?void 0:N.url,n,vt]),a.useEffect(()=>{Je()},[Je,A]),a.useEffect(()=>{const w=new Set,we=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),we.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),we.forEach(He=>{q.current.has(He.url)||o0(He,Ve)})},[t,u,Ve]),a.useEffect(()=>{if(K!=="opening"||!le)return;if(!y){xe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),xe("open")})});return()=>cancelAnimationFrame(w)},[K,le,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),Cn);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{_e()},[_e]),a.useLayoutEffect(()=>{Ae.current===n&&de.current===(N==null?void 0:N.url)||(_e(),U.current=null,$e(null),ue(null),Se(null),ge(0),X(0),qe(!1),Q(!1),re(!1),L.current=0,D.current=0,x.current="none",W.current=!1,k.current=null,M.current=!1,T.current=null,Je(),Ae.current=n,de.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,_e,Je]),a.useLayoutEffect(()=>{const w=V.current;w!==null&&(V.current=null,requestAnimationFrame(()=>{z.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){H.current=!1,Te(!1);return}if(K!=="open"||H.current)return;if(!Be&&!be){H.current=!0;return}Te(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Te(!0),H.current=!0})});return()=>cancelAnimationFrame(w)},[K,Be==null?void 0:Be.url,be==null?void 0:be.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const Qe=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",Qe,!0)};document.addEventListener("click",Qe,!0)},we=Qe=>{const yt=Qe<0?1:-1;_e(),Ee(yt),U.current=yt,$e(yt),qe(!0),Ut()},Re=Qe=>{if(Math.abs(Qe)>Xv&&nt){we(Qe);return}U.current=null,$e(null),ue(null),Se(null),qe(!0),X(0),tt()},He=Qe=>{if(Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0];M.current=!0,k.current={x:yt.clientX,y:yt.clientY},x.current="none",D.current=0,W.current=!1},ot=Qe=>{if(!k.current||Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0],Dt=yt.clientX-k.current.x,Lt=yt.clientY-k.current.y;if(x.current==="none"){if(Math.abs(Dt)<10&&Math.abs(Lt)<10)return;if(Math.abs(Dt)>Math.abs(Lt)){if(!nt)return;x.current="horizontal"}else if(Lt>0){if(!dt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,re(!0),D.current=Dt,X(Dt),Qe.preventDefault();return}x.current==="vertical"&&(W.current=!0,re(!0),L.current=Lt,ge(Lt),Qe.preventDefault())},Mt=()=>{if(!k.current)return;const Qe=x.current,yt=W.current;if(yt&&Qe==="horizontal")Re(D.current),w();else if(yt&&Qe==="vertical"){const Dt=L.current;if(dt&&Dt>Uv){const Lt=window.innerHeight;L.current=Lt,Q(!0),ge(Lt),xe("closing")}else L.current=0,ge(0);w()}else Qe==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());k.current=null,x.current="none",D.current=0,W.current=!1,re(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,nt,qe,tt,_e,dt,Ut,Ee]);const Kt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&le&&(ve(w),se(!0)),xe("closing")},[g,y,le]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;wt(),Kt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!nt)return;He.preventDefault();const ot=He.key==="ArrowLeft"?-1:1;He.repeat&&ie.current===ot||At(ot)},we=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const ot=He.key==="ArrowLeft"?-1:1;ie.current===ot&&wt()},Re=()=>{wt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",we),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",we),window.removeEventListener("blur",Re),wt()}},[K,s,d,Kt,nt,At,wt]),a.useEffect(()=>{K!=="open"&&wt()},[K,wt]);const Jt=()=>{K==="closing"||l||Kt()},Ct=K==="open",Ht=K==="closing",on=Fe>0?Math.max(0,1-Fe/500):1,mt=Fe>0?Math.max(.35,1-Fe/500):1,Le=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(U.current!==null){Tt();return}_e(),qe(!1)}},[_e,qe,Tt]),De=K==="closing"?ye??y:y,it=De&&le&&(K==="opening"||Ht)?Jv(De,le):void 0,gt=Oe&&N?lt(N,"center"):Fe>0?`translateY(${Fe}px)`:it,ft=le?Jo(le,$):null,It=!!(De&&le),pt=It&&(K==="closing"||K==="open"&&B),zt={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:gt,opacity:Fe>0?mt:It?1:K==="opening"||Ht?0:1,transition:he&&!ee?"none":ee?`transform ${oo}ms ${pn}`:_?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:pt?`transform ${Cn}ms ${pn}`:K==="opening"||Ht?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Ue&&Ct&&!Oe?"auto":"none",touchAction:Ue&&Ct?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Oe?"auto":"none"},Pt=(w,we,Re="adjacent")=>{const He=at(w);if(!He)return{display:"none"};const ot=Re==="far"?we==="left"?"far-left":"far-right":we==="left"?"left-adjacent":"right-adjacent",{start:Mt}=Pe!==null?Yc(He,ot,Pe,$):{start:Re==="far"?vr(He,we,$):Ui(He,we,$)},Qe=Jo(Mt,$),yt=lt(w,ot),Dt=!Oe&&Re==="adjacent"&&Ct&&!Me?c0(He,we,$):null,Lt=Re==="far"&&Oe&&Pe===(we==="left"?-1:1),nn=he&&!ee?!1:ee,dn=Re==="adjacent"&&Ct&&Me&&!Oe;return{position:"absolute",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,objectFit:"contain",transform:yt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:Re==="far"?Ct&&Lt?1:0:Ct?1:0,transition:nn?Re==="far"?`transform ${oo}ms ${pn}`:`transform ${oo}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:K==="opening"||Ht?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Vt=(w,we)=>{const Re=at(w);return Re?s0(Ui(Re,we,$),we,$):null},Gt=w=>we=>{if(!l){if(M.current){M.current=!1;return}we.stopPropagation(),xt(w)}},Nt=Be?Vt(Be,"left"):null,Ot=be?Vt(be,"right"):null,Wt=Nt?Jo(Nt,$):null,St=Ot?Jo(Ot,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:Jt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?on:0,transition:he?"none":`opacity ${Cn}ms ${pn}`,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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:he?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Ct&&Ge&&r.jsx(Qo,{media:Ge,style:Pt(Ge,"left","far"),onMeasure:Ve,onTransitionEnd:Le},`far-prev-${Ge.url}`),Ct&&Be&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:Be,style:Pt(Be,"left"),onMeasure:Ve,onTransitionEnd:Le},`prev-${Be.url}`),Wt&&r.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Ct&&be&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:be,style:Pt(be,"right"),onMeasure:Ve,onTransitionEnd:Le},`next-${be.url}`),St&&r.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Ct&&Ze&&r.jsx(Qo,{media:Ze,style:Pt(Ze,"right","far"),onMeasure:Ve,onTransitionEnd:Le},`far-next-${Ze.url}`),le&&N&&(Ue?r.jsx(d0,{src:N.url,phase:K,onMediaElement:Ft,wrapperStyle:zt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Le},`${n}-${N.url}`):r.jsx("img",{ref:Ft,src:N.url,alt:N.name,onLoad:vt,onTransitionEnd:Le,style:zt},`${n}-${N.url}`))]})}const p0=20,m0=.18;function g0(e){return`
18704
+ `}const Cn=500,oo=650,pn="cubic-bezier(0.22, 1, 0.36, 1)",Uv=72,Xv=50,Kv=1e4,Yv=650,Zv=500;function Jv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,s=e.top-t.top;return`translate(${o}px, ${s}px) scale(${n}, ${i})`}function Xc(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=gr(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 Qv(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?Xc(i,n):null}function e0(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function so(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 $l(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return so(e,i,n)}const t0=.03;function Kc(e){return e.width*t0}const ua={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Jo(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Cl(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function n0(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Pa(e,t,n){const i=e.getBoundingClientRect(),o=i.width,s=i.height,l=t/n,d=o/s;if(l>d){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(s-u)/2}}const c=s*l;return{width:c,height:s,left:i.left+(o-c)/2,top:i.top}}function i0(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Pa(e,t.width,t.height)}function o0(e,t){if(Wr(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 r0(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function a0({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=>Wr(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 Ui(e,t,n){const{width:i,height:o,top:s}=e,{left:l,width:d}=n,c=Kc(n);return t==="left"?{left:l+c-i,top:s,width:i,height:o}:{left:l+d-c,top:s,width:i,height:o}}function vr(e,t,n){const i=Ui(e,t,n);return{...i,left:2*i.left-e.left}}function s0(e,t,n){const{left:i,width:o}=n,s=Kc(n);return t==="left"?{left:i,top:e.top,width:s,height:e.height}:{left:i+o-s,top:e.top,width:s,height:e.height}}function Yc(e,t,n,i){const o=Ui(e,"left",i),s=Ui(e,"right",i),l=vr(e,"left",i),d=vr(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:s,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:d,end:s};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:s};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:s,end:d};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function l0(e,t,n,i){const{start:o,end:s}=Yc(e,t,n,i);return{x:s.left-o.left,y:s.top-o.top}}function c0(e,t,n){const i=Ui(e,t,n),o=vr(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Wr(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function d0({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:s,onTransitionEnd:l}){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:l,children:r.jsx("video",{ref:d,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:s,onClick:c=>c.stopPropagation(),style:o},e)})}function Qo({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Wr(e)?r.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const s=o.currentTarget;s.videoWidth>0&&s.videoHeight>0&&(i==null||i(e.url,s.videoWidth,s.videoHeight))},onTransitionEnd:n}):r.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const s=o.currentTarget;s.naturalWidth>0&&s.naturalHeight>0&&(i==null||i(e.url,s.naturalWidth,s.naturalHeight))},onTransitionEnd:n})}function u0({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,canNavigate:c,lightboxEntries:u,entryIdx:p,layoutId:v,sourceRect:y,resolveCloseSourceRect:g,onClose:h,onPrev:m,onNext:b}){const I=a.useRef(null),R=a.useRef(null),T=a.useRef(null),G=a.useRef(new Map),[A,V]=a.useState(0),k=a.useRef(null),L=a.useRef(0),D=a.useRef(0),x=a.useRef("none"),W=a.useRef(!1),M=a.useRef(!1),Y=a.useRef(!1),F=a.useRef(null),U=a.useRef(null),B=a.useRef(null),j=a.useRef(()=>{}),ie=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[le,oe]=a.useState(null),[$,ae]=a.useState(ua),[P,te]=a.useState(0),[K,xe]=a.useState("opening"),[Fe,ge]=a.useState(0),[ce,X]=a.useState(0),[ee,Z]=a.useState(!1),[Pe,$e]=a.useState(null),[ke,ue]=a.useState(null),[fe,Se]=a.useState(null),[z,se]=a.useState(!1),[ye,ve]=a.useState(null),[Me,Te]=a.useState(!1),H=a.useRef(!1),[he,re]=a.useState(!1),[_,Q]=a.useState(!1),Ae=a.useRef(n),de=a.useRef(void 0),N=t[n],Ue=N?Wr(N):!1,Oe=ce!==0||ee,dt=!l&&(!s||!!d),nt=c&&!l,ht=u.length>1,st=a.useCallback((w,we)=>t.length<=1?null:t[(w+we+t.length)%t.length]??null,[t]),Be=ht?so(u,p,-1):st(n,-1),be=ht?so(u,p,1):st(n,1),We=Pe===-1&&Oe?ht&&ke!==null?so(u,ke,-1):fe!==null?st(fe,-1):null:null,je=Pe===1&&Oe?ht&&ke!==null?so(u,ke,1):fe!==null?st(fe,1):null:null,Ke=We&&We.url!==(Be==null?void 0:Be.url)?We:null,ne=je&&je.url!==(be==null?void 0:be.url)?je:null,me=Be&&nt?(()=>{const w=ht?$l(u,p,-1):t.length>2?st((n-1+t.length)%t.length,-1):null;return w&&w.url!==Be.url?w:null})():null,Ie=be&&nt?(()=>{const w=ht?$l(u,p,1):t.length>2?st((n+1)%t.length,1):null;return w&&w.url!==be.url?w:null})():null,Ge=Ke??me,Ze=ne??Ie,Ve=a.useCallback((w,we,Re)=>{if(!w||!we||!Re)return;const He=G.current,ot=He.get(w);(ot==null?void 0:ot.width)===we&&(ot==null?void 0:ot.height)===Re||(He.set(w,{width:we,height:Re}),V(Mt=>Mt+1))},[]),at=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const we=G.current.get(w.url);return i0(R.current,we)},[A,P]),Je=a.useCallback(()=>{if(!N)return;const w=at(N);if(w){oe(w);return}const we=R.current;we&&oe(Cl(we))},[N,at]),Ee=a.useCallback(w=>{if(ht){const we=u.length;ue((p+w+we)%we),Se(null);return}t.length>1&&(Se((n+w+t.length)%t.length),ue(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),_e=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),tt=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{_e(),qe(!1)},oo+32)},[_e,qe]),rt=a.useCallback(()=>{const w=I.current;if(!w){ae({left:0,top:0,width:typeof window<"u"?window.innerWidth:ua.width,height:typeof window<"u"?window.innerHeight:ua.height});return}const we=w.getBoundingClientRect();ae({left:we.left,top:we.top,width:we.width,height:we.height})},[]),lt=a.useCallback((w,we)=>{if(Oe){if(he&&!ee)return`translate(${ce}px, 0px)`;if(ee&&Pe!==null){const Re=at(w);if(!Re)return;const{x:He,y:ot}=l0(Re,we,Pe,$);return`translate(${He}px, ${ot}px)`}if(ee)return"translate(0px, 0px)"}},[Oe,he,ee,ce,Pe,$,at]),Tt=a.useCallback(()=>{const w=U.current;U.current=null,_e(),qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[_e,qe,m,b]),Ut=a.useCallback(()=>{_e(),F.current=window.setTimeout(()=>{U.current!==null&&Tt()},oo+32)},[_e,Tt]),Zt=a.useCallback(()=>{_e(),U.current=null,qe(!1),$e(null),ue(null),Se(null),X(0),re(!1),W.current=!1,D.current=0,x.current="none"},[_e,qe]),xt=a.useCallback(w=>{if(!(!nt||!le)){if(Y.current){if(U.current===w){B.current=w,Tt();return}Zt()}_e(),Ee(w),U.current=w,$e(w),qe(!0),Ut()}},[nt,le,Tt,Zt,_e,Ee,qe,Ut]);j.current=xt;const wt=a.useCallback(()=>{ie.current=null,O.current=!1,S.current!==null&&(window.clearInterval(S.current),S.current=null),E.current!==null&&(window.clearTimeout(E.current),E.current=null)},[]),jt=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const we=O.current?Zv:Yv;S.current=window.setInterval(()=>{j.current(w)},we)},[]),At=a.useCallback(w=>{ie.current!==w&&(wt(),ie.current=w,O.current=!1,j.current(w),jt(w),E.current=window.setTimeout(()=>{E.current=null,ie.current===w&&(O.current=!0,jt(w))},Kv))},[wt,jt]),vt=a.useCallback(()=>{const w=R.current;if(!w)return;const we=N==null?void 0:N.url,Re=we?G.current.get(we):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){oe(Pa(w,Re.width,Re.height));return}const He=T.current;if(He&&we&&(He.src===we||He.currentSrc===we)){const{width:Mt,height:Qe}=n0(He);if(Mt&&Qe){Ve(we,Mt,Qe),oe(Pa(w,Mt,Qe));return}}const ot=Cl(w);!ot.width||!ot.height||oe(ot)},[N==null?void 0:N.url,Ve]),Ft=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&vt();return}w.complete&&w.naturalWidth>0&&vt()}},[vt]),_t=a.useCallback(()=>{rt(),vt(),te(w=>w+1)},[rt,vt]);a.useEffect(()=>{_t();const w=R.current,we=I.current,Re=new ResizeObserver(()=>_t());return w&&Re.observe(w),we&&Re.observe(we),window.addEventListener("resize",_t),()=>{Re.disconnect(),window.removeEventListener("resize",_t)}},[_t,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){vt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&vt()}},[N==null?void 0:N.url,n,vt]),a.useEffect(()=>{Je()},[Je,A]),a.useEffect(()=>{const w=new Set,we=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),we.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),we.forEach(He=>{G.current.has(He.url)||o0(He,Ve)})},[t,u,Ve]),a.useEffect(()=>{if(K!=="opening"||!le)return;if(!y){xe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),xe("open")})});return()=>cancelAnimationFrame(w)},[K,le,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),Cn);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{_e()},[_e]),a.useLayoutEffect(()=>{Ae.current===n&&de.current===(N==null?void 0:N.url)||(_e(),U.current=null,$e(null),ue(null),Se(null),ge(0),X(0),qe(!1),Q(!1),re(!1),L.current=0,D.current=0,x.current="none",W.current=!1,k.current=null,M.current=!1,T.current=null,Je(),Ae.current=n,de.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,_e,Je]),a.useLayoutEffect(()=>{const w=B.current;w!==null&&(B.current=null,requestAnimationFrame(()=>{j.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){H.current=!1,Te(!1);return}if(K!=="open"||H.current)return;if(!Be&&!be){H.current=!0;return}Te(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Te(!0),H.current=!0})});return()=>cancelAnimationFrame(w)},[K,Be==null?void 0:Be.url,be==null?void 0:be.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const Qe=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",Qe,!0)};document.addEventListener("click",Qe,!0)},we=Qe=>{const yt=Qe<0?1:-1;_e(),Ee(yt),U.current=yt,$e(yt),qe(!0),Ut()},Re=Qe=>{if(Math.abs(Qe)>Xv&&nt){we(Qe);return}U.current=null,$e(null),ue(null),Se(null),qe(!0),X(0),tt()},He=Qe=>{if(Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0];M.current=!0,k.current={x:yt.clientX,y:yt.clientY},x.current="none",D.current=0,W.current=!1},ot=Qe=>{if(!k.current||Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0],Dt=yt.clientX-k.current.x,Lt=yt.clientY-k.current.y;if(x.current==="none"){if(Math.abs(Dt)<10&&Math.abs(Lt)<10)return;if(Math.abs(Dt)>Math.abs(Lt)){if(!nt)return;x.current="horizontal"}else if(Lt>0){if(!dt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,re(!0),D.current=Dt,X(Dt),Qe.preventDefault();return}x.current==="vertical"&&(W.current=!0,re(!0),L.current=Lt,ge(Lt),Qe.preventDefault())},Mt=()=>{if(!k.current)return;const Qe=x.current,yt=W.current;if(yt&&Qe==="horizontal")Re(D.current),w();else if(yt&&Qe==="vertical"){const Dt=L.current;if(dt&&Dt>Uv){const Lt=window.innerHeight;L.current=Lt,Q(!0),ge(Lt),xe("closing")}else L.current=0,ge(0);w()}else Qe==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());k.current=null,x.current="none",D.current=0,W.current=!1,re(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,nt,qe,tt,_e,dt,Ut,Ee]);const Kt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&le&&(ve(w),se(!0)),xe("closing")},[g,y,le]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;wt(),Kt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!nt)return;He.preventDefault();const ot=He.key==="ArrowLeft"?-1:1;He.repeat&&ie.current===ot||At(ot)},we=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const ot=He.key==="ArrowLeft"?-1:1;ie.current===ot&&wt()},Re=()=>{wt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",we),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",we),window.removeEventListener("blur",Re),wt()}},[K,s,d,Kt,nt,At,wt]),a.useEffect(()=>{K!=="open"&&wt()},[K,wt]);const Jt=()=>{K==="closing"||l||Kt()},Ct=K==="open",Ht=K==="closing",on=Fe>0?Math.max(0,1-Fe/500):1,mt=Fe>0?Math.max(.35,1-Fe/500):1,Le=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(U.current!==null){Tt();return}_e(),qe(!1)}},[_e,qe,Tt]),De=K==="closing"?ye??y:y,it=De&&le&&(K==="opening"||Ht)?Jv(De,le):void 0,gt=Oe&&N?lt(N,"center"):Fe>0?`translateY(${Fe}px)`:it,ft=le?Jo(le,$):null,It=!!(De&&le),pt=It&&(K==="closing"||K==="open"&&z),zt={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:gt,opacity:Fe>0?mt:It?1:K==="opening"||Ht?0:1,transition:he&&!ee?"none":ee?`transform ${oo}ms ${pn}`:_?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:pt?`transform ${Cn}ms ${pn}`:K==="opening"||Ht?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Ue&&Ct&&!Oe?"auto":"none",touchAction:Ue&&Ct?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},kt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Ct&&!Oe?"auto":"none"},Pt=(w,we,Re="adjacent")=>{const He=at(w);if(!He)return{display:"none"};const ot=Re==="far"?we==="left"?"far-left":"far-right":we==="left"?"left-adjacent":"right-adjacent",{start:Mt}=Pe!==null?Yc(He,ot,Pe,$):{start:Re==="far"?vr(He,we,$):Ui(He,we,$)},Qe=Jo(Mt,$),yt=lt(w,ot),Dt=!Oe&&Re==="adjacent"&&Ct&&!Me?c0(He,we,$):null,Lt=Re==="far"&&Oe&&Pe===(we==="left"?-1:1),nn=he&&!ee?!1:ee,dn=Re==="adjacent"&&Ct&&Me&&!Oe;return{position:"absolute",top:Qe.top,left:Qe.left,width:Qe.width,height:Qe.height,objectFit:"contain",transform:yt??(Dt?`translate(${Dt.x}px, ${Dt.y}px)`:void 0),opacity:Re==="far"?Ct&&Lt?1:0:Ct?1:0,transition:nn?Re==="far"?`transform ${oo}ms ${pn}`:`transform ${oo}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:K==="opening"||Ht?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},Vt=(w,we)=>{const Re=at(w);return Re?s0(Ui(Re,we,$),we,$):null},Gt=w=>we=>{if(!l){if(M.current){M.current=!1;return}we.stopPropagation(),xt(w)}},Nt=Be?Vt(Be,"left"):null,Ot=be?Vt(be,"right"):null,Wt=Nt?Jo(Nt,$):null,St=Ot?Jo(Ot,$):null;return r.jsxs("div",{ref:I,className:[`${e}-lightbox`,s?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:K==="open"?"none":void 0},onClick:Jt,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Ct?on:0,transition:he?"none":`opacity ${Cn}ms ${pn}`,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:R,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{height:"10%"}})]}),r.jsx("div",{style:{position:"absolute",inset:0,opacity:Ct?1:0,transition:he?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:Jt})})]}),Ct&&Ge&&r.jsx(Qo,{media:Ge,style:Pt(Ge,"left","far"),onMeasure:Ve,onTransitionEnd:Le},`far-prev-${Ge.url}`),Ct&&Be&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:Be,style:Pt(Be,"left"),onMeasure:Ve,onTransitionEnd:Le},`prev-${Be.url}`),Wt&&r.jsx("div",{style:{position:"absolute",top:Wt.top,left:Wt.left,width:Wt.width,height:Wt.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),Ct&&be&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:be,style:Pt(be,"right"),onMeasure:Ve,onTransitionEnd:Le},`next-${be.url}`),St&&r.jsx("div",{style:{position:"absolute",top:St.top,left:St.left,width:St.width,height:St.height,cursor:l||he?"default":"pointer",pointerEvents:l||he?"none":"auto",zIndex:3},onClick:Gt(1)})]}),Ct&&Ze&&r.jsx(Qo,{media:Ze,style:Pt(Ze,"right","far"),onMeasure:Ve,onTransitionEnd:Le},`far-next-${Ze.url}`),le&&N&&(Ue?r.jsx(d0,{src:N.url,phase:K,onMediaElement:Ft,wrapperStyle:zt,videoStyle:kt,onLoadedMetadata:vt,onTransitionEnd:Le},`${n}-${N.url}`):r.jsx("img",{ref:Ft,src:N.url,alt:N.name,onLoad:vt,onTransitionEnd:Le,style:zt},`${n}-${N.url}`))]})}const p0=20,m0=.18;function g0(e){return`
18705
18705
  .${e}-wrapper {
18706
18706
  box-sizing: border-box;
18707
18707
  max-width: 100%;
@@ -18789,7 +18789,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18789
18789
  pointer-events: auto;
18790
18790
  }
18791
18791
  ${qv(e)}
18792
- `}function h0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function f0(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function y0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:C.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:C.scalingValue(i*m0,n??!1),[`--${t}-image-aspect`]:h0(e)}}function v0(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function x0(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function b0(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?Xc(d,o):void 0)}}function w0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),c=a.useMemo(()=>g0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,y=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=C.scalingValue(y,n??!1),h=`max(${g}, ${p0}px)`,{objectFitMode:m,imageStyle:b}=x0(e),I=v0(e,n),R=a.useRef(null),[T,q]=a.useState(!1),[A,G]=a.useState([]),[k,L]=a.useState(0),[D,x]=a.useState(0),[W,M]=a.useState(null),[Y,F]=a.useState({title1:"",title2:"",title3:""}),U=(!n||i)&&!T,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},z=V.sizeType??"none",ie=U&&z!=="none"?`${d}-item-image-hover-${z}`:void 0,S=(V.value??120)/100,E=a.useCallback(ce=>{!ce||z!=="scale"||(ce.style.transformOrigin=hm(ce))},[z]),O=a.useCallback(ce=>{if(ce){if(m==="contain"){const X=f0(ce);if(X){const ee=ce.closest(`.${d}-item-image`);ee instanceof HTMLElement&&ee.style.setProperty(`--${d}-item-media-aspect`,String(X))}}E(ce)}},[d,E,m]),le={width:C.scalingValue(v,n??!1),...I,...y0(e,d,n),[`--${d}-image-hover-scale`]:String(S)},oe=(()=>{const ce={},X=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return X&&(ce["--cntrl-article-width"]=X),ce})(),$=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ae=a.useMemo(()=>e0(u),[u]),P=a.useMemo(()=>r0(u),[u]),te=(ce,X)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ee=ae.findIndex(Pe=>Pe.gridIndex===ce);if(ee<0)return;const Z=ae[ee];x(ee),G(Z.items),L(0),F(Z.entry),M(X??null),q(!0)},K=a.useCallback(()=>{q(!1),M(null)},[]),xe=a.useCallback(()=>{const ce=ae[D];return!ce||!R.current?W:Qv(R.current,ce.gridIndex,m)??W},[ae,D,W,m]),Fe=a.useCallback(ce=>{if(ae.length>1){const X=ae.length,ee=(D+ce+X)%X,Z=ae[ee];x(ee),G(Z.items),L(0),F(Z.entry);return}L(X=>(X+ce+A.length)%A.length)},[ae,D,A.length]),ge=ae.length>1||A.length>1;return a.useEffect(()=>{if(!T||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[T]),a.useEffect(()=>{!n||o||i||q(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&q(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(a0,{mediaList:P}),r.jsx("div",{ref:R,className:`${d}-wrapper ${d}-type-${p}`,style:le,children:u.map((ce,X)=>{var Pe,$e;const ee=!!((Pe=ce.image)!=null&&Pe.url),Z=b0(!!$,ee,X,d,m,te);return r.jsxs("div",{className:`${d}-item`,children:[ce.title?r.jsx("span",{className:`${d}-item-title`,onClick:Z,style:Z?{cursor:"pointer"}:void 0,children:ce.title}):null,($e=ce.image)!=null&&$e.url?r.jsx("span",{className:[`${d}-item-image`,m==="contain"?`${d}-item-image-fit`:void 0,ie].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{ref:O,src:ce.image.url,"data-waterfall-index":X,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:Z,onLoadedData:ke=>O(ke.currentTarget)}):r.jsx("img",{ref:O,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":X,style:b,onClick:Z,onLoad:ke=>O(ke.currentTarget)})}):null,X<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:g},children:o&&!T&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},X)})}),T&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:oe,"data-selection":"none",children:r.jsx(u0,{prefix:d,items:A,index:k,entry:Y,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ge,lightboxEntries:ae,entryIdx:D,layoutId:s,sourceRect:W,resolveCloseSourceRect:xe,onClose:K,onPrev:()=>Fe(-1),onNext:()=>Fe(1)})}),ce)})()]})}const S0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18792
+ `}function h0(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,s]=n.split(":").map(Number),l=i?s:o,d=i?o:s;return d>0?l/d:1}function f0(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function y0(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:C.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:C.scalingValue(i*m0,n??!1),[`--${t}-image-aspect`]:h0(e)}}function v0(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function x0(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function b0(e,t,n,i,o,s){if(!(!e||!t))return l=>{var c;const d=((c=l.currentTarget.closest(`.${i}-item`))==null?void 0:c.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);s(n,d?Xc(d,o):void 0)}}function w0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:s,portalId:l}){const{prefix:d}=C.useScopedStyles(),c=a.useMemo(()=>g0(d),[d]),u=t??[],p=(e==null?void 0:e.type)??"a",v=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,y=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,g=C.scalingValue(y,n??!1),h=`max(${g}, ${p0}px)`,{objectFitMode:m,imageStyle:b}=x0(e),I=v0(e,n),R=a.useRef(null),[T,G]=a.useState(!1),[A,V]=a.useState([]),[k,L]=a.useState(0),[D,x]=a.useState(0),[W,M]=a.useState(null),[Y,F]=a.useState({title1:"",title2:"",title3:""}),U=(!n||i)&&!T,B=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},j=B.sizeType??"none",ie=U&&j!=="none"?`${d}-item-image-hover-${j}`:void 0,S=(B.value??120)/100,E=a.useCallback(ce=>{!ce||j!=="scale"||(ce.style.transformOrigin=hm(ce))},[j]),O=a.useCallback(ce=>{if(ce){if(m==="contain"){const X=f0(ce);if(X){const ee=ce.closest(`.${d}-item-image`);ee instanceof HTMLElement&&ee.style.setProperty(`--${d}-item-media-aspect`,String(X))}}E(ce)}},[d,E,m]),le={width:C.scalingValue(v,n??!1),...I,...y0(e,d,n),[`--${d}-image-hover-scale`]:String(S)},oe=(()=>{const ce={},X=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return X&&(ce["--cntrl-article-width"]=X),ce})(),$=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),ae=a.useMemo(()=>e0(u),[u]),P=a.useMemo(()=>r0(u),[u]),te=(ce,X)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const ee=ae.findIndex(Pe=>Pe.gridIndex===ce);if(ee<0)return;const Z=ae[ee];x(ee),V(Z.items),L(0),F(Z.entry),M(X??null),G(!0)},K=a.useCallback(()=>{G(!1),M(null)},[]),xe=a.useCallback(()=>{const ce=ae[D];return!ce||!R.current?W:Qv(R.current,ce.gridIndex,m)??W},[ae,D,W,m]),Fe=a.useCallback(ce=>{if(ae.length>1){const X=ae.length,ee=(D+ce+X)%X,Z=ae[ee];x(ee),V(Z.items),L(0),F(Z.entry);return}L(X=>(X+ce+A.length)%A.length)},[ae,D,A.length]),ge=ae.length>1||A.length>1;return a.useEffect(()=>{if(!T||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[T]),a.useEffect(()=>{!n||o||i||G(!1)},[n,o,i]),a.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&G(!1)},[e==null?void 0:e.lightbox]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),r.jsx(a0,{mediaList:P}),r.jsx("div",{ref:R,className:`${d}-wrapper ${d}-type-${p}`,style:le,children:u.map((ce,X)=>{var Pe,$e;const ee=!!((Pe=ce.image)!=null&&Pe.url),Z=b0(!!$,ee,X,d,m,te);return r.jsxs("div",{className:`${d}-item`,children:[ce.title?r.jsx("span",{className:`${d}-item-title`,onClick:Z,style:Z?{cursor:"pointer"}:void 0,children:ce.title}):null,($e=ce.image)!=null&&$e.url?r.jsx("span",{className:[`${d}-item-image`,m==="contain"?`${d}-item-image-fit`:void 0,ie].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{ref:O,src:ce.image.url,"data-waterfall-index":X,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:Z,onLoadedData:ke=>O(ke.currentTarget)}):r.jsx("img",{ref:O,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":X,style:b,onClick:Z,onLoad:ke=>O(ke.currentTarget)})}):null,X<u.length-1&&r.jsx("div",{className:`${d}-item-gap-host`,style:{width:g},children:o&&!T&&r.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${d}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:h,height:"100%"}})})]},X)})}),T&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:oe,"data-selection":"none",children:r.jsx(u0,{prefix:d,items:A,index:k,entry:Y,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ge,lightboxEntries:ae,entryIdx:D,layoutId:s,sourceRect:W,resolveCloseSourceRect:xe,onClose:K,onPrev:()=>Fe(-1),onNext:()=>Fe(1)})}),ce)})()]})}const S0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18793
18793
  import type React from 'react';
18794
18794
  import { createPortal } from 'react-dom';
18795
18795
  import { CommonComponentProps } from '../props';
@@ -19573,7 +19573,7 @@ export function Waterfall({
19573
19573
  from { clip-path: inset(100% 0 0 0); }
19574
19574
  to { clip-path: inset(0 0 0 0); }
19575
19575
  }
19576
- `}function V0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=C.useScopedStyles(),l=N0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Ll,p=u.sizeType??"drag",v=u.value??Ll.value,y=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",m=(e==null?void 0:e.navSize)??"m",b=_0[m],I=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,R=be=>C.scalingValue(be*I,n),T=(e==null?void 0:e.show)??"always",q=(e==null?void 0:e.controls)??null,A=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,G=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,k=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,L=(e==null?void 0:e.controlsColor)??Tl.color,D=(e==null?void 0:e.controlsHoverColor)??Tl.hover,x=(e==null?void 0:e.navColor)??ro.colors.inactive,W=(e==null?void 0:e.navPaginationColor)??ro.colors.pagination,M=(e==null?void 0:e.navBackgroundColor)??ro.colors.background,Y=(e==null?void 0:e.linkColor)??ma.linkColor,F=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,U=y==="horizontal",V=p==="click",z=p==="drag",ie=p==="auto"&&(!n||!!i),S=!n,E=g==="slide",O=h==="classic",le=T!=="never",oe=T==="on hover",$=C.scalingValue(A,n),ae={width:$,height:$,maxWidth:$},P=E&&c>1,[te,K]=a.useState(0),[xe,Fe]=a.useState(P?1:0),[ge,ce]=a.useState(!1),[X,ee]=a.useState(!1),[Z,Pe]=a.useState(!1),[$e,ke]=a.useState(0),[ue,fe]=a.useState(!1),[Se,B]=a.useState(!1),se=a.useRef(!1),ye=a.useRef(xe);ye.current=xe;const ve=a.useRef(null),Me=a.useRef(0),Te=a.useRef(null),H=a.useRef(null),he=a.useRef(null),re=a.useRef(null),_=a.useCallback(be=>{se.current=be,ce(be)},[]),Q=a.useCallback(be=>{if(c<2||be===0)return;const We=be>0?1:-1,je=Math.abs(be);if(fe(!0),_(!0),!E){K(Ze=>lo(Ze+be,c));return}let Ke=ye.current;const ne=P&&(Ke===0||Ke===c+1),me=ne?te+1:null;ne&&(Ke=te+1);let Ie=je;for(;Ie>0;){const Ze=O0(Ke,We,c,P);if(Ke=Ze.position,Ie-=1,Ze.hitBoundary){Me.current=Ie*We;break}}const Ge=je-Ie;if(Ge>0&&K(Ze=>lo(Ze+Ge*We,c)),ye.current=Ke,me!==null){if(ye.current=me,Ke===me){ee(!0),Fe(Ke);return}ve.current=Ke,ee(!0),Fe(me);return}ee(!1),Fe(Ke)},[te,c,P,E,_]),Ae=a.useCallback(be=>{Q(be)},[Q]),de=a.useCallback(be=>{if(c<2)return;const We=lo(be,c);if(!(We===te&&!se.current)&&(fe(!0),_(!0),K(We),E)){const je=We+(P?1:0);ve.current=null,Me.current=0,ye.current=je,ee(!1),Fe(je)}},[te,c,P,E,_]);a.useEffect(()=>{if(!ge)return;const be=window.setTimeout(()=>{if(P&&(xe===0||xe===c+1)){ve.current=null,ee(!0),Fe(te+1);return}_(!1)},Wi);return()=>window.clearTimeout(be)},[te,c,P,ge,_,xe]),a.useEffect(()=>{if(!X)return;let be=0;const We=requestAnimationFrame(()=>{be=requestAnimationFrame(()=>{const je=ve.current;ve.current=null;const Ke=Me.current;if(Me.current=0,ee(!1),je!==null){ye.current=je,Fe(je);return}if(Ke!==0){Q(Ke);return}_(!1)})});return()=>{cancelAnimationFrame(We),cancelAnimationFrame(be)}},[Q,_,X]);const N=`${P}:${c}`,Ue=a.useRef(N);a.useEffect(()=>{if(Ue.current===N)return;Ue.current=N;const be=c>0?Math.min(te,c-1):0;he.current=null,re.current=null,Pe(!1),ke(0),K(be),ee(!0),Fe(be+(P?1:0))},[te,c,P,N]),a.useEffect(()=>{if(!ue)return;const be=window.setTimeout(()=>fe(!1),P0);return()=>window.clearTimeout(be)},[ue,te]),a.useEffect(()=>{if(!ie||c<2)return;const be=Math.max(v,.1)*1e3,We=window.setInterval(()=>{S&&Se||Ae(1)},be);return()=>window.clearInterval(We)},[v,c,Ae,ie,Se,S]);const Oe=a.useCallback(be=>{const We=he.current;if(!We||We.pointerId!==be.pointerId)return;he.current=null,re.current=null;const je=Te.current;if(je!=null&&je.hasPointerCapture(be.pointerId)&&je.releasePointerCapture(be.pointerId),!We.isActive){E&&ke(0);return}const ne=!(be.timeStamp-We.lastTime>W0)&&Math.abs(We.velocity)>F0,me=We.size>0&&Math.abs(We.offset-We.baseOffset)>We.size*A0;if(Pe(!1),!ne&&!me){ke(0);return}const Ie=me?We.offset-We.baseOffset:We.velocity;let Ge=1;me&&We.size>0&&(Ge=Math.max(1,Math.round(Math.abs(Ie)/We.size))),ke(0),Q(Ie<0?Ge:-Ge)},[Q,E]);a.useEffect(()=>{const be=We=>{re.current===null||We.pointerId!==re.current||Oe(We)};return window.addEventListener("pointerup",be),window.addEventListener("pointercancel",be),()=>{window.removeEventListener("pointerup",be),window.removeEventListener("pointercancel",be)}},[Oe]);const dt=be=>{const We=Te.current;if(!z||c<2||!We||be.pointerType==="mouse"&&be.button!==0)return;ve.current=null,Me.current=0,se.current&&_(!1);let je=0;const Ke=H.current;if(E&&Ke){const ne=U?Ke.offsetWidth:Ke.offsetHeight;if(ne>0){const me=D0(Ke,U);let Ie=ye.current;P&&(Ie===0||Ie===c+1)?(Ie=te+1,ye.current=Ie,ee(!0),Fe(Ie),je=0):je=me+Ie*ne,ke(je)}}We.setPointerCapture(be.pointerId),re.current=be.pointerId,he.current={pointerId:be.pointerId,startClientX:be.clientX,startClientY:be.clientY,axes:j0(We,`${s}-axis-probe`),size:U?We.offsetWidth:We.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:be.timeStamp,velocity:0}},nt=be=>{const We=he.current;if(!We||We.pointerId!==be.pointerId)return;if(be.pointerType==="mouse"&&be.buttons===0){Oe(be);return}const je=be.clientX-We.startClientX,Ke=be.clientY-We.startClientY,ne=We.axes?z0(We.axes,je,Ke):{x:je,y:Ke},me=U?ne.x:ne.y,Ie=U?ne.y:ne.x,Ge=We.baseOffset+me;if(!We.isActive){if(Math.max(Math.abs(me),Math.abs(Ie))<k0)return;if(Math.abs(Ie)>Math.abs(me)){const Ve=Te.current;Ve!=null&&Ve.hasPointerCapture(We.pointerId)&&Ve.releasePointerCapture(We.pointerId),he.current=null,re.current=null,E&&ke(0);return}We.isActive=!0,Pe(!0)}const Ze=be.timeStamp-We.lastTime;Ze>0&&(We.velocity=(Ge-We.offset)/Ze,We.lastTime=be.timeStamp),We.offset=Ge,E&&ke(Ge)},ht=be=>{Oe(be)},st=U?`translate3d(calc(${-xe*100}% + ${$e}px), 0, 0)`:`translate3d(0, calc(${-xe*100}% + ${$e}px), 0)`,Be=P?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B0(s,n)}}),r.jsxs("div",{className:ut(`${s}-wrapper`,{[`${s}-transition-reveal`]:g==="reveal",[`${s}-transition-reveal-vertical`]:g==="reveal"&&!U}),onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:Te,className:ut(`${s}-track`,{[`${s}-track-draggable`]:z,[`${s}-track-draggable-vertical`]:z&&!U}),onPointerDown:dt,onPointerMove:nt,onPointerUp:ht,onPointerCancel:ht,onLostPointerCapture:be=>{re.current===be.pointerId&&Oe(be)},children:r.jsx("div",{ref:H,className:ut(`${s}-list`,{[`${s}-list-slide`]:E,[`${s}-list-slide-vertical`]:E&&!U,[`${s}-list-fade`]:!E}),style:E?{transform:st,transition:Z||X?"none":`transform ${Wi}ms ${Zc}`}:void 0,children:Be.map((be,We)=>{const je=P?lo(We-1,c):We,ne=P&&(We===0||We===c+1)?`clone-${We===0?"start":"end"}`:`slide-${je}`;return r.jsx("div",{className:ut(`${s}-slide`,{[`${s}-is-active`]:!E&&je===te}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:ut(`${s}-slider-image`,{[`${s}-contain`]:be.image.objectFit==="contain",[`${s}-cover`]:be.image.objectFit==="cover"}),src:be.image.url,alt:be.image.name??"",draggable:!1})})})},ne)})})}),le&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(`${s}-arrow`,{[`${s}-arrow-prev`]:U,[`${s}-arrow-prev-vertical`]:!U,[`${s}-hover-arrow`]:oe}),style:{color:L,"--arrow-hover-color":D,...ae},children:r.jsxs("button",{onClick:be=>{be.stopPropagation(),Ae(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${C.scalingValue(G,n)}, ${C.scalingValue(k*(U?1:-1),n)}) rotate(${U?"0deg":"90deg"})`},children:[q&&r.jsx(an,{url:q,fill:L,hoverFill:D,className:ut(`${s}-arrow-img`,`${s}-mirror`),style:ae}),!q&&r.jsx(Rl,{color:L,className:ut(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:ut(`${s}-arrow`,{[`${s}-arrow-next`]:U,[`${s}-arrow-next-vertical`]:!U,[`${s}-hover-arrow`]:oe}),style:{color:L,"--arrow-hover-color":D,...ae},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:be=>{be.stopPropagation(),Ae(1)},style:{transform:`translate(${C.scalingValue(G*(U?-1:1),n)}, ${C.scalingValue(k,n)}) rotate(${U?"0deg":"90deg"})`},children:[q&&r.jsx(an,{url:q,fill:L,hoverFill:D,className:`${s}-arrow-img`,style:ae}),!q&&r.jsx(Rl,{color:L,className:ut(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),V&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Ae(1)}),O&&r.jsx("div",{className:ut(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:U,[`${s}-pagination-inside-left`]:!U}),style:U?{bottom:R(b.inset)}:{left:R(b.inset)},children:r.jsx("div",{className:ut(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!U,[`${s}-animate-dots`]:ue}),style:{backgroundColor:M,gap:R(b.gapInactive-b.activeDot+b.dot),...U?{height:R(b.activeDot+b.paddingY*2),paddingTop:R(b.paddingY),paddingBottom:R(b.paddingY),paddingLeft:R(b.paddingActive),paddingRight:R(b.paddingActive)}:{width:R(b.activeDot+b.paddingY*2),paddingLeft:R(b.paddingY),paddingRight:R(b.paddingY),paddingTop:R(b.paddingActive),paddingBottom:R(b.paddingActive)},borderRadius:R(b.borderRadius),transform:`translate(${C.scalingValue(ro.offset.x,n)}, ${C.scalingValue(ro.offset.y,n)})`},children:d.map((be,We)=>{const je=We===te,Ke=je?b.activeDot:b.dot;return r.jsx("button",{onClick:()=>de(We),className:`${s}-pagination-item`,style:{width:R(b.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:je?W:x,width:R(Ke)}})},We)})},`${m}-${y}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:C.scalingValue(F,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((be,We)=>r.jsx("div",{className:ut(`${s}-caption-text`,{[`${s}-with-pointer-events`]:We===te&&n,[`${s}-active`]:We===te}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Wi/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":Y,"--link-hover-color":Y,position:"relative",top:C.scalingValue(ma.offset.y,n),left:C.scalingValue(ma.offset.x,n)},children:r.jsx(yi,{content:be.imageCaption})})},We))})]})]})]})}function Rl({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 G0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19576
+ `}function V0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:s}=C.useScopedStyles(),l=N0(e,n),d=t??[],c=d.length,u=(e==null?void 0:e.trigger)??Ll,p=u.sizeType??"drag",v=u.value??Ll.value,y=(e==null?void 0:e.direction)??"horizontal",g=(e==null?void 0:e.transition)??"slide",h=(e==null?void 0:e.nav)??"classic",m=(e==null?void 0:e.navSize)??"m",b=_0[m],I=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,R=be=>C.scalingValue(be*I,n),T=(e==null?void 0:e.show)??"always",G=(e==null?void 0:e.controls)??null,A=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,V=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,k=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,L=(e==null?void 0:e.controlsColor)??Tl.color,D=(e==null?void 0:e.controlsHoverColor)??Tl.hover,x=(e==null?void 0:e.navColor)??ro.colors.inactive,W=(e==null?void 0:e.navPaginationColor)??ro.colors.pagination,M=(e==null?void 0:e.navBackgroundColor)??ro.colors.background,Y=(e==null?void 0:e.linkColor)??ma.linkColor,F=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,U=y==="horizontal",B=p==="click",j=p==="drag",ie=p==="auto"&&(!n||!!i),S=!n,E=g==="slide",O=h==="classic",le=T!=="never",oe=T==="on hover",$=C.scalingValue(A,n),ae={width:$,height:$,maxWidth:$},P=E&&c>1,[te,K]=a.useState(0),[xe,Fe]=a.useState(P?1:0),[ge,ce]=a.useState(!1),[X,ee]=a.useState(!1),[Z,Pe]=a.useState(!1),[$e,ke]=a.useState(0),[ue,fe]=a.useState(!1),[Se,z]=a.useState(!1),se=a.useRef(!1),ye=a.useRef(xe);ye.current=xe;const ve=a.useRef(null),Me=a.useRef(0),Te=a.useRef(null),H=a.useRef(null),he=a.useRef(null),re=a.useRef(null),_=a.useCallback(be=>{se.current=be,ce(be)},[]),Q=a.useCallback(be=>{if(c<2||be===0)return;const We=be>0?1:-1,je=Math.abs(be);if(fe(!0),_(!0),!E){K(Ze=>lo(Ze+be,c));return}let Ke=ye.current;const ne=P&&(Ke===0||Ke===c+1),me=ne?te+1:null;ne&&(Ke=te+1);let Ie=je;for(;Ie>0;){const Ze=O0(Ke,We,c,P);if(Ke=Ze.position,Ie-=1,Ze.hitBoundary){Me.current=Ie*We;break}}const Ge=je-Ie;if(Ge>0&&K(Ze=>lo(Ze+Ge*We,c)),ye.current=Ke,me!==null){if(ye.current=me,Ke===me){ee(!0),Fe(Ke);return}ve.current=Ke,ee(!0),Fe(me);return}ee(!1),Fe(Ke)},[te,c,P,E,_]),Ae=a.useCallback(be=>{Q(be)},[Q]),de=a.useCallback(be=>{if(c<2)return;const We=lo(be,c);if(!(We===te&&!se.current)&&(fe(!0),_(!0),K(We),E)){const je=We+(P?1:0);ve.current=null,Me.current=0,ye.current=je,ee(!1),Fe(je)}},[te,c,P,E,_]);a.useEffect(()=>{if(!ge)return;const be=window.setTimeout(()=>{if(P&&(xe===0||xe===c+1)){ve.current=null,ee(!0),Fe(te+1);return}_(!1)},Wi);return()=>window.clearTimeout(be)},[te,c,P,ge,_,xe]),a.useEffect(()=>{if(!X)return;let be=0;const We=requestAnimationFrame(()=>{be=requestAnimationFrame(()=>{const je=ve.current;ve.current=null;const Ke=Me.current;if(Me.current=0,ee(!1),je!==null){ye.current=je,Fe(je);return}if(Ke!==0){Q(Ke);return}_(!1)})});return()=>{cancelAnimationFrame(We),cancelAnimationFrame(be)}},[Q,_,X]);const N=`${P}:${c}`,Ue=a.useRef(N);a.useEffect(()=>{if(Ue.current===N)return;Ue.current=N;const be=c>0?Math.min(te,c-1):0;he.current=null,re.current=null,Pe(!1),ke(0),K(be),ee(!0),Fe(be+(P?1:0))},[te,c,P,N]),a.useEffect(()=>{if(!ue)return;const be=window.setTimeout(()=>fe(!1),P0);return()=>window.clearTimeout(be)},[ue,te]),a.useEffect(()=>{if(!ie||c<2)return;const be=Math.max(v,.1)*1e3,We=window.setInterval(()=>{S&&Se||Ae(1)},be);return()=>window.clearInterval(We)},[v,c,Ae,ie,Se,S]);const Oe=a.useCallback(be=>{const We=he.current;if(!We||We.pointerId!==be.pointerId)return;he.current=null,re.current=null;const je=Te.current;if(je!=null&&je.hasPointerCapture(be.pointerId)&&je.releasePointerCapture(be.pointerId),!We.isActive){E&&ke(0);return}const ne=!(be.timeStamp-We.lastTime>W0)&&Math.abs(We.velocity)>F0,me=We.size>0&&Math.abs(We.offset-We.baseOffset)>We.size*A0;if(Pe(!1),!ne&&!me){ke(0);return}const Ie=me?We.offset-We.baseOffset:We.velocity;let Ge=1;me&&We.size>0&&(Ge=Math.max(1,Math.round(Math.abs(Ie)/We.size))),ke(0),Q(Ie<0?Ge:-Ge)},[Q,E]);a.useEffect(()=>{const be=We=>{re.current===null||We.pointerId!==re.current||Oe(We)};return window.addEventListener("pointerup",be),window.addEventListener("pointercancel",be),()=>{window.removeEventListener("pointerup",be),window.removeEventListener("pointercancel",be)}},[Oe]);const dt=be=>{const We=Te.current;if(!j||c<2||!We||be.pointerType==="mouse"&&be.button!==0)return;ve.current=null,Me.current=0,se.current&&_(!1);let je=0;const Ke=H.current;if(E&&Ke){const ne=U?Ke.offsetWidth:Ke.offsetHeight;if(ne>0){const me=D0(Ke,U);let Ie=ye.current;P&&(Ie===0||Ie===c+1)?(Ie=te+1,ye.current=Ie,ee(!0),Fe(Ie),je=0):je=me+Ie*ne,ke(je)}}We.setPointerCapture(be.pointerId),re.current=be.pointerId,he.current={pointerId:be.pointerId,startClientX:be.clientX,startClientY:be.clientY,axes:j0(We,`${s}-axis-probe`),size:U?We.offsetWidth:We.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:be.timeStamp,velocity:0}},nt=be=>{const We=he.current;if(!We||We.pointerId!==be.pointerId)return;if(be.pointerType==="mouse"&&be.buttons===0){Oe(be);return}const je=be.clientX-We.startClientX,Ke=be.clientY-We.startClientY,ne=We.axes?z0(We.axes,je,Ke):{x:je,y:Ke},me=U?ne.x:ne.y,Ie=U?ne.y:ne.x,Ge=We.baseOffset+me;if(!We.isActive){if(Math.max(Math.abs(me),Math.abs(Ie))<k0)return;if(Math.abs(Ie)>Math.abs(me)){const Ve=Te.current;Ve!=null&&Ve.hasPointerCapture(We.pointerId)&&Ve.releasePointerCapture(We.pointerId),he.current=null,re.current=null,E&&ke(0);return}We.isActive=!0,Pe(!0)}const Ze=be.timeStamp-We.lastTime;Ze>0&&(We.velocity=(Ge-We.offset)/Ze,We.lastTime=be.timeStamp),We.offset=Ge,E&&ke(Ge)},ht=be=>{Oe(be)},st=U?`translate3d(calc(${-xe*100}% + ${$e}px), 0, 0)`:`translate3d(0, calc(${-xe*100}% + ${$e}px), 0)`,Be=P?[d[c-1],...d,d[0]]:d;return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:B0(s,n)}}),r.jsxs("div",{className:ut(`${s}-wrapper`,{[`${s}-transition-reveal`]:g==="reveal",[`${s}-transition-reveal-vertical`]:g==="reveal"&&!U}),onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:Te,className:ut(`${s}-track`,{[`${s}-track-draggable`]:j,[`${s}-track-draggable-vertical`]:j&&!U}),onPointerDown:dt,onPointerMove:nt,onPointerUp:ht,onPointerCancel:ht,onLostPointerCapture:be=>{re.current===be.pointerId&&Oe(be)},children:r.jsx("div",{ref:H,className:ut(`${s}-list`,{[`${s}-list-slide`]:E,[`${s}-list-slide-vertical`]:E&&!U,[`${s}-list-fade`]:!E}),style:E?{transform:st,transition:Z||X?"none":`transform ${Wi}ms ${Zc}`}:void 0,children:Be.map((be,We)=>{const je=P?lo(We-1,c):We,ne=P&&(We===0||We===c+1)?`clone-${We===0?"start":"end"}`:`slide-${je}`;return r.jsx("div",{className:ut(`${s}-slide`,{[`${s}-is-active`]:!E&&je===te}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:ut(`${s}-slider-image`,{[`${s}-contain`]:be.image.objectFit==="contain",[`${s}-cover`]:be.image.objectFit==="cover"}),src:be.image.url,alt:be.image.name??"",draggable:!1})})})},ne)})})}),le&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:ut(`${s}-arrow`,{[`${s}-arrow-prev`]:U,[`${s}-arrow-prev-vertical`]:!U,[`${s}-hover-arrow`]:oe}),style:{color:L,"--arrow-hover-color":D,...ae},children:r.jsxs("button",{onClick:be=>{be.stopPropagation(),Ae(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${C.scalingValue(V,n)}, ${C.scalingValue(k*(U?1:-1),n)}) rotate(${U?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:ut(`${s}-arrow-img`,`${s}-mirror`),style:ae}),!G&&r.jsx(Rl,{color:L,className:ut(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:ut(`${s}-arrow`,{[`${s}-arrow-next`]:U,[`${s}-arrow-next-vertical`]:!U,[`${s}-hover-arrow`]:oe}),style:{color:L,"--arrow-hover-color":D,...ae},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:be=>{be.stopPropagation(),Ae(1)},style:{transform:`translate(${C.scalingValue(V*(U?-1:1),n)}, ${C.scalingValue(k,n)}) rotate(${U?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:`${s}-arrow-img`,style:ae}),!G&&r.jsx(Rl,{color:L,className:ut(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),B&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Ae(1)}),O&&r.jsx("div",{className:ut(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:U,[`${s}-pagination-inside-left`]:!U}),style:U?{bottom:R(b.inset)}:{left:R(b.inset)},children:r.jsx("div",{className:ut(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!U,[`${s}-animate-dots`]:ue}),style:{backgroundColor:M,gap:R(b.gapInactive-b.activeDot+b.dot),...U?{height:R(b.activeDot+b.paddingY*2),paddingTop:R(b.paddingY),paddingBottom:R(b.paddingY),paddingLeft:R(b.paddingActive),paddingRight:R(b.paddingActive)}:{width:R(b.activeDot+b.paddingY*2),paddingLeft:R(b.paddingY),paddingRight:R(b.paddingY),paddingTop:R(b.paddingActive),paddingBottom:R(b.paddingActive)},borderRadius:R(b.borderRadius),transform:`translate(${C.scalingValue(ro.offset.x,n)}, ${C.scalingValue(ro.offset.y,n)})`},children:d.map((be,We)=>{const je=We===te,Ke=je?b.activeDot:b.dot;return r.jsx("button",{onClick:()=>de(We),className:`${s}-pagination-item`,style:{width:R(b.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:je?W:x,width:R(Ke)}})},We)})},`${m}-${y}`)})]}),r.jsxs("div",{className:`${s}-caption-block`,children:[r.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${s}-control`:void 0,style:{height:C.scalingValue(F,n)}}),r.jsx("div",{className:`${s}-caption-text-wrapper`,children:d.map((be,We)=>r.jsx("div",{className:ut(`${s}-caption-text`,{[`${s}-with-pointer-events`]:We===te&&n,[`${s}-active`]:We===te}),style:{...l,width:"max-content",transitionDuration:`${Math.round(Wi/2)}ms`},children:r.jsx("div",{className:`${s}-caption-text-inner`,style:{"--link-color":Y,"--link-hover-color":Y,position:"relative",top:C.scalingValue(ma.offset.y,n),left:C.scalingValue(ma.offset.x,n)},children:r.jsx(yi,{content:be.imageCaption})})},We))})]})]})]})}function Rl({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 G0=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19577
19577
  import cn from 'classnames';
19578
19578
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19579
19579
  import { scalingValue } from '../utils/scalingValue';
@@ -20971,7 +20971,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20971
20971
  width: var(--cntrl-article-width, 100vw) !important;
20972
20972
  height: var(--cntrl-viewport-height, 100vh) !important;
20973
20973
  }
20974
- `}const Z0="rgba(28,31,34,0.9)",In=500,ci="cubic-bezier(0.22, 1, 0.36, 1)",J0=72,Q0=50,ex={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},tx=[];function nx(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 ix(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ox(e){const[t]=e.media;return t!=null&&t.url?t:null}function rx(e){if(!Array.isArray(e)||e.length===0)return[];if(nx(e)){const t=[];for(const n of e){const i=ix(n);if(!i)continue;const o=ox(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 ka(e){return e.type==="video"}function ax(e){e.pause(),e.removeAttribute("src"),e.load()}function tr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sx(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const lx=1140/1440;function cx(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function dx(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function ux(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function px({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{ax(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function mx({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),q=a.useRef(!1),A=a.useRef(null),[G,k]=a.useState(null),[L,D]=a.useState("opening"),[x,W]=a.useState(0),[M,Y]=a.useState(0),[F,U]=a.useState(!1),[V,z]=a.useState(!1),[ie,S]=a.useState(!1),E=a.useRef(n),O=t[n],le=O?ka(O):!1,oe=M!==0||F,$=a.useCallback(ue=>{q.current=ue,U(ue)},[]),ae=a.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),P=a.useCallback(()=>{ae(),A.current=window.setTimeout(()=>{ae(),$(!1)},In+32)},[ae,$]),te=a.useCallback(()=>{const ue=y.current,fe=g.current;if(!ue)return;const Se=ue.getBoundingClientRect(),B=Se.width,se=Se.height;if(!B||!se)return;if(i==="cover"){k({width:B,height:se,left:Se.left,top:Se.top});return}if(!fe){k(tr(ue));return}const{width:ye,height:ve}=sx(fe);if(!ye||!ve){k(tr(ue));return}const Me=ye/ve,Te=B/se;if(Me>Te){const H=B/Me;k({width:B,height:H,left:Se.left,top:Se.top+(se-H)/2})}else{const H=se*Me;k({width:H,height:se,left:Se.left+(B-H)/2,top:Se.top})}},[i]);a.useEffect(()=>{te();const ue=y.current;if(!ue)return;const fe=new ResizeObserver(()=>te());return fe.observe(ue),()=>fe.disconnect()},[te,n]),a.useEffect(()=>{L==="opening"&&G&&D("open")},[L,G]),a.useEffect(()=>{if(L!=="closing")return;const ue=setTimeout(()=>s(),In);return()=>clearTimeout(ue)},[L,s]),a.useEffect(()=>()=>{ae()},[ae]),a.useLayoutEffect(()=>{if(E.current===n)return;ae(),W(0),Y(0),$(!1),S(!1),z(!1),m.current=0,b.current=0,I.current="none",R.current=!1,h.current=null,T.current=!1;const ue=y.current;ue&&k(tr(ue)),E.current=n},[n,$,ae]),a.useEffect(()=>{if(L!=="open")return;let ue=null;const fe=()=>{ue&&(document.removeEventListener("click",ue,!0),ue=null)},Se=()=>{fe(),ue=Te=>{Te.stopPropagation(),Te.preventDefault(),fe()},document.addEventListener("click",ue,!0)},B=Te=>{ae(),q.current=!1,U(!1),Y(0),z(!1),R.current=!1,b.current=0,I.current="none";const H=y.current;H&&k(tr(H)),Te<0?d():l()},se=Te=>{if(Math.abs(Te)>Q0&&t.length>1){B(Te);return}$(!0),Y(0),P()},ye=Te=>{if(Te.touches.length!==1||q.current)return;const H=Te.touches[0];T.current=!0,h.current={x:H.clientX,y:H.clientY},I.current="none",b.current=0,R.current=!1},ve=Te=>{if(!h.current||Te.touches.length!==1||q.current)return;const H=Te.touches[0],he=H.clientX-h.current.x,re=H.clientY-h.current.y;if(I.current==="none"){if(Math.abs(he)<10&&Math.abs(re)<10)return;if(Math.abs(he)>Math.abs(re)){if(t.length<=1)return;I.current="horizontal"}else if(re>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,z(!0),b.current=he,Y(he),Te.preventDefault();return}I.current==="vertical"&&(R.current=!0,z(!0),m.current=re,W(re),Te.preventDefault())},Me=()=>{if(!h.current)return;const Te=I.current,H=R.current;if(H&&Te==="horizontal")se(b.current),Se();else if(H&&Te==="vertical")if(m.current>J0){const re=window.innerHeight;m.current=re,S(!0),W(re),D("closing")}else m.current=0,W(0),Se();else Te==="horizontal"&&Math.abs(b.current)>0&&(se(b.current),Se());h.current=null,I.current="none",b.current=0,R.current=!1,z(!1)};return document.addEventListener("touchstart",ye,{passive:!0}),document.addEventListener("touchmove",ve,{passive:!1}),document.addEventListener("touchend",Me),document.addEventListener("touchcancel",Me),()=>{document.removeEventListener("touchstart",ye),document.removeEventListener("touchmove",ve),document.removeEventListener("touchend",Me),document.removeEventListener("touchcancel",Me),fe()}},[L,t.length,d,l,$,P,ae]),a.useEffect(()=>{const ue=fe=>{fe.key==="Escape"&&(fe.preventDefault(),fe.stopPropagation(),L!=="closing"&&D("closing"))};return window.addEventListener("keydown",ue,!0),()=>window.removeEventListener("keydown",ue,!0)},[L]);const K=()=>{L!=="closing"&&D("closing")},xe=L==="open",Fe=L==="closing",ge=x>0?Math.max(0,1-x/500):1,ce=x>0?Math.max(.35,1-x/500):1,X=ue=>{if(ue.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const fe=ue.currentTarget.getBoundingClientRect(),Se=ue.clientY-fe.top,B=Math.min(52,fe.height*.2);if(!(Se>fe.height-B)){if(ue.clientX-fe.left<fe.width/2){l();return}d()}},ee=ue=>{if(t.length<=1)return;const fe=ue.currentTarget.getBoundingClientRect(),Se=ue.clientX-fe.left,B=ue.clientY-fe.top,se=Math.min(52,fe.height*.2);if(B>fe.height-se){ue.currentTarget.style.cursor="default";return}ue.currentTarget.style.cursor=Se<fe.width/2?"w-resize":"e-resize"},Z=a.useCallback(ue=>{ue.propertyName!=="transform"||!q.current||(ae(),$(!1))},[ae,$]),Pe=oe?`translateX(${M}px)`:x>0?`translateY(${x}px)`:void 0,$e={position:"fixed",top:G==null?void 0:G.top,left:G==null?void 0:G.left,width:G==null?void 0:G.width,height:G==null?void 0:G.height,objectFit:i==="cover"?"cover":"contain",transform:Pe,opacity:x>0?ce:L==="opening"||Fe?0:1,transition:V&&!F?"none":F?`transform ${In}ms ${ci}`:ie?`transform ${In}ms ${ci}, opacity ${In}ms ${ci}`:L==="opening"||Fe?`opacity ${In}ms ${ci}`:"none",pointerEvents:le&&xe&&!oe?"auto":"none",touchAction:le&&xe?"none":void 0,zIndex:9998},ke=G?{position:"fixed",top:G.top,height:G.height,width:G.width/2,zIndex:9999}:null;return r.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:L==="open"?"none":void 0},onClick:K,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:xe?ge:0,transition:V?"none":`opacity ${In}ms ${ci}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,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:xe?1:0,transition:`opacity ${In}ms ${ci}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.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:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:xe?1:0,transition:`opacity ${In}ms ${ci}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),G&&O&&(le?r.jsx(px,{src:O.url,phase:L,mediaRef:g,mediaStyle:$e,onLoadedMetadata:te,onClick:X,onMouseMove:ee,onTransitionEnd:Z},`${n}-${O.url}`):r.jsx("img",{ref:g,src:O.url,alt:O.name,onLoad:te,onTransitionEnd:Z,style:$e},`${n}-${O.url}`)),xe&&ke&&t.length>1&&!le&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...ke,left:G.left,cursor:"w-resize",pointerEvents:oe?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),l()}}),r.jsx("div",{style:{...ke,left:G.left+G.width/2,cursor:"e-resize",pointerEvents:oe?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),d()}})]})]})}function Ml({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:s,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${ka(t)?"video":"image"}`,y=s.display==="cover",g=dx(s),h=L=>C.scalingValue(L,l??!1),m=n??Mi,b=o?{width:"100%",maxWidth:"100%"}:{width:h(m),maxWidth:"100%"},I=i?{borderRadius:h(i)}:{},R={...b,...y?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...I},T={...y?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(m)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...y?{}:I},A={className:v,style:T,onClick:p?L=>{L.stopPropagation(),p()}:void 0},G=Math.max(d,di),k=ka(t)?r.jsx("video",{...A,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...A,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[y?r.jsx("div",{style:R,children:k}):k,c&&d>0&&r.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(G)}})]})}function gx({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:s,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,y=v>0||c;return r.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&r.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),r.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&r.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(s),height:"100%"}})]})}function hx(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Pl({P:e,scaled:t,height:n,paired:i}){return r.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function kl({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:s,paired:l,anchorStyle:d}){return r.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...s==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...s==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ga({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:s,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=a.useRef(null),[v,y]=a.useState(0),g=t??"",h=n==="left"||n==="center"||n==="right";return a.useLayoutEffect(()=>{if(!h)return;const m=p.current;if(!m||typeof ResizeObserver>"u")return;const b=()=>y(m.offsetHeight);b();const I=new ResizeObserver(b);return I.observe(m),()=>I.disconnect()},[g,h]),r.jsx("div",{ref:m=>{p.current=m,i(m)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...s},children:r.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,r.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:r.jsx("span",{className:`${e}-title-text`,style:d,children:g})})]})})}const Al=45;function Fl(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const s=parseFloat(o);if(!Number.isNaN(s))return s}i=i.parentElement}return n}function fx(e){const t=Fl(e,"--cntrl-viewport-height",window.innerHeight),n=Fl(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function yx(e,t,n){const{top:i,centerY:o}=fx(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const s=e.top+e.height/2;return Math.abs(s-o)}function vx(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=yx(u,n,c);return Math.exp(-(p*p)/(2*Al*Al))});let o=0,s=-1;return i.forEach((l,d)=>{l>s&&(s=l,o=d)}),{opacities:i,dominantIndex:o}}function xx(e,t,n){const i=a.useRef([]),[{opacities:o,dominantIndex:s},l]=a.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return a.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(vx(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:s}}function bx(e,t){const[n,i]=a.useState(e),o=a.useRef(e);return a.useEffect(()=>{if(!t){o.current=e,i(e);return}const s=Array.from(o.current),l=Array.from(e),d=Math.max(s.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...s.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function wx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:s}){var tt;const{prefix:l}=C.useScopedStyles(),d=a.useMemo(()=>Y0(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??Mi,y=(e==null?void 0:e.titleWidth)??lx,g=cx(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??X0,m=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,I=(e==null?void 0:e.titleLeftPadding)??0,R=(e==null?void 0:e.titleRightPadding)??0,T=hx(e==null?void 0:e.transition),q=(e==null?void 0:e.lightbox)??"on",A=p==="b",G=T==="fade"||T==="retype",{setTitleRef:k,dominantIndex:L}=xx(c.length,G,m),D=((tt=c[L])==null?void 0:tt.title)??"",x=bx(D,T==="retype"),W=T==="fade"||T==="retype",M=T==="retype"?x:D,Y=A?void 0:{width:C.scalingValue(v,n??!1)},F=q==="on"&&(!n||i||o),U=o??!1,V=(e==null?void 0:e.galleryPaddingRight)??0,z=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,S=rt=>C.scalingValue(rt,n??!1),O={width:S(y)},le=p==="a"?V:z,oe=A?{width:"100%"}:{width:`calc(100% - ${S(v)} - ${S(le)})`,...p==="c"?{marginLeft:"auto"}:{}},$=Math.max(V,di),ae=Math.max(z,di),P=Math.max(ie,di),te=Math.max(b,di),K=Math.max(I,di),xe=Math.max(R,di),Fe=Math.max(0,(u??1)-(v??Mi)),ge=p==="a"?Math.max(0,(u??1)-(v??Mi)-V):p==="c"?Math.max(0,(u??1)-(v??Mi)-z):p==="b"?u??1:1,ce=U&&(p==="a"||p==="b"||p==="c")&&m==="top",X=U&&((p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")),ee=U&&((p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"),Z=c.length>1,Pe=A?void 0:S((p==="c"?z:V)+(v??Mi)),$e=p==="c"&&Pe?{left:Pe}:void 0,ke=p==="a"&&Pe?{right:Pe}:void 0,ue=A?{left:0,width:"100%"}:p==="a"?{right:S(V),width:S(v)}:{left:S(z),width:S(v)},{titleColor:fe,titleFontFamily:Se,titleFontSettings:B,titleFontSize:se,titleLineHeight:ye,titleLetterSpacing:ve,titleWordSpacing:Me,titleAlign:Te,titleTextAppearance:H,lightboxCounterColor:he,lightboxCounterFontFamily:re,lightboxCounterFontSettings:_,lightboxCounterFontSize:Q,lightboxCounterLineHeight:Ae,lightboxCounterLetterSpacing:de,lightboxCounterWordSpacing:N,lightboxCounterTextAppearance:Ue}=e??{},Oe={fontSettings:{fontFamily:Se,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ye,letterSpacing:ve??0,wordSpacing:Me??0,textAlign:Te??"left",textAppearance:H,color:fe??"#000000"},nt=rn(Xt(Oe,n)),ht=O,st=El(se,ye,l,n),Be=Il(se,ye,`${l}-title`,`${l}-text-tight-leading`),be={fontSettings:{fontFamily:re,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:Ae,letterSpacing:de??0,wordSpacing:N??0,textAppearance:Ue,color:he??"#DEDDDD"},je={...rn(Xt(be,n)),...El(Q,Ae,l,n)},Ke=Il(Q,Ae,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ne=C.buildColorVars(l,{titleColor:fe??"#000000",lightboxCounterColor:he??"#DEDDDD"},ex,tx),me=a.useRef(null),[Ie,Ge]=a.useState(!1),[Ze,Ve]=a.useState([]),[at,Je]=a.useState(0),Ee=a.useCallback((rt,lt)=>{F&&(Ve(rt),Je(lt),Ge(!0))},[F]),qe=a.useCallback(()=>{Ge(!1)},[]),_e=a.useMemo(()=>{const rt={...ne},lt=me.current?getComputedStyle(me.current).getPropertyValue("--cntrl-article-width").trim():"";return lt&&(rt["--cntrl-article-width"]=lt),rt},[ne,Ie]);return a.useEffect(()=>{if(!Ie||q!=="on"||typeof document>"u")return;const rt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=rt}},[Ie,q]),a.useEffect(()=>{!n||o||i||Ge(!1)},[n,o,i]),a.useEffect(()=>{q==="off"&&Ge(!1)},[q]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:ne,children:r.jsxs("div",{ref:me,className:`${l}-wrapper`,style:{width:C.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&m==="top"?S(b):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")?S(I):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"?S(R):void 0},children:[W&&r.jsx("div",{className:`${l}-single-title-layer`,children:r.jsx(ga,{P:l,title:M,position:m,titleRef:()=>{},titleClassName:`${Be} ${l}-single-title`,titleContainerStyle:{...st,...oe},titleTextBoxStyle:ht,titleStyle:nt,showTextBoxOutline:U,topPaddingControl:ce?Pl({P:l,scaled:S,height:te,paired:!1}):void 0})}),c.map((rt,lt)=>{const Tt=rx(rt.gallery),Ut=lt<c.length-1,Zt=Tt.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),xt={P:l,position:m,titleRef:k(lt),titleClassName:Be,titleContainerStyle:st,titleTextBoxStyle:W?{maxWidth:"100%"}:ht,titleStyle:nt,showTextBoxOutline:U&&!W,topPaddingControl:ce&&!W?Pl({P:l,scaled:S,height:te,paired:Z}):void 0};return r.jsxs("div",{"data-item-index":lt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Ut?S(ie):void 0},children:[X&&kl({P:l,controlKey:"titleLeftPadding",scaled:S,width:K,maxFraction:ge,side:"left",paired:Z,anchorStyle:$e}),ee&&kl({P:l,controlKey:"titleRightPadding",scaled:S,width:xe,maxFraction:ge,side:"right",paired:Z,anchorStyle:ke}),U&&Ut&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:S(P),...ue}}),A?r.jsxs("div",{className:`${l}-gallery`,children:[r.jsx("div",{className:`${l}-gallery-media`,children:Tt.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const vt=jt?Zt.findIndex(Ft=>Ft.url===jt.url):-1;return r.jsx(Ml,{P:l,media:wt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<Tt.length-1,showControls:U,onMediaClick:F&&vt>=0?()=>Ee(Zt,vt):void 0},`${wt.url}-${At}`)})}),r.jsx("div",{className:`${l}-title-layer`,children:r.jsx(ga,{...xt,title:W?"":rt.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(ga,{...xt,title:W?"":rt.title}),Tt.length>0&&r.jsx(gx,{P:l,layoutType:p,galleryWidthStyle:Y,galleryPaddingRight:V,galleryPaddingLeft:z,galleryPaddingRightWidth:$,galleryPaddingLeftWidth:ae,galleryPaddingMaxFraction:Fe,showControls:U,scaled:S,children:Tt.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const vt=jt?Zt.findIndex(Ft=>Ft.url===jt.url):-1;return r.jsx(Ml,{P:l,media:wt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<Tt.length-1,showControls:U,onMediaClick:F&&vt>=0?()=>Ee(Zt,vt):void 0},`${wt.url}-${At}`)})})]})]},lt)})]})}),Ie&&q==="on"&&typeof document<"u"&&e&&(()=>{const rt=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:_e,"data-selection":"none",children:r.jsx(mx,{prefix:l,items:Ze,index:at,imageDisplay:ux(e.lightboxImageDisplay),isEditor:n,onClose:qe,onPrev:()=>Je(lt=>(lt-1+Ze.length)%Ze.length),onNext:()=>Je(lt=>(lt+1)%Ze.length),counterClassName:Ke,counterStyle:je,backgroundColor:e.backgroundColor??Z0})}),rt)})()]})}const Sx=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20974
+ `}const Z0="rgba(28,31,34,0.9)",In=500,ci="cubic-bezier(0.22, 1, 0.36, 1)",J0=72,Q0=50,ex={titleColor:"title-color",lightboxCounterColor:"lightbox-counter-color"},tx=[];function nx(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 ix(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function ox(e){const[t]=e.media;return t!=null&&t.url?t:null}function rx(e){if(!Array.isArray(e)||e.length===0)return[];if(nx(e)){const t=[];for(const n of e){const i=ix(n);if(!i)continue;const o=ox(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 ka(e){return e.type==="video"}function ax(e){e.pause(),e.removeAttribute("src"),e.load()}function tr(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function sx(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const lx=1140/1440;function cx(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function dx(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function ux(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function px({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d}){return a.useEffect(()=>{const c=n.current;if(c)return()=>{ax(c)}},[e,n]),r.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:s,onMouseMove:l,onTransitionEnd:d,style:i})}function mx({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:s,onPrev:l,onNext:d,counterClassName:c,counterStyle:u,backgroundColor:p}){const v=i==="cover",y=a.useRef(null),g=a.useRef(null),h=a.useRef(null),m=a.useRef(0),b=a.useRef(0),I=a.useRef("none"),R=a.useRef(!1),T=a.useRef(!1),G=a.useRef(!1),A=a.useRef(null),[V,k]=a.useState(null),[L,D]=a.useState("opening"),[x,W]=a.useState(0),[M,Y]=a.useState(0),[F,U]=a.useState(!1),[B,j]=a.useState(!1),[ie,S]=a.useState(!1),E=a.useRef(n),O=t[n],le=O?ka(O):!1,oe=M!==0||F,$=a.useCallback(ue=>{G.current=ue,U(ue)},[]),ae=a.useCallback(()=>{A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),P=a.useCallback(()=>{ae(),A.current=window.setTimeout(()=>{ae(),$(!1)},In+32)},[ae,$]),te=a.useCallback(()=>{const ue=y.current,fe=g.current;if(!ue)return;const Se=ue.getBoundingClientRect(),z=Se.width,se=Se.height;if(!z||!se)return;if(i==="cover"){k({width:z,height:se,left:Se.left,top:Se.top});return}if(!fe){k(tr(ue));return}const{width:ye,height:ve}=sx(fe);if(!ye||!ve){k(tr(ue));return}const Me=ye/ve,Te=z/se;if(Me>Te){const H=z/Me;k({width:z,height:H,left:Se.left,top:Se.top+(se-H)/2})}else{const H=se*Me;k({width:H,height:se,left:Se.left+(z-H)/2,top:Se.top})}},[i]);a.useEffect(()=>{te();const ue=y.current;if(!ue)return;const fe=new ResizeObserver(()=>te());return fe.observe(ue),()=>fe.disconnect()},[te,n]),a.useEffect(()=>{L==="opening"&&V&&D("open")},[L,V]),a.useEffect(()=>{if(L!=="closing")return;const ue=setTimeout(()=>s(),In);return()=>clearTimeout(ue)},[L,s]),a.useEffect(()=>()=>{ae()},[ae]),a.useLayoutEffect(()=>{if(E.current===n)return;ae(),W(0),Y(0),$(!1),S(!1),j(!1),m.current=0,b.current=0,I.current="none",R.current=!1,h.current=null,T.current=!1;const ue=y.current;ue&&k(tr(ue)),E.current=n},[n,$,ae]),a.useEffect(()=>{if(L!=="open")return;let ue=null;const fe=()=>{ue&&(document.removeEventListener("click",ue,!0),ue=null)},Se=()=>{fe(),ue=Te=>{Te.stopPropagation(),Te.preventDefault(),fe()},document.addEventListener("click",ue,!0)},z=Te=>{ae(),G.current=!1,U(!1),Y(0),j(!1),R.current=!1,b.current=0,I.current="none";const H=y.current;H&&k(tr(H)),Te<0?d():l()},se=Te=>{if(Math.abs(Te)>Q0&&t.length>1){z(Te);return}$(!0),Y(0),P()},ye=Te=>{if(Te.touches.length!==1||G.current)return;const H=Te.touches[0];T.current=!0,h.current={x:H.clientX,y:H.clientY},I.current="none",b.current=0,R.current=!1},ve=Te=>{if(!h.current||Te.touches.length!==1||G.current)return;const H=Te.touches[0],he=H.clientX-h.current.x,re=H.clientY-h.current.y;if(I.current==="none"){if(Math.abs(he)<10&&Math.abs(re)<10)return;if(Math.abs(he)>Math.abs(re)){if(t.length<=1)return;I.current="horizontal"}else if(re>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,j(!0),b.current=he,Y(he),Te.preventDefault();return}I.current==="vertical"&&(R.current=!0,j(!0),m.current=re,W(re),Te.preventDefault())},Me=()=>{if(!h.current)return;const Te=I.current,H=R.current;if(H&&Te==="horizontal")se(b.current),Se();else if(H&&Te==="vertical")if(m.current>J0){const re=window.innerHeight;m.current=re,S(!0),W(re),D("closing")}else m.current=0,W(0),Se();else Te==="horizontal"&&Math.abs(b.current)>0&&(se(b.current),Se());h.current=null,I.current="none",b.current=0,R.current=!1,j(!1)};return document.addEventListener("touchstart",ye,{passive:!0}),document.addEventListener("touchmove",ve,{passive:!1}),document.addEventListener("touchend",Me),document.addEventListener("touchcancel",Me),()=>{document.removeEventListener("touchstart",ye),document.removeEventListener("touchmove",ve),document.removeEventListener("touchend",Me),document.removeEventListener("touchcancel",Me),fe()}},[L,t.length,d,l,$,P,ae]),a.useEffect(()=>{const ue=fe=>{fe.key==="Escape"&&(fe.preventDefault(),fe.stopPropagation(),L!=="closing"&&D("closing"))};return window.addEventListener("keydown",ue,!0),()=>window.removeEventListener("keydown",ue,!0)},[L]);const K=()=>{L!=="closing"&&D("closing")},xe=L==="open",Fe=L==="closing",ge=x>0?Math.max(0,1-x/500):1,ce=x>0?Math.max(.35,1-x/500):1,X=ue=>{if(ue.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const fe=ue.currentTarget.getBoundingClientRect(),Se=ue.clientY-fe.top,z=Math.min(52,fe.height*.2);if(!(Se>fe.height-z)){if(ue.clientX-fe.left<fe.width/2){l();return}d()}},ee=ue=>{if(t.length<=1)return;const fe=ue.currentTarget.getBoundingClientRect(),Se=ue.clientX-fe.left,z=ue.clientY-fe.top,se=Math.min(52,fe.height*.2);if(z>fe.height-se){ue.currentTarget.style.cursor="default";return}ue.currentTarget.style.cursor=Se<fe.width/2?"w-resize":"e-resize"},Z=a.useCallback(ue=>{ue.propertyName!=="transform"||!G.current||(ae(),$(!1))},[ae,$]),Pe=oe?`translateX(${M}px)`:x>0?`translateY(${x}px)`:void 0,$e={position:"fixed",top:V==null?void 0:V.top,left:V==null?void 0:V.left,width:V==null?void 0:V.width,height:V==null?void 0:V.height,objectFit:i==="cover"?"cover":"contain",transform:Pe,opacity:x>0?ce:L==="opening"||Fe?0:1,transition:B&&!F?"none":F?`transform ${In}ms ${ci}`:ie?`transform ${In}ms ${ci}, opacity ${In}ms ${ci}`:L==="opening"||Fe?`opacity ${In}ms ${ci}`:"none",pointerEvents:le&&xe&&!oe?"auto":"none",touchAction:le&&xe?"none":void 0,zIndex:9998},ke=V?{position:"fixed",top:V.top,height:V.height,width:V.width/2,zIndex:9999}:null;return r.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:L==="open"?"none":void 0},onClick:K,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:xe?ge:0,transition:B?"none":`opacity ${In}ms ${ci}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:v?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:y,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:xe?1:0,transition:`opacity ${In}ms ${ci}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.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:y,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:xe?1:0,transition:`opacity ${In}ms ${ci}`},children:t.length>1&&r.jsxs("p",{className:c,style:u,children:[n+1," / ",t.length]})})]})}),V&&O&&(le?r.jsx(px,{src:O.url,phase:L,mediaRef:g,mediaStyle:$e,onLoadedMetadata:te,onClick:X,onMouseMove:ee,onTransitionEnd:Z},`${n}-${O.url}`):r.jsx("img",{ref:g,src:O.url,alt:O.name,onLoad:te,onTransitionEnd:Z,style:$e},`${n}-${O.url}`)),xe&&ke&&t.length>1&&!le&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...ke,left:V.left,cursor:"w-resize",pointerEvents:oe?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),l()}}),r.jsx("div",{style:{...ke,left:V.left+V.width/2,cursor:"e-resize",pointerEvents:oe?"none":"auto"},onClick:ue=>{if(T.current){T.current=!1;return}ue.stopPropagation(),d()}})]})]})}function Ml({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:s,isEditor:l,galleryPaddingBetween:d=0,showPaddingAfter:c=!1,showControls:u=!1,onMediaClick:p}){const v=`${e}-gallery-${ka(t)?"video":"image"}`,y=s.display==="cover",g=dx(s),h=L=>C.scalingValue(L,l??!1),m=n??Mi,b=o?{width:"100%",maxWidth:"100%"}:{width:h(m),maxWidth:"100%"},I=i?{borderRadius:h(i)}:{},R={...b,...y?{aspectRatio:g,height:"auto",overflow:"hidden"}:{},...I},T={...y?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":h(m)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...y?{}:I},A={className:v,style:T,onClick:p?L=>{L.stopPropagation(),p()}:void 0},V=Math.max(d,di),k=ka(t)?r.jsx("video",{...A,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...A,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[y?r.jsx("div",{style:R,children:k}):k,c&&d>0&&r.jsx("div",{className:`${e}-padding-handle`,style:{height:h(d)},"aria-hidden":"true"}),u&&c&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:h(V)}})]})}function gx({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:s,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:d,showControls:c,scaled:u,children:p}){const v=t==="a"?i:t==="c"?o:0,y=v>0||c;return r.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="c"&&r.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),r.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&y&&r.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(v)},"aria-hidden":"true"}),c&&t==="a"&&r.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(s),height:"100%"}})]})}function hx(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Pl({P:e,scaled:t,height:n,paired:i}){return r.jsx("div",{"data-controls":"titleTopPadding",...i?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:t(n)}})}function kl({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:s,paired:l,anchorStyle:d}){return r.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...s==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...s==="left"?{left:0}:{right:0},width:n(i),height:"100%",...d}})}function ga({P:e,title:t,position:n,titleRef:i,titleClassName:o,titleContainerStyle:s,titleTextBoxStyle:l,titleStyle:d,showTextBoxOutline:c=!1,topPaddingControl:u}){const p=a.useRef(null),[v,y]=a.useState(0),g=t??"",h=n==="left"||n==="center"||n==="right";return a.useLayoutEffect(()=>{if(!h)return;const m=p.current;if(!m||typeof ResizeObserver>"u")return;const b=()=>y(m.offsetHeight);b();const I=new ResizeObserver(b);return I.observe(m),()=>I.disconnect()},[g,h]),r.jsx("div",{ref:m=>{p.current=m,i(m)},className:[o,`${e}-title-position-${n}`].join(" "),style:{...h?{[`--${e}-title-height`]:`${v}px`}:{},...s},children:r.jsxs("div",{className:`${e}-title-text-stack`,style:l,children:[u,r.jsx("div",{className:c?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:r.jsx("span",{className:`${e}-title-text`,style:d,children:g})})]})})}const Al=45;function Fl(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const s=parseFloat(o);if(!Number.isNaN(s))return s}i=i.parentElement}return n}function fx(e){const t=Fl(e,"--cntrl-viewport-height",window.innerHeight),n=Fl(e,"--cntrl-article-top",0);return{top:n,centerY:n+t/2}}function yx(e,t,n){const{top:i,centerY:o}=fx(n);if(t==="top"){const l=n&&parseFloat(getComputedStyle(n).top)||i;return Math.abs(e.top-l)}const s=e.top+e.height/2;return Math.abs(s-o)}function vx(e,t,n){const i=Array.from({length:t},(l,d)=>{const c=e.current[d];if(!c)return 0;const u=c.getBoundingClientRect(),p=yx(u,n,c);return Math.exp(-(p*p)/(2*Al*Al))});let o=0,s=-1;return i.forEach((l,d)=>{l>s&&(s=l,o=d)}),{opacities:i,dominantIndex:o}}function xx(e,t,n){const i=a.useRef([]),[{opacities:o,dominantIndex:s},l]=a.useState(()=>({opacities:Array.from({length:e},(c,u)=>u===0?1:0),dominantIndex:0}));return a.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let c=0;const u=()=>{l(vx(i,e,n))},p=()=>{c||(c=window.requestAnimationFrame(()=>{c=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{c&&window.cancelAnimationFrame(c),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:c=>u=>{i.current[c]=u},opacities:o,dominantIndex:s}}function bx(e,t){const[n,i]=a.useState(e),o=a.useRef(e);return a.useEffect(()=>{if(!t){o.current=e,i(e);return}const s=Array.from(o.current),l=Array.from(e),d=Math.max(s.length,l.length);if(d===0||o.current===e)return;let c=0;const u=window.setInterval(()=>{c+=1;const p=[...l.slice(0,c),...s.slice(c)].join("");o.current=p,i(p),c>=d&&window.clearInterval(u)},35);return()=>window.clearInterval(u)},[t,e]),n}function wx({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:s}){var tt;const{prefix:l}=C.useScopedStyles(),d=a.useMemo(()=>Y0(l),[l]),c=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",v=(e==null?void 0:e.imgWidth)??Mi,y=(e==null?void 0:e.titleWidth)??lx,g=cx(e==null?void 0:e.imageDisplay),h=(e==null?void 0:e.cornerRadius)??X0,m=(e==null?void 0:e.position)??"center",b=(e==null?void 0:e.titleTopPadding)??0,I=(e==null?void 0:e.titleLeftPadding)??0,R=(e==null?void 0:e.titleRightPadding)??0,T=hx(e==null?void 0:e.transition),G=(e==null?void 0:e.lightbox)??"on",A=p==="b",V=T==="fade"||T==="retype",{setTitleRef:k,dominantIndex:L}=xx(c.length,V,m),D=((tt=c[L])==null?void 0:tt.title)??"",x=bx(D,T==="retype"),W=T==="fade"||T==="retype",M=T==="retype"?x:D,Y=A?void 0:{width:C.scalingValue(v,n??!1)},F=G==="on"&&(!n||i||o),U=o??!1,B=(e==null?void 0:e.galleryPaddingRight)??0,j=(e==null?void 0:e.galleryPaddingLeft)??0,ie=(e==null?void 0:e.galleryPaddingBetween)??0,S=rt=>C.scalingValue(rt,n??!1),O={width:S(y)},le=p==="a"?B:j,oe=A?{width:"100%"}:{width:`calc(100% - ${S(v)} - ${S(le)})`,...p==="c"?{marginLeft:"auto"}:{}},$=Math.max(B,di),ae=Math.max(j,di),P=Math.max(ie,di),te=Math.max(b,di),K=Math.max(I,di),xe=Math.max(R,di),Fe=Math.max(0,(u??1)-(v??Mi)),ge=p==="a"?Math.max(0,(u??1)-(v??Mi)-B):p==="c"?Math.max(0,(u??1)-(v??Mi)-j):p==="b"?u??1:1,ce=U&&(p==="a"||p==="b"||p==="c")&&m==="top",X=U&&((p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")),ee=U&&((p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"),Z=c.length>1,Pe=A?void 0:S((p==="c"?j:B)+(v??Mi)),$e=p==="c"&&Pe?{left:Pe}:void 0,ke=p==="a"&&Pe?{right:Pe}:void 0,ue=A?{left:0,width:"100%"}:p==="a"?{right:S(B),width:S(v)}:{left:S(j),width:S(v)},{titleColor:fe,titleFontFamily:Se,titleFontSettings:z,titleFontSize:se,titleLineHeight:ye,titleLetterSpacing:ve,titleWordSpacing:Me,titleAlign:Te,titleTextAppearance:H,lightboxCounterColor:he,lightboxCounterFontFamily:re,lightboxCounterFontSettings:_,lightboxCounterFontSize:Q,lightboxCounterLineHeight:Ae,lightboxCounterLetterSpacing:de,lightboxCounterWordSpacing:N,lightboxCounterTextAppearance:Ue}=e??{},Oe={fontSettings:{fontFamily:Se,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:se??.01,lineHeight:ye,letterSpacing:ve??0,wordSpacing:Me??0,textAlign:Te??"left",textAppearance:H,color:fe??"#000000"},nt=rn(Xt(Oe,n)),ht=O,st=El(se,ye,l,n),Be=Il(se,ye,`${l}-title`,`${l}-text-tight-leading`),be={fontSettings:{fontFamily:re,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:Ae,letterSpacing:de??0,wordSpacing:N??0,textAppearance:Ue,color:he??"#DEDDDD"},je={...rn(Xt(be,n)),...El(Q,Ae,l,n)},Ke=Il(Q,Ae,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ne=C.buildColorVars(l,{titleColor:fe??"#000000",lightboxCounterColor:he??"#DEDDDD"},ex,tx),me=a.useRef(null),[Ie,Ge]=a.useState(!1),[Ze,Ve]=a.useState([]),[at,Je]=a.useState(0),Ee=a.useCallback((rt,lt)=>{F&&(Ve(rt),Je(lt),Ge(!0))},[F]),qe=a.useCallback(()=>{Ge(!1)},[]),_e=a.useMemo(()=>{const rt={...ne},lt=me.current?getComputedStyle(me.current).getPropertyValue("--cntrl-article-width").trim():"";return lt&&(rt["--cntrl-article-width"]=lt),rt},[ne,Ie]);return a.useEffect(()=>{if(!Ie||G!=="on"||typeof document>"u")return;const rt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=rt}},[Ie,G]),a.useEffect(()=>{!n||o||i||Ge(!1)},[n,o,i]),a.useEffect(()=>{G==="off"&&Ge(!1)},[G]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:ne,children:r.jsxs("div",{ref:me,className:`${l}-wrapper`,style:{width:C.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:(p==="a"||p==="b"||p==="c")&&m==="top"?S(b):void 0,[`--${l}-title-left-padding`]:(p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")?S(I):void 0,[`--${l}-title-right-padding`]:(p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"?S(R):void 0},children:[W&&r.jsx("div",{className:`${l}-single-title-layer`,children:r.jsx(ga,{P:l,title:M,position:m,titleRef:()=>{},titleClassName:`${Be} ${l}-single-title`,titleContainerStyle:{...st,...oe},titleTextBoxStyle:ht,titleStyle:nt,showTextBoxOutline:U,topPaddingControl:ce?Pl({P:l,scaled:S,height:te,paired:!1}):void 0})}),c.map((rt,lt)=>{const Tt=rx(rt.gallery),Ut=lt<c.length-1,Zt=Tt.filter(wt=>wt.lightboxMedia).map(wt=>wt.lightboxMedia),xt={P:l,position:m,titleRef:k(lt),titleClassName:Be,titleContainerStyle:st,titleTextBoxStyle:W?{maxWidth:"100%"}:ht,titleStyle:nt,showTextBoxOutline:U&&!W,topPaddingControl:ce&&!W?Pl({P:l,scaled:S,height:te,paired:Z}):void 0};return r.jsxs("div",{"data-item-index":lt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Ut?S(ie):void 0},children:[X&&kl({P:l,controlKey:"titleLeftPadding",scaled:S,width:K,maxFraction:ge,side:"left",paired:Z,anchorStyle:$e}),ee&&kl({P:l,controlKey:"titleRightPadding",scaled:S,width:xe,maxFraction:ge,side:"right",paired:Z,anchorStyle:ke}),U&&Ut&&r.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:S(P),...ue}}),A?r.jsxs("div",{className:`${l}-gallery`,children:[r.jsx("div",{className:`${l}-gallery-media`,children:Tt.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const vt=jt?Zt.findIndex(Ft=>Ft.url===jt.url):-1;return r.jsx(Ml,{P:l,media:wt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<Tt.length-1,showControls:U,onMediaClick:F&&vt>=0?()=>Ee(Zt,vt):void 0},`${wt.url}-${At}`)})}),r.jsx("div",{className:`${l}-title-layer`,children:r.jsx(ga,{...xt,title:W?"":rt.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(ga,{...xt,title:W?"":rt.title}),Tt.length>0&&r.jsx(gx,{P:l,layoutType:p,galleryWidthStyle:Y,galleryPaddingRight:B,galleryPaddingLeft:j,galleryPaddingRightWidth:$,galleryPaddingLeftWidth:ae,galleryPaddingMaxFraction:Fe,showControls:U,scaled:S,children:Tt.map(({displayMedia:wt,lightboxMedia:jt},At)=>{const vt=jt?Zt.findIndex(Ft=>Ft.url===jt.url):-1;return r.jsx(Ml,{P:l,media:wt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ie,showPaddingAfter:At<Tt.length-1,showControls:U,onMediaClick:F&&vt>=0?()=>Ee(Zt,vt):void 0},`${wt.url}-${At}`)})})]})]},lt)})]})}),Ie&&G==="on"&&typeof document<"u"&&e&&(()=>{const rt=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:_e,"data-selection":"none",children:r.jsx(mx,{prefix:l,items:Ze,index:at,imageDisplay:ux(e.lightboxImageDisplay),isEditor:n,onClose:qe,onPrev:()=>Je(lt=>(lt-1+Ze.length)%Ze.length),onNext:()=>Je(lt=>(lt+1)%Ze.length),counterClassName:Ke,counterStyle:je,backgroundColor:e.backgroundColor??Z0})}),rt)})()]})}const Sx=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20975
20975
  import { createPortal } from 'react-dom';
20976
20976
  import type React from 'react';
20977
20977
  import { CommonComponentProps } from '../props';
@@ -23069,7 +23069,7 @@ ${t}
23069
23069
  `}function Fo(e){return Number(e.toFixed(4))}function _l(e,t,n,i){const s=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(s)?Math.min(i,Math.max(n,Math.round(s))):t}function fa(e,t,n=0,i=9999){const s=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(s)?Math.min(i,Math.max(n,s)):t}function zx(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Bx(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Vx(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function ed(e,t){return(1-e)/(1-e*Math.cos(t))}function Gx(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*ed(e,i)))}return t||1}function qx(e,t){return e?1:1+Qc*(.35+t)}function Ux(e,t,n,i){const o=t*qx(n,i);return Math.max(0,(e-o)/2)}function td(e,t,n){const i=ed(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function nd(e,t,n){return e/2+t*n}function Xx(e,t,n){return e(t-n/2)}function Kx(e,t){return e*t}function id(e){return Math.round(e*1e3)}function od(e,t,n){const i=Math.cos(e),o=Math.cos(Dx*Math.PI/2);if(i>=o)return n;const s=(i+1)/(o+1);return Fo(t+(n-t)*s)}function rd(e){return od(e,_x,Hx)}function Yx(e){return od(e,Nx,Ox)}function ad(e,t){if(!t)return"none";const n=Yx(e);return n<=0?"none":`blur(${n}px)`}function Zx(e,t,n,i,o,s,l,d){const{offset:c,scale:u}=td(i,o,s*Math.PI*2),p=s*Math.PI*2,v=nd(t,n,c),y=Fo(u),g=`calc(${e(v)} - var(--helix-base-w) * ${y} / 2)`,h=`calc(var(--helix-base-w) * ${y})`,m=l?`height: calc(var(--helix-base-h) * ${y});`:"";return`left: ${g}; width: ${h}; ${m} z-index: ${id(u)}; transform: translateY(-50%); opacity: ${rd(p)}; filter: ${ad(p,d)};`}function Jx(e,t,n,i,o,s,l,d){const c=[];for(let u=0;u<=Wl;u+=1){const p=u/Wl;c.push(` ${Fo(p*100)}% { ${Zx(t,n,i,o,s,p,l,d)} }`)}return`@keyframes ${e}-orbit {
23070
23070
  ${c.join(`
23071
23071
  `)}
23072
- }`}function sd(e,t){return(e%t+t)%t}function Qx(e,t){return ps(e,t)/t}function ps(e,t){return sd(e,t)}function eb(e,t){return Math.floor(e/t)}function tb(e,t,n,i){return eb(e,t)*n+ps(e,t)*i}function nb(e,t,n){const i=n==="left"?1-e:e;return`${Fo(-i*t)}s`}function Hl(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ld(e){const t=e%1;return t<0?t+1:t}function ib(e,t,n){const i=t/Jc,o=n==="left"?-e*i:e*i;return ld(o)}function ob({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=C.useScopedStyles(),s=a.useRef(null),l=fa((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ix),d=fa(e==null?void 0:e.imageWidth,Ex),c=fa(e==null?void 0:e.turnHeight,Mx),u=_l(e==null?void 0:e.itemsPerTurn,Px,3,40),p=_l(e==null?void 0:e.turns,kx,1,30),v=Math.min(Wx,Math.max(0,Ax)),y=Math.min(1,Math.max(0,Fx)),g=Math.max(0,(e==null?void 0:e.speed)??Jc),h=(e==null?void 0:e.direction)==="left"?"left":"right",m=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,I=(e==null?void 0:e.blur)!=="off",R=a.useMemo(()=>zx(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),T=R.display==="cover",q=oe=>C.scalingValue(oe,n??!1),A=a.useMemo(()=>Gx(v),[v]),G=a.useMemo(()=>Ux(l,d,T,y),[l,d,T,y]),k=a.useMemo(()=>jx(o,Jx(o,q,l,G,v,A,T,I)),[o,l,G,v,A,T,I,n]),L=a.useMemo(()=>(t??[]).filter(oe=>{var $;return!!(($=oe.image)!=null&&$.url)}),[t]),D=c/u,x=d*Bx(R),W=Math.min(Lx,p*u),M=Rx*u,Y=W+M*2,U=Math.max(0,p-1)*c+(u-1)*D,V=g>0,z=m==="scroll"&&V,ie=m==="autoplay"&&V&&(n?!!i:!0),[S,E]=a.useState(0);a.useEffect(()=>{if(!z)return;const oe=s.current;if(!oe)return;const $=()=>{const P=oe.getBoundingClientRect(),te=window.innerHeight||document.documentElement.clientHeight,K=te+P.height;K<=0||E(Math.min(1,Math.max(0,(te-P.top)/K)))};$(),window.addEventListener("scroll",$,{passive:!0}),window.addEventListener("resize",$);const ae=new ResizeObserver($);return ae.observe(oe),()=>{window.removeEventListener("scroll",$),window.removeEventListener("resize",$),ae.disconnect()}},[z]);const O=z?ib(S,g,h):0,le=V&&m==="autoplay"?360/(g*Tx):0;return L.length===0?r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:q(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),r.jsx("div",{ref:s,className:`${o}-wrapper`,style:{width:q(l),height:q(U),marginInline:"auto"},children:Array.from({length:Y},(oe,$)=>{const ae=$-M,te=L[sd(ae,L.length)].image,K=ps(ae,u),xe=Qx(ae,u),Fe=z?ld(xe+O):xe,ge=tb(ae,u,c,D),ce=y===0?0:(Hl(K+7.3)-.5)*y*D,X=T?1:1+(Hl(K+3.1)-.5)*2*Qc*(.35+y),ee=Fe*Math.PI*2,{offset:Z,scale:Pe}=td(v,A,ee),$e=d*X,ke=Kx($e,Pe),ue=nd(l,G,Z),fe={"--helix-base-w":q($e),...T?{"--helix-base-h":q(x)}:{}},Se={top:q(ge+ce),transform:"translateY(-50%)",...fe,...ie?{animationDuration:`${Fo(le)}s`,animationDelay:nb(xe,le,h),animationDirection:h==="left"?"reverse":"normal"}:{left:Xx(q,ue,ke),width:q(ke),...T?{height:q(x*Pe)}:{},zIndex:id(Pe),opacity:rd(ee),filter:ad(ee,I)}},B=b>0?{borderRadius:q(b)}:{},se=T?{...B,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:B,ye=Vx(te)?r.jsx("video",{className:`${o}-media`,style:se,src:te.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:`${o}-media`,style:se,src:te.url,alt:te.name??"",loading:"lazy",decoding:"async"});return r.jsx("div",{className:ie?`${o}-item`:`${o}-item ${o}-item-static`,style:Se,children:T?r.jsx("div",{className:`${o}-cover`,style:B,children:ye}):ye},`${p}-${u}-${ae}`)})})]})}const rb=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23072
+ }`}function sd(e,t){return(e%t+t)%t}function Qx(e,t){return ps(e,t)/t}function ps(e,t){return sd(e,t)}function eb(e,t){return Math.floor(e/t)}function tb(e,t,n,i){return eb(e,t)*n+ps(e,t)*i}function nb(e,t,n){const i=n==="left"?1-e:e;return`${Fo(-i*t)}s`}function Hl(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ld(e){const t=e%1;return t<0?t+1:t}function ib(e,t,n){const i=t/Jc,o=n==="left"?-e*i:e*i;return ld(o)}function ob({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=C.useScopedStyles(),s=a.useRef(null),l=fa((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),Ix),d=fa(e==null?void 0:e.imageWidth,Ex),c=fa(e==null?void 0:e.turnHeight,Mx),u=_l(e==null?void 0:e.itemsPerTurn,Px,3,40),p=_l(e==null?void 0:e.turns,kx,1,30),v=Math.min(Wx,Math.max(0,Ax)),y=Math.min(1,Math.max(0,Fx)),g=Math.max(0,(e==null?void 0:e.speed)??Jc),h=(e==null?void 0:e.direction)==="left"?"left":"right",m=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,I=(e==null?void 0:e.blur)!=="off",R=a.useMemo(()=>zx(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),T=R.display==="cover",G=oe=>C.scalingValue(oe,n??!1),A=a.useMemo(()=>Gx(v),[v]),V=a.useMemo(()=>Ux(l,d,T,y),[l,d,T,y]),k=a.useMemo(()=>jx(o,Jx(o,G,l,V,v,A,T,I)),[o,l,V,v,A,T,I,n]),L=a.useMemo(()=>(t??[]).filter(oe=>{var $;return!!(($=oe.image)!=null&&$.url)}),[t]),D=c/u,x=d*Bx(R),W=Math.min(Lx,p*u),M=Rx*u,Y=W+M*2,U=Math.max(0,p-1)*c+(u-1)*D,B=g>0,j=m==="scroll"&&B,ie=m==="autoplay"&&B&&(n?!!i:!0),[S,E]=a.useState(0);a.useEffect(()=>{if(!j)return;const oe=s.current;if(!oe)return;const $=()=>{const P=oe.getBoundingClientRect(),te=window.innerHeight||document.documentElement.clientHeight,K=te+P.height;K<=0||E(Math.min(1,Math.max(0,(te-P.top)/K)))};$(),window.addEventListener("scroll",$,{passive:!0}),window.addEventListener("resize",$);const ae=new ResizeObserver($);return ae.observe(oe),()=>{window.removeEventListener("scroll",$),window.removeEventListener("resize",$),ae.disconnect()}},[j]);const O=j?ib(S,g,h):0,le=B&&m==="autoplay"?360/(g*Tx):0;return L.length===0?r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),r.jsx("div",{ref:s,className:`${o}-wrapper`,style:{width:G(l),height:G(U),marginInline:"auto"},children:Array.from({length:Y},(oe,$)=>{const ae=$-M,te=L[sd(ae,L.length)].image,K=ps(ae,u),xe=Qx(ae,u),Fe=j?ld(xe+O):xe,ge=tb(ae,u,c,D),ce=y===0?0:(Hl(K+7.3)-.5)*y*D,X=T?1:1+(Hl(K+3.1)-.5)*2*Qc*(.35+y),ee=Fe*Math.PI*2,{offset:Z,scale:Pe}=td(v,A,ee),$e=d*X,ke=Kx($e,Pe),ue=nd(l,V,Z),fe={"--helix-base-w":G($e),...T?{"--helix-base-h":G(x)}:{}},Se={top:G(ge+ce),transform:"translateY(-50%)",...fe,...ie?{animationDuration:`${Fo(le)}s`,animationDelay:nb(xe,le,h),animationDirection:h==="left"?"reverse":"normal"}:{left:Xx(G,ue,ke),width:G(ke),...T?{height:G(x*Pe)}:{},zIndex:id(Pe),opacity:rd(ee),filter:ad(ee,I)}},z=b>0?{borderRadius:G(b)}:{},se=T?{...z,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:z,ye=Vx(te)?r.jsx("video",{className:`${o}-media`,style:se,src:te.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:`${o}-media`,style:se,src:te.url,alt:te.name??"",loading:"lazy",decoding:"async"});return r.jsx("div",{className:ie?`${o}-item`:`${o}-item ${o}-item-static`,style:Se,children:T?r.jsx("div",{className:`${o}-cover`,style:z,children:ye}):ye},`${p}-${u}-${ae}`)})})]})}const rb=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23073
23073
  import { CommonComponentProps } from '../props';
23074
23074
  import { scalingValue } from '../utils/scalingValue';
23075
23075
  import { useScopedStyles } from '../utils/useScopedStyles';