@cntrl-site/components 1.0.69 → 1.0.70

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 +82 -50
  2. package/dist/index.mjs +4381 -4340
  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(),G(),R()}function b(){o(en,I),o(en,m),o(sn,R),s(document,xc+" keydown",function(A){h=A.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,yc,!!h)})}function I(A){var L=Xa.concat("style");Wn(u),Pn(l,p),Pn(y,v),Ln([y,g],L),Ln(l,A?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=k("."+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(A,L){c[L]=k("."+A)}),yo(c,{root:l,track:y,list:g,slides:u})}function G(){var A=l.id||ru(Po),L=n.role;l.id=A,y.id=y.id||A+"-track",g.id=g.id||A+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&L&&$t(l,kn,L),$t(l,bo,d.carousel),$t(g,kn,"presentation")}function k(A){var L=Vl(l,A);return L&&Su(L,"."+jr)===l?L:void 0}function V(A){return[A+"--"+n.type,A+"--"+n.direction,n.drag&&A+"--draggable",n.isNavigation&&A+"--nav",A===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),k;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]))),A()}function A(){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(){k=!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(){k||W()}function W(){if(!k){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(){k(function(W){W.destroy()}),Wn(p)}function h(){k(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 k(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 A(W,M,Y){k(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:k,filter:V,style:A,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"),k(!1)),xn(v,c("paddingRight"),k(!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 k(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=A(),co(ie,"height or heightRatio is missing."),ie="calc("+ie+" - "+k(!1)+" - "+k(!0)+")"),ie}function A(){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():A())}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,k){var V=k<I,A=m(G.slide,k);V?_a(A,R[0].slide):Eo(s.list,A),ir(c,A),l.register(A,k-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],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),A(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 A(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:A,translate:L,shift:x,cancel:W,toIndex:M,toPosition:Y,getPosition:F,getLimit:j,exceededLimit:S,reposition:k}}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,k,V,A;function L(){D(),o([sn,en,pr],D),o(br,x)}function D(){k=y(!0),V=n.perMove,A=n.perPage,T=ie();var P=Ri(R,0,g?T:k-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:A),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?-(k%A||A):k: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+k)%k||0:P}function ie(){for(var P=k-($()||h&&V?1:A);g&&P-- >0;)if(u(k-1,!0)!==u(P,!0)){P++;break}return Ri(P,0,k-1)}function S(P){return Ri($()?P:A*P,0,T)}function E(P){return $()?Un(P,T):ur((P>=T?k-1:P)/A)}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(){k(),o(sn,G)}function G(){V(),T()}function k(){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&&(A(),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 A(){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,">"),A),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",k()}),n.pauseOnFocus&&s(v,"focusin focusout",function(D){m=D.type==="focusin",k()}),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 k(){b||(h||m?G(!1):T())}function V(){y&&(Mn(y,fi,!b),$t(y,hn,n.i18n[b?"play":"pause"]))}function A(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],k)}function I(A,L,D,x,W){var M=c();if(G(),D&&(!y||!p())){var Y=t.Layout.sliderSize(),F=xa(A)*Y*ur(cn(A)/Y)||0;A=d.toPosition(t.Controller.toDest(A%Y))+F}var U=Gl(M,A,1);m=1,L=U?0:L||dr(cn(A-M)/ju,zu),h=x,g=Sr(L,R,qt(T,M,A,W),1),l(Lo),s(wr),g.start()}function R(){l(_i),h&&h(),s(vi)}function T(A,L,D,x){var W=c(),M=A+(L-A)*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 k(){g&&!g.isPaused()&&(G(),R())}function V(A){var L=n.easingFunc;return L?L(A):1-Math.pow(1-A,4)}return{mount:b,destroy:G,scroll:I,cancel:k}}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,k,V,A,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,A=c.is([Ki,Lo]),k=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(A){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)&&(A=E(X),En(X))}function B(X){c.is(nr)&&(c.set(_i),s(Ql)),A&&(S(X),En(X)),d(W,zr,U),d(W,Br,B),A=!1}function j(X){!x&&D&&En(X,!0)}function ie(X){k=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&&k||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 A}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),k=bn(T,rr);if(G!==T.src||k!==T.srcset){var V=n.classes.spinner,A=T.parentElement,L=Mo(A,"."+V)||ki("span",V,A);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],k=R[1];Pn(k.slide,$a),T.type!=="error"&&(hi(R[2]),vo(G,""),d(Ga,G,k),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+"--"+A()),$t(b,kn,"tablist"),$t(b,hn,M.select),$t(b,Ua,A()===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(k,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 k(x){y(">"+x,!0)}function V(x,W){var M=m.length,Y=Ya(W),F=A(),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 A(){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"),mt=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",ut={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 Xt(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=Xt(xr,"function"),qn=Xt(xr,"string"),Ro=Xt(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 Ct(e,t,n){go(t)?mi(t,function(i,o){Ct(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):Ct(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",Qt="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:Xt(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(Qt,I),o(Qt,m),o(sn,R),s(document,xc+" keydown",function(A){h=A.type==="keydown"},{capture:!0}),s(l,"focusin",function(){Mn(l,yc,!!h)})}function I(A){var L=Xa.concat("style");Wn(u),Pn(l,p),Pn(y,v),Ln([y,g],L),Ln(l,A?L:["style",bo])}function R(){Pn(l,p),Pn(y,v),p=V(jr),v=V(Cs),Tn(l,p),Tn(y,v),Ct(l,hn,n.label),Ct(l,qa,n.labelledby)}function T(){y=k("."+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(A,L){c[L]=k("."+A)}),yo(c,{root:l,track:y,list:g,slides:u})}function G(){var A=l.id||ru(Po),L=n.role;l.id=A,y.id=y.id||A+"-track",g.id=g.id||A+"-list",!bn(l,kn)&&l.tagName!=="SECTION"&&L&&Ct(l,kn,L),Ct(l,bo,d.carousel),Ct(g,kn,"presentation")}function k(A){var L=Vl(l,A);return L&&Su(L,"."+jr)===l?L:void 0}function V(A){return[A+"--"+n.type,A+"--"+n.direction,n.drag&&A+"--draggable",n.isNavigation&&A+"--nav",A===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),k;function V(){T||(i.id=u.id+"-slide"+Oa(t+1),Ct(i,kn,h?"tabpanel":"group"),Ct(i,bo,g.slide),Ct(i,hn,R||ba(g.slideLabel,[t+1,e.length]))),A()}function A(){d(i,"click",Xt(l,Da,ne)),d(i,"keydown",Xt(l,rc,ne)),s([Yi,ac,vi],W),s(za,D),y&&s(_n,x)}function L(){k=!0,o.destroy(),Pn(i,bu),Ln(i,Xa),Ct(i,"style",I),Ct(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(" ");Ct(i,hn,ba(g.slideX,(T?n:t)+1)),Ct(i,ko,S),Ct(i,kn,m?"button":""),m&&Ln(i,bo)}function x(){k||W()}function W(){if(!k){var S=e.index;M(),Y(),Mn(i,hc,t===S-1),Mn(i,fc,t===S+1)}}function M(){var S=X();S!==ys(i,fi)&&(Mn(i,fi,S),Ct(i,cc,v&&S||""),l(S?Ul:Xl,ne))}function Y(){var S=j(),E=!S&&(!X()||T);if(e.state.is([Ki,Lo])||Ct(i,dc,E||""),Ct(Ha(i,p.focusableNodes||""),Ai,E?-1:""),m&&Ct(i,Ai,E?-1:0),S!==ys(i,Sa)&&(Mn(i,Sa,S),l(S?Kl:Yl,ne)),!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 X(){var S=e.index;return S===t||p.cloneStatus&&S===n}function j(){if(e.is(Ao))return X();var S=mn(c.Elements.track),E=mn(i),O=b("left",!0),ae=b("right",!0);return ur(S[O])<=xo(E[O])&&ur(E[ae])<=xo(S[ae])}function B(S,E){var O=cn(S-t);return!T&&(p.rewind||e.is(Zi))&&(O=Un(O,e.length-O)),O<=E}var ne={index:t,slideIndex:n,slide:i,container:G,isClone:T,mount:V,destroy:L,update:W,style:F,isWithin:B};return ne}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(Qt,g),o(Qt,y)}function y(){c.forEach(function(W,M){m(W,M,-1)})}function g(){k(function(W){W.destroy()}),Wn(p)}function h(){k(function(W){W.update()})}function m(W,M,Y){var F=Tu(e,M,Y,W);F.mount(),p.push(F),p.sort(function(X,j){return X.index-j.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(X){return or(X.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,Xt(s,Hi))}}),s(Qt)}function G(W){hi(V(W).map(function(M){return M.slide})),s(Qt)}function k(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 A(W,M,Y){k(function(F){F.style(W,M,Y)})}function L(W,M){var Y=Ha(W,"img"),F=Y.length;F?Y.forEach(function(X){l(X,"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:k,filter:V,style:A,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(Xt(l,Hi))),o([sn,Qt],T),o(Hi,G)}function T(){m=n.direction===Lr,xn(p,"maxWidth",ii(n.width)),xn(v,c("paddingLeft"),k(!1)),xn(v,c("paddingRight"),k(!0)),G(!0)}function G(ne){var S=mn(p);(ne||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=B())&&(Mn(p,vc,I),l(au,I)))}function k(ne){var S=n.padding,E=c(ne?"right":"left");return S&&ii(S[E]||(go(S)?0:S))||"0px"}function V(){var ne="";return m&&(ne=A(),co(ne,"height or heightRatio is missing."),ne="calc("+ne+" - "+k(!1)+" - "+k(!0)+")"),ne}function A(){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():A())}function x(){var ne=ii(n.gap);return"calc((100%"+(ne&&" + "+ne)+")/"+(n.perPage||1)+(ne&&" - "+ne)+")"}function W(){return mn(y)[c("width")]}function M(ne,S){var E=g(ne||0);return E?mn(E.slide)[c("width")]+(S?0:X()):0}function Y(ne,S){var E=g(ne);if(E){var O=mn(E.slide)[c("right")],ae=mn(y)[c("left")];return cn(O-ae)+(S?0:X())}return 0}function F(ne){return Y(e.length-1)-Y(0)+M(0,ne)}function X(){var ne=g(0);return ne&&parseFloat(xn(ne.slide,c("marginRight")))||0}function j(ne){return parseFloat(xn(v,c("padding"+(ne?"Right":"Left"))))||0}function B(){return e.is(Ao)||F(!0)>W()}return{mount:R,resize:G,listSize:W,slideSize:M,sliderSize:F,totalSize:Y,getPadding:j,isOverflow:B}}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(Qt,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(Qt)}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,k){var V=k<I,A=m(G.slide,k);V?_a(A,R[0].slide):Eo(s.list,A),ir(c,A),l.register(A,k-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,Qt],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),A(e.index),t.Slides.update())}function V(E,O,ae,ie){E!==O&&ne(E>ae)&&(W(),L(x(F(),E>ae),!0)),l(Ki),s(_n,O,ae,E),T.start(O,function(){l(_i),s(Yi,O,ae,E),ie&&ie()})}function A(E){L(Y(E,!0))}function L(E,O){if(!e.is(Ao)){var ae=O?E:D(E);xn(I,"transform","translate"+h("X")+"("+ae+"px)"),E!==ae&&s(ac)}}function D(E){if(e.is(Zi)){var O=M(E),ae=O>t.Controller.getEnd(),ie=O<0;(ie||ae)&&(E=x(E,ae))}return E}function x(E,O){var ae=E-B(O),ie=y();return E-=m(ie*(xo(cn(ae)/ie)||1))*(O?1:-1),E}function W(){L(F(),!0),T.cancel()}function M(E){for(var O=t.Slides.get(),ae=0,ie=1/0,$=0;$<O.length;$++){var re=O[$].index,P=cn(Y(re,!0)-E);if(P<=ie)ie=P,ae=re;else break}return ae}function Y(E,O){var ae=m(p(E-1)-j(E));return O?X(ae):ae}function F(){var E=h("left");return mn(I)[E]-mn(R)[E]+m(u(!1))}function X(E){return n.trimSpace&&e.is(Ni)&&(E=Ri(E,0,m(y(!0)-v()))),E}function j(E){var O=n.focus;return O==="center"?(v()-c(E,!0))/2:+O*c(E)||0}function B(E){return Y(E?t.Controller.getEnd():0,!!n.trimSpace)}function ne(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 ae=E!==!0&&m(O)<m(B(!1)),ie=E!==!1&&m(O)>m(B(!0));return ae||ie}return{mount:G,move:V,jump:A,translate:L,shift:x,cancel:W,toIndex:M,toPosition:Y,getPosition:F,getLimit:B,exceededLimit:S,reposition:k}}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=Xt(F,!1),I=Xt(F,!0),R=n.start||0,T,G=R,k,V,A;function L(){D(),o([sn,Qt,pr],D),o(br,x)}function D(){k=y(!0),V=n.perMove,A=n.perPage,T=ne();var P=Ri(R,0,g?T:k-1);P!==R&&(R=P,l.reposition())}function x(){T!==ne()&&s(pr)}function W(P,te,K){if(!re()){var fe=Y(P),We=B(fe);We>-1&&(te||We!==R)&&(ae(We),l.move(fe,We,G,K))}}function M(P,te,K,fe){t.Scroll.scroll(P,te,K,function(){var We=B(l.toIndex(d()));ae(g?Un(We,T):We),fe&&fe()})}function Y(P){var te=R;if(qn(P)){var K=P.match(/([+\-<>])(\d+)?/)||[],fe=K[1],We=K[2];fe==="+"||fe==="-"?te=X(R+ +(""+fe+(+We||1)),R):fe===">"?te=We?S(+We):b(!0):fe==="<"&&(te=I(!0))}else te=h?P:Ri(P,0,T);return te}function F(P,te){var K=V||($()?1:A),fe=X(R+K*(P?-1:1),R,!(V||$()));return fe===-1&&m&&!Gl(d(),c(!P),1)?P?0:T:te?fe:B(fe)}function X(P,te,K){if(v()||$()){var fe=j(P);fe!==P&&(te=P,P=fe,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?-(k%A||A):k: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 j(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 B(P){return h?(P+k)%k||0:P}function ne(){for(var P=k-($()||h&&V?1:A);g&&P-- >0;)if(u(k-1,!0)!==u(P,!0)){P++;break}return Ri(P,0,k-1)}function S(P){return Ri($()?P:A*P,0,T)}function E(P){return $()?Un(P,T):ur((P>=T?k-1:P)/A)}function O(P){var te=l.toIndex(P);return m?Ri(te,0,T):te}function ae(P){P!==R&&(G=R,R=P)}function ie(P){return P?G:R}function $(){return!Ro(n.focus)||n.isNavigation}function re(){return e.state.is([Ki,Lo])&&!!n.waitForTransition}return{mount:L,go:W,scroll:M,getNext:b,getPrev:I,getAdjacent:F,getEnd:ne,setIndex:ae,getIndex:ie,toIndex:S,toPage:E,toDest:O,hasFocus:$,isBusy:re}}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(){k(),o(sn,G)}function G(){V(),T()}function k(){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&&(A(),W(),Ct([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 A(){o([Jn,Yi,Qt,vi,pr],W),s(m,"click",Xt(L,">")),s(h,"click",Xt(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(),X=Y>-1&&M<Y?c.last:c.prev,j=F>-1&&M>F?c.first:c.next;h.disabled=Y<0,m.disabled=F<0,Ct(h,hn,X),Ct(m,hn,j),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,">"),A),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&&Ct(y,ko,u.track.id),b||T(),V())}function R(){n.pauseOnHover&&s(v,"mouseenter mouseleave",function(D){h=D.type==="mouseenter",k()}),n.pauseOnFocus&&s(v,"focusin focusout",function(D){m=D.type==="focusin",k()}),y&&s(y,"click",function(){b?T():G(!0)}),o([_n,wr,Qt],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 k(){b||(h||m?G(!1):T())}function V(){y&&(Mn(y,fi,!b),Ct(y,hn,n.i18n[b?"play":"pause"]))}function A(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,Xt(d,!0)),o([Jn,sn,Qt],Xt(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:Xt(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,Qt],k)}function I(A,L,D,x,W){var M=c();if(G(),D&&(!y||!p())){var Y=t.Layout.sliderSize(),F=xa(A)*Y*ur(cn(A)/Y)||0;A=d.toPosition(t.Controller.toDest(A%Y))+F}var X=Gl(M,A,1);m=1,L=X?0:L||dr(cn(A-M)/ju,zu),h=x,g=Sr(L,R,Xt(T,M,A,W),1),l(Lo),s(wr),g.start()}function R(){l(_i),h&&h(),s(vi)}function T(A,L,D,x){var W=c(),M=A+(L-A)*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 k(){g&&!g.isPaused()&&(G(),R())}function V(A){var L=n.easingFunc;return L?L(A):1-Math.pow(1-A,4)}return{mount:b,destroy:G,scroll:I,cancel:k}}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,k,V,A,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",B,{capture:!0}),l(y,"dragstart",En),o([Jn,sn],Y)}function Y(){var U=n.drag;ce(!U),V=U==="free"}function F(U){if(D=!1,!x){var Q=We(U);fe(U.target)&&(Q||!U.button)&&(v.isBusy()?En(U,!0):(W=Q?y:window,A=c.is([Ki,Lo]),k=null,l(W,zr,X,Ii),l(W,Br,j,Ii),u.cancel(),p.cancel(),ne(U)))}}function X(U){if(c.is(nr)||(c.set(nr),s(Zl)),U.cancelable)if(A){u.translate(T+K($(U)));var Q=re(U)>Ts,Z=L!==(L=R());(Q||Z)&&ne(U),D=!0,s(Jl),En(U)}else O(U)&&(A=E(U),En(U))}function j(U){c.is(nr)&&(c.set(_i),s(Ql)),A&&(S(U),En(U)),d(W,zr,X),d(W,Br,j),A=!1}function B(U){!x&&D&&En(U,!0)}function ne(U){k=G,G=U,T=I()}function S(U){var Q=ae(U),Z=ie(Q),ke=n.rewind&&n.rewindByDrag;g(!1),V?v.scroll(Z,0,n.snap):e.is(Ao)?v.go(b(xa(Q))<0?ke?"<":"-":ke?">":"+"):e.is(Ni)&&L&&ke?v.go(R(!0)?">":"<"):v.go(v.toDest(Z),!0),g(!0)}function E(U){var Q=n.dragMinThreshold,Z=go(Q),ke=Z&&Q.mouse||0,we=(Z?Q.touch:+Q)||10;return cn($(U))>(We(U)?we:ke)}function O(U){return cn($(U))>cn($(U,!0))}function ae(U){if(e.is(Zi)||!L){var Q=re(U);if(Q&&Q<Ts)return $(U)/Q}return 0}function ie(U){return I()+xa(U)*Un(cn(U)*(n.flickPower||600),V?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function $(U,Q){return te(U,Q)-te(P(U),Q)}function re(U){return va(U)-va(P(U))}function P(U){return G===U&&k||G}function te(U,Q){return(We(U)?U.changedTouches[0]:U)["page"+m(Q?"Y":"X")]}function K(U){return U/(L&&e.is(Ni)?$u:1)}function fe(U){var Q=n.noDrag;return!ho(U,"."+gc+", ."+Ir)&&(!Q||!ho(U,Q))}function We(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function me(){return A}function ce(U){x=U}return{mount:M,disable:ce,isDragging:me}}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(Qt,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),k=bn(T,rr);if(G!==T.src||k!==T.srcset){var V=n.classes.spinner,A=T.parentElement,L=Mo(A,"."+V)||ki("span",V,A);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",Xt(b,R)),Ct(T,"src",bn(T,uo)),Ct(T,"srcset",bn(T,rr)),Ln(T,uo),Ln(T,rr)}function b(R,T){var G=R[0],k=R[1];Pn(k.slide,$a),T.type!=="error"&&(hi(R[2]),vo(G,""),d(Ga,G,k),d(Hi)),c&&I()}function I(){p.length&&m(p.shift())}return{mount:v,destroy:Xt(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,Qt,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+"--"+A()),Ct(b,kn,"tablist"),Ct(b,hn,M.select),Ct(b,Ua,A()===Lr?"vertical":"");for(var X=0;X<F;X++){var j=ki("li",null,b),B=ki("button",{class:W.page,type:"button"},j),ne=d.getIn(X).map(function(E){return E.slide.id}),S=!p()&&Y>1?M.pageX:M.slideX;l(B,"click",Xt(k,X)),n.paginationKeyboard&&l(B,"keydown",Xt(V,X)),Ct(j,kn,"presentation"),Ct(B,kn,"tab"),Ct(B,ko,ne.join(" ")),Ct(B,hn,ba(S,X+1)),Ct(B,Ai,-1),m.push({li:j,button:B,page:X})}}function k(x){y(">"+x,!0)}function V(x,W){var M=m.length,Y=Ya(W),F=A(),X=-1;Y===g(Tr,!1,F)?X=++x%M:Y===g(Cr,!1,F)?X=(--x+M)%M:Y==="Home"?X=0:Y==="End"&&(X=M-1);var j=m[X];j&&(zl(j.button),y(">"+X),En(W,!0))}function A(){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),Ct(M,Ai,-1)}if(W){var Y=W.button;Tn(Y,fi),Ct(Y,bs,!0),Ct(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(){Ct(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:Xt(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,Xt(p,!1));function u(){l&&(y(!t.Autoplay.isPaused()),Ct(s,$s,!0),d.textContent="…",o(Ba,Xt(y,!0)),o(Va,Xt(y,!1)),o([Yi,vi],Xt(p,!0)))}function p(g){Ct(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&&Ct(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,Qt],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=Xt(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(Qt),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"],[Qt,"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),[G,k]=a.useState(0),{direction:V,transition:A,controls:L,pagination:D,imageCaption:x,triggers:W}=e,M=a.useRef(A.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===A.type||(k(B=>B+1),M.current=A.type)},[A.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:A.backgroundColor&&A.type==="fade in"?A.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:A.duration?`${Math.round(parseInt(A.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:A.duration?parseInt(A.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:V==="horiz"||A.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:A.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:k}=e.imageSize,{revealPosition:V,visible:A}=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,k);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,k,V,i]),a.useEffect(()=>{A==="last One"&&l(B=>B.length>0?[B[B.length-1]]:[])},[A]);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($=>A==="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,k]=a.useState(!1),[V,A]=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=""),k(!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()),k(!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,k(!1),A(!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),A(!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",A(!1);const ve=Te=>{Te.target===F.current&&!Y.current&&Te.animationName&&(se&&!l&&ye>.9&&(document.body.style.backgroundColor=te.color),A(!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),A(!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`
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 Kt(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:mt(Is.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:mt(Is.svg,i),style:{"--svg":yp(e),"--fill":t,"--hover-fill":n,...o??{}}})},vp={"top-left":ut.topLeftAlignment,"top-center":ut.topCenterAlignment,"top-right":ut.topRightAlignment,"middle-left":ut.middleLeftAlignment,"middle-center":ut.middleCenterAlignment,"middle-right":ut.middleRightAlignment,"bottom-left":ut.bottomLeftAlignment,"bottom-center":ut.bottomCenterAlignment,"bottom-right":ut.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,k]=a.useState(0),{direction:V,transition:A,controls:L,pagination:D,imageCaption:x,triggers:W}=e,M=a.useRef(A.type),{x:Y,y:F}=e.controls.offset,X=j=>{o&&o.go(j)};return a.useEffect(()=>{if(!b)return;const j=new ResizeObserver(B=>{if(!o)return;const[ne]=B;m({width:Math.round(ne.contentRect.width),height:Math.round(ne.contentRect.height)})});return j.observe(b),()=>j.unobserve(b)},[b]),a.useEffect(()=>{!o||M.current===A.type||(k(j=>j+1),M.current=A.type)},[A.type]),r.jsx("div",{className:mt(ut.wrapper,{[ut.editor]:i}),ref:I,children:r.jsxs("div",{className:ut.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:A.backgroundColor&&A.type==="fade in"?A.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:mt(ut.captionBlock),children:r.jsx("div",{className:ut.captionTextWrapper,children:t.map((j,B)=>r.jsx("div",{className:mt(ut.captionText,vp[x.alignment],{[ut.withPointerEvents]:B===R&&i,[ut.active]:B===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:A.duration?`${Math.round(parseInt(A.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:ut.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:j.imageCaption})})},B))})}),r.jsx(Qa,{onMove:j=>{T(j.index)},ref:s,options:{arrows:!1,speed:A.duration?parseInt(A.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:V==="horiz"||A.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:A.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,B)=>r.jsx(es,{children:r.jsx("div",{className:ut.sliderItem,children:r.jsx("div",{className:ut.imgWrapper,children:r.jsx("img",{className:mt(ut.sliderImage,{[ut.contain]:j.image.objectFit==="contain",[ut.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},B))},G),L.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(ut.arrow,{[ut.arrowVertical]:V==="vert",[ut.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{onClick:()=>{X("-1")},className:ut.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:mt(ut.arrowImg,ut.mirror)}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:mt(ut.arrowIcon,ut.arrowImg,ut.mirror)})]})}),r.jsx("div",{className:mt(ut.arrow,ut.nextArrow,{[ut.arrowVertical]:V==="vert",[ut.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:r.jsxs("button",{className:ut.arrowInner,onClick:()=>X("+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:ut.arrowImg}),!L.arrowsImgUrl&&r.jsx(Es,{color:L.color,className:mt(ut.arrowIcon,ut.arrowImg)})]})})]}),W.triggersList.click&&r.jsx("div",{className:ut.clickOverlay,onClick:()=>{o&&o.go("+1")}}),D.isActive&&r.jsx("div",{className:mt(ut.pagination,{[ut.paginationInsideBottom]:D.position==="inside-1"&&V==="horiz",[ut.paginationInsideTop]:D.position==="inside-2"&&V==="horiz",[ut.paginationOutsideBottom]:D.position==="outside-1"&&V==="horiz",[ut.paginationOutsideTop]:D.position==="outside-2"&&V==="horiz",[ut.paginationInsideLeft]:D.position==="inside-1"&&V==="vert",[ut.paginationInsideRight]:D.position==="inside-2"&&V==="vert",[ut.paginationOutsideLeft]:D.position==="outside-1"&&V==="vert",[ut.paginationOutsideRight]:D.position==="outside-2"&&V==="vert",[ut.paginationVertical]:V==="vert"}),children:r.jsx("div",{className:ut.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((j,B)=>r.jsx("button",{onClick:()=>{o&&o.go(B)},className:mt(ut.paginationItem),children:r.jsx("div",{className:mt(ut.dot,{[ut.activeDot]:B===R}),style:{backgroundColor:B===R?D.colors[0]:D.colors[1],"--pagination-hover-color":D.hover}})},B))})})]})})}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:k}=e.imageSize,{revealPosition:V,visible:A}=e.position,{cursorType:L,target:D,defaultCursorScale:x,defaultCursor:W,hoverCursorScale:M,hoverCursor:Y}=e.cursor;a.useEffect(()=>{if(!i)return;const j=(S,E)=>{const O=i.getBoundingClientRect(),ae=S-O.left,ie=E-O.top;if(v({x:ae,y:ie}),L==="system"){m("none"),g(1);return}const $=ae,re=ie,P=document.elementFromPoint(O.left+$,O.top+re);if(P&&P.closest("a")){m("none"),g(1);return}const te=Ms($,re,s)||D==="area"?{img:Y??"none",scale:M}:{img:W??"none",scale:x};m(te.img),g(te.scale)},B=S=>{S.stopPropagation(),b.current={x:S.clientX,y:S.clientY},j(S.clientX,S.clientY)},ne=()=>{I&&j(b.current.x,b.current.y)};return i.addEventListener("mousemove",B),window.addEventListener("scroll",ne,!0),()=>{i.removeEventListener("mousemove",B),window.removeEventListener("scroll",ne,!0)}},[i,I,p,L,D,Y,W,M,x,s]),a.useEffect(()=>{I||(m("none"),g(0))},[I]);const F=async(j,B,ne,S={})=>{const{width:E,height:O,finalWidth:ae}=await Tp(j.image.url,T,G,k);let ie=0,$=0;V==="same"?(ie=B/2,$=ne/2):(ie=S.x??Math.random()*B,$=S.y??Math.random()*ne);const re=Math.min(Math.max(ie,E/2),B-E/2),P=Math.min(Math.max($,O/2),ne-O/2);return{id:u.current++,url:j.image.url,link:j.link,name:j.image.name,x:re,y:P,width:ae}};a.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),B=j.width,ne=j.height,S=[];(async()=>{const O=t[0],ae=await F(O,B,ne);S.push(ae),l(S),c(1)})()},[T,G,k,V,i]),a.useEffect(()=>{A==="last One"&&l(j=>j.length>0?[j[j.length-1]]:[])},[A]);const X=async j=>{if(!i)return;const B=i.getBoundingClientRect(),ne=j.clientX-B.left,S=j.clientY-B.top;if(D==="image"&&!Ms(ne,S,s))return;let E=0,O=0;V==="on Click"?(E=ne,O=S):V==="same"?(E=B.width/2,O=B.height/2):(E=Math.random()*B.width,O=Math.random()*B.height);const ae=t[d],ie=await F(ae,B.width,B.height,{x:E,y:O});l($=>A==="all"?[...$,ie]:[ie]),c($=>$>=t.length-1?0:$+1)};return r.jsxs("div",{ref:o,onClick:X,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),className:wi.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:wi.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:D==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:wi.link,children:r.jsx("img",{src:j.url,alt:j.name,className:wi.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:wi.image},j.id)},j.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 be;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,k]=a.useState(!1),[V,A]=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),X=a.useRef(null),j=a.useRef(null),B=a.useRef(null),ne=a.useRef(!1),S=a.useRef(null),[E,O]=a.useState(!1),{appear:ae,triggers:ie,slider:$,thumbnail:re,controls:P,area:te,caption:K,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:me,backdropDisappearClass:ce,disappearClass:U}=fm(ae.type,ae.direction),Q=(d==null?void 0:d.itemId)??null;a.useEffect(()=>{const z=()=>{setTimeout(()=>{var he,ye;(ye=(he=x.current)==null?void 0:he.splide)==null||ye.refresh()},16)},se=()=>{T(he=>he+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||!re.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 he=new ResizeObserver(se);return he.observe(z),()=>he.disconnect()},[e,re.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=""),k(!0),Y.current=!0;const he=ye=>{ye.target===F.current&&ye.animationName&&(F.current&&X.current&&F.current.removeEventListener("animationend",X.current),X.current=null,Y.current&&(Y.current=!1,t()),k(!1))};F.current&&(X.current=he,F.current.addEventListener("animationend",he))},[t,te.color,l]),ke=(z,se,he)=>{var ye,Me;if(z){if(ie.type==="click"&&ie.switch==="image")ie.repeat==="close"&&b===n.length-1?Z():(ye=x.current)==null||ye.go("+1");else if(ie.type==="click"&&ie.switch==="50/50"){const Le=z.getBoundingClientRect(),_=se-Le.left,pe=he-Le.top,oe=Le.width,H=Le.height;let ee;$.direction==="horiz"?ee=_<oe/2?"-1":"+1":ee=pe<H/2?"-1":"+1",(Me=x.current)==null||Me.go(ee)}}},we=z=>{if(ne.current){ne.current=!1;return}const se=n[b],he=(se==null?void 0:se.image.objectFit)==="cover";let ye,Me;if("changedTouches"in z&&z.changedTouches.length>0)ye=z.changedTouches[0].clientX,Me=z.changedTouches[0].clientY;else if("clientX"in z)ye=z.clientX,Me=z.clientY;else return;let Le;if(he&&M.current){const _=Ps(M.current);Le=ye>=_.left&&ye<=_.right&&Me>=_.top&&Me<=_.bottom}else{const _=M.current?gr(M.current):null;if(!_){z.target===z.currentTarget&&Z();return}Le=ye>=_.x&&ye<=_.x+_.width&&Me>=_.y&&Me<=_.y+_.height}Le?ke(M.current,ye,Me):Z()},Pe=z=>{const se=z.target;(se.classList.contains(Xe.thumbsWrapper)||se.classList.contains(Xe.thumbsContainer))&&we(z)};a.useEffect(()=>{if(!e)return;const z=se=>{var he,ye;if(se.key==="Escape"){Z();return}if(se.key==="ArrowRight"){I(Me=>(Me+1)%Math.max(n.length,1)),(he=x.current)==null||he.go("+1");return}se.key==="ArrowLeft"&&(I(Me=>(Me-1+Math.max(n.length,1))%Math.max(n.length,1)),(ye=x.current)==null||ye.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,k(!1),A(!1),D({}),!Q)return;const z=new CustomEvent("page-overlay",{detail:{itemId:Q}});window.dispatchEvent(z)}return()=>{F.current&&X.current&&(F.current.removeEventListener("animationend",X.current),X.current=null),A(!1)}},[e,Q]),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,he=ks(te.color);document.body.style.overflow="hidden",A(!1);const ye=Le=>{Le.target===F.current&&!Y.current&&Le.animationName&&(se&&!l&&he>.9&&(document.body.style.backgroundColor=te.color),A(!0),F.current&&j.current&&F.current.removeEventListener("animationend",j.current),j.current=null)};F.current&&(j.current=ye,F.current.addEventListener("animationend",ye));const Me=Le=>{const _=Le.target;_&&(_.closest(`.${Xe.thumbsWrapper}`)||_.closest(`.${Xe.thumbsContainer}`))||$.type!=="slide"&&Le.preventDefault()};return document.addEventListener("touchmove",Me,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",Me),F.current&&j.current&&(F.current.removeEventListener("animationend",j.current),j.current=null),A(!1)}},[e,l,te.color,$.type]),a.useEffect(()=>{if(!e)return;const z=se=>{var ye,Me;if(Y.current){se.stopPropagation();return}if(ne.current){ne.current=!1;return}const he=se.target;if(!(he&&(he.closest(`.${Xe.thumbsContainer}`)||he.closest(`.${Xe.thumbItem}`)||he.closest(`.${Xe.arrow}`)||he.closest(`.${Xe.closeButton}`)||he.closest(`.${Xe.caption}`)))){if($.type==="slide"&&ie.type==="drag"&&((Me=(ye=x.current)==null?void 0:ye.splide)!=null&&Me.root)){const Le=x.current.splide.root;if(he&&(Le.contains(he)||Le===he))return}if(se.touches.length===0&&se.changedTouches.length>0){const Le=n[b],_=(Le==null?void 0:Le.image.objectFit)==="cover",pe=se.changedTouches[0];let oe;if(_&&M.current){const H=Ps(M.current);oe=pe.clientX>=H.left&&pe.clientX<=H.right&&pe.clientY>=H.top&&pe.clientY<=H.bottom}else{const H=M.current?gr(M.current):null;if(!H)return;oe=pe.clientX>=H.x&&pe.clientX<=H.x+H.width&&pe.clientY>=H.y&&pe.clientY<=H.y+H.height}if(!oe){se.stopPropagation(),Y.current=!0;const H=ee=>{ee.stopPropagation(),ee.preventDefault(),document.removeEventListener("click",H,!0)};document.addEventListener("click",H,!0),Z()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,Z,b,n]);const de=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&ie.type==="drag";a.useEffect(()=>{var ee,Fe;if(!e||!de||!((Fe=(ee=x.current)==null?void 0:ee.splide)!=null&&Fe.root))return;const z=x.current.splide.root,se=30,he=(le,N)=>{if(B.current){const Ue=Math.abs(le-B.current.x),je=Math.abs(N-B.current.y);(Ue>0||je>0)&&(ne.current=!0)}},ye=le=>{B.current&&(le.preventDefault(),he(le.clientX,le.clientY))},Me=le=>{B.current&&le.touches.length>0&&(le.preventDefault(),he(le.touches[0].clientX,le.touches[0].clientY))},Le=(le,N)=>{if(!B.current||!x.current){B.current=null;return}const Ue=Math.abs(le-B.current.x),je=Math.abs(N-B.current.y);je>se&&je>Ue&&x.current.go(N<B.current.y?"+1":"-1"),B.current=null},_=le=>{B.current&&Le(le.clientX,le.clientY),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("pointermove",ye)},pe=le=>{if(B.current){if(le.changedTouches.length>0){const N=le.changedTouches[0];Le(N.clientX,N.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",Me)}},oe=le=>{B.current={x:le.clientX,y:le.clientY},ne.current=!1,document.addEventListener("pointermove",ye,{passive:!1}),document.addEventListener("pointerup",_),document.addEventListener("pointercancel",_)},H=le=>{le.touches.length>0&&(B.current={x:le.touches[0].clientX,y:le.touches[0].clientY},ne.current=!1,document.addEventListener("touchmove",Me,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return z.addEventListener("pointerdown",oe),z.addEventListener("touchstart",H),()=>{z.removeEventListener("pointerdown",oe),z.removeEventListener("touchstart",H),document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",_),document.removeEventListener("pointercancel",_),document.removeEventListener("touchmove",Me),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),B.current=null,ne.current=!1}},[e,de,R]);const ge={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(ae.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:mt(Xe.background,G?ce:me,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{...ge,...V&&!l&&!G?{position:"absolute"}:{}}}),r.jsxs("div",{ref:l?F:null,className:mt(Xe.contentStyle,G?U:We,{[Xe.editor]:l},{[Xe.hidden]:!e}),style:{animationDuration:`${parseInt(ae.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:ie.type==="drag"&&!de,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:ie.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((z,se)=>{const he=jo(fe.position,fe.offset,l),ye=`${C.scalingValue(fe.padding.top,l)} ${C.scalingValue(fe.padding.right,l)} ${C.scalingValue(fe.padding.bottom,l)} ${C.scalingValue(fe.padding.left,l)}`,Me=$.type==="scale"?(()=>{const{transform:Le,..._}=he;return{..._,position:"absolute",padding:ye,boxSizing:"border-box","--position-transform":Le||"none"}})():{...he,position:"absolute",padding:ye,boxSizing:"border-box"};return r.jsx(es,{children:r.jsx("div",{className:Xe.imgWrapper,onClick:we,children:r.jsx("img",{ref:se===b?M:null,className:mt(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:mt(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:mt(Xe.arrowImg,Xe.mirror)}),!P.arrowsImgUrl&&r.jsx(As,{color:P.color,className:mt(Xe.arrowIcon,Xe.arrowImg,Xe.mirror)})]})}),r.jsx("div",{className:mt(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:mt(Xe.arrowIcon,Xe.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const z=jo(te.closeIconAlign,te.closeIconOffset,l),se=`scale(${te.closeIconScale})`,he=z.transform?`${z.transform} ${se}`:se;return r.jsx("button",{className:Xe.closeButton,style:{...z,transform:he},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&&((be=n[b])==null?void 0:be.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})})}),re.isActive&&(()=>{const[z,se]=re.position.split("-"),he=$.direction==="horiz"?`${z}-left`:re.position,ye=jo(he,re.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:Le=>Pe(Le),style:{position:l?"absolute":"fixed",...ye,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:mt(Xe.thumbsContainer,{[Xe.thumbsContainerVertical]:$.direction==="vert",[Xe.thumbsAlignStart]:re.align==="start",[Xe.thumbsAlignCenter]:re.align==="center",[Xe.thumbsAlignEnd]:re.align==="end"}),style:{gap:C.scalingValue(re.grid.gap,l),justifyContent:E?"flex-start":Me()},children:n.map((Le,_)=>{const pe=_===b,oe=L[_],ee=re.grid.size*(pe?re.activeState.scale:1),Fe=()=>{if(re.fit!=="fit")return{};if(!oe)return $.direction==="horiz"?{height:C.scalingValue(ee,l)}:{width:C.scalingValue(ee,l)};const le=oe.width/oe.height;if($.direction==="horiz"){const N=ee,Ue=N*le;return{width:C.scalingValue(Ue,l),height:C.scalingValue(N,l)}}else{const N=ee,Ue=N/le;return{width:C.scalingValue(N,l),height:C.scalingValue(Ue,l)}}};return r.jsx("button",{className:Xe.thumbItem,style:{...$.direction==="horiz"&&re.fit!=="fit"?{height:C.scalingValue(ee,l)}:{},...$.direction==="vert"&&re.fit!=="fit"?{width:C.scalingValue(ee,l)}:{},...re.fit==="cover"?{width:C.scalingValue(ee,l),height:C.scalingValue(ee,l)}:{},...Fe(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?re.activeState.opacity/100:re.opacity/100,"--thumb-hover":re.activeState.opacity/100},onClick:le=>{var N;le.stopPropagation(),I(_),(N=x.current)==null||N.go(_)},onMouseEnter:()=>{var le;re.triggers==="hov"&&((le=x.current)==null||le.go(_))},children:r.jsx("img",{src:Le.image.url,alt:Le.image.name??"",onLoad:le=>{const N=le.currentTarget;N.naturalWidth&&N.naturalHeight&&D(Ue=>({...Ue,[_]:{width:N.naturalWidth,height:N.naturalHeight}}))},style:{objectFit:re.fit==="cover"?"cover":"contain",...re.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...re.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Le.image.name}-${_}`)})})})})()]})]}),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:G,inputPadding:k,inputColor:V,inputTextColor:A,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:A},Te=rn(Xt(Me,t)),H=C.scalingValue(G??0,t),he=C.scalingValue((S??ie??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.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((k==null?void 0:k.top)??0,t),paddingRight:C.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:C.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:C.scalingValue((k==null?void 0:k.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:A,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';
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:k,inputColor:V,inputTextColor:A,inputBorderColor:L,placeholderColor:D,buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:X,fontFamily:j,inputFontSettings:B,inputFontSize:ne,inputLineHeight:S,inputLetterSpacing:E,inputWordSpacing:O,inputTextAppearance:ae,buttonFontSettings:ie,buttonFontSize:$,buttonLineHeight:re,buttonLetterSpacing:P,buttonWordSpacing:te,buttonTextAppearance:K,labelFontSettings:fe,labelFontSize:We,labelLineHeight:me,labelLetterSpacing:ce,labelWordSpacing:U,labelTextAppearance:Q,statusFontSettings:Z,statusFontSize:ke,statusLineHeight:we,statusLetterSpacing:Pe,statusWordSpacing:de,statusTextAppearance:ge,successMessage:be,errorMessage:z,stateOverrides:se}=e,he=u==="B",ye=v.slice(0,Math.min(p,v.length)),Me={fontSettings:{fontFamily:j,fontWeight:(B==null?void 0:B.fontWeight)??400,fontStyle:(B==null?void 0:B.fontStyle)??"normal"},fontSize:ne??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:O??0,textAppearance:ae,color:A},Le=rn(Kt(Me,t)),_=C.scalingValue(G??0,t),pe=C.scalingValue((S??ne??.01)+((k==null?void 0:k.top)??0)+((k==null?void 0:k.bottom)??0)+(u==="C"?G??0:(G??0)*2),t),oe={...Le,borderStyle:"solid",borderRadius:u==="C"?0:C.scalingValue(T??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:_,borderLeftWidth:0}:{borderWidth:_},paddingTop:C.scalingValue((k==null?void 0:k.top)??0,t),paddingRight:C.scalingValue((k==null?void 0:k.right)??0,t),paddingBottom:C.scalingValue((k==null?void 0:k.bottom)??0,t),paddingLeft:C.scalingValue((k==null?void 0:k.left)??0,t),height:pe,minHeight:pe},H={fontSettings:{fontFamily:j,fontWeight:(ie==null?void 0:ie.fontWeight)??400,fontStyle:(ie==null?void 0:ie.fontStyle)??"normal"},fontSize:$??.01,lineHeight:re,letterSpacing:P??0,wordSpacing:te??0,textAppearance:K,color:W},ee=rn(Kt(H,t)),Fe=C.scalingValue(b??0,t),le={fontSettings:{fontFamily:j,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:We??.01,lineHeight:me,letterSpacing:ce??0,wordSpacing:U??0,textAppearance:Q,color:Y},N=Kt(le,t),Ue={fontSettings:{fontFamily:j,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:ke??.01,lineHeight:we,letterSpacing:Pe??0,wordSpacing:de??0,textAppearance:ge,color:F},je=rn(Kt(Ue,t)),gt=C.buildColorVars(c,{inputColor:V,inputTextColor:A,inputBorderColor:L,placeholderColor:D!=null&&D.trim()?D:"#cccccc",buttonColor:x,buttonTextColor:W,buttonBorderColor:M,labelTextColor:Y,successColor:F,errorColor:X},Sm,$m,se),[rt,ht]=a.useState(()=>Object.fromEntries(ye.map(Ie=>[Ie.name,""]))),[lt,Ge]=a.useState("idle"),[ve,_e]=a.useState(null),ze=s==="success"?"success":s==="error"?"error":lt,Ke=s==="error"?z:ve,Se=s==="filled",De=a.useMemo(()=>{if(!Se)return rt;let Ie=null;for(const qe of ye)(rt[qe.name]??"").trim().length>0||(Ie=Ie??{...rt},Ie[qe.name]="Filled");return Ie??rt},[rt,Se,ye]),Ve=ze==="error"?C.getFormFieldValidationError(ye,De):null,Ae=`${s&&s!=="default"?`${c}-state-${s}`:""}`.trim(),$e=o==null?void 0:o.submitUrl,tt=(Ie,qe)=>{ht(Ee=>({...Ee,[Ie]:qe}))},Ze=async Ie=>{if(Ie.preventDefault(),!d)return;const qe=Object.fromEntries(ye.map(Je=>{var Qe;return[Je.name,((Qe=rt[Je.name])==null?void 0:Qe.trim())??""]}).filter(([,Je])=>Je));if(!$e){Ge("error"),_e("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Ee=C.getFormFieldValidationError(ye,rt);if(Ee){Ge("error"),_e(Ee);return}Ge("submitting"),_e(null);try{const Je=await fetch($e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!Je.ok){const Qe=await Je.text();throw new Error(Qe||`Request failed: ${Je.status}`)}Ge("success"),ht(Object.fromEntries(ye.map(Qe=>[Qe.name,""])))}catch(Je){Ge("error"),_e(Je instanceof Error?Je.message:"Something went wrong")}};return r.jsxs("div",{className:`${c}-wrapper ${c}-type-${u} ${Ae}`.trim(),style:gt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:bm(c)}}),r.jsxs("form",{onSubmit:Ze,className:`${c}-form`,children:[r.jsx("div",{className:`${c}-fields`,children:ye.map((Ie,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${he?` ${c}-labeled`:""}`,children:[he&&r.jsx("span",{className:`${c}-field-label`,style:N?{...N,lineHeight:N.fontSize}:void 0,children:Ie.label||Ie.name}),Ie.type==="textarea"?r.jsx("textarea",{name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ee=>tt(Ie.name,Ee.target.value),placeholder:Ie.placeholder,className:`${c}-input`,style:oe,rows:1,"data-filled":Se||(De[Ie.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Ie.type==="phone"?"tel":Ie.type==="email"?"email":"text",name:Ie.name,autoComplete:"off",value:De[Ie.name]??"",onChange:Ee=>tt(Ie.name,Ee.target.value),placeholder:Ie.placeholder,required:Ie.isRequired??Ie.type==="email",className:`${c}-input`,style:oe,"data-filled":Se||(De[Ie.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:Fe,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,...ee,...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:lt==="submitting"?"...":y})})})]}),ze==="success"&&r.jsx("p",{className:`${c}-success`,style:{...je},children:be}),ze==="error"&&r.jsx("p",{className:`${c}-error`,style:{...je},role:"alert",children:Ve??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:G,buttonLetterSpacing:k,buttonWordSpacing:V,buttonTextAppearance:A,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:k??0,wordSpacing:V??0,textAppearance:A,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';
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:k,buttonWordSpacing:V,buttonTextAppearance:A,statusFontSettings:L,statusFontSize:D,statusLineHeight:x,statusLetterSpacing:W,statusWordSpacing:M,statusTextAppearance:Y,iconMaxWidth:F,minHeight:X,corners:j,stroke:B,stateOverrides:ne,inputPadding:S,buttonPadding:E,successMessage:O="Thanks for subscribing!",errorMessage:ae="Please, fill all required fields."}=e,ie=d.slice(0,Math.min(p,d.length)),[$,re]=a.useState(()=>Object.fromEntries(ie.map(le=>[le.name,""]))),[P,te]=a.useState("idle"),[K,fe]=a.useState(null),We=o==="success"?"success":o==="error"?"error":P,me=o==="error"?ae:K,ce=o==="filled",U=a.useMemo(()=>{if(!ce)return $;let le=null;for(const N of ie)($[N.name]??"").trim().length>0||(le=le??{...$},le[N.name]="Filled");return le??$},[ce,$,ie]),Q=We==="error"?C.getFormFieldValidationError(ie,U):null,Z=o&&o!=="default"?`${s}-state-${o}`:"",ke=ie.some(le=>(U[le.name]??"").trim().length>0),we=Z!==`${s}-state-filled`&&ke?`${s}-state-filled`:"",Pe=`${Z} ${we}`.trim(),de=i==null?void 0:i.submitUrl,ge=u??"",be=(c==null?void 0:c.icon)??"",z=(c==null?void 0:c.mode)==="On",se=ge||"Submit",he={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"},ye={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:k??0,wordSpacing:V??0,textAppearance:A,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"},Le=rn(Kt(he,t)),_=rn(Kt(ye,t)),pe=rn(Kt(Me,t)),oe=C.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(he==null?void 0:he.color)??"#111111",buttonTextColor:e.buttonTextColor??(ye==null?void 0:ye.color)??"#ffffff"},Pm,km,ne),H={borderRadius:C.scalingValue(j,t),borderWidth:C.scalingValue(B,t),borderStyle:"solid"},ee={borderLeftWidth:C.scalingValue(B,t)},Fe=async le=>{if(le.preventDefault(),!l)return;const N=Object.fromEntries(ie.map(je=>{var gt;return[je.name,((gt=$[je.name])==null?void 0:gt.trim())??""]}).filter(([,je])=>je));if(!de){te("error"),fe("No integrations were found for this form.");return}if(Object.keys(N).length===0)return;const Ue=C.getFormFieldValidationError(ie,$);if(Ue){te("error"),fe(Ue);return}te("submitting"),fe(null);try{const je=await fetch(de,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)});if(!je.ok){const gt=await je.text();throw new Error(gt||`Request failed: ${je.status}`)}te("success"),re(Object.fromEntries(ie.map(gt=>[gt.name,""])))}catch(je){te("error"),fe(je instanceof Error?je.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Pe}`.trim(),style:oe,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Em(s)}}),r.jsxs("form",{onSubmit:Fe,className:`${s}-form`,style:{...H,height:C.scalingValue(X,t),minHeight:C.scalingValue(X,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:ie.map(le=>r.jsx("input",{type:le.type==="email"?"email":le.type==="phone"?"tel":"text",name:le.name,autoComplete:"off",value:U[le.name]??"",onChange:N=>re(Ue=>({...Ue,[le.name]:N.target.value})),placeholder:le.placeholder,required:le.isRequired??le.type==="email",className:`${s}-input`,style:{...Le,paddingRight:C.scalingValue(S.right,t),paddingLeft:C.scalingValue(S.left,t),paddingTop:C.scalingValue(S.top,t),paddingBottom:C.scalingValue(S.bottom,t)}},le.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:l?"submit":"button",className:`${s}-submitBtn`,"aria-label":se,style:{..._,...ee,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?be&&r.jsx(an,{url:be,className:`${s}-submitBtnIcon`,style:{maxWidth:C.scalingValue(F??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):ge})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...pe},children:O}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...pe},role:"alert",children:Q??me??ae})]})},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),G=i/T,k=G>o?o:G,V=G>o?o*T:i,A=c(V),L=c(k),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:A}:{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:A,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,k=!n||!!i,V=k&&b!=="off"&&b!=="randomize"?`${s}-image-hover-${b}`:void 0,A=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(A||!!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=A&&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||!(A||!!n)?$e:qm($e,te)},[t,A,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(!k||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,k]),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((A||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()}},[A,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=k&&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:k&&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=A?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';
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,X;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,k=G>o?o:G,V=G>o?o*T:i,A=c(V),L=c(k),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:j=>{p.current=j},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:j=>{p.current=j},src:e.image.url,alt:((X=e.image)==null?void 0:X.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:A}:{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:A,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:mt(`${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,k=!n||!!i,V=k&&b!=="off"&&b!=="randomize"?`${s}-image-hover-${b}`:void 0,A=n?!!i:!0,D=((t==null?void 0:t.length)??0)>0&&(A||!!n),x=Math.max(0,p)*Dm,W=we=>C.scalingValue(we,n??!1),M=a.useRef(null),Y=a.useRef(null),F=a.useRef(null),[X,j]=a.useState(0),B=A&&y==="on",[ne,S]=a.useState(!1),[E,O]=a.useState({}),ae=a.useRef(E);ae.current=E;const ie=a.useRef(null),$=a.useRef(0),re=a.useRef(null),P=a.useMemo(()=>(t??[]).map(we=>{var Pe;return((Pe=we.image)==null?void 0:Pe.url)??""}).join("\0"),[t]),[te,K]=a.useState(qr),fe=a.useMemo(()=>{const we=t??[];return we.length===0||!(A||!!n)?we:qm(we,te)},[t,A,te,n]),We=a.useMemo(()=>(t??[]).filter(we=>{var Pe;return!!((Pe=we.image)!=null&&Pe.url)}).length,[t]),me=D?Vm:1;a.useLayoutEffect(()=>{$.current=0,O({}),ie.current=null,K(qr),d(0)},[P]),a.useEffect(()=>{if(!k||b!=="randomize")return;const we=M.current;if(!we)return;const Pe=z=>{O(se=>{const he=Array.from(z).filter(Me=>Me in se&&!Ym(we,Me));if(he.length===0)return se;const ye={...se};return he.forEach(Me=>{delete ye[Me]}),ye})},de=new IntersectionObserver(z=>{const se=new Set;for(const he of z){const ye=he.target.dataset.marqueeItemIndex,Me=ye!==void 0?Number(ye):NaN;Number.isNaN(Me)||se.add(Me)}se.size>0&&Pe(se)},{root:we,threshold:0});Object.keys(E).forEach(z=>{const se=Number(z);we.querySelectorAll(`[data-marquee-item-index="${se}"]`).forEach(he=>de.observe(he))});const ge={current:0},be=()=>{const z=Object.keys(ae.current);z.length!==0&&(Pe(z.map(Number)),ge.current=requestAnimationFrame(be))};return Object.keys(ae.current).length>0&&(ge.current=requestAnimationFrame(be)),()=>{cancelAnimationFrame(ge.current),de.disconnect()}},[b,E,k]),a.useLayoutEffect(()=>{if(!D)return;const we=M.current,Pe=F.current;if(!we||!Pe)return;const de={current:0},ge=()=>{const se=we.getBoundingClientRect().width||we.offsetWidth,he=Xm(Pe),ye=ie.current,Me=typeof ye=="number"&&Math.abs(ye-he)<=.25;ie.current=he;let Le=te,_=0;if((A||n)&&T>0&&se>0){const H=Fs(Pe,T);if(H>=Bm){_=H;const ee=Math.min(zm,Math.max(qr,Math.ceil(se/H)+1));Le=ee,ee!==te&&K(ee)}}const oe=Le!==te&&_>0?_*Le:he>0?he:_>0?_*Le:(()=>{const H=Fs(Pe,T);return H>0?H*Le:0})();oe>0?d(H=>H<=0?oe:!Me||Math.round(H)===Math.round(oe)?H:oe):!Me&&l<=0&&(cancelAnimationFrame(de.current),de.current=requestAnimationFrame(ge))},be=()=>{cancelAnimationFrame(de.current),de.current=requestAnimationFrame(ge)};re.current=be,be();const z=new ResizeObserver(be);return z.observe(we),z.observe(Pe),()=>{re.current=null,cancelAnimationFrame(de.current),z.disconnect()}},[A,D,l,P,te,T,n]),a.useLayoutEffect(()=>{if(!D||c<=0)return;const we=Y.current;we&&Gm(we)},[D,c,v,x]),a.useLayoutEffect(()=>{if(!D||l<=0){j(0);return}const we=Y.current,Pe=F.current;if(!we||!Pe)return;const de=()=>{const be=we.offsetHeight||we.getBoundingClientRect().height,z=Array.from(Pe.children).reduce((he,ye)=>Math.max(he,ye.offsetHeight||ye.getBoundingClientRect().height),0),se=be>0?be:z;j(se>0?se:0)};de();const ge=new ResizeObserver(de);return ge.observe(we),ge.observe(Pe),()=>ge.disconnect()},[D,me,fe,n,g,h,m,l,R,E]),a.useLayoutEffect(()=>{if(!n||!G||!D||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,G,D,v,l,X,g,fe]);const ce=()=>{B&&S(!0)},U=()=>{B&&S(!1)},Q=a.useCallback(()=>{var we;$.current=Math.min(We,$.current+1),(we=re.current)==null||we.call(re)},[We]),Z=a.useCallback((we,Pe)=>{O(de=>{const ge=de[we]??Pe,be=(t??[]).filter(se=>se!==ge);if(be.length===0)return de;const z=be[Math.floor(Math.random()*be.length)];return{...de,[we]:z}})},[t]),ke=(we,Pe,de,ge)=>{const be=k&&b==="randomize"&&R.display==="cover"?E[de]??we:we,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":de,onMouseEnter:k&&b==="randomize"&&R.display==="cover"?()=>Z(de,we):void 0,children:[r.jsx(Qm,{item:be,prefix:s,imageFit:R,imageMaxWidth:h,imageMaxHeight:m,cornerRadius:I,imageHoverClass:V,isEditor:n,isFirstSet:ge,scaled:W,onFirstSetImageDone:Q}),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%"}})]},`${Pe}-${de}`)};if(D){const we=A?B&&ne?"paused":"running":"paused",Pe=c>0&&x>0?c/x*1e3:0,de=`${Math.max(0,Pe)/1e3}s`;return r.jsxs("div",{ref:M,className:mt(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:X>0?{height:X}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{ref:Y,className:`${s}-marquee-track`,"data-direction":v,onMouseEnter:ce,onMouseLeave:U,style:{WebkitAnimationDuration:de,animationDuration:de,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:me},(ge,be)=>r.jsx("div",{ref:be===0?F:void 0,className:mt(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(g),paddingRight:W(g)},"aria-hidden":be>0,children:fe.map((z,se)=>ke(z,be,se,be===0&&se<T))},`set-${be}`))})]})}return r.jsxs("div",{ref:M,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),r.jsx("div",{className:mt(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(g),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Pe)=>ke(we,0,Pe))},"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';
@@ -2476,7 +2476,7 @@ type MarqueeProps = {
2476
2476
  isPreviewMode?: boolean;
2477
2477
  isEditMode?: boolean;
2478
2478
  } & CommonComponentProps;
2479
- `,ng={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},ig={element:eg,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:ng,sourceCode:tg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function og(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2479
+ `,ng={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},ig={element:eg,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:ng,sourceCode:tg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function og(e,t){const n=`calc(-1 * var(--${e}-distance, 0px))`,i=t?`
2480
2480
  .${e}-item-image-wrap {
2481
2481
  display: flex;
2482
2482
  flex: 0 0 auto;
@@ -2530,11 +2530,11 @@ type MarqueeProps = {
2530
2530
 
2531
2531
  @keyframes ${e}-marquee-left {
2532
2532
  from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2533
- to { -webkit-transform: translate3d(-${i}, 0, 0); transform: translate3d(-${i}, 0, 0); }
2533
+ to { -webkit-transform: translate3d(${n}, 0, 0); transform: translate3d(${n}, 0, 0); }
2534
2534
  }
2535
2535
 
2536
2536
  @keyframes ${e}-marquee-right {
2537
- from { -webkit-transform: translate3d(-${i}, 0, 0); transform: translate3d(-${i}, 0, 0); }
2537
+ from { -webkit-transform: translate3d(${n}, 0, 0); transform: translate3d(${n}, 0, 0); }
2538
2538
  to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2539
2539
  }
2540
2540
 
@@ -2596,7 +2596,7 @@ type MarqueeProps = {
2596
2596
  .${e}-text {
2597
2597
  display: inline-block;
2598
2598
  }
2599
- ${o}
2599
+ ${i}
2600
2600
  .${e}-cap-ref {
2601
2601
  position: absolute;
2602
2602
  visibility: hidden;
@@ -2605,15 +2605,15 @@ ${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,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:k,textColor:V,backgroundColor:A,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:k,color:V},n),[m,b,T,G,I,R,k,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)},[$,u]);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:A}},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:A,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,t,n)=>{const i=e.getAnimations()[0];if(!i||t<=0||n<=0)return;const s=(Number(i.currentTime??0)||0)%t/t;i.currentTime=s*n},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:k,textColor:V,backgroundColor:A,ribbonWidth:L}=e,D=L??R,x=y==="curve",W=dg(g),M=ug(h),Y=a.useMemo(()=>og(o,x),[o,x]),F=a.useMemo(()=>Kt({fontSettings:{fontFamily:m,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:T,wordSpacing:G,fontSize:I,lineHeight:R,textAppearance:k,color:V},n),[m,b,T,G,I,R,k,V,n]),X=Ae=>C.scalingValue(Ae,n??!1),j=((t==null?void 0:t.length)??0)>0,B=n?!!i:!0,ne=j&&(B||!!n),S=Math.max(0,c)*rg,E=B&&p==="on",[O,ae]=a.useState(!1),ie=B?E&&O?"paused":"running":"paused",$=ie==="running"&&S>0&&d>0,re=d>0&&S>0?d/S*1e3:0,P=a.useRef(null),te=a.useRef(null),K=a.useRef(null),fe=a.useRef(null),We=a.useRef(null),me=a.useRef(null),ce=a.useRef($),U=a.useRef(null),Q=a.useRef(null),Z=a.useRef(0),ke=a.useRef(W),we=a.useRef(M);ce.current=$,ke.current=W,we.current=M;const[Pe,de]=a.useState(0),[ge,be]=a.useState(0),[z,se]=a.useState(0),[he,ye]=a.useState(0),[Me,Le]=a.useState(0),_=a.useMemo(()=>(t??[]).map(Ae=>{var $e;return`${Ae.text}\0${(($e=Ae.image)==null?void 0:$e.url)??""}\0${Ae.link??""}`}).join("\0"),[t]),[pe,oe]=a.useState(Ur),H=a.useMemo(()=>{const Ae=t??[];return Ae.length===0||!(B||n)?Ae:mg(Ae,pe)},[t,B,pe,n]),ee=ne?sg:1;a.useLayoutEffect(()=>{oe(Ur),l(0)},[_]),a.useLayoutEffect(()=>{var Ie;const Ae=me.current;if(!Ae)return;const $e=()=>{const qe=getComputedStyle(Ae),Ee=parseFloat(qe.fontSize)||0;if(Ee<=0)return;const Je=gg();if(!Je){de(Ee*La),be(0);return}Je.font=`${qe.fontStyle} ${qe.fontWeight} ${Ee}px ${qe.fontFamily}`;const Qe=Je.measureText("H"),st=Qe.actualBoundingBoxAscent>0?Qe.actualBoundingBoxAscent:Ee*La,St=Math.max(0,Qe.actualBoundingBoxDescent||0),Pt=Qe.fontBoundingBoxAscent||0,Nt=Qe.fontBoundingBoxDescent||0;de(yt=>Math.abs(yt-st)>.5?st:yt);const dt=Pt>0||Nt>0?(Nt-St-(Pt-st))/2:0;be(yt=>Math.abs(yt-dt)>.25?dt:yt)};$e();const tt=typeof document<"u"?document.fonts:void 0;(Ie=tt==null?void 0:tt.ready)==null||Ie.then($e).catch(()=>{});const Ze=new ResizeObserver($e);return Ze.observe(Ae),()=>Ze.disconnect()},[F.fontFamily,F.fontWeight,F.fontStyle,F.fontSize,F.lineHeight]),a.useLayoutEffect(()=>{if(!ne)return;const Ae=P.current,$e=fe.current;if(!Ae||!$e)return;const tt={id:0},Ze=()=>{const qe=Ae.offsetWidth||Ae.getBoundingClientRect().width,Ee=$e.offsetWidth||$e.getBoundingClientRect().width;if(j&&qe>0&&Ee>0){const Je=Ee/pe;if(Je>0){const Qe=Math.min(ag,Math.max(Ur,Math.ceil(qe/Je)+1));if(Qe!==pe){oe(Qe);return}}}Ee>0&&l(Ee)};tt.id=requestAnimationFrame(Ze);const Ie=new ResizeObserver(()=>{cancelAnimationFrame(tt.id),tt.id=requestAnimationFrame(Ze)});return Ie.observe(Ae),Ie.observe($e),()=>{cancelAnimationFrame(tt.id),Ie.disconnect()}},[ne,_,pe,j,Pe]),a.useLayoutEffect(()=>{const Ae=We.current;if(!Ae)return;const $e={id:0},tt=()=>{const Ie=Ae.offsetHeight;Ie>0&&Le(qe=>Math.abs(qe-Ie)>.5?Ie:qe)};$e.id=requestAnimationFrame(tt);const Ze=new ResizeObserver(()=>{cancelAnimationFrame($e.id),$e.id=requestAnimationFrame(tt)});return Ze.observe(Ae),()=>{cancelAnimationFrame($e.id),Ze.disconnect()}},[D,n]),a.useLayoutEffect(()=>{if(!x){se(0),ye(0);return}const Ae=P.current,$e=fe.current;if(!Ae||!$e)return;const tt={id:0},Ze=()=>{const qe=Ae.offsetWidth,Ee=$e.offsetHeight;qe>0&&ye(Je=>Math.abs(Je-qe)>.5?qe:Je),Ee>0&&se(Je=>Math.abs(Je-Ee)>.5?Ee:Je)};tt.id=requestAnimationFrame(Ze);const Ie=new ResizeObserver(()=>{cancelAnimationFrame(tt.id),tt.id=requestAnimationFrame(Ze)});return Ie.observe(Ae),Ie.observe($e),()=>{cancelAnimationFrame(tt.id),Ie.disconnect()}},[x,_,Pe,R,I,ne]),a.useLayoutEffect(()=>{if(!ne||d<=0)return;const Ae=K.current;Ae&&(pg(Ae,Z.current,re),Z.current=re)},[ne,d,u,S,re]),a.useLayoutEffect(()=>{if(!x||!j)return;const Ae=P.current;if(!Ae)return;const $e={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},tt=()=>{for(const st of $e.itemsCache)for(const St of st.glyphs)fg(St.inner)},Ze=()=>{const st=te.current??Ae;$e.itemsCache=Array.from(Ae.querySelectorAll("[data-marquee-text-item]"),St=>{const Pt=[];return St.querySelectorAll("[data-marquee-wave-node]").forEach(Nt=>{const dt=Nt.firstElementChild;dt&&Pt.push({inner:dt,layoutLocalX:vg(Nt,st)})}),{item:St,glyphs:Pt}}),$e.cacheDirty=!1},Ie=()=>{$e.cacheDirty&&Ze();const St=(te.current??Ae).offsetWidth||1,Pt=St*ke.current,Nt=we.current,dt=2*Math.PI*Nt/St,yt=`${St}|${Pt}|${dt}`;yt!==$e.lutKey&&($e.lutKey=yt,$e.lut=bg(Pt,dt,xg));const Ot=K.current,Ft=Ot?yg(getComputedStyle(Ot).transform):0,bt=Ae.getBoundingClientRect(),Wt=bt.left,Gt=bt.right,Zt=$e.lut&&$e.lut.wavelength>0?Math.max(0,($e.lut.periodArc/$e.lut.wavelength-1)*St):0;for(const{item:en,glyphs:Tt}of $e.itemsCache){const _t=en.getBoundingClientRect();if(!(_t.right<Wt||_t.left>Gt+Zt))for(const nn of Tt){const ct=nn.layoutLocalX+Ft,Te=$e.lut?wg($e.lut,ct):ct,Ne=dt*Te,nt=Pt*Math.sin(Ne),pt=Pt*dt*Math.cos(Ne),vt=Math.atan(pt)*(180/Math.PI);hg(nn.inner,Te-ct,nt,vt)}}},qe=()=>{$e.cancelled||($e.raf=0,Ie(),ce.current&&!document.hidden&&($e.raf=requestAnimationFrame(qe)))},Ee=()=>{$e.cancelled||$e.raf||($e.raf=requestAnimationFrame(qe))},Je=()=>{$e.cacheDirty=!0,Ie(),Ee()};U.current=Ee,Q.current=Je,Ie(),Ee();const Qe=()=>{if(document.hidden){cancelAnimationFrame($e.raf),$e.raf=0;return}cancelAnimationFrame($e.raf),$e.raf=0,Je()};return document.addEventListener("visibilitychange",Qe),window.addEventListener("pageshow",Qe),window.addEventListener("focus",Qe),()=>{$e.cancelled=!0,U.current=null,Q.current=null,cancelAnimationFrame($e.raf),document.removeEventListener("visibilitychange",Qe),window.removeEventListener("pageshow",Qe),window.removeEventListener("focus",Qe),tt()}},[x,j]),a.useLayoutEffect(()=>{var Ae;!x||!j||(Ae=Q.current)==null||Ae.call(Q)},[x,j,s,_,pe,Pe,W,M,he]),a.useLayoutEffect(()=>{var Ae;(Ae=U.current)==null||Ae.call(U)},[$,u]);const Fe=()=>{E&&ae(!0)},le=()=>{E&&ae(!1)},N=x?W*100:0,Ue=X(D),je={minHeight:Ue,...x?{paddingTop:`${N}%`,paddingBottom:`${N}%`}:{}},gt={height:Ue,...x?{visibility:"hidden"}:{backgroundColor:A}},rt={gap:X(v),minHeight:Ue},ht=he*W,lt=Me>0?Me:z,Ge=Math.max(z,lt),ve=x&&he>0&&Ge>0?Sg(he,ht,M,ht+Ge/2):"",_e=ht*2+Ge,ze=ve?r.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${he} ${_e}`,preserveAspectRatio:"none","aria-hidden":!0,children:r.jsx("path",{d:ve,fill:"none",stroke:A,strokeWidth:lt,strokeLinecap:"round",strokeLinejoin:"round"})}):null,Ke=r.jsx("div",{ref:We,className:`${o}-ribbon`,style:gt,"aria-hidden":!0}),Se=(Ae,$e,tt)=>r.jsx($g,{item:Ae,prefix:o,textCss:F,capHeightPx:Pe,opticalOffsetY:ge,imageGapPx:X(v),isCurve:x},`${$e}-${tt}`),De=r.jsx("span",{ref:me,"aria-hidden":!0,className:`${o}-cap-ref`,style:F,children:"H"}),Ve=`${Math.max(0,re)/1e3}s`,et=ne?r.jsx("div",{ref:K,className:`${o}-marquee-track`,"data-direction":u,onMouseEnter:Fe,onMouseLeave:le,style:{[`--${o}-distance`]:`${d}px`,WebkitAnimationDuration:Ve,animationDuration:Ve,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:ee},(Ae,$e)=>r.jsx("div",{ref:$e===0?fe:void 0,className:`${o}-marquee-set`,style:{...rt,paddingRight:X(v)},"aria-hidden":$e>0,children:H.map((tt,Ze)=>Se(tt,$e,Ze))},`set-${$e}`))}):r.jsx("div",{ref:fe,className:mt(`${o}-marquee-set`,`${o}-marquee-static`),style:rt,children:t==null?void 0:t.map((Ae,$e)=>Se(Ae,0,$e))});return r.jsxs("div",{ref:P,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),De,r.jsxs("div",{ref:te,className:`${o}-marquee-wrapper`,style:je,children:[Ke,ze,et]})]})},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';
2612
2612
  import { useScopedStyles } from '../utils/useScopedStyles';
2613
2613
  import { textStylesToCss } from '../utils/textStylesToCss';
2614
2614
 
2615
- function getCSS(P: string, setWidthPx: number, isCurve: boolean): string {
2616
- const distance = setWidthPx > 0 ? \`\${setWidthPx}px\` : '0px';
2615
+ function getCSS(P: string, isCurve: boolean): string {
2616
+ const distance = \`calc(-1 * var(--\${P}-distance, 0px))\`;
2617
2617
  const curveCss = isCurve ? \`
2618
2618
  .\${P}-item-image-wrap {
2619
2619
  display: flex;
@@ -2669,11 +2669,11 @@ function getCSS(P: string, setWidthPx: number, isCurve: boolean): string {
2669
2669
 
2670
2670
  @keyframes \${P}-marquee-left {
2671
2671
  from { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2672
- to { -webkit-transform: translate3d(-\${distance}, 0, 0); transform: translate3d(-\${distance}, 0, 0); }
2672
+ to { -webkit-transform: translate3d(\${distance}, 0, 0); transform: translate3d(\${distance}, 0, 0); }
2673
2673
  }
2674
2674
 
2675
2675
  @keyframes \${P}-marquee-right {
2676
- from { -webkit-transform: translate3d(-\${distance}, 0, 0); transform: translate3d(-\${distance}, 0, 0); }
2676
+ from { -webkit-transform: translate3d(\${distance}, 0, 0); transform: translate3d(\${distance}, 0, 0); }
2677
2677
  to { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
2678
2678
  }
2679
2679
 
@@ -2758,12 +2758,12 @@ const CURVE_FREQUENCY_SCALE = 10;
2758
2758
  const normalizeCurveAmplitude = (value: number): number => Math.max(0, value) / CURVE_AMPLITUDE_SCALE;
2759
2759
  const normalizeCurveFrequency = (value: number): number => Math.max(0, value) / CURVE_FREQUENCY_SCALE;
2760
2760
 
2761
- const restartTrackAnimation = (track: HTMLElement) => {
2762
- track.style.setProperty('animation-name', 'none');
2763
- track.style.setProperty('-webkit-animation-name', 'none');
2764
- void track.offsetHeight;
2765
- track.style.removeProperty('animation-name');
2766
- track.style.removeProperty('-webkit-animation-name');
2761
+ const syncTrackAnimationPhase = (track: HTMLElement, prevDurationMs: number, nextDurationMs: number) => {
2762
+ const anim = track.getAnimations()[0];
2763
+ if (!anim || prevDurationMs <= 0 || nextDurationMs <= 0) return;
2764
+ const elapsedMs = Number(anim.currentTime ?? 0) || 0;
2765
+ const progress = (elapsedMs % prevDurationMs) / prevDurationMs;
2766
+ anim.currentTime = progress * nextDurationMs;
2767
2767
  };
2768
2768
 
2769
2769
  const expandSetContent = (items: MarqueeTextItem[], repeat: number): MarqueeTextItem[] => (
@@ -2967,7 +2967,7 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
2967
2967
  const isCurveLayout = layoutType === 'curve';
2968
2968
  const amplitudeRatio = normalizeCurveAmplitude(curveAmplitude);
2969
2969
  const curvePeriods = normalizeCurveFrequency(curveFrequency);
2970
- const scopedCss = useMemo(() => getCSS(P, animationDistance, isCurveLayout), [P, animationDistance, isCurveLayout]);
2970
+ const scopedCss = useMemo(() => getCSS(P, isCurveLayout), [P, isCurveLayout]);
2971
2971
 
2972
2972
  const textCss = useMemo<CSSProperties>(() => textStylesToCss({
2973
2973
  fontSettings: {
@@ -2996,6 +2996,7 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
2996
2996
  ? (isHovering ? 'paused' : 'running')
2997
2997
  : 'running';
2998
2998
  const waveShouldLoop = playState === 'running' && pxPerSec > 0 && animationDistance > 0;
2999
+ const durationMs = animationDistance > 0 && pxPerSec > 0 ? (animationDistance / pxPerSec) * 1000 : 0;
2999
3000
 
3000
3001
  const wrapperRef = useRef<HTMLDivElement | null>(null);
3001
3002
  const bandRef = useRef<HTMLDivElement | null>(null);
@@ -3005,7 +3006,13 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3005
3006
  const capRefEl = useRef<HTMLSpanElement | null>(null);
3006
3007
  const waveShouldLoopRef = useRef(waveShouldLoop);
3007
3008
  const waveKickRef = useRef<(() => void) | null>(null);
3009
+ const waveInvalidateRef = useRef<(() => void) | null>(null);
3010
+ const prevDurationMsRef = useRef(0);
3011
+ const amplitudeRatioRef = useRef(amplitudeRatio);
3012
+ const curvePeriodsRef = useRef(curvePeriods);
3008
3013
  waveShouldLoopRef.current = waveShouldLoop;
3014
+ amplitudeRatioRef.current = amplitudeRatio;
3015
+ curvePeriodsRef.current = curvePeriods;
3009
3016
  const [capHeightPx, setCapHeightPx] = useState(0);
3010
3017
  const [opticalOffsetY, setOpticalOffsetY] = useState(0);
3011
3018
  const [curveBandHeightPx, setCurveBandHeightPx] = useState(0);
@@ -3013,7 +3020,7 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3013
3020
  const [ribbonHeightPx, setRibbonHeightPx] = useState(0);
3014
3021
 
3015
3022
  const contentKey = useMemo(
3016
- () => (content ?? []).map((i) => \`\${i.text}\\0\${i.image?.url ?? ''}\`).join('\\0'),
3023
+ () => (content ?? []).map((i) => \`\${i.text}\\0\${i.image?.url ?? ''}\\0\${i.link ?? ''}\`).join('\\0'),
3017
3024
  [content],
3018
3025
  );
3019
3026
  const [contentSequenceRepeat, setContentSequenceRepeat] = useState(MIN_CONTENT_SEQUENCE_REPEAT);
@@ -3156,8 +3163,9 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3156
3163
  if (!useMarqueeTrack || animationDistance <= 0) return;
3157
3164
  const track = trackRef.current;
3158
3165
  if (!track) return;
3159
- restartTrackAnimation(track);
3160
- }, [useMarqueeTrack, animationDistance, direction, pxPerSec]);
3166
+ syncTrackAnimationPhase(track, prevDurationMsRef.current, durationMs);
3167
+ prevDurationMsRef.current = durationMs;
3168
+ }, [useMarqueeTrack, animationDistance, direction, pxPerSec, durationMs]);
3161
3169
 
3162
3170
  useLayoutEffect(() => {
3163
3171
  if (!isCurveLayout || !hasContent) return;
@@ -3203,8 +3211,9 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3203
3211
  if (wave.cacheDirty) rebuildCache();
3204
3212
  const band = bandRef.current ?? wrapper;
3205
3213
  const width = band.offsetWidth || 1;
3206
- const amplitude = width * amplitudeRatio;
3207
- const k = (2 * Math.PI * curvePeriods) / width;
3214
+ const amplitude = width * amplitudeRatioRef.current;
3215
+ const periods = curvePeriodsRef.current;
3216
+ const k = (2 * Math.PI * periods) / width;
3208
3217
  const nextLutKey = \`\${width}|\${amplitude}|\${k}\`;
3209
3218
  if (nextLutKey !== wave.lutKey) {
3210
3219
  wave.lutKey = nextLutKey;
@@ -3249,27 +3258,50 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3249
3258
  wave.raf = requestAnimationFrame(tick);
3250
3259
  };
3251
3260
 
3261
+ const invalidate = () => {
3262
+ wave.cacheDirty = true;
3263
+ applyWave();
3264
+ kick();
3265
+ };
3266
+
3252
3267
  waveKickRef.current = kick;
3268
+ waveInvalidateRef.current = invalidate;
3269
+ applyWave();
3253
3270
  kick();
3254
-
3255
3271
  const onVisibility = () => {
3256
3272
  if (document.hidden) {
3257
3273
  cancelAnimationFrame(wave.raf);
3258
3274
  wave.raf = 0;
3259
3275
  return;
3260
3276
  }
3261
- kick();
3277
+ cancelAnimationFrame(wave.raf);
3278
+ wave.raf = 0;
3279
+ invalidate();
3262
3280
  };
3263
3281
  document.addEventListener('visibilitychange', onVisibility);
3282
+ window.addEventListener('pageshow', onVisibility);
3283
+ window.addEventListener('focus', onVisibility);
3264
3284
 
3265
3285
  return () => {
3266
3286
  wave.cancelled = true;
3267
3287
  waveKickRef.current = null;
3288
+ waveInvalidateRef.current = null;
3268
3289
  cancelAnimationFrame(wave.raf);
3269
3290
  document.removeEventListener('visibilitychange', onVisibility);
3291
+ window.removeEventListener('pageshow', onVisibility);
3292
+ window.removeEventListener('focus', onVisibility);
3270
3293
  clearWaveTransforms();
3271
3294
  };
3272
- }, [isCurveLayout, amplitudeRatio, curvePeriods, hasContent, setWidth, contentKey, contentSequenceRepeat, capHeightPx]);
3295
+ }, [isCurveLayout, hasContent]);
3296
+
3297
+ useLayoutEffect(() => {
3298
+ if (!isCurveLayout || !hasContent) return;
3299
+ waveInvalidateRef.current?.();
3300
+ // curveWidthPx mirrors the band's live offsetWidth (see the ResizeObserver
3301
+ // above). Outside preview, the wave loop isn't ticking, so a width-resize
3302
+ // drag needs this to force a recompute — otherwise only the SVG ribbon
3303
+ // (driven straight from render) tracks the drag and the glyphs stay stale.
3304
+ }, [isCurveLayout, hasContent, setWidth, contentKey, contentSequenceRepeat, capHeightPx, amplitudeRatio, curvePeriods, curveWidthPx]);
3273
3305
 
3274
3306
  useLayoutEffect(() => {
3275
3307
  waveKickRef.current?.();
@@ -3353,7 +3385,6 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3353
3385
  <span ref={capRefEl} aria-hidden className={\`\${P}-cap-ref\`} style={textCss}>H</span>
3354
3386
  );
3355
3387
 
3356
- const durationMs = animationDistance > 0 && pxPerSec > 0 ? (animationDistance / pxPerSec) * 1000 : 0;
3357
3388
  const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
3358
3389
 
3359
3390
  const inner = useMarqueeTrack ? (
@@ -3364,6 +3395,7 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3364
3395
  onMouseEnter={onTrackEnter}
3365
3396
  onMouseLeave={onTrackLeave}
3366
3397
  style={{
3398
+ [\`--\${P}-distance\`]: \`\${animationDistance}px\`,
3367
3399
  WebkitAnimationDuration: durationS,
3368
3400
  animationDuration: durationS,
3369
3401
  WebkitAnimationPlayState: playState,
@@ -3537,7 +3569,7 @@ type MarqueeTextProps = {
3537
3569
  pointer-events: auto;
3538
3570
  z-index: 10;
3539
3571
  }
3540
- `}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,k=!!o,V=((t==null?void 0:t.length)??0)>0,A=d>0&&(!n||i),L=V&&(A||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=A&&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()}},[A,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":k?_==null?void 0:_.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${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,k,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":k&&!(re!=null&&re.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(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,k,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),k&&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=A?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';
3572
+ `}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,k=!!o,V=((t==null?void 0:t.length)??0)>0,A=d>0&&(!n||i),L=V&&(A||n),D=Math.max(0,d)*Mg,x=_=>C.scalingValue(_,n??!1),W=a.useRef(null),M=a.useRef(null),Y=a.useRef(null),[F,X]=a.useState(0),[j,B]=a.useState(0),ne=j>0?j:0,S=a.useMemo(()=>Eg(s,ne),[s,ne]),[E,O]=a.useState(0),ae=A&&u==="on",[ie,$]=a.useState(!1),re=a.useRef(null),[P,te]=a.useState(0),[K,fe]=a.useState(0),We=a.useRef(null),me=_=>{var oe,H,ee,Fe,le;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((oe=e==null?void 0:e[`${_}FontSettings`])==null?void 0:oe.fontWeight)??400,fontStyle:((H=e==null?void 0:e[`${_}FontSettings`])==null?void 0:H.fontStyle)??"normal"},textAppearance:{textTransform:((ee=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ee.textTransform)??"none",textDecoration:((Fe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Fe.textDecoration)??"none",fontVariant:((le=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:le.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},ce=me("text"),U=me("caption"),Q=a.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var pe,oe;return(((pe=_.text)==null?void 0:pe.length)??0)>0||(((oe=_.caption)==null?void 0:oe.length)??0)>0}),[t]),Z=a.useMemo(()=>!L||(t==null?void 0:t.length)===0?1:j<=0||F<=0?Ws:Math.max(Ws,Math.ceil(F/j)+1),[L,t==null?void 0:t.length,j,F]);a.useLayoutEffect(()=>{if(!L)return;const _=W.current,pe=Y.current;if(!_||!pe)return;let oe=0;const H=()=>{const le=_.getBoundingClientRect().width,N=pe.getBoundingClientRect().width,Ue=We.current,je=typeof Ue=="number"&&Math.abs(Ue-N)<=.25;if(We.current=N,X(le),typeof N=="number"&&N>0&&j<=0){B(N);return}je&&N!==j?B(N):!je&&j<=0&&(cancelAnimationFrame(oe),oe=requestAnimationFrame(H))},ee=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(H)};ee();const Fe=new ResizeObserver(ee);return Fe.observe(_),Fe.observe(pe),()=>{cancelAnimationFrame(oe),Fe.disconnect()}},[A,L,j]);const ke=ne>0&&D>0?ne/D*1e3:0,we=`${Math.max(0,ke)/1e3}s`;a.useLayoutEffect(()=>{if(!L||ne<=0)return;const _=M.current;_&&Pg(_)},[L,ne,c]),a.useLayoutEffect(()=>{if(!L){O(0);return}const _=Y.current,pe=M.current;if(!_||!pe)return;const oe=()=>{let ee=0;for(let Fe=0;Fe<_.children.length;Fe++){const N=_.children[Fe].firstElementChild;N&&(ee=Math.max(ee,N.offsetHeight))}ee<=0&&(ee=pe.offsetHeight),O(ee>0?ee:0)};oe();const H=new ResizeObserver(oe);return H.observe(_),H.observe(pe),()=>{H.disconnect()}},[L,Z,t,n,p,v,b,g,y,R,T,P,K]);const Pe=()=>{ae&&$(!0)},de=()=>{ae&&$(!1)},ge=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),be=a.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),z=a.useCallback((_,pe,oe,H)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ge,width:"100%"},children:[r.jsx("div",{"data-controls":k?H==null?void 0:H.controlsName:void 0,"data-controls-axis":k?"y":void 0,className:k?`${s}-control`:void 0,style:{height:x((H==null?void 0:H.marginTop)??0)}}),r.jsx("div",{...H!=null&&H.dataMeasureKind?{"data-testimonial-measure":H.dataMeasureKind}:{},style:{...Kt(_,n),textAlign:be,pointerEvents:"auto",...typeof(H==null?void 0:H.minHeightPx)=="number"&&H.minHeightPx>0?{minHeight:H.minHeightPx}:{}},children:r.jsx(yi,{content:pe})})]},oe),[ge,be,n,k,s,x]),se=a.useCallback((_,pe,oe)=>{var H,ee,Fe;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:ge,textAlign:be},children:[_.text&&z(ce,_.text,"text",oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(oe==null?void 0:oe.textMinHeightPx)=="number"&&oe.textMinHeightPx>0?{minHeightPx:oe.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ge,width:"100%"},children:[r.jsx("div",{"data-controls":k&&!(oe!=null&&oe.dataMeasureAttrs)?"logoMarginTop":void 0,className:k&&!(oe!=null&&oe.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:H.url)&&r.jsx("img",{src:_.logo.url,alt:((ee=_.logo)==null?void 0:ee.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Fe=_.logo)==null?void 0:Fe.objectFit)||"contain"}})})]}),_.caption&&z(U,_.caption,"caption",{...oe!=null&&oe.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:G,...oe!=null&&oe.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(oe==null?void 0:oe.captionMinHeightPx)=="number"&&oe.captionMinHeightPx>0?{minHeightPx:oe.captionMinHeightPx}:{}})]})]},pe)},[m,G,U,v,y,T,I,R,ge,be,b.bottom,b.left,b.right,b.top,z,g,h,ce,n,k,s]),he=a.useCallback(_=>{te(_.maxTextPx),fe(_.maxCaptionPx)},[]);a.useLayoutEffect(()=>{if(!Q){he({maxTextPx:0,maxCaptionPx:0});return}const _=re.current;if(!_)return;const pe=()=>{C.readTestimonialTextMeasure(_,he)};pe();const oe=new ResizeObserver(pe);return oe.observe(_),()=>{oe.disconnect()}},[Q,he,t,se]);const ye=Q?{textMinHeightPx:P,captionMinHeightPx:K}:void 0,Me=Q?r.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,pe)=>se(_,`measure-${pe}`,{dataMeasureAttrs:!0}))}):null,Le=(_,pe)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[se(_,`card-${pe}`,ye),k&&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}})]},pe);if(L){const _=A?ae&&ie?"paused":"running":"paused";return r.jsxs("div",{ref:W,className:mt(`${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:Pe,onMouseLeave:de,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:we,WebkitAnimationDuration:we,animationPlayState:_,WebkitAnimationPlayState:_},children:Array.from({length:Z},(pe,oe)=>r.jsx("div",{ref:oe===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":oe>0,children:t==null?void 0:t.map((H,ee)=>Le(H,`${oe}-${ee}`))},`set-${oe}`))})]})}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((_,pe)=>Le(_,pe))})]})},Ag=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3541
3573
  import cn from 'classnames';
3542
3574
  import { CommonComponentProps } from '../props';
3543
3575
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4292,7 +4324,7 @@ type TestimonialsSettings = {
4292
4324
  width: 100%;
4293
4325
  height: 100%;
4294
4326
  }
4295
- `}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),[k,V]=a.useState(null),[A,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=k===null?null:l[k],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&&A&&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`,A?`${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';
4327
+ `}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),[k,V]=a.useState(null),[A,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=k===null?null:l[k],F=me=>{var U,Q,Z,ke,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${me}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${me}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((Q=e==null?void 0:e[`${me}FontSettings`])==null?void 0:Q.fontStyle)??"normal"},textAppearance:{textTransform:((Z=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:Z.textTransform)??"none",textDecoration:((ke=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:ke.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${me}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${me}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${me}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${me}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${me}WordSpacing`])??0,color:(e==null?void 0:e[`${me}Color`])??"#000000"}},X=F("text"),j=F("caption"),B=l.length>1&&l.some(me=>{var ce,U;return(((ce=me.text)==null?void 0:ce.length)??0)>0||(((U=me.caption)==null?void 0:U.length)??0)>0}),ne=a.useRef(null),[S,E]=a.useState(0),[O,ae]=a.useState(0),ie=e.controls??{mode:"Off",icon:null},$=l.length>1,re=a.useCallback((me,ce)=>!$||ce===me?me:(D.current&&window.clearTimeout(D.current),V(me),L(!0),D.current=window.setTimeout(()=>{V(null),L(!1),D.current=null},300),ce),[$]),P=a.useCallback(()=>{$&&G(me=>re(me,(me-1+l.length)%l.length))},[$,re,l.length]),te=a.useCallback(()=>{$&&G(me=>re(me,(me+1)%l.length))},[$,re,l.length]);a.useEffect(()=>{if(!R||!$)return;const me=Math.max(300,Hg/d),ce=window.setInterval(()=>{G(U=>re(U,(U+1)%l.length))},me);return()=>{window.clearInterval(ce)}},[R,$,re,l.length,d]),a.useEffect(()=>()=>{D.current&&window.clearTimeout(D.current)},[]);const K=(me,ce)=>{var we,Pe,de,ge;const U=ce==null?void 0:ce.textMinHeightPx,Q=ce==null?void 0:ce.captionMinHeightPx,Z=ce==null?void 0:ce.dataMeasureAttrs,ke=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[me.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"textMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(v??0,n??!1)}}),r.jsx("div",{...Z&&{"data-testimonial-measure":"text"},style:{...Kt(X,n),...U&&U>0?{minHeight:U}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:me.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"imageMarginTop":void 0,className:ke?`${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:((we=me.image)==null?void 0:we.url)&&r.jsx("img",{src:(Pe=me.image)==null?void 0:Pe.url,alt:((de=me.image)==null?void 0:de.name)??"",className:`${s}-icon`,style:{objectFit:((ge=me.image)==null?void 0:ge.objectFit)||"contain"}})})]}),me.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:x,width:"100%"},children:[r.jsx("div",{"data-controls":ke?"captionMarginTop":void 0,className:ke?`${s}-control`:void 0,style:{height:C.scalingValue(y??0,n??!1)}}),r.jsx("div",{...Z?{"data-testimonial-measure":"caption"}:{},style:{...Kt(j,n),...Q&&Q>0?{minHeight:Q}:{},textAlign:W,pointerEvents:"auto"},children:r.jsx(yi,{content:me.caption})})]})]})},fe=a.useCallback(me=>{E(me.maxTextPx),ae(me.maxCaptionPx)},[]);if(a.useLayoutEffect(()=>{if(!B){fe({maxTextPx:0,maxCaptionPx:0});return}const me=ne.current;if(!me)return;const ce=()=>{C.readTestimonialTextMeasure(me,fe)};ce();const U=new ResizeObserver(ce);return U.observe(me),()=>{U.disconnect()}},[B,fe,t]),!M)return r.jsx(r.Fragment,{});const We=B?{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:[B&&r.jsx("div",{ref:ne,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((me,ce)=>r.jsx("div",{style:{width:"100%"},children:K(me,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[Y&&A&&r.jsx("div",{className:mt(`${s}-fade-item-prev`,`${s}-fade-out`),children:K(Y,{...We,hideControls:!0})}),r.jsx("div",{className:mt(`${s}-fade-item-current`,A?`${s}-fade-in`:void 0),children:K(M,We)})]})]}),ie.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:ie.icon&&r.jsx(an,{url:ie.icon,fill:b,hoverFill:I,className:mt(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:mt(`${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:ie.icon&&r.jsx(an,{url:ie.icon,fill:b,hoverFill:I,className:`${s}-arrow-img`})})})]})]})})},Og=`import cn from 'classnames';
4296
4328
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4297
4329
  import { CommonComponentProps } from '../props';
4298
4330
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -5135,7 +5167,7 @@ type TestimonialsSettings = {
5135
5167
  z-index: 2;
5136
5168
  width: 100%;
5137
5169
  }
5138
- `}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),k=a.useRef(0),V=a.useRef(null),A=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,A.current=!1,oe(null),ae(!1),O(0),k.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,A.current=!1,oe(null),ae(!1),O(0),k.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),A.current=!0,ae(!0),me){D.current=ne;const Ze=-ne*Ie;k.current=Ze,O(Ze),z();return}k.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(A.current){if(D.current===ne){x.current=ne,fe();return}Se()}ue(),V.current=ne,oe(ne),A.current=!1,ae(!1),k.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"||!A.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,A.current=!1,k.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||A.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||A.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)),k.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:k,transition:V,titleMarginTop:A,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"||k==="horizontal"?"ltr":k==="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(A??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(A??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(A??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=>{k!=="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}-${k}-${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(A??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';
5170
+ `}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),k=a.useRef(0),V=a.useRef(null),A=a.useRef(!1),L=a.useRef(null),D=a.useRef(null),x=a.useRef(null),W=a.useRef(()=>{}),[M,Y]=a.useState(null),[F,X]=a.useState(null),[j,B]=a.useState("opening"),[ne,S]=a.useState(0),[E,O]=a.useState(0),[ae,ie]=a.useState(null),[$,re]=a.useState(!1),[P,te]=a.useState(!1),[K,fe]=a.useState(!1),[We,me]=a.useState(null),ce=a.useRef(n),U=a.useRef(void 0),Q=t[n],Z=Q?gi(Q):!1,ke=E!==0||$,we=ae!==null,Pe=a.useCallback(Se=>{const De=Se.currentTarget,Ve=De instanceof HTMLVideoElement?{width:De.videoWidth,height:De.videoHeight}:{width:De.naturalWidth,height:De.naturalHeight};!Ve.width||!Ve.height||me(Ve)},[]);a.useEffect(()=>{G.current=F},[F]),a.useEffect(()=>{const Se=v.current;if(!Se)return;const De=()=>X(Ds(Se));De();const Ve=new ResizeObserver(De);return Ve.observe(Se),()=>Ve.disconnect()},[]);const de=a.useCallback(()=>{L.current!==null&&(window.clearTimeout(L.current),L.current=null)},[]),ge=a.useCallback(()=>{const Se=D.current;D.current=null,de(),V.current=null,A.current=!1,ie(null),re(!1),O(0),k.current=0,te(!1),R.current=!1,b.current=0,I.current="none",Se===1?d():Se===-1&&l()},[de,d,l]),be=a.useCallback(()=>{de(),D.current=null,V.current=null,A.current=!1,ie(null),re(!1),O(0),k.current=0},[de]),z=a.useCallback(()=>{de(),L.current=window.setTimeout(()=>{D.current!==null&&ge()},vn+32)},[de,ge]),se=a.useCallback((Se,De)=>{var et;const Ve=((et=G.current)==null?void 0:et.width)??0;if(de(),V.current=Se,ie(Se),A.current=!0,re(!0),De){D.current=Se;const Ae=-Se*Ve;k.current=Ae,O(Ae),z();return}k.current=0,O(0),L.current=window.setTimeout(()=>{L.current=null,be()},vn+32)},[de,be,z]),he=a.useCallback(Se=>{if(!(t.length<=1)){if(A.current){if(D.current===Se){x.current=Se,ge();return}be()}de(),V.current=Se,ie(Se),A.current=!1,re(!1),k.current=0,O(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(Se,!0)})})}},[t.length,se,ge,be,de]);W.current=he;const ye=a.useCallback(Se=>{Se.propertyName!=="transform"||!A.current||D.current!==null&&ge()},[ge]),Me=a.useCallback(()=>{const Se=y.current;if(!Se)return;const De=Ds(Se);!De.width||!De.height||Y(De)},[]);a.useEffect(()=>{Me();const Se=y.current;if(!Se)return;const De=new ResizeObserver(()=>Me());return De.observe(Se),()=>De.disconnect()},[Me]),a.useEffect(()=>{j==="opening"&&M&&B("open")},[j,M]),a.useEffect(()=>{if(j!=="closing")return;const Se=setTimeout(()=>s(),vn);return()=>clearTimeout(Se)},[j,s]),a.useEffect(()=>()=>{de()},[de]),a.useLayoutEffect(()=>{ce.current===n&&U.current===(Q==null?void 0:Q.url)||(de(),D.current=null,ie(null),S(0),O(0),re(!1),fe(!1),te(!1),me(null),m.current=0,b.current=0,I.current="none",R.current=!1,A.current=!1,k.current=0,V.current=null,h.current=null,T.current=!1,ce.current=n,U.current=Q==null?void 0:Q.url)},[n,Q==null?void 0:Q.url,de]),a.useLayoutEffect(()=>{const Se=x.current;Se!==null&&(x.current=null,requestAnimationFrame(()=>{W.current(Se)}))},[n,Q==null?void 0:Q.url]),a.useEffect(()=>{if(j!=="open")return;let Se=null;const De=()=>{Se&&(document.removeEventListener("click",Se,!0),Se=null)},Ve=()=>{De(),Se=Ze=>{Ze.stopPropagation(),Ze.preventDefault(),De()},document.addEventListener("click",Se,!0)},et=Ze=>{const Ie=Ze<0?1:-1;if(Math.abs(Ze)>Yg&&t.length>1){se(Ie,!0);return}se(Ie,!1)},Ae=Ze=>{if(Ze.touches.length!==1||A.current)return;const Ie=Ze.touches[0];T.current=!0,h.current={x:Ie.clientX,y:Ie.clientY},I.current="none",b.current=0,R.current=!1},$e=Ze=>{if(!h.current||Ze.touches.length!==1||A.current)return;const Ie=Ze.touches[0],qe=Ie.clientX-h.current.x,Ee=Ie.clientY-h.current.y;if(I.current==="none"){if(Math.abs(qe)<10&&Math.abs(Ee)<10)return;if(Math.abs(qe)>Math.abs(Ee)){if(t.length<=1)return;I.current="horizontal"}else if(Ee>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,te(!0),b.current=qe;const Je=qe<0?1:-1;V.current!==Je&&(V.current=Je,ie(Je)),k.current=qe,O(qe),Ze.preventDefault();return}I.current==="vertical"&&(R.current=!0,te(!0),m.current=Ee,S(Ee),Ze.preventDefault())},tt=()=>{if(!h.current)return;const Ze=I.current,Ie=R.current;if(Ie&&Ze==="horizontal")et(b.current),Ve();else if(Ie&&Ze==="vertical")if(m.current>Kg){const Ee=window.innerHeight;m.current=Ee,fe(!0),S(Ee),B("closing")}else m.current=0,S(0),Ve();else Ze==="horizontal"&&Math.abs(b.current)>0&&(et(b.current),Ve());h.current=null,I.current="none",b.current=0,R.current=!1,te(!1)};return document.addEventListener("touchstart",Ae,{passive:!0}),document.addEventListener("touchmove",$e,{passive:!1}),document.addEventListener("touchend",tt),document.addEventListener("touchcancel",tt),()=>{document.removeEventListener("touchstart",Ae),document.removeEventListener("touchmove",$e),document.removeEventListener("touchend",tt),document.removeEventListener("touchcancel",tt),De()}},[j,t.length,se]),a.useEffect(()=>{const Se=De=>{De.key==="Escape"&&(De.preventDefault(),De.stopPropagation(),j!=="closing"&&B("closing"))};return window.addEventListener("keydown",Se,!0),()=>window.removeEventListener("keydown",Se,!0)},[j]);const Le=()=>{j!=="closing"&&B("closing")},_=j==="open",pe=j==="closing",oe=ne>0?Math.max(0,1-ne/500):1,H=ne>0?Math.max(.35,1-ne/500):1,ee=M?p?M:ih(M,We):null,Fe=Se=>{if(Se.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const De=ee??Se.currentTarget.getBoundingClientRect(),Ve=Se.clientY-De.top,et=Math.min(52,De.height*.2);if(!(Ve>De.height-et)){if(Se.clientX-De.left<De.width/2){he(-1);return}he(1)}},le=Se=>{if(t.length<=1)return;const De=ee??Se.currentTarget.getBoundingClientRect(),Ve=Se.clientX-De.left,et=Se.clientY-De.top,Ae=Math.min(52,De.height*.2);if(et>De.height-Ae){Se.currentTarget.style.cursor="default";return}Se.currentTarget.style.cursor=Ve<De.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",je=E!==0||ne>0?`translate(${E}px, ${ne}px)`:void 0,gt=P&&!$?"none":$?`transform ${vn}ms ${Hn}`:K?`transform ${vn}ms ${Hn}, opacity ${vn}ms ${Hn}`:j==="opening"||pe?`opacity ${vn}ms ${Hn}`:"none",rt={...N,transform:je,opacity:ne>0?H:j==="opening"||pe?0:1,transition:gt,pointerEvents:"none"},ht={position:"absolute",top:((ee==null?void 0:ee.top)??0)-((F==null?void 0:F.top)??0),left:((ee==null?void 0:ee.left)??0)-((F==null?void 0:F.left)??0),width:ee==null?void 0:ee.width,height:ee==null?void 0:ee.height,objectFit:Ue,pointerEvents:Z&&_&&!ke?"auto":"none",touchAction:Z&&_?"none":void 0},lt=(F==null?void 0:F.width)??0,Ge=we?(n+ae+t.length)%t.length:null,ve=Ge!==null?t[Ge]:null,_e={...N,transform:we?`translateX(${ae*lt+E}px)`:void 0,opacity:1,transition:$?`transform ${vn}ms ${Hn}`:"none",pointerEvents:"none"},ze={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=ee?{position:"fixed",top:ee.top,height:ee.height,width:ee.width/2,zIndex:9999}:null;return r.jsxs("div",{ref:v,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:j==="open"?"none":void 0},onClick:Le,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?oe: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:_?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:_?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&&ve&&r.jsx("div",{style:_e,onTransitionEnd:ye,children:gi(ve)?r.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:ze},`neighbor-${Ge}-${ve.url}`):r.jsx("img",{src:ve.url,alt:ve.name,style:ze},`neighbor-${Ge}-${ve.url}`)}),M&&F&&Q&&r.jsx("div",{style:rt,onTransitionEnd:ye,children:Z?r.jsx(oh,{src:Q.url,phase:j,mediaRef:g,mediaStyle:ht,onLoadedMetadata:Pe,onClick:Fe,onMouseMove:le},`${n}-${Q.url}`):r.jsx("img",{ref:g,src:Q.url,alt:Q.name,onLoad:Pe,style:ht},`${n}-${Q.url}`)}),_&&Ke&&t.length>1&&!Z&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Ke,left:ee.left,cursor:"w-resize",pointerEvents:P?"none":"auto"},onClick:Se=>{if(T.current){T.current=!1;return}Se.stopPropagation(),he(-1)}}),r.jsx("div",{style:{...Ke,left:ee.left+ee.width/2,cursor:"e-resize",pointerEvents:P?"none":"auto"},onClick:Se=>{if(T.current){T.current=!1;return}Se.stopPropagation(),he(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:k,transition:V,titleMarginTop:A,subtitleMarginTop:L,titleColor:D,subtitleColor:x,lightboxCounterColor:W,titleFontFamily:M,titleFontSettings:Y,titleFontSize:F,titleLineHeight:X,titleLetterSpacing:j,titleWordSpacing:B,titleTextAppearance:ne,subtitleFontFamily:S,subtitleFontSettings:E,subtitleFontSize:O,subtitleLineHeight:ae,subtitleLetterSpacing:ie,subtitleWordSpacing:$,subtitleTextAppearance:re,lightboxCounterFontFamily:P,lightboxCounterFontSettings:te,lightboxCounterFontSize:K,lightboxCounterLineHeight:fe,lightboxCounterLetterSpacing:We,lightboxCounterWordSpacing:me,lightboxCounterTextAppearance:ce,showText:U="always",alignEntries:Q="off",align:Z="top"}=e,ke={fontSettings:{fontFamily:M,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:F??.01,lineHeight:X,letterSpacing:j??0,wordSpacing:B??0,textAppearance:ne,color:D},Pe={...rn(Kt(ke,n))},de={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:O??.01,lineHeight:ae,letterSpacing:ie??0,wordSpacing:$??0,textAppearance:re,color:x},be={...rn(Kt(de,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:fe,letterSpacing:We??0,wordSpacing:me??0,textAppearance:ce,color:W},he={...rn(Kt(z,n)),...Kr(K,fe,u,n)},ye=Xr(F,X,`${u}-item-title`,`${u}-text-tight-leading`),Me=Xr(O,ae,`${u}-item-subtitle`,`${u}-text-tight-leading`),Le=Kr(F,X,u,n),_=Kr(O,ae,u,n),pe=Xr(K,fe,`${u}-lightbox-counter`,`${u}-text-tight-leading`),oe=C.buildColorVars(u,{titleColor:D,subtitleColor:x,lightboxCounterColor:W},lh,ch),Fe=`${l&&l!=="default"?`${u}-state-${l}`:""}${U==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),le=h===0?1/0:h,N=(t??[]).slice(0,le),Ue=a.useMemo(()=>m==="on"?eh(N):[],[N,m]),je=v.entryWidth??.2,gt=(b==null?void 0:b.display)==="cover",rt=(b==null?void 0:b.ratioValue)??"1:1",ht=(b==null?void 0:b.reversed)??!1,[lt,Ge]=rt.split(":").map(Number),ze=`${ht?Ge:lt} / ${ht?lt:Ge}`,Ke=v.columnsCount,Se=C.scalingValue(je??0,n),De=Se,Ve=!gt&&T!=="off",et=N.length%Ke||Ke,Ae=et<Ke&&N.length>0,$e=N.length-et,tt=Ae?Math.floor((Ke-et)/2)+1:1,Ze=I?C.scalingValue(I,n):void 0,Ie={width:De,...gt?{aspectRatio:ze,height:"auto",overflow:"hidden"}:{height:"auto"},...Ze?{borderRadius:Ze,overflow:"hidden"}:{}},qe=`${u}-item-image-wrapper${Ve?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),Ee=p==="d"||p==="e"||p==="f",Je=Q==="on",Qe=`calc(${C.scalingValue(je??0,n)} * (${y} / 100))`,st=C.scalingValue(je*y/100,n),St=gt?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Ze?{borderRadius:Ze}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Ze?{borderRadius:Ze}:{}},[Pt,Nt]=a.useState(0),dt=a.useRef(null),yt=V==="fade"||k==="horizontal"?"ltr":k==="vertical"?"ttb":"ltr";a.useEffect(()=>{const ct=dt.current;if(!ct)return;const Te=new ResizeObserver(Ne=>{Nt(Math.round(Ne[0].contentRect.width))});return Te.observe(ct),()=>Te.disconnect()},[]);const Ot=(()=>{const ct={...oe},Te=dt.current?getComputedStyle(dt.current).getPropertyValue("--cntrl-article-width").trim():"";return Te&&(ct["--cntrl-article-width"]=Te),ct})(),[Ft,bt]=a.useState(!1),[Wt,Gt]=a.useState([]),[Zt,en]=a.useState(0),Tt=m==="on"&&(!n||i),_t=(ct,Te)=>{n&&!i||m!=="off"&&(Gt(ct),en(Te),bt(!0))};a.useEffect(()=>{if(!Ft||m!=="on"||typeof document>"u")return;const ct=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ct}},[Ft,m]),a.useEffect(()=>{!n||i||bt(!1)},[n,i]);const nn=a.useMemo(()=>Vg(u),[u]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:nn}}),m==="on"&&r.jsx(th,{mediaList:Ue}),r.jsx("div",{style:oe,children:r.jsx("div",{ref:dt,className:`${u}-wrapper ${u}-type-${p}${Je?` ${u}-align-entries`:""} ${u}-image-align-${Z} ${Fe}`.trim(),style:{gridTemplateColumns:`repeat(${Ke}, ${Se})`,rowGap:Je?0:C.scalingValue(g??0,n),columnGap:C.scalingValue(v.horizontalGap??0,n),width:C.scalingValue(v.wrapperWidth??0,n),...Je?{[`--${u}-align-entries-row-gap`]:C.scalingValue(g??0,n)}:{}},children:N.map((ct,Te)=>{var Ht;const Ne=Ns(ct.title),nt=Ns(ct.subtitle),pt=(((Ht=ct.link)==null?void 0:Ht.length)??0)>0&&m==="off"?ct.link:void 0,vt=Math.floor(Te/Ke)===Math.ceil(N.length/Ke)-1,It=Ae&&Te>=$e?`${tt+(Te-$e)}`:void 0,ft=Ee?r.jsxs("div",{className:`${u}-item-text-block`,children:[Ne&&r.jsx("p",{className:ye,style:{width:Qe,...Pe,...Le},children:ct.title}),Ne&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(A??0,n),width:st}}),nt&&r.jsx("p",{className:Me,style:{width:Qe,...be,..._},children:ct.subtitle}),nt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:st}})]}):null,Bt=Je?r.jsxs("div",{className:`${u}-item-title-row`,children:[!Ee&&r.jsx("div",{"data-controls":o&&Ne?"titleMarginTop":void 0,className:o&&Ne?`${u}-control`:void 0,style:{height:Ne?C.scalingValue(A??0,n):0,width:st}}),Ne&&r.jsx("p",{className:ye,style:{width:Qe,...Pe,...Le},children:ct.title}),Ee&&Ne&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(A??0,n),width:st}})]}):null,At=Je?r.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!Ee&&r.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?C.scalingValue(L??0,n):0,width:st}}),nt&&r.jsx("p",{className:Me,style:{width:Qe,...be,..._},children:ct.subtitle}),Ee&&nt&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:C.scalingValue(L??0,n),width:st}})]}):null,kt=pt?r.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:[Bt,At]}):r.jsxs(r.Fragment,{children:[Bt,At]}),qt=Cc(ct.gallery),Ut=qt.filter($t=>$t.lightboxMedia).map($t=>$t.lightboxMedia),Dt=r.jsx("div",{className:qe,style:Ie,children:qt.length===0?null:T==="off"?(()=>{const{displayMedia:$t,lightboxMedia:w}=qt[0],xe=w?Ut.findIndex(Re=>Re.url===w.url):-1;return r.jsx(Os,{media:$t,className:`${u}-item-${gi($t)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&xe>=0?()=>_t(Ut,xe):void 0})})():r.jsxs(r.Fragment,{children:[Ve&&r.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:qt.map(({displayMedia:$t})=>gi($t)?r.jsx("video",{src:$t.url,muted:!0,playsInline:!0},`sizer-${$t.url}`):r.jsx("img",{src:$t.url,alt:""},`sizer-${$t.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:yt},onMoved:$t=>{k!=="random"||V==="fade"||Ug($t)},children:qt.map(({displayMedia:$t,lightboxMedia:w},xe)=>{const Re=w?Ut.findIndex(He=>He.url===w.url):-1;return r.jsx(es,{children:r.jsx(Os,{media:$t,className:`${u}-item-${gi($t)?"video":"image"}`.trim(),style:St,onMediaClick:Tt&&Re>=0?()=>_t(Ut,Re):void 0})},xe)})},`${V}-${je}-${k}-${G}-${Pt}-${d}`)]})}),jt=Ee?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Ne?"titleMarginTop":void 0,className:o&&Ne?`${u}-control`:void 0,style:{height:Ne?C.scalingValue(A??0,n):0,width:st}}),r.jsx("p",{className:ye,style:{width:Qe,...Pe,...Le},children:ct.title}),r.jsx("div",{"data-controls":o&&nt?"subtitleMarginTop":void 0,className:o&&nt?`${u}-control`:void 0,style:{height:nt?C.scalingValue(L??0,n):0,width:st}}),r.jsx("p",{className:Me,style:{width:Qe,...be,..._},children:ct.subtitle})]});return r.jsx("div",{className:`${u}-item`.trim(),style:It&&!Je?{gridColumn:It}:void 0,children:r.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Je&&vt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(y??0)>100?`calc(${Se} * (${y} / 100))`:Se,...It&&Je?{gridColumn:It}:{}},children:Je?r.jsx(r.Fragment,{children:Ee?r.jsxs(r.Fragment,{children:[kt,r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:Dt})]}):r.jsxs(r.Fragment,{children:[r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:Dt}),kt]})}):pt?r.jsxs(r.Fragment,{children:[r.jsxs("a",{href:pt,target:"_blank",className:`${u}-item-image-link`,children:[ft,Dt]}),!Ee&&r.jsx("a",{href:pt,target:"_blank",className:`${u}-item-text-link`,children:jt})]}):r.jsxs(r.Fragment,{children:[ft,Dt,jt]})})},Te)})})}),(!n||i)&&Ft&&typeof document<"u"&&m==="on"&&(()=>{const ct=(c?document.getElementById(c):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Ot,"data-selection":"none",children:r.jsx(rh,{prefix:u,items:Wt,index:Zt,imageDisplay:ah(R),isEditor:n,onClose:()=>bt(!1),onPrev:()=>en(Te=>(Te-1+Wt.length)%Wt.length),onNext:()=>en(Te=>(Te+1)%Wt.length),counterClassName:pe,counterStyle:he})}),ct)})()]})}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';
5139
5171
  import '@splidejs/react-splide/css/core';
5140
5172
  import { CommonComponentProps } from '../props';
5141
5173
  import {
@@ -7188,7 +7220,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7188
7220
  };
7189
7221
 
7190
7222
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7191
- `,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,k=C.scalingValue(m,i),V=C.scalingValue(b,i),A=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:A,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:k,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`
7223
+ `,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"],ot=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,is={title1:"1",title2:"2",title3:"3",count:"Count"},os=e=>[ot(e,"fontFamily"),ot(e,"fontSettings"),{type:"row",items:[ot(e,"fontSize"),ot(e,"lineHeight"),ot(e,"letterSpacing"),ot(e,"wordSpacing")]},ot(e,"textAlign"),ot(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=ot(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 Kt(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,k=C.scalingValue(m,i),V=C.scalingValue(b,i),A=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]),X=a.useMemo(()=>F.map(H=>M[H.widthKey]),[F,M]),j=a.useMemo(()=>Di(F.length,X),[F.length,X]),B=a.useMemo(()=>wo(F.length,X),[F.length,X]),ne=a.useMemo(()=>F.filter(H=>H.prefix==="title1"),[F]),S=a.useMemo(()=>F.filter(H=>H.prefix==="title2"||H.prefix==="title3"),[F]),E=a.useMemo(()=>Gn(ne,M),[ne,M]),O=a.useMemo(()=>Gn(S,M),[S,M]),ae=!!(t.title1||t.title2||t.title3),ie=I!==null;if(!(ae||ie))return null;const re=(p??0)>0||o,P=(H,ee)=>{const Fe=F.findIndex(N=>N.prefix===H.prefix);if(!L||ee==="single-row")return{effectiveWidth:B[Fe]??0,resolvedWidth:j[Fe]??0,maxWidth:ln(Fe,j)};if(ee==="two-row-top"){const N=ne.findIndex(Ue=>Ue.prefix===H.prefix);return{effectiveWidth:E.effective[N]??0,resolvedWidth:E.resolved[N]??0,maxWidth:ln(N,E.resolved)}}const le=S.findIndex(N=>N.prefix===H.prefix);return{effectiveWidth:O.effective[le]??0,resolvedWidth:O.resolved[le]??0,maxWidth:ln(le,O.resolved)}},te=(H,ee,Fe)=>{if(!L||Fe==="single-row"){const gt=H.findIndex(Ge=>Ge.prefix===ee.prefix),rt=H.map(Ge=>M[Ge.widthKey]),ht=Di(H.length,rt);return{effectiveWidth:wo(H.length,rt)[gt]??0,resolvedWidth:ht[gt]??0,maxWidth:ln(gt,ht)}}if(Fe==="two-row-top"){const gt=H.filter(Ge=>Ge.prefix==="title1"),rt=gt.findIndex(Ge=>Ge.prefix===ee.prefix),{resolved:ht,effective:lt}=Gn(gt,M);return{effectiveWidth:lt[rt]??0,resolvedWidth:ht[rt]??0,maxWidth:ln(rt,ht)}}const le=H.filter(gt=>gt.prefix==="title2"||gt.prefix==="title3"),N=le.findIndex(gt=>gt.prefix===ee.prefix),{resolved:Ue,effective:je}=Gn(le,M);return{effectiveWidth:je[N]??0,resolvedWidth:Ue[N]??0,maxWidth:ln(N,Ue)}},K=H=>Ec(F,j,Y,H)+(L?0:p??0),fe=()=>L?0:p??0,We=H=>S.slice(0,H).reduce((ee,Fe,le)=>ee+(Fe.marginLeftKey?Y[Fe.marginLeftKey]??0:0)+(O.resolved[le]??0),0),me=H=>{const ee=S[H];return We(H)+(ee.marginLeftKey?Y[ee.marginLeftKey]??0:0)+(O.resolved[H]??0)},ce=(H,ee,Fe)=>{const le=H.marginLeftKey?Y[H.marginLeftKey]??0:0,{effectiveWidth:N,resolvedWidth:Ue,maxWidth:je}=Fe??P(H,ee),gt=Math.max(le,Bn),rt=o&&ee==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":H.prefix,style:{width:C.scalingValue(N,i),...le>0?{marginLeft:C.scalingValue(le,i)}:{}},children:[r.jsx("p",{className:H.className,style:H.style,children:H.text}),rt&&H.marginLeftKey?r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(-le,i),width:C.scalingValue(gt,i),height:"100%",pointerEvents:"auto"}}):null,rt?r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(je),"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]},H.className)},U=(H="two-row")=>{const ee=F.findIndex(N=>N.prefix==="title1"),Fe=ee>=0?j[ee]:M.title1Width,le=H==="two-row"&&o;return r.jsx("div",{...le?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Fe)}:{},style:{width:C.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...le?{pointerEvents:"auto"}:{}}})},Q=()=>r.jsx("span",{className:`${e}-titles-baseline-strut`,style:D,"aria-hidden":"true",children:" "}),Z=H=>{const ee=Vn(e,H,D,x,W);return r.jsx(r.Fragment,{children:ee.map(Fe=>ce(Fe,"single-row",te(ee,Fe,"single-row")))})},ke=H=>{const ee=Vn(e,H,D,x,W),Fe=ee.find(le=>le.prefix==="title1");return Fe?ce(Fe,"two-row-top",te(ee,Fe,"two-row-top")):null},we=(H,ee=!1)=>{const Fe=Vn(e,H,D,x,W),le=Fe.filter(je=>je.prefix==="title2"||je.prefix==="title3"),N=o&&ee;return le.length>0||N||(g??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[le.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[r.jsx("div",{className:`${e}-titles-stack`,children:le.map(je=>ce(je,"two-row-bottom",te(Fe,je,"two-row-bottom")))}),ee&&o?r.jsxs(r.Fragment,{children:[ye(),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:A,width:"100%",flexShrink:0,pointerEvents:N?"auto":"none"}}):null]}):null},Pe=()=>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:H=>{H.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"}})]}),de=()=>ie?r.jsx("div",{className:`${e}-titles-row-header-controls`,children:Pe()}):null,ge=H=>r.jsx("div",{className:`${e}-titles-row-titles`,children:r.jsx("div",{className:`${e}-titles-stack`,children:H})}),be=H=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[ie||ae?Q():null,re?U("two-row"):null,ge(H),de()]}),z=(H,ee=!1)=>r.jsxs(r.Fragment,{children:[be(ke(H)),we(H,ee)]}),se=()=>{const H=L?-1:F.findIndex(le=>le.prefix==="title1"),ee=!L&&(o||(p??0)>0)?(()=>{const le=p??0,N=H>=0?j[H]:M.title1Width,Ue=Math.max(le,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,Fe=F.flatMap((le,N)=>{if(!le.marginLeftKey)return[];const Ue=Y[le.marginLeftKey]??0,je=Ic(F,j,Y,N)+fe(),gt=Math.max(Ue,Bn);return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(j[N]),style:{position:"absolute",top:0,left:C.scalingValue(je,i),width:C.scalingValue(gt,i),height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return ee?[ee,...Fe]:Fe},he=()=>F.map((H,ee)=>{const Fe=ln(ee,j),N=K(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"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"}})},`${H.widthKey}-junction`)}),ye=()=>S.flatMap((H,ee)=>{if(!H.marginLeftKey)return[];const Fe=Y[H.marginLeftKey]??0,le=We(ee),N=Math.max(Fe,Bn),{resolvedWidth:Ue}=P(H,"two-row-bottom");return r.jsx("div",{"data-controls":H.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ue),style:{position:"absolute",top:0,left:C.scalingValue(le,i),width:C.scalingValue(N,i),height:"100%",pointerEvents:"auto"}},H.marginLeftKey)}),Me=()=>S.map((H,ee)=>{const{maxWidth:Fe}=P(H,"two-row-bottom"),N=me(ee)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":H.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Fe),"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"}})},`${H.widthKey}-junction`)}),Le=()=>!o||L?null:r.jsxs(r.Fragment,{children:[se(),he()]}),_=!!(t.title2||t.title3||(g??0)>0||o),pe=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[ie||ae?Q():null,re?U("single-row"):null,ae?ge(Z(t)):r.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),de(),Le()]}),oe=()=>r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,..._?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:_?void 0:{flex:"0 0 auto",height:"auto"},children:z(t,!0)}),Le()]});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:k,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?oe():pe()})})})]})}function Lh(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rh(e){return`
7192
7224
  .${e}-wrapper {
7193
7225
  display: grid;
7194
7226
  align-items: start;
@@ -7508,7 +7540,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7508
7540
  pointer-events: auto;
7509
7541
  flex-shrink: 0;
7510
7542
  }
7511
- `}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),[k,V]=a.useState(0),A=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)},[k,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,k]),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,A.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,A.current={x:yt.clientX,y:yt.clientY},x.current="none",D.current=0,W.current=!1},ot=Qe=>{if(!A.current||Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0],Dt=yt.clientX-A.current.x,Lt=yt.clientY-A.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(!A.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());A.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,k=c.columnsCount,V=C.scalingValue(G,n),A=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%k||k,Fe=xe<k&&K.length>0,ge=K.length-xe,ce=Fe?Math.floor((k-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(${k}, ${V})`,rowGap:0,columnGap:A,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/k)===Math.ceil(K.length/k)-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';
7543
+ `}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),[k,V]=a.useState(0),A=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),X=a.useRef(null),j=a.useRef(null),B=a.useRef(()=>{}),ne=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[ae,ie]=a.useState(null),[$,re]=a.useState(Jr),[P,te]=a.useState(0),[K,fe]=a.useState("opening"),[We,me]=a.useState(0),[ce,U]=a.useState(0),[Q,Z]=a.useState(!1),[ke,we]=a.useState(null),[Pe,de]=a.useState(null),[ge,be]=a.useState(null),[z,se]=a.useState(!1),[he,ye]=a.useState(null),[Me,Le]=a.useState(!1),_=a.useRef(!1),[pe,oe]=a.useState(!1),[H,ee]=a.useState(!1),Fe=a.useRef(n),le=a.useRef(void 0),N=t[n],Ue=N?Ji(N):!1,je=ce!==0||Q,gt=!l&&(!s||!!d),rt=c&&!l,ht=u.length>1,lt=a.useCallback((w,xe)=>t.length<=1?null:t[(w+xe+t.length)%t.length]??null,[t]),Ge=ht?ao(u,p,-1):lt(n,-1),ve=ht?ao(u,p,1):lt(n,1),_e=ke===-1&&je?ht&&Pe!==null?ao(u,Pe,-1):ge!==null?lt(ge,-1):null:null,ze=ke===1&&je?ht&&Pe!==null?ao(u,Pe,1):ge!==null?lt(ge,1):null:null,Ke=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,Se=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,De=Ge&&rt?(()=>{const w=ht?Us(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return w&&w.url!==Ge.url?w:null})():null,Ve=ve&&rt?(()=>{const w=ht?Us(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return w&&w.url!==ve.url?w:null})():null,et=Ke??De,Ae=Se??Ve,$e=a.useCallback((w,xe,Re)=>{if(!w||!xe||!Re)return;const He=G.current,at=He.get(w);(at==null?void 0:at.width)===xe&&(at==null?void 0:at.height)===Re||(He.set(w,{width:xe,height:Re}),V(Mt=>Mt+1))},[]),tt=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const xe=G.current.get(w.url);return Nh(R.current,xe)},[k,P]),Ze=a.useCallback(()=>{if(!N)return;const w=tt(N);if(w){ie(w);return}const xe=R.current;xe&&ie(Xs(xe))},[N,tt]),Ie=a.useCallback(w=>{if(ht){const xe=u.length;de((p+w+xe)%xe),be(null);return}t.length>1&&(be((n+w+t.length)%t.length),de(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),Ee=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Je=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{Ee(),qe(!1)},to+32)},[Ee,qe]),Qe=a.useCallback(()=>{const w=I.current;if(!w){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:Jr.width,height:typeof window<"u"?window.innerHeight:Jr.height});return}const xe=w.getBoundingClientRect();re({left:xe.left,top:xe.top,width:xe.width,height:xe.height})},[]),st=a.useCallback((w,xe)=>{if(je){if(pe&&!Q)return`translate(${ce}px, 0px)`;if(Q&&ke!==null){const Re=tt(w);if(!Re)return;const{x:He,y:at}=Bh(Re,xe,ke,$);return`translate(${He}px, ${at}px)`}if(Q)return"translate(0px, 0px)"}},[je,pe,Q,ce,ke,$,tt]),St=a.useCallback(()=>{const w=X.current;X.current=null,Ee(),qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[Ee,qe,m,b]),Pt=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{X.current!==null&&St()},to+32)},[Ee,St]),Nt=a.useCallback(()=>{Ee(),X.current=null,qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none"},[Ee,qe]),dt=a.useCallback(w=>{if(!(!rt||!ae)){if(Y.current){if(X.current===w){j.current=w,St();return}Nt()}Ee(),Ie(w),X.current=w,we(w),qe(!0),Pt()}},[rt,ae,St,Nt,Ee,Ie,qe,Pt]);B.current=dt;const yt=a.useCallback(()=>{ne.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)},[]),Ot=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const xe=O.current?kh:Ph;S.current=window.setInterval(()=>{B.current(w)},xe)},[]),Ft=a.useCallback(w=>{ne.current!==w&&(yt(),ne.current=w,O.current=!1,B.current(w),Ot(w),E.current=window.setTimeout(()=>{E.current=null,ne.current===w&&(O.current=!0,Ot(w))},Mh))},[yt,Ot]),bt=a.useCallback(()=>{const w=R.current;if(!w)return;const xe=N==null?void 0:N.url,Re=xe?G.current.get(xe):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ie(Ia(w,Re.width,Re.height));return}const He=T.current;if(He&&xe&&(He.src===xe||He.currentSrc===xe)){const{width:Mt,height:it}=Hh(He);if(Mt&&it){$e(xe,Mt,it),ie(Ia(w,Mt,it));return}}const at=Xs(w);!at.width||!at.height||ie(at)},[N==null?void 0:N.url,$e]),Wt=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&bt();return}w.complete&&w.naturalWidth>0&&bt()}},[bt]),Gt=a.useCallback(()=>{Qe(),bt(),te(w=>w+1)},[Qe,bt]);a.useEffect(()=>{Gt();const w=R.current,xe=I.current,Re=new ResizeObserver(()=>Gt());return w&&Re.observe(w),xe&&Re.observe(xe),window.addEventListener("resize",Gt),()=>{Re.disconnect(),window.removeEventListener("resize",Gt)}},[Gt,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){bt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&bt()}},[N==null?void 0:N.url,n,bt]),a.useEffect(()=>{Ze()},[Ze,k]),a.useEffect(()=>{const w=new Set,xe=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),xe.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),xe.forEach(He=>{G.current.has(He.url)||Oh(He,$e)})},[t,u,$e]),a.useEffect(()=>{if(K!=="opening"||!ae)return;if(!y){fe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),fe("open")})});return()=>cancelAnimationFrame(w)},[K,ae,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),$n);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{Ee()},[Ee]),a.useLayoutEffect(()=>{Fe.current===n&&le.current===(N==null?void 0:N.url)||(Ee(),X.current=null,we(null),de(null),be(null),me(0),U(0),qe(!1),ee(!1),oe(!1),L.current=0,D.current=0,x.current="none",W.current=!1,A.current=null,M.current=!1,T.current=null,Ze(),Fe.current=n,le.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,Ee,Ze]),a.useLayoutEffect(()=>{const w=j.current;w!==null&&(j.current=null,requestAnimationFrame(()=>{B.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){_.current=!1,Le(!1);return}if(K!=="open"||_.current)return;if(!Ge&&!ve){_.current=!0;return}Le(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le(!0),_.current=!0})});return()=>cancelAnimationFrame(w)},[K,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const it=xt=>{xt.stopPropagation(),xt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},xe=it=>{const xt=it<0?1:-1;Ee(),Ie(xt),X.current=xt,we(xt),qe(!0),Pt()},Re=it=>{if(Math.abs(it)>Eh&&rt){xe(it);return}X.current=null,we(null),de(null),be(null),qe(!0),U(0),Je()},He=it=>{if(it.touches.length!==1||Y.current)return;const xt=it.touches[0];M.current=!0,A.current={x:xt.clientX,y:xt.clientY},x.current="none",D.current=0,W.current=!1},at=it=>{if(!A.current||it.touches.length!==1||Y.current)return;const xt=it.touches[0],zt=xt.clientX-A.current.x,Lt=xt.clientY-A.current.y;if(x.current==="none"){if(Math.abs(zt)<10&&Math.abs(Lt)<10)return;if(Math.abs(zt)>Math.abs(Lt)){if(!rt)return;x.current="horizontal"}else if(Lt>0){if(!gt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,oe(!0),D.current=zt,U(zt),it.preventDefault();return}x.current==="vertical"&&(W.current=!0,oe(!0),L.current=Lt,me(Lt),it.preventDefault())},Mt=()=>{if(!A.current)return;const it=x.current,xt=W.current;if(xt&&it==="horizontal")Re(D.current),w();else if(xt&&it==="vertical"){const zt=L.current;if(gt&&zt>Ih){const Lt=window.innerHeight;L.current=Lt,ee(!0),me(Lt),fe("closing")}else L.current=0,me(0);w()}else it==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());A.current=null,x.current="none",D.current=0,W.current=!1,oe(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,rt,qe,Je,Ee,gt,Pt,Ie]);const Zt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&ae&&(ye(w),se(!0)),fe("closing")},[g,y,ae]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;yt(),Zt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!rt)return;He.preventDefault();const at=He.key==="ArrowLeft"?-1:1;He.repeat&&ne.current===at||Ft(at)},xe=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const at=He.key==="ArrowLeft"?-1:1;ne.current===at&&yt()},Re=()=>{yt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",xe),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",xe),window.removeEventListener("blur",Re),yt()}},[K,s,d,Zt,rt,Ft,yt]),a.useEffect(()=>{K!=="open"&&yt()},[K,yt]);const en=()=>{K==="closing"||l||Zt()},Tt=K==="open",_t=K==="closing",nn=We>0?Math.max(0,1-We/500):1,ct=We>0?Math.max(.35,1-We/500):1,Te=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(X.current!==null){St();return}Ee(),qe(!1)}},[Ee,qe,St]),Ne=K==="closing"?he??y:y,nt=Ne&&ae&&(K==="opening"||_t)?Ah(Ne,ae):void 0,pt=je&&N?st(N,"center"):We>0?`translateY(${We}px)`:nt,vt=ae?Go(ae,$):null,It=!!(Ne&&ae),ft=It&&(K==="closing"||K==="open"&&z),Bt={position:"absolute",top:vt==null?void 0:vt.top,left:vt==null?void 0:vt.left,width:vt==null?void 0:vt.width,height:vt==null?void 0:vt.height,objectFit:"contain",transformOrigin:"top left",transform:pt,opacity:We>0?ct:It?1:K==="opening"||_t?0:1,transition:pe&&!Q?"none":Q?`transform ${to}ms ${un}`:H?`transform ${$n}ms ${un}, opacity ${$n}ms ${un}`:ft?`transform ${$n}ms ${un}`:K==="opening"||_t?`opacity ${$n}ms ${un}`:"none",pointerEvents:Ue&&Tt&&!je?"auto":"none",touchAction:Ue&&Tt?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},At={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!je?"auto":"none"},kt=(w,xe,Re="adjacent")=>{const He=tt(w);if(!He)return{display:"none"};const at=Re==="far"?xe==="left"?"far-left":"far-right":xe==="left"?"left-adjacent":"right-adjacent",{start:Mt}=ke!==null?Ac(He,at,ke,$):{start:Re==="far"?hr(He,xe,$):ji(He,xe,$)},it=Go(Mt,$),xt=st(w,at),zt=!je&&Re==="adjacent"&&Tt&&!Me?Vh(He,xe,$):null,Lt=Re==="far"&&je&&ke===(xe==="left"?-1:1),on=pe&&!Q?!1:Q,dn=Re==="adjacent"&&Tt&&Me&&!je;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:xt??(zt?`translate(${zt.x}px, ${zt.y}px)`:void 0),opacity:Re==="far"?Tt&&Lt?1:0:Tt?1:0,transition:on?Re==="far"?`transform ${to}ms ${un}`:`transform ${to}ms ${un}, opacity ${$n}ms ${un}`:dn?`transform ${$n}ms ${un}`:K==="opening"||_t?`opacity ${$n}ms ${un}`:"none",pointerEvents:"none",zIndex:1}},qt=(w,xe)=>{const Re=tt(w);return Re?zh(ji(Re,xe,$),xe,$):null},Ut=w=>xe=>{if(!l){if(M.current){M.current=!1;return}xe.stopPropagation(),dt(w)}},Dt=Ge?qt(Ge,"left"):null,jt=ve?qt(ve,"right"):null,Ht=Dt?Go(Dt,$):null,$t=jt?Go(jt,$):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:en,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?nn:0,transition:pe?"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:Tt?1:0,transition:pe?"none":`opacity ${$n}ms ${un}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:en})})]}),Tt&&et&&r.jsx(qo,{media:et,style:kt(et,"left","far"),onMeasure:$e,onTransitionEnd:Te},`far-prev-${et.url}`),Tt&&Ge&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:Ge,style:kt(Ge,"left"),onMeasure:$e,onTransitionEnd:Te},`prev-${Ge.url}`),Ht&&r.jsx("div",{style:{position:"absolute",top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Tt&&ve&&r.jsxs(r.Fragment,{children:[r.jsx(qo,{media:ve,style:kt(ve,"right"),onMeasure:$e,onTransitionEnd:Te},`next-${ve.url}`),$t&&r.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Tt&&Ae&&r.jsx(qo,{media:Ae,style:kt(Ae,"right","far"),onMeasure:$e,onTransitionEnd:Te},`far-next-${Ae.url}`),ae&&N&&(Ue?r.jsx(Xh,{src:N.url,phase:K,onMediaElement:Wt,wrapperStyle:Bt,videoStyle:At,onLoadedMetadata:bt,onTransitionEnd:Te},`${n}-${N.url}`):r.jsx("img",{ref:Wt,src:N.url,alt:N.name,onLoad:bt,onTransitionEnd:Te,style:Bt},`${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,k=c.columnsCount,V=C.scalingValue(G,n),A=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),[X,j]=a.useState([]),[B,ne]=a.useState(0),[S,E]=a.useState(0),[O,ae]=a.useState(null),[ie,$]=a.useState({title1:"",title2:"",title3:""}),re=(()=>{const ge={},be=M.current?getComputedStyle(M.current).getPropertyValue("--cntrl-article-width").trim():"";return be&&(ge["--cntrl-article-width"]=be),ge})(),P=!n||i||o,te=a.useMemo(()=>Rh(d),[d]),K=t??[],fe=K.length%k||k,We=fe<k&&K.length>0,me=K.length-fe,ce=We?Math.floor((k-fe)/2)+1:1,U=a.useMemo(()=>Wh(K),[K]),Q=a.useMemo(()=>Dh(K),[K]),Z=(ge,be,z)=>{if(n&&!o&&!i)return;const se=U.findIndex(ye=>ye.gridIndex===ge);if(se<0)return;const he=U[se];E(se),j(he.items),ne(be),$(he.entry),ae(z??null),F(!0)},ke=a.useCallback(()=>{F(!1),ae(null)},[]),we=a.useCallback(()=>{const ge=U[S];return!ge||!M.current?O:Fh(M.current,ge.gridIndex,y?"cover":"contain")??O},[U,S,O,y]),Pe=a.useCallback(ge=>{if(U.length>1){const be=U.length,z=(S+ge+be)%be,se=U[z],he=Math.min(B,se.items.length-1);E(z),j(se.items),ne(he),$(se.entry);return}ne(be=>(be+ge+X.length)%X.length)},[U,S,B,X.length]),de=U.length>1||X.length>1;return a.useEffect(()=>{if(!Y||typeof document>"u")return;const ge=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ge}},[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:Q}),r.jsx("div",{ref:M,className:`${d}-wrapper ${d}-align-entries ${d}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${k}, ${V})`,rowGap:0,columnGap:A,width:C.scalingValue(c.wrapperWidth??0,n),[`--${d}-align-entries-row-gap`]:C.scalingValue(u??0,n)},children:K.map((ge,be)=>{const z=rs(ge.gallery),se=as(z),he=se.filter(oe=>oe.lightboxMedia).map(oe=>oe.lightboxMedia),ye=Math.floor(be/k)===Math.ceil(K.length/k)-1,Me=We&&be>=me?`${ce+(be-me)}`:void 0,Le=se[0],_=Le!=null&&Le.lightboxMedia?he.findIndex(oe=>oe.url===Le.lightboxMedia.url):-1,pe=r.jsx("div",{className:`${d}-item-image-wrapper`,style:x,children:se.length>0&&r.jsx(Uh,{media:Le.displayMedia,gridIndex:be,className:`${d}-item-${Ji(Le.displayMedia)?"video":"image"}`.trim(),style:W,onMediaClick:P&&_>=0?oe=>Z(be,_,Pc(oe.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`,ye?`${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:pe}),r.jsx("div",{className:`${d}-item-subtitle-row`,children:r.jsx("div",{style:{height:0,width:D}})})]})},be)})}),Y&&typeof document<"u"&&(()=>{const ge=(l?document.getElementById(l):null)??document.body;return Yn.createPortal(r.jsx("div",{style:re,"data-selection":"none",children:r.jsx(Kh,{prefix:d,items:X,index:B,entry:ie,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:de,lightboxEntries:U,entryIdx:S,layoutId:s,sourceRect:O,resolveCloseSourceRect:we,onClose:ke,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),ge)})()]})}const Zh=`import { CommonComponentProps } from '../props';
7512
7544
  import { scalingValue, useScopedStyles } from '../utils/index';
7513
7545
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7514
7546
  import { createPortal } from 'react-dom';
@@ -9851,7 +9883,7 @@ export function Hive({
9851
9883
  </>
9852
9884
  );
9853
9885
  }
9854
- `,Jh="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>'),oi={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 Qh(e){const t={};return t[et(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[et(e,"fontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[et(e,"fontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[et(e,"lineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[et(e,"letterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[et(e,"wordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[et(e,"textAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[et(e,"textAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const zi=Xn.filter(e=>e!=="count"),ef=zi.reduce((e,t)=>({...e,...Qh(t)}),{}),tf=zi.reduce((e,t)=>({...e,[et(t,"fontFamily")]:"Arial",[et(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[et(t,"letterSpacing")]:0,[et(t,"wordSpacing")]:0,[et(t,"textAlign")]:"left",[et(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Qr(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[et(n,"fontSize")]=i),o!==void 0&&(t[et(n,"lineHeight")]=o),t},{})}const nf={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(zi.map(e=>[is[e],os(e)]))},of={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},rf=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...of,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),af={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{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"}},gallery:{type:"array",label:"Gallery",max:1,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"]}}}}}}}},required:["gallery"]},default:rf},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},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"]}},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"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...ef},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jh,closeIconColor:"#000000",closeIconHoverColor:"#999999",...tf},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Qr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Qr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Qr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[nf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},sf={element:Yh,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...zi.map(e=>({path:`${et(e,"fontFamily")}`}))]},fontRelations:{...zi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${et(t,"fontFamily")}`}),{})},schema:af,sourceCode:Zh};function lf(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)}function cf({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function ea(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function df(e){return String(e??"").trim().length>0}function Ks(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Ys(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Zs(e,t,n,i,o,s,l){const d=C.scalingValue(s,l),c=C.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function uf(e,t,n){const i=C.scalingValue(t,n),o=C.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Js=10,Qs=10,no={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function pf(e,t,n){return Math.max(t,Math.min(n,e))}function ta(e,t,n){return e+(t-e)*n}function mf(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+Js,y:n.clientY-d.top+Js}}switch(e){case"left":return{x:Qs+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Qs-i/2,y:l};default:return{x:o/2,y:l}}}function gf(e,t){const n=a.useRef(null),i=a.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=a.useRef(null),s=a.useCallback(()=>{const g=n.current,h=i.current;g&&(g.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=a.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=a.useCallback(()=>{const g=i.current;t?(g.x=ta(g.x,g.targetX,no.positionEase),g.y=ta(g.y,g.targetY,no.positionEase),g.rotation=ta(g.rotation,g.targetRotation,no.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),s();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,m=Math.abs(g.rotation-g.targetRotation)<.08;!h||!m?o.current=requestAnimationFrame(d):o.current=null},[s,t]),c=a.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=a.useCallback((g,h)=>{const m=i.current;m.targetX=g,m.targetY=h,m.targetRotation=0,m.x=g,m.y=h,m.rotation=0,m.lastX=g,m.hasLastX=!0,s(),t&&c()},[s,t,c]),p=a.useCallback((g,h)=>{if(!e)return;const m=i.current;if(t&&m.hasLastX){const b=g-m.lastX;m.targetRotation=pf(b*no.rotationFactor,-20,no.maxRotation)}else m.targetRotation=0;if(m.lastX=g,m.hasLastX=!0,m.targetX=g,m.targetY=h,t){c();return}m.x=g,m.y=h,m.rotation=m.targetRotation,s()},[e,s,t,c]),v=a.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),y=a.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return a.useEffect(()=>(e||y(),l),[e,y,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:y}}function hf(e){return`
9886
+ `,Jh="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>'),oi={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 Qh(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...oi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...oi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...oi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...oi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...oi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...oi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...oi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const zi=Xn.filter(e=>e!=="count"),ef=zi.reduce((e,t)=>({...e,...Qh(t)}),{}),tf=zi.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Qr(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const nf={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(zi.map(e=>[is[e],os(e)]))},of={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},rf=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...of,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),af={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{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"}},gallery:{type:"array",label:"Gallery",max:1,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"]}}}}}}}},required:["gallery"]},default:rf},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},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"]}},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"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...ef},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:Jh,closeIconColor:"#000000",closeIconHoverColor:"#999999",...tf},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...Qr({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...Qr({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...Qr({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[nf]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},sf={element:Yh,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...zi.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...zi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:af,sourceCode:Zh};function lf(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)}function cf({media:e,className:t,style:n}){const i=a.useRef(null);return a.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function ea(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function df(e){return String(e??"").trim().length>0}function Ks(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Ys(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Zs(e,t,n,i,o,s,l){const d=C.scalingValue(s,l),c=C.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?d:c,borderBottomWidth:!p||i?d:c}}function uf(e,t,n){const i=C.scalingValue(t,n),o=C.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Js=10,Qs=10,no={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function pf(e,t,n){return Math.max(t,Math.min(n,e))}function ta(e,t,n){return e+(t-e)*n}function mf(e,t,n,i){if(!t)return{x:0,y:0};const o=t.offsetWidth,l=t.offsetHeight/2;if(e==="cursor"&&n){const d=t.getBoundingClientRect();return{x:n.clientX-d.left+Js,y:n.clientY-d.top+Js}}switch(e){case"left":return{x:Qs+i/2,y:l};case"center":return{x:o/2,y:l};case"right":return{x:o-Qs-i/2,y:l};default:return{x:o/2,y:l}}}function gf(e,t){const n=a.useRef(null),i=a.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=a.useRef(null),s=a.useCallback(()=>{const g=n.current,h=i.current;g&&(g.style.transform=`translate3d(${h.x}px, ${h.y}px, 0) translate(-50%, -50%) rotate(${h.rotation.toFixed(3)}deg)`)},[]),l=a.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),d=a.useCallback(()=>{const g=i.current;t?(g.x=ta(g.x,g.targetX,no.positionEase),g.y=ta(g.y,g.targetY,no.positionEase),g.rotation=ta(g.rotation,g.targetRotation,no.rotationEase)):(g.x=g.targetX,g.y=g.targetY,g.rotation=g.targetRotation),s();const h=Math.abs(g.x-g.targetX)<.4&&Math.abs(g.y-g.targetY)<.4,m=Math.abs(g.rotation-g.targetRotation)<.08;!h||!m?o.current=requestAnimationFrame(d):o.current=null},[s,t]),c=a.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(d))},[d]),u=a.useCallback((g,h)=>{const m=i.current;m.targetX=g,m.targetY=h,m.targetRotation=0,m.x=g,m.y=h,m.rotation=0,m.lastX=g,m.hasLastX=!0,s(),t&&c()},[s,t,c]),p=a.useCallback((g,h)=>{if(!e)return;const m=i.current;if(t&&m.hasLastX){const b=g-m.lastX;m.targetRotation=pf(b*no.rotationFactor,-20,no.maxRotation)}else m.targetRotation=0;if(m.lastX=g,m.hasLastX=!0,m.targetX=g,m.targetY=h,t){c();return}m.x=g,m.y=h,m.rotation=m.targetRotation,s()},[e,s,t,c]),v=a.useCallback(g=>{l(),i.current.hasLastX=!1,g==null||g()},[l]),y=a.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return a.useEffect(()=>(e||y(),l),[e,y,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:v,reset:y}}function hf(e){return`
9855
9887
  .${e}-wrapper {
9856
9888
  display: grid;
9857
9889
  align-items: start;
@@ -10227,7 +10259,7 @@ a.${e}-list-item {
10227
10259
  overflow-wrap: anywhere;
10228
10260
  word-break: break-word;
10229
10261
  }
10230
- `}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}),k=po(T),V=sr(p,k,G),A=Hf(p,V,{...t,...T});return Object.keys(A).length===0?T:{...T,...A}};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],k=t[T];return typeof G=="number"&&typeof k=="number"&&G!==k});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:k,imageOnHover:V,imagePosition:A="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=A==="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(A,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=(k==null?void 0:k.min)??80,ft=(k==null?void 0:k.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';
10262
+ `}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(Kt(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}),k=po(T),V=sr(p,k,G),A=Hf(p,V,{...t,...T});return Object.keys(A).length===0?T:{...T,...A}};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],k=t[T];return typeof G=="number"&&typeof k=="number"&&G!==k});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:k,imageOnHover:V,imagePosition:A="cursor",imageInterpolation:L="on",entryHoverEffect:D,entryHoverShowOption:x,rowPaddingTop:W,rowPaddingBottom:M,rowPaddingTopB:Y,columnsOrder:F,textPaddingLR:X,textColor:j,backgroundColor:B,dividerColor:ne,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O}=e,[ae,ie]=a.useState(void 0),[$,re]=a.useState(null),P=a.useRef(null),te=V==="on"&&(!n||i),K=A==="cursor",fe=K&&L==="on",{anchorRef:We,onShow:me,onCursorMove:ce,exit:U}=gf(!!(te&&$!==null),fe),Q=(I??0)>0,Z=v==="b",ke=a.useRef(null),we=a.useRef(null),[Pe,de]=a.useState(null),[ge,be]=a.useState(Co),z=Nc(ge),se=Math.max(0,((y??0)-z)/2),he=Math.min(X??0,se),ye=Math.max(he,Ei),Me=((y??0)+z)/2;a.useLayoutEffect(()=>{if(!n){be(Co);return}const Te=()=>{be(Af(ke.current))};Te();const Ne=ke.current;if(!Ne)return;const nt=new ResizeObserver(Te);nt.observe(Ne);let pt=Ne;for(;pt&&!pt.style.getPropertyValue("--cntrl-article-width");)pt=pt.parentElement;return pt&&nt.observe(pt),()=>nt.disconnect()},[n,l]),a.useEffect(()=>{ie(void 0)},[I,R,t,g]),a.useEffect(()=>{n&&!i&&ie(void 0)},[n,i]);const Le=C.buildColorVars(c,{textColor:j,backgroundColor:B,dividerColor:ne,textHoverColor:S,backgroundHoverColor:E,dividerHoverColor:O},Pf,kf),_=s&&s!=="default"?`${c}-state-${s}`:"",oe=`${!n||i?D==="default"?`${c}-entry-hover-default`:D==="blinds"?`${c}-entry-hover-blinds`:D==="reveal"?`${c}-entry-hover-reveal`:"":""} ${_}`.trim(),H=D==="reveal"&&(!n||i),ee=(b==null?void 0:b[0])??!1,Fe=(b==null?void 0:b[1])??!1,le=a.useRef(e),N=a.useRef(l);a.useEffect(()=>{if(!d||!n){le.current=e,N.current=l;return}if(N.current!==l){le.current=e,N.current=l;return}const Te=le.current;if(!(Te!==e))return;if(typeof Te.columns=="number"&&typeof e.columns=="number"&&Te.columns!==e.columns){le.current=e;return}const nt=zf(e,Te,{designWidth:ge});le.current=e,jc(e,nt)&&d(nt)},[e,d,n,l,ge]);const Ue=a.useMemo(()=>Gf(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),je=a.useMemo(()=>oa(e,Bi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),gt=a.useMemo(()=>oa(e,Vi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),rt=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]),lt=a.useMemo(()=>qf(ht,p,Ue,je,gt,rt),[ht,p,Ue,je,gt,rt]),Ge=po(e),ve=a.useMemo(()=>fn.slice(0,p).map(Te=>Ue[Te]),[p,Ue]),_e=a.useMemo(()=>ds(p,Ge,Ue),[p,Ge,Ue]),ze=a.useMemo(()=>sr(p,Ge,Ue),[p,Ge,Ue]),Ke=a.useMemo(()=>lt.map((Te,Ne)=>Dc(ze[Ne]??0,Te.paddingLeft,Te.paddingRight)),[lt,ze]),Se=a.useMemo(()=>{const Te=g===0?1/0:g;return(t??[]).slice(0,Te).map((nt,pt)=>({id:pt,cells:Object.fromEntries(Kn.map(vt=>[vt,nt[vt]??""])),image:nt.image,link:nt.link}))},[t,g]),De=Q?ae??I:Se.length,Ve=a.useMemo(()=>Q?Se.slice(0,De):Se,[Se,Q,De]),et=Q&&De<Se.length,Ae=Ve.length>1||et,$e=[ee?`${c}-divider-top`:"",Fe||Ae?`${c}-divider-bottom`:""].filter(Boolean).join(" "),tt=!n||i,Ze=()=>{if(!tt)return;const Te=ae??I;if(!R){ie(Se.length);return}ie(Math.min(Te+R,Se.length))},Ie=Te=>C.scalingValue(Te,n??!1),qe=Z?Y??0:W??0,Ee=M??0,Je=h??0,Qe=Math.max(Ee,ia),st=Zs(0,Ve.length,ee,Fe,et,m??0,n??!1).borderTopWidth,St=Z?"rowPaddingTopB":"rowPaddingTop",Pt=lt[0],Nt=lt[lt.length-1],dt=Ke[0],yt=Ke[Ke.length-1],Ot=Pt&&dt?Math.max(dt.paddingLeft,Ei):0,Ft=Nt&&yt?Math.max(yt.paddingRight,Ei):0,bt=Ge,Wt=(Te,Ne)=>mf(A,ke.current,K?Te:null,Ne),Gt=(Te,Ne)=>{if(!te)return;const nt=Te.image;if(!(nt!=null&&nt.url)){U(()=>re(null));return}const pt=(k==null?void 0:k.min)??80,vt=(k==null?void 0:k.max)??320,It=($==null?void 0:$.rowId)===Te.id,ft=It?$.widthPx:Vf(pt,vt),{x:Bt,y:At}=Wt(Ne,ft);if(It&&K){ce(Bt,At);return}re({rowId:Te.id,url:nt.url,objectFit:"contain",isVideo:lf(nt),widthPx:ft}),P.current={x:Bt,y:At}},Zt=Te=>{if(!te||!$||!K)return;const{x:Ne,y:nt}=Wt(Te,$.widthPx);ce(Ne,nt)},en=()=>{$&&U(()=>re(null))},Tt=Te=>{H&&Ks(Te,c),!(!te||!$)&&U(()=>re(null))},_t=Te=>{H&&Ys(Te,c)};a.useLayoutEffect(()=>{if(!$||!P.current)return;const{x:Te,y:Ne}=P.current;P.current=null,me(Te,Ne)},[$==null?void 0:$.rowId,$==null?void 0:$.url,me]),a.useLayoutEffect(()=>{if(!u||Z){de(null);return}const Te=we.current,Ne=Te==null?void 0:Te.parentElement;if(!Te||!Ne){de(null);return}const nt=()=>{const vt=Te.querySelector("[data-list-row]");if(!vt){de(null);return}const It=Ne.getBoundingClientRect(),ft=vt.getBoundingClientRect();de(ft.top-It.top+ft.height/2)};nt();const pt=new ResizeObserver(nt);return pt.observe(Te),pt.observe(Ne),()=>pt.disconnect()},[u,Z,Ve,qe,Ee,Je,t,e,lt,ze,ge,m,ee,Fe,et]);const nn=a.useMemo(()=>!Z&&ss.some(Te=>{const Ne=Te.charAt(0),nt=e[`${Te}VerticalAlign`];return Hc(nt,e,Ne)}),[Z,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);a.useLayoutEffect(()=>{var Bt;const Te=ke.current;if(!Te)return;const Ne=()=>{Te.querySelectorAll("[data-list-col]").forEach(At=>{At.style.transform="";const kt=At.querySelector(`.${c}-list-col`);kt&&(kt.style.minHeight="",kt.style.height="");const qt=At.querySelector(`.${c}-list-col-title`);qt&&(qt.style.transform="")})};if(Z||!nn){Ne();return}const nt=()=>{const At=Array.from(Te.querySelectorAll("[data-list-row]")),kt=`${c}-list-col`,qt=`${c}-baseline-probe`;At.forEach(Ut=>{Ut.querySelectorAll("[data-list-col]").forEach(Dt=>{Dt.style.transform="";const jt=Dt.querySelector(`.${kt}`);jt&&(jt.style.minHeight="",jt.style.height="");const Ht=Dt.querySelector(`.${c}-list-col-title`);Ht&&(Ht.style.transform="")})}),At.forEach(Ut=>{const Dt=Array.from(Ut.querySelectorAll("[data-list-col]"));Tf(Ut,Dt,kt)}),Te.offsetHeight,At.forEach(Ut=>{const Dt=Array.from(Ut.querySelectorAll("[data-list-col]")),jt=Ut.getBoundingClientRect().top,Ht=new Map,$t=Dt.map(Re=>{const He=Re.querySelector(`.${c}-list-col-title`),at={el:Re,titleEl:He,letter:Re.getAttribute("data-col-letter")??"",kind:Re.getAttribute("data-valign")??"top",anchor:Re.getAttribute("data-valign-anchor")};return Ht.set(at.letter,at),at}),w=new Map,xe=(Re,He)=>{const at=w.get(Re.letter);if(at!==void 0)return at;const Mt=Re.anchor?Ht.get(Re.anchor):void 0;if(Re.kind!=="baseline"||!Mt||He.has(Re.letter)){const on=na(Re,jt,kt,qt);return w.set(Re.letter,on),on}He.add(Re.letter);const it=xe(Mt,He);He.delete(Re.letter);const xt=na(Re,jt,kt,qt),zt=it-xt;Lf(Re.titleEl,zt);const Lt=na(Re,jt,kt,qt);return w.set(Re.letter,Lt),Lt};$t.forEach(Re=>xe(Re,new Set))})};let pt=null;const vt=()=>{pt===null&&(pt=requestAnimationFrame(()=>{pt=null,nt()}))};nt();const It=new ResizeObserver(()=>vt());It.observe(Te);let ft=!1;return typeof document<"u"&&((Bt=document.fonts)!=null&&Bt.ready)&&document.fonts.ready.then(()=>{ft||vt()}),()=>{ft=!0,pt!==null&&(cancelAnimationFrame(pt),pt=null),It.disconnect(),Ne()}},[nn,Z,e,t,ge,Ve,ze]);const ct=a.useMemo(()=>hf(c),[c]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ct}}),r.jsx("div",{style:Le,children:r.jsxs("div",{ref:ke,className:`${c}-wrapper ${oe}${$e?` ${$e}`:""}${Z?` ${c}-type-b`:""}`.trim(),style:{width:C.scalingValue(y??0,n)},onMouseMove:te?Zt:void 0,onMouseLeave:te?en:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ve.map((Te,Ne)=>{var It;const nt=(((It=Te.link)==null?void 0:It.length)??0)>0,pt=nt&&(!n||i)?"a":"div",vt=Zs(Ne,Ve.length,ee,Fe,et,m??0,n??!1);return r.jsxs(pt,{ref:Ne===0?ft=>{we.current=ft}:void 0,className:`${c}-list-item${nt||x==="always"?` ${c}-list-item-has-link`:""}${et&&Ne===Ve.length-1?` ${c}-list-item-before-cut`:""}`,...nt?{href:Te.link,target:"_blank"}:{},style:vt,onMouseEnter:ft=>{H&&(nt||x==="always")&&Ks(ft,c),te&&Gt(Te,ft)},onMouseLeave:ft=>{H&&(nt||x==="always")&&Ys(ft,c)},children:[qe>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(qe)}}),r.jsxs("div",{className:`${c}-list-cols-row${Z?"":` ${c}-list-cols-row-h`}${u&&Ne===0&&Z?` ${c}-list-cols-row-controls`:""}`,...Z?{}:{"data-list-row":""},style:Z?void 0:{minHeight:Ie(Je)},children:[lt.map((ft,Bt)=>{const At=Bt===lt.length-1,kt=Ke[Bt],qt=ft.paddingBottom,Ut=df(Te.cells[ft.key]),Dt=Z&&Ut&&qt>0,jt=Z?{minHeight:Ie(Je)}:{width:Ie(ze[Bt])},Ht=Z?{paddingLeft:Ie(he),paddingRight:Ie(he)}:{paddingLeft:Ie(kt.paddingLeft),paddingRight:Ie(kt.paddingRight)},$t=ft.textPrefix.charAt(0),w=Z?xf(e[`${ft.textPrefix}VerticalAlign`]):vf(e[`${ft.textPrefix}VerticalAlign`],e,$t),xe=Z&&Ut&&u&&Ne===0;return Z&&!Ut?null:r.jsxs("div",{className:Z?`${c}-list-col-wrap`:void 0,...Z?{}:{"data-list-col":"","data-col-letter":$t,"data-valign":w.kind,...w.kind==="baseline"?{"data-valign-anchor":w.anchorLetter}:{}},children:[r.jsx("div",{className:`${c}-list-col${At?` ${c}-list-col-last`:""}`,style:{...Ht,...jt,...Z?{justifyContent:el(w.kind)}:{}},"data-test":ft.width,children:r.jsx("span",{className:nl(e,ft.textPrefix,`${c}-list-col-title`,`${c}-text-tight-leading`),style:{...tl(fr(e,ft.textPrefix),n),...il(e,ft.textPrefix,c,n),...Z?{}:wf(w.kind)},children:Te.cells[ft.key]??null})}),Dt&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(qt)}}),xe&&r.jsx("div",{"data-controls":ft.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:Ie(Math.max(qt,ia))}})]},ft.key)}),u&&Ne===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:Ie(ye),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:Ie(Math.max(ye,Ge-ye)),width:Ie(ye),height:"100%"}})]})]}),!Z&&Ee>0&&r.jsx("div",{className:`${c}-row-padding-handle`,style:{height:Ie(Ee)}}),u&&Ne===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:Ie(Qe)}})]},Te.id)}),u&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":St,"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:st,left:0,width:"100%",height:Ie(Math.max(qe,ia))}})},"row-padding-handles"),u&&!Z&&Pt&&Nt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((dt==null?void 0:dt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:0,width:Ie(Ot),height:"100%"}}),r.jsx("div",{"data-controls":Nt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[lt.length-1]-((yt==null?void 0:yt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(bt-Ft),width:Ie(Ft),height:"100%"}})]},"column-edge-padding-handles"),u&&!Z&&lt.slice(0,-1).map((Te,Ne)=>{const nt=lt[Ne+1],pt=_e.slice(0,Ne+1).reduce((At,kt)=>At+kt,0),vt=Ke[Ne],It=Ke[Ne+1],ft=Math.max(vt.paddingRight,Ei),Bt=Math.max(It.paddingLeft,Ei);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx("div",{"data-controls":Te.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Ne]-vt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(pt-ft),width:Ie(ft),height:"100%"}}),r.jsx("div",{"data-controls":nt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[Ne+1]-It.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Pe??void 0,className:`${c}-control-anchor`,style:{top:0,left:Ie(pt),width:Ie(Bt),height:"100%"}})]},`${Te.paddingRightKey}-padding`)}),u&&!Z&&lt.slice(0,-1).map((Te,Ne)=>{const nt=Bf(Ne,_e,ve,Ge),vt=_e.slice(0,Ne+1).reduce((It,ft)=>It+ft,0)-ol/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-min":String(cs),"data-controls-max-fraction":String(nt),"data-controls-variant":"column-width",className:`${c}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Ie(vt),width:Ie(ol),height:"calc(100%)",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)})]}),et&&(()=>{const Te=fr(e,An),Ne=Sf(e.cutLabelVerticalAlign),nt=Te.textTextAlign==="justify"||Z;return r.jsx("button",{type:"button",className:`${c}-cut-item`,style:{minHeight:Ie(T??0),cursor:tt?"pointer":"default",...uf(Fe,m??0,n??!1)},onClick:tt?Ze:void 0,onMouseEnter:H||te?Tt:void 0,onMouseLeave:H?_t:void 0,children:r.jsx("div",{className:`${c}-list-cols-row`,style:{...Z?{paddingLeft:Ie(he),paddingRight:Ie(he)}:{},justifyContent:$f(Te.textTextAlign),alignItems:el(Ne)},children:r.jsx("span",{className:nl(e,An,`${c}-cut-label`,`${c}-text-tight-leading`),style:{...tl(Te,n),...il(e,An,c,n),...nt?{width:"100%"}:{}},children:G})})})})(),te&&$&&(()=>{const Te=`${$.widthPx}px`,Ne={width:Te,height:"auto",maxHeight:Te,objectFit:"contain"};return r.jsx("div",{ref:We,className:`${c}-hover-media-anchor`,children:r.jsx(cf,{media:$,className:$.isVideo?`${c}-hover-video`:`${c}-hover-image`,style:Ne},`${$.rowId}-${$.url}`)})})()]})})]})}const Xf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10231
10263
  import { CommonComponentProps } from '../props';
10232
10264
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10233
10265
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -13480,7 +13512,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13480
13512
  pointer-events: none;
13481
13513
  z-index: 2;
13482
13514
  }
13483
- `}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:k="#000000",questionHoverColor:V="#666666",iconHoverColor:A="#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:k,questionHoverColor:V,iconHoverColor:A,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';
13515
+ `}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:k="#000000",questionHoverColor:V="#666666",iconHoverColor:A="#666666",iconActiveColor:L="#000000",dividerHoverColor:D="#000000",questionFontFamily:x,questionFontSettings:W,questionFontSize:M,questionLineHeight:Y,questionLetterSpacing:F,questionWordSpacing:X,questionTextAppearance:j,answerFontFamily:B,answerFontSettings:ne,answerFontSize:S,answerLineHeight:E,answerLetterSpacing:O,answerWordSpacing:ae,answerTextAppearance:ie,questionPaddingLeft:$=0,questionPaddingTop:re=0,questionPaddingBottom:P=0,answerPaddingLeft:te=0,answerPaddingRight:K=0,answerPaddingTop:fe=0,answerPaddingBottom:We=0}=e,me=t??[],[ce,U]=a.useState(()=>new Set),Q=!n||i;a.useEffect(()=>{U(new Set)},[g]),a.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const Z=Ke=>C.scalingValue(Ke,n??!1),ke=Math.max($,Nn),we=Math.max(re,Nn),Pe=Math.max(P,Nn),de=Math.max(te,Nn),ge=Math.max(K,Nn),be=Math.max(fe,Nn),z=Math.max(We,Nn),se=Math.max(0,(c??1)-b-m),he=Math.max(0,(c??1)-K),ye=Math.max(0,(c??1)-te),Me=Math.max(b,Nn),Le=Math.max(0,(c??1)-$-m),_=a.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),pe=a.useCallback(Ke=>ce.has(Ke),[ce]),oe=Q&&y==="default"?`${l}-entry-hover-default`:"",H=h??"",ee=H!=="",Fe=I.replace(/^rotate /,""),le=`${l}-icon-anim-${Fe}`,N=rn(Kt(pl(x,W,M,Y,F,X,j,R),n)),Ue=rn(Kt(pl(B,ne,S,E,O,ae,ie,T),n)),je=dl(M,Y,`${l}-question`,`${l}-text-tight-leading`),gt=dl(S,E,`${l}-answer-text`,`${l}-text-tight-leading`),rt=ul(M,Y,l,n),ht=ul(S,E,l,n),lt=C.buildColorVars(l,{questionColor:R,answerColor:T,dividerColor:G,iconColor:k,questionHoverColor:V,iconHoverColor:A,iconActiveColor:L,dividerHoverColor:D},py,my),Ge=s&&s!=="default"?`${l}-state-${s}`:"",ve=a.useCallback(Ke=>{Q&&U(Se=>{if(Se.has(Ke)){const Ve=new Set(Se);return Ve.delete(Ke),Ve}if(g==="on")return new Set([Ke]);const De=new Set(Se);return De.add(Ke),De})},[Q,g]),_e=a.useMemo(()=>hy(l),[l]),ze={[`--${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:_e}}),r.jsx("div",{style:lt,children:r.jsx("div",{className:mt(`${l}-wrapper`,n&&!i&&`${l}-editor`,oe,Ge),style:{width:C.scalingValue(c,n??!1),maxWidth:"100%",...ze},children:me.map((Ke,Se)=>{var tt;const De=pe(Se),Ve=((tt=Ke.question)==null?void 0:tt.trim())??"",et=Ke.answer,Ae=((et==null?void 0:et.length)??0)>0,$e=d&&Se===_;return r.jsxs("div",{className:mt(`${l}-item`,De&&`${l}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${l}-question-controls`,children:[$e&&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(we)}}),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(ke),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(Le),"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":De,style:{...N,...rt,paddingLeft:Z($),paddingRight:Z(b)},onClick:()=>ve(Se),children:[re>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(re)},"aria-hidden":"true"}),r.jsxs("span",{className:`${l}-question-row`,children:[r.jsx("span",{className:je,children:Ve}),Ae&&(ee?r.jsx("span",{className:`${l}-icon ${l}-icon-custom ${le}`,"aria-hidden":"true",children:r.jsx(an,{url:H,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 ${le}`,"aria-hidden":"true"}))]}),P>0&&r.jsx("span",{className:`${l}-padding-handle`,style:{height:Z(P)},"aria-hidden":"true"})]}),$e&&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(Pe)}})]}),Ae&&et&&r.jsx("div",{className:`${l}-panel`,"aria-hidden":!De,children:r.jsx("div",{className:`${l}-panel-inner`,children:r.jsxs("div",{className:`${l}-answer-controls`,children:[$e&&De&&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(be)}}),r.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(he),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:Z(de),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(ye),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:Z(ge),height:"100%"}})]}),fe>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(fe)}}),r.jsx("div",{className:`${l}-answer`,style:{...Ue,...ht,paddingLeft:Z(te),paddingRight:Z(K)},children:r.jsx("div",{className:gt,children:r.jsx(yi,{content:et})})}),We>0&&r.jsx("div",{className:`${l}-padding-handle`,style:{height:Z(We)}}),$e&&De&&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)}})]})})})]},Se)})})})]})}const yy=`import { useCallback, useEffect, useMemo, useState } from 'react';
13484
13516
  import cn from 'classnames';
13485
13517
  import { CommonComponentProps } from '../props';
13486
13518
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14228,7 +14260,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14228
14260
  </>
14229
14261
  );
14230
14262
  }
14231
- `;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]),k=a.useCallback(x=>{T(x)},[T]),V=o>0,A=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:A,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:k}:{},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:k,title2Width:V,title3Width:A,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:k,title2Width:V,title3Width:A}),[k,V,A]),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]:k??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`
14263
+ `;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]),k=a.useCallback(x=>{T(x)},[T]),V=o>0,A=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:A,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:k}:{},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??""}},Vt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,zy=e=>[Vt(e,"fontFamily"),Vt(e,"fontSettings"),{type:"row",items:[Vt(e,"fontSize"),Vt(e,"lineHeight"),Vt(e,"letterSpacing"),Vt(e,"wordSpacing")]},Vt(e,"textAlign"),Vt(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=Vt(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 Kt(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:k,title2Width:V,title3Width:A,title1MarginLeft:L=0,title2MarginLeft:D=0,title3MarginLeft:x=0,titleRowMarginBottom:W=0,titleHeaderLayout:M="desktop",contentMarginTop:Y,iconMarginLeft:F}=n,X=f=>C.scalingValue(f,i??!1),j=c??n.thumnailSize??.03,B=X(j),ne=X(u),S=X(p??.02),E=X(v??0),O=X(Y??0),ae=Yo(O),ie=X(F??0),[$,re]=a.useState(0),P=a.useRef($);P.current=$;const te=t[$],{title1:K,title2:fe,title3:We}=jy(te),me=aa("title1",ra(n,"title1"),i),ce=aa("title2",ra(n,"title2"),i),U=aa("title3",ra(n,"title3"),i),Q=M==="mobile",Z=!o&&(!i||s),ke=Z,we=Z,Pe=Z,de=Fn(R),ge=de?{"--image-aspect-ratio":Fr(R)}:void 0,be=!!(K||fe||We),z=a.useMemo(()=>Vy(e,K,fe,We,me,ce,U),[e,$,K,fe,We,me,ce,U]),se=a.useMemo(()=>({title1Width:k,title2Width:V,title3Width:A}),[k,V,A]),he=a.useMemo(()=>z.map(f=>se[f.widthKey]),[z,se]),ye=a.useMemo(()=>us(z.length,he),[z.length,he]),Me=a.useMemo(()=>Gc(z.length,he),[z.length,he]),Le=a.useMemo(()=>z.filter(f=>f.prefix==="title1"),[z]),_=a.useMemo(()=>z.filter(f=>f.prefix==="title2"||f.prefix==="title3"),[z]),pe=a.useMemo(()=>fl(Le,se),[Le,se]),oe=a.useMemo(()=>fl(_,se),[_,se]),H=a.useCallback((f,q)=>{const J=z.indexOf(f);if(!Q||q==="single-row")return{effectiveWidth:Me[J]??0,resolvedWidth:ye[J]??0,maxWidth:Zo(J,ye)};if(q==="two-row-top"){const Oe=Le.indexOf(f);return{effectiveWidth:pe.effective[Oe]??0,resolvedWidth:pe.resolved[Oe]??0,maxWidth:Zo(Oe,pe.resolved)}}const Ce=_.indexOf(f);return{effectiveWidth:oe.effective[Ce]??0,resolvedWidth:oe.resolved[Ce]??0,maxWidth:Zo(Ce,oe.resolved)}},[_,oe,Me,ye,z,Le,pe,Q]),ee=a.useCallback(f=>C.scalingValue(f,i??!1),[i]),Fe=ee(W??0),le=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?le[J.marginLeftKey]??0:0)+(ye[Ce]??0),0)+(Q?0:L??0),[z,le,ye,Q,L]),Ue=a.useCallback(()=>Q?0:L??0,[Q,L]),je=a.useCallback(f=>_.slice(0,f).reduce((q,J,Ce)=>q+(J.marginLeftKey?le[J.marginLeftKey]??0:0)+(oe.resolved[Ce]??0),0),[_,oe.resolved,le]),gt=a.useCallback(f=>{const q=_[f];return je(f)+(q.marginLeftKey?le[q.marginLeftKey]??0:0)+(oe.resolved[f]??0)},[_,oe.resolved,je,le]),rt=(f,q)=>{const J=f.marginLeftKey?le[f.marginLeftKey]??0:0,{effectiveWidth:Ce,resolvedWidth:Oe,maxWidth:Ye}=H(f,q),wt=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:ee(Ce),...J>0?{marginLeft:ee(J)}:{}},children:[r.jsx("p",{className:f.className,style:f.style,children:f.text}),wt&&f.marginLeftKey&&r.jsx("div",{"data-controls":f.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:ee(-J),width:`max(${ee(J)}, 10px)`,height:"100%",pointerEvents:"auto"}}),wt&&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:ee(-$i/2),width:ee($i),height:"100%",pointerEvents:"auto"}})]},f.className)},ht=()=>{const f=Q?-1:z.findIndex(Ce=>Ce.prefix==="title1"),q=!Q&&(o||(L??0)>0)?(()=>{const Ce=L??0,Oe=f>=0?ye[f]:k??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Oe),style:{position:"absolute",top:0,left:0,width:`max(${ee(Ce)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,J=z.flatMap((Ce,Oe)=>{if(!Ce.marginLeftKey)return[];const Ye=le[Ce.marginLeftKey]??0,wt=Gy(z,ye,le,Oe)+Ue();return r.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye[Oe]),style:{position:"absolute",top:0,left:ee(wt),width:`max(${ee(Ye)}, 10px)`,height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)});return q?[q,...J]:J},lt=()=>z.map((f,q)=>{const J=Zo(q,ye),Oe=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:ee(Oe),width:ee($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),Ge=()=>_.flatMap((f,q)=>{if(!f.marginLeftKey)return[];const J=le[f.marginLeftKey]??0,Ce=je(q),{resolvedWidth:Oe}=H(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(Oe),style:{position:"absolute",top:0,left:ee(Ce),width:`max(${ee(J)}, 10px)`,height:"100%",pointerEvents:"auto"}},f.marginLeftKey)}),ve=()=>_.map((f,q)=>{const{maxWidth:J}=H(f,"two-row-bottom"),Oe=gt(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:ee(Oe),width:ee($i),height:"100%",pointerEvents:"auto"}})},`${f.widthKey}-junction`)}),_e=a.useRef(null),ze=a.useRef(null),Ke=a.useRef(null),Se=a.useRef(null),De=a.useRef([]),Ve=a.useRef([]),et=a.useRef(0),Ae=a.useRef(null),$e=a.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),tt=a.useRef(null),Ze=a.useRef(null),Ie=a.useRef(0),qe=a.useRef("forward"),Ee=a.useRef(0),Je=a.useRef(null),Qe=a.useRef(!1),st=t.length>1&&(!o||!!s),St=st?3:1,Pt=a.useMemo(()=>Array.from({length:St},()=>t).flat(),[t,St]),[Nt,dt]=a.useState(!1),[yt,Ot]=a.useState(!1),[Ft,bt]=a.useState(!0),Wt=a.useRef(null),Gt=a.useRef(null),Zt=a.useRef(!1),en=a.useRef(!1),Tt=a.useRef(null),_t=a.useRef(null),nn=ke&&!Ft,ct=a.useCallback(()=>{ke&&(bt(!0),_t.current&&clearTimeout(_t.current),_t.current=setTimeout(()=>{$e.current.isActive||bt(!1)},My))},[ke]),Te=a.useCallback(()=>{o||en.current||(en.current=!0,Ot(!1),Tt.current=setTimeout(()=>{l()},mo))},[o,l]),Ne=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:C.scalingValue(g??0,i),height:C.scalingValue(g??0,i),marginRight:ie,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Te,"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:ie,height:"100%",pointerEvents:"auto"}})]}),nt=(f="two-row")=>r.jsx("div",{...f==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:ee(L??0),flexShrink:0,...f==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...f==="two-row"&&o?{pointerEvents:"auto"}:{}}}),pt=()=>{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?nt():null,f&&rt(f,"two-row-top"),y&&Ne()]}),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=>rt(Ce,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[Ge(),ve()]})]}):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:Fe,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},vt=()=>r.jsxs(r.Fragment,{children:[(L??0)>0||o?nt("single-row"):null,z.map(f=>rt(f,"single-row")),o?r.jsxs(r.Fragment,{children:[ht(),lt()]}):null,y?Ne():null]}),It=a.useCallback(f=>!!(f.closest("[data-controls]")||f.closest(`.${e}-thumbnails`)||f.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:ft,backdropStyle:Bt,mediaAreaStyle:At,overlayContentStyle:kt,swipeHandlers:qt,dismissAreaStyle:Ut}=Bc({enabled:Z??!1,onClose:Te,animMs:mo,isBlockedTarget:It}),Dt=()=>{if(!st||t.length===0)return et.current=0,0;const f=Ve.current[0],q=Ve.current[t.length];if(!f||!q)return et.current;const J=q.offsetLeft-f.offsetLeft;return J>0&&(et.current=J),et.current},jt=(f=!1)=>{if(!st)return;const q=ze.current,J=Dt();!q||J<=0||J<q.clientWidth*.25||(q.scrollLeft<=0?(q.scrollLeft+=J,f&&($e.current.scrollLeft+=J),Qe.current&&(Ee.current+=J)):q.scrollLeft>=J*2&&(q.scrollLeft-=J,f&&($e.current.scrollLeft-=J),Qe.current&&(Ee.current-=J)))},Ht=(f,q=(J=>(J=ze.current)==null?void 0:J.scrollLeft)()??0)=>{if(!st)return f;let Ce=t.length+f,Oe=1/0;for(let Ye=0;Ye<St;Ye++){const wt=Ye*t.length+f,Rt=Ve.current[wt];if(!Rt)continue;const tn=Math.abs(Rt.offsetLeft-q);tn<Oe&&(Oe=tn,Ce=wt)}return Ce},$t=f=>{const q=ze.current;return!f||!q?!1:f.offsetWidth>q.clientWidth+1},w=f=>{const q=ze.current;if(!f||!q||!$t(f))return!1;const J=f.offsetLeft,Ce=J+f.offsetWidth;return q.scrollLeft>=J-1&&q.scrollLeft+q.clientWidth<=Ce+1},xe=(f=(q=>(q=ze.current)==null?void 0:q.scrollLeft)()??0)=>{for(let Ce=0;Ce<Ve.current.length;Ce+=1){const Oe=Ve.current[Ce];if(Oe&&w(Oe))return Ce}let J={flatIndex:0,distance:1/0};return Ve.current.forEach((Ce,Oe)=>{if(!Ce)return;const Ye=Math.abs(Ce.offsetLeft-f);Ye<J.distance&&(J={flatIndex:Oe,distance:Ye})}),J.flatIndex},Re=f=>{ze.current&&Ve.current.forEach(q=>{q&&(q.style.scrollSnapAlign=$t(q)&&f==="backward"?"end":"start")})},He=(f,q,J)=>{const Ce=f-q,Oe=xe(q),Ye=Ve.current[Oe];if(w(Ye))return xe(f)%t.length;const wt=Ve.current[Oe+1],Rt=Ye?wt?wt.offsetLeft-Ye.offsetLeft:Ye.offsetWidth:0,tn=Rt>0?Ce>Rt*Ko?1:Ce<-Rt*Ko?-1:0:0;return tn===0?J:st?(J+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,J+tn))},at=a.useCallback((f=!1)=>{if(I!=="on"||o)return;const q=Se.current,J=P.current,Ce=De.current[J];if(!q||!Ce||q.scrollWidth<=q.clientWidth)return;const Oe=q.scrollLeft,Ye=Oe+q.clientWidth,wt=Ce.offsetLeft,Rt=wt+Ce.offsetWidth;if(wt>=Oe&&Rt<=Ye)return;const tn=q.scrollWidth-q.clientWidth;let Jt=Oe;if(!f&&Wt.current===null){const bi=De.current[J-1],eo=De.current[J+1],Oo=bi?Ce.offsetLeft-bi.offsetLeft:eo?eo.offsetLeft-Ce.offsetLeft:Ce.offsetWidth;Rt>Ye?Jt+=Oo:wt<Oe&&(Jt-=Oo)}else Rt>Ye?Jt=Rt-q.clientWidth:Jt=wt;q.scrollLeft=Math.max(0,Math.min(tn,Jt))},[o,I]),Mt=a.useCallback((f=!1)=>{f&&(Zt.current=!0),Gt.current===null&&(Gt.current=requestAnimationFrame(()=>{Gt.current=null;const q=Zt.current;Zt.current=!1,at(q)}))},[at]),it=a.useCallback(f=>{if(f===P.current)return;const q=P.current;P.current=f;const J=Math.abs(f-q)>1,Ce=st&&t.length>1&&(q===t.length-1&&f===0||q===0&&f===t.length-1);re(f),Mt(J||Ce)},[t.length,st,Mt]),xt=()=>{if(!ze.current||t.length===0||Wt.current!==null||$e.current.isActive&&$e.current.hasMoved)return;const f=ze.current.scrollLeft,q=xe(f)%t.length;q!==P.current&&it(q)},zt=()=>{Wt.current=null},Lt=f=>{const q=ze.current;q&&(q.style.scrollSnapType=f?"":"none")},on=()=>{var f;(f=Ze.current)==null||f.call(Ze),Ze.current=null},dn=()=>{Je.current!==null&&(cancelAnimationFrame(Je.current),Je.current=null),Qe.current=!1},ei=()=>{const f=ze.current;if(!f){Je.current=null,Qe.current=!1;return}const q=Ee.current-f.scrollLeft;if(Math.abs(q)<.5){f.scrollLeft=Ee.current,jt(),xt(),Je.current=null,Qe.current=!1;return}f.scrollLeft+=q*Ay,jt(),xt(),ct(),Je.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,Ie.current=f.scrollLeft,jt(),J!==void 0?(P.current=J,re(J)):xt(),Lt(!0),Ce==null||Ce()},_o=(f,{behavior:q="smooth",activeIndex:J,onComplete:Ce}={})=>{const Oe=ze.current,Ye=Ke.current;if(!Oe||!Ye)return;if(dn(),on(),Lt(!1),q==="auto"){Wo(Oe,f,J,Ce);return}const wt=Math.abs(f-Oe.scrollLeft),Rt=$y(wt,Ry,Iy,Oe.clientWidth*.55);Ze.current=Ly(Oe,Ye,f,{duration:Rt,easing:Ey,onComplete:()=>{Ze.current=null,Wo(Oe,f,J,Ce)}})},_r=(f="smooth")=>{const q=ze.current;if(!q||t.length===0)return;const J=xe()%t.length,Ce=Ht(J,q.scrollLeft),Oe=Ve.current[Ce];Oe&&_o(Oe.offsetLeft,{behavior:f,activeIndex:J})},Hr=(f,q="smooth",J,Ce)=>{const Oe=ze.current;if(!Oe||t.length===0)return;const Ye=(Ce??Oe.scrollLeft)-f,wt=xe(f),Rt=Ve.current[wt];if(w(Rt)){Lt(!0),xt();return}const tn=Ve.current[wt+1],Jt=Rt?tn?tn.offsetLeft-Rt.offsetLeft:Rt.offsetWidth:0;if((Jt>0?Ye>Jt*Ko?1:Ye<-Jt*Ko?-1:0:0)!==0){const cd=J??wt%t.length,dd=He(Ce??Oe.scrollLeft,f,cd);Sn(dd,q);return}const eo=Ce??Oe.scrollLeft,Oo=xe(eo),ms=Ve.current[Oo];if(ms&&Math.abs(ms.offsetLeft-eo)<1){Lt(!0),xt();return}_r("auto")},Sn=(f,q="smooth")=>{const J=ze.current;if(!J||t.length===0)return;const Ce=Ht(f,J.scrollLeft),Oe=Ve.current[Ce];Oe&&(q==="smooth"?Wt.current=f:Wt.current=null,P.current=f,re(f),Mt(!0),_o(Oe.offsetLeft,{behavior:q,activeIndex:f,onComplete:q==="smooth"?zt:void 0}))},xi=()=>{tt.current&&(window.removeEventListener("pointerup",tt.current),window.removeEventListener("pointercancel",tt.current),tt.current=null)},Ho=(f,q,J,Ce,Oe)=>{const Ye=J-f,wt=Ce-q,Rt=Math.abs(Ye),tn=Math.abs(wt);if(Rt<Wy||Rt<=tn)return!1;const Jt=Ye<0?1:-1,bi=st?(Oe+Jt+t.length)%t.length:Math.max(0,Math.min(t.length-1,Oe+Jt));return bi===Oe?!1:(Sn(bi),!0)},ni=f=>{if(!$e.current.isActive)return;xi();const q=ze.current;if(!q)return;const{scrollLeft:J,startActiveIndex:Ce,hasMoved:Oe}=$e.current,Ye=q.scrollLeft;jt(!0),$e.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},dt(!1),f!==void 0&&q.hasPointerCapture(f)&&q.releasePointerCapture(f),Oe?Hr(J,"smooth",Ce,Ye):(Lt(!0),xt()),ct()},No=(f,q)=>{const J=Ae.current;Ae.current=null,J&&(Ho(J.startX,J.startY,f,q,J.startActiveIndex),ct())},Nr=f=>{if(!we)return;if(f.pointerType==="touch"){if(dn(),Lt(!0),It(f.target))return;Ae.current={startX:f.clientX,startY:f.clientY,startActiveIndex:P.current};return}if(f.pointerType!=="mouse"||f.button!==0||It(f.target))return;const q=ze.current;if(!q)return;dn(),on(),ti(),Wt.current=null,$e.current={isActive:!0,startX:f.clientX,scrollLeft:q.scrollLeft,startActiveIndex:P.current,hasMoved:!1},Lt(!1),ct(),q.setPointerCapture(f.pointerId),xi();const J=Ce=>{Ce.pointerType==="mouse"&&ni(Ce.pointerId)};tt.current=J,window.addEventListener("pointerup",J),window.addEventListener("pointercancel",J)},Or=f=>{if(!we||f.pointerType!=="mouse")return;const q=ze.current;if(!q||!$e.current.isActive)return;if(f.buttons===0){ni(f.pointerId);return}const J=f.clientX-$e.current.startX;Math.abs(J)>Fy&&($e.current.hasMoved=!0,dt(!0)),$e.current.hasMoved&&(f.preventDefault(),q.scrollLeft=$e.current.scrollLeft-J,jt(!0),xt(),ct())},ue=f=>{if(we){if(f.pointerType==="touch"){f.type==="pointerup"?No(f.clientX,f.clientY):Ae.current=null;return}f.pointerType==="mouse"&&ni(f.pointerId)}},Be=f=>{!we||f.pointerType!=="mouse"||ni(f.pointerId)};return Vc(),a.useEffect(()=>{const f=requestAnimationFrame(()=>Ot(!0));return()=>{cancelAnimationFrame(f),on(),xi(),Gt.current!==null&&(cancelAnimationFrame(Gt.current),Gt.current=null),Tt.current&&clearTimeout(Tt.current),_t.current&&clearTimeout(_t.current)}},[]),a.useEffect(()=>{if(!ke){bt(!0);return}ct();const f=()=>ct();return document.addEventListener("pointermove",f,{passive:!0}),document.addEventListener("pointerdown",f,{passive:!0}),()=>{document.removeEventListener("pointermove",f),document.removeEventListener("pointerdown",f),_t.current&&clearTimeout(_t.current)}},[ke,ct]),a.useEffect(()=>{const f=q=>{q.key==="Escape"&&Te()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[Te]),a.useLayoutEffect(()=>{Dt()},[E,t.length,st]),a.useLayoutEffect(()=>{o||Sn(P.current,"auto")},[E,o]),a.useLayoutEffect(()=>{Sn(0,"auto")},[t.length,st]),a.useEffect(()=>{const f=ze.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,Oe=J.deltaY*Ce*Py;if(Oe!==0){if(on(),Qe.current||(Qe.current=!0,Ee.current=f.scrollLeft,Wt.current=null,Lt(!1)),Ee.current+=Oe,!st){const Ye=f.scrollWidth-f.clientWidth;Ee.current=Math.max(0,Math.min(Ye,Ee.current))}ct(),Je.current===null&&(Je.current=requestAnimationFrame(ei))}};return f.addEventListener("wheel",q,{passive:!1}),()=>{f.removeEventListener("wheel",q),dn()}},[o,Z,st]),a.useEffect(()=>{const f=ze.current;if(!f)return;const q=()=>{jt($e.current.isActive);const Ce=f.scrollLeft,Oe=Ce-Ie.current;Ie.current=Ce;const Ye=et.current>0?et.current*.5:1/0;if(Oe!==0&&Math.abs(Oe)<Ye){const wt=Oe>0?"forward":"backward";wt!==qe.current&&(qe.current=wt,Re(wt))}$e.current.isActive&&$e.current.hasMoved||xt()};f.addEventListener("scroll",q,{passive:!0});const J=new ResizeObserver(()=>{Dt(),jt($e.current.isActive),Re(qe.current),xt()});return J.observe(f),()=>{on(),f.removeEventListener("scroll",q),J.disconnect()}},[t.length,st]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{ft||Te()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:yt?1:0,transition:`opacity ${mo}ms ease`,pointerEvents:yt?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Bt}}),r.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Ut,...qt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:At,onClick:f=>f.stopPropagation(),children:r.jsx("div",{ref:ze,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":Nt?"true":"false",onPointerDown:Nr,onPointerMove:Or,onPointerUp:ue,onPointerCancel:ue,onLostPointerCapture:Be,children:r.jsx("div",{ref:Ke,className:`${e}-lightbox-strip-track`,style:{gap:E},children:Pt.map((f,q)=>{const J=f.image.objectFit??"contain",Ce=q%t.length,Oe=Math.floor(q/t.length),Ye=Yo(E),wt=`calc(-0.5 * (${Ye} + ${E}))`;return r.jsxs("div",{ref:Rt=>Ve.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&&Oe===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:wt,width:Ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Oe}-${f.image.url}-${Ce}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:kt,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:ae,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${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:(be||y)&&r.jsx("div",{className:`${e}-header ${Q?`${e}-header-two-row`:`${e}-header-single-row`}`,children:Q?pt():be||y?vt():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:Se,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:J=>J.stopPropagation(),children:r.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":T,style:{gap:ne,"--thumbnail-active-color":G},children:[t.map((J,Ce)=>{const Oe=Yo(ne),Ye=`calc(-0.5 * (${Oe} + ${ne}))`;return r.jsxs("div",{ref:wt=>{De.current[Ce]=wt},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:()=>Pe&&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${de?` ${e}-thumb-image-cover`:""}`,src:J.image.url,alt:"",draggable:!1,style:{...ge,maxWidth:B,maxHeight:B,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:Oe,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`
14232
14264
  .${e}-wrapper {
14233
14265
  position: relative;
14234
14266
  width: 100%;
@@ -15159,7 +15191,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15159
15191
  </>
15160
15192
  );
15161
15193
  };
15162
- `,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:k=0,title2MarginLeft:V=0,title3MarginLeft:A=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=(k??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:A}),[V,A]),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:k??0),[De,gt,Le,K,k]),Gt=a.useCallback(()=>K?0:k??0,[K,k]),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(k??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||(k??0)>0)?(()=>{const q=k??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`
15194
+ `,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[Vt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Vt(e,"fontSettings")]={...si.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Vt(e,"fontSize")]={...si.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Vt(e,"lineHeight")]={...si.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Vt(e,"letterSpacing")]={...si.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Vt(e,"wordSpacing")]={...si.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Vt(e,"textAlign")]={...si.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Vt(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,[Vt(t,"fontFamily")]:"Goudy Bookletter 1911",[Vt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Vt(t,"letterSpacing")]:0,[Vt(t,"wordSpacing")]:0,[Vt(t,"textAlign")]:"left",[Vt(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[Vt(n,"fontSize")]=i),o!==void 0&&(t[Vt(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:`${Vt(e,"fontFamily")}`}))]},fontRelations:{...qi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Vt(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:k=0,title2MarginLeft:V=0,title3MarginLeft:A=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="single-row",countCloseGap:x=0,closeIcon:W,closeIconMaxWidth:M,closeIconColor:Y,closeIconHoverColor:F,contentMarginTop:X=0,iconMarginRight:j=0}=n,B=a.useCallback(ue=>C.scalingValue(ue,i??!1),[i]),ne=B(h??0),S=`${m}%`,E=`${b}%`,O=B(x),ae=B(X),ie=B(j),$=pi("title1",ui(n,"title1"),i),re=pi("title2",ui(n,"title2"),i),P=pi("title3",ui(n,"title3"),i),te=pi("count",ui(n,"count"),i),K=D==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),me=a.useMemo(()=>ar(t,v),[t,v]),[ce,U]=a.useState(l),Q=me[ce],Z=Q==null?void 0:Q.entry,[ke,we]=a.useState(!1),[Pe,de]=a.useState(null),[ge,be]=a.useState(!1),[z,se]=a.useState(null),[he,ye]=a.useState(!1),[Me,Le]=a.useState(0),[_,pe]=a.useState(),[oe,H]=a.useState(),[ee,Fe]=a.useState(null),le=a.useRef(null),N=a.useRef(0),Ue=a.useRef(0),je=a.useRef(0),gt=a.useRef(!1),rt=a.useRef(null),ht=a.useRef(null),lt=a.useRef(null),Ge=a.useRef(null),ve=a.useRef(null),_e=a.useRef(null),ze=a.useRef(null),Ke=a.useCallback(()=>{const ue=ht.current;if(!ue)return;const Be=ue.closest(`.${e}-lightbox-content-area`);if(!Be)return ue.getBoundingClientRect().width;const f=Array.from(Be.children).reduce((q,J)=>!(J instanceof HTMLElement)||J.contains(ue)?q:q+J.getBoundingClientRect().width,0);return Be.getBoundingClientRect().width-f},[e]),Se=a.useCallback(()=>{le.current&&(clearTimeout(le.current),le.current=null)},[]),De=a.useCallback(ue=>{ue===N.current&&(se(null),ye(!1))},[]),Ve=a.useCallback(()=>{o||gt.current||(gt.current=!0,u==null||u(),we(!1),rt.current=setTimeout(()=>{p()},300))},[o,u,p]),et=a.useCallback(ue=>!!(ue.closest("[data-controls]")||ue.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ae,backdropStyle:$e,mediaAreaStyle:tt,overlayContentStyle:Ze,swipeHandlers:Ie,dismissAreaStyle:qe}=Bc({enabled:We,onClose:Ve,animMs:300,isBlockedTarget:et}),Ee=a.useCallback(ue=>{d&&Tc(ue+1,c,!0)},[d,c]),Je=a.useCallback(ue=>{if(ue)return ue.getBoundingClientRect().height},[]),Qe=a.useCallback(ue=>{if(me.length===0)return;const Be=(ue%me.length+me.length)%me.length;if(Be===ce)return;const f=me[ce],q=me[Be];N.current+=1;const J=N.current,Ce=I==="fade"&&Gs(f==null?void 0:f.entry)!==Gs(q==null?void 0:q.entry),Oe=Je(lt.current),Ye=Ce?(()=>{const Rt=Ke();Yn.flushSync(()=>{Fe(q.entry)}),lt.current&&Rt&&(lt.current.style.width=`${Rt}px`);const tn=Je(lt.current);return lt.current&&(lt.current.style.width=""),{measuredIncomingTitlesHeight:tn,incomingTitlesMeasureWidth:Rt}})():void 0,wt=Math.max(Oe??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;Le(J),se(ce),ye(!0),U(Be),Ee(Be),je.current=Be,Ce?(Se(),wt&&pe(wt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&H(Ye.incomingTitlesMeasureWidth),de((f==null?void 0:f.entryIndex)??null),be(!0),Ue.current=q.entryIndex,le.current=setTimeout(()=>{de(null),be(!1),pe(void 0),H(void 0),Fe(null),le.current=null},400)):(Se(),de(null),be(!1),pe(void 0),H(void 0),Fe(null),Ue.current=q.entryIndex)},[ce,Se,Ke,Je,me,Ee,I]),st=a.useCallback(()=>{ze.current=null},[]),St=a.useCallback(ue=>{!fe||me.length<=1||ue.pointerType==="mouse"&&ue.button!==0||ue.target.closest("[data-controls]")||(ze.current={startX:ue.clientX,startY:ue.clientY,pointerId:ue.pointerId})},[fe,me.length]),Pt=a.useCallback(ue=>{var Rt;if(!fe||me.length<=1||ue.pointerType==="mouse"&&ue.button!==0)return;if(Ae){st();return}const Be=ze.current;if(!Be||Be.pointerId!==ue.pointerId||(st(),ue.target.closest("[data-controls]")))return;const q=ue.clientX-Be.startX,J=ue.clientY-Be.startY,Ce=Math.abs(q),Oe=Math.abs(J);if(Ce>=gh&&Ce>Oe){Qe(q>0?ce-1:ce+1);return}if(Ce>js||Oe>js)return;const Ye=(Rt=Ge.current)==null?void 0:Rt.getBoundingClientRect(),wt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;Qe(ue.clientX<wt?ce-1:ce+1)},[ce,fe,Qe,Ae,st,me.length]),Nt=a.useCallback(ue=>{const Be=ze.current;(Be==null?void 0:Be.pointerId)===ue.pointerId&&st()},[st]);Vc(),a.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const ue=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ge.current&&Ge.current.focus()})});return()=>{cancelAnimationFrame(ue),rt.current&&clearTimeout(rt.current),le.current&&clearTimeout(le.current);const Be=_e.current;Be&&document.contains(Be)&&Be.focus({preventScroll:!0})}},[]),a.useEffect(()=>{var ue;I!=="fade"&&(Ue.current=((ue=me[ce])==null?void 0:ue.entryIndex)??0,Se(),de(null),be(!1),pe(void 0),H(void 0))},[ce,Se,me,I]),a.useEffect(()=>{const ue=Be=>{if(Be.key==="Escape"){Ve();return}if(Be.key==="ArrowLeft"&&me.length>1){Qe(ce-1);return}if(Be.key==="ArrowRight"&&me.length>1){Qe(ce+1);return}if(Be.key==="Tab"&&Ge.current){const f=Ge.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],Oe=document.activeElement;Be.shiftKey?(Oe===J||!Ge.current.contains(Oe))&&(Be.preventDefault(),Ce.focus()):(Oe===Ce||!Ge.current.contains(Oe))&&(Be.preventDefault(),J.focus())}};return window.addEventListener("keydown",ue),()=>window.removeEventListener("keydown",ue)},[Qe,Ve,ce,me.length]),a.useLayoutEffect(()=>{Se(),N.current=0,Le(0),se(null),ye(!1),de(null),be(!1),pe(void 0),H(void 0),Fe(null),U(ue=>{const Be=Math.max(0,me.length-1);return Math.min(ue,Be)})},[Se,t.length,v,me.length]),a.useLayoutEffect(()=>{var f;const ue=Math.max(0,me.length-1),Be=Math.min(Math.max(0,l),ue);je.current=Be,Ue.current=((f=me[Be])==null?void 0:f.entryIndex)??0,U(Be)},[l]);const dt=Pe!==null?t[Pe]:null,yt=z!==null?me[z]:null,Ot=(Z==null?void 0:Z.title1)||(Z==null?void 0:Z.title2)||(Z==null?void 0:Z.title3)||(dt==null?void 0:dt.title1)||(dt==null?void 0:dt.title2)||(dt==null?void 0:dt.title3),Ft=Sh(v,me,t),bt=W!==null,Wt=Ot||Ft||bt,Gt=Ft&&bt?{gap:O}:void 0,Zt=`${e}-titles-stack${K?` ${e}-titles-stack-stacked`:""}`,en=`${e}-titles-layer-out${K?` ${e}-titles-layer-out-stacked`:""}`,Tt=`${e}-titles-layer-out`,_t=(k??0)>0||o,nn=B(L),ct=a.useMemo(()=>({title1Width:R??Fi.title1Width,title2Width:T??Fi.title2Width,title3Width:G??Fi.title3Width}),[R,T,G]),Te=a.useMemo(()=>({title2MarginLeft:V,title3MarginLeft:A}),[V,A]),Ne=a.useMemo(()=>Z?Vn(e,Z,$,re,P):[],[e,Z,$,re,P]),nt=a.useMemo(()=>Ne.map(ue=>ct[ue.widthKey]),[Ne,ct]),pt=a.useMemo(()=>Di(Ne.length,nt),[Ne.length,nt]),vt=a.useMemo(()=>wo(Ne.length,nt),[Ne.length,nt]),It=a.useMemo(()=>Ne.filter(ue=>ue.prefix==="title1"),[Ne]),ft=a.useMemo(()=>Ne.filter(ue=>ue.prefix==="title2"||ue.prefix==="title3"),[Ne]),Bt=a.useMemo(()=>Gn(It,ct),[It,ct]),At=a.useMemo(()=>Gn(ft,ct),[ft,ct]),kt=a.useCallback((ue,Be)=>{const f=Ne.findIndex(J=>J.prefix===ue.prefix);if(!K||Be==="single-row")return{effectiveWidth:vt[f]??0,resolvedWidth:pt[f]??0,maxWidth:ln(f,pt)};if(Be==="two-row-top"){const J=It.findIndex(Ce=>Ce.prefix===ue.prefix);return{effectiveWidth:Bt.effective[J]??0,resolvedWidth:Bt.resolved[J]??0,maxWidth:ln(J,Bt.resolved)}}const q=ft.findIndex(J=>J.prefix===ue.prefix);return{effectiveWidth:At.effective[q]??0,resolvedWidth:At.resolved[q]??0,maxWidth:ln(q,At.resolved)}},[Ne,ft,At,vt,pt,It,Bt,K]),qt=a.useCallback(ue=>Ec(Ne,pt,Te,ue)+(K?0:k??0),[Ne,pt,Te,K,k]),Ut=a.useCallback(()=>K?0:k??0,[K,k]),Dt=a.useCallback(ue=>ft.slice(0,ue).reduce((Be,f,q)=>Be+(f.marginLeftKey?Te[f.marginLeftKey]??0:0)+(At.resolved[q]??0),0),[ft,At.resolved,Te]),jt=a.useCallback(ue=>{const Be=ft[ue];return Dt(ue)+(Be.marginLeftKey?Te[Be.marginLeftKey]??0:0)+(At.resolved[ue]??0)},[ft,At.resolved,Dt,Te]),Ht=a.useCallback((ue,Be,f)=>{if(!K||f==="single-row"){const Ye=ue.findIndex(Jt=>Jt.prefix===Be.prefix),wt=ue.map(Jt=>ct[Jt.widthKey]),Rt=Di(ue.length,wt);return{effectiveWidth:wo(ue.length,wt)[Ye]??0,resolvedWidth:Rt[Ye]??0,maxWidth:ln(Ye,Rt)}}if(f==="two-row-top"){const Ye=ue.filter(Jt=>Jt.prefix==="title1"),wt=Ye.findIndex(Jt=>Jt.prefix===Be.prefix),{resolved:Rt,effective:tn}=Gn(Ye,ct);return{effectiveWidth:tn[wt]??0,resolvedWidth:Rt[wt]??0,maxWidth:ln(wt,Rt)}}const q=ue.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),J=q.findIndex(Ye=>Ye.prefix===Be.prefix),{resolved:Ce,effective:Oe}=Gn(q,ct);return{effectiveWidth:Oe[J]??0,resolvedWidth:Ce[J]??0,maxWidth:ln(J,Ce)}},[ct,K]),$t=(ue,Be,f)=>{const q=ue.marginLeftKey?Te[ue.marginLeftKey]??0:0,{effectiveWidth:J,resolvedWidth:Ce,maxWidth:Oe}=f??kt(ue,Be),Ye=Math.max(q,Bn),wt=o&&Be==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":ue.prefix,style:{width:B(J),...q>0?{marginLeft:B(q)}:{}},children:[r.jsx("p",{className:ue.className,style:ue.style,children:ue.text}),wt&&ue.marginLeftKey?r.jsx("div",{"data-controls":ue.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:B(-q),width:B(Ye),height:"100%",pointerEvents:"auto"}}):null,wt?r.jsx("div",{"data-controls":ue.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:B(-gn/2),width:B(gn),height:"100%",pointerEvents:"auto"}}):null]},ue.className)},w=(ue="two-row")=>{const Be=Ne.findIndex(J=>J.prefix==="title1"),f=Be>=0?pt[Be]:ct.title1Width,q=ue==="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:B(k??0),flexShrink:0,alignSelf:"stretch",...q?{pointerEvents:"auto"}:{}}})},xe=()=>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(me,ce,v,t)}),He=()=>Ft?o&&bt?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,at=()=>!Ft&&!bt?null:r.jsxs("div",{className:`${e}-titles-row-header-controls`,style:Gt,children:[He(),bt?xt():null]}),Mt=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ft||Ot?xe():null,_t?w("single-row"):null,Lt(Z),r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),at(),Sn()]}),it=()=>r.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[Ft||Ot?xe():null,_t?w("single-row"):null,r.jsxs("div",{className:`${e}-titles-row-titles`,style:ge&&_?{minHeight:_}:void 0,children:[r.jsx("div",{ref:lt,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ti(ee||Z)}),r.jsxs("div",{ref:ht,className:Zt,style:{position:ge?"absolute":"relative",inset:ge?0:void 0,width:"100%",...ge&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[dt&&ge?r.jsx("div",{className:`${en} ${e}-titles-fade-out`,children:ti(dt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:ti(Z)})]})]}),at(),Sn()]}),xt=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:C.scalingValue(M??0,i),height:C.scalingValue(M??0,i),marginRight:ie,"--close-icon-hover-color":F},children:[r.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ve,"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:ie,height:"100%",pointerEvents:"auto"}})]}),zt=(ue,Be)=>r.jsxs("div",{className:`${e}-titles-row-top`,children:[Ft||Ot?xe():null,_t?w("two-row"):null,Be!==void 0?r.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Be},children:ue}):r.jsxs(r.Fragment,{children:[ue,r.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),at()]}),Lt=ue=>{if(!ue)return null;const Be=Vn(e,ue,$,re,P);return r.jsx(r.Fragment,{children:Be.map(f=>$t(f,"single-row",Ht(Be,f,"single-row")))})},on=ue=>{if(!ue)return null;const Be=Vn(e,ue,$,re,P),f=Be.find(q=>q.prefix==="title1");return f?$t(f,"two-row-top",Ht(Be,f,"two-row-top")):null},dn=(ue,Be=!1)=>{const f=ue?Vn(e,ue,$,re,P):[],q=f.filter(Oe=>Oe.prefix==="title2"||Oe.prefix==="title3"),J=o&&Be;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(Oe=>$t(Oe,"two-row-bottom",Ht(f,Oe,"two-row-bottom"))),Be&&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:nn,width:"100%",flexShrink:0,pointerEvents:J?"auto":"none"}}):null]}):null},ei=(ue,Be=!1)=>r.jsxs(r.Fragment,{children:[zt(on(ue)),dn(ue,Be)]}),ti=ue=>K?r.jsx("div",{className:`${e}-titles-row-two-row`,children:ei(ue)}):ue?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Lt(ue)}):null,Wo=()=>{const ue=K?-1:Ne.findIndex(q=>q.prefix==="title1"),Be=!K&&(o||(k??0)>0)?(()=>{const q=k??0,J=ue>=0?pt[ue]:ct.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:B(Ce),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,f=Ne.flatMap((q,J)=>{if(!q.marginLeftKey)return[];const Ce=Te[q.marginLeftKey]??0,Oe=Ic(Ne,pt,Te,J)+Ut(),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(pt[J]),style:{position:"absolute",top:0,left:B(Oe),width:B(Ye),height:"100%",pointerEvents:"auto"}},q.marginLeftKey)});return Be?[Be,...f]:f},_o=()=>Ne.map((ue,Be)=>{const f=ln(Be,pt),J=qt(Be)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ue.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:B(J),width:B(gn),height:"100%",pointerEvents:"auto"}})},`${ue.widthKey}-junction`)}),_r=()=>ft.flatMap((ue,Be)=>{if(!ue.marginLeftKey)return[];const f=Te[ue.marginLeftKey]??0,q=Dt(Be),J=Math.max(f,Bn),{resolvedWidth:Ce}=kt(ue,"two-row-bottom");return r.jsx("div",{"data-controls":ue.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce),style:{position:"absolute",top:0,left:B(q),width:B(J),height:"100%",pointerEvents:"auto"}},ue.marginLeftKey)}),Hr=()=>ft.map((ue,Be)=>{const{maxWidth:f}=kt(ue,"two-row-bottom"),J=jt(Be)-gn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ue.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:B(J),width:B(gn),height:"100%",pointerEvents:"auto"}})},`${ue.widthKey}-junction`)}),Sn=()=>!o||K?null:r.jsxs(r.Fragment,{children:[Wo(),_o()]}),xi=ue=>{const Be=!ue.objectFit&&Fn(y);return{className:`${e}-slide-image-cell${Be?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:S,maxHeight:E,...Be?{"--image-aspect-ratio":Fr(y)}:{}}}},Ho=ue=>ue.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":ue.objectFit}}:Fn(y)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},ni=ue=>{if(ue.length===0)return null;const Be=ue.length>1,f=Zr(ne),q=`calc(-0.5 * (${f} + ${ne}))`;if(ue.length===1){const J=ue[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:Be?{gap:ne}:void 0,children:ue.map((J,Ce)=>r.jsxs("div",{...xi(J),children:[r.jsx("img",{...Ho(J),src:J.url,alt:J.name??"",draggable:!1}),o&&Be&&Ce<ue.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||dt!=null&&dt.title2||dt!=null&&dt.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:lt,className:Zt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(ee||Z)}),r.jsxs("div",{ref:ht,className:`${e}-titles-row-two-row`,style:{...ge&&_?{minHeight:_}:void 0,...ge&&oe?{width:oe,maxWidth:"100%"}:void 0},children:[zt(r.jsxs("div",{className:Zt,style:{position:ge?"absolute":"relative",inset:ge?0:void 0,width:"100%"},children:[dt&&ge?r.jsx("div",{className:`${Tt} ${e}-titles-fade-out`,children:on(dt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:on(Z)})]}),ge&&_?_:void 0),No?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[dt&&ge?r.jsx("div",{className:`${en} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:dn(dt)}):null,r.jsx("div",{className:`${e}-titles-layer-in${ge?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${K?` ${e}-titles-layer-in-stacked`:""}`,children:dn(Z,!0)})]}):null]})]}),Or=()=>{const ue=No;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ue?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:ue?void 0:{flex:"0 0 auto",height:"auto"},children:ei(Z,!0)}),Sn()]})};return r.jsxs("div",{ref:Ge,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ae||Ve()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:bt?void 0:-1,style:{opacity:ke?1:0,transition:"opacity 300ms ease",pointerEvents:ke?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:g,...$e}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:qe,...Ie,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:tt,onClick:ue=>ue.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&me.length>1?"true":"false",onPointerDown:fe?St:void 0,onPointerUp:fe?Pt:void 0,onPointerCancel:fe?Nt:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[yt&&he?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:ue=>{ue.target===ue.currentTarget&&De(Me)},children:r.jsx("div",{className:`${e}-slide-area`,children:ni(yt.images)})},`slide-out-${Me}`):null,r.jsx("div",{className:`${e}-slide-layer-in${he?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:Q?ni(Q.images):null})},`slide-in-${Me}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ze,children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ae,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:Wt&&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"?it():Mt()})})})]})]})]})};function ov(e){return`
15163
15195
  .${e}-wrapper {
15164
15196
  position: relative;
15165
15197
  width: 100%;
@@ -16437,7 +16469,7 @@ export type LightboxJournalSettings = {
16437
16469
  closeIconColor: string;
16438
16470
  closeIconHoverColor: string;
16439
16471
  };
16440
- `,sv="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>'),li={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 lv(e){const t={};return t[et(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[et(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[et(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[et(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[et(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[et(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[et(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[et(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cv=Xn.reduce((e,t)=>({...e,...lv(t)}),{}),dv=Xn.reduce((e,t)=>({...e,[et(t,"fontFamily")]:"Goudy Bookletter 1911",[et(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[et(t,"letterSpacing")]:0,[et(t,"wordSpacing")]:0,[et(t,"textAlign")]:"left",[et(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function la(e){return Xn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[et(n,"fontSize")]=i),o!==void 0&&(t[et(n,"lineHeight")]=o),t},{})}const uv=$h(),pv={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"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},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"]}},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"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...cv,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",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:sv,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...dv,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...la({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...la({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...la({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[uv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{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"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{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"},{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"}]}]}},mv={element:rv,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:pv,sourceCode:av,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Xn.map(e=>({path:`${et(e,"fontFamily")}`}))]},fontRelations:{...Xn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${et(t,"fontFamily")}`}),{})}},gv={sizeType:"custom",value:700,min:400,max:700};function yr(e,t){return{widthPx:e,heightPx:e*t}}function Ma(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function yl(e,t,n,i){const{heightPx:o}=yr(n,i);return Ma(e/2,t/2,e,t,n,o)}function qc(e,t,n){for(const i of n){const{heightPx:o}=yr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function hv(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":qc(e,t,n)||s==="area"?l??"none":d??"none"}function vl(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function fv(e){return`
16472
+ `,sv="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>'),li={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 lv(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...li.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...li.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...li.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...li.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...li.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...li.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const cv=Xn.reduce((e,t)=>({...e,...lv(t)}),{}),dv=Xn.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Goudy Bookletter 1911",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function la(e){return Xn.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const uv=$h(),pv={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"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},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"]}},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"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...cv,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",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:sv,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...dv,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...la({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...la({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...la({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[uv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{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"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{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"},{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"}]}]}},mv={element:rv,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:pv,sourceCode:av,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Xn.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{...Xn.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})}},gv={sizeType:"custom",value:700,min:400,max:700};function yr(e,t){return{widthPx:e,heightPx:e*t}}function Ma(e,t,n,i,o,s){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,s/2),i-s/2)}}function yl(e,t,n,i){const{heightPx:o}=yr(n,i);return Ma(e/2,t/2,e,t,n,o)}function qc(e,t,n){for(const i of n){const{heightPx:o}=yr(i.widthPx,i.aspectRatio),s=i.widthPx/2,l=o/2;if(e>=i.x-s&&e<=i.x+s&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function hv(e,t,n,i,o,s,l,d){if(o==="system")return"none";const c=i.getBoundingClientRect(),u=document.elementFromPoint(c.left+e,c.top+t);return u&&u.closest("a")?"none":qc(e,t,n)||s==="area"?l??"none":d??"none"}function vl(e,t,n){var d;const{sizeType:i,value:o,min:s,max:l}=t;return i==="custom"?o:i==="as is"?((d=n.get(e))==null?void 0:d.naturalWidth)??o:Math.round(Math.random()*(l-s)+s)}function fv(e){return`
16441
16473
  .${e}-root {
16442
16474
  position: absolute;
16443
16475
  top: 0;
@@ -16472,7 +16504,7 @@ export type LightboxJournalSettings = {
16472
16504
  width: 32px;
16473
16505
  height: 32px;
16474
16506
  }
16475
- `}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:k=gv,cursor:V="system",target:A="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,A,W,x))},[o,l,V,A,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,k,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 $=k.sizeType==="random"?oe.widthPx:vl(oe.url,k,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))},[k,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,k,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(A==="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:A==="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';
16507
+ `}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:k=gv,cursor:V="system",target:A="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 ae=o.getBoundingClientRect(),ie=S-ae.left,$=E-ae.top;y({x:ie,y:$}),h(hv(ie,$,O,o,V,A,W,x))},[o,l,V,A,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 X=(S,E,O,ae={})=>{var K,fe;if(!((K=S==null?void 0:S.image)!=null&&K.url))return null;const ie=((fe=G.current.get(S.image.url))==null?void 0:fe.aspectRatio)??1,$=vl(S.image.url,k,G.current),{heightPx:re}=yr($,ie);let P=0,te=0;return L==="same"?{x:P,y:te}=yl(E,O,$,ie):(P=ae.x??Math.random()*E,te=ae.y??Math.random()*O,{x:P,y:te}=Ma(P,te,E,O,$,re)),{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:ie,widthPx:$}},j=()=>{if(!o)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height;E===0||O===0||d(ae=>ae.length===0?ae:ae.map(ie=>{const $=k.sizeType==="random"?ie.widthPx:vl(ie.url,k,G.current),{heightPx:re}=yr($,ie.aspectRatio);if(L==="same"){const{x:K,y:fe}=yl(E,O,$,ie.aspectRatio);return{...ie,x:K,y:fe,widthPx:$}}const{x:P,y:te}=Ma(ie.xRatio*E,ie.yRatio*O,E,O,$,re);return{...ie,x:P,y:te,widthPx:$}}))};a.useEffect(()=>{if(!o||M.length===0||!R)return;const S=o.getBoundingClientRect(),E=S.width,O=S.height,ae=X(M[0],E,O);ae&&(d([ae]),u(M.length>1?1:0))},[k,L,o,t,R]),a.useEffect(()=>{if(!o)return;j();const S=new ResizeObserver(j);return S.observe(o),window.addEventListener("resize",j),()=>{S.disconnect(),window.removeEventListener("resize",j)}},[o,L,k,l.length]),a.useEffect(()=>{D==="last One"&&d(S=>S.length>0?[S[S.length-1]]:[])},[D]);const B=S=>{if(!o||M.length===0||!R)return;const E=o.getBoundingClientRect(),O=S.clientX-E.left,ae=S.clientY-E.top;if(A==="image"&&!qc(O,ae,l))return;let ie=0,$=0;L==="on Click"?(ie=O,$=ae):L==="same"?(ie=E.width/2,$=E.height/2):(ie=Math.random()*E.width,$=Math.random()*E.height);const re=M[c%M.length],P=X(re,E.width,E.height,{x:ie,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)},ne=V==="custom"&&g!=="none";return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Y}}),r.jsxs("div",{ref:s,onClick:B,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),className:`${i}-root`,style:{cursor:ne?"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:ne?"none":"default"},children:A==="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&&ne&&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';
16476
16508
  import { CommonComponentProps } from '../props';
16477
16509
  import { useScopedStyles } from '../utils/index';
16478
16510
 
@@ -17112,7 +17144,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17112
17144
  display: block;
17113
17145
  pointer-events: none;
17114
17146
  }
17115
- `}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),[k,V]=a.useState(null),[A,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=k!==null?v[k]:null,ee=A!==null?v[A]: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';
17147
+ `}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 be,z,se,he,ye,Me,Le;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),[k,V]=a.useState(null),[A,L]=a.useState(null),[D,x]=a.useState(0),[W,M]=a.useState(1),[Y,F]=a.useState("none"),[X,j]=a.useState("next"),[B,ne]=a.useState({}),[S,E]=a.useState({width:0,height:0}),O=a.useRef(null),ae=a.useRef(null),ie=!n||!!i,$=l??60,re=Math.max(10,Math.min(100,d??$)),P=Math.max(10,Math.min(100,c??$)),te=Math.max(100,u),K=io(p),fe=a.useCallback(_=>{const pe=Iv(_?B[_]:void 0);return Ev(S.width,S.height,pe,re,P)},[S.height,S.width,B,P,re]);a.useEffect(()=>{const _=ae.current;if(!_)return;const pe=new ResizeObserver(([oe])=>{const{width:H,height:ee}=oe.contentRect;E({width:H,height:ee})});return pe.observe(_),()=>pe.disconnect()},[]),a.useEffect(()=>{const _=(t??[]).map(pe=>{var oe;return(oe=pe.image)==null?void 0:oe.url}).filter(pe=>!!pe);Mv(_,(pe,oe)=>{ne(H=>{var ee,Fe;return((ee=H[pe])==null?void 0:ee.width)===oe.width&&((Fe=H[pe])==null?void 0:Fe.height)===oe.height?H:{...H,[pe]:oe}})})},[t]),a.useEffect(()=>{const{backgroundIndex:_,activeIndex:pe}=xl(v.length);h(pe),b(_),R(!1),G(!1),V(null),L(null),x(0),M(1),F("none"),j("next")},[v.length,t]),a.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const We=a.useCallback(_=>{var le,N,Ue,je;if(!ie||I||v.length<=1)return;const pe=_==="next"?(g+1)%v.length:(g-1+v.length)%v.length,oe=fe((N=(le=v[g])==null?void 0:le.image)==null?void 0:N.url),H=fe((je=(Ue=v[pe])==null?void 0:Ue.image)==null?void 0:je.url),ee=bl(S.width,S.height,oe),Fe=bl(S.width,S.height,H);O.current&&clearTimeout(O.current),j(_),G(!0),R(!0),_==="next"?(V(g),L(pe),x(0),M(1),F(io(p,0,1))):(b(Rv(pe,v.length)),V(pe),L(g),x(1),M(Fe),F(io(p,1,Fe))),requestAnimationFrame(()=>{G(!1),requestAnimationFrame(()=>{_==="next"?(x(1),M(ee),F(io(p,1,ee))):(x(0),M(1),F(io(p,0,1)))})}),O.current=setTimeout(()=>{_==="next"&&b(g),h(pe),V(null),L(null),R(!1)},te)},[g,p,S.height,S.width,fe,I,ie,v,te]),me=v[g],ce=m!==null?v[m]:null,U=k!==null?v[k]:null,Q=A!==null?v[A]:null,Z=v.length<=1?0:(g-1+v.length)%v.length,ke=v.length<=1?0:(g+1)%v.length,we=fe((be=me==null?void 0:me.image)==null?void 0:be.url),Pe=fe((z=U==null?void 0:U.image)==null?void 0:z.url),de=fe((se=Q==null?void 0:Q.image)==null?void 0:se.url),ge={[`--${o}-transition-ms`]:`${te}ms`};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),r.jsxs("div",{ref:ae,className:mt(`${o}-wrapper`,T&&`${o}-snap`,n&&!i&&`${o}-editor`),style:ge,"aria-label":"Zoom gallery",children:[((he=ce==null?void 0:ce.image)==null?void 0:he.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&&((ye=U==null?void 0:U.image)==null?void 0:ye.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${X}`),style:wl(Pe,W,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-effect-image`,src:U.image.url,alt:"",style:{filter:Y}})}),I&&((Me=Q==null?void 0:Q.image)==null?void 0:Me.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${X}`),style:wl(de,D,o),"aria-hidden":"true",children:r.jsx("img",{className:`${o}-image`,src:Q.image.url,alt:""})}),!I&&((Le=me==null?void 0:me.image)==null?void 0:Le.url)&&r.jsx("div",{className:mt(`${o}-stage`,`${o}-foreground`),style:Uc(we),children:r.jsx("img",{className:`${o}-image`,src:me.image.url,alt:me.image.name??""})}),ie&&v.length>1&&!I&&r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:mt(`${o}-nav`,`${o}-nav-prev`),onClick:()=>We("prev"),"aria-label":`Show previous image (${Z+1} of ${v.length})`}),r.jsx("button",{type:"button",className:mt(`${o}-nav`,`${o}-nav-next`),onClick:()=>We("next"),"aria-label":`Show next image (${ke+1} of ${v.length})`})]})]})]})}const kv=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17116
17148
  import cn from 'classnames';
17117
17149
  import { CommonComponentProps } from '../props';
17118
17150
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17873,7 +17905,7 @@ a:active .${e}-button .${e}-icon-image,
17873
17905
  height: calc(1em * var(--${e}-icon-scale, 1));
17874
17906
  width: calc(1em * var(--${e}-icon-scale, 1));
17875
17907
  }
17876
- `}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:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:V="rgba(0, 0, 0, 0)",stroke:A=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(k.left,t),[`--${s}-inner-box-shadow-y`]:C.scalingValue(k.top,t),[`--${s}-inner-box-shadow-blur`]:C.scalingValue(k.right,t),[`--${s}-inner-box-shadow-spread`]:C.scalingValue(k.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(A,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';
17908
+ `}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:k={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:V="rgba(0, 0, 0, 0)",stroke:A=0,blur:L=0,backgroundColor:D="#000000",textColor:x="#ffffff",borderColor:W="#ffffff",iconColor:M="#ffffff",hoverEffect:Y="none",fontFamily:F,fontSettings:X,fontSize:j,lineHeight:B,letterSpacing:ne=0,wordSpacing:S=0,textAppearance:E,stateOverrides:O,minWidth:ae=0,minHeight:ie=0,width:$=0,height:re=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`:"",fe=Y!=="none"&&(!t||n||i==="hover")?`${s}-hover-effect-${Y}`:"",We=Y==="reveal"||Y==="swipe",me=Y==="content-roll",ce=Y==="reveal"&&(!t||n),U=b===!0,Z=d==="a"?v??p:p,ke=d==="c",we=d!=="b",Pe={fontSettings:{fontFamily:F,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:j??.01,lineHeight:B,letterSpacing:ne,wordSpacing:S,textAppearance:E,color:x},ge={...we?rn(Kt(Pe,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(k.left,t),[`--${s}-inner-box-shadow-y`]:C.scalingValue(k.top,t),[`--${s}-inner-box-shadow-blur`]:C.scalingValue(k.right,t),[`--${s}-inner-box-shadow-spread`]:C.scalingValue(k.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(A,t),...ke?{}:{justifyContent:ca[Z],textAlign:Z},...ke&&!me?{gap:C.scalingValue(g,t)}:{},...U?{width:C.scalingValue($,t),height:C.scalingValue(re,t)}:{minWidth:C.scalingValue(ae,t),minHeight:C.scalingValue(ie,t),...ke?{width:"100%"}:{}}};let be;const z={display:"inline-flex",alignItems:"center",justifyContent:ke?ca[Z]:ca[d==="a"?Z:"center"],gap:ke?C.scalingValue(g,t):void 0,width:"100%",height:"100%",...d==="a"?{textAlign:Z}:{}};if(d==="b"){const ye=()=>Sl(s,u,h>0?"fixed":"fill",100,h,t);be=me?da(s,ye,`${s}-icon-roll`,void 0,z):ye()}else if(d==="c"){const ye=()=>{const Me=r.jsx("span",{className:`${s}-text`,style:{textAlign:Z},children:c}),Le=Sl(s,u,m>0?"fixed":"fill",100,m,t);return y==="icon-text"?r.jsxs(r.Fragment,{children:[Le,Me]}):r.jsxs(r.Fragment,{children:[Me,Le]})};be=me?da(s,ye,`${s}-icon-text-roll`,void 0,z):ye()}else be=me?da(s,()=>c,`${s}-label-roll`,void 0,z):We?r.jsx("span",{className:`${s}-button-inner`,children:c}):c;const se=ce?ye=>Hv(ye,s):void 0,he=ce?ye=>Nv(ye,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 ${fe}`.trim(),style:ge,onMouseEnter:se,onMouseLeave:he,role:"button",tabIndex:o||t&&!n?void 0:0,children:be})})})]})}const jv=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17877
17909
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
17878
17910
  import { CommonComponentProps } from '../props';
17879
17911
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18703,7 +18735,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18703
18735
  pointer-events: auto;
18704
18736
  flex-shrink: 0;
18705
18737
  }
18706
- `}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),[k,V]=a.useState(0),A=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)},[k,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,k]),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,A.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,A.current={x:yt.clientX,y:yt.clientY},x.current="none",D.current=0,W.current=!1},ot=Qe=>{if(!A.current||Qe.touches.length!==1||Y.current)return;const yt=Qe.touches[0],Dt=yt.clientX-A.current.x,Lt=yt.clientY-A.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(!A.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());A.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`
18738
+ `}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),[k,V]=a.useState(0),A=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),X=a.useRef(null),j=a.useRef(null),B=a.useRef(()=>{}),ne=a.useRef(null),S=a.useRef(null),E=a.useRef(null),O=a.useRef(!1),[ae,ie]=a.useState(null),[$,re]=a.useState(ua),[P,te]=a.useState(0),[K,fe]=a.useState("opening"),[We,me]=a.useState(0),[ce,U]=a.useState(0),[Q,Z]=a.useState(!1),[ke,we]=a.useState(null),[Pe,de]=a.useState(null),[ge,be]=a.useState(null),[z,se]=a.useState(!1),[he,ye]=a.useState(null),[Me,Le]=a.useState(!1),_=a.useRef(!1),[pe,oe]=a.useState(!1),[H,ee]=a.useState(!1),Fe=a.useRef(n),le=a.useRef(void 0),N=t[n],Ue=N?Wr(N):!1,je=ce!==0||Q,gt=!l&&(!s||!!d),rt=c&&!l,ht=u.length>1,lt=a.useCallback((w,xe)=>t.length<=1?null:t[(w+xe+t.length)%t.length]??null,[t]),Ge=ht?so(u,p,-1):lt(n,-1),ve=ht?so(u,p,1):lt(n,1),_e=ke===-1&&je?ht&&Pe!==null?so(u,Pe,-1):ge!==null?lt(ge,-1):null:null,ze=ke===1&&je?ht&&Pe!==null?so(u,Pe,1):ge!==null?lt(ge,1):null:null,Ke=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,Se=ze&&ze.url!==(ve==null?void 0:ve.url)?ze:null,De=Ge&&rt?(()=>{const w=ht?$l(u,p,-1):t.length>2?lt((n-1+t.length)%t.length,-1):null;return w&&w.url!==Ge.url?w:null})():null,Ve=ve&&rt?(()=>{const w=ht?$l(u,p,1):t.length>2?lt((n+1)%t.length,1):null;return w&&w.url!==ve.url?w:null})():null,et=Ke??De,Ae=Se??Ve,$e=a.useCallback((w,xe,Re)=>{if(!w||!xe||!Re)return;const He=G.current,at=He.get(w);(at==null?void 0:at.width)===xe&&(at==null?void 0:at.height)===Re||(He.set(w,{width:xe,height:Re}),V(Mt=>Mt+1))},[]),tt=a.useCallback(w=>{if(!(w!=null&&w.url))return null;const xe=G.current.get(w.url);return i0(R.current,xe)},[k,P]),Ze=a.useCallback(()=>{if(!N)return;const w=tt(N);if(w){ie(w);return}const xe=R.current;xe&&ie(Cl(xe))},[N,tt]),Ie=a.useCallback(w=>{if(ht){const xe=u.length;de((p+w+xe)%xe),be(null);return}t.length>1&&(be((n+w+t.length)%t.length),de(null))},[ht,u.length,p,t.length,n]),qe=a.useCallback(w=>{Y.current=w,Z(w)},[]),Ee=a.useCallback(()=>{F.current!==null&&(window.clearTimeout(F.current),F.current=null)},[]),Je=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{Ee(),qe(!1)},oo+32)},[Ee,qe]),Qe=a.useCallback(()=>{const w=I.current;if(!w){re({left:0,top:0,width:typeof window<"u"?window.innerWidth:ua.width,height:typeof window<"u"?window.innerHeight:ua.height});return}const xe=w.getBoundingClientRect();re({left:xe.left,top:xe.top,width:xe.width,height:xe.height})},[]),st=a.useCallback((w,xe)=>{if(je){if(pe&&!Q)return`translate(${ce}px, 0px)`;if(Q&&ke!==null){const Re=tt(w);if(!Re)return;const{x:He,y:at}=l0(Re,xe,ke,$);return`translate(${He}px, ${at}px)`}if(Q)return"translate(0px, 0px)"}},[je,pe,Q,ce,ke,$,tt]),St=a.useCallback(()=>{const w=X.current;X.current=null,Ee(),qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none",w===-1?m():w===1&&b()},[Ee,qe,m,b]),Pt=a.useCallback(()=>{Ee(),F.current=window.setTimeout(()=>{X.current!==null&&St()},oo+32)},[Ee,St]),Nt=a.useCallback(()=>{Ee(),X.current=null,qe(!1),we(null),de(null),be(null),U(0),oe(!1),W.current=!1,D.current=0,x.current="none"},[Ee,qe]),dt=a.useCallback(w=>{if(!(!rt||!ae)){if(Y.current){if(X.current===w){j.current=w,St();return}Nt()}Ee(),Ie(w),X.current=w,we(w),qe(!0),Pt()}},[rt,ae,St,Nt,Ee,Ie,qe,Pt]);B.current=dt;const yt=a.useCallback(()=>{ne.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)},[]),Ot=a.useCallback(w=>{S.current!==null&&window.clearInterval(S.current);const xe=O.current?Zv:Yv;S.current=window.setInterval(()=>{B.current(w)},xe)},[]),Ft=a.useCallback(w=>{ne.current!==w&&(yt(),ne.current=w,O.current=!1,B.current(w),Ot(w),E.current=window.setTimeout(()=>{E.current=null,ne.current===w&&(O.current=!0,Ot(w))},Kv))},[yt,Ot]),bt=a.useCallback(()=>{const w=R.current;if(!w)return;const xe=N==null?void 0:N.url,Re=xe?G.current.get(xe):void 0;if(Re!=null&&Re.width&&(Re!=null&&Re.height)){ie(Pa(w,Re.width,Re.height));return}const He=T.current;if(He&&xe&&(He.src===xe||He.currentSrc===xe)){const{width:Mt,height:it}=n0(He);if(Mt&&it){$e(xe,Mt,it),ie(Pa(w,Mt,it));return}}const at=Cl(w);!at.width||!at.height||ie(at)},[N==null?void 0:N.url,$e]),Wt=a.useCallback(w=>{if(T.current=w,!!w){if(w instanceof HTMLVideoElement){w.readyState>=1&&w.videoWidth>0&&bt();return}w.complete&&w.naturalWidth>0&&bt()}},[bt]),Gt=a.useCallback(()=>{Qe(),bt(),te(w=>w+1)},[Qe,bt]);a.useEffect(()=>{Gt();const w=R.current,xe=I.current,Re=new ResizeObserver(()=>Gt());return w&&Re.observe(w),xe&&Re.observe(xe),window.addEventListener("resize",Gt),()=>{Re.disconnect(),window.removeEventListener("resize",Gt)}},[Gt,n,v]),a.useLayoutEffect(()=>{if(!N)return;const w=T.current;if(w){if(w instanceof HTMLImageElement&&w.complete&&w.naturalWidth>0){bt();return}w instanceof HTMLVideoElement&&w.readyState>=1&&w.videoWidth>0&&bt()}},[N==null?void 0:N.url,n,bt]),a.useEffect(()=>{Ze()},[Ze,k]),a.useEffect(()=>{const w=new Set,xe=[],Re=He=>{!(He!=null&&He.url)||w.has(He.url)||(w.add(He.url),xe.push(He))};t.forEach(Re),u.forEach(He=>He.items.forEach(Re)),xe.forEach(He=>{G.current.has(He.url)||o0(He,$e)})},[t,u,$e]),a.useEffect(()=>{if(K!=="opening"||!ae)return;if(!y){fe("open");return}se(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!0),fe("open")})});return()=>cancelAnimationFrame(w)},[K,ae,y]),a.useEffect(()=>{if(K!=="closing")return;const w=setTimeout(()=>h(),Cn);return()=>clearTimeout(w)},[K,h]),a.useEffect(()=>()=>{Ee()},[Ee]),a.useLayoutEffect(()=>{Fe.current===n&&le.current===(N==null?void 0:N.url)||(Ee(),X.current=null,we(null),de(null),be(null),me(0),U(0),qe(!1),ee(!1),oe(!1),L.current=0,D.current=0,x.current="none",W.current=!1,A.current=null,M.current=!1,T.current=null,Ze(),Fe.current=n,le.current=N==null?void 0:N.url)},[n,N==null?void 0:N.url,qe,Ee,Ze]),a.useLayoutEffect(()=>{const w=j.current;w!==null&&(j.current=null,requestAnimationFrame(()=>{B.current(w)}))},[n,p,N==null?void 0:N.url]),a.useLayoutEffect(()=>{if(K==="opening"){_.current=!1,Le(!1);return}if(K!=="open"||_.current)return;if(!Ge&&!ve){_.current=!0;return}Le(!1);const w=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Le(!0),_.current=!0})});return()=>cancelAnimationFrame(w)},[K,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),a.useEffect(()=>{if(K!=="open")return;const w=()=>{const it=xt=>{xt.stopPropagation(),xt.preventDefault(),document.removeEventListener("click",it,!0)};document.addEventListener("click",it,!0)},xe=it=>{const xt=it<0?1:-1;Ee(),Ie(xt),X.current=xt,we(xt),qe(!0),Pt()},Re=it=>{if(Math.abs(it)>Xv&&rt){xe(it);return}X.current=null,we(null),de(null),be(null),qe(!0),U(0),Je()},He=it=>{if(it.touches.length!==1||Y.current)return;const xt=it.touches[0];M.current=!0,A.current={x:xt.clientX,y:xt.clientY},x.current="none",D.current=0,W.current=!1},at=it=>{if(!A.current||it.touches.length!==1||Y.current)return;const xt=it.touches[0],zt=xt.clientX-A.current.x,Lt=xt.clientY-A.current.y;if(x.current==="none"){if(Math.abs(zt)<10&&Math.abs(Lt)<10)return;if(Math.abs(zt)>Math.abs(Lt)){if(!rt)return;x.current="horizontal"}else if(Lt>0){if(!gt)return;x.current="vertical"}else return}if(x.current==="horizontal"){W.current=!0,oe(!0),D.current=zt,U(zt),it.preventDefault();return}x.current==="vertical"&&(W.current=!0,oe(!0),L.current=Lt,me(Lt),it.preventDefault())},Mt=()=>{if(!A.current)return;const it=x.current,xt=W.current;if(xt&&it==="horizontal")Re(D.current),w();else if(xt&&it==="vertical"){const zt=L.current;if(gt&&zt>Uv){const Lt=window.innerHeight;L.current=Lt,ee(!0),me(Lt),fe("closing")}else L.current=0,me(0);w()}else it==="horizontal"&&Math.abs(D.current)>0&&(Re(D.current),w());A.current=null,x.current="none",D.current=0,W.current=!1,oe(!1)};return document.addEventListener("touchstart",He,{passive:!0}),document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",Mt),document.addEventListener("touchcancel",Mt),()=>{document.removeEventListener("touchstart",He),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",Mt),document.removeEventListener("touchcancel",Mt)}},[K,rt,qe,Je,Ee,gt,Pt,Ie]);const Zt=a.useCallback(()=>{const w=(g==null?void 0:g())??y??null;w&&ae&&(ye(w),se(!0)),fe("closing")},[g,y,ae]);a.useEffect(()=>{const w=He=>{if(He.key==="Escape"){if(s&&d||K==="closing")return;yt(),Zt();return}if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight"||K!=="open"||!rt)return;He.preventDefault();const at=He.key==="ArrowLeft"?-1:1;He.repeat&&ne.current===at||Ft(at)},xe=He=>{if(He.key!=="ArrowLeft"&&He.key!=="ArrowRight")return;const at=He.key==="ArrowLeft"?-1:1;ne.current===at&&yt()},Re=()=>{yt()};return window.addEventListener("keydown",w),window.addEventListener("keyup",xe),window.addEventListener("blur",Re),()=>{window.removeEventListener("keydown",w),window.removeEventListener("keyup",xe),window.removeEventListener("blur",Re),yt()}},[K,s,d,Zt,rt,Ft,yt]),a.useEffect(()=>{K!=="open"&&yt()},[K,yt]);const en=()=>{K==="closing"||l||Zt()},Tt=K==="open",_t=K==="closing",nn=We>0?Math.max(0,1-We/500):1,ct=We>0?Math.max(.35,1-We/500):1,Te=a.useCallback(w=>{if(!(w.propertyName!=="transform"||!Y.current)){if(X.current!==null){St();return}Ee(),qe(!1)}},[Ee,qe,St]),Ne=K==="closing"?he??y:y,nt=Ne&&ae&&(K==="opening"||_t)?Jv(Ne,ae):void 0,pt=je&&N?st(N,"center"):We>0?`translateY(${We}px)`:nt,vt=ae?Jo(ae,$):null,It=!!(Ne&&ae),ft=It&&(K==="closing"||K==="open"&&z),Bt={position:"absolute",top:vt==null?void 0:vt.top,left:vt==null?void 0:vt.left,width:vt==null?void 0:vt.width,height:vt==null?void 0:vt.height,objectFit:"contain",transformOrigin:"top left",transform:pt,opacity:We>0?ct:It?1:K==="opening"||_t?0:1,transition:pe&&!Q?"none":Q?`transform ${oo}ms ${pn}`:H?`transform ${Cn}ms ${pn}, opacity ${Cn}ms ${pn}`:ft?`transform ${Cn}ms ${pn}`:K==="opening"||_t?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:Ue&&Tt&&!je?"auto":"none",touchAction:Ue&&Tt?"none":void 0,zIndex:1,overflow:Ue?"hidden":void 0},At={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Tt&&!je?"auto":"none"},kt=(w,xe,Re="adjacent")=>{const He=tt(w);if(!He)return{display:"none"};const at=Re==="far"?xe==="left"?"far-left":"far-right":xe==="left"?"left-adjacent":"right-adjacent",{start:Mt}=ke!==null?Yc(He,at,ke,$):{start:Re==="far"?vr(He,xe,$):Ui(He,xe,$)},it=Jo(Mt,$),xt=st(w,at),zt=!je&&Re==="adjacent"&&Tt&&!Me?c0(He,xe,$):null,Lt=Re==="far"&&je&&ke===(xe==="left"?-1:1),on=pe&&!Q?!1:Q,dn=Re==="adjacent"&&Tt&&Me&&!je;return{position:"absolute",top:it.top,left:it.left,width:it.width,height:it.height,objectFit:"contain",transform:xt??(zt?`translate(${zt.x}px, ${zt.y}px)`:void 0),opacity:Re==="far"?Tt&&Lt?1:0:Tt?1:0,transition:on?Re==="far"?`transform ${oo}ms ${pn}`:`transform ${oo}ms ${pn}, opacity ${Cn}ms ${pn}`:dn?`transform ${Cn}ms ${pn}`:K==="opening"||_t?`opacity ${Cn}ms ${pn}`:"none",pointerEvents:"none",zIndex:1}},qt=(w,xe)=>{const Re=tt(w);return Re?s0(Ui(Re,xe,$),xe,$):null},Ut=w=>xe=>{if(!l){if(M.current){M.current=!1;return}xe.stopPropagation(),dt(w)}},Dt=Ge?qt(Ge,"left"):null,jt=ve?qt(ve,"right"):null,Ht=Dt?Jo(Dt,$):null,$t=jt?Jo(jt,$):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:en,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Tt?nn:0,transition:pe?"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:Tt?1:0,transition:pe?"none":`opacity ${Cn}ms ${pn}`,pointerEvents:"none"},children:r.jsx(Mc,{prefix:e,entry:i,settings:o,isEditor:s,isEditMode:l,isPreviewMode:d,onClose:en})})]}),Tt&&et&&r.jsx(Qo,{media:et,style:kt(et,"left","far"),onMeasure:$e,onTransitionEnd:Te},`far-prev-${et.url}`),Tt&&Ge&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:Ge,style:kt(Ge,"left"),onMeasure:$e,onTransitionEnd:Te},`prev-${Ge.url}`),Ht&&r.jsx("div",{style:{position:"absolute",top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(-1)})]}),Tt&&ve&&r.jsxs(r.Fragment,{children:[r.jsx(Qo,{media:ve,style:kt(ve,"right"),onMeasure:$e,onTransitionEnd:Te},`next-${ve.url}`),$t&&r.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||pe?"default":"pointer",pointerEvents:l||pe?"none":"auto",zIndex:3},onClick:Ut(1)})]}),Tt&&Ae&&r.jsx(Qo,{media:Ae,style:kt(Ae,"right","far"),onMeasure:$e,onTransitionEnd:Te},`far-next-${Ae.url}`),ae&&N&&(Ue?r.jsx(d0,{src:N.url,phase:K,onMediaElement:Wt,wrapperStyle:Bt,videoStyle:At,onLoadedMetadata:bt,onTransitionEnd:Te},`${n}-${N.url}`):r.jsx("img",{ref:Wt,src:N.url,alt:N.name,onLoad:bt,onTransitionEnd:Te,style:Bt},`${n}-${N.url}`))]})}const p0=20,m0=.18;function g0(e){return`
18707
18739
  .${e}-wrapper {
18708
18740
  box-sizing: border-box;
18709
18741
  max-width: 100%;
@@ -18791,7 +18823,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18791
18823
  pointer-events: auto;
18792
18824
  }
18793
18825
  ${qv(e)}
18794
- `}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),[k,V]=a.useState([]),[A,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+k.length)%k.length)},[ae,D,k.length]),ge=ae.length>1||k.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:k,index:A,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';
18826
+ `}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 Kt(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),[k,V]=a.useState([]),[A,L]=a.useState(0),[D,x]=a.useState(0),[W,M]=a.useState(null),[Y,F]=a.useState({title1:"",title2:"",title3:""}),X=(!n||i)&&!T,j=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},B=j.sizeType??"none",ne=X&&B!=="none"?`${d}-item-image-hover-${B}`:void 0,S=(j.value??120)/100,E=a.useCallback(ce=>{!ce||B!=="scale"||(ce.style.transformOrigin=hm(ce))},[B]),O=a.useCallback(ce=>{if(ce){if(m==="contain"){const U=f0(ce);if(U){const Q=ce.closest(`.${d}-item-image`);Q instanceof HTMLElement&&Q.style.setProperty(`--${d}-item-media-aspect`,String(U))}}E(ce)}},[d,E,m]),ae={width:C.scalingValue(v,n??!1),...I,...y0(e,d,n),[`--${d}-image-hover-scale`]:String(S)},ie=(()=>{const ce={},U=R.current?getComputedStyle(R.current).getPropertyValue("--cntrl-article-width").trim():"";return U&&(ce["--cntrl-article-width"]=U),ce})(),$=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),re=a.useMemo(()=>e0(u),[u]),P=a.useMemo(()=>r0(u),[u]),te=(ce,U)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const Q=re.findIndex(ke=>ke.gridIndex===ce);if(Q<0)return;const Z=re[Q];x(Q),V(Z.items),L(0),F(Z.entry),M(U??null),G(!0)},K=a.useCallback(()=>{G(!1),M(null)},[]),fe=a.useCallback(()=>{const ce=re[D];return!ce||!R.current?W:Qv(R.current,ce.gridIndex,m)??W},[re,D,W,m]),We=a.useCallback(ce=>{if(re.length>1){const U=re.length,Q=(D+ce+U)%U,Z=re[Q];x(Q),V(Z.items),L(0),F(Z.entry);return}L(U=>(U+ce+k.length)%k.length)},[re,D,k.length]),me=re.length>1||k.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:ae,children:u.map((ce,U)=>{var ke,we;const Q=!!((ke=ce.image)!=null&&ke.url),Z=b0(!!$,Q,U,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,(we=ce.image)!=null&&we.url?r.jsx("span",{className:[`${d}-item-image`,m==="contain"?`${d}-item-image-fit`:void 0,ne].filter(Boolean).join(" "),children:ce.image.type==="video"?r.jsx("video",{ref:O,src:ce.image.url,"data-waterfall-index":U,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:Z,onLoadedData:Pe=>O(Pe.currentTarget)}):r.jsx("img",{ref:O,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":U,style:b,onClick:Z,onLoad:Pe=>O(Pe.currentTarget)})}):null,U<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%"}})})]},U)})}),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:ie,"data-selection":"none",children:r.jsx(u0,{prefix:d,items:k,index:A,entry:Y,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:me,lightboxEntries:re,entryIdx:D,layoutId:s,sourceRect:W,resolveCloseSourceRect:fe,onClose:K,onPrev:()=>We(-1),onNext:()=>We(1)})}),ce)})()]})}const S0=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18795
18827
  import type React from 'react';
18796
18828
  import { createPortal } from 'react-dom';
18797
18829
  import { CommonComponentProps } from '../props';
@@ -19305,7 +19337,7 @@ export function Waterfall({
19305
19337
  </>
19306
19338
  );
19307
19339
  }
19308
- `,$0="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>'),jn={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 C0(e){const t={};return t[et(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[et(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[et(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[et(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[et(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[et(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[et(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[et(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Xi=Xn.filter(e=>e!=="count"),T0=Xi.reduce((e,t)=>({...e,...C0(t)}),{}),L0=Xi.reduce((e,t)=>({...e,[et(t,"fontFamily")]:"Arial",[et(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[et(t,"letterSpacing")]:0,[et(t,"wordSpacing")]:0,[et(t,"textAlign")]:"left",[et(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function pa(e){return Xi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[et(n,"fontSize")]=i),o!==void 0&&(t[et(n,"lineHeight")]=o),t},{})}const R0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xi.map(e=>[is[e],os(e)]))},er={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},I0=[{title:"Salton Sea from Above",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],E0={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"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:I0},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},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"]}},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"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...T0},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:$0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...L0},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...pa({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...pa({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...pa({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[R0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},M0={element:w0,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Xi.map(e=>({path:`${et(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Xi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${et(t,"fontFamily")}`}),{})},schema:E0,sourceCode:S0},Wi=500,Zc="cubic-bezier(0.25, 1, 0.5, 1)",P0=300,k0=5,A0=.15,F0=.4,W0=100,Ci=100,Tl={color:"#000000",hover:"#cccccc"},ro={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},_0={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ma={offset:{x:0,y:0},linkColor:"#cccccc"},Ll={sizeType:"drag",value:3},H0="left";function N0(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)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:H0,color:(e==null?void 0:e.titleColor)??"#000000"};return Xt(n,t)}function Ti(e,t,n){return`${e}: ${C.scalingValue(t/1440,n)};`}function lo(e,t){return t<=0?0:(e%t+t)%t}function O0(e,t,n,i){if(!i)return{position:lo(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function D0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function j0(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const y=n.getBoundingClientRect();return{x:y.left,y:y.top}},o=i(0,0),s=i(Ci,0),l=i(0,Ci);e.removeChild(n);const d={x:(s.x-o.x)/Ci,y:(s.y-o.y)/Ci},c={x:(l.x-o.x)/Ci,y:(l.y-o.y)/Ci},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function z0(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function B0(e,t){return`
19340
+ `,$0="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>'),jn={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 C0(e){const t={};return t[ot(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSettings")]={...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ot(e,"fontSize")]={...jn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ot(e,"lineHeight")]={...jn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ot(e,"letterSpacing")]={...jn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ot(e,"wordSpacing")]={...jn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ot(e,"textAlign")]={...jn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ot(e,"textAppearance")]={...jn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Xi=Xn.filter(e=>e!=="count"),T0=Xi.reduce((e,t)=>({...e,...C0(t)}),{}),L0=Xi.reduce((e,t)=>({...e,[ot(t,"fontFamily")]:"Arial",[ot(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ot(t,"letterSpacing")]:0,[ot(t,"wordSpacing")]:0,[ot(t,"textAlign")]:"left",[ot(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function pa(e){return Xi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ot(n,"fontSize")]=i),o!==void 0&&(t[ot(n,"lineHeight")]=o),t},{})}const R0={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Xi.map(e=>[is[e],os(e)]))},er={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},I0=[{title:"Salton Sea from Above",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...er,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],E0={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"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:I0},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},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"]}},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"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...jn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...T0},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:$0,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...L0},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...pa({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...pa({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...pa({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[R0]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},M0={element:w0,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Xi.map(e=>({path:`${ot(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Xi.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${ot(t,"fontFamily")}`}),{})},schema:E0,sourceCode:S0},Wi=500,Zc="cubic-bezier(0.25, 1, 0.5, 1)",P0=300,k0=5,A0=.15,F0=.4,W0=100,Ci=100,Tl={color:"#000000",hover:"#cccccc"},ro={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},_0={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},ma={offset:{x:0,y:0},linkColor:"#cccccc"},Ll={sizeType:"drag",value:3},H0="left";function N0(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)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:H0,color:(e==null?void 0:e.titleColor)??"#000000"};return Kt(n,t)}function Ti(e,t,n){return`${e}: ${C.scalingValue(t/1440,n)};`}function lo(e,t){return t<=0?0:(e%t+t)%t}function O0(e,t,n,i){if(!i)return{position:lo(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function D0(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function j0(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,v)=>{n.style.transform=`translate(${p}px, ${v}px)`;const y=n.getBoundingClientRect();return{x:y.left,y:y.top}},o=i(0,0),s=i(Ci,0),l=i(0,Ci);e.removeChild(n);const d={x:(s.x-o.x)/Ci,y:(s.y-o.y)/Ci},c={x:(l.x-o.x)/Ci,y:(l.y-o.y)/Ci},u=d.x*c.y-c.x*d.y;return{ex:d,ey:c,det:u}}function z0(e,t,n){const{ex:i,ey:o,det:s}=e;return{x:(t*o.y-n*o.x)/s,y:(i.x*n-i.y*t)/s}}function B0(e,t){return`
19309
19341
  .${e}-wrapper {
19310
19342
  position: relative;
19311
19343
  width: 100%;
@@ -19575,7 +19607,7 @@ export function Waterfall({
19575
19607
  from { clip-path: inset(100% 0 0 0); }
19576
19608
  to { clip-path: inset(0 0 0 0); }
19577
19609
  }
19578
- `}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,k=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,V=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,A=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"&&k>0,oe=T==="on hover",$=C.scalingValue(k,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(A*(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(A,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';
19610
+ `}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=ve=>C.scalingValue(ve*I,n),T=(e==null?void 0:e.show)??"always",G=(e==null?void 0:e.controls)??null,k=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,V=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,A=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,X=y==="horizontal",j=p==="click",B=p==="drag",ne=p==="auto"&&(!n||!!i),S=!n,E=g==="slide",O=h==="classic",ae=T!=="never"&&k>0,ie=T==="on hover",$=C.scalingValue(k,n),re={width:$,height:$,maxWidth:$},P=E&&c>1,[te,K]=a.useState(0),[fe,We]=a.useState(P?1:0),[me,ce]=a.useState(!1),[U,Q]=a.useState(!1),[Z,ke]=a.useState(!1),[we,Pe]=a.useState(0),[de,ge]=a.useState(!1),[be,z]=a.useState(!1),se=a.useRef(!1),he=a.useRef(fe);he.current=fe;const ye=a.useRef(null),Me=a.useRef(0),Le=a.useRef(null),_=a.useRef(null),pe=a.useRef(null),oe=a.useRef(null),H=a.useCallback(ve=>{se.current=ve,ce(ve)},[]),ee=a.useCallback(ve=>{if(c<2||ve===0)return;const _e=ve>0?1:-1,ze=Math.abs(ve);if(ge(!0),H(!0),!E){K(Ae=>lo(Ae+ve,c));return}let Ke=he.current;const Se=P&&(Ke===0||Ke===c+1),De=Se?te+1:null;Se&&(Ke=te+1);let Ve=ze;for(;Ve>0;){const Ae=O0(Ke,_e,c,P);if(Ke=Ae.position,Ve-=1,Ae.hitBoundary){Me.current=Ve*_e;break}}const et=ze-Ve;if(et>0&&K(Ae=>lo(Ae+et*_e,c)),he.current=Ke,De!==null){if(he.current=De,Ke===De){Q(!0),We(Ke);return}ye.current=Ke,Q(!0),We(De);return}Q(!1),We(Ke)},[te,c,P,E,H]),Fe=a.useCallback(ve=>{ee(ve)},[ee]),le=a.useCallback(ve=>{if(c<2)return;const _e=lo(ve,c);if(!(_e===te&&!se.current)&&(ge(!0),H(!0),K(_e),E)){const ze=_e+(P?1:0);ye.current=null,Me.current=0,he.current=ze,Q(!1),We(ze)}},[te,c,P,E,H]);a.useEffect(()=>{if(!me)return;const ve=window.setTimeout(()=>{if(P&&(fe===0||fe===c+1)){ye.current=null,Q(!0),We(te+1);return}H(!1)},Wi);return()=>window.clearTimeout(ve)},[te,c,P,me,H,fe]),a.useEffect(()=>{if(!U)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const ze=ye.current;ye.current=null;const Ke=Me.current;if(Me.current=0,Q(!1),ze!==null){he.current=ze,We(ze);return}if(Ke!==0){ee(Ke);return}H(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[ee,H,U]);const N=`${P}:${c}`,Ue=a.useRef(N);a.useEffect(()=>{if(Ue.current===N)return;Ue.current=N;const ve=c>0?Math.min(te,c-1):0;pe.current=null,oe.current=null,ke(!1),Pe(0),K(ve),Q(!0),We(ve+(P?1:0))},[te,c,P,N]),a.useEffect(()=>{if(!de)return;const ve=window.setTimeout(()=>ge(!1),P0);return()=>window.clearTimeout(ve)},[de,te]),a.useEffect(()=>{if(!ne||c<2)return;const ve=Math.max(v,.1)*1e3,_e=window.setInterval(()=>{S&&be||Fe(1)},ve);return()=>window.clearInterval(_e)},[v,c,Fe,ne,be,S]);const je=a.useCallback(ve=>{const _e=pe.current;if(!_e||_e.pointerId!==ve.pointerId)return;pe.current=null,oe.current=null;const ze=Le.current;if(ze!=null&&ze.hasPointerCapture(ve.pointerId)&&ze.releasePointerCapture(ve.pointerId),!_e.isActive){E&&Pe(0);return}const Se=!(ve.timeStamp-_e.lastTime>W0)&&Math.abs(_e.velocity)>F0,De=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*A0;if(ke(!1),!Se&&!De){Pe(0);return}const Ve=De?_e.offset-_e.baseOffset:_e.velocity;let et=1;De&&_e.size>0&&(et=Math.max(1,Math.round(Math.abs(Ve)/_e.size))),Pe(0),ee(Ve<0?et:-et)},[ee,E]);a.useEffect(()=>{const ve=_e=>{oe.current===null||_e.pointerId!==oe.current||je(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[je]);const gt=ve=>{const _e=Le.current;if(!B||c<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ye.current=null,Me.current=0,se.current&&H(!1);let ze=0;const Ke=_.current;if(E&&Ke){const Se=X?Ke.offsetWidth:Ke.offsetHeight;if(Se>0){const De=D0(Ke,X);let Ve=he.current;P&&(Ve===0||Ve===c+1)?(Ve=te+1,he.current=Ve,Q(!0),We(Ve),ze=0):ze=De+Ve*Se,Pe(ze)}}_e.setPointerCapture(ve.pointerId),oe.current=ve.pointerId,pe.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:j0(_e,`${s}-axis-probe`),size:X?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:ze,offset:ze,lastTime:ve.timeStamp,velocity:0}},rt=ve=>{const _e=pe.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){je(ve);return}const ze=ve.clientX-_e.startClientX,Ke=ve.clientY-_e.startClientY,Se=_e.axes?z0(_e.axes,ze,Ke):{x:ze,y:Ke},De=X?Se.x:Se.y,Ve=X?Se.y:Se.x,et=_e.baseOffset+De;if(!_e.isActive){if(Math.max(Math.abs(De),Math.abs(Ve))<k0)return;if(Math.abs(Ve)>Math.abs(De)){const $e=Le.current;$e!=null&&$e.hasPointerCapture(_e.pointerId)&&$e.releasePointerCapture(_e.pointerId),pe.current=null,oe.current=null,E&&Pe(0);return}_e.isActive=!0,ke(!0)}const Ae=ve.timeStamp-_e.lastTime;Ae>0&&(_e.velocity=(et-_e.offset)/Ae,_e.lastTime=ve.timeStamp),_e.offset=et,E&&Pe(et)},ht=ve=>{je(ve)},lt=X?`translate3d(calc(${-fe*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-fe*100}% + ${we}px), 0)`,Ge=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:mt(`${s}-wrapper`,{[`${s}-transition-reveal`]:g==="reveal",[`${s}-transition-reveal-vertical`]:g==="reveal"&&!X}),onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[r.jsxs("div",{className:`${s}-slider-inner`,style:{backgroundColor:"transparent"},children:[r.jsx("div",{ref:Le,className:mt(`${s}-track`,{[`${s}-track-draggable`]:B,[`${s}-track-draggable-vertical`]:B&&!X}),onPointerDown:gt,onPointerMove:rt,onPointerUp:ht,onPointerCancel:ht,onLostPointerCapture:ve=>{oe.current===ve.pointerId&&je(ve)},children:r.jsx("div",{ref:_,className:mt(`${s}-list`,{[`${s}-list-slide`]:E,[`${s}-list-slide-vertical`]:E&&!X,[`${s}-list-fade`]:!E}),style:E?{transform:lt,transition:Z||U?"none":`transform ${Wi}ms ${Zc}`}:void 0,children:Ge.map((ve,_e)=>{const ze=P?lo(_e-1,c):_e,Se=P&&(_e===0||_e===c+1)?`clone-${_e===0?"start":"end"}`:`slide-${ze}`;return r.jsx("div",{className:mt(`${s}-slide`,{[`${s}-is-active`]:!E&&ze===te}),children:r.jsx("div",{className:`${s}-slider-item`,children:r.jsx("div",{className:`${s}-img-wrapper`,children:r.jsx("img",{className:mt(`${s}-slider-image`,{[`${s}-contain`]:ve.image.objectFit==="contain",[`${s}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},Se)})})}),ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:mt(`${s}-arrow`,{[`${s}-arrow-prev`]:X,[`${s}-arrow-prev-vertical`]:!X,[`${s}-hover-arrow`]:ie}),style:{color:L,"--arrow-hover-color":D,...re},children:r.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Fe(-1)},className:`${s}-arrow-inner`,style:{transform:`translate(${C.scalingValue(V,n)}, ${C.scalingValue(A*(X?1:-1),n)}) rotate(${X?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:mt(`${s}-arrow-img`,`${s}-mirror`),style:re}),!G&&r.jsx(Rl,{color:L,className:mt(`${s}-arrow-icon`,`${s}-arrow-img`,`${s}-mirror`)})]})}),r.jsx("div",{className:mt(`${s}-arrow`,{[`${s}-arrow-next`]:X,[`${s}-arrow-next-vertical`]:!X,[`${s}-hover-arrow`]:ie}),style:{color:L,"--arrow-hover-color":D,...re},children:r.jsxs("button",{className:`${s}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Fe(1)},style:{transform:`translate(${C.scalingValue(V*(X?-1:1),n)}, ${C.scalingValue(A,n)}) rotate(${X?"0deg":"90deg"})`},children:[G&&r.jsx(an,{url:G,fill:L,hoverFill:D,className:`${s}-arrow-img`,style:re}),!G&&r.jsx(Rl,{color:L,className:mt(`${s}-arrow-icon`,`${s}-arrow-img`)})]})})]}),j&&r.jsx("div",{className:`${s}-click-overlay`,onClick:()=>Fe(1)}),O&&r.jsx("div",{className:mt(`${s}-pagination`,{[`${s}-pagination-inside-bottom`]:X,[`${s}-pagination-inside-left`]:!X}),style:X?{bottom:R(b.inset)}:{left:R(b.inset)},children:r.jsx("div",{className:mt(`${s}-pagination-inner`,{[`${s}-pagination-vertical`]:!X,[`${s}-animate-dots`]:de}),style:{backgroundColor:M,gap:R(b.gapInactive-b.activeDot+b.dot),...X?{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((ve,_e)=>{const ze=_e===te,Ke=ze?b.activeDot:b.dot;return r.jsx("button",{onClick:()=>le(_e),className:`${s}-pagination-item`,style:{width:R(b.activeDot)},children:r.jsx("div",{className:`${s}-dot`,style:{backgroundColor:ze?W:x,width:R(Ke)}})},_e)})},`${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((ve,_e)=>r.jsx("div",{className:mt(`${s}-caption-text`,{[`${s}-with-pointer-events`]:_e===te&&n,[`${s}-active`]:_e===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:ve.imageCaption})})},_e))})]})]})]})}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';
19579
19611
  import cn from 'classnames';
19580
19612
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19581
19613
  import { scalingValue } from '../utils/scalingValue';
@@ -20973,7 +21005,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20973
21005
  width: var(--cntrl-article-width, 100vw) !important;
20974
21006
  height: var(--cntrl-viewport-height, 100vh) !important;
20975
21007
  }
20976
- `}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),k=a.useRef(null),[V,A]=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(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),P=a.useCallback(()=>{ae(),k.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"){A({width:z,height:se,left:Se.left,top:Se.top});return}if(!fe){A(tr(ue));return}const{width:ye,height:ve}=sx(fe);if(!ye||!ve){A(tr(ue));return}const Me=ye/ve,Te=z/se;if(Me>Te){const H=z/Me;A({width:z,height:H,left:Se.left,top:Se.top+(se-H)/2})}else{const H=se*Me;A({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&&A(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&&A(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},k={className:v,style:T,onClick:p?L=>{L.stopPropagation(),p()}:void 0},V=Math.max(d,di),A=ka(t)?r.jsx("video",{...k,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...k,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[y?r.jsx("div",{style:R,children:A}):A,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",k=p==="b",V=T==="fade"||T==="retype",{setTitleRef:A,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=k?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=k?{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=k?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=k?{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:A(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}}),k?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';
21008
+ `}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),k=a.useRef(null),[V,A]=a.useState(null),[L,D]=a.useState("opening"),[x,W]=a.useState(0),[M,Y]=a.useState(0),[F,X]=a.useState(!1),[j,B]=a.useState(!1),[ne,S]=a.useState(!1),E=a.useRef(n),O=t[n],ae=O?ka(O):!1,ie=M!==0||F,$=a.useCallback(de=>{G.current=de,X(de)},[]),re=a.useCallback(()=>{k.current!==null&&(window.clearTimeout(k.current),k.current=null)},[]),P=a.useCallback(()=>{re(),k.current=window.setTimeout(()=>{re(),$(!1)},In+32)},[re,$]),te=a.useCallback(()=>{const de=y.current,ge=g.current;if(!de)return;const be=de.getBoundingClientRect(),z=be.width,se=be.height;if(!z||!se)return;if(i==="cover"){A({width:z,height:se,left:be.left,top:be.top});return}if(!ge){A(tr(de));return}const{width:he,height:ye}=sx(ge);if(!he||!ye){A(tr(de));return}const Me=he/ye,Le=z/se;if(Me>Le){const _=z/Me;A({width:z,height:_,left:be.left,top:be.top+(se-_)/2})}else{const _=se*Me;A({width:_,height:se,left:be.left+(z-_)/2,top:be.top})}},[i]);a.useEffect(()=>{te();const de=y.current;if(!de)return;const ge=new ResizeObserver(()=>te());return ge.observe(de),()=>ge.disconnect()},[te,n]),a.useEffect(()=>{L==="opening"&&V&&D("open")},[L,V]),a.useEffect(()=>{if(L!=="closing")return;const de=setTimeout(()=>s(),In);return()=>clearTimeout(de)},[L,s]),a.useEffect(()=>()=>{re()},[re]),a.useLayoutEffect(()=>{if(E.current===n)return;re(),W(0),Y(0),$(!1),S(!1),B(!1),m.current=0,b.current=0,I.current="none",R.current=!1,h.current=null,T.current=!1;const de=y.current;de&&A(tr(de)),E.current=n},[n,$,re]),a.useEffect(()=>{if(L!=="open")return;let de=null;const ge=()=>{de&&(document.removeEventListener("click",de,!0),de=null)},be=()=>{ge(),de=Le=>{Le.stopPropagation(),Le.preventDefault(),ge()},document.addEventListener("click",de,!0)},z=Le=>{re(),G.current=!1,X(!1),Y(0),B(!1),R.current=!1,b.current=0,I.current="none";const _=y.current;_&&A(tr(_)),Le<0?d():l()},se=Le=>{if(Math.abs(Le)>Q0&&t.length>1){z(Le);return}$(!0),Y(0),P()},he=Le=>{if(Le.touches.length!==1||G.current)return;const _=Le.touches[0];T.current=!0,h.current={x:_.clientX,y:_.clientY},I.current="none",b.current=0,R.current=!1},ye=Le=>{if(!h.current||Le.touches.length!==1||G.current)return;const _=Le.touches[0],pe=_.clientX-h.current.x,oe=_.clientY-h.current.y;if(I.current==="none"){if(Math.abs(pe)<10&&Math.abs(oe)<10)return;if(Math.abs(pe)>Math.abs(oe)){if(t.length<=1)return;I.current="horizontal"}else if(oe>0)I.current="vertical";else return}if(I.current==="horizontal"){R.current=!0,B(!0),b.current=pe,Y(pe),Le.preventDefault();return}I.current==="vertical"&&(R.current=!0,B(!0),m.current=oe,W(oe),Le.preventDefault())},Me=()=>{if(!h.current)return;const Le=I.current,_=R.current;if(_&&Le==="horizontal")se(b.current),be();else if(_&&Le==="vertical")if(m.current>J0){const oe=window.innerHeight;m.current=oe,S(!0),W(oe),D("closing")}else m.current=0,W(0),be();else Le==="horizontal"&&Math.abs(b.current)>0&&(se(b.current),be());h.current=null,I.current="none",b.current=0,R.current=!1,B(!1)};return document.addEventListener("touchstart",he,{passive:!0}),document.addEventListener("touchmove",ye,{passive:!1}),document.addEventListener("touchend",Me),document.addEventListener("touchcancel",Me),()=>{document.removeEventListener("touchstart",he),document.removeEventListener("touchmove",ye),document.removeEventListener("touchend",Me),document.removeEventListener("touchcancel",Me),ge()}},[L,t.length,d,l,$,P,re]),a.useEffect(()=>{const de=ge=>{ge.key==="Escape"&&(ge.preventDefault(),ge.stopPropagation(),L!=="closing"&&D("closing"))};return window.addEventListener("keydown",de,!0),()=>window.removeEventListener("keydown",de,!0)},[L]);const K=()=>{L!=="closing"&&D("closing")},fe=L==="open",We=L==="closing",me=x>0?Math.max(0,1-x/500):1,ce=x>0?Math.max(.35,1-x/500):1,U=de=>{if(de.stopPropagation(),T.current){T.current=!1;return}if(t.length<=1)return;const ge=de.currentTarget.getBoundingClientRect(),be=de.clientY-ge.top,z=Math.min(52,ge.height*.2);if(!(be>ge.height-z)){if(de.clientX-ge.left<ge.width/2){l();return}d()}},Q=de=>{if(t.length<=1)return;const ge=de.currentTarget.getBoundingClientRect(),be=de.clientX-ge.left,z=de.clientY-ge.top,se=Math.min(52,ge.height*.2);if(z>ge.height-se){de.currentTarget.style.cursor="default";return}de.currentTarget.style.cursor=be<ge.width/2?"w-resize":"e-resize"},Z=a.useCallback(de=>{de.propertyName!=="transform"||!G.current||(re(),$(!1))},[re,$]),ke=ie?`translateX(${M}px)`:x>0?`translateY(${x}px)`:void 0,we={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:ke,opacity:x>0?ce:L==="opening"||We?0:1,transition:j&&!F?"none":F?`transform ${In}ms ${ci}`:ne?`transform ${In}ms ${ci}, opacity ${In}ms ${ci}`:L==="opening"||We?`opacity ${In}ms ${ci}`:"none",pointerEvents:ae&&fe&&!ie?"auto":"none",touchAction:ae&&fe?"none":void 0,zIndex:9998},Pe=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:fe?me:0,transition:j?"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:fe?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:fe?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&&(ae?r.jsx(px,{src:O.url,phase:L,mediaRef:g,mediaStyle:we,onLoadedMetadata:te,onClick:U,onMouseMove:Q,onTransitionEnd:Z},`${n}-${O.url}`):r.jsx("img",{ref:g,src:O.url,alt:O.name,onLoad:te,onTransitionEnd:Z,style:we},`${n}-${O.url}`)),fe&&Pe&&t.length>1&&!ae&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{...Pe,left:V.left,cursor:"w-resize",pointerEvents:ie?"none":"auto"},onClick:de=>{if(T.current){T.current=!1;return}de.stopPropagation(),l()}}),r.jsx("div",{style:{...Pe,left:V.left+V.width/2,cursor:"e-resize",pointerEvents:ie?"none":"auto"},onClick:de=>{if(T.current){T.current=!1;return}de.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},k={className:v,style:T,onClick:p?L=>{L.stopPropagation(),p()}:void 0},V=Math.max(d,di),A=ka(t)?r.jsx("video",{...k,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):r.jsx("img",{...k,src:t.url,alt:t.name??""});return r.jsxs("div",{className:`${e}-gallery-item`,children:[y?r.jsx("div",{style:R,children:A}):A,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 Je;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",k=p==="b",V=T==="fade"||T==="retype",{setTitleRef:A,dominantIndex:L}=xx(c.length,V,m),D=((Je=c[L])==null?void 0:Je.title)??"",x=bx(D,T==="retype"),W=T==="fade"||T==="retype",M=T==="retype"?x:D,Y=k?void 0:{width:C.scalingValue(v,n??!1)},F=G==="on"&&(!n||i||o),X=o??!1,j=(e==null?void 0:e.galleryPaddingRight)??0,B=(e==null?void 0:e.galleryPaddingLeft)??0,ne=(e==null?void 0:e.galleryPaddingBetween)??0,S=Qe=>C.scalingValue(Qe,n??!1),O={width:S(y)},ae=p==="a"?j:B,ie=k?{width:"100%"}:{width:`calc(100% - ${S(v)} - ${S(ae)})`,...p==="c"?{marginLeft:"auto"}:{}},$=Math.max(j,di),re=Math.max(B,di),P=Math.max(ne,di),te=Math.max(b,di),K=Math.max(I,di),fe=Math.max(R,di),We=Math.max(0,(u??1)-(v??Mi)),me=p==="a"?Math.max(0,(u??1)-(v??Mi)-j):p==="c"?Math.max(0,(u??1)-(v??Mi)-B):p==="b"?u??1:1,ce=X&&(p==="a"||p==="b"||p==="c")&&m==="top",U=X&&((p==="a"||p==="b")&&(m==="left"||m==="top")||p==="c"&&(m==="left"||m==="top")),Q=X&&((p==="c"||p==="b")&&m==="right"||p==="a"&&m==="right"),Z=c.length>1,ke=k?void 0:S((p==="c"?B:j)+(v??Mi)),we=p==="c"&&ke?{left:ke}:void 0,Pe=p==="a"&&ke?{right:ke}:void 0,de=k?{left:0,width:"100%"}:p==="a"?{right:S(j),width:S(v)}:{left:S(B),width:S(v)},{titleColor:ge,titleFontFamily:be,titleFontSettings:z,titleFontSize:se,titleLineHeight:he,titleLetterSpacing:ye,titleWordSpacing:Me,titleAlign:Le,titleTextAppearance:_,lightboxCounterColor:pe,lightboxCounterFontFamily:oe,lightboxCounterFontSettings:H,lightboxCounterFontSize:ee,lightboxCounterLineHeight:Fe,lightboxCounterLetterSpacing:le,lightboxCounterWordSpacing:N,lightboxCounterTextAppearance:Ue}=e??{},je={fontSettings:{fontFamily:be,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:se??.01,lineHeight:he,letterSpacing:ye??0,wordSpacing:Me??0,textAlign:Le??"left",textAppearance:_,color:ge??"#000000"},rt=rn(Kt(je,n)),ht=O,lt=El(se,he,l,n),Ge=Il(se,he,`${l}-title`,`${l}-text-tight-leading`),ve={fontSettings:{fontFamily:oe,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:Fe,letterSpacing:le??0,wordSpacing:N??0,textAppearance:Ue,color:pe??"#DEDDDD"},ze={...rn(Kt(ve,n)),...El(ee,Fe,l,n)},Ke=Il(ee,Fe,`${l}-lightbox-counter`,`${l}-text-tight-leading`),Se=C.buildColorVars(l,{titleColor:ge??"#000000",lightboxCounterColor:pe??"#DEDDDD"},ex,tx),De=a.useRef(null),[Ve,et]=a.useState(!1),[Ae,$e]=a.useState([]),[tt,Ze]=a.useState(0),Ie=a.useCallback((Qe,st)=>{F&&($e(Qe),Ze(st),et(!0))},[F]),qe=a.useCallback(()=>{et(!1)},[]),Ee=a.useMemo(()=>{const Qe={...Se},st=De.current?getComputedStyle(De.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(Qe["--cntrl-article-width"]=st),Qe},[Se,Ve]);return a.useEffect(()=>{if(!Ve||G!=="on"||typeof document>"u")return;const Qe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Qe}},[Ve,G]),a.useEffect(()=>{!n||o||i||et(!1)},[n,o,i]),a.useEffect(()=>{G==="off"&&et(!1)},[G]),r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),r.jsx("div",{style:Se,children:r.jsxs("div",{ref:De,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:`${Ge} ${l}-single-title`,titleContainerStyle:{...lt,...ie},titleTextBoxStyle:ht,titleStyle:rt,showTextBoxOutline:X,topPaddingControl:ce?Pl({P:l,scaled:S,height:te,paired:!1}):void 0})}),c.map((Qe,st)=>{const St=rx(Qe.gallery),Pt=st<c.length-1,Nt=St.filter(yt=>yt.lightboxMedia).map(yt=>yt.lightboxMedia),dt={P:l,position:m,titleRef:A(st),titleClassName:Ge,titleContainerStyle:lt,titleTextBoxStyle:W?{maxWidth:"100%"}:ht,titleStyle:rt,showTextBoxOutline:X&&!W,topPaddingControl:ce&&!W?Pl({P:l,scaled:S,height:te,paired:Z}):void 0};return r.jsxs("div",{"data-item-index":st,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Pt?S(ne):void 0},children:[U&&kl({P:l,controlKey:"titleLeftPadding",scaled:S,width:K,maxFraction:me,side:"left",paired:Z,anchorStyle:we}),Q&&kl({P:l,controlKey:"titleRightPadding",scaled:S,width:fe,maxFraction:me,side:"right",paired:Z,anchorStyle:Pe}),X&&Pt&&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),...de}}),k?r.jsxs("div",{className:`${l}-gallery`,children:[r.jsx("div",{className:`${l}-gallery-media`,children:St.map(({displayMedia:yt,lightboxMedia:Ot},Ft)=>{const bt=Ot?Nt.findIndex(Wt=>Wt.url===Ot.url):-1;return r.jsx(Ml,{P:l,media:yt,imgWidth:v||void 0,cornerRadius:h||void 0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Ft<St.length-1,showControls:X,onMediaClick:F&&bt>=0?()=>Ie(Nt,bt):void 0},`${yt.url}-${Ft}`)})}),r.jsx("div",{className:`${l}-title-layer`,children:r.jsx(ga,{...dt,title:W?"":Qe.title})})]}):r.jsxs(r.Fragment,{children:[r.jsx(ga,{...dt,title:W?"":Qe.title}),St.length>0&&r.jsx(gx,{P:l,layoutType:p,galleryWidthStyle:Y,galleryPaddingRight:j,galleryPaddingLeft:B,galleryPaddingRightWidth:$,galleryPaddingLeftWidth:re,galleryPaddingMaxFraction:We,showControls:X,scaled:S,children:St.map(({displayMedia:yt,lightboxMedia:Ot},Ft)=>{const bt=Ot?Nt.findIndex(Wt=>Wt.url===Ot.url):-1;return r.jsx(Ml,{P:l,media:yt,cornerRadius:h||void 0,fillGalleryWidth:!0,imageDisplay:g,isEditor:n,galleryPaddingBetween:ne,showPaddingAfter:Ft<St.length-1,showControls:X,onMediaClick:F&&bt>=0?()=>Ie(Nt,bt):void 0},`${yt.url}-${Ft}`)})})]})]},st)})]})}),Ve&&G==="on"&&typeof document<"u"&&e&&(()=>{const Qe=(s?document.getElementById(s):null)??document.body;return Yn.createPortal(r.jsx("div",{style:Ee,"data-selection":"none",children:r.jsx(mx,{prefix:l,items:Ae,index:tt,imageDisplay:ux(e.lightboxImageDisplay),isEditor:n,onClose:qe,onPrev:()=>Ze(st=>(st-1+Ae.length)%Ae.length),onNext:()=>Ze(st=>(st+1)%Ae.length),counterClassName:Ke,counterStyle:ze,backgroundColor:e.backgroundColor??Z0})}),Qe)})()]})}const Sx=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
20977
21009
  import { createPortal } from 'react-dom';
20978
21010
  import type React from 'react';
20979
21011
  import { CommonComponentProps } from '../props';
@@ -23071,7 +23103,7 @@ ${t}
23071
23103
  `}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 {
23072
23104
  ${c.join(`
23073
23105
  `)}
23074
- }`}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),k=a.useMemo(()=>Gx(v),[v]),V=a.useMemo(()=>Ux(l,d,T,y),[l,d,T,y]),A=a.useMemo(()=>jx(o,Jx(o,G,l,V,v,k,T,I)),[o,l,V,v,k,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:A}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),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,k,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';
23106
+ }`}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=ie=>C.scalingValue(ie,n??!1),k=a.useMemo(()=>Gx(v),[v]),V=a.useMemo(()=>Ux(l,d,T,y),[l,d,T,y]),A=a.useMemo(()=>jx(o,Jx(o,G,l,V,v,k,T,I)),[o,l,V,v,k,T,I,n]),L=a.useMemo(()=>(t??[]).filter(ie=>{var $;return!!(($=ie.image)!=null&&$.url)}),[t]),D=c/u,x=d*Bx(R),W=Math.min(Lx,p*u),M=Rx*u,Y=W+M*2,X=Math.max(0,p-1)*c+(u-1)*D,j=g>0,B=m==="scroll"&&j,ne=m==="autoplay"&&j&&(n?!!i:!0),[S,E]=a.useState(0);a.useEffect(()=>{if(!B)return;const ie=s.current;if(!ie)return;const $=()=>{const P=ie.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 re=new ResizeObserver($);return re.observe(ie),()=>{window.removeEventListener("scroll",$),window.removeEventListener("resize",$),re.disconnect()}},[B]);const O=B?ib(S,g,h):0,ae=j&&m==="autoplay"?360/(g*Tx):0;return L.length===0?r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsx("div",{className:`${o}-wrapper`,style:{width:G(l),marginInline:"auto"}})]}):r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),r.jsx("div",{ref:s,className:`${o}-wrapper`,style:{width:G(l),height:G(X),marginInline:"auto"},children:Array.from({length:Y},(ie,$)=>{const re=$-M,te=L[sd(re,L.length)].image,K=ps(re,u),fe=Qx(re,u),We=B?ld(fe+O):fe,me=tb(re,u,c,D),ce=y===0?0:(Hl(K+7.3)-.5)*y*D,U=T?1:1+(Hl(K+3.1)-.5)*2*Qc*(.35+y),Q=We*Math.PI*2,{offset:Z,scale:ke}=td(v,k,Q),we=d*U,Pe=Kx(we,ke),de=nd(l,V,Z),ge={"--helix-base-w":G(we),...T?{"--helix-base-h":G(x)}:{}},be={top:G(me+ce),transform:"translateY(-50%)",...ge,...ne?{animationDuration:`${Fo(ae)}s`,animationDelay:nb(fe,ae,h),animationDirection:h==="left"?"reverse":"normal"}:{left:Xx(G,de,Pe),width:G(Pe),...T?{height:G(x*ke)}:{},zIndex:id(ke),opacity:rd(Q),filter:ad(Q,I)}},z=b>0?{borderRadius:G(b)}:{},se=T?{...z,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:z,he=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:ne?`${o}-item`:`${o}-item ${o}-item-static`,style:be,children:T?r.jsx("div",{className:`${o}-cover`,style:z,children:he}):he},`${p}-${u}-${re}`)})})]})}const rb=`import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
23075
23107
  import { CommonComponentProps } from '../props';
23076
23108
  import { scalingValue } from '../utils/scalingValue';
23077
23109
  import { useScopedStyles } from '../utils/useScopedStyles';