@cntrl-site/components 1.0.17-0 → 1.0.17-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),ke=require("classnames"),v=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ii=require("react-dom");function La(e){return e.type==="object"&&e.version===1}const Pa="ControlSlider-module__wrapper___sHEkd",Ea="ControlSlider-module__hoverArrow___A-dOH",_a="ControlSlider-module__sliderItem___QQSkR",Aa="ControlSlider-module__sliderImage___9hRl-",Ia="ControlSlider-module__arrow___05ghY",ka="ControlSlider-module__arrowVertical___tBfVN",Ra="ControlSlider-module__nextArrow___-30Yc",Fa="ControlSlider-module__arrowInner___aEra3",Wa="ControlSlider-module__arrowIcon___S4ztF",Ma="ControlSlider-module__arrowImg___2dwJW",Ha="ControlSlider-module__mirror___brd6U",Na="ControlSlider-module__pagination___bicLF",Ba="ControlSlider-module__paginationInner___bT-P-",Oa="ControlSlider-module__paginationVertical___zYqKw",Va="ControlSlider-module__paginationItem___nTRbk",Da="ControlSlider-module__dot___p1Qun",za="ControlSlider-module__activeDot___LHFaj",ja="ControlSlider-module__paginationInsideBottom___R3FWn",qa="ControlSlider-module__paginationInsideTop___V-qb-",Ka="ControlSlider-module__paginationOutsideBottom___14w8D",Ua="ControlSlider-module__paginationOutsideTop___SCLqB",Ga="ControlSlider-module__paginationInsideLeft___yOBRZ",Ya="ControlSlider-module__paginationInsideRight___Rtt3o",Xa="ControlSlider-module__paginationOutsideLeft___lahaw",Qa="ControlSlider-module__paginationOutsideRight___EtuQa",Za="ControlSlider-module__imgWrapper___UjEgB",Ja="ControlSlider-module__captionBlock___dJ6-j",es="ControlSlider-module__captionTextWrapper___HFlpf",ts="ControlSlider-module__captionText___uGBVc",ns="ControlSlider-module__active___WZK4G",rs="ControlSlider-module__withPointerEvents___t-18M",os="ControlSlider-module__topLeftAlignment___zjnGM",is="ControlSlider-module__topCenterAlignment___gD1xW",as="ControlSlider-module__topRightAlignment___NMapS",ss="ControlSlider-module__middleLeftAlignment___OnUrY",ls="ControlSlider-module__middleCenterAlignment___Tdkl0",cs="ControlSlider-module__middleRightAlignment___wEbfX",ds="ControlSlider-module__bottomLeftAlignment___cTP2-",us="ControlSlider-module__bottomCenterAlignment___c54fB",ps="ControlSlider-module__bottomRightAlignment___kEwrz",ms="ControlSlider-module__clickOverlay___DZA28",gs="ControlSlider-module__contain___pLyq7",hs="ControlSlider-module__cover___KdDat",ce={wrapper:Pa,hoverArrow:Ea,sliderItem:_a,sliderImage:Aa,arrow:Ia,arrowVertical:ka,nextArrow:Ra,arrowInner:Fa,arrowIcon:Wa,arrowImg:Ma,mirror:Ha,pagination:Na,paginationInner:Ba,paginationVertical:Oa,paginationItem:Va,dot:Da,activeDot:za,paginationInsideBottom:ja,paginationInsideTop:qa,paginationOutsideBottom:Ka,paginationOutsideTop:Ua,paginationInsideLeft:Ga,paginationInsideRight:Ya,paginationOutsideLeft:Xa,paginationOutsideRight:Qa,imgWrapper:Za,captionBlock:Ja,captionTextWrapper:es,captionText:ts,active:ns,withPointerEvents:rs,topLeftAlignment:os,topCenterAlignment:is,topRightAlignment:as,middleLeftAlignment:ss,middleCenterAlignment:ls,middleRightAlignment:cs,bottomLeftAlignment:ds,bottomCenterAlignment:us,bottomRightAlignment:ps,clickOverlay:ms,contain:gs,cover:hs};function fs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ys(e,t,n){return t&&fs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var No="(prefers-reduced-motion: reduce)",fn=1,vs=2,bn=3,Ln=4,jn=5,cr=6,fr=7,bs={CREATED:fn,MOUNTED:vs,IDLE:bn,MOVING:Ln,SCROLLING:jn,DRAGGING:cr,DESTROYED:fr};function Ht(e){e.length=0}function Kt(e,t,n){return Array.prototype.slice.call(e,t,n)}function He(e){return e.bind.apply(e,[null].concat(Kt(arguments,1)))}var ki=setTimeout,Qr=function(){};function Bo(e){return requestAnimationFrame(e)}function Cr(e,t){return typeof t===e}function Fn(e){return!lo(e)&&Cr("object",e)}var so=Array.isArray,Ri=He(Cr,"function"),zt=He(Cr,"string"),qn=He(Cr,"undefined");function lo(e){return e===null}function Fi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Kn(e){return so(e)?e:[e]}function xt(e,t){Kn(e).forEach(t)}function co(e,t){return e.indexOf(t)>-1}function dr(e,t){return e.push.apply(e,Kn(t)),e}function kt(e,t,n){e&&xt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Tt(e,t){kt(e,zt(t)?t.split(" "):t,!0)}function Un(e,t){xt(t,e.appendChild.bind(e))}function uo(e,t){xt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Wn(e,t){return Fi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Wi(e,t){var n=e?Kt(e.children):[];return t?n.filter(function(r){return Wn(r,t)}):n}function Gn(e,t){return t?Wi(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function nn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Hn(e){return Kt(arguments,1).forEach(function(t){nn(t,function(n,r){e[r]=t[r]})}),e}function Dt(e){return Kt(arguments,1).forEach(function(t){nn(t,function(n,r){so(n)?e[r]=n.slice():Fn(n)?e[r]=Dt({},Fn(e[r])?e[r]:{},n):e[r]=n})}),e}function Oo(e,t){xt(t||Mn(e),function(n){delete e[n]})}function Lt(e,t){xt(e,function(n){xt(t,function(r){n&&n.removeAttribute(r)})})}function xe(e,t,n){Fn(t)?nn(t,function(r,i){xe(e,i,r)}):xt(e,function(r){lo(n)||n===""?Lt(r,t):r.setAttribute(t,String(n))})}function yn(e,t,n){var r=document.createElement(e);return t&&(zt(t)?Tt(r,t):xe(r,t)),n&&Un(n,r),r}function Ct(e,t,n){if(qn(n))return getComputedStyle(e)[t];lo(n)||(e.style[t]=""+n)}function Nn(e,t){Ct(e,"display",t)}function Mi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function St(e,t){return e.getAttribute(t)}function Vo(e,t){return e&&e.classList.contains(t)}function ft(e){return e.getBoundingClientRect()}function rn(e){xt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Hi(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function It(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ni(e,t){return e&&e.querySelector(t)}function po(e,t){return t?Kt(e.querySelectorAll(t)):[]}function Rt(e,t){kt(e,t,!1)}function Zr(e){return e.timeStamp}function Xt(e){return zt(e)?e:e?e+"px":""}var Yn="splide",mo="data-"+Yn;function In(e,t){if(!e)throw new Error("["+Yn+"] "+(t||""))}var jt=Math.min,yr=Math.max,vr=Math.floor,Bn=Math.ceil,st=Math.abs;function Bi(e,t,n){return st(e-t)<n}function ur(e,t,n,r){var i=jt(t,n),l=yr(t,n);return r?i<e&&e<l:i<=e&&e<=l}function mn(e,t,n){var r=jt(t,n),i=yr(t,n);return jt(yr(r,e),i)}function Jr(e){return+(e>0)-+(e<0)}function eo(e,t){return xt(t,function(n){e=e.replace("%s",""+n)}),e}function go(e){return e<10?"0"+e:""+e}var Do={};function xs(e){return""+e+go(Do[e]=(Do[e]||0)+1)}function Oi(){var e=[];function t(o,c,s,p){i(o,c,function(u,T,y){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);f?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,y,s,m])})}function n(o,c,s){i(o,c,function(p,u,T){e=e.filter(function(y){return y[0]===p&&y[1]===u&&y[2]===T&&(!s||y[3]===s)?(y[4](),!1):!0})})}function r(o,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),o.dispatchEvent(p),p}function i(o,c,s){xt(o,function(p){p&&xt(c,function(u){u.split(" ").forEach(function(T){var y=T.split(".");s(p,y[0],y[1])})})})}function l(){e.forEach(function(o){o[4]()}),Ht(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Ut="mounted",to="ready",Nt="move",Pn="moved",ho="click",Vi="active",Di="inactive",zi="visible",ji="hidden",qe="refresh",rt="updated",xn="resize",Sr="resized",qi="drag",Ki="dragging",Ui="dragged",wr="scroll",an="scrolled",$s="overflow",fo="destroy",Gi="arrows:mounted",Yi="arrows:updated",Xi="pagination:mounted",Qi="pagination:updated",yo="navigation:mounted",vo="autoplay:play",Zi="autoplay:playing",bo="autoplay:pause",xo="lazyload:loaded",Ji="sk",ea="sh",br="ei";function Ne(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Oi();function r(l,o){n.bind(t,Kn(l).join(" "),function(c){o.apply(o,so(c.detail)?c.detail:[])})}function i(l){n.dispatch(t,l,Kt(arguments,1))}return e&&e.event.on(fo,n.destroy),Hn(n,{bus:t,on:r,off:He(n.unbind,t),emit:i})}function Tr(e,t,n,r){var i=Date.now,l,o=0,c,s=!0,p=0;function u(){if(!s){if(o=e?jt((i()-l)/e,1):1,n&&n(o),o>=1&&(t(),l=i(),r&&++p>=r))return y();c=Bo(u)}}function T(w){w||m(),l=i()-(w?o*e:0),s=!1,c=Bo(u)}function y(){s=!0}function f(){l=i(),o=0,n&&n(o)}function m(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(w){e=w}function $(){return s}return{start:T,rewind:f,pause:y,cancel:m,set:g,isPaused:$}}function Cs(e){var t=e;function n(i){t=i}function r(i){return co(Kn(i),t)}return{set:n,is:r}}function Ss(e,t){var n=Tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ws(e,t,n){var r=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},o=Oi(),c=[];function s(){var m=n.mediaQuery==="min";Mn(i).sort(function(g,$){return m?+g-+$:+$-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,No),T()}function p(m){m&&o.destroy()}function u(m,g){var $=matchMedia(g);o.bind($,"change",T),c.push([m,$])}function T(){var m=r.is(fr),g=n.direction,$=c.reduce(function(w,C){return Dt(w,C[1].matches?C[0]:{})},{});Oo(n),f($),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function y(m){matchMedia(No).matches&&(m?Dt(n,l):Oo(n,Mn(l)))}function f(m,g,$){Dt(n,m),g&&Dt(Object.getPrototypeOf(n),m),($||!r.is(fn))&&e.emit(rt,n)}return{setup:s,destroy:p,reduce:y,set:f}}var Lr="Arrow",Pr=Lr+"Left",Er=Lr+"Right",ta=Lr+"Up",na=Lr+"Down",zo="rtl",_r="ttb",Nr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ta,Er],ArrowRight:[na,Pr]};function Ts(e,t,n){function r(l,o,c){c=c||n.direction;var s=c===zo&&!o?1:c===_r?0:-1;return Nr[l]&&Nr[l][s]||l.replace(/width|left|right/i,function(p,u){var T=Nr[p.toLowerCase()][s]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(l){return l*(n.direction===zo?1:-1)}return{resolve:r,orient:i}}var Ft="role",vn="tabindex",Ls="disabled",wt="aria-",Xn=wt+"controls",ra=wt+"current",jo=wt+"selected",yt=wt+"label",$o=wt+"labelledby",oa=wt+"hidden",Co=wt+"orientation",On=wt+"roledescription",qo=wt+"live",Ko=wt+"busy",Uo=wt+"atomic",So=[Ft,vn,Ls,Xn,ra,yt,$o,oa,Co,On],Pt=Yn+"__",Gt="is-",Br=Yn,Go=Pt+"track",Ps=Pt+"list",Ar=Pt+"slide",ia=Ar+"--clone",Es=Ar+"__container",wo=Pt+"arrows",Ir=Pt+"arrow",aa=Ir+"--prev",sa=Ir+"--next",kr=Pt+"pagination",la=kr+"__page",_s=Pt+"progress",As=_s+"__bar",Is=Pt+"toggle",ks=Pt+"spinner",Rs=Pt+"sr",Fs=Gt+"initialized",on=Gt+"active",ca=Gt+"prev",da=Gt+"next",no=Gt+"visible",ro=Gt+"loading",ua=Gt+"focus-in",pa=Gt+"overflow",Ws=[on,no,ca,da,ro,ua,pa],Ms={slide:Ar,clone:ia,arrows:wo,arrow:Ir,prev:aa,next:sa,pagination:kr,page:la,spinner:ks};function Hs(e,t){if(Ri(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Wn(n,t);)n=n.parentElement;return n}var Ns=5,Yo=200,ma="touchstart mousedown",Or="touchmove mousemove",Vr="touchend touchcancel mouseup click";function Bs(e,t,n){var r=Ne(e),i=r.on,l=r.bind,o=e.root,c=n.i18n,s={},p=[],u=[],T=[],y,f,m;function g(){b(),M(),C()}function $(){i(qe,w),i(qe,g),i(rt,C),l(document,ma+" keydown",function(x){m=x.type==="keydown"},{capture:!0}),l(o,"focusin",function(){kt(o,ua,!!m)})}function w(x){var P=So.concat("style");Ht(p),Rt(o,u),Rt(y,T),Lt([y,f],P),Lt(o,x?P:["style",On])}function C(){Rt(o,u),Rt(y,T),u=H(Br),T=H(Go),Tt(o,u),Tt(y,T),xe(o,yt,n.label),xe(o,$o,n.labelledby)}function b(){y=L("."+Go),f=Gn(y,"."+Ps),In(y&&f,"A track/list element is missing."),dr(p,Wi(f,"."+Ar+":not(."+ia+")")),nn({arrows:wo,pagination:kr,prev:aa,next:sa,bar:As,toggle:Is},function(x,P){s[P]=L("."+x)}),Hn(s,{root:o,track:y,list:f,slides:p})}function M(){var x=o.id||xs(Yn),P=n.role;o.id=x,y.id=y.id||x+"-track",f.id=f.id||x+"-list",!St(o,Ft)&&o.tagName!=="SECTION"&&P&&xe(o,Ft,P),xe(o,On,c.carousel),xe(f,Ft,"presentation")}function L(x){var P=Ni(o,x);return P&&Hs(P,"."+Br)===o?P:void 0}function H(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Br&&on]}return Hn(s,{setup:g,mount:$,destroy:w})}var $n="slide",En="loop",Qn="fade";function Os(e,t,n,r){var i=Ne(e),l=i.on,o=i.emit,c=i.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,y=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,$=s.Direction.resolve,w=St(r,"style"),C=St(r,yt),b=n>-1,M=Gn(r,"."+Es),L;function H(){b||(r.id=p.id+"-slide"+go(t+1),xe(r,Ft,m?"tabpanel":"group"),xe(r,On,f.slide),xe(r,yt,C||eo(f.slideLabel,[t+1,e.length]))),x()}function x(){c(r,"click",He(o,ho,z)),c(r,"keydown",He(o,Ji,z)),l([Pn,ea,an],E),l(yo,V),y&&l(Nt,S)}function P(){L=!0,i.destroy(),Rt(r,Ws),Lt(r,So),xe(r,"style",w),xe(r,yt,C||"")}function V(){var N=e.splides.map(function(I){var U=I.splide.Components.Slides.getAt(t);return U?U.slide.id:""}).join(" ");xe(r,yt,eo(f.slideX,(b?n:t)+1)),xe(r,Xn,N),xe(r,Ft,g?"button":""),g&&Lt(r,On)}function S(){L||E()}function E(){if(!L){var N=e.index;A(),F(),kt(r,ca,t===N-1),kt(r,da,t===N+1)}}function A(){var N=ee();N!==Vo(r,on)&&(kt(r,on,N),xe(r,ra,T&&N||""),o(N?Vi:Di,z))}function F(){var N=R(),I=!N&&(!ee()||b);if(e.state.is([Ln,jn])||xe(r,oa,I||""),xe(po(r,u.focusableNodes||""),vn,I?-1:""),g&&xe(r,vn,I?-1:0),N!==Vo(r,no)&&(kt(r,no,N),o(N?zi:ji,z)),!N&&document.activeElement===r){var U=s.Slides.getAt(e.index);U&&Mi(U.slide)}}function q(N,I,U){Ct(U&&M||r,N,I)}function ee(){var N=e.index;return N===t||u.cloneStatus&&N===n}function R(){if(e.is(Qn))return ee();var N=ft(s.Elements.track),I=ft(r),U=$("left",!0),X=$("right",!0);return vr(N[U])<=Bn(I[U])&&vr(I[X])<=Bn(N[X])}function W(N,I){var U=st(N-t);return!b&&(u.rewind||e.is(En))&&(U=jt(U,e.length-U)),U<=I}var z={index:t,slideIndex:n,slide:r,container:M,isClone:b,mount:H,destroy:P,update:E,style:q,isWithin:W};return z}function Vs(e,t,n){var r=Ne(e),i=r.on,l=r.emit,o=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){y(),i(qe,f),i(qe,y)}function y(){s.forEach(function(E,A){g(E,A,-1)})}function f(){L(function(E){E.destroy()}),Ht(u)}function m(){L(function(E){E.update()})}function g(E,A,F){var q=Os(e,A,F,E);q.mount(),u.push(q),u.sort(function(ee,R){return ee.index-R.index})}function $(E){return E?H(function(A){return!A.isClone}):u}function w(E){var A=t.Controller,F=A.toIndex(E),q=A.hasFocus()?1:n.perPage;return H(function(ee){return ur(ee.index,F,F+q-1)})}function C(E){return H(E)[0]}function b(E,A){xt(E,function(F){if(zt(F)&&(F=Hi(F)),Fi(F)){var q=s[A];q?uo(F,q):Un(p,F),Tt(F,n.classes.slide),P(F,He(l,xn))}}),l(qe)}function M(E){rn(H(E).map(function(A){return A.slide})),l(qe)}function L(E,A){$(A).forEach(E)}function H(E){return u.filter(Ri(E)?E:function(A){return zt(E)?Wn(A.slide,E):co(Kn(E),A.index)})}function x(E,A,F){L(function(q){q.style(E,A,F)})}function P(E,A){var F=po(E,"img"),q=F.length;q?F.forEach(function(ee){o(ee,"load error",function(){--q||A()})}):A()}function V(E){return E?s.length:u.length}function S(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:$,getIn:w,getAt:C,add:b,remove:M,forEach:L,filter:H,style:x,getLength:V,isEnough:S}}function Ds(e,t,n){var r=Ne(e),i=r.on,l=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,y=p.list,f=c.getAt,m=c.style,g,$,w;function C(){b(),l(window,"resize load",Ss(He(o,xn))),i([rt,qe],b),i(xn,M)}function b(){g=n.direction===_r,Ct(u,"maxWidth",Xt(n.width)),Ct(T,s("paddingLeft"),L(!1)),Ct(T,s("paddingRight"),L(!0)),M(!0)}function M(z){var N=ft(u);(z||$.width!==N.width||$.height!==N.height)&&(Ct(T,"height",H()),m(s("marginRight"),Xt(n.gap)),m("width",P()),m("height",V(),!0),$=N,o(Sr),w!==(w=W())&&(kt(u,pa,w),o($s,w)))}function L(z){var N=n.padding,I=s(z?"right":"left");return N&&Xt(N[I]||(Fn(N)?0:N))||"0px"}function H(){var z="";return g&&(z=x(),In(z,"height or heightRatio is missing."),z="calc("+z+" - "+L(!1)+" - "+L(!0)+")"),z}function x(){return Xt(n.height||ft(y).width*n.heightRatio)}function P(){return n.autoWidth?null:Xt(n.fixedWidth)||(g?"":S())}function V(){return Xt(n.fixedHeight)||(g?n.autoHeight?null:S():x())}function S(){var z=Xt(n.gap);return"calc((100%"+(z&&" + "+z)+")/"+(n.perPage||1)+(z&&" - "+z)+")"}function E(){return ft(y)[s("width")]}function A(z,N){var I=f(z||0);return I?ft(I.slide)[s("width")]+(N?0:ee()):0}function F(z,N){var I=f(z);if(I){var U=ft(I.slide)[s("right")],X=ft(y)[s("left")];return st(U-X)+(N?0:ee())}return 0}function q(z){return F(e.length-1)-F(0)+A(0,z)}function ee(){var z=f(0);return z&&parseFloat(Ct(z.slide,s("marginRight")))||0}function R(z){return parseFloat(Ct(T,s("padding"+(z?"Right":"Left"))))||0}function W(){return e.is(Qn)||q(!0)>E()}return{mount:C,resize:M,listSize:E,slideSize:A,sliderSize:q,totalSize:F,getPadding:R,isOverflow:W}}var zs=2;function js(e,t,n){var r=Ne(e),i=r.on,l=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],p;function u(){i(qe,T),i([rt,xn],f),(p=$())&&(m(p),t.Layout.resize(!0))}function T(){y(),u()}function y(){rn(s),Ht(s),r.destroy()}function f(){var w=$();p!==w&&(p<w||!w)&&r.emit(qe)}function m(w){var C=o.get().slice(),b=C.length;if(b){for(;C.length<w;)dr(C,C);dr(C.slice(-w),C.slice(0,w)).forEach(function(M,L){var H=L<w,x=g(M.slide,L);H?uo(x,C[0].slide):Un(l.list,x),dr(s,x),o.register(x,L-w+(H?0:b),M.index)})}}function g(w,C){var b=w.cloneNode(!0);return Tt(b,n.classes.clone),b.id=e.root.id+"-clone"+go(C+1),b}function $(){var w=n.clones;if(!e.is(En))w=0;else if(qn(w)){var C=n[c("fixedWidth")]&&t.Layout.slideSize(0),b=C&&Bn(ft(l.track)[c("width")]/C);w=b||n[c("autoWidth")]&&e.length||n.perPage*zs}return w}return{mount:u,destroy:y}}function qs(e,t,n){var r=Ne(e),i=r.on,l=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,y=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,$=t.Elements,w=$.list,C=$.track,b;function M(){b=t.Transition,i([Ut,Sr,rt,qe],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function H(I,U,X,Q){I!==U&&z(I>X)&&(E(),P(S(q(),I>X),!0)),o(Ln),l(Nt,U,X,I),b.start(U,function(){o(bn),l(Pn,U,X,I),Q&&Q()})}function x(I){P(F(I,!0))}function P(I,U){if(!e.is(Qn)){var X=U?I:V(I);Ct(w,"transform","translate"+m("X")+"("+X+"px)"),I!==X&&l(ea)}}function V(I){if(e.is(En)){var U=A(I),X=U>t.Controller.getEnd(),Q=U<0;(Q||X)&&(I=S(I,X))}return I}function S(I,U){var X=I-W(U),Q=y();return I-=g(Q*(Bn(st(X)/Q)||1))*(U?1:-1),I}function E(){P(q(),!0),b.cancel()}function A(I){for(var U=t.Slides.get(),X=0,Q=1/0,k=0;k<U.length;k++){var ne=U[k].index,h=st(F(ne,!0)-I);if(h<=Q)Q=h,X=ne;else break}return X}function F(I,U){var X=g(u(I-1)-R(I));return U?ee(X):X}function q(){var I=m("left");return ft(w)[I]-ft(C)[I]+g(p(!1))}function ee(I){return n.trimSpace&&e.is($n)&&(I=mn(I,0,g(y(!0)-T()))),I}function R(I){var U=n.focus;return U==="center"?(T()-s(I,!0))/2:+U*s(I)||0}function W(I){return F(I?t.Controller.getEnd():0,!!n.trimSpace)}function z(I){var U=g(S(q(),I));return I?U>=0:U<=w[m("scrollWidth")]-ft(C)[m("width")]}function N(I,U){U=qn(U)?q():U;var X=I!==!0&&g(U)<g(W(!1)),Q=I!==!1&&g(U)>g(W(!0));return X||Q}return{mount:M,move:H,jump:x,translate:P,shift:S,cancel:E,toIndex:A,toPosition:F,getPosition:q,getLimit:W,exceededLimit:N,reposition:L}}function Ks(e,t,n){var r=Ne(e),i=r.on,l=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,p=o.toPosition,u=t.Slides,T=u.isEnough,y=u.getLength,f=n.omitEnd,m=e.is(En),g=e.is($n),$=He(q,!1),w=He(q,!0),C=n.start||0,b,M=C,L,H,x;function P(){V(),i([rt,qe,br],V),i(Sr,S)}function V(){L=y(!0),H=n.perMove,x=n.perPage,b=z();var h=mn(C,0,f?b:L-1);h!==C&&(C=h,o.reposition())}function S(){b!==z()&&l(br)}function E(h,te,me){if(!ne()){var le=F(h),$e=W(le);$e>-1&&(te||$e!==C)&&(X($e),o.move(le,$e,M,me))}}function A(h,te,me,le){t.Scroll.scroll(h,te,me,function(){var $e=W(o.toIndex(c()));X(f?jt($e,b):$e),le&&le()})}function F(h){var te=C;if(zt(h)){var me=h.match(/([+\-<>])(\d+)?/)||[],le=me[1],$e=me[2];le==="+"||le==="-"?te=ee(C+ +(""+le+(+$e||1)),C):le===">"?te=$e?N(+$e):$(!0):le==="<"&&(te=w(!0))}else te=m?h:mn(h,0,b);return te}function q(h,te){var me=H||(k()?1:x),le=ee(C+me*(h?-1:1),C,!(H||k()));return le===-1&&g&&!Bi(c(),s(!h),1)?h?0:b:te?le:W(le)}function ee(h,te,me){if(T()||k()){var le=R(h);le!==h&&(te=h,h=le,me=!1),h<0||h>b?!H&&(ur(0,h,te,!0)||ur(b,te,h,!0))?h=N(I(h)):m?h=me?h<0?-(L%x||x):L:h:n.rewind?h=h<0?b:0:h=-1:me&&h!==te&&(h=N(I(te)+(h<te?-1:1)))}else h=-1;return h}function R(h){if(g&&n.trimSpace==="move"&&h!==C)for(var te=c();te===p(h,!0)&&ur(h,0,e.length-1,!n.rewind);)h<C?--h:++h;return h}function W(h){return m?(h+L)%L||0:h}function z(){for(var h=L-(k()||m&&H?1:x);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return mn(h,0,L-1)}function N(h){return mn(k()?h:x*h,0,b)}function I(h){return k()?jt(h,b):vr((h>=b?L-1:h)/x)}function U(h){var te=o.toIndex(h);return g?mn(te,0,b):te}function X(h){h!==C&&(M=C,C=h)}function Q(h){return h?M:C}function k(){return!qn(n.focus)||n.isNavigation}function ne(){return e.state.is([Ln,jn])&&!!n.waitForTransition}return{mount:P,go:E,scroll:A,getNext:$,getPrev:w,getAdjacent:q,getEnd:z,setIndex:X,getIndex:Q,toIndex:N,toPage:I,toDest:U,hasFocus:k,isBusy:ne}}var Us="http://www.w3.org/2000/svg",Gs="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",nr=40;function Ys(e,t,n){var r=Ne(e),i=r.on,l=r.bind,o=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,y=p.track,f=T,m=p.prev,g=p.next,$,w,C={};function b(){L(),i(rt,M)}function M(){H(),b()}function L(){var A=n.arrows;A&&!(m&&g)&&V(),m&&g&&(Hn(C,{prev:m,next:g}),Nn(f,A?"":"none"),Tt(f,w=wo+"--"+n.direction),A&&(x(),E(),xe([m,g],Xn,y.id),o(Gi,m,g)))}function H(){r.destroy(),Rt(f,w),$?(rn(T?[m,g]:f),m=g=null):Lt([m,g],So)}function x(){i([Ut,Pn,qe,an,br],E),l(g,"click",He(P,">")),l(m,"click",He(P,"<"))}function P(A){u.go(A,!0)}function V(){f=T||yn("div",c.arrows),m=S(!0),g=S(!1),$=!0,Un(f,[m,g]),!T&&uo(f,y)}function S(A){var F='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+Us+'" viewBox="0 0 '+nr+" "+nr+'" width="'+nr+'" height="'+nr+'" focusable="false"><path d="'+(n.arrowPath||Gs)+'" />';return Hi(F)}function E(){if(m&&g){var A=e.index,F=u.getPrev(),q=u.getNext(),ee=F>-1&&A<F?s.last:s.prev,R=q>-1&&A>q?s.first:s.next;m.disabled=F<0,g.disabled=q<0,xe(m,yt,ee),xe(g,yt,R),o(Yi,m,g,F,q)}}return{arrows:C,mount:b,destroy:H,update:E}}var Xs=mo+"-interval";function Qs(e,t,n){var r=Ne(e),i=r.on,l=r.bind,o=r.emit,c=Tr(n.interval,e.go.bind(e,">"),x),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,y=u.toggle,f=n.autoplay,m,g,$=f==="pause";function w(){f&&(C(),y&&xe(y,Xn,p.track.id),$||b(),H())}function C(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(V){g=V.type==="focusin",L()}),y&&l(y,"click",function(){$?b():M(!0)}),i([Nt,wr,qe],c.rewind),i(Nt,P)}function b(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=$=!1,H(),o(vo))}function M(V){V===void 0&&(V=!0),$=!!V,H(),s()||(c.pause(),o(bo))}function L(){$||(m||g?M(!1):b())}function H(){y&&(kt(y,on,!$),xe(y,yt,n.i18n[$?"play":"pause"]))}function x(V){var S=p.bar;S&&Ct(S,"width",V*100+"%"),o(Zi,V)}function P(V){var S=t.Slides.getAt(V);c.set(S&&+St(S.slide,Xs)||n.interval)}return{mount:w,destroy:c.cancel,play:b,pause:M,isPaused:s}}function Zs(e,t,n){var r=Ne(e),i=r.on;function l(){n.cover&&(i(xo,He(c,!0)),i([Ut,rt,qe],He(o,!0)))}function o(s){t.Slides.forEach(function(p){var u=Gn(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Nn(p,s?"none":"")}return{mount:l,destroy:He(o,!1)}}var Js=10,el=600,tl=.6,nl=1.5,rl=800;function ol(e,t,n){var r=Ne(e),i=r.on,l=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,y=e.is($n),f,m,g=1;function $(){i(Nt,M),i([rt,qe],L)}function w(x,P,V,S,E){var A=s();if(M(),V&&(!y||!u())){var F=t.Layout.sliderSize(),q=Jr(x)*F*vr(st(x)/F)||0;x=c.toPosition(t.Controller.toDest(x%F))+q}var ee=Bi(A,x,1);g=1,P=ee?0:P||yr(st(x-A)/nl,rl),m=S,f=Tr(P,C,He(b,A,x,E),1),o(jn),l(wr),f.start()}function C(){o(bn),m&&m(),l(an)}function b(x,P,V,S){var E=s(),A=x+(P-x)*H(S),F=(A-E)*g;T(E+F),y&&!V&&u()&&(g*=tl,st(F)<Js&&w(p(u(!0)),el,!1,m,!0))}function M(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(M(),C())}function H(x){var P=n.easingFunc;return P?P(x):1-Math.pow(1-x,4)}return{mount:$,destroy:M,scroll:w,cancel:L}}var gn={passive:!1,capture:!0};function il(e,t,n){var r=Ne(e),i=r.on,l=r.emit,o=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,y=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,$=m.orient,w=p.getPosition,C=p.exceededLimit,b,M,L,H,x,P=!1,V,S,E;function A(){o(y,Or,Qr,gn),o(y,Vr,Qr,gn),o(y,ma,q,gn),o(y,"click",W,{capture:!0}),o(y,"dragstart",It),i([Ut,rt],F)}function F(){var D=n.drag;de(!D),H=D==="free"}function q(D){if(V=!1,!S){var O=$e(D);le(D.target)&&(O||!D.button)&&(T.isBusy()?It(D,!0):(E=O?y:window,x=s.is([Ln,jn]),L=null,o(E,Or,ee,gn),o(E,Vr,R,gn),p.cancel(),u.cancel(),z(D)))}}function ee(D){if(s.is(cr)||(s.set(cr),l(qi)),D.cancelable)if(x){p.translate(b+me(k(D)));var O=ne(D)>Yo,J=P!==(P=C());(O||J)&&z(D),V=!0,l(Ki),It(D)}else U(D)&&(x=I(D),It(D))}function R(D){s.is(cr)&&(s.set(bn),l(Ui)),x&&(N(D),It(D)),c(E,Or,ee),c(E,Vr,R),x=!1}function W(D){!S&&V&&It(D,!0)}function z(D){L=M,M=D,b=w()}function N(D){var O=X(D),J=Q(O),se=n.rewind&&n.rewindByDrag;f(!1),H?T.scroll(J,0,n.snap):e.is(Qn)?T.go($(Jr(O))<0?se?"<":"-":se?">":"+"):e.is($n)&&P&&se?T.go(C(!0)?">":"<"):T.go(T.toDest(J),!0),f(!0)}function I(D){var O=n.dragMinThreshold,J=Fn(O),se=J&&O.mouse||0,fe=(J?O.touch:+O)||10;return st(k(D))>($e(D)?fe:se)}function U(D){return st(k(D))>st(k(D,!0))}function X(D){if(e.is(En)||!P){var O=ne(D);if(O&&O<Yo)return k(D)/O}return 0}function Q(D){return w()+Jr(D)*jt(st(D)*(n.flickPower||600),H?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function k(D,O){return te(D,O)-te(h(D),O)}function ne(D){return Zr(D)-Zr(h(D))}function h(D){return M===D&&L||M}function te(D,O){return($e(D)?D.changedTouches[0]:D)["page"+g(O?"Y":"X")]}function me(D){return D/(P&&e.is($n)?Ns:1)}function le(D){var O=n.noDrag;return!Wn(D,"."+la+", ."+Ir)&&(!O||!Wn(D,O))}function $e(D){return typeof TouchEvent<"u"&&D instanceof TouchEvent}function re(){return x}function de(D){S=D}return{mount:A,disable:de,isDragging:re}}var al={Spacebar:" ",Right:Er,Left:Pr,Up:ta,Down:na};function To(e){return e=zt(e)?e:e.key,al[e]||e}var Xo="keydown";function sl(e,t,n){var r=Ne(e),i=r.on,l=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){y(),i(rt,f),i(rt,y),i(Nt,g)}function y(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Xo,$))}function f(){o(p,Xo)}function m(w){u=w}function g(){var w=u;u=!0,ki(function(){u=w})}function $(w){if(!u){var C=To(w);C===s(Pr)?e.go("<"):C===s(Er)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var kn=mo+"-lazy",pr=kn+"-srcset",ll="["+kn+"], ["+pr+"]";function cl(e,t,n){var r=Ne(e),i=r.on,l=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Pn,an],u=[];function T(){n.lazyLoad&&(y(),i(qe,y))}function y(){Ht(u),f(),s?w():(l(p),i(p,m),m())}function f(){t.Slides.forEach(function(C){po(C.slide,ll).forEach(function(b){var M=St(b,kn),L=St(b,pr);if(M!==b.src||L!==b.srcset){var H=n.classes.spinner,x=b.parentElement,P=Gn(x,"."+H)||yn("span",H,x);u.push([b,C,P]),b.src||Nn(b,"none")}})})}function m(){u=u.filter(function(C){var b=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,b)?g(C):!0}),u.length||l(p)}function g(C){var b=C[0];Tt(C[1].slide,ro),o(b,"load error",He($,C)),xe(b,"src",St(b,kn)),xe(b,"srcset",St(b,pr)),Lt(b,kn),Lt(b,pr)}function $(C,b){var M=C[0],L=C[1];Rt(L.slide,ro),b.type!=="error"&&(rn(C[2]),Nn(M,""),c(xo,M,L),c(xn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:He(Ht,u),check:m}}function dl(e,t,n){var r=Ne(e),i=r.on,l=r.emit,o=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,y=p.go,f=t.Direction.resolve,m=s.pagination,g=[],$,w;function C(){b(),i([rt,qe,br],C);var S=n.pagination;m&&Nn(m,S?"":"none"),S&&(i([Nt,wr,an],V),M(),V(),l(Xi,{list:$,items:g},P(e.index)))}function b(){$&&(rn(m?Kt($.children):$),Rt($,w),Ht(g),$=null),r.destroy()}function M(){var S=e.length,E=n.classes,A=n.i18n,F=n.perPage,q=u()?p.getEnd()+1:Bn(S/F);$=m||yn("ul",E.pagination,s.track.parentElement),Tt($,w=kr+"--"+x()),xe($,Ft,"tablist"),xe($,yt,A.select),xe($,Co,x()===_r?"vertical":"");for(var ee=0;ee<q;ee++){var R=yn("li",null,$),W=yn("button",{class:E.page,type:"button"},R),z=c.getIn(ee).map(function(I){return I.slide.id}),N=!u()&&F>1?A.pageX:A.slideX;o(W,"click",He(L,ee)),n.paginationKeyboard&&o(W,"keydown",He(H,ee)),xe(R,Ft,"presentation"),xe(W,Ft,"tab"),xe(W,Xn,z.join(" ")),xe(W,yt,eo(N,ee+1)),xe(W,vn,-1),g.push({li:R,button:W,page:ee})}}function L(S){y(">"+S,!0)}function H(S,E){var A=g.length,F=To(E),q=x(),ee=-1;F===f(Er,!1,q)?ee=++S%A:F===f(Pr,!1,q)?ee=(--S+A)%A:F==="Home"?ee=0:F==="End"&&(ee=A-1);var R=g[ee];R&&(Mi(R.button),y(">"+ee),It(E,!0))}function x(){return n.paginationDirection||n.direction}function P(S){return g[p.toPage(S)]}function V(){var S=P(T(!0)),E=P(T());if(S){var A=S.button;Rt(A,on),Lt(A,jo),xe(A,vn,-1)}if(E){var F=E.button;Tt(F,on),xe(F,jo,!0),xe(F,vn,"")}l(Qi,{list:$,items:g},S,E)}return{items:g,mount:C,destroy:b,getAt:P,update:V}}var ul=[" ","Enter"];function pl(e,t,n){var r=n.isNavigation,i=n.slideFocus,l=[];function o(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){l.forEach(function(m){m.destroy()}),Ht(l)}function s(){c(),o()}function p(m,g){var $=Ne(m);$.on(Nt,function(w,C,b){g.go(g.is(En)?b:w)}),l.push($)}function u(){var m=Ne(e),g=m.on;g(ho,y),g(Ji,f),g([Ut,rt],T),l.push(m),m.emit(yo,e.splides)}function T(){xe(t.Elements.list,Co,n.direction===_r?"vertical":"")}function y(m){e.go(m.index)}function f(m,g){co(ul,To(g))&&(y(m),It(g))}return{setup:He(t.Media.set,{slideFocus:qn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function ml(e,t,n){var r=Ne(e),i=r.bind,l=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,gn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,y=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;st(u)>f&&y-l>m&&(e.go(T?"<":">"),l=y),s(T)&&It(p)}}function s(p){return!n.releaseWheel||e.state.is(Ln)||t.Controller.getAdjacent(p)!==-1}return{mount:o}}var gl=90;function hl(e,t,n){var r=Ne(e),i=r.on,l=t.Elements.track,o=n.live&&!n.isNavigation,c=yn("span",Rs),s=Tr(gl,He(u,!1));function p(){o&&(y(!t.Autoplay.isPaused()),xe(l,Uo,!0),c.textContent="…",i(vo,He(y,!0)),i(bo,He(y,!1)),i([Pn,an],He(u,!0)))}function u(f){xe(l,Ko,f),f?(Un(l,c),s.start()):(rn(c),s.cancel())}function T(){Lt(l,[qo,Uo,Ko]),rn(c)}function y(f){o&&xe(l,qo,f?"off":"polite")}return{mount:p,disable:y,destroy:T}}var fl=Object.freeze({__proto__:null,Media:ws,Direction:Ts,Elements:Bs,Slides:Vs,Layout:Ds,Clones:js,Move:qs,Controller:Ks,Arrows:Ys,Autoplay:Qs,Cover:Zs,Scroll:ol,Drag:il,Keyboard:sl,LazyLoad:cl,Pagination:dl,Sync:pl,Wheel:ml,Live:hl}),yl={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"},vl={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:Ms,i18n:yl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function bl(e,t,n){var r=t.Slides;function i(){Ne(e).on([Ut,qe],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),ki(s)}return{mount:i,start:o,cancel:Qr}}function xl(e,t,n){var r=t.Move,i=t.Controller,l=t.Scroll,o=t.Elements.list,c=He(Ct,o,"transition"),s;function p(){Ne(e).bind(o,"transitionend",function(f){f.target===o&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),$=r.getPosition(),w=y(f);st(g-$)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function y(f){var m=n.rewindSpeed;if(e.is($n)&&m){var g=i.getIndex(!0),$=i.getEnd();if(g===0&&f>=$||g>=$&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var $l=(function(){function e(n,r){this.event=Ne(),this.Components={},this.state=Cs(fn),this.splides=[],this._o={},this._E={};var i=zt(n)?Ni(document,n):n;In(i,i+" is invalid."),this.root=i,r=Dt({label:St(i,yt)||"",labelledby:St(i,$o)||""},vl,e.defaults,r||{});try{Dt(r,JSON.parse(St(i,mo)))}catch{In(!1,"Invalid JSON")}this._o=Object.create(Dt({},r))}var t=e.prototype;return t.mount=function(r,i){var l=this,o=this.state,c=this.Components;In(o.is([fn,fr]),"Already mounted!"),o.set(fn),this._C=c,this._T=i||this._T||(this.is(Qn)?bl:xl),this._E=r||this._E;var s=Hn({},fl,this._E,{Transition:this._T});return nn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),nn(c,function(p){p.mount&&p.mount()}),this.emit(Ut),Tt(this.root,Fs),o.set(bn),this.emit(to),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(bn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Kt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(qe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,l=this.state;return l.is(fn)?Ne(this).on(to,this.destroy.bind(this,r)):(nn(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(fo),i.destroy(),r&&Ht(this.splides),l.set(fr)),this},ys(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Lo=$l;Lo.defaults={};Lo.STATES=bs;var Qo=[[Ut,"onMounted"],[to,"onReady"],[Nt,"onMove"],[Pn,"onMoved"],[ho,"onClick"],[Vi,"onActive"],[Di,"onInactive"],[zi,"onVisible"],[ji,"onHidden"],[qe,"onRefresh"],[rt,"onUpdated"],[xn,"onResize"],[Sr,"onResized"],[qi,"onDrag"],[Ki,"onDragging"],[Ui,"onDragged"],[wr,"onScroll"],[an,"onScrolled"],[fo,"onDestroy"],[Gi,"onArrowsMounted"],[Yi,"onArrowsUpdated"],[Xi,"onPaginationMounted"],[Qi,"onPaginationUpdated"],[yo,"onNavigationMounted"],[vo,"onAutoplayPlay"],[Zi,"onAutoplayPlaying"],[bo,"onAutoplayPause"],[xo,"onLazyLoadLoaded"]];function Po(...e){return e.filter(Boolean).join(" ")}function xr(e){return e!==null&&typeof e=="object"}function oo(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!oo(n,t[r]));if(xr(e)&&xr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!oo(e[i],t[i]))}return e===t}function Cl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Sl(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function io(e,t){const n=e;return Sl(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():xr(r)?n[i]=io(xr(n[i])?n[i]:{},r):n[i]=r}),n}var wl=({children:e,className:t,...n})=>d.createElement("div",{className:Po("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Eo=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Lo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=io({},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&&!oo(this.options,e)&&(this.splide.options=e,this.options=io({},e));const t=this.getSlides();Cl(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){Qo.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}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:r,...i}=this.props;return d.createElement(t,{className:Po("splide",e),ref:this.splideRef,...this.omit(i,["options",...Qo.map(l=>l[1])])},n?d.createElement(wl,null,r):r)}},_o=({children:e,className:t,...n})=>d.createElement("li",{className:Po("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),Re=require("classnames"),y=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ii=require("react-dom");function La(e){return e.type==="object"&&e.version===1}const Pa="ControlSlider-module__wrapper___sHEkd",Ea="ControlSlider-module__hoverArrow___A-dOH",_a="ControlSlider-module__sliderItem___QQSkR",Aa="ControlSlider-module__sliderImage___9hRl-",Ia="ControlSlider-module__arrow___05ghY",Ra="ControlSlider-module__arrowVertical___tBfVN",ka="ControlSlider-module__nextArrow___-30Yc",Fa="ControlSlider-module__arrowInner___aEra3",Wa="ControlSlider-module__arrowIcon___S4ztF",Ma="ControlSlider-module__arrowImg___2dwJW",Na="ControlSlider-module__mirror___brd6U",Ha="ControlSlider-module__pagination___bicLF",Oa="ControlSlider-module__paginationInner___bT-P-",Ba="ControlSlider-module__paginationVertical___zYqKw",Va="ControlSlider-module__paginationItem___nTRbk",Da="ControlSlider-module__dot___p1Qun",za="ControlSlider-module__activeDot___LHFaj",ja="ControlSlider-module__paginationInsideBottom___R3FWn",qa="ControlSlider-module__paginationInsideTop___V-qb-",Ka="ControlSlider-module__paginationOutsideBottom___14w8D",Ua="ControlSlider-module__paginationOutsideTop___SCLqB",Ga="ControlSlider-module__paginationInsideLeft___yOBRZ",Ya="ControlSlider-module__paginationInsideRight___Rtt3o",Xa="ControlSlider-module__paginationOutsideLeft___lahaw",Qa="ControlSlider-module__paginationOutsideRight___EtuQa",Za="ControlSlider-module__imgWrapper___UjEgB",Ja="ControlSlider-module__captionBlock___dJ6-j",es="ControlSlider-module__captionTextWrapper___HFlpf",ts="ControlSlider-module__captionText___uGBVc",ns="ControlSlider-module__active___WZK4G",rs="ControlSlider-module__withPointerEvents___t-18M",os="ControlSlider-module__topLeftAlignment___zjnGM",is="ControlSlider-module__topCenterAlignment___gD1xW",as="ControlSlider-module__topRightAlignment___NMapS",ss="ControlSlider-module__middleLeftAlignment___OnUrY",ls="ControlSlider-module__middleCenterAlignment___Tdkl0",cs="ControlSlider-module__middleRightAlignment___wEbfX",ds="ControlSlider-module__bottomLeftAlignment___cTP2-",us="ControlSlider-module__bottomCenterAlignment___c54fB",ps="ControlSlider-module__bottomRightAlignment___kEwrz",ms="ControlSlider-module__clickOverlay___DZA28",gs="ControlSlider-module__contain___pLyq7",hs="ControlSlider-module__cover___KdDat",ce={wrapper:Pa,hoverArrow:Ea,sliderItem:_a,sliderImage:Aa,arrow:Ia,arrowVertical:Ra,nextArrow:ka,arrowInner:Fa,arrowIcon:Wa,arrowImg:Ma,mirror:Na,pagination:Ha,paginationInner:Oa,paginationVertical:Ba,paginationItem:Va,dot:Da,activeDot:za,paginationInsideBottom:ja,paginationInsideTop:qa,paginationOutsideBottom:Ka,paginationOutsideTop:Ua,paginationInsideLeft:Ga,paginationInsideRight:Ya,paginationOutsideLeft:Xa,paginationOutsideRight:Qa,imgWrapper:Za,captionBlock:Ja,captionTextWrapper:es,captionText:ts,active:ns,withPointerEvents:rs,topLeftAlignment:os,topCenterAlignment:is,topRightAlignment:as,middleLeftAlignment:ss,middleCenterAlignment:ls,middleRightAlignment:cs,bottomLeftAlignment:ds,bottomCenterAlignment:us,bottomRightAlignment:ps,clickOverlay:ms,contain:gs,cover:hs};function fs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ys(e,t,n){return t&&fs(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ho="(prefers-reduced-motion: reduce)",fn=1,vs=2,bn=3,Ln=4,jn=5,cr=6,fr=7,bs={CREATED:fn,MOUNTED:vs,IDLE:bn,MOVING:Ln,SCROLLING:jn,DRAGGING:cr,DESTROYED:fr};function Ht(e){e.length=0}function Xt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ne(e){return e.bind.apply(e,[null].concat(Xt(arguments,1)))}var Ri=setTimeout,Qr=function(){};function Oo(e){return requestAnimationFrame(e)}function Sr(e,t){return typeof t===e}function Fn(e){return!lo(e)&&Sr("object",e)}var so=Array.isArray,ki=Ne(Sr,"function"),Ut=Ne(Sr,"string"),qn=Ne(Sr,"undefined");function lo(e){return e===null}function Fi(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Kn(e){return so(e)?e:[e]}function bt(e,t){Kn(e).forEach(t)}function co(e,t){return e.indexOf(t)>-1}function dr(e,t){return e.push.apply(e,Kn(t)),e}function kt(e,t,n){e&&bt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function Lt(e,t){kt(e,Ut(t)?t.split(" "):t,!0)}function Un(e,t){bt(t,e.appendChild.bind(e))}function uo(e,t){bt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function Wn(e,t){return Fi(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Wi(e,t){var n=e?Xt(e.children):[];return t?n.filter(function(r){return Wn(r,t)}):n}function Gn(e,t){return t?Wi(e,t)[0]:e.firstElementChild}var Mn=Object.keys;function nn(e,t,n){return e&&(n?Mn(e).reverse():Mn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Nn(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){e[r]=t[r]})}),e}function Kt(e){return Xt(arguments,1).forEach(function(t){nn(t,function(n,r){so(n)?e[r]=n.slice():Fn(n)?e[r]=Kt({},Fn(e[r])?e[r]:{},n):e[r]=n})}),e}function Bo(e,t){bt(t||Mn(e),function(n){delete e[n]})}function Pt(e,t){bt(e,function(n){bt(t,function(r){n&&n.removeAttribute(r)})})}function Ce(e,t,n){Fn(t)?nn(t,function(r,i){Ce(e,i,r)}):bt(e,function(r){lo(n)||n===""?Pt(r,t):r.setAttribute(t,String(n))})}function yn(e,t,n){var r=document.createElement(e);return t&&(Ut(t)?Lt(r,t):Ce(r,t)),n&&Un(n,r),r}function Ct(e,t,n){if(qn(n))return getComputedStyle(e)[t];lo(n)||(e.style[t]=""+n)}function Hn(e,t){Ct(e,"display",t)}function Mi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function St(e,t){return e.getAttribute(t)}function Vo(e,t){return e&&e.classList.contains(t)}function ht(e){return e.getBoundingClientRect()}function rn(e){bt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ni(e){return Gn(new DOMParser().parseFromString(e,"text/html").body)}function Rt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Hi(e,t){return e&&e.querySelector(t)}function po(e,t){return t?Xt(e.querySelectorAll(t)):[]}function Ft(e,t){kt(e,t,!1)}function Zr(e){return e.timeStamp}function Jt(e){return Ut(e)?e:e?e+"px":""}var Yn="splide",mo="data-"+Yn;function In(e,t){if(!e)throw new Error("["+Yn+"] "+(t||""))}var Gt=Math.min,yr=Math.max,vr=Math.floor,On=Math.ceil,it=Math.abs;function Oi(e,t,n){return it(e-t)<n}function ur(e,t,n,r){var i=Gt(t,n),l=yr(t,n);return r?i<e&&e<l:i<=e&&e<=l}function mn(e,t,n){var r=Gt(t,n),i=yr(t,n);return Gt(yr(r,e),i)}function Jr(e){return+(e>0)-+(e<0)}function eo(e,t){return bt(t,function(n){e=e.replace("%s",""+n)}),e}function go(e){return e<10?"0"+e:""+e}var Do={};function xs(e){return""+e+go(Do[e]=(Do[e]||0)+1)}function Bi(){var e=[];function t(o,c,s,p){i(o,c,function(u,T,x){var f="addEventListener"in u,m=f?u.removeEventListener.bind(u,T,s,p):u.removeListener.bind(u,s);f?u.addEventListener(T,s,p):u.addListener(s),e.push([u,T,x,s,m])})}function n(o,c,s){i(o,c,function(p,u,T){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(o,c,s){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:u,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,u,!1,s)),o.dispatchEvent(p),p}function i(o,c,s){bt(o,function(p){p&&bt(c,function(u){u.split(" ").forEach(function(T){var x=T.split(".");s(p,x[0],x[1])})})})}function l(){e.forEach(function(o){o[4]()}),Ht(e)}return{bind:t,unbind:n,dispatch:r,destroy:l}}var Qt="mounted",to="ready",Ot="move",Pn="moved",ho="click",Vi="active",Di="inactive",zi="visible",ji="hidden",Ke="refresh",tt="updated",xn="resize",$r="resized",qi="drag",Ki="dragging",Ui="dragged",wr="scroll",an="scrolled",Cs="overflow",fo="destroy",Gi="arrows:mounted",Yi="arrows:updated",Xi="pagination:mounted",Qi="pagination:updated",yo="navigation:mounted",vo="autoplay:play",Zi="autoplay:playing",bo="autoplay:pause",xo="lazyload:loaded",Ji="sk",ea="sh",br="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Bi();function r(l,o){n.bind(t,Kn(l).join(" "),function(c){o.apply(o,so(c.detail)?c.detail:[])})}function i(l){n.dispatch(t,l,Xt(arguments,1))}return e&&e.event.on(fo,n.destroy),Nn(n,{bus:t,on:r,off:Ne(n.unbind,t),emit:i})}function Tr(e,t,n,r){var i=Date.now,l,o=0,c,s=!0,p=0;function u(){if(!s){if(o=e?Gt((i()-l)/e,1):1,n&&n(o),o>=1&&(t(),l=i(),r&&++p>=r))return x();c=Oo(u)}}function T(w){w||m(),l=i()-(w?o*e:0),s=!1,c=Oo(u)}function x(){s=!0}function f(){l=i(),o=0,n&&n(o)}function m(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(w){e=w}function C(){return s}return{start:T,rewind:f,pause:x,cancel:m,set:g,isPaused:C}}function Ss(e){var t=e;function n(i){t=i}function r(i){return co(Kn(i),t)}return{set:n,is:r}}function $s(e,t){var n=Tr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ws(e,t,n){var r=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},o=Bi(),c=[];function s(){var m=n.mediaQuery==="min";Mn(i).sort(function(g,C){return m?+g-+C:+C-+g}).forEach(function(g){u(i[g],"("+(m?"min":"max")+"-width:"+g+"px)")}),u(l,Ho),T()}function p(m){m&&o.destroy()}function u(m,g){var C=matchMedia(g);o.bind(C,"change",T),c.push([m,C])}function T(){var m=r.is(fr),g=n.direction,C=c.reduce(function(w,S){return Kt(w,S[1].matches?S[0]:{})},{});Bo(n),f(C),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):g!==n.direction&&e.refresh()}function x(m){matchMedia(Ho).matches&&(m?Kt(n,l):Bo(n,Mn(l)))}function f(m,g,C){Kt(n,m),g&&Kt(Object.getPrototypeOf(n),m),(C||!r.is(fn))&&e.emit(tt,n)}return{setup:s,destroy:p,reduce:x,set:f}}var Lr="Arrow",Pr=Lr+"Left",Er=Lr+"Right",ta=Lr+"Up",na=Lr+"Down",zo="rtl",_r="ttb",Hr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ta,Er],ArrowRight:[na,Pr]};function Ts(e,t,n){function r(l,o,c){c=c||n.direction;var s=c===zo&&!o?1:c===_r?0:-1;return Hr[l]&&Hr[l][s]||l.replace(/width|left|right/i,function(p,u){var T=Hr[p.toLowerCase()][s]||p;return u>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(l){return l*(n.direction===zo?1:-1)}return{resolve:r,orient:i}}var Wt="role",vn="tabindex",Ls="disabled",$t="aria-",Xn=$t+"controls",ra=$t+"current",jo=$t+"selected",ft=$t+"label",Co=$t+"labelledby",oa=$t+"hidden",So=$t+"orientation",Bn=$t+"roledescription",qo=$t+"live",Ko=$t+"busy",Uo=$t+"atomic",$o=[Wt,vn,Ls,Xn,ra,ft,Co,oa,So,Bn],Et=Yn+"__",Zt="is-",Or=Yn,Go=Et+"track",Ps=Et+"list",Ar=Et+"slide",ia=Ar+"--clone",Es=Ar+"__container",wo=Et+"arrows",Ir=Et+"arrow",aa=Ir+"--prev",sa=Ir+"--next",Rr=Et+"pagination",la=Rr+"__page",_s=Et+"progress",As=_s+"__bar",Is=Et+"toggle",Rs=Et+"spinner",ks=Et+"sr",Fs=Zt+"initialized",on=Zt+"active",ca=Zt+"prev",da=Zt+"next",no=Zt+"visible",ro=Zt+"loading",ua=Zt+"focus-in",pa=Zt+"overflow",Ws=[on,no,ca,da,ro,ua,pa],Ms={slide:Ar,clone:ia,arrows:wo,arrow:Ir,prev:aa,next:sa,pagination:Rr,page:la,spinner:Rs};function Ns(e,t){if(ki(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Wn(n,t);)n=n.parentElement;return n}var Hs=5,Yo=200,ma="touchstart mousedown",Br="touchmove mousemove",Vr="touchend touchcancel mouseup click";function Os(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=e.root,c=n.i18n,s={},p=[],u=[],T=[],x,f,m;function g(){v(),M(),S()}function C(){i(Ke,w),i(Ke,g),i(tt,S),l(document,ma+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),l(o,"focusin",function(){kt(o,ua,!!m)})}function w(b){var P=$o.concat("style");Ht(p),Ft(o,u),Ft(x,T),Pt([x,f],P),Pt(o,b?P:["style",Bn])}function S(){Ft(o,u),Ft(x,T),u=N(Or),T=N(Go),Lt(o,u),Lt(x,T),Ce(o,ft,n.label),Ce(o,Co,n.labelledby)}function v(){x=L("."+Go),f=Gn(x,"."+Ps),In(x&&f,"A track/list element is missing."),dr(p,Wi(f,"."+Ar+":not(."+ia+")")),nn({arrows:wo,pagination:Rr,prev:aa,next:sa,bar:As,toggle:Is},function(b,P){s[P]=L("."+b)}),Nn(s,{root:o,track:x,list:f,slides:p})}function M(){var b=o.id||xs(Yn),P=n.role;o.id=b,x.id=x.id||b+"-track",f.id=f.id||b+"-list",!St(o,Wt)&&o.tagName!=="SECTION"&&P&&Ce(o,Wt,P),Ce(o,Bn,c.carousel),Ce(f,Wt,"presentation")}function L(b){var P=Hi(o,b);return P&&Ns(P,"."+Or)===o?P:void 0}function N(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===Or&&on]}return Nn(s,{setup:g,mount:C,destroy:w})}var Cn="slide",En="loop",Qn="fade";function Bs(e,t,n,r){var i=Oe(e),l=i.on,o=i.emit,c=i.bind,s=e.Components,p=e.root,u=e.options,T=u.isNavigation,x=u.updateOnMove,f=u.i18n,m=u.pagination,g=u.slideFocus,C=s.Direction.resolve,w=St(r,"style"),S=St(r,ft),v=n>-1,M=Gn(r,"."+Es),L;function N(){v||(r.id=p.id+"-slide"+go(t+1),Ce(r,Wt,m?"tabpanel":"group"),Ce(r,Bn,f.slide),Ce(r,ft,S||eo(f.slideLabel,[t+1,e.length]))),b()}function b(){c(r,"click",Ne(o,ho,D)),c(r,"keydown",Ne(o,Ji,D)),l([Pn,ea,an],E),l(yo,B),x&&l(Ot,$)}function P(){L=!0,i.destroy(),Ft(r,Ws),Pt(r,$o),Ce(r,"style",w),Ce(r,ft,S||"")}function B(){var H=e.splides.map(function(I){var K=I.splide.Components.Slides.getAt(t);return K?K.slide.id:""}).join(" ");Ce(r,ft,eo(f.slideX,(v?n:t)+1)),Ce(r,Xn,H),Ce(r,Wt,g?"button":""),g&&Pt(r,Bn)}function $(){L||E()}function E(){if(!L){var H=e.index;A(),F(),kt(r,ca,t===H-1),kt(r,da,t===H+1)}}function A(){var H=te();H!==Vo(r,on)&&(kt(r,on,H),Ce(r,ra,T&&H||""),o(H?Vi:Di,D))}function F(){var H=k(),I=!H&&(!te()||v);if(e.state.is([Ln,jn])||Ce(r,oa,I||""),Ce(po(r,u.focusableNodes||""),vn,I?-1:""),g&&Ce(r,vn,I?-1:0),H!==Vo(r,no)&&(kt(r,no,H),o(H?zi:ji,D)),!H&&document.activeElement===r){var K=s.Slides.getAt(e.index);K&&Mi(K.slide)}}function j(H,I,K){Ct(K&&M||r,H,I)}function te(){var H=e.index;return H===t||u.cloneStatus&&H===n}function k(){if(e.is(Qn))return te();var H=ht(s.Elements.track),I=ht(r),K=C("left",!0),Q=C("right",!0);return vr(H[K])<=On(I[K])&&vr(I[Q])<=On(H[Q])}function W(H,I){var K=it(H-t);return!v&&(u.rewind||e.is(En))&&(K=Gt(K,e.length-K)),K<=I}var D={index:t,slideIndex:n,slide:r,container:M,isClone:v,mount:N,destroy:P,update:E,style:j,isWithin:W};return D}function Vs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Elements,s=c.slides,p=c.list,u=[];function T(){x(),i(Ke,f),i(Ke,x)}function x(){s.forEach(function(E,A){g(E,A,-1)})}function f(){L(function(E){E.destroy()}),Ht(u)}function m(){L(function(E){E.update()})}function g(E,A,F){var j=Bs(e,A,F,E);j.mount(),u.push(j),u.sort(function(te,k){return te.index-k.index})}function C(E){return E?N(function(A){return!A.isClone}):u}function w(E){var A=t.Controller,F=A.toIndex(E),j=A.hasFocus()?1:n.perPage;return N(function(te){return ur(te.index,F,F+j-1)})}function S(E){return N(E)[0]}function v(E,A){bt(E,function(F){if(Ut(F)&&(F=Ni(F)),Fi(F)){var j=s[A];j?uo(F,j):Un(p,F),Lt(F,n.classes.slide),P(F,Ne(l,xn))}}),l(Ke)}function M(E){rn(N(E).map(function(A){return A.slide})),l(Ke)}function L(E,A){C(A).forEach(E)}function N(E){return u.filter(ki(E)?E:function(A){return Ut(E)?Wn(A.slide,E):co(Kn(E),A.index)})}function b(E,A,F){L(function(j){j.style(E,A,F)})}function P(E,A){var F=po(E,"img"),j=F.length;j?F.forEach(function(te){o(te,"load error",function(){--j||A()})}):A()}function B(E){return E?s.length:u.length}function $(){return u.length>n.perPage}return{mount:T,destroy:f,update:m,register:g,get:C,getIn:w,getAt:S,add:v,remove:M,forEach:L,filter:N,style:b,getLength:B,isEnough:$}}function Ds(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,p=t.Elements,u=p.root,T=p.track,x=p.list,f=c.getAt,m=c.style,g,C,w;function S(){v(),l(window,"resize load",$s(Ne(o,xn))),i([tt,Ke],v),i(xn,M)}function v(){g=n.direction===_r,Ct(u,"maxWidth",Jt(n.width)),Ct(T,s("paddingLeft"),L(!1)),Ct(T,s("paddingRight"),L(!0)),M(!0)}function M(D){var H=ht(u);(D||C.width!==H.width||C.height!==H.height)&&(Ct(T,"height",N()),m(s("marginRight"),Jt(n.gap)),m("width",P()),m("height",B(),!0),C=H,o($r),w!==(w=W())&&(kt(u,pa,w),o(Cs,w)))}function L(D){var H=n.padding,I=s(D?"right":"left");return H&&Jt(H[I]||(Fn(H)?0:H))||"0px"}function N(){var D="";return g&&(D=b(),In(D,"height or heightRatio is missing."),D="calc("+D+" - "+L(!1)+" - "+L(!0)+")"),D}function b(){return Jt(n.height||ht(x).width*n.heightRatio)}function P(){return n.autoWidth?null:Jt(n.fixedWidth)||(g?"":$())}function B(){return Jt(n.fixedHeight)||(g?n.autoHeight?null:$():b())}function $(){var D=Jt(n.gap);return"calc((100%"+(D&&" + "+D)+")/"+(n.perPage||1)+(D&&" - "+D)+")"}function E(){return ht(x)[s("width")]}function A(D,H){var I=f(D||0);return I?ht(I.slide)[s("width")]+(H?0:te()):0}function F(D,H){var I=f(D);if(I){var K=ht(I.slide)[s("right")],Q=ht(x)[s("left")];return it(K-Q)+(H?0:te())}return 0}function j(D){return F(e.length-1)-F(0)+A(0,D)}function te(){var D=f(0);return D&&parseFloat(Ct(D.slide,s("marginRight")))||0}function k(D){return parseFloat(Ct(T,s("padding"+(D?"Right":"Left"))))||0}function W(){return e.is(Qn)||j(!0)>E()}return{mount:S,resize:M,listSize:E,slideSize:A,sliderSize:j,totalSize:F,getPadding:k,isOverflow:W}}var zs=2;function js(e,t,n){var r=Oe(e),i=r.on,l=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],p;function u(){i(Ke,T),i([tt,xn],f),(p=C())&&(m(p),t.Layout.resize(!0))}function T(){x(),u()}function x(){rn(s),Ht(s),r.destroy()}function f(){var w=C();p!==w&&(p<w||!w)&&r.emit(Ke)}function m(w){var S=o.get().slice(),v=S.length;if(v){for(;S.length<w;)dr(S,S);dr(S.slice(-w),S.slice(0,w)).forEach(function(M,L){var N=L<w,b=g(M.slide,L);N?uo(b,S[0].slide):Un(l.list,b),dr(s,b),o.register(b,L-w+(N?0:v),M.index)})}}function g(w,S){var v=w.cloneNode(!0);return Lt(v,n.classes.clone),v.id=e.root.id+"-clone"+go(S+1),v}function C(){var w=n.clones;if(!e.is(En))w=0;else if(qn(w)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),v=S&&On(ht(l.track)[c("width")]/S);w=v||n[c("autoWidth")]&&e.length||n.perPage*zs}return w}return{mount:u,destroy:x}}function qs(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,p=c.getPadding,u=c.totalSize,T=c.listSize,x=c.sliderSize,f=t.Direction,m=f.resolve,g=f.orient,C=t.Elements,w=C.list,S=C.track,v;function M(){v=t.Transition,i([Qt,$r,tt,Ke],L)}function L(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function N(I,K,Q,Z){I!==K&&D(I>Q)&&(E(),P($(j(),I>Q),!0)),o(Ln),l(Ot,K,Q,I),v.start(K,function(){o(bn),l(Pn,K,Q,I),Z&&Z()})}function b(I){P(F(I,!0))}function P(I,K){if(!e.is(Qn)){var Q=K?I:B(I);Ct(w,"transform","translate"+m("X")+"("+Q+"px)"),I!==Q&&l(ea)}}function B(I){if(e.is(En)){var K=A(I),Q=K>t.Controller.getEnd(),Z=K<0;(Z||Q)&&(I=$(I,Q))}return I}function $(I,K){var Q=I-W(K),Z=x();return I-=g(Z*(On(it(Q)/Z)||1))*(K?1:-1),I}function E(){P(j(),!0),v.cancel()}function A(I){for(var K=t.Slides.get(),Q=0,Z=1/0,R=0;R<K.length;R++){var ne=K[R].index,h=it(F(ne,!0)-I);if(h<=Z)Z=h,Q=ne;else break}return Q}function F(I,K){var Q=g(u(I-1)-k(I));return K?te(Q):Q}function j(){var I=m("left");return ht(w)[I]-ht(S)[I]+g(p(!1))}function te(I){return n.trimSpace&&e.is(Cn)&&(I=mn(I,0,g(x(!0)-T()))),I}function k(I){var K=n.focus;return K==="center"?(T()-s(I,!0))/2:+K*s(I)||0}function W(I){return F(I?t.Controller.getEnd():0,!!n.trimSpace)}function D(I){var K=g($(j(),I));return I?K>=0:K<=w[m("scrollWidth")]-ht(S)[m("width")]}function H(I,K){K=qn(K)?j():K;var Q=I!==!0&&g(K)<g(W(!1)),Z=I!==!1&&g(K)>g(W(!0));return Q||Z}return{mount:M,move:N,jump:b,translate:P,shift:$,cancel:E,toIndex:A,toPosition:F,getPosition:j,getLimit:W,exceededLimit:H,reposition:L}}function Ks(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,p=o.toPosition,u=t.Slides,T=u.isEnough,x=u.getLength,f=n.omitEnd,m=e.is(En),g=e.is(Cn),C=Ne(j,!1),w=Ne(j,!0),S=n.start||0,v,M=S,L,N,b;function P(){B(),i([tt,Ke,br],B),i($r,$)}function B(){L=x(!0),N=n.perMove,b=n.perPage,v=D();var h=mn(S,0,f?v:L-1);h!==S&&(S=h,o.reposition())}function $(){v!==D()&&l(br)}function E(h,ee,ge){if(!ne()){var le=F(h),be=W(le);be>-1&&(ee||be!==S)&&(Q(be),o.move(le,be,M,ge))}}function A(h,ee,ge,le){t.Scroll.scroll(h,ee,ge,function(){var be=W(o.toIndex(c()));Q(f?Gt(be,v):be),le&&le()})}function F(h){var ee=S;if(Ut(h)){var ge=h.match(/([+\-<>])(\d+)?/)||[],le=ge[1],be=ge[2];le==="+"||le==="-"?ee=te(S+ +(""+le+(+be||1)),S):le===">"?ee=be?H(+be):C(!0):le==="<"&&(ee=w(!0))}else ee=m?h:mn(h,0,v);return ee}function j(h,ee){var ge=N||(R()?1:b),le=te(S+ge*(h?-1:1),S,!(N||R()));return le===-1&&g&&!Oi(c(),s(!h),1)?h?0:v:ee?le:W(le)}function te(h,ee,ge){if(T()||R()){var le=k(h);le!==h&&(ee=h,h=le,ge=!1),h<0||h>v?!N&&(ur(0,h,ee,!0)||ur(v,ee,h,!0))?h=H(I(h)):m?h=ge?h<0?-(L%b||b):L:h:n.rewind?h=h<0?v:0:h=-1:ge&&h!==ee&&(h=H(I(ee)+(h<ee?-1:1)))}else h=-1;return h}function k(h){if(g&&n.trimSpace==="move"&&h!==S)for(var ee=c();ee===p(h,!0)&&ur(h,0,e.length-1,!n.rewind);)h<S?--h:++h;return h}function W(h){return m?(h+L)%L||0:h}function D(){for(var h=L-(R()||m&&N?1:b);f&&h-- >0;)if(p(L-1,!0)!==p(h,!0)){h++;break}return mn(h,0,L-1)}function H(h){return mn(R()?h:b*h,0,v)}function I(h){return R()?Gt(h,v):vr((h>=v?L-1:h)/b)}function K(h){var ee=o.toIndex(h);return g?mn(ee,0,v):ee}function Q(h){h!==S&&(M=S,S=h)}function Z(h){return h?M:S}function R(){return!qn(n.focus)||n.isNavigation}function ne(){return e.state.is([Ln,jn])&&!!n.waitForTransition}return{mount:P,go:E,scroll:A,getNext:C,getPrev:w,getAdjacent:j,getEnd:D,setIndex:Q,getIndex:Z,toIndex:H,toPage:I,toDest:K,hasFocus:R,isBusy:ne}}var Us="http://www.w3.org/2000/svg",Gs="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",nr=40;function Ys(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=n.classes,s=n.i18n,p=t.Elements,u=t.Controller,T=p.arrows,x=p.track,f=T,m=p.prev,g=p.next,C,w,S={};function v(){L(),i(tt,M)}function M(){N(),v()}function L(){var A=n.arrows;A&&!(m&&g)&&B(),m&&g&&(Nn(S,{prev:m,next:g}),Hn(f,A?"":"none"),Lt(f,w=wo+"--"+n.direction),A&&(b(),E(),Ce([m,g],Xn,x.id),o(Gi,m,g)))}function N(){r.destroy(),Ft(f,w),C?(rn(T?[m,g]:f),m=g=null):Pt([m,g],$o)}function b(){i([Qt,Pn,Ke,an,br],E),l(g,"click",Ne(P,">")),l(m,"click",Ne(P,"<"))}function P(A){u.go(A,!0)}function B(){f=T||yn("div",c.arrows),m=$(!0),g=$(!1),C=!0,Un(f,[m,g]),!T&&uo(f,x)}function $(A){var F='<button class="'+c.arrow+" "+(A?c.prev:c.next)+'" type="button"><svg xmlns="'+Us+'" viewBox="0 0 '+nr+" "+nr+'" width="'+nr+'" height="'+nr+'" focusable="false"><path d="'+(n.arrowPath||Gs)+'" />';return Ni(F)}function E(){if(m&&g){var A=e.index,F=u.getPrev(),j=u.getNext(),te=F>-1&&A<F?s.last:s.prev,k=j>-1&&A>j?s.first:s.next;m.disabled=F<0,g.disabled=j<0,Ce(m,ft,te),Ce(g,ft,k),o(Yi,m,g,F,j)}}return{arrows:S,mount:v,destroy:N,update:E}}var Xs=mo+"-interval";function Qs(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.emit,c=Tr(n.interval,e.go.bind(e,">"),b),s=c.isPaused,p=t.Elements,u=t.Elements,T=u.root,x=u.toggle,f=n.autoplay,m,g,C=f==="pause";function w(){f&&(S(),x&&Ce(x,Xn,p.track.id),C||v(),N())}function S(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(B){m=B.type==="mouseenter",L()}),n.pauseOnFocus&&l(T,"focusin focusout",function(B){g=B.type==="focusin",L()}),x&&l(x,"click",function(){C?v():M(!0)}),i([Ot,wr,Ke],c.rewind),i(Ot,P)}function v(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=m=C=!1,N(),o(vo))}function M(B){B===void 0&&(B=!0),C=!!B,N(),s()||(c.pause(),o(bo))}function L(){C||(m||g?M(!1):v())}function N(){x&&(kt(x,on,!C),Ce(x,ft,n.i18n[C?"play":"pause"]))}function b(B){var $=p.bar;$&&Ct($,"width",B*100+"%"),o(Zi,B)}function P(B){var $=t.Slides.getAt(B);c.set($&&+St($.slide,Xs)||n.interval)}return{mount:w,destroy:c.cancel,play:v,pause:M,isPaused:s}}function Zs(e,t,n){var r=Oe(e),i=r.on;function l(){n.cover&&(i(xo,Ne(c,!0)),i([Qt,tt,Ke],Ne(o,!0)))}function o(s){t.Slides.forEach(function(p){var u=Gn(p.container||p.slide,"img");u&&u.src&&c(s,u,p)})}function c(s,p,u){u.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Hn(p,s?"none":"")}return{mount:l,destroy:Ne(o,!1)}}var Js=10,el=600,tl=.6,nl=1.5,rl=800;function ol(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,p=c.getLimit,u=c.exceededLimit,T=c.translate,x=e.is(Cn),f,m,g=1;function C(){i(Ot,M),i([tt,Ke],L)}function w(b,P,B,$,E){var A=s();if(M(),B&&(!x||!u())){var F=t.Layout.sliderSize(),j=Jr(b)*F*vr(it(b)/F)||0;b=c.toPosition(t.Controller.toDest(b%F))+j}var te=Oi(A,b,1);g=1,P=te?0:P||yr(it(b-A)/nl,rl),m=$,f=Tr(P,S,Ne(v,A,b,E),1),o(jn),l(wr),f.start()}function S(){o(bn),m&&m(),l(an)}function v(b,P,B,$){var E=s(),A=b+(P-b)*N($),F=(A-E)*g;T(E+F),x&&!B&&u()&&(g*=tl,it(F)<Js&&w(p(u(!0)),el,!1,m,!0))}function M(){f&&f.cancel()}function L(){f&&!f.isPaused()&&(M(),S())}function N(b){var P=n.easingFunc;return P?P(b):1-Math.pow(1-b,4)}return{mount:C,destroy:M,scroll:w,cancel:L}}var gn={passive:!1,capture:!0};function il(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=r.unbind,s=e.state,p=t.Move,u=t.Scroll,T=t.Controller,x=t.Elements.track,f=t.Media.reduce,m=t.Direction,g=m.resolve,C=m.orient,w=p.getPosition,S=p.exceededLimit,v,M,L,N,b,P=!1,B,$,E;function A(){o(x,Br,Qr,gn),o(x,Vr,Qr,gn),o(x,ma,j,gn),o(x,"click",W,{capture:!0}),o(x,"dragstart",Rt),i([Qt,tt],F)}function F(){var V=n.drag;de(!V),N=V==="free"}function j(V){if(B=!1,!$){var U=be(V);le(V.target)&&(U||!V.button)&&(T.isBusy()?Rt(V,!0):(E=U?x:window,b=s.is([Ln,jn]),L=null,o(E,Br,te,gn),o(E,Vr,k,gn),p.cancel(),u.cancel(),D(V)))}}function te(V){if(s.is(cr)||(s.set(cr),l(qi)),V.cancelable)if(b){p.translate(v+ge(R(V)));var U=ne(V)>Yo,G=P!==(P=S());(U||G)&&D(V),B=!0,l(Ki),Rt(V)}else K(V)&&(b=I(V),Rt(V))}function k(V){s.is(cr)&&(s.set(bn),l(Ui)),b&&(H(V),Rt(V)),c(E,Br,te),c(E,Vr,k),b=!1}function W(V){!$&&B&&Rt(V,!0)}function D(V){L=M,M=V,v=w()}function H(V){var U=Q(V),G=Z(U),se=n.rewind&&n.rewindByDrag;f(!1),N?T.scroll(G,0,n.snap):e.is(Qn)?T.go(C(Jr(U))<0?se?"<":"-":se?">":"+"):e.is(Cn)&&P&&se?T.go(S(!0)?">":"<"):T.go(T.toDest(G),!0),f(!0)}function I(V){var U=n.dragMinThreshold,G=Fn(U),se=G&&U.mouse||0,fe=(G?U.touch:+U)||10;return it(R(V))>(be(V)?fe:se)}function K(V){return it(R(V))>it(R(V,!0))}function Q(V){if(e.is(En)||!P){var U=ne(V);if(U&&U<Yo)return R(V)/U}return 0}function Z(V){return w()+Jr(V)*Gt(it(V)*(n.flickPower||600),N?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function R(V,U){return ee(V,U)-ee(h(V),U)}function ne(V){return Zr(V)-Zr(h(V))}function h(V){return M===V&&L||M}function ee(V,U){return(be(V)?V.changedTouches[0]:V)["page"+g(U?"Y":"X")]}function ge(V){return V/(P&&e.is(Cn)?Hs:1)}function le(V){var U=n.noDrag;return!Wn(V,"."+la+", ."+Ir)&&(!U||!Wn(V,U))}function be(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function re(){return b}function de(V){$=V}return{mount:A,disable:de,isDragging:re}}var al={Spacebar:" ",Right:Er,Left:Pr,Up:ta,Down:na};function To(e){return e=Ut(e)?e:e.key,al[e]||e}var Xo="keydown";function sl(e,t,n){var r=Oe(e),i=r.on,l=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,p,u;function T(){x(),i(tt,f),i(tt,x),i(Ot,g)}function x(){var w=n.keyboard;w&&(p=w==="global"?window:c,l(p,Xo,C))}function f(){o(p,Xo)}function m(w){u=w}function g(){var w=u;u=!0,Ri(function(){u=w})}function C(w){if(!u){var S=To(w);S===s(Pr)?e.go("<"):S===s(Er)&&e.go(">")}}return{mount:T,destroy:f,disable:m}}var Rn=mo+"-lazy",pr=Rn+"-srcset",ll="["+Rn+"], ["+pr+"]";function cl(e,t,n){var r=Oe(e),i=r.on,l=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",p=[Pn,an],u=[];function T(){n.lazyLoad&&(x(),i(Ke,x))}function x(){Ht(u),f(),s?w():(l(p),i(p,m),m())}function f(){t.Slides.forEach(function(S){po(S.slide,ll).forEach(function(v){var M=St(v,Rn),L=St(v,pr);if(M!==v.src||L!==v.srcset){var N=n.classes.spinner,b=v.parentElement,P=Gn(b,"."+N)||yn("span",N,b);u.push([v,S,P]),v.src||Hn(v,"none")}})})}function m(){u=u.filter(function(S){var v=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,v)?g(S):!0}),u.length||l(p)}function g(S){var v=S[0];Lt(S[1].slide,ro),o(v,"load error",Ne(C,S)),Ce(v,"src",St(v,Rn)),Ce(v,"srcset",St(v,pr)),Pt(v,Rn),Pt(v,pr)}function C(S,v){var M=S[0],L=S[1];Ft(L.slide,ro),v.type!=="error"&&(rn(S[2]),Hn(M,""),c(xo,M,L),c(xn)),s&&w()}function w(){u.length&&g(u.shift())}return{mount:T,destroy:Ne(Ht,u),check:m}}function dl(e,t,n){var r=Oe(e),i=r.on,l=r.emit,o=r.bind,c=t.Slides,s=t.Elements,p=t.Controller,u=p.hasFocus,T=p.getIndex,x=p.go,f=t.Direction.resolve,m=s.pagination,g=[],C,w;function S(){v(),i([tt,Ke,br],S);var $=n.pagination;m&&Hn(m,$?"":"none"),$&&(i([Ot,wr,an],B),M(),B(),l(Xi,{list:C,items:g},P(e.index)))}function v(){C&&(rn(m?Xt(C.children):C),Ft(C,w),Ht(g),C=null),r.destroy()}function M(){var $=e.length,E=n.classes,A=n.i18n,F=n.perPage,j=u()?p.getEnd()+1:On($/F);C=m||yn("ul",E.pagination,s.track.parentElement),Lt(C,w=Rr+"--"+b()),Ce(C,Wt,"tablist"),Ce(C,ft,A.select),Ce(C,So,b()===_r?"vertical":"");for(var te=0;te<j;te++){var k=yn("li",null,C),W=yn("button",{class:E.page,type:"button"},k),D=c.getIn(te).map(function(I){return I.slide.id}),H=!u()&&F>1?A.pageX:A.slideX;o(W,"click",Ne(L,te)),n.paginationKeyboard&&o(W,"keydown",Ne(N,te)),Ce(k,Wt,"presentation"),Ce(W,Wt,"tab"),Ce(W,Xn,D.join(" ")),Ce(W,ft,eo(H,te+1)),Ce(W,vn,-1),g.push({li:k,button:W,page:te})}}function L($){x(">"+$,!0)}function N($,E){var A=g.length,F=To(E),j=b(),te=-1;F===f(Er,!1,j)?te=++$%A:F===f(Pr,!1,j)?te=(--$+A)%A:F==="Home"?te=0:F==="End"&&(te=A-1);var k=g[te];k&&(Mi(k.button),x(">"+te),Rt(E,!0))}function b(){return n.paginationDirection||n.direction}function P($){return g[p.toPage($)]}function B(){var $=P(T(!0)),E=P(T());if($){var A=$.button;Ft(A,on),Pt(A,jo),Ce(A,vn,-1)}if(E){var F=E.button;Lt(F,on),Ce(F,jo,!0),Ce(F,vn,"")}l(Qi,{list:C,items:g},$,E)}return{items:g,mount:S,destroy:v,getAt:P,update:B}}var ul=[" ","Enter"];function pl(e,t,n){var r=n.isNavigation,i=n.slideFocus,l=[];function o(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),r&&u()}function c(){l.forEach(function(m){m.destroy()}),Ht(l)}function s(){c(),o()}function p(m,g){var C=Oe(m);C.on(Ot,function(w,S,v){g.go(g.is(En)?v:w)}),l.push(C)}function u(){var m=Oe(e),g=m.on;g(ho,x),g(Ji,f),g([Qt,tt],T),l.push(m),m.emit(yo,e.splides)}function T(){Ce(t.Elements.list,So,n.direction===_r?"vertical":"")}function x(m){e.go(m.index)}function f(m,g){co(ul,To(g))&&(x(m),Rt(g))}return{setup:Ne(t.Media.set,{slideFocus:qn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function ml(e,t,n){var r=Oe(e),i=r.bind,l=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,gn)}function c(p){if(p.cancelable){var u=p.deltaY,T=u<0,x=Zr(p),f=n.wheelMinThreshold||0,m=n.wheelSleep||0;it(u)>f&&x-l>m&&(e.go(T?"<":">"),l=x),s(T)&&Rt(p)}}function s(p){return!n.releaseWheel||e.state.is(Ln)||t.Controller.getAdjacent(p)!==-1}return{mount:o}}var gl=90;function hl(e,t,n){var r=Oe(e),i=r.on,l=t.Elements.track,o=n.live&&!n.isNavigation,c=yn("span",ks),s=Tr(gl,Ne(u,!1));function p(){o&&(x(!t.Autoplay.isPaused()),Ce(l,Uo,!0),c.textContent="…",i(vo,Ne(x,!0)),i(bo,Ne(x,!1)),i([Pn,an],Ne(u,!0)))}function u(f){Ce(l,Ko,f),f?(Un(l,c),s.start()):(rn(c),s.cancel())}function T(){Pt(l,[qo,Uo,Ko]),rn(c)}function x(f){o&&Ce(l,qo,f?"off":"polite")}return{mount:p,disable:x,destroy:T}}var fl=Object.freeze({__proto__:null,Media:ws,Direction:Ts,Elements:Os,Slides:Vs,Layout:Ds,Clones:js,Move:qs,Controller:Ks,Arrows:Ys,Autoplay:Qs,Cover:Zs,Scroll:ol,Drag:il,Keyboard:sl,LazyLoad:cl,Pagination:dl,Sync:pl,Wheel:ml,Live:hl}),yl={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"},vl={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:Ms,i18n:yl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function bl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Qt,Ke],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Ri(s)}return{mount:i,start:o,cancel:Qr}}function xl(e,t,n){var r=t.Move,i=t.Controller,l=t.Scroll,o=t.Elements.list,c=Ne(Ct,o,"transition"),s;function p(){Oe(e).bind(o,"transitionend",function(f){f.target===o&&s&&(T(),s())})}function u(f,m){var g=r.toPosition(f,!0),C=r.getPosition(),w=x(f);it(g-C)>=1&&w>=1?n.useScroll?l.scroll(g,w,!1,m):(c("transform "+w+"ms "+n.easing),r.translate(g,!0),s=m):(r.jump(f),m())}function T(){c(""),l.cancel()}function x(f){var m=n.rewindSpeed;if(e.is(Cn)&&m){var g=i.getIndex(!0),C=i.getEnd();if(g===0&&f>=C||g>=C&&f===0)return m}return n.speed}return{mount:p,start:u,cancel:T}}var Cl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=Ss(fn),this.splides=[],this._o={},this._E={};var i=Ut(n)?Hi(document,n):n;In(i,i+" is invalid."),this.root=i,r=Kt({label:St(i,ft)||"",labelledby:St(i,Co)||""},vl,e.defaults,r||{});try{Kt(r,JSON.parse(St(i,mo)))}catch{In(!1,"Invalid JSON")}this._o=Object.create(Kt({},r))}var t=e.prototype;return t.mount=function(r,i){var l=this,o=this.state,c=this.Components;In(o.is([fn,fr]),"Already mounted!"),o.set(fn),this._C=c,this._T=i||this._T||(this.is(Qn)?bl:xl),this._E=r||this._E;var s=Nn({},fl,this._E,{Transition:this._T});return nn(s,function(p,u){var T=p(l,c,l._o);c[u]=T,T.setup&&T.setup()}),nn(c,function(p){p.mount&&p.mount()}),this.emit(Qt),Lt(this.root,Fs),o.set(bn),this.emit(to),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(bn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(Xt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Ke),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,l=this.state;return l.is(fn)?Oe(this).on(to,this.destroy.bind(this,r)):(nn(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(fo),i.destroy(),r&&Ht(this.splides),l.set(fr)),this},ys(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Lo=Cl;Lo.defaults={};Lo.STATES=bs;var Qo=[[Qt,"onMounted"],[to,"onReady"],[Ot,"onMove"],[Pn,"onMoved"],[ho,"onClick"],[Vi,"onActive"],[Di,"onInactive"],[zi,"onVisible"],[ji,"onHidden"],[Ke,"onRefresh"],[tt,"onUpdated"],[xn,"onResize"],[$r,"onResized"],[qi,"onDrag"],[Ki,"onDragging"],[Ui,"onDragged"],[wr,"onScroll"],[an,"onScrolled"],[fo,"onDestroy"],[Gi,"onArrowsMounted"],[Yi,"onArrowsUpdated"],[Xi,"onPaginationMounted"],[Qi,"onPaginationUpdated"],[yo,"onNavigationMounted"],[vo,"onAutoplayPlay"],[Zi,"onAutoplayPlaying"],[bo,"onAutoplayPause"],[xo,"onLazyLoadLoaded"]];function Po(...e){return e.filter(Boolean).join(" ")}function xr(e){return e!==null&&typeof e=="object"}function oo(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!oo(n,t[r]));if(xr(e)&&xr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!oo(e[i],t[i]))}return e===t}function Sl(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function $l(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function io(e,t){const n=e;return $l(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():xr(r)?n[i]=io(xr(n[i])?n[i]:{},r):n[i]=r}),n}var wl=({children:e,className:t,...n})=>d.createElement("div",{className:Po("splide__track",t),...n},d.createElement("ul",{className:"splide__list"},e)),Eo=class extends d.Component{constructor(){super(...arguments),this.splideRef=d.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Lo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=io({},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&&!oo(this.options,e)&&(this.splide.options=e,this.options=io({},e));const t=this.getSlides();Sl(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){Qo.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}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:r,...i}=this.props;return d.createElement(t,{className:Po("splide",e),ref:this.splideRef,...this.omit(i,["options",...Qo.map(l=>l[1])])},n?d.createElement(wl,null,r):r)}},_o=({children:e,className:t,...n})=>d.createElement("li",{className:Po("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 Tl="RichTextRenderer-module__link___BWeZ2",Ll={link:Tl},Pl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},Rr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Pl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function vt(e){const{color:t,...n}=e;return n}function tt(e,t){var i,l,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Rr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:v.scalingValue(e.letterSpacing,t),wordSpacing:v.scalingValue(e.wordSpacing,t),fontSize:v.scalingValue(n,t),lineHeight:r!==void 0?v.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const Cn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?a.jsx("a",{className:Ll.link,href:r.value,target:r.target,children:t(r.children)},i):a.jsx("span",{style:El(r),children:r.text},i));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const i=n.children;return a.jsx("div",{children:t(i)},r)})})};function El(e){return{...e.fontFamily&&{fontFamily:Rr(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 _l="SvgImage-module__svg___q3xE-",Al="SvgImage-module__img___VsTm-",Zo={svg:_l,img:Al},Il=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},kl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Wt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[l,o]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');o(c)}},[]),!Il(e)||!l?a.jsx("img",{src:e,alt:"",className:ke(Zo.img,r),style:i}):a.jsx("span",{"data-supports-mask":l,className:ke(Zo.svg,r),style:{"--svg":kl(e),"--fill":t,"--hover-fill":n,...i??{}}})},Rl={"top-left":ce.topLeftAlignment,"top-center":ce.topCenterAlignment,"top-right":ce.topRightAlignment,"middle-left":ce.middleLeftAlignment,"middle-center":ce.middleCenterAlignment,"middle-right":ce.middleRightAlignment,"bottom-left":ce.bottomLeftAlignment,"bottom-center":ce.bottomCenterAlignment,"bottom-right":ce.bottomRightAlignment};function Fl({settings:e,content:t,styles:n,isEditor:r}){const[i,l]=d.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:y,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[$,w]=d.useState(null),[C,b]=d.useState(0),[M,L]=d.useState(0),{direction:H,transition:x,controls:P,pagination:V,imageCaption:S,triggers:E}=e,A=d.useRef(x.type),{x:F,y:q}=e.controls.offset,ee=R=>{i&&i.go(R)};return d.useEffect(()=>{if(!$)return;const R=new ResizeObserver(W=>{if(!i)return;const[z]=W;g({width:Math.round(z.contentRect.width),height:Math.round(z.contentRect.height)})});return R.observe($),()=>R.unobserve($)},[$]),d.useEffect(()=>{!i||A.current===x.type||(L(R=>R+1),A.current=x.type)},[x.type]),a.jsx("div",{className:ke(ce.wrapper,{[ce.editor]:r}),ref:w,children:a.jsxs("div",{className:ce.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:ke(ce.captionBlock),children:a.jsx("div",{className:ce.captionTextWrapper,children:t.map((R,W)=>a.jsx("div",{className:ke(ce.captionText,Rl[S.alignment],{[ce.withPointerEvents]:W===C&&r,[ce.active]:W===C}),style:{fontFamily:Rr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":v.scalingValue(o.width,r),letterSpacing:v.scalingValue(s,r),wordSpacing:v.scalingValue(u,r),textAlign:p,fontSize:v.scalingValue(T.fontSize,r),lineHeight:v.scalingValue(T.lineHeight,r),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:f,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ce.captionTextInner,style:{"--link-hover-color":S.linkHoverColor,"--link-color":S.linkColor,position:"relative",top:v.scalingValue(S.offset.y,r),left:v.scalingValue(S.offset.x,r)},children:a.jsx(Cn,{content:R.imageCaption})})},W))})}),a.jsx(Eo,{onMove:R=>{b(R.index)},ref:l,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:H==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((R,W)=>a.jsx(_o,{children:a.jsx("div",{className:ce.sliderItem,children:a.jsx("div",{className:ce.imgWrapper,children:a.jsx("img",{className:ke(ce.sliderImage,{[ce.contain]:R.image.objectFit==="contain",[ce.cover]:R.image.objectFit==="cover"}),src:R.image.url,alt:R.image.name??""})})})},W))},M),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ke(ce.arrow,{[ce.arrowVertical]:H==="vert",[ce.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{ee("-1")},className:ce.arrowInner,style:{transform:`translate(${v.scalingValue(F,r)}, ${v.scalingValue(q*(H==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Wt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:ke(ce.arrowImg,ce.mirror)}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:ke(ce.arrowIcon,ce.arrowImg,ce.mirror)})]})}),a.jsx("div",{className:ke(ce.arrow,ce.nextArrow,{[ce.arrowVertical]:H==="vert",[ce.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:ce.arrowInner,onClick:()=>ee("+1"),style:{transform:`translate(${v.scalingValue(F*(H==="horiz"?-1:1),r)}, ${v.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Wt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:ce.arrowImg}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:ke(ce.arrowIcon,ce.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:ce.clickOverlay,onClick:()=>{i&&i.go("+1")}}),V.isActive&&a.jsx("div",{className:ke(ce.pagination,{[ce.paginationInsideBottom]:V.position==="inside-1"&&H==="horiz",[ce.paginationInsideTop]:V.position==="inside-2"&&H==="horiz",[ce.paginationOutsideBottom]:V.position==="outside-1"&&H==="horiz",[ce.paginationOutsideTop]:V.position==="outside-2"&&H==="horiz",[ce.paginationInsideLeft]:V.position==="inside-1"&&H==="vert",[ce.paginationInsideRight]:V.position==="inside-2"&&H==="vert",[ce.paginationOutsideLeft]:V.position==="outside-1"&&H==="vert",[ce.paginationOutsideRight]:V.position==="outside-2"&&H==="vert",[ce.paginationVertical]:H==="vert"}),children:a.jsx("div",{className:ce.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${v.scalingValue(V.offset.x,r)}, ${v.scalingValue(V.offset.y,r)}) rotate(${H==="horiz"?"0deg":"90deg"})`},children:t.map((R,W)=>a.jsx("button",{onClick:()=>{i&&i.go(W)},className:ke(ce.paginationItem),children:a.jsx("div",{className:ke(ce.dot,{[ce.activeDot]:W===C}),style:{backgroundColor:W===C?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},W))})})]})})}function Jo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Wl={element:Fl,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"]}},Ml="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Hl="ImageRevealSlider-module__image___Qjt-e",Nl="ImageRevealSlider-module__link___N-iLG",Bl="ImageRevealSlider-module__cursor___2U03d",pn={imageRevealSlider:Ml,image:Hl,link:Nl,cursor:Bl};function ei(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const l=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*l,c=l/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ol(e,t,n,r){let i,l;if(t==="custom"){i=n;const o=await Dr(e);l=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await Dr(e);l=o.height/o.width*i}else{const o=await Dr(e);i=o.width,l=o.height}return{width:i,height:l,finalWidth:`${i}px`}}function Vl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[l,o]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[y,f]=d.useState(1),[m,g]=d.useState("none"),$=d.useRef({x:0,y:0}),[w,C]=d.useState(!1),{sizeType:b,imageWidth:M,randomRangeImageWidth:L}=e.imageSize,{revealPosition:H,visible:x}=e.position,{cursorType:P,target:V,defaultCursorScale:S,defaultCursor:E,hoverCursorScale:A,hoverCursor:F}=e.cursor;d.useEffect(()=>{if(!r)return;const R=(N,I)=>{const U=r.getBoundingClientRect(),X=N-U.left,Q=I-U.top;if(T({x:X,y:Q}),P==="system"){g("none"),f(1);return}const k=X,ne=Q,h=document.elementFromPoint(U.left+k,U.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const te=ei(k,ne,l)||V==="area"?{img:F??"none",scale:A}:{img:E??"none",scale:S};g(te.img),f(te.scale)},W=N=>{N.stopPropagation(),$.current={x:N.clientX,y:N.clientY},R(N.clientX,N.clientY)},z=()=>{w&&R($.current.x,$.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",z,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",z,!0)}},[r,w,u,P,V,F,E,A,S,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const q=async(R,W,z,N={})=>{const{width:I,height:U,finalWidth:X}=await Ol(R.image.url,b,M,L);let Q=0,k=0;H==="same"?(Q=W/2,k=z/2):(Q=N.x??Math.random()*W,k=N.y??Math.random()*z);const ne=Math.min(Math.max(Q,I/2),W-I/2),h=Math.min(Math.max(k,U/2),z-U/2);return{id:p.current++,url:R.image.url,link:R.link,name:R.image.name,x:ne,y:h,width:X}};d.useEffect(()=>{if(!r||t.length===0)return;const R=r.getBoundingClientRect(),W=R.width,z=R.height,N=[];(async()=>{const U=t[0],X=await q(U,W,z);N.push(X),o(N),s(1)})()},[b,M,L,H,r]),d.useEffect(()=>{x==="last One"&&o(R=>R.length>0?[R[R.length-1]]:[])},[x]);const ee=async R=>{if(!r)return;const W=r.getBoundingClientRect(),z=R.clientX-W.left,N=R.clientY-W.top;if(V==="image"&&!ei(z,N,l))return;let I=0,U=0;H==="on Click"?(I=z,U=N):H==="same"?(I=W.width/2,U=W.height/2):(I=Math.random()*W.width,U=Math.random()*W.height);const X=t[c],Q=await q(X,W.width,W.height,{x:I,y:U});o(k=>x==="all"?[...k,Q]:[Q]),s(k=>k>=t.length-1?0:k+1)};return a.jsxs("div",{ref:i,onClick:ee,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:pn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(R=>a.jsx("div",{className:pn.wrapper,style:{top:`${R.y}px`,left:`${R.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:R.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&R.link?a.jsx("a",{href:R.link,target:"_blank",className:pn.link,children:a.jsx("img",{src:R.url,alt:R.name,className:pn.image},R.id)}):a.jsx("img",{src:R.url,alt:R.name,className:pn.image},R.id)},R.id)),w&&a.jsx("div",{className:pn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Dl={element:Vl,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:""}]}}}},zl="LightBox-module__hidden___9s-9x",jl="LightBox-module__heroImage___sTxNF",ql="LightBox-module__background___rm9ml",Kl="LightBox-module__editor___4ACaY",Ul="LightBox-module__contentStyle___Bgnsq",Gl="LightBox-module__imageStyle___tLIlB",Yl="LightBox-module__imgWrapper___LuFUp",Xl="LightBox-module__contain___8-yaS",Ql="LightBox-module__cover___hNvOG",Zl="LightBox-module__caption___b6L2I",Jl="LightBox-module__captionTextInner___rCGNH",ec="LightBox-module__lightboxSplide___XFuWC",tc="LightBox-module__arrow___iz38X",nc="LightBox-module__arrowVertical___Zfz81",rc="LightBox-module__nextArrow___zkAQN",oc="LightBox-module__arrowInner___p48sW",ic="LightBox-module__arrowIcon___3VaFf",ac="LightBox-module__arrowImg___pNV88",sc="LightBox-module__mirror___pjeXc",lc="LightBox-module__thumbsWrapper___GB-nU",cc="LightBox-module__thumbsContainerVertical___wttk5",dc="LightBox-module__thumbsContainer___osSma",uc="LightBox-module__thumbsAlignStart___MO6tY",pc="LightBox-module__thumbsAlignCenter___Q4sUx",mc="LightBox-module__thumbsAlignEnd___p4y9R",gc="LightBox-module__thumbItem___HvnF3",hc="LightBox-module__closeButton___g2khP",fc="LightBox-module__fadeIn___0m5GW",yc="LightBox-module__slideInLeft___gPYwC",vc="LightBox-module__slideInRight___S-pPp",bc="LightBox-module__slideInTop___DFdAj",xc="LightBox-module__slideInBottom___m27kZ",$c="LightBox-module__fadeOut___55qBR",Cc="LightBox-module__slideOutLeft___NvU7P",Sc="LightBox-module__slideOutRight___SK7eC",wc="LightBox-module__slideOutTop___Vgg0z",Tc="LightBox-module__slideOutBottom___nJ0Ef",Lc="LightBox-module__scaleSlide___vZriG",Z={hidden:zl,heroImage:jl,background:ql,editor:Kl,contentStyle:Ul,imageStyle:Gl,imgWrapper:Yl,contain:Xl,cover:Ql,caption:Zl,captionTextInner:Jl,lightboxSplide:ec,arrow:tc,arrowVertical:nc,nextArrow:rc,arrowInner:oc,arrowIcon:ic,arrowImg:ac,mirror:sc,thumbsWrapper:lc,thumbsContainerVertical:cc,thumbsContainer:dc,thumbsAlignStart:uc,thumbsAlignCenter:pc,thumbsAlignEnd:mc,thumbItem:gc,closeButton:hc,fadeIn:fc,slideInLeft:yc,slideInRight:vc,slideInTop:bc,slideInBottom:xc,fadeOut:$c,slideOutLeft:Cc,slideOutRight:Sc,slideOutTop:wc,slideOutBottom:Tc,scaleSlide:Lc},rr=(e,t,n)=>{const r={},[i,l]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),i==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${v.scalingValue(t.x,n)}), calc(-50% + ${v.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${v.scalingValue(t.x,n)}, calc(-50% + ${v.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${v.scalingValue(t.x,n)}), ${v.scalingValue(t.y,n)})`:r.transform=`translate(${v.scalingValue(t.x,n)}, ${v.scalingValue(t.y,n)})`,r};function ga(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 ti(e){const t=e.getBoundingClientRect(),n=ga(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,o=e.naturalHeight,c=r/i,s=l/o;let p,u;s>c?(p=r,u=r/s):(u=i,p=i*s);const T=t.left+n.left,y=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+y;return{x:f,y:m,width:p,height:u}}function ni(e){const t=e.getBoundingClientRect(),n=ga(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ri(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Pc(e,t){const n=(()=>{if(e==="fade in")return Z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return Z.fadeIn;if(e==="slide in")switch(t){case"left":return Z.slideInLeft;case"right":return Z.slideInRight;case"top":return Z.slideInTop;case"bottom":return Z.slideInBottom;default:return Z.slideInRight}return Z.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return Z.fadeOut;if(e==="slide in")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})(),l=(()=>{if(e==="fade in")return Z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return Z.slideOutLeft;case"right":return Z.slideOutRight;case"top":return Z.slideOutTop;case"bottom":return Z.slideOutBottom;default:return Z.slideOutRight}return Z.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:l}}const Ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:l,isPreviewMode:o})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:Z.heroImage,onClick:()=>s(!0)}),a.jsx(_c,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},_c=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:l,isEditor:o,metadata:c})=>{var Ee;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:y,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[$,w]=d.useState(0),[C,b]=d.useState(0),[M,L]=d.useState(!1),[H,x]=d.useState(!1),[P,V]=d.useState({}),S=d.useRef(null),E=d.useRef(null),A=d.useRef(null),F=d.useRef(!1),q=d.useRef(null),ee=d.useRef(null),R=d.useRef(null),W=d.useRef(null),z=d.useRef(!1),N=d.useRef(null),[I,U]=d.useState(!1),{appear:X,triggers:Q,slider:k,thumbnail:ne,controls:h,area:te,caption:me,layout:le}=i.lightboxBlock,{appearClass:$e,backdropAppearClass:re,backdropDisappearClass:de,disappearClass:D}=Pc(X.type,X.direction),O=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const B=()=>{setTimeout(()=>{var _,j;(j=(_=S.current)==null?void 0:_.splide)==null||j.refresh()},16)},oe=()=>{b(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",B),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",B),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){U(!1);return}const B=N.current;if(!B)return;const oe=()=>{k.direction==="horiz"?U(B.scrollWidth>B.clientWidth):U(B.scrollHeight>B.clientHeight)};oe();const _=new ResizeObserver(oe);return _.observe(B),()=>_.disconnect()},[e,ne.isActive,n.length,P,k.direction]);const J=d.useCallback(()=>{const B=window.matchMedia("(max-width: 768px)").matches,oe=ri(te.color);B&&!o&&oe>.9&&(document.body.style.backgroundColor=""),L(!0),F.current=!0;const _=j=>{j.target===q.current&&j.animationName&&(q.current&&ee.current&&q.current.removeEventListener("animationend",ee.current),ee.current=null,F.current&&(F.current=!1,t()),L(!1))};q.current&&(ee.current=_,q.current.addEventListener("animationend",_))},[t,te.color,o]),se=(B,oe,_)=>{var j,K;if(B){if(Q.type==="click"&&Q.switch==="image")Q.repeat==="close"&&$===n.length-1?J():(j=S.current)==null||j.go("+1");else if(Q.type==="click"&&Q.switch==="50/50"){const G=B.getBoundingClientRect(),ie=oe-G.left,pe=_-G.top,Fe=G.width,ge=G.height;let ye;k.direction==="horiz"?ye=ie<Fe/2?"-1":"+1":ye=pe<ge/2?"-1":"+1",(K=S.current)==null||K.go(ye)}}},fe=B=>{if(z.current){z.current=!1;return}const oe=n[$],_=(oe==null?void 0:oe.image.objectFit)==="cover";let j,K;if("changedTouches"in B&&B.changedTouches.length>0)j=B.changedTouches[0].clientX,K=B.changedTouches[0].clientY;else if("clientX"in B)j=B.clientX,K=B.clientY;else return;let G;if(_&&A.current){const ie=ni(A.current);G=j>=ie.left&&j<=ie.right&&K>=ie.top&&K<=ie.bottom}else{const ie=A.current?ti(A.current):null;if(!ie){B.target===B.currentTarget&&J();return}G=j>=ie.x&&j<=ie.x+ie.width&&K>=ie.y&&K<=ie.y+ie.height}G?se(A.current,j,K):J()},Te=B=>{const oe=B.target;(oe.classList.contains(Z.thumbsWrapper)||oe.classList.contains(Z.thumbsContainer))&&fe(B)};d.useEffect(()=>{if(!e)return;const B=oe=>{var _,j;if(oe.key==="Escape"){J();return}if(oe.key==="ArrowRight"){w(K=>(K+1)%Math.max(n.length,1)),(_=S.current)==null||_.go("+1");return}oe.key==="ArrowLeft"&&(w(K=>(K-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=S.current)==null||j.go("-1"))};return window.addEventListener("keydown",B),()=>{window.removeEventListener("keydown",B)}},[e,J,n.length]),d.useEffect(()=>{if(e){if(w(0),b(oe=>oe+1),F.current=!1,L(!1),x(!1),V({}),!O)return;const B=new CustomEvent("page-overlay",{detail:{itemId:O}});window.dispatchEvent(B)}return()=>{q.current&&ee.current&&(q.current.removeEventListener("animationend",ee.current),ee.current=null),x(!1)}},[e,O]),d.useEffect(()=>{E.current!==null&&E.current!==k.type&&b(B=>B+1),E.current=k.type},[k.type]),d.useEffect(()=>{if(!e)return;const B=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,_=ri(te.color);document.body.style.overflow="hidden",x(!1);const j=G=>{G.target===q.current&&!F.current&&G.animationName&&(oe&&!o&&_>.9&&(document.body.style.backgroundColor=te.color),x(!0),q.current&&R.current&&q.current.removeEventListener("animationend",R.current),R.current=null)};q.current&&(R.current=j,q.current.addEventListener("animationend",j));const K=G=>{const ie=G.target;ie&&(ie.closest(`.${Z.thumbsWrapper}`)||ie.closest(`.${Z.thumbsContainer}`))||k.type!=="slide"&&G.preventDefault()};return document.addEventListener("touchmove",K,{passive:!1}),()=>{document.body.style.overflow=B,document.removeEventListener("touchmove",K),q.current&&R.current&&(q.current.removeEventListener("animationend",R.current),R.current=null),x(!1)}},[e,o,te.color,k.type]),d.useEffect(()=>{if(!e)return;const B=oe=>{var j,K;if(F.current){oe.stopPropagation();return}if(z.current){z.current=!1;return}const _=oe.target;if(!(_&&(_.closest(`.${Z.thumbsContainer}`)||_.closest(`.${Z.thumbItem}`)||_.closest(`.${Z.arrow}`)||_.closest(`.${Z.closeButton}`)||_.closest(`.${Z.caption}`)))){if(k.type==="slide"&&Q.type==="drag"&&((K=(j=S.current)==null?void 0:j.splide)!=null&&K.root)){const G=S.current.splide.root;if(_&&(G.contains(_)||G===_))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const G=n[$],ie=(G==null?void 0:G.image.objectFit)==="cover",pe=oe.changedTouches[0];let Fe;if(ie&&A.current){const ge=ni(A.current);Fe=pe.clientX>=ge.left&&pe.clientX<=ge.right&&pe.clientY>=ge.top&&pe.clientY<=ge.bottom}else{const ge=A.current?ti(A.current):null;if(!ge)return;Fe=pe.clientX>=ge.x&&pe.clientX<=ge.x+ge.width&&pe.clientY>=ge.y&&pe.clientY<=ge.y+ge.height}if(!Fe){oe.stopPropagation(),F.current=!0;const ge=ye=>{ye.stopPropagation(),ye.preventDefault(),document.removeEventListener("click",ge,!0)};document.addEventListener("click",ge,!0),J()}}}};return document.addEventListener("touchend",B,{passive:!0}),()=>{document.removeEventListener("touchend",B)}},[e,J,$,n]);const Ce=(k.type==="scale"||k.type==="fade")&&k.direction==="vert"&&Q.type==="drag";d.useEffect(()=>{var ye,We;if(!e||!Ce||!((We=(ye=S.current)==null?void 0:ye.splide)!=null&&We.root))return;const B=S.current.splide.root,oe=30,_=(ae,be)=>{if(W.current){const Ae=Math.abs(ae-W.current.x),Re=Math.abs(be-W.current.y);(Ae>0||Re>0)&&(z.current=!0)}},j=ae=>{W.current&&(ae.preventDefault(),_(ae.clientX,ae.clientY))},K=ae=>{W.current&&ae.touches.length>0&&(ae.preventDefault(),_(ae.touches[0].clientX,ae.touches[0].clientY))},G=(ae,be)=>{if(!W.current||!S.current){W.current=null;return}const Ae=Math.abs(ae-W.current.x),Re=Math.abs(be-W.current.y);Re>oe&&Re>Ae&&S.current.go(be<W.current.y?"+1":"-1"),W.current=null},ie=ae=>{W.current&&G(ae.clientX,ae.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",j)},pe=ae=>{if(W.current){if(ae.changedTouches.length>0){const be=ae.changedTouches[0];G(be.clientX,be.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",K)}},Fe=ae=>{W.current={x:ae.clientX,y:ae.clientY},z.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},ge=ae=>{ae.touches.length>0&&(W.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",K,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return B.addEventListener("pointerdown",Fe),B.addEventListener("touchstart",ge),()=>{B.removeEventListener("pointerdown",Fe),B.removeEventListener("touchstart",ge),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),W.current=null,z.current=!1}},[e,Ce,C]);const Le={backgroundColor:te.color,backdropFilter:`blur(${te.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Ii.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:o?null:q,className:ke(Z.background,M?de:re,{[Z.editor]:o},{[Z.hidden]:!e}),style:{...Le,...H&&!o&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:o?q:null,className:ke(Z.contentStyle,M?D:$e,{[Z.editor]:o},{[Z.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Eo,{onMove:B=>w(B.index),ref:S,className:Z.lightboxSplide,options:{arrows:!1,speed:k.duration?parseInt(k.duration):500,direction:k.direction==="horiz"||k.type==="fade"||k.type==="scale"?"ltr":"ttb",pagination:!1,drag:Q.type==="drag"&&!Ce,perPage:1,width:"100%",height:"100%",type:k.type==="fade"||k.type==="scale"?"fade":"loop",padding:0,rewind:Q.repeat!=="close",start:0},style:{"--splide-speed":k.duration},children:n.map((B,oe)=>{const _=rr(le.position,le.offset,o),j=`${v.scalingValue(le.padding.top,o)} ${v.scalingValue(le.padding.right,o)} ${v.scalingValue(le.padding.bottom,o)} ${v.scalingValue(le.padding.left,o)}`,K=k.type==="scale"?(()=>{const{transform:G,...ie}=_;return{...ie,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":G||"none"}})():{..._,position:"absolute",padding:j,boxSizing:"border-box"};return a.jsx(_o,{children:a.jsx("div",{className:Z.imgWrapper,onClick:fe,children:a.jsx("img",{ref:oe===$?A:null,className:ke(Z.imageStyle,{[Z.contain]:B.image.objectFit==="contain",[Z.cover]:B.image.objectFit==="cover",[Z.scaleSlide]:k.type==="scale"}),src:B.image.url,alt:B.image.name??"",style:{...K,pointerEvents:B.image.objectFit==="contain"?"none":"auto"}})})},oe)})},C),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ke(Z.arrow,{[Z.arrowVertical]:k.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${v.scalingValue(h.offset.x,o)}, ${v.scalingValue(h.offset.y*(k.direction==="horiz"?1:-1),o)}) scale(${h.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=S.current)==null?void 0:B.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Wt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ke(Z.arrowImg,Z.mirror)}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:ke(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),a.jsx("div",{className:ke(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:k.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:Z.arrowInner,style:{transform:`translate(${v.scalingValue(h.offset.x*(k.direction==="horiz"?-1:1),o)}, ${v.scalingValue(h.offset.y,o)}) scale(${h.scale}) rotate(${k.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var B;return(B=S.current)==null?void 0:B.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Wt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Z.arrowImg}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:ke(Z.arrowIcon,Z.arrowImg)})]})})]}),te.closeIconUrl&&(()=>{const B=rr(te.closeIconAlign,te.closeIconOffset,o),oe=`scale(${te.closeIconScale})`,_=B.transform?`${B.transform} ${oe}`:oe;return a.jsx("button",{className:Z.closeButton,style:{...B,transform:_},onClick:J,"aria-label":"Close lightbox",children:a.jsx(Wt,{url:te.closeIconUrl,fill:te.closeIconColor??"#000000",hoverFill:te.closeIconHover??"#cccccc"})})})(),me&&me.isActive&&r.imageCaption&&((Ee=n[$])==null?void 0:Ee.imageCaption)&&a.jsx("div",{className:Z.caption,style:{...rr(me.alignment,me.offset,o),fontFamily:Rr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":v.scalingValue(s.width,o),letterSpacing:v.scalingValue(u,o),wordSpacing:v.scalingValue(y,o),textAlign:T,fontSize:v.scalingValue(f.fontSize,o),lineHeight:v.scalingValue(f.lineHeight,o),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-color":me.linkColor,"--link-hover-color":me.linkHoverColor},children:a.jsx(Cn,{content:n[$].imageCaption})})}),ne.isActive&&(()=>{const[B,oe]=ne.position.split("-"),_=k.direction==="horiz"?`${B}-left`:ne.position,j=rr(_,ne.offset,o),K=()=>{if(k.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="right")return"flex-end"}else{if(B==="top")return"flex-start";if(B==="middle")return"center";if(B==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:N,className:Z.thumbsWrapper,onClick:G=>Te(G),style:{position:o?"absolute":"fixed",...j,...k.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:ke(Z.thumbsContainer,{[Z.thumbsContainerVertical]:k.direction==="vert",[Z.thumbsAlignStart]:ne.align==="start",[Z.thumbsAlignCenter]:ne.align==="center",[Z.thumbsAlignEnd]:ne.align==="end"}),style:{gap:v.scalingValue(ne.grid.gap,o),justifyContent:I?"flex-start":K()},children:n.map((G,ie)=>{const pe=ie===$,Fe=P[ie],ye=ne.grid.size*(pe?ne.activeState.scale:1),We=()=>{if(ne.fit!=="fit")return{};if(!Fe)return k.direction==="horiz"?{height:v.scalingValue(ye,o)}:{width:v.scalingValue(ye,o)};const ae=Fe.width/Fe.height;if(k.direction==="horiz"){const be=ye,Ae=be*ae;return{width:v.scalingValue(Ae,o),height:v.scalingValue(be,o)}}else{const be=ye,Ae=be/ae;return{width:v.scalingValue(be,o),height:v.scalingValue(Ae,o)}}};return a.jsx("button",{className:Z.thumbItem,style:{...k.direction==="horiz"&&ne.fit!=="fit"?{height:v.scalingValue(ye,o)}:{},...k.direction==="vert"&&ne.fit!=="fit"?{width:v.scalingValue(ye,o)}:{},...ne.fit==="cover"?{width:v.scalingValue(ye,o),height:v.scalingValue(ye,o)}:{},...We(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ae=>{var be;ae.stopPropagation(),w(ie),(be=S.current)==null||be.go(ie)},onMouseEnter:()=>{var ae;ne.triggers==="hov"&&((ae=S.current)==null||ae.go(ie))},children:a.jsx("img",{src:G.image.url,alt:G.image.name??"",onLoad:ae=>{const be=ae.currentTarget;be.naturalWidth&&be.naturalHeight&&V(Ae=>({...Ae,[ie]:{width:be.naturalWidth,height:be.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${G.image.name}-${ie}`)})})})})()]})]}),document.getElementById(l))};function oi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Ac={element:Ec,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 or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ic(e){return`
6
+ */const Tl="RichTextRenderer-module__link___BWeZ2",Ll={link:Tl},Pl=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},kr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Pl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function yt(e){const{color:t,...n}=e;return n}function Je(e,t){var i,l,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:kr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:y.scalingValue(e.letterSpacing,t),wordSpacing:y.scalingValue(e.wordSpacing,t),fontSize:y.scalingValue(n,t),lineHeight:r!==void 0?y.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(l=e.textAppearance)==null?void 0:l.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const Sn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?a.jsx("a",{className:Ll.link,href:r.value,target:r.target,children:t(r.children)},i):a.jsx("span",{style:El(r),children:r.text},i));return a.jsx(a.Fragment,{children:e.map((n,r)=>{const i=n.children;return a.jsx("div",{children:t(i)},r)})})};function El(e){return{...e.fontFamily&&{fontFamily:kr(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 _l="SvgImage-module__svg___q3xE-",Al="SvgImage-module__img___VsTm-",Zo={svg:_l,img:Al},Il=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Rl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Mt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[l,o]=d.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return d.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');o(c)}},[]),!Il(e)||!l?a.jsx("img",{src:e,alt:"",className:Re(Zo.img,r),style:i}):a.jsx("span",{"data-supports-mask":l,className:Re(Zo.svg,r),style:{"--svg":Rl(e),"--fill":t,"--hover-fill":n,...i??{}}})},kl={"top-left":ce.topLeftAlignment,"top-center":ce.topCenterAlignment,"top-right":ce.topRightAlignment,"middle-left":ce.middleLeftAlignment,"middle-center":ce.middleCenterAlignment,"middle-right":ce.middleRightAlignment,"bottom-left":ce.bottomLeftAlignment,"bottom-center":ce.bottomCenterAlignment,"bottom-right":ce.bottomRightAlignment};function Fl({settings:e,content:t,styles:n,isEditor:r}){const[i,l]=d.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:u,fontSizeLineHeight:T,textAppearance:x,color:f}=n.imageCaption??{},[m,g]=d.useState(void 0),[C,w]=d.useState(null),[S,v]=d.useState(0),[M,L]=d.useState(0),{direction:N,transition:b,controls:P,pagination:B,imageCaption:$,triggers:E}=e,A=d.useRef(b.type),{x:F,y:j}=e.controls.offset,te=k=>{i&&i.go(k)};return d.useEffect(()=>{if(!C)return;const k=new ResizeObserver(W=>{if(!i)return;const[D]=W;g({width:Math.round(D.contentRect.width),height:Math.round(D.contentRect.height)})});return k.observe(C),()=>k.unobserve(C)},[C]),d.useEffect(()=>{!i||A.current===b.type||(L(k=>k+1),A.current=b.type)},[b.type]),a.jsx("div",{className:Re(ce.wrapper,{[ce.editor]:r}),ref:w,children:a.jsxs("div",{className:ce.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Re(ce.captionBlock),children:a.jsx("div",{className:ce.captionTextWrapper,children:t.map((k,W)=>a.jsx("div",{className:Re(ce.captionText,kl[$.alignment],{[ce.withPointerEvents]:W===S&&r,[ce.active]:W===S}),style:{fontFamily:kr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":y.scalingValue(o.width,r),letterSpacing:y.scalingValue(s,r),wordSpacing:y.scalingValue(u,r),textAlign:p,fontSize:y.scalingValue(T.fontSize,r),lineHeight:y.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ce.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:y.scalingValue($.offset.y,r),left:y.scalingValue($.offset.x,r)},children:a.jsx(Sn,{content:k.imageCaption})})},W))})}),a.jsx(Eo,{onMove:k=>{v(k.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:E.autoPlay!==null,...E.autoPlay!==null&&{interval:parseInt(E.autoPlay)*1e3},direction:N==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:E.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((k,W)=>a.jsx(_o,{children:a.jsx("div",{className:ce.sliderItem,children:a.jsx("div",{className:ce.imgWrapper,children:a.jsx("img",{className:Re(ce.sliderImage,{[ce.contain]:k.image.objectFit==="contain",[ce.cover]:k.image.objectFit==="cover"}),src:k.image.url,alt:k.image.name??""})})})},W))},M),P.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(ce.arrow,{[ce.arrowVertical]:N==="vert",[ce.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{onClick:()=>{te("-1")},className:ce.arrowInner,style:{transform:`translate(${y.scalingValue(F,r)}, ${y.scalingValue(j*(N==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Mt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:Re(ce.arrowImg,ce.mirror)}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(ce.arrowIcon,ce.arrowImg,ce.mirror)})]})}),a.jsx("div",{className:Re(ce.arrow,ce.nextArrow,{[ce.arrowVertical]:N==="vert",[ce.hoverArrow]:P.show==="on hover"}),style:{color:P.color,"--arrow-hover-color":P.hover},children:a.jsxs("button",{className:ce.arrowInner,onClick:()=>te("+1"),style:{transform:`translate(${y.scalingValue(F*(N==="horiz"?-1:1),r)}, ${y.scalingValue(j,r)}) scale(${e.controls.scale/100}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:[P.arrowsImgUrl&&a.jsx(Mt,{url:P.arrowsImgUrl,fill:P.color,hoverFill:P.hover,className:ce.arrowImg}),!P.arrowsImgUrl&&a.jsx(Jo,{color:P.color,className:Re(ce.arrowIcon,ce.arrowImg)})]})})]}),E.triggersList.click&&a.jsx("div",{className:ce.clickOverlay,onClick:()=>{i&&i.go("+1")}}),B.isActive&&a.jsx("div",{className:Re(ce.pagination,{[ce.paginationInsideBottom]:B.position==="inside-1"&&N==="horiz",[ce.paginationInsideTop]:B.position==="inside-2"&&N==="horiz",[ce.paginationOutsideBottom]:B.position==="outside-1"&&N==="horiz",[ce.paginationOutsideTop]:B.position==="outside-2"&&N==="horiz",[ce.paginationInsideLeft]:B.position==="inside-1"&&N==="vert",[ce.paginationInsideRight]:B.position==="inside-2"&&N==="vert",[ce.paginationOutsideLeft]:B.position==="outside-1"&&N==="vert",[ce.paginationOutsideRight]:B.position==="outside-2"&&N==="vert",[ce.paginationVertical]:N==="vert"}),children:a.jsx("div",{className:ce.paginationInner,style:{backgroundColor:B.colors[2],transform:`scale(${B.scale/100}) translate(${y.scalingValue(B.offset.x,r)}, ${y.scalingValue(B.offset.y,r)}) rotate(${N==="horiz"?"0deg":"90deg"})`},children:t.map((k,W)=>a.jsx("button",{onClick:()=>{i&&i.go(W)},className:Re(ce.paginationItem),children:a.jsx("div",{className:Re(ce.dot,{[ce.activeDot]:W===S}),style:{backgroundColor:W===S?B.colors[0]:B.colors[1],"--pagination-hover-color":B.hover}})},W))})})]})})}function Jo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Wl={element:Fl,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"]}},Ml="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Nl="ImageRevealSlider-module__image___Qjt-e",Hl="ImageRevealSlider-module__link___N-iLG",Ol="ImageRevealSlider-module__cursor___2U03d",pn={imageRevealSlider:Ml,image:Nl,link:Hl,cursor:Ol};function ei(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const l=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*l,c=l/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function Dr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Bl(e,t,n,r){let i,l;if(t==="custom"){i=n;const o=await Dr(e);l=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await Dr(e);l=o.height/o.width*i}else{const o=await Dr(e);i=o.width,l=o.height}return{width:i,height:l,finalWidth:`${i}px`}}function Vl({settings:e,content:t,isEditor:n}){const[r,i]=d.useState(null),[l,o]=d.useState([]),[c,s]=d.useState(0),p=d.useRef(0),[u,T]=d.useState({x:0,y:0}),[x,f]=d.useState(1),[m,g]=d.useState("none"),C=d.useRef({x:0,y:0}),[w,S]=d.useState(!1),{sizeType:v,imageWidth:M,randomRangeImageWidth:L}=e.imageSize,{revealPosition:N,visible:b}=e.position,{cursorType:P,target:B,defaultCursorScale:$,defaultCursor:E,hoverCursorScale:A,hoverCursor:F}=e.cursor;d.useEffect(()=>{if(!r)return;const k=(H,I)=>{const K=r.getBoundingClientRect(),Q=H-K.left,Z=I-K.top;if(T({x:Q,y:Z}),P==="system"){g("none"),f(1);return}const R=Q,ne=Z,h=document.elementFromPoint(K.left+R,K.top+ne);if(h&&h.closest("a")){g("none"),f(1);return}const ee=ei(R,ne,l)||B==="area"?{img:F??"none",scale:A}:{img:E??"none",scale:$};g(ee.img),f(ee.scale)},W=H=>{H.stopPropagation(),C.current={x:H.clientX,y:H.clientY},k(H.clientX,H.clientY)},D=()=>{w&&k(C.current.x,C.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",D,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",D,!0)}},[r,w,u,P,B,F,E,A,$,l]),d.useEffect(()=>{w||(g("none"),f(0))},[w]);const j=async(k,W,D,H={})=>{const{width:I,height:K,finalWidth:Q}=await Bl(k.image.url,v,M,L);let Z=0,R=0;N==="same"?(Z=W/2,R=D/2):(Z=H.x??Math.random()*W,R=H.y??Math.random()*D);const ne=Math.min(Math.max(Z,I/2),W-I/2),h=Math.min(Math.max(R,K/2),D-K/2);return{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:ne,y:h,width:Q}};d.useEffect(()=>{if(!r||t.length===0)return;const k=r.getBoundingClientRect(),W=k.width,D=k.height,H=[];(async()=>{const K=t[0],Q=await j(K,W,D);H.push(Q),o(H),s(1)})()},[v,M,L,N,r]),d.useEffect(()=>{b==="last One"&&o(k=>k.length>0?[k[k.length-1]]:[])},[b]);const te=async k=>{if(!r)return;const W=r.getBoundingClientRect(),D=k.clientX-W.left,H=k.clientY-W.top;if(B==="image"&&!ei(D,H,l))return;let I=0,K=0;N==="on Click"?(I=D,K=H):N==="same"?(I=W.width/2,K=W.height/2):(I=Math.random()*W.width,K=Math.random()*W.height);const Q=t[c],Z=await j(Q,W.width,W.height,{x:I,y:K});o(R=>b==="all"?[...R,Z]:[Z]),s(R=>R>=t.length-1?0:R+1)};return a.jsxs("div",{ref:i,onClick:te,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:pn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[l.map(k=>a.jsx("div",{className:pn.wrapper,style:{top:`${k.y}px`,left:`${k.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:k.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:B==="area"&&k.link?a.jsx("a",{href:k.link,target:"_blank",className:pn.link,children:a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)}):a.jsx("img",{src:k.url,alt:k.name,className:pn.image},k.id)},k.id)),w&&a.jsx("div",{className:pn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Dl={element:Vl,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:""}]}}}},zl="LightBox-module__hidden___9s-9x",jl="LightBox-module__heroImage___sTxNF",ql="LightBox-module__background___rm9ml",Kl="LightBox-module__editor___4ACaY",Ul="LightBox-module__contentStyle___Bgnsq",Gl="LightBox-module__imageStyle___tLIlB",Yl="LightBox-module__imgWrapper___LuFUp",Xl="LightBox-module__contain___8-yaS",Ql="LightBox-module__cover___hNvOG",Zl="LightBox-module__caption___b6L2I",Jl="LightBox-module__captionTextInner___rCGNH",ec="LightBox-module__lightboxSplide___XFuWC",tc="LightBox-module__arrow___iz38X",nc="LightBox-module__arrowVertical___Zfz81",rc="LightBox-module__nextArrow___zkAQN",oc="LightBox-module__arrowInner___p48sW",ic="LightBox-module__arrowIcon___3VaFf",ac="LightBox-module__arrowImg___pNV88",sc="LightBox-module__mirror___pjeXc",lc="LightBox-module__thumbsWrapper___GB-nU",cc="LightBox-module__thumbsContainerVertical___wttk5",dc="LightBox-module__thumbsContainer___osSma",uc="LightBox-module__thumbsAlignStart___MO6tY",pc="LightBox-module__thumbsAlignCenter___Q4sUx",mc="LightBox-module__thumbsAlignEnd___p4y9R",gc="LightBox-module__thumbItem___HvnF3",hc="LightBox-module__closeButton___g2khP",fc="LightBox-module__fadeIn___0m5GW",yc="LightBox-module__slideInLeft___gPYwC",vc="LightBox-module__slideInRight___S-pPp",bc="LightBox-module__slideInTop___DFdAj",xc="LightBox-module__slideInBottom___m27kZ",Cc="LightBox-module__fadeOut___55qBR",Sc="LightBox-module__slideOutLeft___NvU7P",$c="LightBox-module__slideOutRight___SK7eC",wc="LightBox-module__slideOutTop___Vgg0z",Tc="LightBox-module__slideOutBottom___nJ0Ef",Lc="LightBox-module__scaleSlide___vZriG",J={hidden:zl,heroImage:jl,background:ql,editor:Kl,contentStyle:Ul,imageStyle:Gl,imgWrapper:Yl,contain:Xl,cover:Ql,caption:Zl,captionTextInner:Jl,lightboxSplide:ec,arrow:tc,arrowVertical:nc,nextArrow:rc,arrowInner:oc,arrowIcon:ic,arrowImg:ac,mirror:sc,thumbsWrapper:lc,thumbsContainerVertical:cc,thumbsContainer:dc,thumbsAlignStart:uc,thumbsAlignCenter:pc,thumbsAlignEnd:mc,thumbItem:gc,closeButton:hc,fadeIn:fc,slideInLeft:yc,slideInRight:vc,slideInTop:bc,slideInBottom:xc,fadeOut:Cc,slideOutLeft:Sc,slideOutRight:$c,slideOutTop:wc,slideOutBottom:Tc,scaleSlide:Lc},rr=(e,t,n)=>{const r={},[i,l]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),i==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), calc(-50% + ${y.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${y.scalingValue(t.x,n)}, calc(-50% + ${y.scalingValue(t.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${y.scalingValue(t.x,n)}), ${y.scalingValue(t.y,n)})`:r.transform=`translate(${y.scalingValue(t.x,n)}, ${y.scalingValue(t.y,n)})`,r};function ga(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 ti(e){const t=e.getBoundingClientRect(),n=ga(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,o=e.naturalHeight,c=r/i,s=l/o;let p,u;s>c?(p=r,u=r/s):(u=i,p=i*s);const T=t.left+n.left,x=t.top+n.top,f=(r-p)/2+T,m=(i-u)/2+x;return{x:f,y:m,width:p,height:u}}function ni(e){const t=e.getBoundingClientRect(),n=ga(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ri(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Pc(e,t){const n=(()=>{if(e==="fade in")return J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),l=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:l}}const Ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:l,isPreviewMode:o})=>{const[c,s]=d.useState(!1),{url:p}=e.thumbnailBlock.cover;return d.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),a.jsx(_c,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:l})]})},_c=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:l,isEditor:o,metadata:c})=>{var Ee;const{widthSettings:s,fontSettings:p,letterSpacing:u,textAlign:T,wordSpacing:x,fontSizeLineHeight:f,textAppearance:m,color:g}=r.imageCaption??{},[C,w]=d.useState(0),[S,v]=d.useState(0),[M,L]=d.useState(!1),[N,b]=d.useState(!1),[P,B]=d.useState({}),$=d.useRef(null),E=d.useRef(null),A=d.useRef(null),F=d.useRef(!1),j=d.useRef(null),te=d.useRef(null),k=d.useRef(null),W=d.useRef(null),D=d.useRef(!1),H=d.useRef(null),[I,K]=d.useState(!1),{appear:Q,triggers:Z,slider:R,thumbnail:ne,controls:h,area:ee,caption:ge,layout:le}=i.lightboxBlock,{appearClass:be,backdropAppearClass:re,backdropDisappearClass:de,disappearClass:V}=Pc(Q.type,Q.direction),U=(c==null?void 0:c.itemId)??null;d.useEffect(()=>{const O=()=>{setTimeout(()=>{var _,z;(z=(_=$.current)==null?void 0:_.splide)==null||z.refresh()},16)},oe=()=>{v(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",O),window.addEventListener("ArticleEditor.ComponentContent:change",oe),()=>{window.removeEventListener("ArticleEditor.Layout:change",O),window.removeEventListener("ArticleEditor.ComponentContent:change",oe)}},[]),d.useEffect(()=>{if(!e||!ne.isActive){K(!1);return}const O=H.current;if(!O)return;const oe=()=>{R.direction==="horiz"?K(O.scrollWidth>O.clientWidth):K(O.scrollHeight>O.clientHeight)};oe();const _=new ResizeObserver(oe);return _.observe(O),()=>_.disconnect()},[e,ne.isActive,n.length,P,R.direction]);const G=d.useCallback(()=>{const O=window.matchMedia("(max-width: 768px)").matches,oe=ri(ee.color);O&&!o&&oe>.9&&(document.body.style.backgroundColor=""),L(!0),F.current=!0;const _=z=>{z.target===j.current&&z.animationName&&(j.current&&te.current&&j.current.removeEventListener("animationend",te.current),te.current=null,F.current&&(F.current=!1,t()),L(!1))};j.current&&(te.current=_,j.current.addEventListener("animationend",_))},[t,ee.color,o]),se=(O,oe,_)=>{var z,q;if(O){if(Z.type==="click"&&Z.switch==="image")Z.repeat==="close"&&C===n.length-1?G():(z=$.current)==null||z.go("+1");else if(Z.type==="click"&&Z.switch==="50/50"){const Y=O.getBoundingClientRect(),ie=oe-Y.left,pe=_-Y.top,ke=Y.width,ye=Y.height;let ve;R.direction==="horiz"?ve=ie<ke/2?"-1":"+1":ve=pe<ye/2?"-1":"+1",(q=$.current)==null||q.go(ve)}}},fe=O=>{if(D.current){D.current=!1;return}const oe=n[C],_=(oe==null?void 0:oe.image.objectFit)==="cover";let z,q;if("changedTouches"in O&&O.changedTouches.length>0)z=O.changedTouches[0].clientX,q=O.changedTouches[0].clientY;else if("clientX"in O)z=O.clientX,q=O.clientY;else return;let Y;if(_&&A.current){const ie=ni(A.current);Y=z>=ie.left&&z<=ie.right&&q>=ie.top&&q<=ie.bottom}else{const ie=A.current?ti(A.current):null;if(!ie){O.target===O.currentTarget&&G();return}Y=z>=ie.x&&z<=ie.x+ie.width&&q>=ie.y&&q<=ie.y+ie.height}Y?se(A.current,z,q):G()},Te=O=>{const oe=O.target;(oe.classList.contains(J.thumbsWrapper)||oe.classList.contains(J.thumbsContainer))&&fe(O)};d.useEffect(()=>{if(!e)return;const O=oe=>{var _,z;if(oe.key==="Escape"){G();return}if(oe.key==="ArrowRight"){w(q=>(q+1)%Math.max(n.length,1)),(_=$.current)==null||_.go("+1");return}oe.key==="ArrowLeft"&&(w(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(z=$.current)==null||z.go("-1"))};return window.addEventListener("keydown",O),()=>{window.removeEventListener("keydown",O)}},[e,G,n.length]),d.useEffect(()=>{if(e){if(w(0),v(oe=>oe+1),F.current=!1,L(!1),b(!1),B({}),!U)return;const O=new CustomEvent("page-overlay",{detail:{itemId:U}});window.dispatchEvent(O)}return()=>{j.current&&te.current&&(j.current.removeEventListener("animationend",te.current),te.current=null),b(!1)}},[e,U]),d.useEffect(()=>{E.current!==null&&E.current!==R.type&&v(O=>O+1),E.current=R.type},[R.type]),d.useEffect(()=>{if(!e)return;const O=document.body.style.overflow,oe=window.matchMedia("(max-width: 768px)").matches,_=ri(ee.color);document.body.style.overflow="hidden",b(!1);const z=Y=>{Y.target===j.current&&!F.current&&Y.animationName&&(oe&&!o&&_>.9&&(document.body.style.backgroundColor=ee.color),b(!0),j.current&&k.current&&j.current.removeEventListener("animationend",k.current),k.current=null)};j.current&&(k.current=z,j.current.addEventListener("animationend",z));const q=Y=>{const ie=Y.target;ie&&(ie.closest(`.${J.thumbsWrapper}`)||ie.closest(`.${J.thumbsContainer}`))||R.type!=="slide"&&Y.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=O,document.removeEventListener("touchmove",q),j.current&&k.current&&(j.current.removeEventListener("animationend",k.current),k.current=null),b(!1)}},[e,o,ee.color,R.type]),d.useEffect(()=>{if(!e)return;const O=oe=>{var z,q;if(F.current){oe.stopPropagation();return}if(D.current){D.current=!1;return}const _=oe.target;if(!(_&&(_.closest(`.${J.thumbsContainer}`)||_.closest(`.${J.thumbItem}`)||_.closest(`.${J.arrow}`)||_.closest(`.${J.closeButton}`)||_.closest(`.${J.caption}`)))){if(R.type==="slide"&&Z.type==="drag"&&((q=(z=$.current)==null?void 0:z.splide)!=null&&q.root)){const Y=$.current.splide.root;if(_&&(Y.contains(_)||Y===_))return}if(oe.touches.length===0&&oe.changedTouches.length>0){const Y=n[C],ie=(Y==null?void 0:Y.image.objectFit)==="cover",pe=oe.changedTouches[0];let ke;if(ie&&A.current){const ye=ni(A.current);ke=pe.clientX>=ye.left&&pe.clientX<=ye.right&&pe.clientY>=ye.top&&pe.clientY<=ye.bottom}else{const ye=A.current?ti(A.current):null;if(!ye)return;ke=pe.clientX>=ye.x&&pe.clientX<=ye.x+ye.width&&pe.clientY>=ye.y&&pe.clientY<=ye.y+ye.height}if(!ke){oe.stopPropagation(),F.current=!0;const ye=ve=>{ve.stopPropagation(),ve.preventDefault(),document.removeEventListener("click",ye,!0)};document.addEventListener("click",ye,!0),G()}}}};return document.addEventListener("touchend",O,{passive:!0}),()=>{document.removeEventListener("touchend",O)}},[e,G,C,n]);const Se=(R.type==="scale"||R.type==="fade")&&R.direction==="vert"&&Z.type==="drag";d.useEffect(()=>{var ve,We;if(!e||!Se||!((We=(ve=$.current)==null?void 0:ve.splide)!=null&&We.root))return;const O=$.current.splide.root,oe=30,_=(ae,xe)=>{if(W.current){const Ae=Math.abs(ae-W.current.x),Fe=Math.abs(xe-W.current.y);(Ae>0||Fe>0)&&(D.current=!0)}},z=ae=>{W.current&&(ae.preventDefault(),_(ae.clientX,ae.clientY))},q=ae=>{W.current&&ae.touches.length>0&&(ae.preventDefault(),_(ae.touches[0].clientX,ae.touches[0].clientY))},Y=(ae,xe)=>{if(!W.current||!$.current){W.current=null;return}const Ae=Math.abs(ae-W.current.x),Fe=Math.abs(xe-W.current.y);Fe>oe&&Fe>Ae&&$.current.go(xe<W.current.y?"+1":"-1"),W.current=null},ie=ae=>{W.current&&Y(ae.clientX,ae.clientY),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("pointermove",z)},pe=ae=>{if(W.current){if(ae.changedTouches.length>0){const xe=ae.changedTouches[0];Y(xe.clientX,xe.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",q)}},ke=ae=>{W.current={x:ae.clientX,y:ae.clientY},D.current=!1,document.addEventListener("pointermove",z,{passive:!1}),document.addEventListener("pointerup",ie),document.addEventListener("pointercancel",ie)},ye=ae=>{ae.touches.length>0&&(W.current={x:ae.touches[0].clientX,y:ae.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return O.addEventListener("pointerdown",ke),O.addEventListener("touchstart",ye),()=>{O.removeEventListener("pointerdown",ke),O.removeEventListener("touchstart",ye),document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",ie),document.removeEventListener("pointercancel",ie),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),W.current=null,D.current=!1}},[e,Se,S]);const Le={backgroundColor:ee.color,backdropFilter:`blur(${ee.blur}px)`,animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Ii.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:o?null:j,className:Re(J.background,M?de:re,{[J.editor]:o},{[J.hidden]:!e}),style:{...Le,...N&&!o&&!M?{position:"absolute"}:{}}}),a.jsxs("div",{ref:o?j:null,className:Re(J.contentStyle,M?V:be,{[J.editor]:o},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Eo,{onMove:O=>w(O.index),ref:$,className:J.lightboxSplide,options:{arrows:!1,speed:R.duration?parseInt(R.duration):500,direction:R.direction==="horiz"||R.type==="fade"||R.type==="scale"?"ltr":"ttb",pagination:!1,drag:Z.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:R.type==="fade"||R.type==="scale"?"fade":"loop",padding:0,rewind:Z.repeat!=="close",start:0},style:{"--splide-speed":R.duration},children:n.map((O,oe)=>{const _=rr(le.position,le.offset,o),z=`${y.scalingValue(le.padding.top,o)} ${y.scalingValue(le.padding.right,o)} ${y.scalingValue(le.padding.bottom,o)} ${y.scalingValue(le.padding.left,o)}`,q=R.type==="scale"?(()=>{const{transform:Y,...ie}=_;return{...ie,position:"absolute",padding:z,boxSizing:"border-box","--position-transform":Y||"none"}})():{..._,position:"absolute",padding:z,boxSizing:"border-box"};return a.jsx(_o,{children:a.jsx("div",{className:J.imgWrapper,onClick:fe,children:a.jsx("img",{ref:oe===C?A:null,className:Re(J.imageStyle,{[J.contain]:O.image.objectFit==="contain",[J.cover]:O.image.objectFit==="cover",[J.scaleSlide]:R.type==="scale"}),src:O.image.url,alt:O.image.name??"",style:{...q,pointerEvents:O.image.objectFit==="contain"?"none":"auto"}})})},oe)})},S),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Re(J.arrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x,o)}, ${y.scalingValue(h.offset.y*(R.direction==="horiz"?1:-1),o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=$.current)==null?void 0:O.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Mt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Re(J.arrowImg,J.mirror)}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:Re(J.arrow,J.nextArrow,{[J.arrowVertical]:R.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${y.scalingValue(h.offset.x*(R.direction==="horiz"?-1:1),o)}, ${y.scalingValue(h.offset.y,o)}) scale(${h.scale}) rotate(${R.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var O;return(O=$.current)==null?void 0:O.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Mt,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:J.arrowImg}),!h.arrowsImgUrl&&a.jsx(oi,{color:h.color,className:Re(J.arrowIcon,J.arrowImg)})]})})]}),ee.closeIconUrl&&(()=>{const O=rr(ee.closeIconAlign,ee.closeIconOffset,o),oe=`scale(${ee.closeIconScale})`,_=O.transform?`${O.transform} ${oe}`:oe;return a.jsx("button",{className:J.closeButton,style:{...O,transform:_},onClick:G,"aria-label":"Close lightbox",children:a.jsx(Mt,{url:ee.closeIconUrl,fill:ee.closeIconColor??"#000000",hoverFill:ee.closeIconHover??"#cccccc"})})})(),ge&&ge.isActive&&r.imageCaption&&((Ee=n[C])==null?void 0:Ee.imageCaption)&&a.jsx("div",{className:J.caption,style:{...rr(ge.alignment,ge.offset,o),fontFamily:kr(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:s.sizing==="auto"?"max-content":y.scalingValue(s.width,o),letterSpacing:y.scalingValue(u,o),wordSpacing:y.scalingValue(x,o),textAlign:T,fontSize:y.scalingValue(f.fontSize,o),lineHeight:y.scalingValue(f.lineHeight,o),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:g},onClick:O=>O.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-color":ge.linkColor,"--link-hover-color":ge.linkHoverColor},children:a.jsx(Sn,{content:n[C].imageCaption})})}),ne.isActive&&(()=>{const[O,oe]=ne.position.split("-"),_=R.direction==="horiz"?`${O}-left`:ne.position,z=rr(_,ne.offset,o),q=()=>{if(R.direction==="horiz"){if(oe==="left")return"flex-start";if(oe==="center")return"center";if(oe==="right")return"flex-end"}else{if(O==="top")return"flex-start";if(O==="middle")return"center";if(O==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:H,className:J.thumbsWrapper,onClick:Y=>Te(Y),style:{position:o?"absolute":"fixed",...z,...R.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Re(J.thumbsContainer,{[J.thumbsContainerVertical]:R.direction==="vert",[J.thumbsAlignStart]:ne.align==="start",[J.thumbsAlignCenter]:ne.align==="center",[J.thumbsAlignEnd]:ne.align==="end"}),style:{gap:y.scalingValue(ne.grid.gap,o),justifyContent:I?"flex-start":q()},children:n.map((Y,ie)=>{const pe=ie===C,ke=P[ie],ve=ne.grid.size*(pe?ne.activeState.scale:1),We=()=>{if(ne.fit!=="fit")return{};if(!ke)return R.direction==="horiz"?{height:y.scalingValue(ve,o)}:{width:y.scalingValue(ve,o)};const ae=ke.width/ke.height;if(R.direction==="horiz"){const xe=ve,Ae=xe*ae;return{width:y.scalingValue(Ae,o),height:y.scalingValue(xe,o)}}else{const xe=ve,Ae=xe/ae;return{width:y.scalingValue(xe,o),height:y.scalingValue(Ae,o)}}};return a.jsx("button",{className:J.thumbItem,style:{...R.direction==="horiz"&&ne.fit!=="fit"?{height:y.scalingValue(ve,o)}:{},...R.direction==="vert"&&ne.fit!=="fit"?{width:y.scalingValue(ve,o)}:{},...ne.fit==="cover"?{width:y.scalingValue(ve,o),height:y.scalingValue(ve,o)}:{},...We(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?ne.activeState.opacity/100:ne.opacity/100,"--thumb-hover":ne.activeState.opacity/100},onClick:ae=>{var xe;ae.stopPropagation(),w(ie),(xe=$.current)==null||xe.go(ie)},onMouseEnter:()=>{var ae;ne.triggers==="hov"&&((ae=$.current)==null||ae.go(ie))},children:a.jsx("img",{src:Y.image.url,alt:Y.image.name??"",onLoad:ae=>{const xe=ae.currentTarget;xe.naturalWidth&&xe.naturalHeight&&B(Ae=>({...Ae,[ie]:{width:xe.naturalWidth,height:xe.naturalHeight}}))},style:{objectFit:ne.fit==="cover"?"cover":"contain",...ne.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ne.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Y.image.name}-${ie}`)})})})})()]})]}),document.getElementById(l))};function oi({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.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 Ac={element:Ec,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 or(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ic(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 kc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:l}){const o=!!n,c=r&&t||!t,{prefix:s}=v.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:y,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:$,buttonPadding:w,isButtonFullWidth:C,inputCorners:b,inputStroke:M,inputPadding:L,inputColor:H,inputTextColor:x,inputBorderColor:P,placeholderColor:V,buttonColor:S,buttonTextColor:E,buttonBorderColor:A,labelTextColor:F,successColor:q,errorColor:ee,fontFamily:R,inputFontSettings:W,inputFontSize:z,inputLineHeight:N,inputLetterSpacing:I,inputWordSpacing:U,inputTextAppearance:X,buttonFontSettings:Q,buttonFontSize:k,buttonLineHeight:ne,buttonLetterSpacing:h,buttonWordSpacing:te,buttonTextAppearance:me,labelFontSettings:le,labelFontSize:$e,labelLineHeight:re,labelLetterSpacing:de,labelWordSpacing:D,labelTextAppearance:O,statusFontSettings:J,statusFontSize:se,statusLineHeight:fe,statusLetterSpacing:Te,statusWordSpacing:Ce,statusTextAppearance:Le,successMessage:Ee,errorMessage:B,stateOverrides:oe}=e,_=p==="B",j=T.slice(0,Math.min(u,T.length)),K={fontSettings:{fontFamily:R,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:z??.01,lineHeight:N,letterSpacing:I??0,wordSpacing:U??0,textAppearance:X,color:x},G=vt(tt(K,t)),ie=v.scalingValue(M??0,t),pe=v.scalingValue((N??z??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),Fe={...G,borderStyle:"solid",borderRadius:p==="C"?0:v.scalingValue(b??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:v.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:v.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:v.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:v.scalingValue((L==null?void 0:L.left)??0,t),height:pe,minHeight:pe},ge={fontSettings:{fontFamily:R,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:k??.01,lineHeight:ne,letterSpacing:h??0,wordSpacing:te??0,textAppearance:me,color:E},ye=vt(tt(ge,t)),We=v.scalingValue($??0,t),ae={fontSettings:{fontFamily:R,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:$e??.01,lineHeight:re,letterSpacing:de??0,wordSpacing:D??0,textAppearance:O,color:F},be=tt(ae,t),Ae={fontSettings:{fontFamily:R,fontWeight:(J==null?void 0:J.fontWeight)??400,fontStyle:(J==null?void 0:J.fontStyle)??"normal"},fontSize:se??.01,lineHeight:fe,letterSpacing:Te??0,wordSpacing:Ce??0,textAppearance:Le,color:q},Re=vt(tt(Ae,t)),Oe=v.buildColorVars(s,{inputColor:H,inputTextColor:x,inputBorderColor:P,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:S,buttonTextColor:E,buttonBorderColor:A,labelTextColor:F,successColor:q,errorColor:ee},Rc,Fc,oe),[ot,gt]=d.useState(()=>Object.fromEntries(j.map(Se=>[Se.name,""]))),[ht,$t]=d.useState("idle"),[Ke,Ue]=d.useState(null),Je=l==="success"?"success":l==="error"?"error":ht,ve=l==="error"?B:Ke,Be=l==="filled",ze=d.useMemo(()=>{if(!Be)return ot;let Se=null;for(const et of j)(ot[et.name]??"").trim().length>0||(Se=Se??{...ot},Se[et.name]="Filled");return Se??ot},[ot,Be,j]),Ye=Je==="error"?v.getFormFieldValidationError(j,ze):null,Et=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),Yt=i==null?void 0:i.submitUrl,sn=(Se,et)=>{gt(Ge=>({...Ge,[Se]:et}))},An=async Se=>{if(Se.preventDefault(),!c)return;const et=Object.fromEntries(j.map(Ve=>{var lt;return[Ve.name,((lt=ot[Ve.name])==null?void 0:lt.trim())??""]}).filter(([,Ve])=>Ve));if(!Yt){$t("error"),Ue("No integrations were found for this form.");return}if(Object.keys(et).length===0)return;const Ge=v.getFormFieldValidationError(j,ot);if(Ge){$t("error"),Ue(Ge);return}$t("submitting"),Ue(null);try{const Ve=await fetch(Yt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(et)});if(!Ve.ok){const lt=await Ve.text();throw new Error(lt||`Request failed: ${Ve.status}`)}$t("success"),gt(Object.fromEntries(j.map(lt=>[lt.name,""])))}catch(Ve){$t("error"),Ue(Ve instanceof Error?Ve.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${Et}`.trim(),style:Oe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ic(s)}}),a.jsxs("form",{onSubmit:An,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:j.map((Se,et)=>a.jsxs(d.Fragment,{children:[et>0&&a.jsx("div",{"data-controls":o?"fieldsGap":void 0,className:o?`${s}-control`:void 0,style:{height:v.scalingValue(m??0,t)}}),a.jsxs("div",{className:`${s}-field-group${_?` ${s}-labeled`:""}`,children:[_&&a.jsx("span",{className:`${s}-field-label`,style:be?{...be,lineHeight:be.fontSize}:void 0,children:Se.label||Se.name}),Se.type==="textarea"?a.jsx("textarea",{name:Se.name,autoComplete:"off",value:ze[Se.name]??"",onChange:Ge=>sn(Se.name,Ge.target.value),placeholder:Se.placeholder,className:`${s}-input`,style:Fe,rows:1,"data-filled":Be||(ze[Se.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Se.type==="phone"?"tel":Se.type==="email"?"email":"text",name:Se.name,autoComplete:"off",value:ze[Se.name]??"",onChange:Ge=>sn(Se.name,Ge.target.value),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${s}-input`,style:Fe,"data-filled":Be||(ze[Se.name]??"").trim().length>0})]})]},et))}),a.jsx("div",{"data-controls":o?"gap":void 0,className:o?`${s}-control`:void 0,style:{height:v.scalingValue(f??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:v.scalingValue(g??0,t),borderWidth:We,paddingTop:v.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:v.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:v.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:v.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:c?"auto":void 0,...ye,...C?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:C?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:ht==="submitting"?"...":y})})})]}),Je==="success"&&a.jsx("p",{className:`${s}-success`,style:{...Re},children:Ee}),Je==="error"&&a.jsx("p",{className:`${s}-error`,style:{...Re},role:"alert",children:Ye??ve??B})]})}const Rc={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"},Fc=["hover","focus","filled","success","error"],Wc=`import React, { useMemo, useState } from 'react';
158
+ `}function Rc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:l}){const o=!!n,c=r&&t||!t,{prefix:s}=y.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:T=[],buttonLabel:x,gap:f,fieldsGap:m,buttonCorners:g,buttonStroke:C,buttonPadding:w,isButtonFullWidth:S,inputCorners:v,inputStroke:M,inputPadding:L,inputColor:N,inputTextColor:b,inputBorderColor:P,placeholderColor:B,buttonColor:$,buttonTextColor:E,buttonBorderColor:A,labelTextColor:F,successColor:j,errorColor:te,fontFamily:k,inputFontSettings:W,inputFontSize:D,inputLineHeight:H,inputLetterSpacing:I,inputWordSpacing:K,inputTextAppearance:Q,buttonFontSettings:Z,buttonFontSize:R,buttonLineHeight:ne,buttonLetterSpacing:h,buttonWordSpacing:ee,buttonTextAppearance:ge,labelFontSettings:le,labelFontSize:be,labelLineHeight:re,labelLetterSpacing:de,labelWordSpacing:V,labelTextAppearance:U,statusFontSettings:G,statusFontSize:se,statusLineHeight:fe,statusLetterSpacing:Te,statusWordSpacing:Se,statusTextAppearance:Le,successMessage:Ee,errorMessage:O,stateOverrides:oe}=e,_=p==="B",z=T.slice(0,Math.min(u,T.length)),q={fontSettings:{fontFamily:k,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:D??.01,lineHeight:H,letterSpacing:I??0,wordSpacing:K??0,textAppearance:Q,color:b},Y=yt(Je(q,t)),ie=y.scalingValue(M??0,t),pe=y.scalingValue((H??D??.01)+((L==null?void 0:L.top)??0)+((L==null?void 0:L.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),ke={...Y,borderStyle:"solid",borderRadius:p==="C"?0:y.scalingValue(v??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ie,borderLeftWidth:0}:{borderWidth:ie},paddingTop:y.scalingValue((L==null?void 0:L.top)??0,t),paddingRight:y.scalingValue((L==null?void 0:L.right)??0,t),paddingBottom:y.scalingValue((L==null?void 0:L.bottom)??0,t),paddingLeft:y.scalingValue((L==null?void 0:L.left)??0,t),height:pe,minHeight:pe},ye={fontSettings:{fontFamily:k,fontWeight:(Z==null?void 0:Z.fontWeight)??400,fontStyle:(Z==null?void 0:Z.fontStyle)??"normal"},fontSize:R??.01,lineHeight:ne,letterSpacing:h??0,wordSpacing:ee??0,textAppearance:ge,color:E},ve=yt(Je(ye,t)),We=y.scalingValue(C??0,t),ae={fontSettings:{fontFamily:k,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:be??.01,lineHeight:re,letterSpacing:de??0,wordSpacing:V??0,textAppearance:U,color:F},xe=Je(ae,t),Ae={fontSettings:{fontFamily:k,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:se??.01,lineHeight:fe,letterSpacing:Te??0,wordSpacing:Se??0,textAppearance:Le,color:j},Fe=yt(Je(Ae,t)),Ve=y.buildColorVars(s,{inputColor:N,inputTextColor:b,inputBorderColor:P,placeholderColor:B!=null&&B.trim()?B:"#cccccc",buttonColor:$,buttonTextColor:E,buttonBorderColor:A,labelTextColor:F,successColor:j,errorColor:te},kc,Fc,oe),[nt,pt]=d.useState(()=>Object.fromEntries(z.map($e=>[$e.name,""]))),[mt,xt]=d.useState("idle"),[_t,gt]=d.useState(null),je=l==="success"?"success":l==="error"?"error":mt,me=l==="error"?O:_t,He=l==="filled",Be=d.useMemo(()=>{if(!He)return nt;let $e=null;for(const Ze of z)(nt[Ze.name]??"").trim().length>0||($e=$e??{...nt},$e[Ze.name]="Filled");return $e??nt},[nt,He,z]),Ue=je==="error"?y.getFormFieldValidationError(z,Be):null,wt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),Tt=i==null?void 0:i.submitUrl,sn=($e,Ze)=>{pt(Ge=>({...Ge,[$e]:Ze}))},An=async $e=>{if($e.preventDefault(),!c)return;const Ze=Object.fromEntries(z.map(De=>{var at;return[De.name,((at=nt[De.name])==null?void 0:at.trim())??""]}).filter(([,De])=>De));if(!Tt){xt("error"),gt("No integrations were found for this form.");return}if(Object.keys(Ze).length===0)return;const Ge=y.getFormFieldValidationError(z,nt);if(Ge){xt("error"),gt(Ge);return}xt("submitting"),gt(null);try{const De=await fetch(Tt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ze)});if(!De.ok){const at=await De.text();throw new Error(at||`Request failed: ${De.status}`)}xt("success"),pt(Object.fromEntries(z.map(at=>[at.name,""])))}catch(De){xt("error"),gt(De instanceof Error?De.message:"Something went wrong")}};return a.jsxs("div",{className:`${s}-wrapper ${s}-type-${p} ${wt}`.trim(),style:Ve,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ic(s)}}),a.jsxs("form",{onSubmit:An,className:`${s}-form`,children:[a.jsx("div",{className:`${s}-fields`,children:z.map(($e,Ze)=>a.jsxs(d.Fragment,{children:[Ze>0&&a.jsx("div",{"data-controls":o?"fieldsGap":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(m??0,t)}}),a.jsxs("div",{className:`${s}-field-group${_?` ${s}-labeled`:""}`,children:[_&&a.jsx("span",{className:`${s}-field-label`,style:xe?{...xe,lineHeight:xe.fontSize}:void 0,children:$e.label||$e.name}),$e.type==="textarea"?a.jsx("textarea",{name:$e.name,autoComplete:"off",value:Be[$e.name]??"",onChange:Ge=>sn($e.name,Ge.target.value),placeholder:$e.placeholder,className:`${s}-input`,style:ke,rows:1,"data-filled":He||(Be[$e.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:$e.type==="phone"?"tel":$e.type==="email"?"email":"text",name:$e.name,autoComplete:"off",value:Be[$e.name]??"",onChange:Ge=>sn($e.name,Ge.target.value),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${s}-input`,style:ke,"data-filled":He||(Be[$e.name]??"").trim().length>0})]})]},Ze))}),a.jsx("div",{"data-controls":o?"gap":void 0,className:o?`${s}-control`:void 0,style:{height:y.scalingValue(f??0,t)}}),a.jsx("div",{className:`${s}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${s}-button`,style:{borderStyle:"solid",borderRadius:y.scalingValue(g??0,t),borderWidth:We,paddingTop:y.scalingValue((w==null?void 0:w.top)??0,t),paddingRight:y.scalingValue((w==null?void 0:w.right)??0,t),paddingBottom:y.scalingValue((w==null?void 0:w.bottom)??0,t),paddingLeft:y.scalingValue((w==null?void 0:w.left)??0,t),pointerEvents:c?"auto":void 0,...ve,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${s}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:mt==="submitting"?"...":x})})})]}),je==="success"&&a.jsx("p",{className:`${s}-success`,style:{...Fe},children:Ee}),je==="error"&&a.jsx("p",{className:`${s}-error`,style:{...Fe},role:"alert",children:Ue??me??O})]})}const kc={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"},Fc=["hover","focus","filled","success","error"],Wc=`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';
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
789
789
  };
790
790
 
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
792
- `,Mc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Nc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...ir.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...ir.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...ir.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Mc,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Hc],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Bc={element:kc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:Nc,sourceCode:Wc};function ar(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Oc(e){return`
792
+ `,Mc=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],ir={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Nc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Hc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...ir.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...ir.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...ir.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...ir.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Mc,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Nc],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Oc={element:Rc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:Hc,sourceCode:Wc};function ar(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Bc(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -980,7 +980,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
980
980
  font-size: ${ar(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const Vc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:l}=v.useScopedStyles(),o=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:y,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:$,inputTextAppearance:w,buttonFontSettings:C,buttonFontSize:b,buttonLineHeight:M,buttonLetterSpacing:L,buttonWordSpacing:H,buttonTextAppearance:x,statusFontSettings:P,statusFontSize:V,statusLineHeight:S,statusLetterSpacing:E,statusWordSpacing:A,statusTextAppearance:F,iconMaxWidth:q,minHeight:ee,corners:R,stroke:W,stateOverrides:z,inputPadding:N,buttonPadding:I,successMessage:U="Thanks for subscribing!",errorMessage:X="Please, fill all required fields."}=e,Q=c.slice(0,Math.min(u,c.length)),[k,ne]=d.useState(()=>Object.fromEntries(Q.map(ae=>[ae.name,""]))),[h,te]=d.useState("idle"),[me,le]=d.useState(null),$e=i==="success"?"success":i==="error"?"error":h,re=i==="error"?X:me,de=i==="filled",D=d.useMemo(()=>{if(!de)return k;let ae=null;for(const be of Q)(k[be.name]??"").trim().length>0||(ae=ae??{...k},ae[be.name]="Filled");return ae??k},[de,k,Q]),O=$e==="error"?v.getFormFieldValidationError(Q,D):null,J=i&&i!=="default"?`${l}-state-${i}`:"",se=Q.some(ae=>(D[ae.name]??"").trim().length>0),fe=J!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${J} ${fe}`.trim(),Ce=r==null?void 0:r.submitUrl,Le=p??"",Ee=(s==null?void 0:s.icon)??"",B=(s==null?void 0:s.mode)==="On",oe=Le||"Submit",_={fontSettings:{fontFamily:T,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:f??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:$??0,textAppearance:w,color:e.inputTextColor??"#111111"},j={fontSettings:{fontFamily:T,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:M,letterSpacing:L??0,wordSpacing:H??0,textAppearance:x,color:e.buttonTextColor??"#ffffff"},K={fontSettings:{fontFamily:T,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:V??.01,lineHeight:S,letterSpacing:E??0,wordSpacing:A??0,textAppearance:F,color:e.successColor??"#22c55e"},G=vt(tt(_,t)),ie=vt(tt(j,t)),pe=vt(tt(K,t)),Fe=v.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(j==null?void 0:j.color)??"#ffffff"},Dc,zc,z),ge={borderRadius:v.scalingValue(R,t),borderWidth:v.scalingValue(W,t),borderStyle:"solid"},ye={borderLeftWidth:v.scalingValue(W,t)},We=async ae=>{if(ae.preventDefault(),!o)return;const be=Object.fromEntries(Q.map(Re=>{var Oe;return[Re.name,((Oe=k[Re.name])==null?void 0:Oe.trim())??""]}).filter(([,Re])=>Re));if(!Ce){te("error"),le("No integrations were found for this form.");return}if(Object.keys(be).length===0)return;const Ae=v.getFormFieldValidationError(Q,k);if(Ae){te("error"),le(Ae);return}te("submitting"),le(null);try{const Re=await fetch(Ce,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)});if(!Re.ok){const Oe=await Re.text();throw new Error(Oe||`Request failed: ${Re.status}`)}te("success"),ne(Object.fromEntries(Q.map(Oe=>[Oe.name,""])))}catch(Re){te("error"),le(Re instanceof Error?Re.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:Fe,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Oc(l)}}),a.jsxs("form",{onSubmit:We,className:`${l}-form`,style:{...ge,height:v.scalingValue(ee,t),minHeight:v.scalingValue(ee,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Q.map(ae=>a.jsx("input",{type:ae.type==="email"?"email":ae.type==="phone"?"tel":"text",name:ae.name,autoComplete:"off",value:D[ae.name]??"",onChange:be=>ne(Ae=>({...Ae,[ae.name]:be.target.value})),placeholder:ae.placeholder,required:ae.isRequired??ae.type==="email",className:`${l}-input`,style:{...G,paddingRight:v.scalingValue(N.right,t),paddingLeft:v.scalingValue(N.left,t),paddingTop:v.scalingValue(N.top,t),paddingBottom:v.scalingValue(N.bottom,t)}},ae.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:o?"submit":"button",className:`${l}-submitBtn`,"aria-label":oe,style:{...ie,...ye,paddingRight:v.scalingValue(I.right,t),paddingLeft:v.scalingValue(I.left,t),paddingTop:v.scalingValue(I.top,t),paddingBottom:v.scalingValue(I.bottom,t),pointerEvents:o?"auto":void 0},children:h==="submitting"?"...":B?Ee&&a.jsx(Wt,{url:Ee,className:`${l}-submitBtnIcon`,style:{maxWidth:v.scalingValue(q??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Le})})]}),$e==="success"&&a.jsx("p",{className:`${l}-success`,style:{...pe},children:U}),$e==="error"&&a.jsx("p",{className:`${l}-error`,style:{...pe},role:"alert",children:O??re??X})]})},Dc={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"},zc=["hover","focus","filled","success","error"],jc=`import React, { useMemo, useState } from 'react';\r
983
+ `}const Vc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:l}=y.useScopedStyles(),o=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:s,buttonLabel:p,fieldsToShow:u=1,fontFamily:T,inputFontSettings:x,inputFontSize:f,inputLineHeight:m,inputLetterSpacing:g,inputWordSpacing:C,inputTextAppearance:w,buttonFontSettings:S,buttonFontSize:v,buttonLineHeight:M,buttonLetterSpacing:L,buttonWordSpacing:N,buttonTextAppearance:b,statusFontSettings:P,statusFontSize:B,statusLineHeight:$,statusLetterSpacing:E,statusWordSpacing:A,statusTextAppearance:F,iconMaxWidth:j,minHeight:te,corners:k,stroke:W,stateOverrides:D,inputPadding:H,buttonPadding:I,successMessage:K="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,Z=c.slice(0,Math.min(u,c.length)),[R,ne]=d.useState(()=>Object.fromEntries(Z.map(ae=>[ae.name,""]))),[h,ee]=d.useState("idle"),[ge,le]=d.useState(null),be=i==="success"?"success":i==="error"?"error":h,re=i==="error"?Q:ge,de=i==="filled",V=d.useMemo(()=>{if(!de)return R;let ae=null;for(const xe of Z)(R[xe.name]??"").trim().length>0||(ae=ae??{...R},ae[xe.name]="Filled");return ae??R},[de,R,Z]),U=be==="error"?y.getFormFieldValidationError(Z,V):null,G=i&&i!=="default"?`${l}-state-${i}`:"",se=Z.some(ae=>(V[ae.name]??"").trim().length>0),fe=G!==`${l}-state-filled`&&se?`${l}-state-filled`:"",Te=`${G} ${fe}`.trim(),Se=r==null?void 0:r.submitUrl,Le=p??"",Ee=(s==null?void 0:s.icon)??"",O=(s==null?void 0:s.mode)==="On",oe=Le||"Submit",_={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:f??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:C??0,textAppearance:w,color:e.inputTextColor??"#111111"},z={fontSettings:{fontFamily:T,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:M,letterSpacing:L??0,wordSpacing:N??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},q={fontSettings:{fontFamily:T,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:B??.01,lineHeight:$,letterSpacing:E??0,wordSpacing:A??0,textAppearance:F,color:e.successColor??"#22c55e"},Y=yt(Je(_,t)),ie=yt(Je(z,t)),pe=yt(Je(q,t)),ke=y.buildColorVars(l,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(z==null?void 0:z.color)??"#ffffff"},Dc,zc,D),ye={borderRadius:y.scalingValue(k,t),borderWidth:y.scalingValue(W,t),borderStyle:"solid"},ve={borderLeftWidth:y.scalingValue(W,t)},We=async ae=>{if(ae.preventDefault(),!o)return;const xe=Object.fromEntries(Z.map(Fe=>{var Ve;return[Fe.name,((Ve=R[Fe.name])==null?void 0:Ve.trim())??""]}).filter(([,Fe])=>Fe));if(!Se){ee("error"),le("No integrations were found for this form.");return}if(Object.keys(xe).length===0)return;const Ae=y.getFormFieldValidationError(Z,R);if(Ae){ee("error"),le(Ae);return}ee("submitting"),le(null);try{const Fe=await fetch(Se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(xe)});if(!Fe.ok){const Ve=await Fe.text();throw new Error(Ve||`Request failed: ${Fe.status}`)}ee("success"),ne(Object.fromEntries(Z.map(Ve=>[Ve.name,""])))}catch(Fe){ee("error"),le(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${l}-wrapper ${Te}`.trim(),style:ke,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Bc(l)}}),a.jsxs("form",{onSubmit:We,className:`${l}-form`,style:{...ye,height:y.scalingValue(te,t),minHeight:y.scalingValue(te,t)},children:[a.jsx("div",{className:`${l}-inputWrap ${l}-overlayAnchor`,style:{flex:1,minWidth:0},children:Z.map(ae=>a.jsx("input",{type:ae.type==="email"?"email":ae.type==="phone"?"tel":"text",name:ae.name,autoComplete:"off",value:V[ae.name]??"",onChange:xe=>ne(Ae=>({...Ae,[ae.name]:xe.target.value})),placeholder:ae.placeholder,required:ae.isRequired??ae.type==="email",className:`${l}-input`,style:{...Y,paddingRight:y.scalingValue(H.right,t),paddingLeft:y.scalingValue(H.left,t),paddingTop:y.scalingValue(H.top,t),paddingBottom:y.scalingValue(H.bottom,t)}},ae.name))}),a.jsx("div",{className:`${l}-overlayAnchor`,children:a.jsx("button",{type:o?"submit":"button",className:`${l}-submitBtn`,"aria-label":oe,style:{...ie,...ve,paddingRight:y.scalingValue(I.right,t),paddingLeft:y.scalingValue(I.left,t),paddingTop:y.scalingValue(I.top,t),paddingBottom:y.scalingValue(I.bottom,t),pointerEvents:o?"auto":void 0},children:h==="submitting"?"...":O?Ee&&a.jsx(Mt,{url:Ee,className:`${l}-submitBtnIcon`,style:{maxWidth:y.scalingValue(j??0,t)},fill:`var(--${l}-button-text-color)`,hoverFill:`var(--${l}-button-text-color)`}):Le})})]}),be==="success"&&a.jsx("p",{className:`${l}-success`,style:{...pe},children:K}),be==="error"&&a.jsx("p",{className:`${l}-error`,style:{...pe},role:"alert",children:U??re??Q})]})},Dc={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"},zc=["hover","focus","filled","success","error"],jc=`import React, { useMemo, useState } from 'react';\r
984
984
  import { CommonComponentProps } from '../props';\r
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1689
1689
  .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const Qc=30,Zc=20,jr=2,Jc=2,ed=(e,t)=>Array.from({length:t},()=>e).flat(),td=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},nd=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>td(r,e))},rd=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:l,isFirstSet:o,scaled:c,onFirstSetImageDone:s})=>{var x,P,V;const p=d.useRef(null);d.useLayoutEffect(()=>{if(!o)return;const S=p.current;S!=null&&S.complete&&(s==null||s())},[o,(x=e.image)==null?void 0:x.url,s]);const u=n.display==="Cover",T=n.ratioValue??"1:1",y=n.reversed??!1,[f,m]=T.split(":").map(Number),w=(y?m:f)/(y?f:m);let C=r,b=C/w;b>i&&(b=i,C=b*w);const M=c(C),L=c(b),H=((P=e.image)==null?void 0:P.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((V=e.image)==null?void 0:V.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:o?s:void 0,onError:o?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:H&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:ke(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:H}):H})})},od=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=v.useScopedStyles(),o=d.useMemo(()=>Xc(l),[l]),{speed:c,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:y,imageFit:f,hoverEffect:m}=e,g=!!i,$=!n||!!r,w=$&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,C=n?!!r:!0,M=((t==null?void 0:t.length)??0)>0&&(C||!!n),L=Math.max(0,c)*Qc,H=O=>v.scalingValue(O,n??!1),x=d.useRef(null),P=d.useRef(null),V=d.useRef(null),[S,E]=d.useState(0),[A,F]=d.useState(0),q=C&&p==="on",[ee,R]=d.useState(!1),[W,z]=d.useState({}),N=d.useRef(W);N.current=W;const I=d.useRef(null),U=d.useRef(0),X=d.useRef(null),Q=d.useMemo(()=>(t??[]).map(O=>{var J;return((J=O.image)==null?void 0:J.url)??""}).join("\0"),[t]),[k,ne]=d.useState(jr),h=d.useMemo(()=>{const O=t??[];return!C||O.length===0?O:ed(O,k)},[t,C,k]),te=d.useMemo(()=>h.filter(O=>{var J;return!!((J=O.image)!=null&&J.url)}).length,[h]),me=M?Jc:1;d.useLayoutEffect(()=>{U.current=0,z({}),I.current=null,ne(jr),E(0)},[Q]),d.useEffect(()=>{if(!$||m!=="randomize")return;const O=x.current;if(!O)return;const J=Ce=>{z(Le=>{let Ee=null;for(const B of Ce)B in Le&&(nd(O,B)||(Ee||(Ee={...Le}),delete Ee[B]));return Ee??Le})},se=new IntersectionObserver(Ce=>{const Le=new Set;for(const Ee of Ce){const B=Ee.target.dataset.marqueeItemIndex,oe=B!==void 0?Number(B):NaN;Number.isNaN(oe)||Le.add(oe)}Le.size>0&&J(Le)},{root:O,threshold:0});Object.keys(W).forEach(Ce=>{const Le=Number(Ce);O.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(Ee=>se.observe(Ee))});let fe=0;const Te=()=>{const Ce=Object.keys(N.current);Ce.length!==0&&(J(Ce.map(Number)),fe=requestAnimationFrame(Te))};return Object.keys(N.current).length>0&&(fe=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(fe),se.disconnect()}},[m,W,$]),d.useLayoutEffect(()=>{if(!M)return;const O=x.current,J=V.current;if(!O||!J)return;let se=0;const fe=()=>{const Le=O.getBoundingClientRect().width,Ee=J.getBoundingClientRect().width,B=I.current,oe=typeof B=="number"&&Math.abs(B-Ee)<=.25;if(I.current=Ee,C&&Ee>0&&k>0){const _=Ee/k;if(_>0&&Le>0){const j=Math.max(jr,Math.ceil(Le/_)+1);if(j!==k){ne(j);return}}}if(Ee>0&&S<=0){E(Ee);return}oe&&Ee!==S?E(Ee):!oe&&S<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(fe))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(fe)};X.current=Te,Te();const Ce=new ResizeObserver(Te);return Ce.observe(O),Ce.observe(J),()=>{X.current=null,cancelAnimationFrame(se),Ce.disconnect()}},[C,M,S,Q,k]),d.useLayoutEffect(()=>{const O=P.current;if(!M||!O)return;const J=S>0?S:0,se=J>0&&L>0?J/L*1e3:0,fe=`${Math.max(0,se)/1e3}s`;O.style.setProperty("--marquee-distance",`${J}px`),O.style.setProperty("--marquee-duration",fe)},[C,M,L,S]),d.useLayoutEffect(()=>{if(!M){F(0);return}if(S<=0){F(0);return}const O=P.current;if(!O)return;const J=()=>{const fe=O.getBoundingClientRect().height;F(fe>0?fe:0)};J();const se=new ResizeObserver(J);return se.observe(O),()=>se.disconnect()},[M,me,h,n,u,T,y,S,f,W]);const le=()=>{q&&R(!0)},$e=()=>{q&&R(!1)},re=d.useCallback(()=>{var O;U.current=Math.min(te,U.current+1),(O=X.current)==null||O.call(X)},[te]),de=d.useCallback((O,J)=>{z(se=>{const fe=se[O]??J,Te=(t??[]).filter(Le=>Le!==fe);if(Te.length===0)return se;const Ce=Te[Math.floor(Math.random()*Te.length)];return{...se,[O]:Ce}})},[t]),D=(O,J,se,fe)=>{const Te=$&&m==="randomize"&&f.display==="Cover"?W[se]??O:O,Ce=`max(${H(u)}, ${Zc}px)`,Le=`calc(-0.5 * (${Ce} + ${H(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:$&&m==="randomize"&&f.display==="Cover"?()=>de(se,O):void 0,children:[a.jsx(rd,{item:Te,prefix:l,imageFit:f,imageMaxWidth:T,imageMaxHeight:y,imageHoverClass:w,isEditor:n,isFirstSet:fe,scaled:H,onFirstSetImageDone:re}),g&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Le,width:Ce,height:"100%"}})]},`${J}-${se}`)};if(M){const O=C?q&&ee?"paused":"running":"paused";return a.jsxs("div",{ref:x,className:ke(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:S>0&&A>0?{height:A}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{ref:P,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:le,onMouseLeave:$e,style:{"--marquee-play-state":O},children:Array.from({length:me},(J,se)=>a.jsx("div",{ref:se===0?V:void 0,className:ke(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:H(u),paddingRight:H(u)},"aria-hidden":se>0,children:h.map((fe,Te)=>D(fe,se,Te,se===0))},`set-${se}`))},"marquee-track")]})}return a.jsxs("div",{ref:x,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{className:ke(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:H(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((O,J)=>D(O,0,J))},"marquee-static")]})},id=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1692
+ `}const Qc=30,Zc=20,jr=2,Jc=2,ed=(e,t)=>Array.from({length:t},()=>e).flat(),td=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},nd=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>td(r,e))},rd=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:l,isFirstSet:o,scaled:c,onFirstSetImageDone:s})=>{var b,P,B;const p=d.useRef(null);d.useLayoutEffect(()=>{if(!o)return;const $=p.current;$!=null&&$.complete&&(s==null||s())},[o,(b=e.image)==null?void 0:b.url,s]);const u=n.display==="Cover",T=n.ratioValue??"1:1",x=n.reversed??!1,[f,m]=T.split(":").map(Number),w=(x?m:f)/(x?f:m);let S=r,v=S/w;v>i&&(v=i,S=v*w);const M=c(S),L=c(v),N=((P=e.image)==null?void 0:P.url)&&a.jsx("img",{ref:p,src:e.image.url,alt:((B=e.image)==null?void 0:B.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:o?s:void 0,onError:o?s:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:L,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:N&&e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Re(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:N}):N})})},od=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=d.useMemo(()=>Xc(l),[l]),{speed:c,direction:s,pauseOnHover:p,gap:u,imageMaxWidth:T,imageMaxHeight:x,imageFit:f,hoverEffect:m}=e,g=!!i,C=!n||!!r,w=C&&m!=="off"&&m!=="randomize"?`${l}-image-hover-${m}`:void 0,S=n?!!r:!0,M=((t==null?void 0:t.length)??0)>0&&(S||!!n),L=Math.max(0,c)*Qc,N=U=>y.scalingValue(U,n??!1),b=d.useRef(null),P=d.useRef(null),B=d.useRef(null),[$,E]=d.useState(0),[A,F]=d.useState(0),j=S&&p==="on",[te,k]=d.useState(!1),[W,D]=d.useState({}),H=d.useRef(W);H.current=W;const I=d.useRef(null),K=d.useRef(0),Q=d.useRef(null),Z=d.useMemo(()=>(t??[]).map(U=>{var G;return((G=U.image)==null?void 0:G.url)??""}).join("\0"),[t]),[R,ne]=d.useState(jr),h=d.useMemo(()=>{const U=t??[];return!S||U.length===0?U:ed(U,R)},[t,S,R]),ee=d.useMemo(()=>h.filter(U=>{var G;return!!((G=U.image)!=null&&G.url)}).length,[h]),ge=M?Jc:1;d.useLayoutEffect(()=>{K.current=0,D({}),I.current=null,ne(jr),E(0)},[Z]),d.useEffect(()=>{if(!C||m!=="randomize")return;const U=b.current;if(!U)return;const G=Se=>{D(Le=>{let Ee=null;for(const O of Se)O in Le&&(nd(U,O)||(Ee||(Ee={...Le}),delete Ee[O]));return Ee??Le})},se=new IntersectionObserver(Se=>{const Le=new Set;for(const Ee of Se){const O=Ee.target.dataset.marqueeItemIndex,oe=O!==void 0?Number(O):NaN;Number.isNaN(oe)||Le.add(oe)}Le.size>0&&G(Le)},{root:U,threshold:0});Object.keys(W).forEach(Se=>{const Le=Number(Se);U.querySelectorAll(`[data-marquee-item-index="${Le}"]`).forEach(Ee=>se.observe(Ee))});let fe=0;const Te=()=>{const Se=Object.keys(H.current);Se.length!==0&&(G(Se.map(Number)),fe=requestAnimationFrame(Te))};return Object.keys(H.current).length>0&&(fe=requestAnimationFrame(Te)),()=>{cancelAnimationFrame(fe),se.disconnect()}},[m,W,C]),d.useLayoutEffect(()=>{if(!M)return;const U=b.current,G=B.current;if(!U||!G)return;let se=0;const fe=()=>{const Le=U.getBoundingClientRect().width,Ee=G.getBoundingClientRect().width,O=I.current,oe=typeof O=="number"&&Math.abs(O-Ee)<=.25;if(I.current=Ee,S&&Ee>0&&R>0){const _=Ee/R;if(_>0&&Le>0){const z=Math.max(jr,Math.ceil(Le/_)+1);if(z!==R){ne(z);return}}}if(Ee>0&&$<=0){E(Ee);return}oe&&Ee!==$?E(Ee):!oe&&$<=0&&(cancelAnimationFrame(se),se=requestAnimationFrame(fe))},Te=()=>{cancelAnimationFrame(se),se=requestAnimationFrame(fe)};Q.current=Te,Te();const Se=new ResizeObserver(Te);return Se.observe(U),Se.observe(G),()=>{Q.current=null,cancelAnimationFrame(se),Se.disconnect()}},[S,M,$,Z,R]),d.useLayoutEffect(()=>{const U=P.current;if(!M||!U)return;const G=$>0?$:0,se=G>0&&L>0?G/L*1e3:0,fe=`${Math.max(0,se)/1e3}s`;U.style.setProperty("--marquee-distance",`${G}px`),U.style.setProperty("--marquee-duration",fe)},[S,M,L,$]),d.useLayoutEffect(()=>{if(!M){F(0);return}if($<=0){F(0);return}const U=P.current;if(!U)return;const G=()=>{const fe=U.getBoundingClientRect().height;F(fe>0?fe:0)};G();const se=new ResizeObserver(G);return se.observe(U),()=>se.disconnect()},[M,ge,h,n,u,T,x,$,f,W]);const le=()=>{j&&k(!0)},be=()=>{j&&k(!1)},re=d.useCallback(()=>{var U;K.current=Math.min(ee,K.current+1),(U=Q.current)==null||U.call(Q)},[ee]),de=d.useCallback((U,G)=>{D(se=>{const fe=se[U]??G,Te=(t??[]).filter(Le=>Le!==fe);if(Te.length===0)return se;const Se=Te[Math.floor(Math.random()*Te.length)];return{...se,[U]:Se}})},[t]),V=(U,G,se,fe)=>{const Te=C&&m==="randomize"&&f.display==="Cover"?W[se]??U:U,Se=`max(${N(u)}, ${Zc}px)`,Le=`calc(-0.5 * (${Se} + ${N(u)}))`;return a.jsxs("div",{className:`${l}-marquee-card`,"data-marquee-item-index":se,onMouseEnter:C&&m==="randomize"&&f.display==="Cover"?()=>de(se,U):void 0,children:[a.jsx(rd,{item:Te,prefix:l,imageFit:f,imageMaxWidth:T,imageMaxHeight:x,imageHoverClass:w,isEditor:n,isFirstSet:fe,scaled:N,onFirstSetImageDone:re}),g&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${l}-gap-control`,style:{position:"absolute",top:0,right:Le,width:Se,height:"100%"}})]},`${G}-${se}`)};if(M){const U=S?j&&te?"paused":"running":"paused";return a.jsxs("div",{ref:b,className:Re(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Marquee",style:$>0&&A>0?{height:A}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{ref:P,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:le,onMouseLeave:be,style:{"--marquee-play-state":U},children:Array.from({length:ge},(G,se)=>a.jsx("div",{ref:se===0?B:void 0,className:Re(`${l}-marquee-row`,`${l}-marquee-set`),style:{gap:N(u),paddingRight:N(u)},"aria-hidden":se>0,children:h.map((fe,Te)=>V(fe,se,Te,se===0))},`set-${se}`))},"marquee-track")]})}return a.jsxs("div",{ref:b,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:o}}),a.jsx("div",{className:Re(`${l}-marquee-row`,`${l}-marquee-static`),style:{gap:N(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((U,G)=>V(U,0,G))},"marquee-static")]})},id=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
2407
2407
  pointer-events: auto;
2408
2408
  z-index: 10;
2409
2409
  }
2410
- `}const ld=30,ai=2,cd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=v.useScopedStyles(),{align:o,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:y,stroke:f,strokeColor:m,bgColor:g,padding:$,logoMarginTop:w,logoWidth:C,logoHeight:b,captionMarginTop:M}=e,L=!!i,H=((t==null?void 0:t.length)??0)>0,x=c>0&&(!n||r),P=H&&(x||n),V=Math.max(0,c)*ld,S=_=>v.scalingValue(_,n??!1),E=d.useRef(null),A=d.useRef(null),F=d.useRef(null),[q,ee]=d.useState(0),[R,W]=d.useState(0),[z,N]=d.useState(0),I=x&&p==="on",[U,X]=d.useState(!1),Q=d.useRef(null),[k,ne]=d.useState(0),[h,te]=d.useState(0),me=d.useRef(null),le=_=>{var K,G,ie,pe,Fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${_}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((G=e==null?void 0:e[`${_}FontSettings`])==null?void 0:G.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((Fe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:Fe.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"}},$e=le("text"),re=le("caption"),de=d.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var j,K;return(((j=_.text)==null?void 0:j.length)??0)>0||(((K=_.caption)==null?void 0:K.length)??0)>0}),[t]),D=d.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:R<=0||q<=0?ai:Math.max(ai,Math.ceil(q/R)+1),[P,t==null?void 0:t.length,R,q]);d.useLayoutEffect(()=>{if(!P)return;const _=E.current,j=F.current;if(!_||!j)return;let K=0;const G=()=>{const Fe=_.getBoundingClientRect().width,ge=j.getBoundingClientRect().width,ye=me.current,We=typeof ye=="number"&&Math.abs(ye-ge)<=.25;if(me.current=ge,ee(Fe),typeof ge=="number"&&ge>0&&R<=0){W(ge);return}We&&ge!==R?W(ge):!We&&R<=0&&(cancelAnimationFrame(K),K=requestAnimationFrame(G))},ie=()=>{cancelAnimationFrame(K),K=requestAnimationFrame(G)};ie();const pe=new ResizeObserver(ie);return pe.observe(_),pe.observe(j),()=>{cancelAnimationFrame(K),pe.disconnect()}},[x,P,R]),d.useLayoutEffect(()=>{const _=A.current;if(!P||!_)return;const j=R>0?R:0,K=j>0&&V>0?j/V*1e3:0,G=`${Math.max(0,K)/1e3}s`;_.style.setProperty("--marquee-distance",`${j}px`),_.style.setProperty("--marquee-duration",G)},[x,P,V,R]),d.useLayoutEffect(()=>{if(!P){N(0);return}const _=F.current,j=A.current;if(!_||!j)return;const K=()=>{let ie=0;for(let pe=0;pe<_.children.length;pe++){const ge=_.children[pe].firstElementChild;ge&&(ie=Math.max(ie,ge.offsetHeight))}ie<=0&&(ie=j.offsetHeight),N(ie>0?ie:0)};K();const G=new ResizeObserver(K);return G.observe(_),G.observe(j),()=>{G.disconnect()}},[P,D,t,n,u,T,$,f,y,C,b,k,h]);const O=()=>{I&&X(!0)},J=()=>{I&&X(!1)},se=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[o]),fe=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[o]),Te=d.useCallback((_,j,K,G)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L?G==null?void 0:G.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:S((G==null?void 0:G.marginTop)??0)}}),a.jsx("div",{...G!=null&&G.dataMeasureKind?{"data-testimonial-measure":G.dataMeasureKind}:{},style:{...tt(_,n),textAlign:fe,pointerEvents:"auto",...typeof(G==null?void 0:G.minHeightPx)=="number"&&G.minHeightPx>0?{minHeight:G.minHeightPx}:{}},children:a.jsx(Cn,{content:j})})]},K),[se,fe,n,L,l,S]),Ce=d.useCallback((_,j,K)=>{var G,ie,pe;return a.jsxs("div",{style:{padding:`${S($.top)} ${S($.right)} ${S($.bottom)} ${S($.left)}`,width:S(T+f*2),height:"100%",borderRadius:S(y),border:`${S(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:g}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:se,textAlign:fe},children:[_.text&&Te($e,_.text,"text",K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(K==null?void 0:K.textMinHeightPx)=="number"&&K.textMinHeightPx>0?{minHeightPx:K.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(K!=null&&K.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(K!=null&&K.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:S(w)}}),a.jsx("div",{style:{width:S(C),height:S(b)},children:((G=_.logo)==null?void 0:G.url)&&a.jsx("img",{src:_.logo.url,alt:((ie=_.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=_.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),_.caption&&Te(re,_.caption,"caption",{...K!=null&&K.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(K==null?void 0:K.captionMinHeightPx)=="number"&&K.captionMinHeightPx>0?{minHeightPx:K.captionMinHeightPx}:{}})]})]},j)},[g,M,re,T,y,b,w,C,se,fe,$.bottom,$.left,$.right,$.top,Te,f,m,$e,n,L,l]),Le=d.useCallback(_=>{ne(_.maxTextPx),te(_.maxCaptionPx)},[]);d.useLayoutEffect(()=>{if(!de){Le({maxTextPx:0,maxCaptionPx:0});return}const _=Q.current;if(!_)return;const j=()=>{v.readTestimonialTextMeasure(_,Le)};j();const K=new ResizeObserver(j);return K.observe(_),()=>{K.disconnect()}},[de,Le,t,Ce]);const Ee=de?{textMinHeightPx:k,captionMinHeightPx:h}:void 0,B=de?a.jsx("div",{ref:Q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,j)=>Ce(_,`measure-${j}`,{dataMeasureAttrs:!0}))}):null,oe=(_,j)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Ce(_,`card-${j}`,Ee),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${S(u)})`,width:S(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},j);if(P){const _=x?I&&U?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:ke(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...z>0?{height:z}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ii(l)}}),B,a.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:O,onMouseLeave:J,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":_},children:Array.from({length:D},(j,K)=>a.jsx("div",{ref:K===0?F:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:S(u),paddingRight:S(u)},"aria-hidden":K>0,children:t==null?void 0:t.map((G,ie)=>oe(G,`${K}-${ie}`))},`set-${K}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ii(l)}}),B,a.jsx("div",{style:{gap:S(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,j)=>oe(_,j))})]})},dd=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2410
+ `}const ld=30,ai=2,cd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),{align:o,speed:c,direction:s,pauseOnHover:p,gap:u,cardWidth:T,corners:x,stroke:f,strokeColor:m,bgColor:g,padding:C,logoMarginTop:w,logoWidth:S,logoHeight:v,captionMarginTop:M}=e,L=!!i,N=((t==null?void 0:t.length)??0)>0,b=c>0&&(!n||r),P=N&&(b||n),B=Math.max(0,c)*ld,$=_=>y.scalingValue(_,n??!1),E=d.useRef(null),A=d.useRef(null),F=d.useRef(null),[j,te]=d.useState(0),[k,W]=d.useState(0),[D,H]=d.useState(0),I=b&&p==="on",[K,Q]=d.useState(!1),Z=d.useRef(null),[R,ne]=d.useState(0),[h,ee]=d.useState(0),ge=d.useRef(null),le=_=>{var q,Y,ie,pe,ke;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${_}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((Y=e==null?void 0:e[`${_}FontSettings`])==null?void 0:Y.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((ke=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ke.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"}},be=le("text"),re=le("caption"),de=d.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var z,q;return(((z=_.text)==null?void 0:z.length)??0)>0||(((q=_.caption)==null?void 0:q.length)??0)>0}),[t]),V=d.useMemo(()=>!P||(t==null?void 0:t.length)===0?1:k<=0||j<=0?ai:Math.max(ai,Math.ceil(j/k)+1),[P,t==null?void 0:t.length,k,j]);d.useLayoutEffect(()=>{if(!P)return;const _=E.current,z=F.current;if(!_||!z)return;let q=0;const Y=()=>{const ke=_.getBoundingClientRect().width,ye=z.getBoundingClientRect().width,ve=ge.current,We=typeof ve=="number"&&Math.abs(ve-ye)<=.25;if(ge.current=ye,te(ke),typeof ye=="number"&&ye>0&&k<=0){W(ye);return}We&&ye!==k?W(ye):!We&&k<=0&&(cancelAnimationFrame(q),q=requestAnimationFrame(Y))},ie=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(Y)};ie();const pe=new ResizeObserver(ie);return pe.observe(_),pe.observe(z),()=>{cancelAnimationFrame(q),pe.disconnect()}},[b,P,k]),d.useLayoutEffect(()=>{const _=A.current;if(!P||!_)return;const z=k>0?k:0,q=z>0&&B>0?z/B*1e3:0,Y=`${Math.max(0,q)/1e3}s`;_.style.setProperty("--marquee-distance",`${z}px`),_.style.setProperty("--marquee-duration",Y)},[b,P,B,k]),d.useLayoutEffect(()=>{if(!P){H(0);return}const _=F.current,z=A.current;if(!_||!z)return;const q=()=>{let ie=0;for(let pe=0;pe<_.children.length;pe++){const ye=_.children[pe].firstElementChild;ye&&(ie=Math.max(ie,ye.offsetHeight))}ie<=0&&(ie=z.offsetHeight),H(ie>0?ie:0)};q();const Y=new ResizeObserver(q);return Y.observe(_),Y.observe(z),()=>{Y.disconnect()}},[P,V,t,n,u,T,C,f,x,S,v,R,h]);const U=()=>{I&&Q(!0)},G=()=>{I&&Q(!1)},se=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[o]),fe=d.useMemo(()=>{switch(o){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[o]),Te=d.useCallback((_,z,q,Y)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L?Y==null?void 0:Y.controlsName:void 0,"data-controls-axis":L?"y":void 0,className:L?`${l}-control`:void 0,style:{height:$((Y==null?void 0:Y.marginTop)??0)}}),a.jsx("div",{...Y!=null&&Y.dataMeasureKind?{"data-testimonial-measure":Y.dataMeasureKind}:{},style:{...Je(_,n),textAlign:fe,pointerEvents:"auto",...typeof(Y==null?void 0:Y.minHeightPx)=="number"&&Y.minHeightPx>0?{minHeight:Y.minHeightPx}:{}},children:a.jsx(Sn,{content:z})})]},q),[se,fe,n,L,l,$]),Se=d.useCallback((_,z,q)=>{var Y,ie,pe;return a.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(T+f*2),height:"100%",borderRadius:$(x),border:`${$(f)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${l}-cover`,style:{background:g}}),a.jsxs("div",{className:`${l}-elements-overlay`,style:{alignItems:se,textAlign:fe},children:[_.text&&Te(be,_.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[a.jsx("div",{"data-controls":L&&!(q!=null&&q.dataMeasureAttrs)?"logoMarginTop":void 0,className:L&&!(q!=null&&q.dataMeasureAttrs)?`${l}-control`:void 0,style:{height:$(w)}}),a.jsx("div",{style:{width:$(S),height:$(v)},children:((Y=_.logo)==null?void 0:Y.url)&&a.jsx("img",{src:_.logo.url,alt:((ie=_.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=_.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),_.caption&&Te(re,_.caption,"caption",{...q!=null&&q.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},z)},[g,M,re,T,x,v,w,S,se,fe,C.bottom,C.left,C.right,C.top,Te,f,m,be,n,L,l]),Le=d.useCallback(_=>{ne(_.maxTextPx),ee(_.maxCaptionPx)},[]);d.useLayoutEffect(()=>{if(!de){Le({maxTextPx:0,maxCaptionPx:0});return}const _=Z.current;if(!_)return;const z=()=>{y.readTestimonialTextMeasure(_,Le)};z();const q=new ResizeObserver(z);return q.observe(_),()=>{q.disconnect()}},[de,Le,t,Se]);const Ee=de?{textMinHeightPx:R,captionMinHeightPx:h}:void 0,O=de?a.jsx("div",{ref:Z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,z)=>Se(_,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,oe=(_,z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Se(_,`card-${z}`,Ee),L&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(u)})`,width:$(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);if(P){const _=b?I&&K?"paused":"running":"paused";return a.jsxs("div",{ref:E,className:Re(`${l}-wrapper`,`${l}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...D>0?{height:D}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ii(l)}}),O,a.jsx("div",{ref:A,className:`${l}-marquee-track`,"data-direction":s,onMouseEnter:U,onMouseLeave:G,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":_},children:Array.from({length:V},(z,q)=>a.jsx("div",{ref:q===0?F:void 0,className:`${l}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(u),paddingRight:$(u)},"aria-hidden":q>0,children:t==null?void 0:t.map((Y,ie)=>oe(Y,`${q}-${ie}`))},`set-${q}`))})]})}return a.jsxs("div",{className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ii(l)}}),O,a.jsx("div",{style:{gap:$(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,z)=>oe(_,z))})]})},dd=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2411
2411
  import cn from 'classnames';
2412
2412
  import { CommonComponentProps } from '../props';
2413
2413
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
3146
3146
  width: 100%;
3147
3147
  height: 100%;
3148
3148
  }
3149
- `}const gd=3e3,hd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=v.useScopedStyles(),o=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:y,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:$,controlsHoverColor:w}=e,C=c>0&&(!n||!!r),[b,M]=d.useState(0),[L,H]=d.useState(null),[x,P]=d.useState(!1),V=d.useRef(null),S=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),E=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);d.useEffect(()=>{M(0),H(null),P(!1)},[o.length]);const A=o[b],F=L===null?null:o[L],q=re=>{var D,O,J,se,fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${re}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((O=e==null?void 0:e[`${re}FontSettings`])==null?void 0:O.fontStyle)??"normal"},textAppearance:{textTransform:((J=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:J.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((fe=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:fe.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},ee=q("text"),R=q("caption"),W=o.length>1&&o.some(re=>{var de,D;return(((de=re.text)==null?void 0:de.length)??0)>0||(((D=re.caption)==null?void 0:D.length)??0)>0}),z=d.useRef(null),[N,I]=d.useState(0),[U,X]=d.useState(0),Q=e.controls??{mode:"Off",icon:null},k=o.length>1,ne=d.useCallback((re,de)=>!k||de===re?re:(V.current&&window.clearTimeout(V.current),H(re),P(!0),V.current=window.setTimeout(()=>{H(null),P(!1),V.current=null},300),de),[k]),h=d.useCallback(()=>{k&&M(re=>ne(re,(re-1+o.length)%o.length))},[k,ne,o.length]),te=d.useCallback(()=>{k&&M(re=>ne(re,(re+1)%o.length))},[k,ne,o.length]);d.useEffect(()=>{if(!C||!k)return;const re=Math.max(300,gd/c),de=window.setInterval(()=>{M(D=>ne(D,(D+1)%o.length))},re);return()=>{window.clearInterval(de)}},[C,k,ne,o.length,c]),d.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const me=(re,de)=>{var fe,Te,Ce,Le;const D=de==null?void 0:de.textMinHeightPx,O=de==null?void 0:de.captionMinHeightPx,J=de==null?void 0:de.dataMeasureAttrs,se=i&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[a.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:v.scalingValue(T??0,n??!1)}}),a.jsx("div",{...J&&{"data-testimonial-measure":"text"},style:{...tt(ee,n),...D&&D>0?{minHeight:D}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Cn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[a.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:v.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:v.scalingValue(f??0,n??!1),height:v.scalingValue(m??0,n??!1)},children:((fe=re.image)==null?void 0:fe.url)&&a.jsx("img",{src:(Te=re.image)==null?void 0:Te.url,alt:((Ce=re.image)==null?void 0:Ce.name)??"",className:`${l}-icon`,style:{objectFit:((Le=re.image)==null?void 0:Le.objectFit)||"contain"}})})]}),re.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:v.scalingValue(y??0,n??!1)}}),a.jsx("div",{...J?{"data-testimonial-measure":"caption"}:{},style:{...tt(R,n),...O&&O>0?{minHeight:O}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Cn,{content:re.caption})})]})]})},le=d.useCallback(re=>{I(re.maxTextPx),X(re.maxCaptionPx)},[]);if(d.useLayoutEffect(()=>{if(!W){le({maxTextPx:0,maxCaptionPx:0});return}const re=z.current;if(!re)return;const de=()=>{v.readTestimonialTextMeasure(re,le)};de();const D=new ResizeObserver(de);return D.observe(re),()=>{D.disconnect()}},[W,le,t]),!A)return a.jsx(a.Fragment,{});const $e=W?{textMinHeightPx:N,captionMinHeightPx:U}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:md(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:v.scalingValue(p??0,n??!1),alignItems:S},children:[W&&a.jsx("div",{ref:z,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:o.map((re,de)=>a.jsx("div",{style:{width:"100%"},children:me(re,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[F&&x&&a.jsx("div",{className:ke(`${l}-fade-item-prev`,`${l}-fade-out`),children:me(F,{...$e,hideControls:!0})}),a.jsx("div",{className:ke(`${l}-fade-item-current`,x?`${l}-fade-in`:void 0),children:me(A,$e)})]})]}),Q.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:v.scalingValue(g??.02,n??!1),height:v.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:h,disabled:!k,"aria-label":"Previous testimonial",children:Q.icon&&a.jsx(Wt,{url:Q.icon,fill:$,hoverFill:w,className:ke(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:ke(`${l}-arrow`,`${l}-next-arrow`),style:{width:v.scalingValue(g??.02,n??!1),height:v.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:te,disabled:!k,"aria-label":"Next testimonial",children:Q.icon&&a.jsx(Wt,{url:Q.icon,fill:$,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},fd=`import cn from 'classnames';\r
3149
+ `}const gd=3e3,hd=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:l}=y.useScopedStyles(),o=t||[],{speed:c,align:s,width:p,imageMarginTop:u,textMarginTop:T,captionMarginTop:x,imageWidth:f,imageHeight:m,controlsWidth:g,controlsColor:C,controlsHoverColor:w}=e,S=c>0&&(!n||!!r),[v,M]=d.useState(0),[L,N]=d.useState(null),[b,P]=d.useState(!1),B=d.useRef(null),$=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),E=d.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);d.useEffect(()=>{M(0),N(null),P(!1)},[o.length]);const A=o[v],F=L===null?null:o[L],j=re=>{var V,U,G,se,fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${re}FontFamily`])??"Arial",fontWeight:((V=e==null?void 0:e[`${re}FontSettings`])==null?void 0:V.fontWeight)??400,fontStyle:((U=e==null?void 0:e[`${re}FontSettings`])==null?void 0:U.fontStyle)??"normal"},textAppearance:{textTransform:((G=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:G.textTransform)??"none",textDecoration:((se=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:se.textDecoration)??"none",fontVariant:((fe=e==null?void 0:e[`${re}TextAppearance`])==null?void 0:fe.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${re}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${re}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${re}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${re}WordSpacing`])??0,color:(e==null?void 0:e[`${re}Color`])??"#000000"}},te=j("text"),k=j("caption"),W=o.length>1&&o.some(re=>{var de,V;return(((de=re.text)==null?void 0:de.length)??0)>0||(((V=re.caption)==null?void 0:V.length)??0)>0}),D=d.useRef(null),[H,I]=d.useState(0),[K,Q]=d.useState(0),Z=e.controls??{mode:"Off",icon:null},R=o.length>1,ne=d.useCallback((re,de)=>!R||de===re?re:(B.current&&window.clearTimeout(B.current),N(re),P(!0),B.current=window.setTimeout(()=>{N(null),P(!1),B.current=null},300),de),[R]),h=d.useCallback(()=>{R&&M(re=>ne(re,(re-1+o.length)%o.length))},[R,ne,o.length]),ee=d.useCallback(()=>{R&&M(re=>ne(re,(re+1)%o.length))},[R,ne,o.length]);d.useEffect(()=>{if(!S||!R)return;const re=Math.max(300,gd/c),de=window.setInterval(()=>{M(V=>ne(V,(V+1)%o.length))},re);return()=>{window.clearInterval(de)}},[S,R,ne,o.length,c]),d.useEffect(()=>()=>{B.current&&window.clearTimeout(B.current)},[]);const ge=(re,de)=>{var fe,Te,Se,Le;const V=de==null?void 0:de.textMinHeightPx,U=de==null?void 0:de.captionMinHeightPx,G=de==null?void 0:de.dataMeasureAttrs,se=i&&!(de!=null&&de.dataMeasureAttrs)&&!(de!=null&&de.hideControls);return a.jsxs(a.Fragment,{children:[re.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"textMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(T??0,n??!1)}}),a.jsx("div",{...G&&{"data-testimonial-measure":"text"},style:{...Je(te,n),...V&&V>0?{minHeight:V}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Sn,{content:re.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"imageMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:y.scalingValue(f??0,n??!1),height:y.scalingValue(m??0,n??!1)},children:((fe=re.image)==null?void 0:fe.url)&&a.jsx("img",{src:(Te=re.image)==null?void 0:Te.url,alt:((Se=re.image)==null?void 0:Se.name)??"",className:`${l}-icon`,style:{objectFit:((Le=re.image)==null?void 0:Le.objectFit)||"contain"}})})]}),re.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se?"captionMarginTop":void 0,className:se?`${l}-control`:void 0,style:{height:y.scalingValue(x??0,n??!1)}}),a.jsx("div",{...G?{"data-testimonial-measure":"caption"}:{},style:{...Je(k,n),...U&&U>0?{minHeight:U}:{},textAlign:E,pointerEvents:"auto"},children:a.jsx(Sn,{content:re.caption})})]})]})},le=d.useCallback(re=>{I(re.maxTextPx),Q(re.maxCaptionPx)},[]);if(d.useLayoutEffect(()=>{if(!W){le({maxTextPx:0,maxCaptionPx:0});return}const re=D.current;if(!re)return;const de=()=>{y.readTestimonialTextMeasure(re,le)};de();const V=new ResizeObserver(de);return V.observe(re),()=>{V.disconnect()}},[W,le,t]),!A)return a.jsx(a.Fragment,{});const be=W?{textMinHeightPx:H,captionMinHeightPx:K}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${l}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:md(l)}}),a.jsxs("div",{className:`${l}-wrapper`,style:{width:y.scalingValue(p??0,n??!1),alignItems:$},children:[W&&a.jsx("div",{ref:D,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:o.map((re,de)=>a.jsx("div",{style:{width:"100%"},children:ge(re,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${l}-fade-stack`,children:[F&&b&&a.jsx("div",{className:Re(`${l}-fade-item-prev`,`${l}-fade-out`),children:ge(F,{...be,hideControls:!0})}),a.jsx("div",{className:Re(`${l}-fade-item-current`,b?`${l}-fade-in`:void 0),children:ge(A,be)})]})]}),Z.mode==="On"&&a.jsxs("div",{className:`${l}-controls`,children:[a.jsx("div",{className:`${l}-arrow`,style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:h,disabled:!R,"aria-label":"Previous testimonial",children:Z.icon&&a.jsx(Mt,{url:Z.icon,fill:C,hoverFill:w,className:Re(`${l}-arrow-img`,`${l}-mirror`)})})}),a.jsx("div",{className:Re(`${l}-arrow`,`${l}-next-arrow`),style:{width:y.scalingValue(g??.02,n??!1),height:y.scalingValue(g??.02,n??!1),"--arrow-hover-color":w},children:a.jsx("button",{type:"button",className:`${l}-arrow-inner`,onClick:ee,disabled:!R,"aria-label":"Next testimonial",children:Z.icon&&a.jsx(Mt,{url:Z.icon,fill:C,hoverFill:w,className:`${l}-arrow-img`})})})]})]})})},fd=`import cn from 'classnames';\r
3150
3150
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
3151
3151
  import { CommonComponentProps } from '../props';\r
3152
3152
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3642,7 +3642,7 @@ type TestimonialsSettings = {\r
3642
3642
  icon?: string | null;\r
3643
3643
  };\r
3644
3644
  };\r
3645
- `,yd="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),li={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},vd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:yd},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},bd={element:hd,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:vd,sourceCode:fd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function xd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ci(e){return((e==null?void 0:e.trim().length)??0)>0}function qr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Kr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:v.scalingValue((i-t)/2,r)}}function $d(e){return`
3645
+ `,yd="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" 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" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),li={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},vd={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...li.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:yd},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},bd={element:hd,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:vd,sourceCode:fd,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function xd(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ci(e){return((e==null?void 0:e.trim().length)??0)>0}function qr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Kr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((i-t)/2,r)}}function Cd(e){return`
3646
3646
  .${e}-wrapper {
3647
3647
  display: grid;
3648
3648
  align-items: start;
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {\r
3845
3845
  pointer-events: auto;
3846
3846
  z-index: 10;
3847
3847
  }
3848
- `}const _t=500,Cd=750,Ot="cubic-bezier(0.22, 1, 0.36, 1)";function Vt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function di({media:e,className:t,style:n,onImageClick:r}){return Vt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function Sd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:l,onPrev:o,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),y=d.useRef(null),[f,m]=d.useState(null),[g,$]=d.useState(r?"opening":"open"),[w,C]=d.useState(!0),b=d.useRef(t),M=d.useCallback(()=>{const S=T.current,E=y.current;if(!S||!E)return;const A=S.getBoundingClientRect(),F=A.width,q=A.height,ee=E.naturalWidth,R=E.naturalHeight;if(!F||!q||!ee||!R)return;if(n==="cover"){m({width:F,height:q,left:A.left,top:A.top});return}const W=ee/R,z=F/q;if(W>z){const N=F/W;m({width:F,height:N,left:A.left,top:A.top+(q-N)/2})}else{const N=q*W;m({width:N,height:q,left:A.left+(F-N)/2,top:A.top})}},[n]);d.useEffect(()=>{M();const S=T.current;if(!S)return;const E=new ResizeObserver(()=>M());return E.observe(S),()=>E.disconnect()},[M,t]),d.useEffect(()=>{g==="opening"&&f&&$("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const S=setTimeout(()=>l(),_t);return()=>clearTimeout(S)},[g,l]),d.useEffect(()=>{b.current!==t&&C(!1),b.current=t},[t]),d.useEffect(()=>{const S=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&$("closing"))};return window.addEventListener("keydown",S,!0),()=>window.removeEventListener("keydown",S,!0)},[g]);const L=()=>{g!=="closing"&&$("closing")},H=g==="open",x=g==="closing",P=x&&i&&!!r,V=g==="opening"?r??f:P?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:H?1:0,transition:`opacity ${_t}ms ${Ot}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),a.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 ${_t}ms ${Ot}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:H?1:0,transition:`opacity ${_t}ms ${Ot}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),V&&a.jsx("img",{ref:y,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:x&&!P?0:1,transition:x&&!P?`opacity ${_t}ms ${Ot}`:P||w?`top ${_t}ms ${Ot}, left ${_t}ms ${Ot}, width ${_t}ms ${Ot}, height ${_t}ms ${Ot}`:"none",pointerEvents:"none",zIndex:9998}}),H&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:S=>{S.stopPropagation(),o()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:S=>{S.stopPropagation(),c()}})]})]})}function wd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Td({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:l,activeEvent:o,layoutId:c}){const{prefix:s}=v.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:y,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:$,slider:w,sliderTiming:C,direction:b,transition:M,titleMarginTop:L,subtitleMarginTop:H,titleColor:x,subtitleColor:P,lightboxCounterColor:V,titleFontFamily:S,titleFontSettings:E,titleFontSize:A,titleLineHeight:F,titleLetterSpacing:q,titleWordSpacing:ee,titleTextAppearance:R,subtitleFontFamily:W,subtitleFontSettings:z,subtitleFontSize:N,subtitleLineHeight:I,subtitleLetterSpacing:U,subtitleWordSpacing:X,subtitleTextAppearance:Q,lightboxCounterFontFamily:k,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:te,lightboxCounterLetterSpacing:me,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:$e,showText:re="always",alignEntries:de="off"}=e,D={fontSettings:{fontFamily:S,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:F,letterSpacing:q??0,wordSpacing:ee??0,textAppearance:R,color:x},J={...vt(tt(D,n))},se={fontSettings:{fontFamily:W,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:N??.01,lineHeight:I,letterSpacing:U??0,wordSpacing:X??0,textAppearance:Q,color:P},Te={...vt(tt(se,n))},Ce={fontSettings:{fontFamily:k,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:te,letterSpacing:me??0,wordSpacing:le??0,textAppearance:$e,color:V},Ee={...vt(tt(Ce,n)),...Kr(h,te,s,n)},B=qr(A,F,`${s}-item-title`,`${s}-text-tight-leading`),oe=qr(N,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=Kr(A,F,s,n),j=Kr(N,I,s,n),K=qr(h,te,`${s}-lightbox-counter`,`${s}-text-tight-leading`),G=v.buildColorVars(s,{titleColor:x,subtitleColor:P,lightboxCounterColor:V},Ld,Pd),Fe=`${o&&o!=="default"?`${s}-state-${o}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),ge=f===0?1/0:f,ye=(t??[]).slice(0,ge),We=u.entryWidth??.2,ae=(g==null?void 0:g.display)==="cover",be=(g==null?void 0:g.ratioValue)??"1:1",Ae=(g==null?void 0:g.reversed)??!1,[Re,Oe]=be.split(":").map(Number),ht=`${Ae?Oe:Re} / ${Ae?Re:Oe}`,$t=v.scalingValue(We??0,n),Ke=!ae&&w!=="off",Ue={width:$t,...ae?{aspectRatio:ht,height:"auto",overflow:"hidden"}:{height:"auto"}},Je=`${s}-item-image-wrapper${Ke?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),ve=p==="c",Be=ve&&de==="on",ze=`calc(${v.scalingValue(We??0,n)} * (${T} / 100))`,Ye=v.scalingValue(We*T/100,n),Bt=ae?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Et,Yt]=d.useState("ltr"),[sn,An]=d.useState(0),Se=d.useRef(null);d.useEffect(()=>{const Ie=Se.current;if(!Ie)return;const ct=new ResizeObserver(dt=>{An(Math.round(dt[0].contentRect.width))});return ct.observe(Ie),()=>ct.disconnect()},[]);const et=(()=>{const Ie={...G},ct=Se.current?getComputedStyle(Se.current).getPropertyValue("--cntrl-article-width").trim():"";return ct&&(Ie["--cntrl-article-width"]=ct),Ie})(),[Ge,Ve]=d.useState(!1),[lt,Zn]=d.useState([]),[Wr,ln]=d.useState(0),[Mr,Jn]=d.useState(null),er=(Ie,ct,dt)=>{if(n&&!r||m==="off")return;const Y=Ie.currentTarget.getBoundingClientRect();Jn({top:Y.top,left:Y.left,width:Y.width,height:Y.height}),Zn(ct),ln(dt),Ve(!0)};d.useEffect(()=>{if(!Ge||m!=="on"||typeof document>"u")return;const Ie=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ie}},[Ge,m]),d.useEffect(()=>{!n||r||(Ve(!1),Jn(null))},[n,r]);const Hr=d.useMemo(()=>$d(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Hr}}),a.jsx("div",{style:G,children:a.jsx("div",{ref:Se,className:`${s}-wrapper ${s}-type-${p}${Be?` ${s}-align-entries`:""} ${Fe}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Be?0:v.scalingValue(y??0,n),columnGap:v.scalingValue(u.horizontalGap??0,n),width:v.scalingValue(u.wrapperWidth??0,n),...Be?{[`--${s}-align-entries-row-gap`]:v.scalingValue(y??0,n)}:{}},children:ye.map((Ie,ct)=>{var Qe,mt;const dt=ci(Ie.title),Y=ci(Ie.subtitle),ue=(((Qe=Ie.link)==null?void 0:Qe.length)??0)>0&&m==="off"?Ie.link:void 0,he=Math.floor(ct/u.columnsCount)===Math.ceil(ye.length/u.columnsCount)-1,we=ve?a.jsxs("div",{className:`${s}-item-text-block`,children:[dt&&a.jsx("p",{className:B,style:{width:ze,...J,..._},children:Ie.title}),dt&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:v.scalingValue(L??0,n),width:Ye}}),Y&&a.jsx("p",{className:oe,style:{width:ze,...Te,...j},children:Ie.subtitle}),Y&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:v.scalingValue(H??0,n),width:Ye}})]}):null,je=ve?a.jsxs("div",{className:`${s}-item-title-row`,children:[dt&&a.jsx("p",{className:B,style:{width:ze,...J,..._},children:Ie.title}),dt&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:v.scalingValue(L??0,n),width:Ye}})]}):null,Xe=ve?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[Y&&a.jsx("p",{className:oe,style:{width:ze,...Te,...j},children:Ie.subtitle}),Y&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:v.scalingValue(H??0,n),width:Ye}})]}):null,Pe=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[je,Xe]}):a.jsxs(a.Fragment,{children:[je,Xe]}),ut=a.jsx("div",{className:Je,style:Ue,children:(((mt=Ie.image)==null?void 0:mt.length)??0)===0?null:w==="off"?(()=>{const Me=Ie.image[0],at=Ie.image.filter(nt=>!Vt(nt)).map(nt=>nt.url);return a.jsx(di,{media:Me,className:`${s}-item-${Vt(Me)?"video":"image"}`.trim(),style:Bt,onImageClick:Vt(Me)?void 0:nt=>er(nt,at,0)})})():a.jsxs(a.Fragment,{children:[Ke&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ie.image.map(Me=>Vt(Me)?a.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):a.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),a.jsx(Eo,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Cd,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":b!=="random"?b==="horizontal"?"ltr":"ttb":Et},onMoved:Me=>{if(b!=="random"||M==="fade")return;const it=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Yt(it),setTimeout(()=>{Me.refresh()},0)},children:Ie.image.map((Me,it)=>{const at=Ie.image.filter(Ze=>!Vt(Ze)),nt=at.map(Ze=>Ze.url),cn=at.findIndex(Ze=>Ze.url===Me.url);return a.jsx(_o,{children:a.jsx(di,{media:Me,className:`${s}-item-${Vt(Me)?"video":"image"}`.trim(),style:Bt,onImageClick:Vt(Me)?void 0:Ze=>er(Ze,nt,cn)})},it)})},`${M}-${We}-${b}-${C}-${sn}-${c}`)]})}),pt=ve?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":i&&dt?"titleMarginTop":void 0,className:i&&dt?`${s}-control`:void 0,style:{height:dt?v.scalingValue(L??0,n):0,width:Ye}}),a.jsx("p",{className:B,style:{width:ze,...J,..._},children:Ie.title}),a.jsx("div",{"data-controls":i&&Y?"subtitleMarginTop":void 0,className:i&&Y?`${s}-control`:void 0,style:{height:Y?v.scalingValue(H??0,n):0,width:Ye}}),a.jsx("p",{className:oe,style:{width:ze,...Te,...j},children:Ie.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${i?`${s}-item-inner`:`${s}-item-inner-hidden`}${Be&&he?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${v.scalingValue(We??0,n)} * (${T} / 100))`:v.scalingValue(We??0,n)},children:Be?a.jsxs(a.Fragment,{children:[Pe,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:ut})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,ut,pt]})})},ct)})})}),(!n||r)&&Ge&&typeof document<"u"&&m==="on"&&Ii.createPortal(a.jsx("div",{style:et,"data-selection":"none",children:a.jsx(Sd,{images:lt,index:Wr,imageDisplay:wd($),originRect:Mr,reverseClose:w==="off",onClose:()=>Ve(!1),onPrev:()=>ln(Ie=>(Ie-1+lt.length)%lt.length),onNext:()=>ln(Ie=>(Ie+1)%lt.length),counterClassName:K,counterStyle:Ee})}),document.body)]})}const Ld={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Pd=["hover","focus","filled","success","error"],Ed=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
3848
+ `}const At=500,Sd=750,Vt="cubic-bezier(0.22, 1, 0.36, 1)";function qt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function di({media:e,className:t,style:n,onImageClick:r}){return qt(e)?a.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function $d({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:l,onPrev:o,onNext:c,counterClassName:s,counterStyle:p}){const u=n==="cover",T=d.useRef(null),x=d.useRef(null),[f,m]=d.useState(null),[g,C]=d.useState(r?"opening":"open"),[w,S]=d.useState(!0),v=d.useRef(t),M=d.useCallback(()=>{const $=T.current,E=x.current;if(!$||!E)return;const A=$.getBoundingClientRect(),F=A.width,j=A.height,te=E.naturalWidth,k=E.naturalHeight;if(!F||!j||!te||!k)return;if(n==="cover"){m({width:F,height:j,left:A.left,top:A.top});return}const W=te/k,D=F/j;if(W>D){const H=F/W;m({width:F,height:H,left:A.left,top:A.top+(j-H)/2})}else{const H=j*W;m({width:H,height:j,left:A.left+(F-H)/2,top:A.top})}},[n]);d.useEffect(()=>{M();const $=T.current;if(!$)return;const E=new ResizeObserver(()=>M());return E.observe($),()=>E.disconnect()},[M,t]),d.useEffect(()=>{g==="opening"&&f&&C("open")},[g,f]),d.useEffect(()=>{if(g!=="closing")return;const $=setTimeout(()=>l(),At);return()=>clearTimeout($)},[g,l]),d.useEffect(()=>{v.current!==t&&S(!1),v.current=t},[t]),d.useEffect(()=>{const $=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),g!=="closing"&&C("closing"))};return window.addEventListener("keydown",$,!0),()=>window.removeEventListener("keydown",$,!0)},[g]);const L=()=>{g!=="closing"&&C("closing")},N=g==="open",b=g==="closing",P=b&&i&&!!r,B=g==="opening"?r??f:P?r:f;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:L,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${At}ms ${Vt}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${At}ms ${Vt}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${At}ms ${Vt}`},children:e.length>1&&a.jsxs("p",{className:s,style:p,children:[t+1," / ",e.length]})})]})}),B&&a.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:B.top,left:B.left,width:B.width,height:B.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!P?0:1,transition:b&&!P?`opacity ${At}ms ${Vt}`:P||w?`top ${At}ms ${Vt}, left ${At}ms ${Vt}, width ${At}ms ${Vt}, height ${At}ms ${Vt}`:"none",pointerEvents:"none",zIndex:9998}}),N&&f&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left,width:f.width/2,height:f.height,cursor:"w-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),o()}}),a.jsx("div",{style:{position:"fixed",top:f.top,left:f.left+f.width/2,width:f.width/2,height:f.height,cursor:"e-resize",zIndex:9999},onClick:$=>{$.stopPropagation(),c()}})]})]})}function wd(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Td({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:l,activeEvent:o,layoutId:c}){const{prefix:s}=y.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:T=100,verticalGap:x,entriesCount:f,lightbox:m,imageDisplay:g,lightboxImageDisplay:C,slider:w,sliderTiming:S,direction:v,transition:M,titleMarginTop:L,subtitleMarginTop:N,titleColor:b,subtitleColor:P,lightboxCounterColor:B,titleFontFamily:$,titleFontSettings:E,titleFontSize:A,titleLineHeight:F,titleLetterSpacing:j,titleWordSpacing:te,titleTextAppearance:k,subtitleFontFamily:W,subtitleFontSettings:D,subtitleFontSize:H,subtitleLineHeight:I,subtitleLetterSpacing:K,subtitleWordSpacing:Q,subtitleTextAppearance:Z,lightboxCounterFontFamily:R,lightboxCounterFontSettings:ne,lightboxCounterFontSize:h,lightboxCounterLineHeight:ee,lightboxCounterLetterSpacing:ge,lightboxCounterWordSpacing:le,lightboxCounterTextAppearance:be,showText:re="always",alignEntries:de="off"}=e,V={fontSettings:{fontFamily:$,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:F,letterSpacing:j??0,wordSpacing:te??0,textAppearance:k,color:b},G={...yt(Je(V,n))},se={fontSettings:{fontFamily:W,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:H??.01,lineHeight:I,letterSpacing:K??0,wordSpacing:Q??0,textAppearance:Z,color:P},Te={...yt(Je(se,n))},Se={fontSettings:{fontFamily:R,fontWeight:(ne==null?void 0:ne.fontWeight)??400,fontStyle:(ne==null?void 0:ne.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ee,letterSpacing:ge??0,wordSpacing:le??0,textAppearance:be,color:B},Ee={...yt(Je(Se,n)),...Kr(h,ee,s,n)},O=qr(A,F,`${s}-item-title`,`${s}-text-tight-leading`),oe=qr(H,I,`${s}-item-subtitle`,`${s}-text-tight-leading`),_=Kr(A,F,s,n),z=Kr(H,I,s,n),q=qr(h,ee,`${s}-lightbox-counter`,`${s}-text-tight-leading`),Y=y.buildColorVars(s,{titleColor:b,subtitleColor:P,lightboxCounterColor:B},Ld,Pd),ke=`${o&&o!=="default"?`${s}-state-${o}`:""}${re==="on hover"&&(!n||r)?` ${s}-show-text-hover`:""}`.trim(),ye=f===0?1/0:f,ve=(t??[]).slice(0,ye),We=u.entryWidth??.2,ae=(g==null?void 0:g.display)==="cover",xe=(g==null?void 0:g.ratioValue)??"1:1",Ae=(g==null?void 0:g.reversed)??!1,[Fe,Ve]=xe.split(":").map(Number),mt=`${Ae?Ve:Fe} / ${Ae?Fe:Ve}`,xt=y.scalingValue(We??0,n),_t=!ae&&w!=="off",gt={width:xt,...ae?{aspectRatio:mt,height:"auto",overflow:"hidden"}:{height:"auto"}},je=`${s}-item-image-wrapper${_t?` ${s}-item-image-wrapper-fit-slider`:""}`.trim(),me=p==="c",He=me&&de==="on",Be=`calc(${y.scalingValue(We??0,n)} * (${T} / 100))`,Ue=y.scalingValue(We*T/100,n),Bt=ae?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[wt,Tt]=d.useState("ltr"),[sn,An]=d.useState(0),$e=d.useRef(null);d.useEffect(()=>{const Ie=$e.current;if(!Ie)return;const st=new ResizeObserver(lt=>{An(Math.round(lt[0].contentRect.width))});return st.observe(Ie),()=>st.disconnect()},[]);const Ze=(()=>{const Ie={...Y},st=$e.current?getComputedStyle($e.current).getPropertyValue("--cntrl-article-width").trim():"";return st&&(Ie["--cntrl-article-width"]=st),Ie})(),[Ge,De]=d.useState(!1),[at,Zn]=d.useState([]),[Wr,ln]=d.useState(0),[Mr,Jn]=d.useState(null),er=(Ie,st,lt)=>{if(n&&!r||m==="off")return;const X=Ie.currentTarget.getBoundingClientRect();Jn({top:X.top,left:X.left,width:X.width,height:X.height}),Zn(st),ln(lt),De(!0)};d.useEffect(()=>{if(!Ge||m!=="on"||typeof document>"u")return;const Ie=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ie}},[Ge,m]),d.useEffect(()=>{!n||r||(De(!1),Jn(null))},[n,r]);const Nr=d.useMemo(()=>Cd(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Nr}}),a.jsx("div",{style:Y,children:a.jsx("div",{ref:$e,className:`${s}-wrapper ${s}-type-${p}${He?` ${s}-align-entries`:""} ${ke}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:y.scalingValue(x??0,n),columnGap:y.scalingValue(u.horizontalGap??0,n),width:y.scalingValue(u.wrapperWidth??0,n),...He?{[`--${s}-align-entries-row-gap`]:y.scalingValue(x??0,n)}:{}},children:ve.map((Ie,st)=>{var Xe,ut;const lt=ci(Ie.title),X=ci(Ie.subtitle),ue=(((Xe=Ie.link)==null?void 0:Xe.length)??0)>0&&m==="off"?Ie.link:void 0,he=Math.floor(st/u.columnsCount)===Math.ceil(ve.length/u.columnsCount)-1,we=me?a.jsxs("div",{className:`${s}-item-text-block`,children:[lt&&a.jsx("p",{className:O,style:{width:Be,...G,..._},children:Ie.title}),lt&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}}),X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,qe=me?a.jsxs("div",{className:`${s}-item-title-row`,children:[lt&&a.jsx("p",{className:O,style:{width:Be,...G,..._},children:Ie.title}),lt&&a.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(L??0,n),width:Ue}})]}):null,Ye=me?a.jsxs("div",{className:`${s}-item-subtitle-row`,children:[X&&a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle}),X&&a.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${s}-control`:void 0,style:{height:y.scalingValue(N??0,n),width:Ue}})]}):null,Pe=ue?a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-text-link`,children:[qe,Ye]}):a.jsxs(a.Fragment,{children:[qe,Ye]}),ct=a.jsx("div",{className:je,style:gt,children:(((ut=Ie.image)==null?void 0:ut.length)??0)===0?null:w==="off"?(()=>{const Me=Ie.image[0],ot=Ie.image.filter(et=>!qt(et)).map(et=>et.url);return a.jsx(di,{media:Me,className:`${s}-item-${qt(Me)?"video":"image"}`.trim(),style:Bt,onImageClick:qt(Me)?void 0:et=>er(et,ot,0)})})():a.jsxs(a.Fragment,{children:[_t&&a.jsx("div",{className:`${s}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ie.image.map(Me=>qt(Me)?a.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):a.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),a.jsx(Eo,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:Sd,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":v!=="random"?v==="horizontal"?"ltr":"ttb":wt},onMoved:Me=>{if(v!=="random"||M==="fade")return;const rt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Tt(rt),setTimeout(()=>{Me.refresh()},0)},children:Ie.image.map((Me,rt)=>{const ot=Ie.image.filter(Qe=>!qt(Qe)),et=ot.map(Qe=>Qe.url),cn=ot.findIndex(Qe=>Qe.url===Me.url);return a.jsx(_o,{children:a.jsx(di,{media:Me,className:`${s}-item-${qt(Me)?"video":"image"}`.trim(),style:Bt,onImageClick:qt(Me)?void 0:Qe=>er(Qe,et,cn)})},rt)})},`${M}-${We}-${v}-${S}-${sn}-${c}`)]})}),dt=me?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":i&&lt?"titleMarginTop":void 0,className:i&&lt?`${s}-control`:void 0,style:{height:lt?y.scalingValue(L??0,n):0,width:Ue}}),a.jsx("p",{className:O,style:{width:Be,...G,..._},children:Ie.title}),a.jsx("div",{"data-controls":i&&X?"subtitleMarginTop":void 0,className:i&&X?`${s}-control`:void 0,style:{height:X?y.scalingValue(N??0,n):0,width:Ue}}),a.jsx("p",{className:oe,style:{width:Be,...Te,...z},children:Ie.subtitle})]});return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:`${i?`${s}-item-inner`:`${s}-item-inner-hidden`}${He&&he?` ${s}-item-inner-last-row`:""}`.trim(),style:{width:(T??0)>100?`calc(${y.scalingValue(We??0,n)} * (${T} / 100))`:y.scalingValue(We??0,n)},children:He?a.jsxs(a.Fragment,{children:[Pe,a.jsx("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:ct})]}):a.jsxs("a",{href:ue,target:"_blank",className:`${s}-item-image-link`,children:[we,ct,dt]})})},st)})})}),(!n||r)&&Ge&&typeof document<"u"&&m==="on"&&Ii.createPortal(a.jsx("div",{style:Ze,"data-selection":"none",children:a.jsx($d,{images:at,index:Wr,imageDisplay:wd(C),originRect:Mr,reverseClose:w==="off",onClose:()=>De(!1),onPrev:()=>ln(Ie=>(Ie-1+at.length)%at.length),onNext:()=>ln(Ie=>(Ie+1)%at.length),counterClassName:q,counterStyle:Ee})}),document.body)]})}const Ld={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Pd=["hover","focus","filled","success","error"],Ed=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
3849
3849
  import '@splidejs/react-splide/css/core';\r
3850
3850
  import { CommonComponentProps } from '../props';\r
3851
3851
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
@@ -5014,7 +5014,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
5014
5014
  };\r
5015
5015
  \r
5016
5016
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
5017
- `,Ur={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_d=["titleColor","subtitleColor","lightboxCounterColor"],Ad={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!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"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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:"Gap",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"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ur.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:{...Ur.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:{...Ur.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",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:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","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:[..._d],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Id={element:Td,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:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ad,sourceCode:Ed};function kd(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 Rd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const i=r.current;if(!i)return;const l=i.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function mr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fd(e){return String(e??"").trim().length>0}function ui(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function pi(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function mi(e,t,n,r,i,l,o){const c=v.scalingValue(l,o),s=v.scalingValue(0,o),p=e===0,u=e===t-1&&!i;return{borderTopWidth:p&&n?c:s,borderBottomWidth:!u||r?c:s}}function Wd(e,t,n){const r=v.scalingValue(t,n),i=v.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const gi=10;function Md(e){return`
5017
+ `,Ur={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_d=["titleColor","subtitleColor","lightboxCounterColor"],Ad={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!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"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},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:"Gap",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"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ur.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:{...Ur.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:{...Ur.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",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:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","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:[..._d],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Id={element:Td,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:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ad,sourceCode:Ed};function Rd(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 kd({media:e,className:t,style:n}){const r=d.useRef(null);return d.useEffect(()=>{if(!e.isVideo)return;const i=r.current;if(!i)return;const l=i.play();l&&l.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:r,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function mr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fd(e){return String(e??"").trim().length>0}function ui(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function pi(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function mi(e,t,n,r,i,l,o){const c=y.scalingValue(l,o),s=y.scalingValue(0,o),p=e===0,u=e===t-1&&!i;return{borderTopWidth:p&&n?c:s,borderBottomWidth:!u||r?c:s}}function Wd(e,t,n){const r=y.scalingValue(t,n),i=y.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const gi=10;function Md(e){return`
5018
5018
  .${e}-wrapper {
5019
5019
  display: grid;
5020
5020
  align-items: start;
@@ -5445,7 +5445,7 @@ a.${e}-list-item {
5445
5445
  overflow-wrap: anywhere;
5446
5446
  word-break: break-word;
5447
5447
  }
5448
- `}const qt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Mt="cutLabel",Io=[...Ao,Mt],Fr=["A","B","C","D","E"];function ha(e){return`${e}ColumnVerticalAlign`}const ao=["Top","Center","Bottom"];function ko(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Fr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Hd(e){const t=ko(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Nd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Fr.includes(n)?n:null}function fa(e,t,n){const r=Nd(e);return r?r===t?!1:Hd(n[ha(r)]):!0}function Vn(e){const t=ko(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Fr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Bd(e,t,n){if(ya(e,t,n))return Vn(e);const r=Vn(e);return r.kind==="baseline"?{kind:"top"}:r}function Od(e){const t=Vn(e);return t.kind==="baseline"?{kind:"top"}:t}function ya(e,t,n){return fa(e,n,t)?Vn(e).kind==="baseline":!1}function Vd(e){const t={};let n=!1;for(const r of Fr){const i=ha(r),l=e[i];if(e.type==="b"){const o=String(l??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}fa(l,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Dd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function zd(e){const t=Vn(e).kind;return t==="baseline"?"center":t}function jd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function hi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function qd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),l=i-r;return n.remove(),l}function Gr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const l=i.closest(`.${n}`);if(!l)return 0;const o=qd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=l.getBoundingClientRect(),s=i.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-s)/2:e.kind==="bottom"&&(p=c.height-s),c.top-t+p+o}function Kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const l=i.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Ud(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Gd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function _e(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Xd(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),{type:"row",items:[_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing")]},_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Qd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Io.map(e=>[Yd[e],Xd(e)]))}}function $r(e,t){const n=r=>{const i=_e(t,r);return e[i]};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===Mt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fi(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.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 vt(tt(n,t))}function yi(e,t,n,r){const i=$r(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<l?`${n} ${r}`:n}function vi(e,t,n,r){const i=$r(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=l?{}:{[`--${n}-title-leading-gap`]:v.scalingValue((l-o)/2,r)}}const bt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Sn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],wn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Tn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Jd=["hover","focus","filled","success","error"],bi=.004,hn=.004,Yr=hn,xi=12,Ro=50,Dn=1440,zn=Ro/Dn;function va(e){const t=typeof e=="number"&&e>0?e:Dn;return Ro/t}function eu(e,t){const n={position:"absolute",width:xi,height:xi,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function At({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return a.jsx("div",{className:t,style:{...n,pointerEvents:"none"},"data-controls-center-only-drag":"",...i,children:a.jsx("div",{style:eu(e,r)})})}function tu(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Dn}const ba={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Rn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function nu(e,t=1){const n=t/e;return Object.fromEntries(bt.map(r=>[r,n]))}function ru(){return Object.fromEntries([...Sn.map(e=>[e,0]),...wn.map(e=>[e,0])])}function ou(){return Object.fromEntries(Tn.map(e=>[e,0]))}function sr(e){return Object.fromEntries(bt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function xa(e,t,n){const r=e-zn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/i;return{paddingLeft:t*l,paddingRight:n*l}}function gr(e,t,n){const r=Fo(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((l,o)=>l+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function iu(e,t,n){const r={};for(let i=0;i<e;i+=1){const l=Sn[i],o=wn[i],c=typeof n[l]=="number"?n[l]:0,s=typeof n[o]=="number"?n[o]:0,p=xa(t[i]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[o]=p.paddingRight)}return r}function Fo(e,t,n){if(e<=0)return[];const r=bt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((p,u)=>p+u,0)+zn;if(t>=o)return r;const c=[...i];let s=o-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-zn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function au(e,t,n){if(e<=1)return{};const r=Fo(e,t,n),i={};for(let l=0;l<e-1;l+=1){const o=bt[l];r[l]!==n[o]&&(i[o]=r[l])}return i}function $i(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...qt]}function su(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function lu(e,t,n,r){const i=Math.min(r,e.length,bt.length),l={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const p=bt[s],u=Sn[s],T=wn[s],y=Tn[s],f=bt[o],m=Sn[o],g=wn[o],$=Tn[o],w=n[p],C=n[u],b=n[T],M=n[y];typeof w=="number"&&(l[f]=w),typeof C=="number"&&(l[m]=C),typeof b=="number"&&(l[g]=b),typeof M=="number"&&(l[$]=M)}return l}function $a(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function cu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=Rn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",o={...e,...nu(n,i),...ru()};if(l)for(const c of Tn)typeof t[c]=="number"&&(o[c]=t[c]);else Object.assign(o,ou());return $a(e,o)?o:e}function du(e,t,n){const r=Vd(e);r&&(e={...e,...r});const i=va(n==null?void 0:n.designWidth),l=e.columns,o=t.columns,c=Rn(e),s=Rn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof o=="number"?o:qt.length,T=b=>{if(p)return b;const M=sr({...t,...b}),L=Rn(b),H=gr(u,L,M),x=iu(u,H,{...t,...b});return Object.keys(x).length===0?b:{...b,...x}};if(typeof l=="number"&&l!==o)return e;const y=$i(e),f=$i(t);if(!su(y,f))return T({...e,...lu(y,f,t,u)});if(c<s&&typeof u=="number"&&!p){const b=sr({...t,...e});return T({...e,...au(u,c,b)})}if(p){const b=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return b>M?{...e,textPaddingLR:M}:e}const m=sr({...t,...e}),g=gr(u,s,sr(t)),w=gr(u,c,m).some((b,M)=>b<(g[M]??b)),C=bt.some(b=>{const M=e[b],L=t[b];return typeof M=="number"&&typeof L=="number"&&M!==L});return w||C?T(e):e}function uu(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),l=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(zn,r-i-l-zn)}function pu(e,t){return Math.random()*(t-e)+e}function mu(e){return Object.fromEntries(bt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function Xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function gu(e,t,n,r,i,l){return e.slice(0,t).map((o,c)=>{const s=Sn[c],p=wn[c],u=Tn[c];return{key:o,textPrefix:Gd[o],widthKey:bt[c],width:n[bt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[p],paddingBottom:l[u]}})}function hu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l,layoutId:o,onUpdateSettings:c}){const{prefix:s}=v.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:y,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:$,cut:w,showCut:C,cutCellMinHeight:b,cutLabel:M,imageSize:L,imageOnHover:H,entryHoverEffect:x,entryHoverShowOption:P,rowPaddingTop:V,rowPaddingBottom:S,rowPaddingTopB:E,columnsOrder:A,textPaddingLR:F,textColor:q,backgroundColor:ee,dividerColor:R,textHoverColor:W,backgroundHoverColor:z,dividerHoverColor:N}=e,[I,U]=d.useState(void 0),[X,Q]=d.useState(null),k=H==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",te=d.useRef(null),me=d.useRef(null),[le,$e]=d.useState(null),[re,de]=d.useState(Dn),D=va(re),O=Math.max(0,((y??0)-D)/2),J=Math.min(F??0,O),se=Math.max(J,hn),fe=((y??0)+D)/2;d.useLayoutEffect(()=>{if(!n){de(Dn);return}const Y=()=>{de(tu(te.current))};Y();const ue=te.current;if(!ue)return;const he=new ResizeObserver(Y);he.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&he.observe(we),()=>he.disconnect()},[n,o]),d.useEffect(()=>{U(void 0)},[w,C,t,f]),d.useEffect(()=>{n&&!r&&U(void 0)},[n,r]);const Te=v.buildColorVars(s,{textColor:q,backgroundColor:ee,dividerColor:R,textHoverColor:W,backgroundHoverColor:z,dividerHoverColor:N},Zd,Jd),Ce=l&&l!=="default"?`${s}-state-${l}`:"",Ee=`${!n||r?x==="default"?`${s}-entry-hover-default`:x==="blinds"?`${s}-entry-hover-blinds`:x==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Ce}`.trim(),B=x==="reveal"&&(!n||r),oe=($==null?void 0:$[0])??!1,_=($==null?void 0:$[1])??!1,j=d.useRef(e),K=d.useRef(o);d.useEffect(()=>{if(!c||!n){j.current=e,K.current=o;return}if(K.current!==o){j.current=e,K.current=o;return}const Y=j.current;if(!(Y!==e))return;if(typeof Y.columns=="number"&&typeof e.columns=="number"&&Y.columns!==e.columns){j.current=e;return}const he=du(e,Y,{designWidth:re});j.current=e,$a(e,he)&&c(he)},[e,c,n,o,re]);const G=d.useMemo(()=>mu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=d.useMemo(()=>Xr(e,Sn),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),pe=d.useMemo(()=>Xr(e,wn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Fe=d.useMemo(()=>Xr(e,Tn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ge=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...qt],[A]),ye=d.useMemo(()=>gu(ge,u,G,ie,pe,Fe),[ge,u,G,ie,pe,Fe]),We=Rn(e),ae=d.useMemo(()=>bt.slice(0,u).map(Y=>G[Y]),[u,G]),be=d.useMemo(()=>Fo(u,We,G),[u,We,G]),Ae=d.useMemo(()=>gr(u,We,G),[u,We,G]),Re=d.useMemo(()=>ye.map((Y,ue)=>xa(Ae[ue]??0,Y.paddingLeft,Y.paddingRight)),[ye,Ae]),Oe=d.useMemo(()=>{const Y=f===0?1/0:f;return(t??[]).slice(0,Y).map((he,we)=>({id:we,cells:Object.fromEntries(qt.map(je=>[je,he[je]??""])),image:he.image,link:he.link}))},[t,f]),ot=ne?I??w:Oe.length,gt=d.useMemo(()=>ne?Oe.slice(0,ot):Oe,[Oe,ne,ot]),ht=ne&&ot<Oe.length,$t=gt.length>1||ht,Ke=[oe?`${s}-divider-top`:"",_||$t?`${s}-divider-bottom`:""].filter(Boolean).join(" "),Ue=!n||r,Je=()=>{if(!Ue)return;const Y=I??w;if(!C){U(Oe.length);return}U(Math.min(Y+C,Oe.length))},ve=Y=>v.scalingValue(Y,n??!1),Be=h?E??0:V??0,ze=S??0,Ye=m??0,Bt=Be+Ye/2,Et=Math.max(ze,Yr),Yt=mi(0,gt.length,oe,_,ht,g??0,n??!1).borderTopWidth,sn=le!=null?`${le}px`:`calc(${Yt} + ${ve(Bt)})`,An=h?"rowPaddingTopB":"rowPaddingTop",Se=ye[0],et=ye[ye.length-1],Ge=Re[0],Ve=Re[Re.length-1],lt=Se&&Ge?Math.max(Ge.paddingLeft,hn):0,Zn=et&&Ve?Math.max(Ve.paddingRight,hn):0,Wr=We,ln=Y=>{const ue=te.current;if(!ue)return{x:0,y:0};const he=ue.getBoundingClientRect();return{x:Y.clientX-he.left+gi,y:Y.clientY-he.top+gi}},Mr=(Y,ue)=>{if(!k)return;const he=Y.image;if(!(he!=null&&he.url)){Q(null);return}const{x:we,y:je}=ln(ue),Xe=(L==null?void 0:L.min)??80,Pe=(L==null?void 0:L.max)??320,ut=(X==null?void 0:X.rowId)===Y.id?X.widthPx:pu(Xe,Pe);Q({rowId:Y.id,url:he.url,objectFit:"contain",isVideo:kd(he),widthPx:ut,x:we,y:je})},Jn=Y=>{if(!k||!X)return;const{x:ue,y:he}=ln(Y);Q(we=>!we||we.x===ue&&we.y===he?we:{...we,x:ue,y:he})},er=()=>{Q(null)},Hr=Y=>{B&&ui(Y,s),k&&Q(null)},Ie=Y=>{B&&pi(Y,s)};d.useLayoutEffect(()=>{if(!p||h){$e(null);return}const Y=me.current,ue=Y==null?void 0:Y.parentElement;if(!Y||!ue){$e(null);return}const he=()=>{const je=Y.querySelector("[data-list-row]");if(!je){$e(null);return}const Xe=ue.getBoundingClientRect(),Pe=je.getBoundingClientRect();$e(Pe.top-Xe.top+Pe.height/2)};he();const we=new ResizeObserver(he);return we.observe(Y),we.observe(ue),()=>we.disconnect()},[p,h,gt,Be,ze,Ye,t,e,ye,Ae,re,g,oe,_,ht]);const ct=d.useMemo(()=>!h&&Ao.some(Y=>{const ue=Y.charAt(0),he=e[`${Y}VerticalAlign`];return ya(he,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var ut;const Y=te.current;if(!Y)return;const ue=()=>{Y.querySelectorAll("[data-list-col]").forEach(pt=>{pt.style.transform="";const Qe=pt.querySelector(`.${s}-list-col`);Qe&&(Qe.style.minHeight="",Qe.style.height="");const mt=pt.querySelector(`.${s}-list-col-title`);mt&&(mt.style.transform="")})};if(h||!ct){ue();return}const he=()=>{const pt=Array.from(Y.querySelectorAll("[data-list-row]")),Qe=`${s}-list-col`,mt=`${s}-baseline-probe`;pt.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(it=>{it.style.transform="";const at=it.querySelector(`.${Qe}`);at&&(at.style.minHeight="",at.style.height="");const nt=it.querySelector(`.${s}-list-col-title`);nt&&(nt.style.transform="")})}),pt.forEach(Me=>{const it=Array.from(Me.querySelectorAll("[data-list-col]"));Kd(Me,it,Qe)}),Y.offsetHeight,pt.forEach(Me=>{const it=Array.from(Me.querySelectorAll("[data-list-col]")),at=Me.getBoundingClientRect().top,nt=new Map,cn=it.map(De=>{const dn=De.querySelector(`.${s}-list-col-title`),un={el:De,titleEl:dn,letter:De.getAttribute("data-col-letter")??"",kind:De.getAttribute("data-valign")??"top",anchor:De.getAttribute("data-valign-anchor")};return nt.set(un.letter,un),un}),Ze=new Map,tr=(De,dn)=>{const un=Ze.get(De.letter);if(un!==void 0)return un;const Wo=De.anchor?nt.get(De.anchor):void 0;if(De.kind!=="baseline"||!Wo||dn.has(De.letter)){const Ho=Gr(De,at,Qe,mt);return Ze.set(De.letter,Ho),Ho}dn.add(De.letter);const Sa=tr(Wo,dn);dn.delete(De.letter);const wa=Gr(De,at,Qe,mt),Ta=Sa-wa;Ud(De.titleEl,Ta);const Mo=Gr(De,at,Qe,mt);return Ze.set(De.letter,Mo),Mo};cn.forEach(De=>tr(De,new Set))})};let we=null;const je=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,he()}))};he();const Xe=new ResizeObserver(()=>je());Xe.observe(Y);let Pe=!1;return typeof document<"u"&&((ut=document.fonts)!=null&&ut.ready)&&document.fonts.ready.then(()=>{Pe||je()}),()=>{Pe=!0,we!==null&&(cancelAnimationFrame(we),we=null),Xe.disconnect(),ue()}},[ct,h,e,t,re,gt,Ae]);const dt=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:dt}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:te,className:`${s}-wrapper ${Ee}${Ke?` ${Ke}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:v.scalingValue(y??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:sn}:{}},onMouseMove:k?Jn:void 0,onMouseLeave:k?er:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[gt.map((Y,ue)=>{var Xe;const he=(((Xe=Y.link)==null?void 0:Xe.length)??0)>0,we=he&&(!n||r)?"a":"div",je=mi(ue,gt.length,oe,_,ht,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Pe=>{me.current=Pe}:void 0,className:`${s}-list-item${he||P==="always"?` ${s}-list-item-has-link`:""}`,...he?{href:Y.link,target:"_blank"}:{},style:je,onMouseEnter:Pe=>{B&&(he||P==="always")&&ui(Pe,s),k&&Mr(Y,Pe)},onMouseLeave:Pe=>{B&&(he||P==="always")&&pi(Pe,s)},children:[Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ve(Be)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:ve(Ye)},children:[ye.map((Pe,ut)=>{const pt=ut===ye.length-1,Qe=Re[ut],mt=Pe.paddingBottom,Me=Fd(Y.cells[Pe.key]),it=h&&Me&&mt>0,at=h?{minHeight:ve(Ye)}:{width:ve(Ae[ut])},nt=h?{paddingLeft:ve(J),paddingRight:ve(J)}:{paddingLeft:ve(Qe.paddingLeft),paddingRight:ve(Qe.paddingRight)},cn=Pe.textPrefix.charAt(0),Ze=h?Od(e[`${Pe.textPrefix}VerticalAlign`]):Bd(e[`${Pe.textPrefix}VerticalAlign`],e,cn),tr=h&&Me&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":cn,"data-valign":Ze.kind,...Ze.kind==="baseline"?{"data-valign-anchor":Ze.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${pt?` ${s}-list-col-last`:""}`,style:{...nt,...at,...h?{justifyContent:hi(Ze.kind)}:{}},"data-test":Pe.width,children:a.jsx("span",{className:yi(e,Pe.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fi($r(e,Pe.textPrefix),n),...vi(e,Pe.textPrefix,s,n),...h?{}:Dd(Ze.kind)},children:Y.cells[Pe.key]??null})}),it&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ve(mt)}}),tr&&a.jsx(At,{P:s,"data-controls":Pe.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max(mt,Yr))}})]},Pe.key)}),p&&ue===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(At,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(fe),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(se),height:"100%"}}),a.jsx(At,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(fe),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(se,We-se)),width:ve(se),height:"100%"}})]})]}),!h&&ze>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ve(ze)}}),p&&ue===0&&!h&&a.jsx(At,{P:s,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Et)}})]},Y.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(At,{P:s,"data-controls":An,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Yt,left:0,width:"100%",height:ve(Math.max(Be,Yr))}})},"row-padding-handles"),p&&!h&&Se&&et&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(At,{P:s,"data-controls":Se.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[0]-((Ge==null?void 0:Ge.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(lt),height:"100%"}}),a.jsx(At,{P:s,"data-controls":et.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ae[ye.length-1]-((Ve==null?void 0:Ve.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Wr-Zn),width:ve(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ye.slice(0,-1).map((Y,ue)=>{const he=ye[ue+1],we=be.slice(0,ue+1).reduce((pt,Qe)=>pt+Qe,0),je=Re[ue],Xe=Re[ue+1],Pe=Math.max(je.paddingRight,hn),ut=Math.max(Xe.paddingLeft,hn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(At,{P:s,"data-controls":Y.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue]-je.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(we-Pe),width:ve(Pe),height:"100%"}}),a.jsx(At,{P:s,"data-controls":he.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue+1]-Xe.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(we),width:ve(ut),height:"100%"}})]},`${Y.paddingRightKey}-padding`)}),p&&!h&&ye.slice(0,-1).map((Y,ue)=>{const he=uu(ue,be,ae,We),je=be.slice(0,ue+1).reduce((Xe,Pe)=>Xe+Pe,0)-bi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Y.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(Ro),"data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(je),width:ve(bi),height:"calc(100%)",pointerEvents:"auto"}})},`${Y.widthKey}-junction`)})]}),ht&&(()=>{const Y=$r(e,Mt),ue=zd(e.cutLabelVerticalAlign),he=Y.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:ve(b??0),cursor:Ue?"pointer":"default",...Wd(_,g??0,n??!1)},onClick:Ue?Je:void 0,onMouseEnter:B||k?Hr:void 0,onMouseLeave:B?Ie:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:ve(J),paddingRight:ve(J)}:{},justifyContent:jd(Y.textTextAlign),alignItems:hi(ue)},children:a.jsx("span",{className:yi(e,Mt,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fi(Y,n),...vi(e,Mt,s,n),...he?{width:"100%"}:{}},children:M})})})})(),k&&X&&(()=>{const Y=mr(X.widthPx),ue={width:Y,height:"auto",maxHeight:Y,objectFit:"contain",left:X.x,top:X.y,position:"absolute"};return a.jsx(Rd,{media:X,className:X.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${X.rowId}-${X.url}`)})()]})})]})}const fu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5448
+ `}const Yt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ao=["AColumn","BColumn","CColumn","DColumn","EColumn"],Nt="cutLabel",Io=[...Ao,Nt],Fr=["A","B","C","D","E"];function ha(e){return`${e}ColumnVerticalAlign`}const ao=["Top","Center","Bottom"];function Ro(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Fr.includes(r)?`Baseline ${r}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Nd(e){const t=Ro(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function Hd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Fr.includes(n)?n:null}function fa(e,t,n){const r=Hd(e);return r?r===t?!1:Nd(n[ha(r)]):!0}function Vn(e){const t=Ro(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Fr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Od(e,t,n){if(ya(e,t,n))return Vn(e);const r=Vn(e);return r.kind==="baseline"?{kind:"top"}:r}function Bd(e){const t=Vn(e);return t.kind==="baseline"?{kind:"top"}:t}function ya(e,t,n){return fa(e,n,t)?Vn(e).kind==="baseline":!1}function Vd(e){const t={};let n=!1;for(const r of Fr){const i=ha(r),l=e[i];if(e.type==="b"){const o=String(l??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}fa(l,r,e)||(t[i]="Top",n=!0)}return n?t:null}function Dd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function zd(e){const t=Vn(e).kind;return t==="baseline"?"center":t}function jd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function hi(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function qd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),l=i-r;return n.remove(),l}function Gr(e,t,n,r){const i=e.titleEl;if(!i)return 0;const l=i.closest(`.${n}`);if(!l)return 0;const o=qd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=l.getBoundingClientRect(),s=i.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(c.height-s)/2:e.kind==="bottom"&&(p=c.height-s),c.top-t+p+o}function Kd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const l=i.querySelector(`.${n}`);l&&(l.style.minHeight=`${r}px`,l.style.height=`${r}px`)}),r)}function Ud(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Gd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function _e(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Yd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Xd(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),{type:"row",items:[_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing")]},_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Qd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Io.map(e=>[Yd[e],Xd(e)]))}}function Cr(e,t){const n=r=>{const i=_e(t,r);return e[i]};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===Nt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function fi(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.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 yt(Je(n,t))}function yi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<l?`${n} ${r}`:n}function vi(e,t,n,r){const i=Cr(e,t),l=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=l?{}:{[`--${n}-title-leading-gap`]:y.scalingValue((l-o)/2,r)}}const vt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],$n=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],wn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Tn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Zd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Jd=["hover","focus","filled","success","error"],bi=.004,hn=.004,Yr=hn,xi=12,ko=50,Dn=1440,zn=ko/Dn;function va(e){const t=typeof e=="number"&&e>0?e:Dn;return ko/t}function eu(e,t){const n={position:"absolute",width:xi,height:xi,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function It({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return a.jsx("div",{className:t,style:{...n,pointerEvents:"none"},"data-controls-center-only-drag":"",...i,children:a.jsx("div",{style:eu(e,r)})})}function tu(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Dn}const ba={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function kn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function nu(e,t=1){const n=t/e;return Object.fromEntries(vt.map(r=>[r,n]))}function ru(){return Object.fromEntries([...$n.map(e=>[e,0]),...wn.map(e=>[e,0])])}function ou(){return Object.fromEntries(Tn.map(e=>[e,0]))}function sr(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function xa(e,t,n){const r=e-zn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/i;return{paddingLeft:t*l,paddingRight:n*l}}function gr(e,t,n){const r=Fo(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((l,o)=>l+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function iu(e,t,n){const r={};for(let i=0;i<e;i+=1){const l=$n[i],o=wn[i],c=typeof n[l]=="number"?n[l]:0,s=typeof n[o]=="number"?n[o]:0,p=xa(t[i]??0,c,s);p.paddingLeft!==c&&(r[l]=p.paddingLeft),p.paddingRight!==s&&(r[o]=p.paddingRight)}return r}function Fo(e,t,n){if(e<=0)return[];const r=vt.slice(0,e).map(p=>n[p]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((p,u)=>p+u,0)+zn;if(t>=o)return r;const c=[...i];let s=o-t;for(let p=c.length-1;p>=0&&s>0;p-=1){const u=c[p]-zn;if(u<=0)continue;const T=Math.min(s,u);c[p]-=T,s-=T}return[...c,r[e-1]]}function au(e,t,n){if(e<=1)return{};const r=Fo(e,t,n),i={};for(let l=0;l<e-1;l+=1){const o=vt[l];r[l]!==n[o]&&(i[o]=r[l])}return i}function Ci(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Yt]}function su(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function lu(e,t,n,r){const i=Math.min(r,e.length,vt.length),l={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const p=vt[s],u=$n[s],T=wn[s],x=Tn[s],f=vt[o],m=$n[o],g=wn[o],C=Tn[o],w=n[p],S=n[u],v=n[T],M=n[x];typeof w=="number"&&(l[f]=w),typeof S=="number"&&(l[m]=S),typeof v=="number"&&(l[g]=v),typeof M=="number"&&(l[C]=M)}return l}function Ca(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const r of n)if(e[r]!==t[r])return!0;return!1}function cu(e,t){const n=e.columns,r=t.columns;if(typeof n!="number"||n===r)return e;const i=kn(e),l=e.type==="b"||e.type===void 0&&t.type==="b",o={...e,...nu(n,i),...ru()};if(l)for(const c of Tn)typeof t[c]=="number"&&(o[c]=t[c]);else Object.assign(o,ou());return Ca(e,o)?o:e}function du(e,t,n){const r=Vd(e);r&&(e={...e,...r});const i=va(n==null?void 0:n.designWidth),l=e.columns,o=t.columns,c=kn(e),s=kn(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof l=="number"?l:typeof o=="number"?o:Yt.length,T=v=>{if(p)return v;const M=sr({...t,...v}),L=kn(v),N=gr(u,L,M),b=iu(u,N,{...t,...v});return Object.keys(b).length===0?v:{...v,...b}};if(typeof l=="number"&&l!==o)return e;const x=Ci(e),f=Ci(t);if(!su(x,f))return T({...e,...lu(x,f,t,u)});if(c<s&&typeof u=="number"&&!p){const v=sr({...t,...e});return T({...e,...au(u,c,v)})}if(p){const v=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(c-i)/2);return v>M?{...e,textPaddingLR:M}:e}const m=sr({...t,...e}),g=gr(u,s,sr(t)),w=gr(u,c,m).some((v,M)=>v<(g[M]??v)),S=vt.some(v=>{const M=e[v],L=t[v];return typeof M=="number"&&typeof L=="number"&&M!==L});return w||S?T(e):e}function uu(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),l=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(zn,r-i-l-zn)}function pu(e,t){return Math.random()*(t-e)+e}function mu(e){return Object.fromEntries(vt.map(t=>[t,typeof e[t]=="number"?e[t]:ba[t]]))}function Xr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function gu(e,t,n,r,i,l){return e.slice(0,t).map((o,c)=>{const s=$n[c],p=wn[c],u=Tn[c];return{key:o,textPrefix:Gd[o],widthKey:vt[c],width:n[vt[c]],paddingLeftKey:s,paddingRightKey:p,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[p],paddingBottom:l[u]}})}function hu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l,layoutId:o,onUpdateSettings:c}){const{prefix:s}=y.useScopedStyles(),p=!!i,{columns:u,type:T,wrapperWidth:x,entriesCount:f,cellMinHeight:m,dividerWidth:g,showVisibility:C,cut:w,showCut:S,cutCellMinHeight:v,cutLabel:M,imageSize:L,imageOnHover:N,entryHoverEffect:b,entryHoverShowOption:P,rowPaddingTop:B,rowPaddingBottom:$,rowPaddingTopB:E,columnsOrder:A,textPaddingLR:F,textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:W,backgroundHoverColor:D,dividerHoverColor:H}=e,[I,K]=d.useState(void 0),[Q,Z]=d.useState(null),R=N==="on"&&(!n||r),ne=(w??0)>0,h=T==="b",ee=d.useRef(null),ge=d.useRef(null),[le,be]=d.useState(null),[re,de]=d.useState(Dn),V=va(re),U=Math.max(0,((x??0)-V)/2),G=Math.min(F??0,U),se=Math.max(G,hn),fe=((x??0)+V)/2;d.useLayoutEffect(()=>{if(!n){de(Dn);return}const X=()=>{de(tu(ee.current))};X();const ue=ee.current;if(!ue)return;const he=new ResizeObserver(X);he.observe(ue);let we=ue;for(;we&&!we.style.getPropertyValue("--cntrl-article-width");)we=we.parentElement;return we&&he.observe(we),()=>he.disconnect()},[n,o]),d.useEffect(()=>{K(void 0)},[w,S,t,f]),d.useEffect(()=>{n&&!r&&K(void 0)},[n,r]);const Te=y.buildColorVars(s,{textColor:j,backgroundColor:te,dividerColor:k,textHoverColor:W,backgroundHoverColor:D,dividerHoverColor:H},Zd,Jd),Se=l&&l!=="default"?`${s}-state-${l}`:"",Ee=`${!n||r?b==="default"?`${s}-entry-hover-default`:b==="blinds"?`${s}-entry-hover-blinds`:b==="reveal"?`${s}-entry-hover-reveal`:"":""} ${Se}`.trim(),O=b==="reveal"&&(!n||r),oe=(C==null?void 0:C[0])??!1,_=(C==null?void 0:C[1])??!1,z=d.useRef(e),q=d.useRef(o);d.useEffect(()=>{if(!c||!n){z.current=e,q.current=o;return}if(q.current!==o){z.current=e,q.current=o;return}const X=z.current;if(!(X!==e))return;if(typeof X.columns=="number"&&typeof e.columns=="number"&&X.columns!==e.columns){z.current=e;return}const he=du(e,X,{designWidth:re});z.current=e,Ca(e,he)&&c(he)},[e,c,n,o,re]);const Y=d.useMemo(()=>mu(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ie=d.useMemo(()=>Xr(e,$n),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),pe=d.useMemo(()=>Xr(e,wn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),ke=d.useMemo(()=>Xr(e,Tn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),ye=d.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Yt],[A]),ve=d.useMemo(()=>gu(ye,u,Y,ie,pe,ke),[ye,u,Y,ie,pe,ke]),We=kn(e),ae=d.useMemo(()=>vt.slice(0,u).map(X=>Y[X]),[u,Y]),xe=d.useMemo(()=>Fo(u,We,Y),[u,We,Y]),Ae=d.useMemo(()=>gr(u,We,Y),[u,We,Y]),Fe=d.useMemo(()=>ve.map((X,ue)=>xa(Ae[ue]??0,X.paddingLeft,X.paddingRight)),[ve,Ae]),Ve=d.useMemo(()=>{const X=f===0?1/0:f;return(t??[]).slice(0,X).map((he,we)=>({id:we,cells:Object.fromEntries(Yt.map(qe=>[qe,he[qe]??""])),image:he.image,link:he.link}))},[t,f]),nt=ne?I??w:Ve.length,pt=d.useMemo(()=>ne?Ve.slice(0,nt):Ve,[Ve,ne,nt]),mt=ne&&nt<Ve.length,xt=pt.length>1||mt,_t=[oe?`${s}-divider-top`:"",_||xt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),gt=!n||r,je=()=>{if(!gt)return;const X=I??w;if(!S){K(Ve.length);return}K(Math.min(X+S,Ve.length))},me=X=>y.scalingValue(X,n??!1),He=h?E??0:B??0,Be=$??0,Ue=m??0,Bt=He+Ue/2,wt=Math.max(Be,Yr),Tt=mi(0,pt.length,oe,_,mt,g??0,n??!1).borderTopWidth,sn=le!=null?`${le}px`:`calc(${Tt} + ${me(Bt)})`,An=h?"rowPaddingTopB":"rowPaddingTop",$e=ve[0],Ze=ve[ve.length-1],Ge=Fe[0],De=Fe[Fe.length-1],at=$e&&Ge?Math.max(Ge.paddingLeft,hn):0,Zn=Ze&&De?Math.max(De.paddingRight,hn):0,Wr=We,ln=X=>{const ue=ee.current;if(!ue)return{x:0,y:0};const he=ue.getBoundingClientRect();return{x:X.clientX-he.left+gi,y:X.clientY-he.top+gi}},Mr=(X,ue)=>{if(!R)return;const he=X.image;if(!(he!=null&&he.url)){Z(null);return}const{x:we,y:qe}=ln(ue),Ye=(L==null?void 0:L.min)??80,Pe=(L==null?void 0:L.max)??320,ct=(Q==null?void 0:Q.rowId)===X.id?Q.widthPx:pu(Ye,Pe);Z({rowId:X.id,url:he.url,objectFit:"contain",isVideo:Rd(he),widthPx:ct,x:we,y:qe})},Jn=X=>{if(!R||!Q)return;const{x:ue,y:he}=ln(X);Z(we=>!we||we.x===ue&&we.y===he?we:{...we,x:ue,y:he})},er=()=>{Z(null)},Nr=X=>{O&&ui(X,s),R&&Z(null)},Ie=X=>{O&&pi(X,s)};d.useLayoutEffect(()=>{if(!p||h){be(null);return}const X=ge.current,ue=X==null?void 0:X.parentElement;if(!X||!ue){be(null);return}const he=()=>{const qe=X.querySelector("[data-list-row]");if(!qe){be(null);return}const Ye=ue.getBoundingClientRect(),Pe=qe.getBoundingClientRect();be(Pe.top-Ye.top+Pe.height/2)};he();const we=new ResizeObserver(he);return we.observe(X),we.observe(ue),()=>we.disconnect()},[p,h,pt,He,Be,Ue,t,e,ve,Ae,re,g,oe,_,mt]);const st=d.useMemo(()=>!h&&Ao.some(X=>{const ue=X.charAt(0),he=e[`${X}VerticalAlign`];return ya(he,e,ue)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);d.useLayoutEffect(()=>{var ct;const X=ee.current;if(!X)return;const ue=()=>{X.querySelectorAll("[data-list-col]").forEach(dt=>{dt.style.transform="";const Xe=dt.querySelector(`.${s}-list-col`);Xe&&(Xe.style.minHeight="",Xe.style.height="");const ut=dt.querySelector(`.${s}-list-col-title`);ut&&(ut.style.transform="")})};if(h||!st){ue();return}const he=()=>{const dt=Array.from(X.querySelectorAll("[data-list-row]")),Xe=`${s}-list-col`,ut=`${s}-baseline-probe`;dt.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(rt=>{rt.style.transform="";const ot=rt.querySelector(`.${Xe}`);ot&&(ot.style.minHeight="",ot.style.height="");const et=rt.querySelector(`.${s}-list-col-title`);et&&(et.style.transform="")})}),dt.forEach(Me=>{const rt=Array.from(Me.querySelectorAll("[data-list-col]"));Kd(Me,rt,Xe)}),X.offsetHeight,dt.forEach(Me=>{const rt=Array.from(Me.querySelectorAll("[data-list-col]")),ot=Me.getBoundingClientRect().top,et=new Map,cn=rt.map(ze=>{const dn=ze.querySelector(`.${s}-list-col-title`),un={el:ze,titleEl:dn,letter:ze.getAttribute("data-col-letter")??"",kind:ze.getAttribute("data-valign")??"top",anchor:ze.getAttribute("data-valign-anchor")};return et.set(un.letter,un),un}),Qe=new Map,tr=(ze,dn)=>{const un=Qe.get(ze.letter);if(un!==void 0)return un;const Wo=ze.anchor?et.get(ze.anchor):void 0;if(ze.kind!=="baseline"||!Wo||dn.has(ze.letter)){const No=Gr(ze,ot,Xe,ut);return Qe.set(ze.letter,No),No}dn.add(ze.letter);const $a=tr(Wo,dn);dn.delete(ze.letter);const wa=Gr(ze,ot,Xe,ut),Ta=$a-wa;Ud(ze.titleEl,Ta);const Mo=Gr(ze,ot,Xe,ut);return Qe.set(ze.letter,Mo),Mo};cn.forEach(ze=>tr(ze,new Set))})};let we=null;const qe=()=>{we===null&&(we=requestAnimationFrame(()=>{we=null,he()}))};he();const Ye=new ResizeObserver(()=>qe());Ye.observe(X);let Pe=!1;return typeof document<"u"&&((ct=document.fonts)!=null&&ct.ready)&&document.fonts.ready.then(()=>{Pe||qe()}),()=>{Pe=!0,we!==null&&(cancelAnimationFrame(we),we=null),Ye.disconnect(),ue()}},[st,h,e,t,re,pt,Ae]);const lt=d.useMemo(()=>Md(s),[s]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:lt}}),a.jsx("div",{style:Te,children:a.jsxs("div",{ref:ee,className:`${s}-wrapper ${Ee}${_t?` ${_t}`:""}${h?` ${s}-type-b`:""}`.trim(),style:{width:y.scalingValue(x??0,n),...!h&&p?{[`--${s}-first-entry-handle-top`]:sn}:{}},onMouseMove:R?Jn:void 0,onMouseLeave:R?er:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[pt.map((X,ue)=>{var Ye;const he=(((Ye=X.link)==null?void 0:Ye.length)??0)>0,we=he&&(!n||r)?"a":"div",qe=mi(ue,pt.length,oe,_,mt,g??0,n??!1);return a.jsxs(we,{ref:ue===0?Pe=>{ge.current=Pe}:void 0,className:`${s}-list-item${he||P==="always"?` ${s}-list-item-has-link`:""}`,...he?{href:X.link,target:"_blank"}:{},style:qe,onMouseEnter:Pe=>{O&&(he||P==="always")&&ui(Pe,s),R&&Mr(X,Pe)},onMouseLeave:Pe=>{O&&(he||P==="always")&&pi(Pe,s)},children:[He>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:me(He)}}),a.jsxs("div",{className:`${s}-list-cols-row${h?"":` ${s}-list-cols-row-h`}${p&&ue===0&&h?` ${s}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:me(Ue)},children:[ve.map((Pe,ct)=>{const dt=ct===ve.length-1,Xe=Fe[ct],ut=Pe.paddingBottom,Me=Fd(X.cells[Pe.key]),rt=h&&Me&&ut>0,ot=h?{minHeight:me(Ue)}:{width:me(Ae[ct])},et=h?{paddingLeft:me(G),paddingRight:me(G)}:{paddingLeft:me(Xe.paddingLeft),paddingRight:me(Xe.paddingRight)},cn=Pe.textPrefix.charAt(0),Qe=h?Bd(e[`${Pe.textPrefix}VerticalAlign`]):Od(e[`${Pe.textPrefix}VerticalAlign`],e,cn),tr=h&&Me&&p&&ue===0;return a.jsxs("div",{className:h?`${s}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":cn,"data-valign":Qe.kind,...Qe.kind==="baseline"?{"data-valign-anchor":Qe.anchorLetter}:{}},children:[a.jsx("div",{className:`${s}-list-col${dt?` ${s}-list-col-last`:""}`,style:{...et,...ot,...h?{justifyContent:hi(Qe.kind)}:{}},"data-test":Pe.width,children:a.jsx("span",{className:yi(e,Pe.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...fi(Cr(e,Pe.textPrefix),n),...vi(e,Pe.textPrefix,s,n),...h?{}:Dd(Qe.kind)},children:X.cells[Pe.key]??null})}),rt&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:me(ut)}}),tr&&a.jsx(It,{P:s,"data-controls":Pe.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:me(Math.max(ut,Yr))}})]},Pe.key)}),p&&ue===0&&h&&a.jsxs(a.Fragment,{children:[a.jsx(It,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(fe),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:me(se),height:"100%"}}),a.jsx(It,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(fe),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:me(Math.max(se,We-se)),width:me(se),height:"100%"}})]})]}),!h&&Be>0&&a.jsx("div",{className:`${s}-row-padding-handle`,style:{height:me(Be)}}),p&&ue===0&&!h&&a.jsx(It,{P:s,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:me(wt)}})]},X.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx(It,{P:s,"data-controls":An,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Tt,left:0,width:"100%",height:me(Math.max(He,Yr))}})},"row-padding-handles"),p&&!h&&$e&&Ze&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(It,{P:s,"data-controls":$e.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[0]-((Ge==null?void 0:Ge.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:me(at),height:"100%"}}),a.jsx(It,{P:s,"data-controls":Ze.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ae[ve.length-1]-((De==null?void 0:De.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:me(Wr-Zn),width:me(Zn),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const he=ve[ue+1],we=xe.slice(0,ue+1).reduce((dt,Xe)=>dt+Xe,0),qe=Fe[ue],Ye=Fe[ue+1],Pe=Math.max(qe.paddingRight,hn),ct=Math.max(Ye.paddingLeft,hn);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx(It,{P:s,"data-controls":X.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue]-qe.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:me(we-Pe),width:me(Pe),height:"100%"}}),a.jsx(It,{P:s,"data-controls":he.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ae[ue+1]-Ye.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:me(we),width:me(ct),height:"100%"}})]},`${X.paddingRightKey}-padding`)}),p&&!h&&ve.slice(0,-1).map((X,ue)=>{const he=uu(ue,xe,ae,We),qe=xe.slice(0,ue+1).reduce((Ye,Pe)=>Ye+Pe,0)-bi/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(ko),"data-controls-max-fraction":String(he),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:me(qe),width:me(bi),height:"calc(100%)",pointerEvents:"auto"}})},`${X.widthKey}-junction`)})]}),mt&&(()=>{const X=Cr(e,Nt),ue=zd(e.cutLabelVerticalAlign),he=X.textTextAlign==="justify"||h;return a.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:me(v??0),cursor:gt?"pointer":"default",...Wd(_,g??0,n??!1)},onClick:gt?je:void 0,onMouseEnter:O||R?Nr:void 0,onMouseLeave:O?Ie:void 0,children:a.jsx("div",{className:`${s}-list-cols-row`,style:{...h?{paddingLeft:me(G),paddingRight:me(G)}:{},justifyContent:jd(X.textTextAlign),alignItems:hi(ue)},children:a.jsx("span",{className:yi(e,Nt,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...fi(X,n),...vi(e,Nt,s,n),...he?{width:"100%"}:{}},children:M})})})})(),R&&Q&&(()=>{const X=mr(Q.widthPx),ue={width:X,height:"auto",maxHeight:X,objectFit:"contain",left:Q.x,top:Q.y,position:"absolute"};return a.jsx(kd,{media:Q,className:Q.isVideo?`${s}-hover-video`:`${s}-hover-image`,style:ue},`${Q.rowId}-${Q.url}`)})()]})})]})}const fu=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5449
5449
  import { CommonComponentProps } from '../props';
5450
5450
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5451
5451
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8457,7 +8457,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8457
8457
  </>
8458
8458
  );
8459
8459
  }
8460
- `,_n=["A","B","C","D","E"],Ci=[...ao,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Qt={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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function yu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function lr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function vu(){return Object.fromEntries(_n.map((e,t)=>{const n=qt[t],r=`${e} column`;return[n,yu(r)]}))}function bu(){const e={};for(const t of _n)e[`${t}ColumnWidth`]=lr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=lr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=lr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=lr(`${t} column padding bottom`);return e}function Si(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...qt]};for(const l of _n)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function xu(e){const t={};if(e===Mt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ao]},enum:[...ao]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Ci],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Ci]}}return t[_e(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[_e(e,"textFontSettings")]={...Qt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[_e(e,"textFontSize")]={...Qt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[_e(e,"textLineHeight")]={...Qt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[_e(e,"textLetterSpacing")]={...Qt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[_e(e,"textWordSpacing")]={...Qt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[_e(e,"textTextAlign")]={...Qt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[_e(e,"textTextAppearance")]={...Qt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const $u=Io.reduce((e,t)=>({...e,...xu(t)}),{});function Cu(e){return{verticalAlign:e===Mt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Mt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Su(e,t={}){var n;return{...Cu(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const wi=new Set(["textFontFamily","textFontSettings"]);function wu(e,t,n){const r=l=>n===void 0?!0:n==="common"?wi.has(l):!wi.has(l),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=ko(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[_e(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[_e(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[_e(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[_e(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[_e(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[_e(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[_e(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[_e(e,"textTextAppearance")]=t.textTextAppearance),i}function hr(e={},t){return Io.reduce((n,r)=>({...n,...wu(r,Su(r,e),t)}),{})}const Tu=hr(),Lu=Qd();function Ca(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing"),_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Pu(){const e=[];return Ao.forEach((t,n)=>{const r=qt[n],i=Ca(t);for(let l=1;l<qt.length;l+=1){const o=[{name:"columns",value:l},...Array.from({length:l},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:o,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Eu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Ca(Mt);const _u=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Zt=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Au=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Zt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Zt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Zt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Zt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Zt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Zt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Zt[6],link:""}],Iu=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],ku={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...vu(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",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"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Au},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...bu(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...$u,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Tu,...hr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Si({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...hr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Si({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...hr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Pu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},..._u.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},..._n.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Iu]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Lu]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Ru={element:hu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>cu(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:ku,sourceCode:fu},Ti=300,Jt=.004,Li=12;function Fu(e){const t={position:"absolute",width:Li,height:Li,pointerEvents:"auto"};return e==="left-y"?{...t,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...t,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}:{...t,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function en({className:e,areaStyle:t,hitPlacement:n,...r}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...r,children:a.jsx("div",{style:Fu(n)})})}const Wu={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",dividerHoverColor:"divider-hover-color",backgroundHoverColor:"background-hover-color"},Mu=["hover","focus","filled","success","error"];function Hu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Nu(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY-r.top>r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function Bu(e,t){const n=e.currentTarget,r=n.getBoundingClientRect(),i=e.clientY<r.top+r.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,i)}function Pi(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Ei(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-text-leading-gap`]:v.scalingValue((i-t)/2,r)}}function Ou(e){return`
8460
+ `,_n=["A","B","C","D","E"],Si=[...ao,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],en={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"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function yu(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function lr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function vu(){return Object.fromEntries(_n.map((e,t)=>{const n=Yt[t],r=`${e} column`;return[n,yu(r)]}))}function bu(){const e={};for(const t of _n)e[`${t}ColumnWidth`]=lr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=lr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=lr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=lr(`${t} column padding bottom`);return e}function $i(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Yt]};for(const l of _n)r[`${l}ColumnWidth`]=l==="A"?.0798:.32,r[`${l}ColumnPaddingLeft`]=0,r[`${l}ColumnPaddingRight`]=0,r[`${l}ColumnPaddingBottom`]=0;const i=n.type==="b"&&t?t:{};return{...r,...i,...n}}function xu(e){const t={};if(e===Nt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...ao]},enum:[...ao]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Si],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Si]}}return t[_e(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[_e(e,"textFontSettings")]={...en.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[_e(e,"textFontSize")]={...en.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[_e(e,"textLineHeight")]={...en.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[_e(e,"textLetterSpacing")]={...en.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[_e(e,"textWordSpacing")]={...en.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[_e(e,"textTextAlign")]={...en.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[_e(e,"textTextAppearance")]={...en.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Cu=Io.reduce((e,t)=>({...e,...xu(t)}),{});function Su(e){return{verticalAlign:e===Nt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Nt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function $u(e,t={}){var n;return{...Su(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const wi=new Set(["textFontFamily","textFontSettings"]);function wu(e,t,n){const r=l=>n===void 0?!0:n==="common"?wi.has(l):!wi.has(l),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Ro(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[_e(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[_e(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[_e(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[_e(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[_e(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[_e(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[_e(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[_e(e,"textTextAppearance")]=t.textTextAppearance),i}function hr(e={},t){return Io.reduce((n,r)=>({...n,...wu(r,$u(r,e),t)}),{})}const Tu=hr(),Lu=Qd();function Sa(e){return[_e(e,"textFontFamily"),_e(e,"textFontSettings"),_e(e,"textFontSize"),_e(e,"textLineHeight"),_e(e,"textLetterSpacing"),_e(e,"textWordSpacing"),_e(e,"textTextAlign"),_e(e,"textTextAppearance"),`${e}VerticalAlign`]}function Pu(){const e=[];return Ao.forEach((t,n)=>{const r=Yt[n],i=Sa(t);for(let l=1;l<Yt.length;l+=1){const o=[{name:"columns",value:l},...Array.from({length:l},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:o,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Eu=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Sa(Nt);const _u=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],tn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Au=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:tn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:tn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:tn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:tn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:tn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:tn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:tn[6],link:""}],Iu=[..._n.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Ru={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...vu(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",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"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Au},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...bu(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Cu,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Tu,...hr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:$i({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...hr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:$i({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...hr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Pu(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},..._u.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},..._n.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Iu]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Lu]}],paletteBookmark:{items:[...Eu],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},ku={element:hu,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>cu(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ru,sourceCode:fu},Ti=300,Dt=.004,Li=12;function Fu(e){const t={position:"absolute",width:Li,height:Li,pointerEvents:"auto"};return e==="left-y"?{...t,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...t,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}:{...t,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function zt({className:e,areaStyle:t,hitPlacement:n,...r}){return a.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...r,children:a.jsx("div",{style:Fu(n)})})}const Wu={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Mu=["hover","focus","filled","success","error"];function Nu(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Pi(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Ei(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-text-leading-gap`]:y.scalingValue((i-t)/2,r)}}function Hu(e){return`
8461
8461
  .${e}-wrapper {
8462
8462
  box-sizing: border-box;
8463
8463
  display: flex;
@@ -8476,21 +8476,13 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8476
8476
  border-top-style: var(--${e}-divider-style);
8477
8477
  border-top-color: var(--${e}-divider-color);
8478
8478
  }
8479
- .${e}-wrapper.${e}-entry-hover-default .${e}-item,
8480
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item,
8481
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item {
8482
- transition: background-color 250ms, border-color 250ms;
8479
+ .${e}-wrapper.${e}-entry-hover-default .${e}-item {
8480
+ transition: border-color 250ms;
8483
8481
  }
8484
- .${e}-wrapper.${e}-entry-hover-default .${e}-question-button,
8485
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-question-button,
8486
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-question-button {
8482
+ .${e}-wrapper.${e}-entry-hover-default .${e}-question-button {
8487
8483
  transition: color 250ms;
8488
8484
  }
8489
8485
  .${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover,
8490
- .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) {
8491
- background-color: var(--${e}-background-hover-color);
8492
- }
8493
- .${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover,
8494
8486
  .${e}-wrapper.${e}-entry-hover-default .${e}-item:has(+ .${e}-item:not(.${e}-item-open):hover),
8495
8487
  .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) {
8496
8488
  border-bottom-color: var(--${e}-divider-hover-color, var(--${e}-divider-color));
@@ -8499,72 +8491,10 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8499
8491
  .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open):first-child {
8500
8492
  border-top-color: var(--${e}-divider-hover-color, var(--${e}-divider-color));
8501
8493
  }
8502
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item:not(.${e}-item-open):hover,
8503
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item:has(+ .${e}-item:not(.${e}-item-open):hover),
8504
- .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-item:not(.${e}-item-open),
8505
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item:not(.${e}-item-open):hover,
8506
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item:has(+ .${e}-item:not(.${e}-item-open):hover),
8507
- .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-item:not(.${e}-item-open) {
8508
- border-bottom-color: var(--${e}-divider-hover-color, var(--${e}-divider-color));
8509
- }
8510
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item:not(.${e}-item-open):hover:first-child,
8511
- .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-item:not(.${e}-item-open):first-child,
8512
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item:not(.${e}-item-open):hover:first-child,
8513
- .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-item:not(.${e}-item-open):first-child {
8514
- border-top-color: var(--${e}-divider-hover-color, var(--${e}-divider-color));
8515
- }
8516
8494
  .${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover .${e}-question-button,
8517
- .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-question-button,
8518
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item:not(.${e}-item-open):hover .${e}-question-button,
8519
- .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-question-button,
8520
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item:not(.${e}-item-open):hover .${e}-question-button,
8521
- .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-question-button {
8495
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-question-button {
8522
8496
  color: var(--${e}-question-hover-color, var(--${e}-question-color));
8523
8497
  }
8524
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item::before,
8525
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item::before {
8526
- content: '';
8527
- position: absolute;
8528
- inset: 0;
8529
- background: var(--${e}-background-hover-color);
8530
- transform: scaleY(0);
8531
- z-index: 0;
8532
- pointer-events: none;
8533
- }
8534
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item::before {
8535
- transform-origin: center center;
8536
- opacity: 0;
8537
- transition: opacity 150ms, transform 0s 250ms;
8538
- }
8539
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item:not(.${e}-item-open):hover::before,
8540
- .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-item:not(.${e}-item-open)::before {
8541
- transform: scaleY(1);
8542
- opacity: 1;
8543
- transition: transform 250ms, opacity 250ms;
8544
- }
8545
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item::before {
8546
- transform-origin: bottom center;
8547
- transition: transform 120ms;
8548
- }
8549
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item:not(.${e}-item-open):hover::before,
8550
- .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-item:not(.${e}-item-open)::before {
8551
- transform: scaleY(1);
8552
- transform-origin: top center;
8553
- }
8554
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item.${e}-reveal-from-bottom::before {
8555
- transform-origin: top center;
8556
- }
8557
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item.${e}-reveal-from-bottom:not(.${e}-item-open):hover::before,
8558
- .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-item.${e}-reveal-from-bottom:not(.${e}-item-open)::before {
8559
- transform-origin: bottom center;
8560
- }
8561
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-question-button,
8562
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-panel,
8563
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-question-button,
8564
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-panel {
8565
- position: relative;
8566
- z-index: 1;
8567
- }
8568
8498
  .${e}-question-button {
8569
8499
  display: flex;
8570
8500
  flex-direction: column;
@@ -8583,7 +8513,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8583
8513
  display: flex;
8584
8514
  align-items: center;
8585
8515
  justify-content: space-between;
8586
- gap: ${Hu(12)};
8516
+ gap: ${Nu(12)};
8587
8517
  width: 100%;
8588
8518
  min-width: 0;
8589
8519
  min-height: var(--${e}-question-min-height, unset);
@@ -8626,14 +8556,14 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8626
8556
  transition: background-color 250ms;
8627
8557
  }
8628
8558
  .${e}-wrapper.${e}-entry-hover-default .${e}-item:not(.${e}-item-open):hover .${e}-icon-image,
8629
- .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-icon-image,
8630
- .${e}-wrapper.${e}-entry-hover-blinds .${e}-item:not(.${e}-item-open):hover .${e}-icon-image,
8631
- .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-icon-image,
8632
- .${e}-wrapper.${e}-entry-hover-reveal .${e}-item:not(.${e}-item-open):hover .${e}-icon-image,
8633
- .${e}-wrapper.${e}-entry-hover-reveal.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-icon-image {
8559
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-item:not(.${e}-item-open) .${e}-icon-image {
8634
8560
  --fill: var(--${e}-icon-hover-color, var(--${e}-icon-color)) !important;
8635
8561
  --hover-fill: var(--${e}-icon-hover-color, var(--${e}-icon-color)) !important;
8636
8562
  }
8563
+ .${e}-item-open .${e}-icon-image {
8564
+ --fill: var(--${e}-icon-active-color, var(--${e}-icon-color)) !important;
8565
+ --hover-fill: var(--${e}-icon-active-color, var(--${e}-icon-color)) !important;
8566
+ }
8637
8567
  .${e}-item-open .${e}-icon-anim-45 {
8638
8568
  transform: rotate(45deg);
8639
8569
  }
@@ -8714,7 +8644,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8714
8644
  left: 20px;
8715
8645
  transform: translateY(-50%);
8716
8646
  }
8717
- `}function _i(e,t,n,r,i,l,o,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function Vu({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l}){const{prefix:o}=v.useScopedStyles(),c=i??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:y="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:$=0,iconAnimation:w="rotate 45",questionColor:C="#000000",answerColor:b="#000000",dividerColor:M="#0000001F",iconColor:L="#000000",questionHoverColor:H="#666666",iconHoverColor:x="#666666",dividerHoverColor:P="#000000",backgroundHoverColor:V="#0000000A",questionFontFamily:S,questionFontSettings:E,questionFontSize:A,questionLineHeight:F,questionLetterSpacing:q,questionWordSpacing:ee,questionTextAppearance:R,answerFontFamily:W,answerFontSettings:z,answerFontSize:N,answerLineHeight:I,answerLetterSpacing:U,answerWordSpacing:X,answerTextAppearance:Q,questionPaddingLeft:k=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:te=0,answerPaddingTop:me=0,answerPaddingBottom:le=0}=e,$e=t??[],[re,de]=d.useState(()=>new Set),D=!n||r;d.useEffect(()=>{r||de(new Set)},[r]);const O=Ke=>v.scalingValue(Ke,n??!1),J=Math.max(k,Jt),se=Math.max(ne,Jt),fe=Math.max(h,Jt),Te=Math.max(te,Jt),Ce=Math.max(me,Jt),Le=Math.max(le,Jt),Ee=Math.max(0,(s??1)-$-g),B=Math.max(0,s??1),oe=Math.max($,Jt),_=Math.max(0,(s??1)-k-g),j=d.useCallback(Ke=>c?!0:re.has(Ke),[re,c]),K=D?y==="default"?`${o}-entry-hover-default`:y==="blinds"?`${o}-entry-hover-blinds`:y==="reveal"?`${o}-entry-hover-reveal`:"":"",G=y==="reveal"&&D,ie=m??"",pe=ie!=="",Fe=w.replace(/^rotate /,""),ge=`${o}-icon-anim-${Fe}`,ye=vt(tt(_i(S,E,A,F,q,ee,R,C),n)),We=vt(tt(_i(W,z,N,I,U,X,Q,b),n)),ae=Pi(A,F,`${o}-question`,`${o}-text-tight-leading`),be=Pi(N,I,`${o}-answer-text`,`${o}-text-tight-leading`),Ae=Ei(A,F,o,n),Re=Ei(N,I,o,n),Oe=v.buildColorVars(o,{questionColor:C,answerColor:b,dividerColor:M,iconColor:L,questionHoverColor:H,iconHoverColor:x,dividerHoverColor:P,backgroundHoverColor:V},Wu,Mu),ot=l&&l!=="default"?`${o}-state-${l}`:"",gt=d.useCallback(Ke=>{D&&de(Ue=>{if(Ue.has(Ke)){const ve=new Set(Ue);return ve.delete(Ke),ve}if(f==="on")return new Set([Ke]);const Je=new Set(Ue);return Je.add(Ke),Je})},[D,f]),ht=d.useMemo(()=>Ou(o),[o]),$t={[`--${o}-divider-width`]:v.scalingValue(u,n??!1),[`--${o}-divider-style`]:T,[`--${o}-icon-max-width`]:v.scalingValue(g,n??!1),...p>0?{[`--${o}-question-min-height`]:v.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ht}}),a.jsx("div",{style:Oe,children:a.jsx("div",{className:`${o}-wrapper${n&&!r?` ${o}-editor`:""} ${K} ${ot}`.trim(),style:{width:v.scalingValue(s,n??!1),maxWidth:"100%",...$t},children:$e.map((Ke,Ue)=>{var Bt;const Je=j(Ue),ve=((Bt=Ke.question)==null?void 0:Bt.trim())??"",Be=Ke.answer,ze=((Be==null?void 0:Be.length)??0)>0,Ye=Ue===0;return a.jsxs("div",{className:`${o}-item${Je?` ${o}-item-open`:""}`.trim(),"data-faq-item":"",onMouseEnter:G&&!Je?Et=>Nu(Et,o):void 0,onMouseLeave:G&&!Je?Et=>Bu(Et,o):void 0,children:[a.jsxs("div",{className:`${o}-question-controls`,children:[c&&Ye&&a.jsxs(a.Fragment,{children:[a.jsx(en,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:O(se),zIndex:2}}),a.jsx(en,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ee),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:O(J),height:"100%",zIndex:2}}),a.jsx(en,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:O(oe),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${o}-question-button`,"aria-expanded":Je,style:{...ye,...Ae,paddingLeft:O(k),paddingRight:O($)},onClick:()=>gt(Ue),children:[ne>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:O(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${o}-question-row`,children:[a.jsx("span",{className:ae,children:ve}),ze&&(pe?a.jsx("span",{className:`${o}-icon ${o}-icon-custom ${ge}`,"aria-hidden":"true",children:a.jsx(Wt,{url:ie,fill:L,hoverFill:x,className:`${o}-icon-image`})}):a.jsx("span",{className:`${o}-icon ${o}-icon-default ${ge}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:O(h)},"aria-hidden":"true"})]}),c&&Ye&&a.jsx(en,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:O(fe),zIndex:2}})]}),ze&&Be&&a.jsx("div",{className:`${o}-panel`,"aria-hidden":!Je,children:a.jsx("div",{className:`${o}-panel-inner`,children:a.jsxs("div",{className:`${o}-answer-controls`,children:[c&&Ye&&a.jsxs(a.Fragment,{children:[a.jsx(en,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:O(Ce),zIndex:2}}),a.jsx(en,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(B),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:O(Te),height:"100%",zIndex:2}})]}),me>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:O(me)}}),a.jsx("div",{className:`${o}-answer`,style:{...We,...Re,paddingLeft:O(te)},children:a.jsx("div",{className:be,children:a.jsx(Cn,{content:Be})})}),le>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:O(le)}}),c&&Ye&&a.jsx(en,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:O(Le),zIndex:2}})]})})})]},Ue)})})})]})}const Du=`import { useCallback, useEffect, useMemo, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
8647
+ `}function _i(e,t,n,r,i,l,o,c){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:r,letterSpacing:i??0,wordSpacing:l??0,textAppearance:o,color:c??"#000000"}}function Ou({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:l}){const{prefix:o}=y.useScopedStyles(),c=i??!1,{wrapperWidth:s=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:T="solid",entryHoverEffect:x="default",autoclose:f="off",icon:m,iconMaxWidth:g=.00833,iconPaddingRight:C=0,iconAnimation:w="rotate 45",questionColor:S="#000000",answerColor:v="#000000",dividerColor:M="#0000001F",iconColor:L="#000000",questionHoverColor:N="#666666",iconHoverColor:b="#666666",iconActiveColor:P="#000000",dividerHoverColor:B="#000000",questionFontFamily:$,questionFontSettings:E,questionFontSize:A,questionLineHeight:F,questionLetterSpacing:j,questionWordSpacing:te,questionTextAppearance:k,answerFontFamily:W,answerFontSettings:D,answerFontSize:H,answerLineHeight:I,answerLetterSpacing:K,answerWordSpacing:Q,answerTextAppearance:Z,questionPaddingLeft:R=0,questionPaddingTop:ne=0,questionPaddingBottom:h=0,answerPaddingLeft:ee=0,answerPaddingRight:ge=0,answerPaddingTop:le=0,answerPaddingBottom:be=0}=e,re=t??[],[de,V]=d.useState(()=>new Set),U=!n||r;d.useEffect(()=>{r||V(new Set)},[r]),d.useEffect(()=>{V(new Set)},[f]);const G=je=>y.scalingValue(je,n??!1),se=Math.max(R,Dt),fe=Math.max(ne,Dt),Te=Math.max(h,Dt),Se=Math.max(ee,Dt),Le=Math.max(ge,Dt),Ee=Math.max(le,Dt),O=Math.max(be,Dt),oe=Math.max(0,(s??1)-C-g),_=Math.max(0,(s??1)-ge),z=Math.max(0,(s??1)-ee),q=Math.max(C,Dt),Y=Math.max(0,(s??1)-R-g),ie=d.useCallback(je=>c?je===0:de.has(je),[de,c]),pe=U&&x==="default"?`${o}-entry-hover-default`:"",ke=m??"",ye=ke!=="",ve=w.replace(/^rotate /,""),We=`${o}-icon-anim-${ve}`,ae=yt(Je(_i($,E,A,F,j,te,k,S),n)),xe=yt(Je(_i(W,D,H,I,K,Q,Z,v),n)),Ae=Pi(A,F,`${o}-question`,`${o}-text-tight-leading`),Fe=Pi(H,I,`${o}-answer-text`,`${o}-text-tight-leading`),Ve=Ei(A,F,o,n),nt=Ei(H,I,o,n),pt=y.buildColorVars(o,{questionColor:S,answerColor:v,dividerColor:M,iconColor:L,questionHoverColor:N,iconHoverColor:b,iconActiveColor:P,dividerHoverColor:B},Wu,Mu),mt=l&&l!=="default"?`${o}-state-${l}`:"",xt=d.useCallback(je=>{U&&V(me=>{if(me.has(je)){const Be=new Set(me);return Be.delete(je),Be}if(f==="on")return new Set([je]);const He=new Set(me);return He.add(je),He})},[U,f]),_t=d.useMemo(()=>Hu(o),[o]),gt={[`--${o}-divider-width`]:y.scalingValue(u,n??!1),[`--${o}-divider-style`]:T,[`--${o}-icon-max-width`]:y.scalingValue(g,n??!1),...p>0?{[`--${o}-question-min-height`]:y.scalingValue(p,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_t}}),a.jsx("div",{style:pt,children:a.jsx("div",{className:`${o}-wrapper${n&&!r?` ${o}-editor`:""} ${pe} ${mt}`.trim(),style:{width:y.scalingValue(s,n??!1),maxWidth:"100%",...gt},children:re.map((je,me)=>{var Tt;const He=ie(me),Be=((Tt=je.question)==null?void 0:Tt.trim())??"",Ue=je.answer,Bt=((Ue==null?void 0:Ue.length)??0)>0,wt=me===0;return a.jsxs("div",{className:`${o}-item${He?` ${o}-item-open`:""}`.trim(),"data-faq-item":"",children:[a.jsxs("div",{className:`${o}-question-controls`,children:[c&&wt&&a.jsxs(a.Fragment,{children:[a.jsx(zt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(fe),zIndex:2}}),a.jsx(zt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(oe),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(se),height:"100%",zIndex:2}}),a.jsx(zt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Y),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(q),height:"100%",zIndex:2}})]}),a.jsxs("button",{type:"button",className:`${o}-question-button`,"aria-expanded":He,style:{...ae,...Ve,paddingLeft:G(R),paddingRight:G(C)},onClick:()=>xt(me),children:[ne>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(ne)},"aria-hidden":"true"}),a.jsxs("span",{className:`${o}-question-row`,children:[a.jsx("span",{className:Ae,children:Be}),Bt&&(ye?a.jsx("span",{className:`${o}-icon ${o}-icon-custom ${We}`,"aria-hidden":"true",children:a.jsx(Mt,{url:ke,fill:L,hoverFill:b,className:`${o}-icon-image`})}):a.jsx("span",{className:`${o}-icon ${o}-icon-default ${We}`,"aria-hidden":"true"}))]}),h>0&&a.jsx("span",{className:`${o}-padding-handle`,style:{height:G(h)},"aria-hidden":"true"})]}),c&&wt&&a.jsx(zt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(Te),zIndex:2}})]}),Bt&&Ue&&a.jsx("div",{className:`${o}-panel`,"aria-hidden":!He,children:a.jsx("div",{className:`${o}-panel-inner`,children:a.jsxs("div",{className:`${o}-answer-controls`,children:[c&&wt&&a.jsxs(a.Fragment,{children:[a.jsx(zt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:G(Ee),zIndex:2}}),a.jsx(zt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:G(Se),height:"100%",zIndex:2}}),a.jsx(zt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:G(Le),height:"100%",zIndex:2}})]}),le>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(le)}}),a.jsx("div",{className:`${o}-answer`,style:{...xe,...nt,paddingLeft:G(ee),paddingRight:G(ge)},children:a.jsx("div",{className:Fe,children:a.jsx(Sn,{content:Ue})})}),be>0&&a.jsx("div",{className:`${o}-padding-handle`,style:{height:G(be)}}),c&&wt&&a.jsx(zt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:G(O),zIndex:2}})]})})})]},me)})})})]})}const Bu=`import { useCallback, useEffect, useMemo, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
8718
8648
  import { CommonComponentProps } from '../props';
8719
8649
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
8720
8650
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8731,7 +8661,7 @@ type FAQSettings = {
8731
8661
  cellMinHeight?: number;
8732
8662
  dividerWidth?: number;
8733
8663
  dividerStyle?: 'solid' | 'dashed' | 'dotted';
8734
- entryHoverEffect?: 'none' | 'default' | 'blinds' | 'reveal';
8664
+ entryHoverEffect?: 'none' | 'default';
8735
8665
  autoclose?: 'on' | 'off';
8736
8666
  icon?: string | null;
8737
8667
  iconMaxWidth?: number;
@@ -8743,8 +8673,8 @@ type FAQSettings = {
8743
8673
  iconColor?: string;
8744
8674
  questionHoverColor?: string;
8745
8675
  iconHoverColor?: string;
8676
+ iconActiveColor?: string;
8746
8677
  dividerHoverColor?: string;
8747
- backgroundHoverColor?: string;
8748
8678
  questionFontFamily?: string;
8749
8679
  questionFontSettings?: { fontWeight: number; fontStyle: string };
8750
8680
  questionFontSize?: number;
@@ -8763,6 +8693,7 @@ type FAQSettings = {
8763
8693
  questionPaddingTop?: number;
8764
8694
  questionPaddingBottom?: number;
8765
8695
  answerPaddingLeft?: number;
8696
+ answerPaddingRight?: number;
8766
8697
  answerPaddingTop?: number;
8767
8698
  answerPaddingBottom?: number;
8768
8699
  };
@@ -8835,8 +8766,8 @@ type ColorKeys =
8835
8766
  | 'iconColor'
8836
8767
  | 'questionHoverColor'
8837
8768
  | 'iconHoverColor'
8838
- | 'dividerHoverColor'
8839
- | 'backgroundHoverColor';
8769
+ | 'iconActiveColor'
8770
+ | 'dividerHoverColor';
8840
8771
 
8841
8772
  const COLOR_VAR_MAP: Record<ColorKeys, string> = {
8842
8773
  questionColor: 'question-color',
@@ -8845,8 +8776,8 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
8845
8776
  iconColor: 'icon-color',
8846
8777
  questionHoverColor: 'question-hover-color',
8847
8778
  iconHoverColor: 'icon-hover-color',
8779
+ iconActiveColor: 'icon-active-color',
8848
8780
  dividerHoverColor: 'divider-hover-color',
8849
- backgroundHoverColor: 'background-hover-color',
8850
8781
  };
8851
8782
 
8852
8783
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
@@ -8855,20 +8786,6 @@ function sv(px: number): string {
8855
8786
  return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
8856
8787
  }
8857
8788
 
8858
- function setRevealOpenDirectionFromMouseEnter(event: React.MouseEvent<HTMLElement>, prefix: string): void {
8859
- const el = event.currentTarget;
8860
- const rect = el.getBoundingClientRect();
8861
- const fromBottom = event.clientY - rect.top > rect.height / 2;
8862
- el.classList.toggle(\`\${prefix}-reveal-from-bottom\`, fromBottom);
8863
- }
8864
-
8865
- function setRevealCloseDirectionFromMouseLeave(event: React.MouseEvent<HTMLElement>, prefix: string): void {
8866
- const el = event.currentTarget;
8867
- const rect = el.getBoundingClientRect();
8868
- const exitToTop = event.clientY < rect.top + rect.height / 2;
8869
- el.classList.toggle(\`\${prefix}-reveal-from-bottom\`, exitToTop);
8870
- }
8871
-
8872
8789
  function getTextClassName(
8873
8790
  fontSize: number | undefined,
8874
8791
  lineHeight: number | undefined,
@@ -8920,21 +8837,13 @@ function getCSS(P: string): string {
8920
8837
  border-top-style: var(--\${P}-divider-style);
8921
8838
  border-top-color: var(--\${P}-divider-color);
8922
8839
  }
8923
- .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item,
8924
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item,
8925
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item {
8926
- transition: background-color 250ms, border-color 250ms;
8840
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item {
8841
+ transition: border-color 250ms;
8927
8842
  }
8928
- .\${P}-wrapper.\${P}-entry-hover-default .\${P}-question-button,
8929
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-question-button,
8930
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-question-button {
8843
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-question-button {
8931
8844
  transition: color 250ms;
8932
8845
  }
8933
8846
  .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover,
8934
- .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) {
8935
- background-color: var(--\${P}-background-hover-color);
8936
- }
8937
- .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover,
8938
8847
  .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:has(+ .\${P}-item:not(.\${P}-item-open):hover),
8939
8848
  .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) {
8940
8849
  border-bottom-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));
@@ -8943,72 +8852,10 @@ function getCSS(P: string): string {
8943
8852
  .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open):first-child {
8944
8853
  border-top-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));
8945
8854
  }
8946
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item:not(.\${P}-item-open):hover,
8947
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item:has(+ .\${P}-item:not(.\${P}-item-open):hover),
8948
- .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-item:not(.\${P}-item-open),
8949
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item:not(.\${P}-item-open):hover,
8950
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item:has(+ .\${P}-item:not(.\${P}-item-open):hover),
8951
- .\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) {
8952
- border-bottom-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));
8953
- }
8954
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item:not(.\${P}-item-open):hover:first-child,
8955
- .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-item:not(.\${P}-item-open):first-child,
8956
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item:not(.\${P}-item-open):hover:first-child,
8957
- .\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-item:not(.\${P}-item-open):first-child {
8958
- border-top-color: var(--\${P}-divider-hover-color, var(--\${P}-divider-color));
8959
- }
8960
8855
  .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover .\${P}-question-button,
8961
- .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-question-button,
8962
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item:not(.\${P}-item-open):hover .\${P}-question-button,
8963
- .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-question-button,
8964
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item:not(.\${P}-item-open):hover .\${P}-question-button,
8965
- .\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-question-button {
8856
+ .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-question-button {
8966
8857
  color: var(--\${P}-question-hover-color, var(--\${P}-question-color));
8967
8858
  }
8968
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item::before,
8969
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item::before {
8970
- content: '';
8971
- position: absolute;
8972
- inset: 0;
8973
- background: var(--\${P}-background-hover-color);
8974
- transform: scaleY(0);
8975
- z-index: 0;
8976
- pointer-events: none;
8977
- }
8978
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item::before {
8979
- transform-origin: center center;
8980
- opacity: 0;
8981
- transition: opacity 150ms, transform 0s 250ms;
8982
- }
8983
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item:not(.\${P}-item-open):hover::before,
8984
- .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-item:not(.\${P}-item-open)::before {
8985
- transform: scaleY(1);
8986
- opacity: 1;
8987
- transition: transform 250ms, opacity 250ms;
8988
- }
8989
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item::before {
8990
- transform-origin: bottom center;
8991
- transition: transform 120ms;
8992
- }
8993
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item:not(.\${P}-item-open):hover::before,
8994
- .\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-item:not(.\${P}-item-open)::before {
8995
- transform: scaleY(1);
8996
- transform-origin: top center;
8997
- }
8998
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item.\${P}-reveal-from-bottom::before {
8999
- transform-origin: top center;
9000
- }
9001
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item.\${P}-reveal-from-bottom:not(.\${P}-item-open):hover::before,
9002
- .\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-item.\${P}-reveal-from-bottom:not(.\${P}-item-open)::before {
9003
- transform-origin: bottom center;
9004
- }
9005
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-question-button,
9006
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-panel,
9007
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-question-button,
9008
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-panel {
9009
- position: relative;
9010
- z-index: 1;
9011
- }
9012
8859
  .\${P}-question-button {
9013
8860
  display: flex;
9014
8861
  flex-direction: column;
@@ -9070,14 +8917,14 @@ function getCSS(P: string): string {
9070
8917
  transition: background-color 250ms;
9071
8918
  }
9072
8919
  .\${P}-wrapper.\${P}-entry-hover-default .\${P}-item:not(.\${P}-item-open):hover .\${P}-icon-image,
9073
- .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-icon-image,
9074
- .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-item:not(.\${P}-item-open):hover .\${P}-icon-image,
9075
- .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-icon-image,
9076
- .\${P}-wrapper.\${P}-entry-hover-reveal .\${P}-item:not(.\${P}-item-open):hover .\${P}-icon-image,
9077
- .\${P}-wrapper.\${P}-entry-hover-reveal.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-icon-image {
8920
+ .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-item:not(.\${P}-item-open) .\${P}-icon-image {
9078
8921
  --fill: var(--\${P}-icon-hover-color, var(--\${P}-icon-color)) !important;
9079
8922
  --hover-fill: var(--\${P}-icon-hover-color, var(--\${P}-icon-color)) !important;
9080
8923
  }
8924
+ .\${P}-item-open .\${P}-icon-image {
8925
+ --fill: var(--\${P}-icon-active-color, var(--\${P}-icon-color)) !important;
8926
+ --hover-fill: var(--\${P}-icon-active-color, var(--\${P}-icon-color)) !important;
8927
+ }
9081
8928
  .\${P}-item-open .\${P}-icon-anim-45 {
9082
8929
  transform: rotate(45deg);
9083
8930
  }
@@ -9206,8 +9053,8 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9206
9053
  iconColor = '#000000',
9207
9054
  questionHoverColor = '#666666',
9208
9055
  iconHoverColor = '#666666',
9056
+ iconActiveColor = '#000000',
9209
9057
  dividerHoverColor = '#000000',
9210
- backgroundHoverColor = '#0000000A',
9211
9058
  questionFontFamily,
9212
9059
  questionFontSettings,
9213
9060
  questionFontSize,
@@ -9226,6 +9073,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9226
9073
  questionPaddingTop = 0,
9227
9074
  questionPaddingBottom = 0,
9228
9075
  answerPaddingLeft = 0,
9076
+ answerPaddingRight = 0,
9229
9077
  answerPaddingTop = 0,
9230
9078
  answerPaddingBottom = 0,
9231
9079
  } = settings;
@@ -9238,35 +9086,34 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9238
9086
  setOpenIndices(new Set());
9239
9087
  }
9240
9088
  }, [isPreviewMode]);
9089
+
9090
+ useEffect(() => {
9091
+ setOpenIndices(new Set());
9092
+ }, [autoclose]);
9241
9093
  const scaled = (value: number) => scalingValue(value, isEditor ?? false);
9242
9094
  const questionPaddingLeftWidth = Math.max(questionPaddingLeft, PADDING_HANDLE_SIZE);
9243
9095
  const questionPaddingTopHeight = Math.max(questionPaddingTop, PADDING_HANDLE_SIZE);
9244
9096
  const questionPaddingBottomHeight = Math.max(questionPaddingBottom, PADDING_HANDLE_SIZE);
9245
9097
  const answerPaddingLeftWidth = Math.max(answerPaddingLeft, PADDING_HANDLE_SIZE);
9098
+ const answerPaddingRightWidth = Math.max(answerPaddingRight, PADDING_HANDLE_SIZE);
9246
9099
  const answerPaddingTopHeight = Math.max(answerPaddingTop, PADDING_HANDLE_SIZE);
9247
9100
  const answerPaddingBottomHeight = Math.max(answerPaddingBottom, PADDING_HANDLE_SIZE);
9248
9101
  const questionPaddingLeftMaxFraction = Math.max(0, (wrapperWidth ?? 1) - iconPaddingRight - iconMaxWidth);
9249
- const answerPaddingLeftMaxFraction = Math.max(0, (wrapperWidth ?? 1));
9102
+ const answerPaddingLeftMaxFraction = Math.max(0, (wrapperWidth ?? 1) - answerPaddingRight);
9103
+ const answerPaddingRightMaxFraction = Math.max(0, (wrapperWidth ?? 1) - answerPaddingLeft);
9250
9104
  const iconPaddingRightWidth = Math.max(iconPaddingRight, PADDING_HANDLE_SIZE);
9251
9105
  const iconPaddingRightMaxFraction = Math.max(0, (wrapperWidth ?? 1) - questionPaddingLeft - iconMaxWidth);
9252
9106
 
9253
9107
  const isItemOpen = useCallback((index: number) => {
9254
9108
  if (showControls) {
9255
- return true;
9109
+ return index === 0;
9256
9110
  }
9257
9111
 
9258
9112
  return openIndices.has(index);
9259
9113
  }, [openIndices, showControls]);
9260
- const entryHoverClass = isInteractive
9261
- ? entryHoverEffect === 'default'
9262
- ? \`\${P}-entry-hover-default\`
9263
- : entryHoverEffect === 'blinds'
9264
- ? \`\${P}-entry-hover-blinds\`
9265
- : entryHoverEffect === 'reveal'
9266
- ? \`\${P}-entry-hover-reveal\`
9267
- : ''
9114
+ const entryHoverClass = isInteractive && entryHoverEffect === 'default'
9115
+ ? \`\${P}-entry-hover-default\`
9268
9116
  : '';
9269
- const revealHoverActive = entryHoverEffect === 'reveal' && isInteractive;
9270
9117
  const iconSrc = icon ?? '';
9271
9118
  const useCustomIcon = iconSrc !== '';
9272
9119
  const iconAnimSuffix = iconAnimation.replace(/^rotate /, '');
@@ -9321,8 +9168,8 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9321
9168
  iconColor,
9322
9169
  questionHoverColor,
9323
9170
  iconHoverColor,
9171
+ iconActiveColor,
9324
9172
  dividerHoverColor,
9325
- backgroundHoverColor,
9326
9173
  }, COLOR_VAR_MAP, STATE_KEYS);
9327
9174
 
9328
9175
  const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
@@ -9381,8 +9228,6 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9381
9228
  key={index}
9382
9229
  className={\`\${P}-item\${isOpen ? \` \${P}-item-open\` : ''}\`.trim()}
9383
9230
  data-faq-item=""
9384
- onMouseEnter={revealHoverActive && !isOpen ? (event) => setRevealOpenDirectionFromMouseEnter(event, P) : undefined}
9385
- onMouseLeave={revealHoverActive && !isOpen ? (event) => setRevealCloseDirectionFromMouseLeave(event, P) : undefined}
9386
9231
  >
9387
9232
  <div className={\`\${P}-question-controls\`}>
9388
9233
  {showControls && isFirstItem && (
@@ -9551,6 +9396,25 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9551
9396
  zIndex: 2,
9552
9397
  }}
9553
9398
  />
9399
+ <FAQPaddingControl
9400
+ data-controls="answerPaddingRight"
9401
+ data-controls-static-handle=""
9402
+ data-controls-axis="x"
9403
+ data-controls-variant="column-padding"
9404
+ data-controls-reverse=""
9405
+ data-controls-min="0"
9406
+ data-controls-max-fraction={String(answerPaddingRightMaxFraction)}
9407
+ className={\`\${P}-padding-control-handle\`}
9408
+ hitPlacement="center-x"
9409
+ areaStyle={{
9410
+ position: 'absolute',
9411
+ top: 0,
9412
+ right: 0,
9413
+ width: scaled(answerPaddingRightWidth),
9414
+ height: '100%',
9415
+ zIndex: 2,
9416
+ }}
9417
+ />
9554
9418
  </>
9555
9419
  )}
9556
9420
  {answerPaddingTop > 0 && (
@@ -9565,6 +9429,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9565
9429
  ...answerTypographyCss,
9566
9430
  ...answerTextLeadingVars,
9567
9431
  paddingLeft: scaled(answerPaddingLeft),
9432
+ paddingRight: scaled(answerPaddingRight),
9568
9433
  }}
9569
9434
  >
9570
9435
  <div className={answerTextClassName}>
@@ -9609,4 +9474,4 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9609
9474
  </>
9610
9475
  );
9611
9476
  }
9612
- `;function tn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","dividerHoverColor","backgroundHoverColor"],ju={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 is your return policy?",answer:[{type:"paragraph",children:[{text:"You can return any item within 30 days of purchase."}]}]},{question:"How long does shipping take?",answer:[{type:"paragraph",children:[{text:"Standard shipping typically takes 5–7 business days."}]}]},{question:"Do you offer international delivery?",answer:[{type:"paragraph",children:[{text:"Yes, we ship to most countries worldwide."}]}]}]},settings:{sizing:"auto 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","blinds","reveal"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:tn("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"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Ai.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:{...Ai.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:tn("Question Padding Left"),questionPaddingTop:tn("Question Padding Top"),questionPaddingBottom:tn("Question Padding Bottom"),answerPaddingLeft:tn("Answer Padding Left"),answerPaddingTop:tn("Answer Padding Top"),answerPaddingBottom:tn("Answer Padding Bottom")},defaults:{dividerStyle:"solid",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVZJ586KJS8G0PKNERN87KMN.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#666666",iconHoverColor:"#666666",dividerHoverColor:"#000000",backgroundHoverColor:"#000000",questionFontFamily:"Arial",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Arial",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.001389,iconMaxWidth:.025,iconPaddingRight:0,questionFontSize:.1066,questionLineHeight:.0853,answerFontSize:.056,answerLineHeight:.0448,questionPaddingLeft:0,questionPaddingTop:.01,questionPaddingBottom:.01,answerPaddingLeft:0,answerPaddingTop:.01,answerPaddingBottom:.01},d:{wrapperWidth:1,cellMinHeight:0,dividerWidth:694e-6,iconMaxWidth:.00833,iconPaddingRight:0,questionFontSize:.027,questionLineHeight:.0222,answerFontSize:.01,answerLineHeight:.0082,questionPaddingLeft:0,questionPaddingTop:.01,questionPaddingBottom:.01,answerPaddingLeft:0,answerPaddingTop:.01,answerPaddingBottom:.01}},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:[...zu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","dividerHoverColor","backgroundHoverColor"]}}},qu={element:Vu,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:""},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:ju,sourceCode:Du},Ku=[Wl,Dl,Ac,Bc,Yc,sd,pd,bd,Id,Ru,qu];exports.components=Ku;exports.isSchemaV1=La;
9477
+ `;function jt(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ai={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vu=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],Du={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:"1. What is this product used for?",answer:[{type:"paragraph",children:[{text:"Our product helps you organize, manage, and improve your workflow with simple digital tools designed to save time and reduce manual work. It brings important tasks, information, and collaboration into one place so you can stay focused and work more efficiently."}]}]},{question:"2. Do I need technical knowledge to use it?",answer:[{type:"paragraph",children:[{text:"No. The product is designed to be easy to use, with a clear interface and guided setup so you can get started quickly. You do not need coding skills or special training to use the core features."}]}]},{question:"3. Is there a free trial?",answer:[{type:"paragraph",children:[{text:"Yes, you can try the product before choosing a paid plan. The trial gives you access to the main features so you can explore how it works, test it with your own workflow, and decide whether it is the right fit for your needs."}]}]},{question:"4. Can I cancel my subscription anytime?",answer:[{type:"paragraph",children:[{text:"Yes. You can cancel your subscription at any time from your account settings. Your access will remain active until the end of your current billing period, and you will not be charged again after cancellation."}]}]},{question:"5. Is my data secure?",answer:[{type:"paragraph",children:[{text:"Yes. We use modern security practices to protect your data, including encrypted connections and secure account access. We also follow responsible data handling practices so your information stays private and protected."}]}]},{question:"6. Can I use the product with my team?",answer:[{type:"paragraph",children:[{text:"Yes. Team plans allow multiple users to collaborate, manage shared projects, assign responsibilities, and keep work organized in one place. This makes it easier for everyone to stay aligned and see the latest updates."}]}]},{question:"7. How do I get support?",answer:[{type:"paragraph",children:[{text:"You can contact our support team through the help center or by email. We’ll help you with setup, troubleshooting, billing questions, and product guidance so you can get the most out of the platform."}]}]}]},settings:{sizing:"auto 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",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:jt("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:{...Ai.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:{...Ai.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:jt("Question Padding Left"),questionPaddingTop:jt("Question Padding Top"),questionPaddingBottom:jt("Question Padding Bottom"),answerPaddingLeft:jt("Answer Padding Left"),answerPaddingRight:jt("Answer Padding Right"),answerPaddingTop:jt("Answer Padding Top"),answerPaddingBottom:jt("Answer Padding Bottom")},defaults:{dividerStyle:"solid",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVZJ586KJS8G0PKNERN87KMN.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#666666",iconHoverColor:"#666666",iconActiveColor:"#000000",dividerHoverColor:"#000000",questionFontFamily:"Arial",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Arial",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.001389,iconMaxWidth:.025,iconPaddingRight:0,questionFontSize:.1066,questionLineHeight:.0853,answerFontSize:.056,answerLineHeight:.0448,questionPaddingLeft:0,questionPaddingTop:.01,questionPaddingBottom:.01,answerPaddingLeft:0,answerPaddingRight:0,answerPaddingTop:.01,answerPaddingBottom:.01},d:{wrapperWidth:1,cellMinHeight:0,dividerWidth:694e-6,iconMaxWidth:.00833,iconPaddingRight:0,questionFontSize:.027,questionLineHeight:.0222,answerFontSize:.01,answerLineHeight:.0082,questionPaddingLeft:0,questionPaddingTop:.01,questionPaddingBottom:.01,answerPaddingLeft:0,answerPaddingRight:0,answerPaddingTop:.01,answerPaddingBottom:.01}},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:[...Vu],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},zu={element:Ou,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"}]},schema:Du,sourceCode:Bu},ju=[Wl,Dl,Ac,Oc,Yc,sd,pd,bd,Id,ku,zu];exports.components=ju;exports.isSchemaV1=La;