@cntrl-site/components 1.0.12-alpha.19 → 1.0.12-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +19 -19
  2. package/dist/index.mjs +1102 -1102
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),Ee=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),go=require("react-dom");function la(e){return e.type==="object"&&e.version===1}const ca="ControlSlider-module__wrapper___sHEkd",da="ControlSlider-module__hoverArrow___A-dOH",ua="ControlSlider-module__sliderItem___QQSkR",pa="ControlSlider-module__sliderImage___9hRl-",ma="ControlSlider-module__arrow___05ghY",ga="ControlSlider-module__arrowVertical___tBfVN",ha="ControlSlider-module__nextArrow___-30Yc",fa="ControlSlider-module__arrowInner___aEra3",ya="ControlSlider-module__arrowIcon___S4ztF",va="ControlSlider-module__arrowImg___2dwJW",ba="ControlSlider-module__mirror___brd6U",xa="ControlSlider-module__pagination___bicLF",Ca="ControlSlider-module__paginationInner___bT-P-",Sa="ControlSlider-module__paginationVertical___zYqKw",wa="ControlSlider-module__paginationItem___nTRbk",$a="ControlSlider-module__dot___p1Qun",Ta="ControlSlider-module__activeDot___LHFaj",La="ControlSlider-module__paginationInsideBottom___R3FWn",Ea="ControlSlider-module__paginationInsideTop___V-qb-",Pa="ControlSlider-module__paginationOutsideBottom___14w8D",Aa="ControlSlider-module__paginationOutsideTop___SCLqB",_a="ControlSlider-module__paginationInsideLeft___yOBRZ",Ra="ControlSlider-module__paginationInsideRight___Rtt3o",Ia="ControlSlider-module__paginationOutsideLeft___lahaw",Wa="ControlSlider-module__paginationOutsideRight___EtuQa",Fa="ControlSlider-module__imgWrapper___UjEgB",ka="ControlSlider-module__captionBlock___dJ6-j",Ma="ControlSlider-module__captionTextWrapper___HFlpf",Na="ControlSlider-module__captionText___uGBVc",Ha="ControlSlider-module__active___WZK4G",Oa="ControlSlider-module__withPointerEvents___t-18M",Ba="ControlSlider-module__topLeftAlignment___zjnGM",Va="ControlSlider-module__topCenterAlignment___gD1xW",Da="ControlSlider-module__topRightAlignment___NMapS",ja="ControlSlider-module__middleLeftAlignment___OnUrY",za="ControlSlider-module__middleCenterAlignment___Tdkl0",Ka="ControlSlider-module__middleRightAlignment___wEbfX",Ga="ControlSlider-module__bottomLeftAlignment___cTP2-",Ua="ControlSlider-module__bottomCenterAlignment___c54fB",qa="ControlSlider-module__bottomRightAlignment___kEwrz",Ya="ControlSlider-module__clickOverlay___DZA28",Xa="ControlSlider-module__contain___pLyq7",Ja="ControlSlider-module__cover___KdDat",le={wrapper:ca,hoverArrow:da,sliderItem:ua,sliderImage:pa,arrow:ma,arrowVertical:ga,nextArrow:ha,arrowInner:fa,arrowIcon:ya,arrowImg:va,mirror:ba,pagination:xa,paginationInner:Ca,paginationVertical:Sa,paginationItem:wa,dot:$a,activeDot:Ta,paginationInsideBottom:La,paginationInsideTop:Ea,paginationOutsideBottom:Pa,paginationOutsideTop:Aa,paginationInsideLeft:_a,paginationInsideRight:Ra,paginationOutsideLeft:Ia,paginationOutsideRight:Wa,imgWrapper:Fa,captionBlock:ka,captionTextWrapper:Ma,captionText:Na,active:Ha,withPointerEvents:Oa,topLeftAlignment:Ba,topCenterAlignment:Va,topRightAlignment:Da,middleLeftAlignment:ja,middleCenterAlignment:za,middleRightAlignment:Ka,bottomLeftAlignment:Ga,bottomCenterAlignment:Ua,bottomRightAlignment:qa,clickOverlay:Ya,contain:Xa,cover:Ja};function Za(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 Qa(e,t,n){return t&&Za(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ei="(prefers-reduced-motion: reduce)",on=1,es=2,ln=3,gn=4,Fn=5,er=6,lr=7,ts={CREATED:on,MOUNTED:es,IDLE:ln,MOVING:gn,SCROLLING:Fn,DRAGGING:er,DESTROYED:lr};function Et(e){e.length=0}function Ot(e,t,n){return Array.prototype.slice.call(e,t,n)}function _e(e){return e.bind.apply(e,[null].concat(Ot(arguments,1)))}var ho=setTimeout,Dr=function(){};function Pi(e){return requestAnimationFrame(e)}function gr(e,t){return typeof t===e}function wn(e){return!Qr(e)&&gr("object",e)}var Zr=Array.isArray,fo=_e(gr,"function"),Mt=_e(gr,"string"),kn=_e(gr,"undefined");function Qr(e){return e===null}function yo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Mn(e){return Zr(e)?e:[e]}function ct(e,t){Mn(e).forEach(t)}function ei(e,t){return e.indexOf(t)>-1}function tr(e,t){return e.push.apply(e,Mn(t)),e}function wt(e,t,n){e&&ct(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function ft(e,t){wt(e,Mt(t)?t.split(" "):t,!0)}function Nn(e,t){ct(t,e.appendChild.bind(e))}function ti(e,t){ct(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function $n(e,t){return yo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function vo(e,t){var n=e?Ot(e.children):[];return t?n.filter(function(r){return $n(r,t)}):n}function Hn(e,t){return t?vo(e,t)[0]:e.firstElementChild}var Tn=Object.keys;function Ut(e,t,n){return e&&(n?Tn(e).reverse():Tn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Ln(e){return Ot(arguments,1).forEach(function(t){Ut(t,function(n,r){e[r]=t[r]})}),e}function Ft(e){return Ot(arguments,1).forEach(function(t){Ut(t,function(n,r){Zr(n)?e[r]=n.slice():wn(n)?e[r]=Ft({},wn(e[r])?e[r]:{},n):e[r]=n})}),e}function Ai(e,t){ct(t||Tn(e),function(n){delete e[n]})}function yt(e,t){ct(e,function(n){ct(t,function(r){n&&n.removeAttribute(r)})})}function ge(e,t,n){wn(t)?Ut(t,function(r,i){ge(e,i,r)}):ct(e,function(r){Qr(n)||n===""?yt(r,t):r.setAttribute(t,String(n))})}function an(e,t,n){var r=document.createElement(e);return t&&(Mt(t)?ft(r,t):ge(r,t)),n&&Nn(n,r),r}function ut(e,t,n){if(kn(n))return getComputedStyle(e)[t];Qr(n)||(e.style[t]=""+n)}function En(e,t){ut(e,"display",t)}function bo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function pt(e,t){return e.getAttribute(t)}function _i(e,t){return e&&e.classList.contains(t)}function at(e){return e.getBoundingClientRect()}function qt(e){ct(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function xo(e){return Hn(new DOMParser().parseFromString(e,"text/html").body)}function St(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Co(e,t){return e&&e.querySelector(t)}function ni(e,t){return t?Ot(e.querySelectorAll(t)):[]}function $t(e,t){wt(e,t,!1)}function jr(e){return e.timeStamp}function zt(e){return Mt(e)?e:e?e+"px":""}var On="splide",ri="data-"+On;function Cn(e,t){if(!e)throw new Error("["+On+"] "+(t||""))}var Nt=Math.min,cr=Math.max,dr=Math.floor,Pn=Math.ceil,tt=Math.abs;function So(e,t,n){return tt(e-t)<n}function nr(e,t,n,r){var i=Nt(t,n),a=cr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function tn(e,t,n){var r=Nt(t,n),i=cr(t,n);return Nt(cr(r,e),i)}function zr(e){return+(e>0)-+(e<0)}function Kr(e,t){return ct(t,function(n){e=e.replace("%s",""+n)}),e}function ii(e){return e<10?"0"+e:""+e}var Ri={};function ns(e){return""+e+ii(Ri[e]=(Ri[e]||0)+1)}function wo(){var e=[];function t(s,c,o,d){i(s,c,function(p,T,S){var v="addEventListener"in p,g=v?p.removeEventListener.bind(p,T,o,d):p.removeListener.bind(p,o);v?p.addEventListener(T,o,d):p.addListener(o),e.push([p,T,S,o,g])})}function n(s,c,o){i(s,c,function(d,p,T){e=e.filter(function(S){return S[0]===d&&S[1]===p&&S[2]===T&&(!o||S[3]===o)?(S[4](),!1):!0})})}function r(s,c,o){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:p,detail:o}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,p,!1,o)),s.dispatchEvent(d),d}function i(s,c,o){ct(s,function(d){d&&ct(c,function(p){p.split(" ").forEach(function(T){var S=T.split(".");o(d,S[0],S[1])})})})}function a(){e.forEach(function(s){s[4]()}),Et(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var Bt="mounted",Gr="ready",Pt="move",hn="moved",oi="click",$o="active",To="inactive",Lo="visible",Eo="hidden",Be="refresh",Ze="updated",cn="resize",hr="resized",Po="drag",Ao="dragging",_o="dragged",fr="scroll",Xt="scrolled",rs="overflow",ai="destroy",Ro="arrows:mounted",Io="arrows:updated",Wo="pagination:mounted",Fo="pagination:updated",si="navigation:mounted",li="autoplay:play",ko="autoplay:playing",ci="autoplay:pause",di="lazyload:loaded",Mo="sk",No="sh",ur="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=wo();function r(a,s){n.bind(t,Mn(a).join(" "),function(c){s.apply(s,Zr(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Ot(arguments,1))}return e&&e.event.on(ai,n.destroy),Ln(n,{bus:t,on:r,off:_e(n.unbind,t),emit:i})}function yr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,d=0;function p(){if(!o){if(s=e?Nt((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++d>=r))return S();c=Pi(p)}}function T(b){b||g(),a=i()-(b?s*e:0),o=!1,c=Pi(p)}function S(){o=!0}function v(){a=i(),s=0,n&&n(s)}function g(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function m(b){e=b}function R(){return o}return{start:T,rewind:v,pause:S,cancel:g,set:m,isPaused:R}}function is(e){var t=e;function n(i){t=i}function r(i){return ei(Mn(i),t)}return{set:n,is:r}}function os(e,t){var n=yr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function as(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=wo(),c=[];function o(){var g=n.mediaQuery==="min";Tn(i).sort(function(m,R){return g?+m-+R:+R-+m}).forEach(function(m){p(i[m],"("+(g?"min":"max")+"-width:"+m+"px)")}),p(a,Ei),T()}function d(g){g&&s.destroy()}function p(g,m){var R=matchMedia(m);s.bind(R,"change",T),c.push([g,R])}function T(){var g=r.is(lr),m=n.direction,R=c.reduce(function(b,x){return Ft(b,x[1].matches?x[0]:{})},{});Ai(n),v(R),n.destroy?e.destroy(n.destroy==="completely"):g?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function S(g){matchMedia(Ei).matches&&(g?Ft(n,a):Ai(n,Tn(a)))}function v(g,m,R){Ft(n,g),m&&Ft(Object.getPrototypeOf(n),g),(R||!r.is(on))&&e.emit(Ze,n)}return{setup:o,destroy:d,reduce:S,set:v}}var vr="Arrow",br=vr+"Left",xr=vr+"Right",Ho=vr+"Up",Oo=vr+"Down",Ii="rtl",Cr="ttb",Ar={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ho,xr],ArrowRight:[Oo,br]};function ss(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Ii&&!s?1:c===Cr?0:-1;return Ar[a]&&Ar[a][o]||a.replace(/width|left|right/i,function(d,p){var T=Ar[d.toLowerCase()][o]||d;return p>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Ii?1:-1)}return{resolve:r,orient:i}}var Tt="role",sn="tabindex",ls="disabled",mt="aria-",Bn=mt+"controls",Bo=mt+"current",Wi=mt+"selected",st=mt+"label",ui=mt+"labelledby",Vo=mt+"hidden",pi=mt+"orientation",An=mt+"roledescription",Fi=mt+"live",ki=mt+"busy",Mi=mt+"atomic",mi=[Tt,sn,ls,Bn,Bo,st,ui,Vo,pi,An],vt=On+"__",Vt="is-",_r=On,Ni=vt+"track",cs=vt+"list",Sr=vt+"slide",Do=Sr+"--clone",ds=Sr+"__container",gi=vt+"arrows",wr=vt+"arrow",jo=wr+"--prev",zo=wr+"--next",$r=vt+"pagination",Ko=$r+"__page",us=vt+"progress",ps=us+"__bar",ms=vt+"toggle",gs=vt+"spinner",hs=vt+"sr",fs=Vt+"initialized",Yt=Vt+"active",Go=Vt+"prev",Uo=Vt+"next",Ur=Vt+"visible",qr=Vt+"loading",qo=Vt+"focus-in",Yo=Vt+"overflow",ys=[Yt,Ur,Go,Uo,qr,qo,Yo],vs={slide:Sr,clone:Do,arrows:gi,arrow:wr,prev:jo,next:zo,pagination:$r,page:Ko,spinner:gs};function bs(e,t){if(fo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!$n(n,t);)n=n.parentElement;return n}var xs=5,Hi=200,Xo="touchstart mousedown",Rr="touchmove mousemove",Ir="touchend touchcancel mouseup click";function Cs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},d=[],p=[],T=[],S,v,g;function m(){y(),O(),x()}function R(){i(Be,b),i(Be,m),i(Ze,x),a(document,Xo+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),a(s,"focusin",function(){wt(s,qo,!!g)})}function b(L){var I=mi.concat("style");Et(d),$t(s,p),$t(S,T),yt([S,v],I),yt(s,L?I:["style",An])}function x(){$t(s,p),$t(S,T),p=_(_r),T=_(Ni),ft(s,p),ft(S,T),ge(s,st,n.label),ge(s,ui,n.labelledby)}function y(){S=P("."+Ni),v=Hn(S,"."+cs),Cn(S&&v,"A track/list element is missing."),tr(d,vo(v,"."+Sr+":not(."+Do+")")),Ut({arrows:gi,pagination:$r,prev:jo,next:zo,bar:ps,toggle:ms},function(L,I){o[I]=P("."+L)}),Ln(o,{root:s,track:S,list:v,slides:d})}function O(){var L=s.id||ns(On),I=n.role;s.id=L,S.id=S.id||L+"-track",v.id=v.id||L+"-list",!pt(s,Tt)&&s.tagName!=="SECTION"&&I&&ge(s,Tt,I),ge(s,An,c.carousel),ge(v,Tt,"presentation")}function P(L){var I=Co(s,L);return I&&bs(I,"."+_r)===s?I:void 0}function _(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===_r&&Yt]}return Ln(o,{setup:m,mount:R,destroy:b})}var dn="slide",fn="loop",Vn="fade";function Ss(e,t,n,r){var i=Oe(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,d=e.root,p=e.options,T=p.isNavigation,S=p.updateOnMove,v=p.i18n,g=p.pagination,m=p.slideFocus,R=o.Direction.resolve,b=pt(r,"style"),x=pt(r,st),y=n>-1,O=Hn(r,"."+ds),P;function _(){y||(r.id=d.id+"-slide"+ii(t+1),ge(r,Tt,g?"tabpanel":"group"),ge(r,An,v.slide),ge(r,st,x||Kr(v.slideLabel,[t+1,e.length]))),L()}function L(){c(r,"click",_e(s,oi,H)),c(r,"keydown",_e(s,Mo,H)),a([hn,No,Xt],w),a(si,A),S&&a(Pt,N)}function I(){P=!0,i.destroy(),$t(r,ys),yt(r,mi),ge(r,"style",b),ge(r,st,x||"")}function A(){var M=e.splides.map(function(F){var D=F.splide.Components.Slides.getAt(t);return D?D.slide.id:""}).join(" ");ge(r,st,Kr(v.slideX,(y?n:t)+1)),ge(r,Bn,M),ge(r,Tt,m?"button":""),m&&yt(r,An)}function N(){P||w()}function w(){if(!P){var M=e.index;B(),V(),wt(r,Go,t===M-1),wt(r,Uo,t===M+1)}}function B(){var M=Y();M!==_i(r,Yt)&&(wt(r,Yt,M),ge(r,Bo,T&&M||""),s(M?$o:To,H))}function V(){var M=$(),F=!M&&(!Y()||y);if(e.state.is([gn,Fn])||ge(r,Vo,F||""),ge(ni(r,p.focusableNodes||""),sn,F?-1:""),m&&ge(r,sn,F?-1:0),M!==_i(r,Ur)&&(wt(r,Ur,M),s(M?Lo:Eo,H)),!M&&document.activeElement===r){var D=o.Slides.getAt(e.index);D&&bo(D.slide)}}function U(M,F,D){ut(D&&O||r,M,F)}function Y(){var M=e.index;return M===t||p.cloneStatus&&M===n}function $(){if(e.is(Vn))return Y();var M=at(o.Elements.track),F=at(r),D=R("left",!0),Q=R("right",!0);return dr(M[D])<=Pn(F[D])&&dr(F[Q])<=Pn(M[Q])}function W(M,F){var D=tt(M-t);return!y&&(p.rewind||e.is(fn))&&(D=Nt(D,e.length-D)),D<=F}var H={index:t,slideIndex:n,slide:r,container:O,isClone:y,mount:_,destroy:I,update:w,style:U,isWithin:W};return H}function ws(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,d=c.list,p=[];function T(){S(),i(Be,v),i(Be,S)}function S(){o.forEach(function(w,B){m(w,B,-1)})}function v(){P(function(w){w.destroy()}),Et(p)}function g(){P(function(w){w.update()})}function m(w,B,V){var U=Ss(e,B,V,w);U.mount(),p.push(U),p.sort(function(Y,$){return Y.index-$.index})}function R(w){return w?_(function(B){return!B.isClone}):p}function b(w){var B=t.Controller,V=B.toIndex(w),U=B.hasFocus()?1:n.perPage;return _(function(Y){return nr(Y.index,V,V+U-1)})}function x(w){return _(w)[0]}function y(w,B){ct(w,function(V){if(Mt(V)&&(V=xo(V)),yo(V)){var U=o[B];U?ti(V,U):Nn(d,V),ft(V,n.classes.slide),I(V,_e(a,cn))}}),a(Be)}function O(w){qt(_(w).map(function(B){return B.slide})),a(Be)}function P(w,B){R(B).forEach(w)}function _(w){return p.filter(fo(w)?w:function(B){return Mt(w)?$n(B.slide,w):ei(Mn(w),B.index)})}function L(w,B,V){P(function(U){U.style(w,B,V)})}function I(w,B){var V=ni(w,"img"),U=V.length;U?V.forEach(function(Y){s(Y,"load error",function(){--U||B()})}):B()}function A(w){return w?o.length:p.length}function N(){return p.length>n.perPage}return{mount:T,destroy:v,update:g,register:m,get:R,getIn:b,getAt:x,add:y,remove:O,forEach:P,filter:_,style:L,getLength:A,isEnough:N}}function $s(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,d=t.Elements,p=d.root,T=d.track,S=d.list,v=c.getAt,g=c.style,m,R,b;function x(){y(),a(window,"resize load",os(_e(s,cn))),i([Ze,Be],y),i(cn,O)}function y(){m=n.direction===Cr,ut(p,"maxWidth",zt(n.width)),ut(T,o("paddingLeft"),P(!1)),ut(T,o("paddingRight"),P(!0)),O(!0)}function O(H){var M=at(p);(H||R.width!==M.width||R.height!==M.height)&&(ut(T,"height",_()),g(o("marginRight"),zt(n.gap)),g("width",I()),g("height",A(),!0),R=M,s(hr),b!==(b=W())&&(wt(p,Yo,b),s(rs,b)))}function P(H){var M=n.padding,F=o(H?"right":"left");return M&&zt(M[F]||(wn(M)?0:M))||"0px"}function _(){var H="";return m&&(H=L(),Cn(H,"height or heightRatio is missing."),H="calc("+H+" - "+P(!1)+" - "+P(!0)+")"),H}function L(){return zt(n.height||at(S).width*n.heightRatio)}function I(){return n.autoWidth?null:zt(n.fixedWidth)||(m?"":N())}function A(){return zt(n.fixedHeight)||(m?n.autoHeight?null:N():L())}function N(){var H=zt(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function w(){return at(S)[o("width")]}function B(H,M){var F=v(H||0);return F?at(F.slide)[o("width")]+(M?0:Y()):0}function V(H,M){var F=v(H);if(F){var D=at(F.slide)[o("right")],Q=at(S)[o("left")];return tt(D-Q)+(M?0:Y())}return 0}function U(H){return V(e.length-1)-V(0)+B(0,H)}function Y(){var H=v(0);return H&&parseFloat(ut(H.slide,o("marginRight")))||0}function $(H){return parseFloat(ut(T,o("padding"+(H?"Right":"Left"))))||0}function W(){return e.is(Vn)||U(!0)>w()}return{mount:x,resize:O,listSize:w,slideSize:B,sliderSize:U,totalSize:V,getPadding:$,isOverflow:W}}var Ts=2;function Ls(e,t,n){var r=Oe(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],d;function p(){i(Be,T),i([Ze,cn],v),(d=R())&&(g(d),t.Layout.resize(!0))}function T(){S(),p()}function S(){qt(o),Et(o),r.destroy()}function v(){var b=R();d!==b&&(d<b||!b)&&r.emit(Be)}function g(b){var x=s.get().slice(),y=x.length;if(y){for(;x.length<b;)tr(x,x);tr(x.slice(-b),x.slice(0,b)).forEach(function(O,P){var _=P<b,L=m(O.slide,P);_?ti(L,x[0].slide):Nn(a.list,L),tr(o,L),s.register(L,P-b+(_?0:y),O.index)})}}function m(b,x){var y=b.cloneNode(!0);return ft(y,n.classes.clone),y.id=e.root.id+"-clone"+ii(x+1),y}function R(){var b=n.clones;if(!e.is(fn))b=0;else if(kn(b)){var x=n[c("fixedWidth")]&&t.Layout.slideSize(0),y=x&&Pn(at(a.track)[c("width")]/x);b=y||n[c("autoWidth")]&&e.length||n.perPage*Ts}return b}return{mount:p,destroy:S}}function Es(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,d=c.getPadding,p=c.totalSize,T=c.listSize,S=c.sliderSize,v=t.Direction,g=v.resolve,m=v.orient,R=t.Elements,b=R.list,x=R.track,y;function O(){y=t.Transition,i([Bt,hr,Ze,Be],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function _(F,D,Q,re){F!==D&&H(F>Q)&&(w(),I(N(U(),F>Q),!0)),s(gn),a(Pt,D,Q,F),y.start(D,function(){s(ln),a(hn,D,Q,F),re&&re()})}function L(F){I(V(F,!0))}function I(F,D){if(!e.is(Vn)){var Q=D?F:A(F);ut(b,"transform","translate"+g("X")+"("+Q+"px)"),F!==Q&&a(No)}}function A(F){if(e.is(fn)){var D=B(F),Q=D>t.Controller.getEnd(),re=D<0;(re||Q)&&(F=N(F,Q))}return F}function N(F,D){var Q=F-W(D),re=S();return F-=m(re*(Pn(tt(Q)/re)||1))*(D?1:-1),F}function w(){I(U(),!0),y.cancel()}function B(F){for(var D=t.Slides.get(),Q=0,re=1/0,ie=0;ie<D.length;ie++){var ce=D[ie].index,C=tt(V(ce,!0)-F);if(C<=re)re=C,Q=ce;else break}return Q}function V(F,D){var Q=m(p(F-1)-$(F));return D?Y(Q):Q}function U(){var F=g("left");return at(b)[F]-at(x)[F]+m(d(!1))}function Y(F){return n.trimSpace&&e.is(dn)&&(F=tn(F,0,m(S(!0)-T()))),F}function $(F){var D=n.focus;return D==="center"?(T()-o(F,!0))/2:+D*o(F)||0}function W(F){return V(F?t.Controller.getEnd():0,!!n.trimSpace)}function H(F){var D=m(N(U(),F));return F?D>=0:D<=b[g("scrollWidth")]-at(x)[g("width")]}function M(F,D){D=kn(D)?U():D;var Q=F!==!0&&m(D)<m(W(!1)),re=F!==!1&&m(D)>m(W(!0));return Q||re}return{mount:O,move:_,jump:L,translate:I,shift:N,cancel:w,toIndex:B,toPosition:V,getPosition:U,getLimit:W,exceededLimit:M,reposition:P}}function Ps(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,d=s.toPosition,p=t.Slides,T=p.isEnough,S=p.getLength,v=n.omitEnd,g=e.is(fn),m=e.is(dn),R=_e(U,!1),b=_e(U,!0),x=n.start||0,y,O=x,P,_,L;function I(){A(),i([Ze,Be,ur],A),i(hr,N)}function A(){P=S(!0),_=n.perMove,L=n.perPage,y=H();var C=tn(x,0,v?y:P-1);C!==x&&(x=C,s.reposition())}function N(){y!==H()&&a(ur)}function w(C,oe,Pe){if(!ce()){var ue=V(C),ye=W(ue);ye>-1&&(oe||ye!==x)&&(Q(ye),s.move(ue,ye,O,Pe))}}function B(C,oe,Pe,ue){t.Scroll.scroll(C,oe,Pe,function(){var ye=W(s.toIndex(c()));Q(v?Nt(ye,y):ye),ue&&ue()})}function V(C){var oe=x;if(Mt(C)){var Pe=C.match(/([+\-<>])(\d+)?/)||[],ue=Pe[1],ye=Pe[2];ue==="+"||ue==="-"?oe=Y(x+ +(""+ue+(+ye||1)),x):ue===">"?oe=ye?M(+ye):R(!0):ue==="<"&&(oe=b(!0))}else oe=g?C:tn(C,0,y);return oe}function U(C,oe){var Pe=_||(ie()?1:L),ue=Y(x+Pe*(C?-1:1),x,!(_||ie()));return ue===-1&&m&&!So(c(),o(!C),1)?C?0:y:oe?ue:W(ue)}function Y(C,oe,Pe){if(T()||ie()){var ue=$(C);ue!==C&&(oe=C,C=ue,Pe=!1),C<0||C>y?!_&&(nr(0,C,oe,!0)||nr(y,oe,C,!0))?C=M(F(C)):g?C=Pe?C<0?-(P%L||L):P:C:n.rewind?C=C<0?y:0:C=-1:Pe&&C!==oe&&(C=M(F(oe)+(C<oe?-1:1)))}else C=-1;return C}function $(C){if(m&&n.trimSpace==="move"&&C!==x)for(var oe=c();oe===d(C,!0)&&nr(C,0,e.length-1,!n.rewind);)C<x?--C:++C;return C}function W(C){return g?(C+P)%P||0:C}function H(){for(var C=P-(ie()||g&&_?1:L);v&&C-- >0;)if(d(P-1,!0)!==d(C,!0)){C++;break}return tn(C,0,P-1)}function M(C){return tn(ie()?C:L*C,0,y)}function F(C){return ie()?Nt(C,y):dr((C>=y?P-1:C)/L)}function D(C){var oe=s.toIndex(C);return m?tn(oe,0,y):oe}function Q(C){C!==x&&(O=x,x=C)}function re(C){return C?O:x}function ie(){return!kn(n.focus)||n.isNavigation}function ce(){return e.state.is([gn,Fn])&&!!n.waitForTransition}return{mount:I,go:w,scroll:B,getNext:R,getPrev:b,getAdjacent:U,getEnd:H,setIndex:Q,getIndex:re,toIndex:M,toPage:F,toDest:D,hasFocus:ie,isBusy:ce}}var As="http://www.w3.org/2000/svg",_s="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",Un=40;function Rs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,d=t.Elements,p=t.Controller,T=d.arrows,S=d.track,v=T,g=d.prev,m=d.next,R,b,x={};function y(){P(),i(Ze,O)}function O(){_(),y()}function P(){var B=n.arrows;B&&!(g&&m)&&A(),g&&m&&(Ln(x,{prev:g,next:m}),En(v,B?"":"none"),ft(v,b=gi+"--"+n.direction),B&&(L(),w(),ge([g,m],Bn,S.id),s(Ro,g,m)))}function _(){r.destroy(),$t(v,b),R?(qt(T?[g,m]:v),g=m=null):yt([g,m],mi)}function L(){i([Bt,hn,Be,Xt,ur],w),a(m,"click",_e(I,">")),a(g,"click",_e(I,"<"))}function I(B){p.go(B,!0)}function A(){v=T||an("div",c.arrows),g=N(!0),m=N(!1),R=!0,Nn(v,[g,m]),!T&&ti(v,S)}function N(B){var V='<button class="'+c.arrow+" "+(B?c.prev:c.next)+'" type="button"><svg xmlns="'+As+'" viewBox="0 0 '+Un+" "+Un+'" width="'+Un+'" height="'+Un+'" focusable="false"><path d="'+(n.arrowPath||_s)+'" />';return xo(V)}function w(){if(g&&m){var B=e.index,V=p.getPrev(),U=p.getNext(),Y=V>-1&&B<V?o.last:o.prev,$=U>-1&&B>U?o.first:o.next;g.disabled=V<0,m.disabled=U<0,ge(g,st,Y),ge(m,st,$),s(Io,g,m,V,U)}}return{arrows:x,mount:y,destroy:_,update:w}}var Is=ri+"-interval";function Ws(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=yr(n.interval,e.go.bind(e,">"),L),o=c.isPaused,d=t.Elements,p=t.Elements,T=p.root,S=p.toggle,v=n.autoplay,g,m,R=v==="pause";function b(){v&&(x(),S&&ge(S,Bn,d.track.id),R||y(),_())}function x(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(A){g=A.type==="mouseenter",P()}),n.pauseOnFocus&&a(T,"focusin focusout",function(A){m=A.type==="focusin",P()}),S&&a(S,"click",function(){R?y():O(!0)}),i([Pt,fr,Be],c.rewind),i(Pt,I)}function y(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=g=R=!1,_(),s(li))}function O(A){A===void 0&&(A=!0),R=!!A,_(),o()||(c.pause(),s(ci))}function P(){R||(g||m?O(!1):y())}function _(){S&&(wt(S,Yt,!R),ge(S,st,n.i18n[R?"play":"pause"]))}function L(A){var N=d.bar;N&&ut(N,"width",A*100+"%"),s(ko,A)}function I(A){var N=t.Slides.getAt(A);c.set(N&&+pt(N.slide,Is)||n.interval)}return{mount:b,destroy:c.cancel,play:y,pause:O,isPaused:o}}function Fs(e,t,n){var r=Oe(e),i=r.on;function a(){n.cover&&(i(di,_e(c,!0)),i([Bt,Ze,Be],_e(s,!0)))}function s(o){t.Slides.forEach(function(d){var p=Hn(d.container||d.slide,"img");p&&p.src&&c(o,p,d)})}function c(o,d,p){p.style("background",o?'center/cover no-repeat url("'+d.src+'")':"",!0),En(d,o?"none":"")}return{mount:a,destroy:_e(s,!1)}}var ks=10,Ms=600,Ns=.6,Hs=1.5,Os=800;function Bs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,d=c.getLimit,p=c.exceededLimit,T=c.translate,S=e.is(dn),v,g,m=1;function R(){i(Pt,O),i([Ze,Be],P)}function b(L,I,A,N,w){var B=o();if(O(),A&&(!S||!p())){var V=t.Layout.sliderSize(),U=zr(L)*V*dr(tt(L)/V)||0;L=c.toPosition(t.Controller.toDest(L%V))+U}var Y=So(B,L,1);m=1,I=Y?0:I||cr(tt(L-B)/Hs,Os),g=N,v=yr(I,x,_e(y,B,L,w),1),s(Fn),a(fr),v.start()}function x(){s(ln),g&&g(),a(Xt)}function y(L,I,A,N){var w=o(),B=L+(I-L)*_(N),V=(B-w)*m;T(w+V),S&&!A&&p()&&(m*=Ns,tt(V)<ks&&b(d(p(!0)),Ms,!1,g,!0))}function O(){v&&v.cancel()}function P(){v&&!v.isPaused()&&(O(),x())}function _(L){var I=n.easingFunc;return I?I(L):1-Math.pow(1-L,4)}return{mount:R,destroy:O,scroll:b,cancel:P}}var nn={passive:!1,capture:!0};function Vs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,d=t.Move,p=t.Scroll,T=t.Controller,S=t.Elements.track,v=t.Media.reduce,g=t.Direction,m=g.resolve,R=g.orient,b=d.getPosition,x=d.exceededLimit,y,O,P,_,L,I=!1,A,N,w;function B(){s(S,Rr,Dr,nn),s(S,Ir,Dr,nn),s(S,Xo,U,nn),s(S,"click",W,{capture:!0}),s(S,"dragstart",St),i([Bt,Ze],V)}function V(){var h=n.drag;ne(!h),_=h==="free"}function U(h){if(A=!1,!N){var f=ye(h);ue(h.target)&&(f||!h.button)&&(T.isBusy()?St(h,!0):(w=f?S:window,L=o.is([gn,Fn]),P=null,s(w,Rr,Y,nn),s(w,Ir,$,nn),d.cancel(),p.cancel(),H(h)))}}function Y(h){if(o.is(er)||(o.set(er),a(Po)),h.cancelable)if(L){d.translate(y+Pe(ie(h)));var f=ce(h)>Hi,k=I!==(I=x());(f||k)&&H(h),A=!0,a(Ao),St(h)}else D(h)&&(L=F(h),St(h))}function $(h){o.is(er)&&(o.set(ln),a(_o)),L&&(M(h),St(h)),c(w,Rr,Y),c(w,Ir,$),L=!1}function W(h){!N&&A&&St(h,!0)}function H(h){P=O,O=h,y=b()}function M(h){var f=Q(h),k=re(f),j=n.rewind&&n.rewindByDrag;v(!1),_?T.scroll(k,0,n.snap):e.is(Vn)?T.go(R(zr(f))<0?j?"<":"-":j?">":"+"):e.is(dn)&&I&&j?T.go(x(!0)?">":"<"):T.go(T.toDest(k),!0),v(!0)}function F(h){var f=n.dragMinThreshold,k=wn(f),j=k&&f.mouse||0,q=(k?f.touch:+f)||10;return tt(ie(h))>(ye(h)?q:j)}function D(h){return tt(ie(h))>tt(ie(h,!0))}function Q(h){if(e.is(fn)||!I){var f=ce(h);if(f&&f<Hi)return ie(h)/f}return 0}function re(h){return b()+zr(h)*Nt(tt(h)*(n.flickPower||600),_?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ie(h,f){return oe(h,f)-oe(C(h),f)}function ce(h){return jr(h)-jr(C(h))}function C(h){return O===h&&P||O}function oe(h,f){return(ye(h)?h.changedTouches[0]:h)["page"+m(f?"Y":"X")]}function Pe(h){return h/(I&&e.is(dn)?xs:1)}function ue(h){var f=n.noDrag;return!$n(h,"."+Ko+", ."+wr)&&(!f||!$n(h,f))}function ye(h){return typeof TouchEvent<"u"&&h instanceof TouchEvent}function Re(){return L}function ne(h){N=h}return{mount:B,disable:ne,isDragging:Re}}var Ds={Spacebar:" ",Right:xr,Left:br,Up:Ho,Down:Oo};function hi(e){return e=Mt(e)?e:e.key,Ds[e]||e}var Oi="keydown";function js(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,d,p;function T(){S(),i(Ze,v),i(Ze,S),i(Pt,m)}function S(){var b=n.keyboard;b&&(d=b==="global"?window:c,a(d,Oi,R))}function v(){s(d,Oi)}function g(b){p=b}function m(){var b=p;p=!0,ho(function(){p=b})}function R(b){if(!p){var x=hi(b);x===o(br)?e.go("<"):x===o(xr)&&e.go(">")}}return{mount:T,destroy:v,disable:g}}var Sn=ri+"-lazy",rr=Sn+"-srcset",zs="["+Sn+"], ["+rr+"]";function Ks(e,t,n){var r=Oe(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",d=[hn,Xt],p=[];function T(){n.lazyLoad&&(S(),i(Be,S))}function S(){Et(p),v(),o?b():(a(d),i(d,g),g())}function v(){t.Slides.forEach(function(x){ni(x.slide,zs).forEach(function(y){var O=pt(y,Sn),P=pt(y,rr);if(O!==y.src||P!==y.srcset){var _=n.classes.spinner,L=y.parentElement,I=Hn(L,"."+_)||an("span",_,L);p.push([y,x,I]),y.src||En(y,"none")}})})}function g(){p=p.filter(function(x){var y=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,y)?m(x):!0}),p.length||a(d)}function m(x){var y=x[0];ft(x[1].slide,qr),s(y,"load error",_e(R,x)),ge(y,"src",pt(y,Sn)),ge(y,"srcset",pt(y,rr)),yt(y,Sn),yt(y,rr)}function R(x,y){var O=x[0],P=x[1];$t(P.slide,qr),y.type!=="error"&&(qt(x[2]),En(O,""),c(di,O,P),c(cn)),o&&b()}function b(){p.length&&m(p.shift())}return{mount:T,destroy:_e(Et,p),check:g}}function Gs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,d=t.Controller,p=d.hasFocus,T=d.getIndex,S=d.go,v=t.Direction.resolve,g=o.pagination,m=[],R,b;function x(){y(),i([Ze,Be,ur],x);var N=n.pagination;g&&En(g,N?"":"none"),N&&(i([Pt,fr,Xt],A),O(),A(),a(Wo,{list:R,items:m},I(e.index)))}function y(){R&&(qt(g?Ot(R.children):R),$t(R,b),Et(m),R=null),r.destroy()}function O(){var N=e.length,w=n.classes,B=n.i18n,V=n.perPage,U=p()?d.getEnd()+1:Pn(N/V);R=g||an("ul",w.pagination,o.track.parentElement),ft(R,b=$r+"--"+L()),ge(R,Tt,"tablist"),ge(R,st,B.select),ge(R,pi,L()===Cr?"vertical":"");for(var Y=0;Y<U;Y++){var $=an("li",null,R),W=an("button",{class:w.page,type:"button"},$),H=c.getIn(Y).map(function(F){return F.slide.id}),M=!p()&&V>1?B.pageX:B.slideX;s(W,"click",_e(P,Y)),n.paginationKeyboard&&s(W,"keydown",_e(_,Y)),ge($,Tt,"presentation"),ge(W,Tt,"tab"),ge(W,Bn,H.join(" ")),ge(W,st,Kr(M,Y+1)),ge(W,sn,-1),m.push({li:$,button:W,page:Y})}}function P(N){S(">"+N,!0)}function _(N,w){var B=m.length,V=hi(w),U=L(),Y=-1;V===v(xr,!1,U)?Y=++N%B:V===v(br,!1,U)?Y=(--N+B)%B:V==="Home"?Y=0:V==="End"&&(Y=B-1);var $=m[Y];$&&(bo($.button),S(">"+Y),St(w,!0))}function L(){return n.paginationDirection||n.direction}function I(N){return m[d.toPage(N)]}function A(){var N=I(T(!0)),w=I(T());if(N){var B=N.button;$t(B,Yt),yt(B,Wi),ge(B,sn,-1)}if(w){var V=w.button;ft(V,Yt),ge(V,Wi,!0),ge(V,sn,"")}a(Fo,{list:R,items:m},N,w)}return{items:m,mount:x,destroy:y,getAt:I,update:A}}var Us=[" ","Enter"];function qs(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(g){g.isParent||(d(e,g.splide),d(g.splide,e))}),r&&p()}function c(){a.forEach(function(g){g.destroy()}),Et(a)}function o(){c(),s()}function d(g,m){var R=Oe(g);R.on(Pt,function(b,x,y){m.go(m.is(fn)?y:b)}),a.push(R)}function p(){var g=Oe(e),m=g.on;m(oi,S),m(Mo,v),m([Bt,Ze],T),a.push(g),g.emit(si,e.splides)}function T(){ge(t.Elements.list,pi,n.direction===Cr?"vertical":"")}function S(g){e.go(g.index)}function v(g,m){ei(Us,hi(m))&&(S(g),St(m))}return{setup:_e(t.Media.set,{slideFocus:kn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function Ys(e,t,n){var r=Oe(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,nn)}function c(d){if(d.cancelable){var p=d.deltaY,T=p<0,S=jr(d),v=n.wheelMinThreshold||0,g=n.wheelSleep||0;tt(p)>v&&S-a>g&&(e.go(T?"<":">"),a=S),o(T)&&St(d)}}function o(d){return!n.releaseWheel||e.state.is(gn)||t.Controller.getAdjacent(d)!==-1}return{mount:s}}var Xs=90;function Js(e,t,n){var r=Oe(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=an("span",hs),o=yr(Xs,_e(p,!1));function d(){s&&(S(!t.Autoplay.isPaused()),ge(a,Mi,!0),c.textContent="…",i(li,_e(S,!0)),i(ci,_e(S,!1)),i([hn,Xt],_e(p,!0)))}function p(v){ge(a,ki,v),v?(Nn(a,c),o.start()):(qt(c),o.cancel())}function T(){yt(a,[Fi,Mi,ki]),qt(c)}function S(v){s&&ge(a,Fi,v?"off":"polite")}return{mount:d,disable:S,destroy:T}}var Zs=Object.freeze({__proto__:null,Media:as,Direction:ss,Elements:Cs,Slides:ws,Layout:$s,Clones:Ls,Move:Es,Controller:Ps,Arrows:Rs,Autoplay:Ws,Cover:Fs,Scroll:Bs,Drag:Vs,Keyboard:js,LazyLoad:Ks,Pagination:Gs,Sync:qs,Wheel:Ys,Live:Js}),Qs={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"},el={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:vs,i18n:Qs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function tl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Bt,Be],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),ho(o)}return{mount:i,start:s,cancel:Dr}}function nl(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=_e(ut,s,"transition"),o;function d(){Oe(e).bind(s,"transitionend",function(v){v.target===s&&o&&(T(),o())})}function p(v,g){var m=r.toPosition(v,!0),R=r.getPosition(),b=S(v);tt(m-R)>=1&&b>=1?n.useScroll?a.scroll(m,b,!1,g):(c("transform "+b+"ms "+n.easing),r.translate(m,!0),o=g):(r.jump(v),g())}function T(){c(""),a.cancel()}function S(v){var g=n.rewindSpeed;if(e.is(dn)&&g){var m=i.getIndex(!0),R=i.getEnd();if(m===0&&v>=R||m>=R&&v===0)return g}return n.speed}return{mount:d,start:p,cancel:T}}var rl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=is(on),this.splides=[],this._o={},this._E={};var i=Mt(n)?Co(document,n):n;Cn(i,i+" is invalid."),this.root=i,r=Ft({label:pt(i,st)||"",labelledby:pt(i,ui)||""},el,e.defaults,r||{});try{Ft(r,JSON.parse(pt(i,ri)))}catch{Cn(!1,"Invalid JSON")}this._o=Object.create(Ft({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;Cn(s.is([on,lr]),"Already mounted!"),s.set(on),this._C=c,this._T=i||this._T||(this.is(Vn)?tl:nl),this._E=r||this._E;var o=Ln({},Zs,this._E,{Transition:this._T});return Ut(o,function(d,p){var T=d(a,c,a._o);c[p]=T,T.setup&&T.setup()}),Ut(c,function(d){d.mount&&d.mount()}),this.emit(Bt),ft(this.root,fs),s.set(ln),this.emit(Gr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(ln)&&(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(Ot(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(Be),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(on)?Oe(this).on(Gr,this.destroy.bind(this,r)):(Ut(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(ai),i.destroy(),r&&Et(this.splides),a.set(lr)),this},Qa(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})(),fi=rl;fi.defaults={};fi.STATES=ts;var Bi=[[Bt,"onMounted"],[Gr,"onReady"],[Pt,"onMove"],[hn,"onMoved"],[oi,"onClick"],[$o,"onActive"],[To,"onInactive"],[Lo,"onVisible"],[Eo,"onHidden"],[Be,"onRefresh"],[Ze,"onUpdated"],[cn,"onResize"],[hr,"onResized"],[Po,"onDrag"],[Ao,"onDragging"],[_o,"onDragged"],[fr,"onScroll"],[Xt,"onScrolled"],[ai,"onDestroy"],[Ro,"onArrowsMounted"],[Io,"onArrowsUpdated"],[Wo,"onPaginationMounted"],[Fo,"onPaginationUpdated"],[si,"onNavigationMounted"],[li,"onAutoplayPlay"],[ko,"onAutoplayPlaying"],[ci,"onAutoplayPause"],[di,"onLazyLoadLoaded"]];function yi(...e){return e.filter(Boolean).join(" ")}function pr(e){return e!==null&&typeof e=="object"}function Yr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Yr(n,t[r]));if(pr(e)&&pr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Yr(e[i],t[i]))}return e===t}function il(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function ol(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 Xr(e,t){const n=e;return ol(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():pr(r)?n[i]=Xr(pr(n[i])?n[i]:{},r):n[i]=r}),n}var al=({children:e,className:t,...n})=>u.createElement("div",{className:yi("splide__track",t),...n},u.createElement("ul",{className:"splide__list"},e)),vi=class extends u.Component{constructor(){super(...arguments),this.splideRef=u.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new fi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Xr({},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&&!Yr(this.options,e)&&(this.splide.options=e,this.options=Xr({},e));const t=this.getSlides();il(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){Bi.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 u.createElement(t,{className:yi("splide",e),ref:this.splideRef,...this.omit(i,["options",...Bi.map(a=>a[1])])},n?u.createElement(al,null,r):r)}},bi=({children:e,className:t,...n})=>u.createElement("li",{className:yi("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),Ee=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),go=require("react-dom");function la(e){return e.type==="object"&&e.version===1}const ca="ControlSlider-module__wrapper___sHEkd",da="ControlSlider-module__hoverArrow___A-dOH",ua="ControlSlider-module__sliderItem___QQSkR",pa="ControlSlider-module__sliderImage___9hRl-",ma="ControlSlider-module__arrow___05ghY",ga="ControlSlider-module__arrowVertical___tBfVN",ha="ControlSlider-module__nextArrow___-30Yc",fa="ControlSlider-module__arrowInner___aEra3",ya="ControlSlider-module__arrowIcon___S4ztF",va="ControlSlider-module__arrowImg___2dwJW",ba="ControlSlider-module__mirror___brd6U",xa="ControlSlider-module__pagination___bicLF",Ca="ControlSlider-module__paginationInner___bT-P-",Sa="ControlSlider-module__paginationVertical___zYqKw",wa="ControlSlider-module__paginationItem___nTRbk",$a="ControlSlider-module__dot___p1Qun",Ta="ControlSlider-module__activeDot___LHFaj",La="ControlSlider-module__paginationInsideBottom___R3FWn",Ea="ControlSlider-module__paginationInsideTop___V-qb-",Pa="ControlSlider-module__paginationOutsideBottom___14w8D",_a="ControlSlider-module__paginationOutsideTop___SCLqB",Aa="ControlSlider-module__paginationInsideLeft___yOBRZ",Ra="ControlSlider-module__paginationInsideRight___Rtt3o",Ia="ControlSlider-module__paginationOutsideLeft___lahaw",Wa="ControlSlider-module__paginationOutsideRight___EtuQa",ka="ControlSlider-module__imgWrapper___UjEgB",Fa="ControlSlider-module__captionBlock___dJ6-j",Ma="ControlSlider-module__captionTextWrapper___HFlpf",Na="ControlSlider-module__captionText___uGBVc",Ha="ControlSlider-module__active___WZK4G",Oa="ControlSlider-module__withPointerEvents___t-18M",Ba="ControlSlider-module__topLeftAlignment___zjnGM",Va="ControlSlider-module__topCenterAlignment___gD1xW",Da="ControlSlider-module__topRightAlignment___NMapS",za="ControlSlider-module__middleLeftAlignment___OnUrY",ja="ControlSlider-module__middleCenterAlignment___Tdkl0",Ka="ControlSlider-module__middleRightAlignment___wEbfX",Ua="ControlSlider-module__bottomLeftAlignment___cTP2-",qa="ControlSlider-module__bottomCenterAlignment___c54fB",Ga="ControlSlider-module__bottomRightAlignment___kEwrz",Ya="ControlSlider-module__clickOverlay___DZA28",Xa="ControlSlider-module__contain___pLyq7",Za="ControlSlider-module__cover___KdDat",le={wrapper:ca,hoverArrow:da,sliderItem:ua,sliderImage:pa,arrow:ma,arrowVertical:ga,nextArrow:ha,arrowInner:fa,arrowIcon:ya,arrowImg:va,mirror:ba,pagination:xa,paginationInner:Ca,paginationVertical:Sa,paginationItem:wa,dot:$a,activeDot:Ta,paginationInsideBottom:La,paginationInsideTop:Ea,paginationOutsideBottom:Pa,paginationOutsideTop:_a,paginationInsideLeft:Aa,paginationInsideRight:Ra,paginationOutsideLeft:Ia,paginationOutsideRight:Wa,imgWrapper:ka,captionBlock:Fa,captionTextWrapper:Ma,captionText:Na,active:Ha,withPointerEvents:Oa,topLeftAlignment:Ba,topCenterAlignment:Va,topRightAlignment:Da,middleLeftAlignment:za,middleCenterAlignment:ja,middleRightAlignment:Ka,bottomLeftAlignment:Ua,bottomCenterAlignment:qa,bottomRightAlignment:Ga,clickOverlay:Ya,contain:Xa,cover:Za};function Ja(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 Qa(e,t,n){return t&&Ja(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ei="(prefers-reduced-motion: reduce)",on=1,es=2,ln=3,gn=4,kn=5,er=6,lr=7,ts={CREATED:on,MOUNTED:es,IDLE:ln,MOVING:gn,SCROLLING:kn,DRAGGING:er,DESTROYED:lr};function Et(e){e.length=0}function Ot(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(Ot(arguments,1)))}var ho=setTimeout,Dr=function(){};function Pi(e){return requestAnimationFrame(e)}function gr(e,t){return typeof t===e}function wn(e){return!Qr(e)&&gr("object",e)}var Jr=Array.isArray,fo=Ae(gr,"function"),Mt=Ae(gr,"string"),Fn=Ae(gr,"undefined");function Qr(e){return e===null}function yo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Mn(e){return Jr(e)?e:[e]}function ct(e,t){Mn(e).forEach(t)}function ei(e,t){return e.indexOf(t)>-1}function tr(e,t){return e.push.apply(e,Mn(t)),e}function wt(e,t,n){e&&ct(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function ft(e,t){wt(e,Mt(t)?t.split(" "):t,!0)}function Nn(e,t){ct(t,e.appendChild.bind(e))}function ti(e,t){ct(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function $n(e,t){return yo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function vo(e,t){var n=e?Ot(e.children):[];return t?n.filter(function(r){return $n(r,t)}):n}function Hn(e,t){return t?vo(e,t)[0]:e.firstElementChild}var Tn=Object.keys;function qt(e,t,n){return e&&(n?Tn(e).reverse():Tn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function Ln(e){return Ot(arguments,1).forEach(function(t){qt(t,function(n,r){e[r]=t[r]})}),e}function kt(e){return Ot(arguments,1).forEach(function(t){qt(t,function(n,r){Jr(n)?e[r]=n.slice():wn(n)?e[r]=kt({},wn(e[r])?e[r]:{},n):e[r]=n})}),e}function _i(e,t){ct(t||Tn(e),function(n){delete e[n]})}function yt(e,t){ct(e,function(n){ct(t,function(r){n&&n.removeAttribute(r)})})}function ge(e,t,n){wn(t)?qt(t,function(r,i){ge(e,i,r)}):ct(e,function(r){Qr(n)||n===""?yt(r,t):r.setAttribute(t,String(n))})}function an(e,t,n){var r=document.createElement(e);return t&&(Mt(t)?ft(r,t):ge(r,t)),n&&Nn(n,r),r}function ut(e,t,n){if(Fn(n))return getComputedStyle(e)[t];Qr(n)||(e.style[t]=""+n)}function En(e,t){ut(e,"display",t)}function bo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function pt(e,t){return e.getAttribute(t)}function Ai(e,t){return e&&e.classList.contains(t)}function at(e){return e.getBoundingClientRect()}function Gt(e){ct(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function xo(e){return Hn(new DOMParser().parseFromString(e,"text/html").body)}function St(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Co(e,t){return e&&e.querySelector(t)}function ni(e,t){return t?Ot(e.querySelectorAll(t)):[]}function $t(e,t){wt(e,t,!1)}function zr(e){return e.timeStamp}function jt(e){return Mt(e)?e:e?e+"px":""}var On="splide",ri="data-"+On;function Cn(e,t){if(!e)throw new Error("["+On+"] "+(t||""))}var Nt=Math.min,cr=Math.max,dr=Math.floor,Pn=Math.ceil,tt=Math.abs;function So(e,t,n){return tt(e-t)<n}function nr(e,t,n,r){var i=Nt(t,n),a=cr(t,n);return r?i<e&&e<a:i<=e&&e<=a}function tn(e,t,n){var r=Nt(t,n),i=cr(t,n);return Nt(cr(r,e),i)}function jr(e){return+(e>0)-+(e<0)}function Kr(e,t){return ct(t,function(n){e=e.replace("%s",""+n)}),e}function ii(e){return e<10?"0"+e:""+e}var Ri={};function ns(e){return""+e+ii(Ri[e]=(Ri[e]||0)+1)}function wo(){var e=[];function t(s,c,o,d){i(s,c,function(p,T,S){var v="addEventListener"in p,g=v?p.removeEventListener.bind(p,T,o,d):p.removeListener.bind(p,o);v?p.addEventListener(T,o,d):p.addListener(o),e.push([p,T,S,o,g])})}function n(s,c,o){i(s,c,function(d,p,T){e=e.filter(function(S){return S[0]===d&&S[1]===p&&S[2]===T&&(!o||S[3]===o)?(S[4](),!1):!0})})}function r(s,c,o){var d,p=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:p,detail:o}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,p,!1,o)),s.dispatchEvent(d),d}function i(s,c,o){ct(s,function(d){d&&ct(c,function(p){p.split(" ").forEach(function(T){var S=T.split(".");o(d,S[0],S[1])})})})}function a(){e.forEach(function(s){s[4]()}),Et(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var Bt="mounted",Ur="ready",Pt="move",hn="moved",oi="click",$o="active",To="inactive",Lo="visible",Eo="hidden",Be="refresh",Je="updated",cn="resize",hr="resized",Po="drag",_o="dragging",Ao="dragged",fr="scroll",Xt="scrolled",rs="overflow",ai="destroy",Ro="arrows:mounted",Io="arrows:updated",Wo="pagination:mounted",ko="pagination:updated",si="navigation:mounted",li="autoplay:play",Fo="autoplay:playing",ci="autoplay:pause",di="lazyload:loaded",Mo="sk",No="sh",ur="ei";function Oe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=wo();function r(a,s){n.bind(t,Mn(a).join(" "),function(c){s.apply(s,Jr(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,Ot(arguments,1))}return e&&e.event.on(ai,n.destroy),Ln(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:i})}function yr(e,t,n,r){var i=Date.now,a,s=0,c,o=!0,d=0;function p(){if(!o){if(s=e?Nt((i()-a)/e,1):1,n&&n(s),s>=1&&(t(),a=i(),r&&++d>=r))return S();c=Pi(p)}}function T(b){b||g(),a=i()-(b?s*e:0),o=!1,c=Pi(p)}function S(){o=!0}function v(){a=i(),s=0,n&&n(s)}function g(){c&&cancelAnimationFrame(c),s=0,c=0,o=!0}function m(b){e=b}function R(){return o}return{start:T,rewind:v,pause:S,cancel:g,set:m,isPaused:R}}function is(e){var t=e;function n(i){t=i}function r(i){return ei(Mn(i),t)}return{set:n,is:r}}function os(e,t){var n=yr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function as(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},s=wo(),c=[];function o(){var g=n.mediaQuery==="min";Tn(i).sort(function(m,R){return g?+m-+R:+R-+m}).forEach(function(m){p(i[m],"("+(g?"min":"max")+"-width:"+m+"px)")}),p(a,Ei),T()}function d(g){g&&s.destroy()}function p(g,m){var R=matchMedia(m);s.bind(R,"change",T),c.push([g,R])}function T(){var g=r.is(lr),m=n.direction,R=c.reduce(function(b,x){return kt(b,x[1].matches?x[0]:{})},{});_i(n),v(R),n.destroy?e.destroy(n.destroy==="completely"):g?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function S(g){matchMedia(Ei).matches&&(g?kt(n,a):_i(n,Tn(a)))}function v(g,m,R){kt(n,g),m&&kt(Object.getPrototypeOf(n),g),(R||!r.is(on))&&e.emit(Je,n)}return{setup:o,destroy:d,reduce:S,set:v}}var vr="Arrow",br=vr+"Left",xr=vr+"Right",Ho=vr+"Up",Oo=vr+"Down",Ii="rtl",Cr="ttb",_r={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ho,xr],ArrowRight:[Oo,br]};function ss(e,t,n){function r(a,s,c){c=c||n.direction;var o=c===Ii&&!s?1:c===Cr?0:-1;return _r[a]&&_r[a][o]||a.replace(/width|left|right/i,function(d,p){var T=_r[d.toLowerCase()][o]||d;return p>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function i(a){return a*(n.direction===Ii?1:-1)}return{resolve:r,orient:i}}var Tt="role",sn="tabindex",ls="disabled",mt="aria-",Bn=mt+"controls",Bo=mt+"current",Wi=mt+"selected",st=mt+"label",ui=mt+"labelledby",Vo=mt+"hidden",pi=mt+"orientation",_n=mt+"roledescription",ki=mt+"live",Fi=mt+"busy",Mi=mt+"atomic",mi=[Tt,sn,ls,Bn,Bo,st,ui,Vo,pi,_n],vt=On+"__",Vt="is-",Ar=On,Ni=vt+"track",cs=vt+"list",Sr=vt+"slide",Do=Sr+"--clone",ds=Sr+"__container",gi=vt+"arrows",wr=vt+"arrow",zo=wr+"--prev",jo=wr+"--next",$r=vt+"pagination",Ko=$r+"__page",us=vt+"progress",ps=us+"__bar",ms=vt+"toggle",gs=vt+"spinner",hs=vt+"sr",fs=Vt+"initialized",Yt=Vt+"active",Uo=Vt+"prev",qo=Vt+"next",qr=Vt+"visible",Gr=Vt+"loading",Go=Vt+"focus-in",Yo=Vt+"overflow",ys=[Yt,qr,Uo,qo,Gr,Go,Yo],vs={slide:Sr,clone:Do,arrows:gi,arrow:wr,prev:zo,next:jo,pagination:$r,page:Ko,spinner:gs};function bs(e,t){if(fo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!$n(n,t);)n=n.parentElement;return n}var xs=5,Hi=200,Xo="touchstart mousedown",Rr="touchmove mousemove",Ir="touchend touchcancel mouseup click";function Cs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=e.root,c=n.i18n,o={},d=[],p=[],T=[],S,v,g;function m(){y(),O(),x()}function R(){i(Be,b),i(Be,m),i(Je,x),a(document,Xo+" keydown",function(L){g=L.type==="keydown"},{capture:!0}),a(s,"focusin",function(){wt(s,Go,!!g)})}function b(L){var I=mi.concat("style");Et(d),$t(s,p),$t(S,T),yt([S,v],I),yt(s,L?I:["style",_n])}function x(){$t(s,p),$t(S,T),p=A(Ar),T=A(Ni),ft(s,p),ft(S,T),ge(s,st,n.label),ge(s,ui,n.labelledby)}function y(){S=P("."+Ni),v=Hn(S,"."+cs),Cn(S&&v,"A track/list element is missing."),tr(d,vo(v,"."+Sr+":not(."+Do+")")),qt({arrows:gi,pagination:$r,prev:zo,next:jo,bar:ps,toggle:ms},function(L,I){o[I]=P("."+L)}),Ln(o,{root:s,track:S,list:v,slides:d})}function O(){var L=s.id||ns(On),I=n.role;s.id=L,S.id=S.id||L+"-track",v.id=v.id||L+"-list",!pt(s,Tt)&&s.tagName!=="SECTION"&&I&&ge(s,Tt,I),ge(s,_n,c.carousel),ge(v,Tt,"presentation")}function P(L){var I=Co(s,L);return I&&bs(I,"."+Ar)===s?I:void 0}function A(L){return[L+"--"+n.type,L+"--"+n.direction,n.drag&&L+"--draggable",n.isNavigation&&L+"--nav",L===Ar&&Yt]}return Ln(o,{setup:m,mount:R,destroy:b})}var dn="slide",fn="loop",Vn="fade";function Ss(e,t,n,r){var i=Oe(e),a=i.on,s=i.emit,c=i.bind,o=e.Components,d=e.root,p=e.options,T=p.isNavigation,S=p.updateOnMove,v=p.i18n,g=p.pagination,m=p.slideFocus,R=o.Direction.resolve,b=pt(r,"style"),x=pt(r,st),y=n>-1,O=Hn(r,"."+ds),P;function A(){y||(r.id=d.id+"-slide"+ii(t+1),ge(r,Tt,g?"tabpanel":"group"),ge(r,_n,v.slide),ge(r,st,x||Kr(v.slideLabel,[t+1,e.length]))),L()}function L(){c(r,"click",Ae(s,oi,H)),c(r,"keydown",Ae(s,Mo,H)),a([hn,No,Xt],w),a(si,_),S&&a(Pt,N)}function I(){P=!0,i.destroy(),$t(r,ys),yt(r,mi),ge(r,"style",b),ge(r,st,x||"")}function _(){var M=e.splides.map(function(k){var D=k.splide.Components.Slides.getAt(t);return D?D.slide.id:""}).join(" ");ge(r,st,Kr(v.slideX,(y?n:t)+1)),ge(r,Bn,M),ge(r,Tt,m?"button":""),m&&yt(r,_n)}function N(){P||w()}function w(){if(!P){var M=e.index;B(),V(),wt(r,Uo,t===M-1),wt(r,qo,t===M+1)}}function B(){var M=Y();M!==Ai(r,Yt)&&(wt(r,Yt,M),ge(r,Bo,T&&M||""),s(M?$o:To,H))}function V(){var M=$(),k=!M&&(!Y()||y);if(e.state.is([gn,kn])||ge(r,Vo,k||""),ge(ni(r,p.focusableNodes||""),sn,k?-1:""),m&&ge(r,sn,k?-1:0),M!==Ai(r,qr)&&(wt(r,qr,M),s(M?Lo:Eo,H)),!M&&document.activeElement===r){var D=o.Slides.getAt(e.index);D&&bo(D.slide)}}function q(M,k,D){ut(D&&O||r,M,k)}function Y(){var M=e.index;return M===t||p.cloneStatus&&M===n}function $(){if(e.is(Vn))return Y();var M=at(o.Elements.track),k=at(r),D=R("left",!0),Q=R("right",!0);return dr(M[D])<=Pn(k[D])&&dr(k[Q])<=Pn(M[Q])}function W(M,k){var D=tt(M-t);return!y&&(p.rewind||e.is(fn))&&(D=Nt(D,e.length-D)),D<=k}var H={index:t,slideIndex:n,slide:r,container:O,isClone:y,mount:A,destroy:I,update:w,style:q,isWithin:W};return H}function ws(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=t.Elements,o=c.slides,d=c.list,p=[];function T(){S(),i(Be,v),i(Be,S)}function S(){o.forEach(function(w,B){m(w,B,-1)})}function v(){P(function(w){w.destroy()}),Et(p)}function g(){P(function(w){w.update()})}function m(w,B,V){var q=Ss(e,B,V,w);q.mount(),p.push(q),p.sort(function(Y,$){return Y.index-$.index})}function R(w){return w?A(function(B){return!B.isClone}):p}function b(w){var B=t.Controller,V=B.toIndex(w),q=B.hasFocus()?1:n.perPage;return A(function(Y){return nr(Y.index,V,V+q-1)})}function x(w){return A(w)[0]}function y(w,B){ct(w,function(V){if(Mt(V)&&(V=xo(V)),yo(V)){var q=o[B];q?ti(V,q):Nn(d,V),ft(V,n.classes.slide),I(V,Ae(a,cn))}}),a(Be)}function O(w){Gt(A(w).map(function(B){return B.slide})),a(Be)}function P(w,B){R(B).forEach(w)}function A(w){return p.filter(fo(w)?w:function(B){return Mt(w)?$n(B.slide,w):ei(Mn(w),B.index)})}function L(w,B,V){P(function(q){q.style(w,B,V)})}function I(w,B){var V=ni(w,"img"),q=V.length;q?V.forEach(function(Y){s(Y,"load error",function(){--q||B()})}):B()}function _(w){return w?o.length:p.length}function N(){return p.length>n.perPage}return{mount:T,destroy:v,update:g,register:m,get:R,getIn:b,getAt:x,add:y,remove:O,forEach:P,filter:A,style:L,getLength:_,isEnough:N}}function $s(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=t.Slides,o=t.Direction.resolve,d=t.Elements,p=d.root,T=d.track,S=d.list,v=c.getAt,g=c.style,m,R,b;function x(){y(),a(window,"resize load",os(Ae(s,cn))),i([Je,Be],y),i(cn,O)}function y(){m=n.direction===Cr,ut(p,"maxWidth",jt(n.width)),ut(T,o("paddingLeft"),P(!1)),ut(T,o("paddingRight"),P(!0)),O(!0)}function O(H){var M=at(p);(H||R.width!==M.width||R.height!==M.height)&&(ut(T,"height",A()),g(o("marginRight"),jt(n.gap)),g("width",I()),g("height",_(),!0),R=M,s(hr),b!==(b=W())&&(wt(p,Yo,b),s(rs,b)))}function P(H){var M=n.padding,k=o(H?"right":"left");return M&&jt(M[k]||(wn(M)?0:M))||"0px"}function A(){var H="";return m&&(H=L(),Cn(H,"height or heightRatio is missing."),H="calc("+H+" - "+P(!1)+" - "+P(!0)+")"),H}function L(){return jt(n.height||at(S).width*n.heightRatio)}function I(){return n.autoWidth?null:jt(n.fixedWidth)||(m?"":N())}function _(){return jt(n.fixedHeight)||(m?n.autoHeight?null:N():L())}function N(){var H=jt(n.gap);return"calc((100%"+(H&&" + "+H)+")/"+(n.perPage||1)+(H&&" - "+H)+")"}function w(){return at(S)[o("width")]}function B(H,M){var k=v(H||0);return k?at(k.slide)[o("width")]+(M?0:Y()):0}function V(H,M){var k=v(H);if(k){var D=at(k.slide)[o("right")],Q=at(S)[o("left")];return tt(D-Q)+(M?0:Y())}return 0}function q(H){return V(e.length-1)-V(0)+B(0,H)}function Y(){var H=v(0);return H&&parseFloat(ut(H.slide,o("marginRight")))||0}function $(H){return parseFloat(ut(T,o("padding"+(H?"Right":"Left"))))||0}function W(){return e.is(Vn)||q(!0)>w()}return{mount:x,resize:O,listSize:w,slideSize:B,sliderSize:q,totalSize:V,getPadding:$,isOverflow:W}}var Ts=2;function Ls(e,t,n){var r=Oe(e),i=r.on,a=t.Elements,s=t.Slides,c=t.Direction.resolve,o=[],d;function p(){i(Be,T),i([Je,cn],v),(d=R())&&(g(d),t.Layout.resize(!0))}function T(){S(),p()}function S(){Gt(o),Et(o),r.destroy()}function v(){var b=R();d!==b&&(d<b||!b)&&r.emit(Be)}function g(b){var x=s.get().slice(),y=x.length;if(y){for(;x.length<b;)tr(x,x);tr(x.slice(-b),x.slice(0,b)).forEach(function(O,P){var A=P<b,L=m(O.slide,P);A?ti(L,x[0].slide):Nn(a.list,L),tr(o,L),s.register(L,P-b+(A?0:y),O.index)})}}function m(b,x){var y=b.cloneNode(!0);return ft(y,n.classes.clone),y.id=e.root.id+"-clone"+ii(x+1),y}function R(){var b=n.clones;if(!e.is(fn))b=0;else if(Fn(b)){var x=n[c("fixedWidth")]&&t.Layout.slideSize(0),y=x&&Pn(at(a.track)[c("width")]/x);b=y||n[c("autoWidth")]&&e.length||n.perPage*Ts}return b}return{mount:p,destroy:S}}function Es(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=e.state.set,c=t.Layout,o=c.slideSize,d=c.getPadding,p=c.totalSize,T=c.listSize,S=c.sliderSize,v=t.Direction,g=v.resolve,m=v.orient,R=t.Elements,b=R.list,x=R.track,y;function O(){y=t.Transition,i([Bt,hr,Je,Be],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),L(e.index),t.Slides.update())}function A(k,D,Q,re){k!==D&&H(k>Q)&&(w(),I(N(q(),k>Q),!0)),s(gn),a(Pt,D,Q,k),y.start(D,function(){s(ln),a(hn,D,Q,k),re&&re()})}function L(k){I(V(k,!0))}function I(k,D){if(!e.is(Vn)){var Q=D?k:_(k);ut(b,"transform","translate"+g("X")+"("+Q+"px)"),k!==Q&&a(No)}}function _(k){if(e.is(fn)){var D=B(k),Q=D>t.Controller.getEnd(),re=D<0;(re||Q)&&(k=N(k,Q))}return k}function N(k,D){var Q=k-W(D),re=S();return k-=m(re*(Pn(tt(Q)/re)||1))*(D?1:-1),k}function w(){I(q(),!0),y.cancel()}function B(k){for(var D=t.Slides.get(),Q=0,re=1/0,ie=0;ie<D.length;ie++){var ce=D[ie].index,C=tt(V(ce,!0)-k);if(C<=re)re=C,Q=ce;else break}return Q}function V(k,D){var Q=m(p(k-1)-$(k));return D?Y(Q):Q}function q(){var k=g("left");return at(b)[k]-at(x)[k]+m(d(!1))}function Y(k){return n.trimSpace&&e.is(dn)&&(k=tn(k,0,m(S(!0)-T()))),k}function $(k){var D=n.focus;return D==="center"?(T()-o(k,!0))/2:+D*o(k)||0}function W(k){return V(k?t.Controller.getEnd():0,!!n.trimSpace)}function H(k){var D=m(N(q(),k));return k?D>=0:D<=b[g("scrollWidth")]-at(x)[g("width")]}function M(k,D){D=Fn(D)?q():D;var Q=k!==!0&&m(D)<m(W(!1)),re=k!==!1&&m(D)>m(W(!0));return Q||re}return{mount:O,move:A,jump:L,translate:I,shift:N,cancel:w,toIndex:B,toPosition:V,getPosition:q,getLimit:W,exceededLimit:M,reposition:P}}function Ps(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=t.Move,c=s.getPosition,o=s.getLimit,d=s.toPosition,p=t.Slides,T=p.isEnough,S=p.getLength,v=n.omitEnd,g=e.is(fn),m=e.is(dn),R=Ae(q,!1),b=Ae(q,!0),x=n.start||0,y,O=x,P,A,L;function I(){_(),i([Je,Be,ur],_),i(hr,N)}function _(){P=S(!0),A=n.perMove,L=n.perPage,y=H();var C=tn(x,0,v?y:P-1);C!==x&&(x=C,s.reposition())}function N(){y!==H()&&a(ur)}function w(C,oe,Pe){if(!ce()){var ue=V(C),ye=W(ue);ye>-1&&(oe||ye!==x)&&(Q(ye),s.move(ue,ye,O,Pe))}}function B(C,oe,Pe,ue){t.Scroll.scroll(C,oe,Pe,function(){var ye=W(s.toIndex(c()));Q(v?Nt(ye,y):ye),ue&&ue()})}function V(C){var oe=x;if(Mt(C)){var Pe=C.match(/([+\-<>])(\d+)?/)||[],ue=Pe[1],ye=Pe[2];ue==="+"||ue==="-"?oe=Y(x+ +(""+ue+(+ye||1)),x):ue===">"?oe=ye?M(+ye):R(!0):ue==="<"&&(oe=b(!0))}else oe=g?C:tn(C,0,y);return oe}function q(C,oe){var Pe=A||(ie()?1:L),ue=Y(x+Pe*(C?-1:1),x,!(A||ie()));return ue===-1&&m&&!So(c(),o(!C),1)?C?0:y:oe?ue:W(ue)}function Y(C,oe,Pe){if(T()||ie()){var ue=$(C);ue!==C&&(oe=C,C=ue,Pe=!1),C<0||C>y?!A&&(nr(0,C,oe,!0)||nr(y,oe,C,!0))?C=M(k(C)):g?C=Pe?C<0?-(P%L||L):P:C:n.rewind?C=C<0?y:0:C=-1:Pe&&C!==oe&&(C=M(k(oe)+(C<oe?-1:1)))}else C=-1;return C}function $(C){if(m&&n.trimSpace==="move"&&C!==x)for(var oe=c();oe===d(C,!0)&&nr(C,0,e.length-1,!n.rewind);)C<x?--C:++C;return C}function W(C){return g?(C+P)%P||0:C}function H(){for(var C=P-(ie()||g&&A?1:L);v&&C-- >0;)if(d(P-1,!0)!==d(C,!0)){C++;break}return tn(C,0,P-1)}function M(C){return tn(ie()?C:L*C,0,y)}function k(C){return ie()?Nt(C,y):dr((C>=y?P-1:C)/L)}function D(C){var oe=s.toIndex(C);return m?tn(oe,0,y):oe}function Q(C){C!==x&&(O=x,x=C)}function re(C){return C?O:x}function ie(){return!Fn(n.focus)||n.isNavigation}function ce(){return e.state.is([gn,kn])&&!!n.waitForTransition}return{mount:I,go:w,scroll:B,getNext:R,getPrev:b,getAdjacent:q,getEnd:H,setIndex:Q,getIndex:re,toIndex:M,toPage:k,toDest:D,hasFocus:ie,isBusy:ce}}var _s="http://www.w3.org/2000/svg",As="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",qn=40;function Rs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=n.classes,o=n.i18n,d=t.Elements,p=t.Controller,T=d.arrows,S=d.track,v=T,g=d.prev,m=d.next,R,b,x={};function y(){P(),i(Je,O)}function O(){A(),y()}function P(){var B=n.arrows;B&&!(g&&m)&&_(),g&&m&&(Ln(x,{prev:g,next:m}),En(v,B?"":"none"),ft(v,b=gi+"--"+n.direction),B&&(L(),w(),ge([g,m],Bn,S.id),s(Ro,g,m)))}function A(){r.destroy(),$t(v,b),R?(Gt(T?[g,m]:v),g=m=null):yt([g,m],mi)}function L(){i([Bt,hn,Be,Xt,ur],w),a(m,"click",Ae(I,">")),a(g,"click",Ae(I,"<"))}function I(B){p.go(B,!0)}function _(){v=T||an("div",c.arrows),g=N(!0),m=N(!1),R=!0,Nn(v,[g,m]),!T&&ti(v,S)}function N(B){var V='<button class="'+c.arrow+" "+(B?c.prev:c.next)+'" type="button"><svg xmlns="'+_s+'" viewBox="0 0 '+qn+" "+qn+'" width="'+qn+'" height="'+qn+'" focusable="false"><path d="'+(n.arrowPath||As)+'" />';return xo(V)}function w(){if(g&&m){var B=e.index,V=p.getPrev(),q=p.getNext(),Y=V>-1&&B<V?o.last:o.prev,$=q>-1&&B>q?o.first:o.next;g.disabled=V<0,m.disabled=q<0,ge(g,st,Y),ge(m,st,$),s(Io,g,m,V,q)}}return{arrows:x,mount:y,destroy:A,update:w}}var Is=ri+"-interval";function Ws(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.emit,c=yr(n.interval,e.go.bind(e,">"),L),o=c.isPaused,d=t.Elements,p=t.Elements,T=p.root,S=p.toggle,v=n.autoplay,g,m,R=v==="pause";function b(){v&&(x(),S&&ge(S,Bn,d.track.id),R||y(),A())}function x(){n.pauseOnHover&&a(T,"mouseenter mouseleave",function(_){g=_.type==="mouseenter",P()}),n.pauseOnFocus&&a(T,"focusin focusout",function(_){m=_.type==="focusin",P()}),S&&a(S,"click",function(){R?y():O(!0)}),i([Pt,fr,Be],c.rewind),i(Pt,I)}function y(){o()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=g=R=!1,A(),s(li))}function O(_){_===void 0&&(_=!0),R=!!_,A(),o()||(c.pause(),s(ci))}function P(){R||(g||m?O(!1):y())}function A(){S&&(wt(S,Yt,!R),ge(S,st,n.i18n[R?"play":"pause"]))}function L(_){var N=d.bar;N&&ut(N,"width",_*100+"%"),s(Fo,_)}function I(_){var N=t.Slides.getAt(_);c.set(N&&+pt(N.slide,Is)||n.interval)}return{mount:b,destroy:c.cancel,play:y,pause:O,isPaused:o}}function ks(e,t,n){var r=Oe(e),i=r.on;function a(){n.cover&&(i(di,Ae(c,!0)),i([Bt,Je,Be],Ae(s,!0)))}function s(o){t.Slides.forEach(function(d){var p=Hn(d.container||d.slide,"img");p&&p.src&&c(o,p,d)})}function c(o,d,p){p.style("background",o?'center/cover no-repeat url("'+d.src+'")':"",!0),En(d,o?"none":"")}return{mount:a,destroy:Ae(s,!1)}}var Fs=10,Ms=600,Ns=.6,Hs=1.5,Os=800;function Bs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=e.state.set,c=t.Move,o=c.getPosition,d=c.getLimit,p=c.exceededLimit,T=c.translate,S=e.is(dn),v,g,m=1;function R(){i(Pt,O),i([Je,Be],P)}function b(L,I,_,N,w){var B=o();if(O(),_&&(!S||!p())){var V=t.Layout.sliderSize(),q=jr(L)*V*dr(tt(L)/V)||0;L=c.toPosition(t.Controller.toDest(L%V))+q}var Y=So(B,L,1);m=1,I=Y?0:I||cr(tt(L-B)/Hs,Os),g=N,v=yr(I,x,Ae(y,B,L,w),1),s(kn),a(fr),v.start()}function x(){s(ln),g&&g(),a(Xt)}function y(L,I,_,N){var w=o(),B=L+(I-L)*A(N),V=(B-w)*m;T(w+V),S&&!_&&p()&&(m*=Ns,tt(V)<Fs&&b(d(p(!0)),Ms,!1,g,!0))}function O(){v&&v.cancel()}function P(){v&&!v.isPaused()&&(O(),x())}function A(L){var I=n.easingFunc;return I?I(L):1-Math.pow(1-L,4)}return{mount:R,destroy:O,scroll:b,cancel:P}}var nn={passive:!1,capture:!0};function Vs(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=r.unbind,o=e.state,d=t.Move,p=t.Scroll,T=t.Controller,S=t.Elements.track,v=t.Media.reduce,g=t.Direction,m=g.resolve,R=g.orient,b=d.getPosition,x=d.exceededLimit,y,O,P,A,L,I=!1,_,N,w;function B(){s(S,Rr,Dr,nn),s(S,Ir,Dr,nn),s(S,Xo,q,nn),s(S,"click",W,{capture:!0}),s(S,"dragstart",St),i([Bt,Je],V)}function V(){var h=n.drag;ne(!h),A=h==="free"}function q(h){if(_=!1,!N){var f=ye(h);ue(h.target)&&(f||!h.button)&&(T.isBusy()?St(h,!0):(w=f?S:window,L=o.is([gn,kn]),P=null,s(w,Rr,Y,nn),s(w,Ir,$,nn),d.cancel(),p.cancel(),H(h)))}}function Y(h){if(o.is(er)||(o.set(er),a(Po)),h.cancelable)if(L){d.translate(y+Pe(ie(h)));var f=ce(h)>Hi,F=I!==(I=x());(f||F)&&H(h),_=!0,a(_o),St(h)}else D(h)&&(L=k(h),St(h))}function $(h){o.is(er)&&(o.set(ln),a(Ao)),L&&(M(h),St(h)),c(w,Rr,Y),c(w,Ir,$),L=!1}function W(h){!N&&_&&St(h,!0)}function H(h){P=O,O=h,y=b()}function M(h){var f=Q(h),F=re(f),z=n.rewind&&n.rewindByDrag;v(!1),A?T.scroll(F,0,n.snap):e.is(Vn)?T.go(R(jr(f))<0?z?"<":"-":z?">":"+"):e.is(dn)&&I&&z?T.go(x(!0)?">":"<"):T.go(T.toDest(F),!0),v(!0)}function k(h){var f=n.dragMinThreshold,F=wn(f),z=F&&f.mouse||0,G=(F?f.touch:+f)||10;return tt(ie(h))>(ye(h)?G:z)}function D(h){return tt(ie(h))>tt(ie(h,!0))}function Q(h){if(e.is(fn)||!I){var f=ce(h);if(f&&f<Hi)return ie(h)/f}return 0}function re(h){return b()+jr(h)*Nt(tt(h)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ie(h,f){return oe(h,f)-oe(C(h),f)}function ce(h){return zr(h)-zr(C(h))}function C(h){return O===h&&P||O}function oe(h,f){return(ye(h)?h.changedTouches[0]:h)["page"+m(f?"Y":"X")]}function Pe(h){return h/(I&&e.is(dn)?xs:1)}function ue(h){var f=n.noDrag;return!$n(h,"."+Ko+", ."+wr)&&(!f||!$n(h,f))}function ye(h){return typeof TouchEvent<"u"&&h instanceof TouchEvent}function Re(){return L}function ne(h){N=h}return{mount:B,disable:ne,isDragging:Re}}var Ds={Spacebar:" ",Right:xr,Left:br,Up:Ho,Down:Oo};function hi(e){return e=Mt(e)?e:e.key,Ds[e]||e}var Oi="keydown";function zs(e,t,n){var r=Oe(e),i=r.on,a=r.bind,s=r.unbind,c=e.root,o=t.Direction.resolve,d,p;function T(){S(),i(Je,v),i(Je,S),i(Pt,m)}function S(){var b=n.keyboard;b&&(d=b==="global"?window:c,a(d,Oi,R))}function v(){s(d,Oi)}function g(b){p=b}function m(){var b=p;p=!0,ho(function(){p=b})}function R(b){if(!p){var x=hi(b);x===o(br)?e.go("<"):x===o(xr)&&e.go(">")}}return{mount:T,destroy:v,disable:g}}var Sn=ri+"-lazy",rr=Sn+"-srcset",js="["+Sn+"], ["+rr+"]";function Ks(e,t,n){var r=Oe(e),i=r.on,a=r.off,s=r.bind,c=r.emit,o=n.lazyLoad==="sequential",d=[hn,Xt],p=[];function T(){n.lazyLoad&&(S(),i(Be,S))}function S(){Et(p),v(),o?b():(a(d),i(d,g),g())}function v(){t.Slides.forEach(function(x){ni(x.slide,js).forEach(function(y){var O=pt(y,Sn),P=pt(y,rr);if(O!==y.src||P!==y.srcset){var A=n.classes.spinner,L=y.parentElement,I=Hn(L,"."+A)||an("span",A,L);p.push([y,x,I]),y.src||En(y,"none")}})})}function g(){p=p.filter(function(x){var y=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,y)?m(x):!0}),p.length||a(d)}function m(x){var y=x[0];ft(x[1].slide,Gr),s(y,"load error",Ae(R,x)),ge(y,"src",pt(y,Sn)),ge(y,"srcset",pt(y,rr)),yt(y,Sn),yt(y,rr)}function R(x,y){var O=x[0],P=x[1];$t(P.slide,Gr),y.type!=="error"&&(Gt(x[2]),En(O,""),c(di,O,P),c(cn)),o&&b()}function b(){p.length&&m(p.shift())}return{mount:T,destroy:Ae(Et,p),check:g}}function Us(e,t,n){var r=Oe(e),i=r.on,a=r.emit,s=r.bind,c=t.Slides,o=t.Elements,d=t.Controller,p=d.hasFocus,T=d.getIndex,S=d.go,v=t.Direction.resolve,g=o.pagination,m=[],R,b;function x(){y(),i([Je,Be,ur],x);var N=n.pagination;g&&En(g,N?"":"none"),N&&(i([Pt,fr,Xt],_),O(),_(),a(Wo,{list:R,items:m},I(e.index)))}function y(){R&&(Gt(g?Ot(R.children):R),$t(R,b),Et(m),R=null),r.destroy()}function O(){var N=e.length,w=n.classes,B=n.i18n,V=n.perPage,q=p()?d.getEnd()+1:Pn(N/V);R=g||an("ul",w.pagination,o.track.parentElement),ft(R,b=$r+"--"+L()),ge(R,Tt,"tablist"),ge(R,st,B.select),ge(R,pi,L()===Cr?"vertical":"");for(var Y=0;Y<q;Y++){var $=an("li",null,R),W=an("button",{class:w.page,type:"button"},$),H=c.getIn(Y).map(function(k){return k.slide.id}),M=!p()&&V>1?B.pageX:B.slideX;s(W,"click",Ae(P,Y)),n.paginationKeyboard&&s(W,"keydown",Ae(A,Y)),ge($,Tt,"presentation"),ge(W,Tt,"tab"),ge(W,Bn,H.join(" ")),ge(W,st,Kr(M,Y+1)),ge(W,sn,-1),m.push({li:$,button:W,page:Y})}}function P(N){S(">"+N,!0)}function A(N,w){var B=m.length,V=hi(w),q=L(),Y=-1;V===v(xr,!1,q)?Y=++N%B:V===v(br,!1,q)?Y=(--N+B)%B:V==="Home"?Y=0:V==="End"&&(Y=B-1);var $=m[Y];$&&(bo($.button),S(">"+Y),St(w,!0))}function L(){return n.paginationDirection||n.direction}function I(N){return m[d.toPage(N)]}function _(){var N=I(T(!0)),w=I(T());if(N){var B=N.button;$t(B,Yt),yt(B,Wi),ge(B,sn,-1)}if(w){var V=w.button;ft(V,Yt),ge(V,Wi,!0),ge(V,sn,"")}a(ko,{list:R,items:m},N,w)}return{items:m,mount:x,destroy:y,getAt:I,update:_}}var qs=[" ","Enter"];function Gs(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function s(){e.splides.forEach(function(g){g.isParent||(d(e,g.splide),d(g.splide,e))}),r&&p()}function c(){a.forEach(function(g){g.destroy()}),Et(a)}function o(){c(),s()}function d(g,m){var R=Oe(g);R.on(Pt,function(b,x,y){m.go(m.is(fn)?y:b)}),a.push(R)}function p(){var g=Oe(e),m=g.on;m(oi,S),m(Mo,v),m([Bt,Je],T),a.push(g),g.emit(si,e.splides)}function T(){ge(t.Elements.list,pi,n.direction===Cr?"vertical":"")}function S(g){e.go(g.index)}function v(g,m){ei(qs,hi(m))&&(S(g),St(m))}return{setup:Ae(t.Media.set,{slideFocus:Fn(i)?r:i},!0),mount:s,destroy:c,remount:o}}function Ys(e,t,n){var r=Oe(e),i=r.bind,a=0;function s(){n.wheel&&i(t.Elements.track,"wheel",c,nn)}function c(d){if(d.cancelable){var p=d.deltaY,T=p<0,S=zr(d),v=n.wheelMinThreshold||0,g=n.wheelSleep||0;tt(p)>v&&S-a>g&&(e.go(T?"<":">"),a=S),o(T)&&St(d)}}function o(d){return!n.releaseWheel||e.state.is(gn)||t.Controller.getAdjacent(d)!==-1}return{mount:s}}var Xs=90;function Zs(e,t,n){var r=Oe(e),i=r.on,a=t.Elements.track,s=n.live&&!n.isNavigation,c=an("span",hs),o=yr(Xs,Ae(p,!1));function d(){s&&(S(!t.Autoplay.isPaused()),ge(a,Mi,!0),c.textContent="…",i(li,Ae(S,!0)),i(ci,Ae(S,!1)),i([hn,Xt],Ae(p,!0)))}function p(v){ge(a,Fi,v),v?(Nn(a,c),o.start()):(Gt(c),o.cancel())}function T(){yt(a,[ki,Mi,Fi]),Gt(c)}function S(v){s&&ge(a,ki,v?"off":"polite")}return{mount:d,disable:S,destroy:T}}var Js=Object.freeze({__proto__:null,Media:as,Direction:ss,Elements:Cs,Slides:ws,Layout:$s,Clones:Ls,Move:Es,Controller:Ps,Arrows:Rs,Autoplay:Ws,Cover:ks,Scroll:Bs,Drag:Vs,Keyboard:zs,LazyLoad:Ks,Pagination:Us,Sync:Gs,Wheel:Ys,Live:Zs}),Qs={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"},el={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:vs,i18n:Qs,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function tl(e,t,n){var r=t.Slides;function i(){Oe(e).on([Bt,Be],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function s(c,o){r.style("transition","opacity "+n.speed+"ms "+n.easing),ho(o)}return{mount:i,start:s,cancel:Dr}}function nl(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,s=t.Elements.list,c=Ae(ut,s,"transition"),o;function d(){Oe(e).bind(s,"transitionend",function(v){v.target===s&&o&&(T(),o())})}function p(v,g){var m=r.toPosition(v,!0),R=r.getPosition(),b=S(v);tt(m-R)>=1&&b>=1?n.useScroll?a.scroll(m,b,!1,g):(c("transform "+b+"ms "+n.easing),r.translate(m,!0),o=g):(r.jump(v),g())}function T(){c(""),a.cancel()}function S(v){var g=n.rewindSpeed;if(e.is(dn)&&g){var m=i.getIndex(!0),R=i.getEnd();if(m===0&&v>=R||m>=R&&v===0)return g}return n.speed}return{mount:d,start:p,cancel:T}}var rl=(function(){function e(n,r){this.event=Oe(),this.Components={},this.state=is(on),this.splides=[],this._o={},this._E={};var i=Mt(n)?Co(document,n):n;Cn(i,i+" is invalid."),this.root=i,r=kt({label:pt(i,st)||"",labelledby:pt(i,ui)||""},el,e.defaults,r||{});try{kt(r,JSON.parse(pt(i,ri)))}catch{Cn(!1,"Invalid JSON")}this._o=Object.create(kt({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,s=this.state,c=this.Components;Cn(s.is([on,lr]),"Already mounted!"),s.set(on),this._C=c,this._T=i||this._T||(this.is(Vn)?tl:nl),this._E=r||this._E;var o=Ln({},Js,this._E,{Transition:this._T});return qt(o,function(d,p){var T=d(a,c,a._o);c[p]=T,T.setup&&T.setup()}),qt(c,function(d){d.mount&&d.mount()}),this.emit(Bt),ft(this.root,fs),s.set(ln),this.emit(Ur),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(ln)&&(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(Ot(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(Be),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(on)?Oe(this).on(Ur,this.destroy.bind(this,r)):(qt(this._C,function(s){s.destroy&&s.destroy(r)},!0),i.emit(ai),i.destroy(),r&&Et(this.splides),a.set(lr)),this},Qa(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})(),fi=rl;fi.defaults={};fi.STATES=ts;var Bi=[[Bt,"onMounted"],[Ur,"onReady"],[Pt,"onMove"],[hn,"onMoved"],[oi,"onClick"],[$o,"onActive"],[To,"onInactive"],[Lo,"onVisible"],[Eo,"onHidden"],[Be,"onRefresh"],[Je,"onUpdated"],[cn,"onResize"],[hr,"onResized"],[Po,"onDrag"],[_o,"onDragging"],[Ao,"onDragged"],[fr,"onScroll"],[Xt,"onScrolled"],[ai,"onDestroy"],[Ro,"onArrowsMounted"],[Io,"onArrowsUpdated"],[Wo,"onPaginationMounted"],[ko,"onPaginationUpdated"],[si,"onNavigationMounted"],[li,"onAutoplayPlay"],[Fo,"onAutoplayPlaying"],[ci,"onAutoplayPause"],[di,"onLazyLoadLoaded"]];function yi(...e){return e.filter(Boolean).join(" ")}function pr(e){return e!==null&&typeof e=="object"}function Yr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Yr(n,t[r]));if(pr(e)&&pr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Yr(e[i],t[i]))}return e===t}function il(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function ol(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 Xr(e,t){const n=e;return ol(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():pr(r)?n[i]=Xr(pr(n[i])?n[i]:{},r):n[i]=r}),n}var al=({children:e,className:t,...n})=>u.createElement("div",{className:yi("splide__track",t),...n},u.createElement("ul",{className:"splide__list"},e)),vi=class extends u.Component{constructor(){super(...arguments),this.splideRef=u.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new fi(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Xr({},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&&!Yr(this.options,e)&&(this.splide.options=e,this.options=Xr({},e));const t=this.getSlides();il(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){Bi.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 u.createElement(t,{className:yi("splide",e),ref:this.splideRef,...this.omit(i,["options",...Bi.map(a=>a[1])])},n?u.createElement(al,null,r):r)}},bi=({children:e,className:t,...n})=>u.createElement("li",{className:yi("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 sl="RichTextRenderer-module__link___BWeZ2",ll={link:sl},cl=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))},Tr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>cl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Tr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:r!==void 0?E.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const _n=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:ll.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:dl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function dl(e){return{...e.fontFamily&&{fontFamily:Tr(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 ul="SvgImage-module__svg___q3xE-",pl="SvgImage-module__img___VsTm-",Vi={svg:ul,img:pl},ml=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},gl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,kt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=u.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return u.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!ml(e)||!a?l.jsx("img",{src:e,alt:"",className:Ee(Vi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Ee(Vi.svg,r),style:{"--svg":gl(e),"--fill":t,"--hover-fill":n,...i??{}}})},hl={"top-left":le.topLeftAlignment,"top-center":le.topCenterAlignment,"top-right":le.topRightAlignment,"middle-left":le.middleLeftAlignment,"middle-center":le.middleCenterAlignment,"middle-right":le.middleRightAlignment,"bottom-left":le.bottomLeftAlignment,"bottom-center":le.bottomCenterAlignment,"bottom-right":le.bottomRightAlignment};function fl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=u.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:d,wordSpacing:p,fontSizeLineHeight:T,textAppearance:S,color:v}=n.imageCaption,[g,m]=u.useState(void 0),[R,b]=u.useState(null),[x,y]=u.useState(0),[O,P]=u.useState(0),{direction:_,transition:L,controls:I,pagination:A,imageCaption:N,triggers:w}=e,B=u.useRef(L.type),{x:V,y:U}=e.controls.offset,Y=$=>{i&&i.go($)};return u.useEffect(()=>{if(!R)return;const $=new ResizeObserver(W=>{if(!i)return;const[H]=W;m({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return $.observe(R),()=>$.unobserve(R)},[R]),u.useEffect(()=>{!i||B.current===L.type||(P($=>$+1),B.current=L.type)},[L.type]),l.jsx("div",{className:Ee(le.wrapper,{[le.editor]:r}),ref:b,children:l.jsxs("div",{className:le.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ee(le.captionBlock),children:l.jsx("div",{className:le.captionTextWrapper,children:t.map(($,W)=>l.jsx("div",{className:Ee(le.captionText,hl[N.alignment],{[le.withPointerEvents]:W===x&&r,[le.active]:W===x}),style:{fontFamily:Tr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":E.scalingValue(s.width,r),letterSpacing:E.scalingValue(o,r),wordSpacing:E.scalingValue(p,r),textAlign:d,fontSize:E.scalingValue(T.fontSize,r),lineHeight:E.scalingValue(T.lineHeight,r),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:v,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:le.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:E.scalingValue(N.offset.y,r),left:E.scalingValue(N.offset.x,r)},children:l.jsx(_n,{content:$.imageCaption})})},W))})}),l.jsx(vi,{onMove:$=>{y($.index)},ref:a,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:w.autoPlay!==null,...w.autoPlay!==null&&{interval:parseInt(w.autoPlay)*1e3},direction:_==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:w.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map(($,W)=>l.jsx(bi,{children:l.jsx("div",{className:le.sliderItem,children:l.jsx("div",{className:le.imgWrapper,children:l.jsx("img",{className:Ee(le.sliderImage,{[le.contain]:$.image.objectFit==="contain",[le.cover]:$.image.objectFit==="cover"}),src:$.image.url,alt:$.image.name??""})})})},W))},O),I.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ee(le.arrow,{[le.arrowVertical]:_==="vert",[le.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:le.arrowInner,style:{transform:`translate(${E.scalingValue(V,r)}, ${E.scalingValue(U*(_==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&l.jsx(kt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Ee(le.arrowImg,le.mirror)}),!I.arrowsImgUrl&&l.jsx(Di,{color:I.color,className:Ee(le.arrowIcon,le.arrowImg,le.mirror)})]})}),l.jsx("div",{className:Ee(le.arrow,le.nextArrow,{[le.arrowVertical]:_==="vert",[le.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:le.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${E.scalingValue(V*(_==="horiz"?-1:1),r)}, ${E.scalingValue(U,r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&l.jsx(kt,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:le.arrowImg}),!I.arrowsImgUrl&&l.jsx(Di,{color:I.color,className:Ee(le.arrowIcon,le.arrowImg)})]})})]}),w.triggersList.click&&l.jsx("div",{className:le.clickOverlay,onClick:()=>{i&&i.go("+1")}}),A.isActive&&l.jsx("div",{className:Ee(le.pagination,{[le.paginationInsideBottom]:A.position==="inside-1"&&_==="horiz",[le.paginationInsideTop]:A.position==="inside-2"&&_==="horiz",[le.paginationOutsideBottom]:A.position==="outside-1"&&_==="horiz",[le.paginationOutsideTop]:A.position==="outside-2"&&_==="horiz",[le.paginationInsideLeft]:A.position==="inside-1"&&_==="vert",[le.paginationInsideRight]:A.position==="inside-2"&&_==="vert",[le.paginationOutsideLeft]:A.position==="outside-1"&&_==="vert",[le.paginationOutsideRight]:A.position==="outside-2"&&_==="vert",[le.paginationVertical]:_==="vert"}),children:l.jsx("div",{className:le.paginationInner,style:{backgroundColor:A.colors[2],transform:`scale(${A.scale/100}) translate(${E.scalingValue(A.offset.x,r)}, ${E.scalingValue(A.offset.y,r)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:t.map(($,W)=>l.jsx("button",{onClick:()=>{i&&i.go(W)},className:Ee(le.paginationItem),children:l.jsx("div",{className:Ee(le.dot,{[le.activeDot]:W===x}),style:{backgroundColor:W===x?A.colors[0]:A.colors[1],"--pagination-hover-color":A.hover}})},W))})})]})})}function Di({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 yl={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"]}},vl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",bl="ImageRevealSlider-module__image___Qjt-e",xl="ImageRevealSlider-module__link___N-iLG",Cl="ImageRevealSlider-module__cursor___2U03d",en={imageRevealSlider:vl,image:bl,link:xl,cursor:Cl};function ji(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Sl(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Wr(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Wr(e);a=s.height/s.width*i}else{const s=await Wr(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function wl({settings:e,content:t,isEditor:n}){const[r,i]=u.useState(null),[a,s]=u.useState([]),[c,o]=u.useState(0),d=u.useRef(0),[p,T]=u.useState({x:0,y:0}),[S,v]=u.useState(1),[g,m]=u.useState("none"),R=u.useRef({x:0,y:0}),[b,x]=u.useState(!1),{sizeType:y,imageWidth:O,randomRangeImageWidth:P}=e.imageSize,{revealPosition:_,visible:L}=e.position,{cursorType:I,target:A,defaultCursorScale:N,defaultCursor:w,hoverCursorScale:B,hoverCursor:V}=e.cursor;u.useEffect(()=>{if(!r)return;const $=(M,F)=>{const D=r.getBoundingClientRect(),Q=M-D.left,re=F-D.top;if(T({x:Q,y:re}),I==="system"){m("none"),v(1);return}const ie=Q,ce=re,C=document.elementFromPoint(D.left+ie,D.top+ce);if(C&&C.closest("a")){m("none"),v(1);return}const oe=ji(ie,ce,a)||A==="area"?{img:V??"none",scale:B}:{img:w??"none",scale:N};m(oe.img),v(oe.scale)},W=M=>{M.stopPropagation(),R.current={x:M.clientX,y:M.clientY},$(M.clientX,M.clientY)},H=()=>{b&&$(R.current.x,R.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",H,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",H,!0)}},[r,b,p,I,A,V,w,B,N,a]),u.useEffect(()=>{b||(m("none"),v(0))},[b]);const U=async($,W,H,M={})=>{const{width:F,height:D,finalWidth:Q}=await Sl($.image.url,y,O,P);let re=0,ie=0;_==="same"?(re=W/2,ie=H/2):(re=M.x??Math.random()*W,ie=M.y??Math.random()*H);const ce=Math.min(Math.max(re,F/2),W-F/2),C=Math.min(Math.max(ie,D/2),H-D/2);return{id:d.current++,url:$.image.url,link:$.link,name:$.image.name,x:ce,y:C,width:Q}};u.useEffect(()=>{if(!r||t.length===0)return;const $=r.getBoundingClientRect(),W=$.width,H=$.height,M=[];(async()=>{const D=t[0],Q=await U(D,W,H);M.push(Q),s(M),o(1)})()},[y,O,P,_,r]),u.useEffect(()=>{L==="last One"&&s($=>$.length>0?[$[$.length-1]]:[])},[L]);const Y=async $=>{if(!r)return;const W=r.getBoundingClientRect(),H=$.clientX-W.left,M=$.clientY-W.top;if(A==="image"&&!ji(H,M,a))return;let F=0,D=0;_==="on Click"?(F=H,D=M):_==="same"?(F=W.width/2,D=W.height/2):(F=Math.random()*W.width,D=Math.random()*W.height);const Q=t[c],re=await U(Q,W.width,W.height,{x:F,y:D});s(ie=>L==="all"?[...ie,re]:[re]),o(ie=>ie>=t.length-1?0:ie+1)};return l.jsxs("div",{ref:i,onClick:Y,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:en.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[a.map($=>l.jsx("div",{className:en.wrapper,style:{top:`${$.y}px`,left:`${$.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:$.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:A==="area"&&$.link?l.jsx("a",{href:$.link,target:"_blank",className:en.link,children:l.jsx("img",{src:$.url,alt:$.name,className:en.image},$.id)}):l.jsx("img",{src:$.url,alt:$.name,className:en.image},$.id)},$.id)),b&&l.jsx("div",{className:en.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const $l={element:wl,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:""}]}}}},Tl="LightBox-module__hidden___9s-9x",Ll="LightBox-module__heroImage___sTxNF",El="LightBox-module__background___rm9ml",Pl="LightBox-module__editor___4ACaY",Al="LightBox-module__contentStyle___Bgnsq",_l="LightBox-module__imageStyle___tLIlB",Rl="LightBox-module__imgWrapper___LuFUp",Il="LightBox-module__contain___8-yaS",Wl="LightBox-module__cover___hNvOG",Fl="LightBox-module__caption___b6L2I",kl="LightBox-module__captionTextInner___rCGNH",Ml="LightBox-module__lightboxSplide___XFuWC",Nl="LightBox-module__arrow___iz38X",Hl="LightBox-module__arrowVertical___Zfz81",Ol="LightBox-module__nextArrow___zkAQN",Bl="LightBox-module__arrowInner___p48sW",Vl="LightBox-module__arrowIcon___3VaFf",Dl="LightBox-module__arrowImg___pNV88",jl="LightBox-module__mirror___pjeXc",zl="LightBox-module__thumbsWrapper___GB-nU",Kl="LightBox-module__thumbsContainerVertical___wttk5",Gl="LightBox-module__thumbsContainer___osSma",Ul="LightBox-module__thumbsAlignStart___MO6tY",ql="LightBox-module__thumbsAlignCenter___Q4sUx",Yl="LightBox-module__thumbsAlignEnd___p4y9R",Xl="LightBox-module__thumbItem___HvnF3",Jl="LightBox-module__closeButton___g2khP",Zl="LightBox-module__fadeIn___0m5GW",Ql="LightBox-module__slideInLeft___gPYwC",ec="LightBox-module__slideInRight___S-pPp",tc="LightBox-module__slideInTop___DFdAj",nc="LightBox-module__slideInBottom___m27kZ",rc="LightBox-module__fadeOut___55qBR",ic="LightBox-module__slideOutLeft___NvU7P",oc="LightBox-module__slideOutRight___SK7eC",ac="LightBox-module__slideOutTop___Vgg0z",sc="LightBox-module__slideOutBottom___nJ0Ef",lc="LightBox-module__scaleSlide___vZriG",X={hidden:Tl,heroImage:Ll,background:El,editor:Pl,contentStyle:Al,imageStyle:_l,imgWrapper:Rl,contain:Il,cover:Wl,caption:Fl,captionTextInner:kl,lightboxSplide:Ml,arrow:Nl,arrowVertical:Hl,nextArrow:Ol,arrowInner:Bl,arrowIcon:Vl,arrowImg:Dl,mirror:jl,thumbsWrapper:zl,thumbsContainerVertical:Kl,thumbsContainer:Gl,thumbsAlignStart:Ul,thumbsAlignCenter:ql,thumbsAlignEnd:Yl,thumbItem:Xl,closeButton:Jl,fadeIn:Zl,slideInLeft:Ql,slideInRight:ec,slideInTop:tc,slideInBottom:nc,fadeOut:rc,slideOutLeft:ic,slideOutRight:oc,slideOutTop:ac,slideOutBottom:sc,scaleSlide:lc},qn=(e,t,n)=>{const r={},[i,a]=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"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:r.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,r};function Jo(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 zi(e){const t=e.getBoundingClientRect(),n=Jo(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let d,p;o>c?(d=r,p=r/o):(p=i,d=i*o);const T=t.left+n.left,S=t.top+n.top,v=(r-d)/2+T,g=(i-p)/2+S;return{x:v,y:g,width:d,height:p}}function Ki(e){const t=e.getBoundingClientRect(),n=Jo(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Gi(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 cc(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),a=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const dc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=u.useState(!1),{url:d}=e.thumbnailBlock.cover;return u.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:X.heroImage,onClick:()=>o(!0)}),l.jsx(uc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},uc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var h;const[o,d]=u.useState(0),[p,T]=u.useState(0),[S,v]=u.useState(!1),[g,m]=u.useState(!1),[R,b]=u.useState({}),x=u.useRef(null),y=u.useRef(null),O=u.useRef(null),P=u.useRef(!1),_=u.useRef(null),L=u.useRef(null),I=u.useRef(null),A=u.useRef(null),N=u.useRef(!1),w=u.useRef(null),[B,V]=u.useState(!1),{appear:U,triggers:Y,slider:$,thumbnail:W,controls:H,area:M,caption:F,layout:D}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:re,backdropDisappearClass:ie,disappearClass:ce}=cc(U.type,U.direction),C=(c==null?void 0:c.itemId)??null;u.useEffect(()=>{const f=()=>{setTimeout(()=>{var j,q;(q=(j=x.current)==null?void 0:j.splide)==null||q.refresh()},16)},k=()=>{T(j=>j+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",k),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",k)}},[]),u.useEffect(()=>{if(!e||!W.isActive){V(!1);return}const f=w.current;if(!f)return;const k=()=>{$.direction==="horiz"?V(f.scrollWidth>f.clientWidth):V(f.scrollHeight>f.clientHeight)};k();const j=new ResizeObserver(k);return j.observe(f),()=>j.disconnect()},[e,W.isActive,n.length,R,$.direction]);const oe=u.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,k=Gi(M.color);f&&!s&&k>.9&&(document.body.style.backgroundColor=""),v(!0),P.current=!0;const j=q=>{q.target===_.current&&q.animationName&&(_.current&&L.current&&_.current.removeEventListener("animationend",L.current),L.current=null,P.current&&(P.current=!1,t()),v(!1))};_.current&&(L.current=j,_.current.addEventListener("animationend",j))},[t,M.color,s]),Pe=(f,k,j)=>{var q,ee;if(f){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&o===n.length-1?oe():(q=x.current)==null||q.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const te=f.getBoundingClientRect(),J=k-te.left,pe=j-te.top,Ce=te.width,he=te.height;let fe;$.direction==="horiz"?fe=J<Ce/2?"-1":"+1":fe=pe<he/2?"-1":"+1",(ee=x.current)==null||ee.go(fe)}}},ue=f=>{if(N.current){N.current=!1;return}const k=n[o],j=(k==null?void 0:k.image.objectFit)==="cover";let q,ee;if("changedTouches"in f&&f.changedTouches.length>0)q=f.changedTouches[0].clientX,ee=f.changedTouches[0].clientY;else if("clientX"in f)q=f.clientX,ee=f.clientY;else return;let te;if(j&&O.current){const J=Ki(O.current);te=q>=J.left&&q<=J.right&&ee>=J.top&&ee<=J.bottom}else{const J=O.current?zi(O.current):null;if(!J){f.target===f.currentTarget&&oe();return}te=q>=J.x&&q<=J.x+J.width&&ee>=J.y&&ee<=J.y+J.height}te?Pe(O.current,q,ee):oe()},ye=f=>{const k=f.target;(k.classList.contains(X.thumbsWrapper)||k.classList.contains(X.thumbsContainer))&&ue(f)};u.useEffect(()=>{if(!e)return;const f=k=>{var j,q;if(k.key==="Escape"){oe();return}if(k.key==="ArrowRight"){d(ee=>(ee+1)%Math.max(n.length,1)),(j=x.current)==null||j.go("+1");return}k.key==="ArrowLeft"&&(d(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(q=x.current)==null||q.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,oe,n.length]),u.useEffect(()=>{if(e){if(d(0),T(k=>k+1),P.current=!1,v(!1),m(!1),b({}),!C)return;const f=new CustomEvent("page-overlay",{detail:{itemId:C}});window.dispatchEvent(f)}return()=>{_.current&&L.current&&(_.current.removeEventListener("animationend",L.current),L.current=null),m(!1)}},[e,C]),u.useEffect(()=>{y.current!==null&&y.current!==$.type&&T(f=>f+1),y.current=$.type},[$.type]),u.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,k=window.matchMedia("(max-width: 768px)").matches,j=Gi(M.color);document.body.style.overflow="hidden",m(!1);const q=te=>{te.target===_.current&&!P.current&&te.animationName&&(k&&!s&&j>.9&&(document.body.style.backgroundColor=M.color),m(!0),_.current&&I.current&&_.current.removeEventListener("animationend",I.current),I.current=null)};_.current&&(I.current=q,_.current.addEventListener("animationend",q));const ee=te=>{const J=te.target;J&&(J.closest(`.${X.thumbsWrapper}`)||J.closest(`.${X.thumbsContainer}`))||$.type!=="slide"&&te.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",ee),_.current&&I.current&&(_.current.removeEventListener("animationend",I.current),I.current=null),m(!1)}},[e,s,M.color,$.type]),u.useEffect(()=>{if(!e)return;const f=k=>{var q,ee;if(P.current){k.stopPropagation();return}if(N.current){N.current=!1;return}const j=k.target;if(!(j&&(j.closest(`.${X.thumbsContainer}`)||j.closest(`.${X.thumbItem}`)||j.closest(`.${X.arrow}`)||j.closest(`.${X.closeButton}`)||j.closest(`.${X.caption}`)))){if($.type==="slide"&&Y.type==="drag"&&((ee=(q=x.current)==null?void 0:q.splide)!=null&&ee.root)){const te=x.current.splide.root;if(j&&(te.contains(j)||te===j))return}if(k.touches.length===0&&k.changedTouches.length>0){const te=n[o],J=(te==null?void 0:te.image.objectFit)==="cover",pe=k.changedTouches[0];let Ce;if(J&&O.current){const he=Ki(O.current);Ce=pe.clientX>=he.left&&pe.clientX<=he.right&&pe.clientY>=he.top&&pe.clientY<=he.bottom}else{const he=O.current?zi(O.current):null;if(!he)return;Ce=pe.clientX>=he.x&&pe.clientX<=he.x+he.width&&pe.clientY>=he.y&&pe.clientY<=he.y+he.height}if(!Ce){k.stopPropagation(),P.current=!0;const he=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),oe()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,oe,o,n]);const Re=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&Y.type==="drag";u.useEffect(()=>{var fe,K;if(!e||!Re||!((K=(fe=x.current)==null?void 0:fe.splide)!=null&&K.root))return;const f=x.current.splide.root,k=30,j=(G,z)=>{if(A.current){const de=Math.abs(G-A.current.x),Le=Math.abs(z-A.current.y);(de>0||Le>0)&&(N.current=!0)}},q=G=>{A.current&&(G.preventDefault(),j(G.clientX,G.clientY))},ee=G=>{A.current&&G.touches.length>0&&(G.preventDefault(),j(G.touches[0].clientX,G.touches[0].clientY))},te=(G,z)=>{if(!A.current||!x.current){A.current=null;return}const de=Math.abs(G-A.current.x),Le=Math.abs(z-A.current.y);Le>k&&Le>de&&x.current.go(z<A.current.y?"+1":"-1"),A.current=null},J=G=>{A.current&&te(G.clientX,G.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",q)},pe=G=>{if(A.current){if(G.changedTouches.length>0){const z=G.changedTouches[0];te(z.clientX,z.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",ee)}},Ce=G=>{A.current={x:G.clientX,y:G.clientY},N.current=!1,document.addEventListener("pointermove",q,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},he=G=>{G.touches.length>0&&(A.current={x:G.touches[0].clientX,y:G.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return f.addEventListener("pointerdown",Ce),f.addEventListener("touchstart",he),()=>{f.removeEventListener("pointerdown",Ce),f.removeEventListener("touchstart",he),document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),A.current=null,N.current=!1}},[e,Re,p]);const ne={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:go.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:_,className:Ee(X.background,S?ie:re,{[X.editor]:s},{[X.hidden]:!e}),style:{...ne,...g&&!s&&!S?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?_:null,className:Ee(X.contentStyle,S?ce:Q,{[X.editor]:s},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(vi,{onMove:f=>d(f.index),ref:x,className:X.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((f,k)=>{const j=qn(D.position,D.offset,s),q=`${E.scalingValue(D.padding.top,s)} ${E.scalingValue(D.padding.right,s)} ${E.scalingValue(D.padding.bottom,s)} ${E.scalingValue(D.padding.left,s)}`,ee=$.type==="scale"?(()=>{const{transform:te,...J}=j;return{...J,position:"absolute",padding:q,boxSizing:"border-box","--position-transform":te||"none"}})():{...j,position:"absolute",padding:q,boxSizing:"border-box"};return l.jsx(bi,{children:l.jsx("div",{className:X.imgWrapper,onClick:ue,children:l.jsx("img",{ref:k===o?O:null,className:Ee(X.imageStyle,{[X.contain]:f.image.objectFit==="contain",[X.cover]:f.image.objectFit==="cover",[X.scaleSlide]:$.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...ee,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},k)})},p),H.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ee(X.arrow,{[X.arrowVertical]:$.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(H.offset.x,s)}, ${E.scalingValue(H.offset.y*($.direction==="horiz"?1:-1),s)}) scale(${H.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[H.arrowsImgUrl&&l.jsx(kt,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Ee(X.arrowImg,X.mirror)}),!H.arrowsImgUrl&&l.jsx(Ui,{color:H.color,className:Ee(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:Ee(X.arrow,X.nextArrow,{[X.arrowVertical]:$.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(H.offset.x*($.direction==="horiz"?-1:1),s)}, ${E.scalingValue(H.offset.y,s)}) scale(${H.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[H.arrowsImgUrl&&l.jsx(kt,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:X.arrowImg}),!H.arrowsImgUrl&&l.jsx(Ui,{color:H.color,className:Ee(X.arrowIcon,X.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const f=qn(M.closeIconAlign,M.closeIconOffset,s),k=`scale(${M.closeIconScale})`,j=f.transform?`${f.transform} ${k}`:k;return l.jsx("button",{className:X.closeButton,style:{...f,transform:j},onClick:oe,"aria-label":"Close lightbox",children:l.jsx(kt,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),F&&F.isActive&&r.imageCaption&&((h=n[o])==null?void 0:h.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:k,letterSpacing:j,textAlign:q,wordSpacing:ee,fontSizeLineHeight:te,textAppearance:J,color:pe}=r.imageCaption;return l.jsx("div",{className:X.caption,style:{...qn(F.alignment,F.offset,s),fontFamily:Tr(k.fontFamily),fontWeight:k.fontWeight,fontStyle:k.fontStyle,width:f.sizing==="auto"?"max-content":E.scalingValue(f.width,s),letterSpacing:E.scalingValue(j,s),wordSpacing:E.scalingValue(ee,s),textAlign:q,fontSize:E.scalingValue(te.fontSize,s),lineHeight:E.scalingValue(te.lineHeight,s),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:pe},onClick:Ce=>Ce.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":F.linkColor,"--link-hover-color":F.linkHoverColor},children:l.jsx(_n,{content:n[o].imageCaption})})})})(),W.isActive&&(()=>{const[f,k]=W.position.split("-"),j=$.direction==="horiz"?`${f}-left`:W.position,q=qn(j,W.offset,s),ee=()=>{if($.direction==="horiz"){if(k==="left")return"flex-start";if(k==="center")return"center";if(k==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:w,className:X.thumbsWrapper,onClick:te=>ye(te),style:{position:s?"absolute":"fixed",...q,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ee(X.thumbsContainer,{[X.thumbsContainerVertical]:$.direction==="vert",[X.thumbsAlignStart]:W.align==="start",[X.thumbsAlignCenter]:W.align==="center",[X.thumbsAlignEnd]:W.align==="end"}),style:{gap:E.scalingValue(W.grid.gap,s),justifyContent:B?"flex-start":ee()},children:n.map((te,J)=>{const pe=J===o,Ce=R[J],fe=W.grid.size*(pe?W.activeState.scale:1),K=()=>{if(W.fit!=="fit")return{};if(!Ce)return $.direction==="horiz"?{height:E.scalingValue(fe,s)}:{width:E.scalingValue(fe,s)};const G=Ce.width/Ce.height;if($.direction==="horiz"){const z=fe,de=z*G;return{width:E.scalingValue(de,s),height:E.scalingValue(z,s)}}else{const z=fe,de=z/G;return{width:E.scalingValue(z,s),height:E.scalingValue(de,s)}}};return l.jsx("button",{className:X.thumbItem,style:{...$.direction==="horiz"&&W.fit!=="fit"?{height:E.scalingValue(fe,s)}:{},...$.direction==="vert"&&W.fit!=="fit"?{width:E.scalingValue(fe,s)}:{},...W.fit==="cover"?{width:E.scalingValue(fe,s),height:E.scalingValue(fe,s)}:{},...K(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?W.activeState.opacity/100:W.opacity/100,"--thumb-hover":W.activeState.opacity/100},onClick:G=>{var z;G.stopPropagation(),d(J),(z=x.current)==null||z.go(J)},onMouseEnter:()=>{var G;W.triggers==="hov"&&((G=x.current)==null||G.go(J))},children:l.jsx("img",{src:te.image.url,alt:te.image.name??"",onLoad:G=>{const z=G.currentTarget;z.naturalWidth&&z.naturalHeight&&b(de=>({...de,[J]:{width:z.naturalWidth,height:z.naturalHeight}}))},style:{objectFit:W.fit==="cover"?"cover":"contain",...W.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...W.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${te.image.name}-${J}`)})})})})()]})]}),document.getElementById(a))};function Ui({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 pc={element:dc,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 Yn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function mc(e){return`
6
+ */const sl="RichTextRenderer-module__link___BWeZ2",ll={link:sl},cl=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))},Tr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>cl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function nt(e,t){var i,a,s;const{fontSize:n,lineHeight:r}=e;return{fontFamily:Tr(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:r!==void 0?E.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(s=e.textAppearance)==null?void 0:s.fontVariant,textAlign:e.textAlign,color:e.color}}const An=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:ll.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:dl(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function dl(e){return{...e.fontFamily&&{fontFamily:Tr(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 ul="SvgImage-module__svg___q3xE-",pl="SvgImage-module__img___VsTm-",Vi={svg:ul,img:pl},ml=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},gl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ft=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,s]=u.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return u.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');s(c)}},[]),!ml(e)||!a?l.jsx("img",{src:e,alt:"",className:Ee(Vi.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Ee(Vi.svg,r),style:{"--svg":gl(e),"--fill":t,"--hover-fill":n,...i??{}}})},hl={"top-left":le.topLeftAlignment,"top-center":le.topCenterAlignment,"top-right":le.topRightAlignment,"middle-left":le.middleLeftAlignment,"middle-center":le.middleCenterAlignment,"middle-right":le.middleRightAlignment,"bottom-left":le.bottomLeftAlignment,"bottom-center":le.bottomCenterAlignment,"bottom-right":le.bottomRightAlignment};function fl({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=u.useState(null),{widthSettings:s,fontSettings:c,letterSpacing:o,textAlign:d,wordSpacing:p,fontSizeLineHeight:T,textAppearance:S,color:v}=n.imageCaption,[g,m]=u.useState(void 0),[R,b]=u.useState(null),[x,y]=u.useState(0),[O,P]=u.useState(0),{direction:A,transition:L,controls:I,pagination:_,imageCaption:N,triggers:w}=e,B=u.useRef(L.type),{x:V,y:q}=e.controls.offset,Y=$=>{i&&i.go($)};return u.useEffect(()=>{if(!R)return;const $=new ResizeObserver(W=>{if(!i)return;const[H]=W;m({width:Math.round(H.contentRect.width),height:Math.round(H.contentRect.height)})});return $.observe(R),()=>$.unobserve(R)},[R]),u.useEffect(()=>{!i||B.current===L.type||(P($=>$+1),B.current=L.type)},[L.type]),l.jsx("div",{className:Ee(le.wrapper,{[le.editor]:r}),ref:b,children:l.jsxs("div",{className:le.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:L.backgroundColor&&L.type==="fade in"?L.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Ee(le.captionBlock),children:l.jsx("div",{className:le.captionTextWrapper,children:t.map(($,W)=>l.jsx("div",{className:Ee(le.captionText,hl[N.alignment],{[le.withPointerEvents]:W===x&&r,[le.active]:W===x}),style:{fontFamily:Tr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:s.sizing==="auto"?"max-content":E.scalingValue(s.width,r),letterSpacing:E.scalingValue(o,r),wordSpacing:E.scalingValue(p,r),textAlign:d,fontSize:E.scalingValue(T.fontSize,r),lineHeight:E.scalingValue(T.lineHeight,r),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:v,transitionDuration:L.duration?`${Math.round(parseInt(L.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:le.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:E.scalingValue(N.offset.y,r),left:E.scalingValue(N.offset.x,r)},children:l.jsx(An,{content:$.imageCaption})})},W))})}),l.jsx(vi,{onMove:$=>{y($.index)},ref:a,options:{arrows:!1,speed:L.duration?parseInt(L.duration):500,autoplay:w.autoPlay!==null,...w.autoPlay!==null&&{interval:parseInt(w.autoPlay)*1e3},direction:A==="horiz"||L.type==="fade in"?"ltr":"ttb",pagination:!1,drag:w.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:L.type==="fade in"?"fade":"loop",rewind:!0},children:t.map(($,W)=>l.jsx(bi,{children:l.jsx("div",{className:le.sliderItem,children:l.jsx("div",{className:le.imgWrapper,children:l.jsx("img",{className:Ee(le.sliderImage,{[le.contain]:$.image.objectFit==="contain",[le.cover]:$.image.objectFit==="cover"}),src:$.image.url,alt:$.image.name??""})})})},W))},O),I.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ee(le.arrow,{[le.arrowVertical]:A==="vert",[le.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{onClick:()=>{Y("-1")},className:le.arrowInner,style:{transform:`translate(${E.scalingValue(V,r)}, ${E.scalingValue(q*(A==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&l.jsx(Ft,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:Ee(le.arrowImg,le.mirror)}),!I.arrowsImgUrl&&l.jsx(Di,{color:I.color,className:Ee(le.arrowIcon,le.arrowImg,le.mirror)})]})}),l.jsx("div",{className:Ee(le.arrow,le.nextArrow,{[le.arrowVertical]:A==="vert",[le.hoverArrow]:I.show==="on hover"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:le.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${E.scalingValue(V*(A==="horiz"?-1:1),r)}, ${E.scalingValue(q,r)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[I.arrowsImgUrl&&l.jsx(Ft,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:le.arrowImg}),!I.arrowsImgUrl&&l.jsx(Di,{color:I.color,className:Ee(le.arrowIcon,le.arrowImg)})]})})]}),w.triggersList.click&&l.jsx("div",{className:le.clickOverlay,onClick:()=>{i&&i.go("+1")}}),_.isActive&&l.jsx("div",{className:Ee(le.pagination,{[le.paginationInsideBottom]:_.position==="inside-1"&&A==="horiz",[le.paginationInsideTop]:_.position==="inside-2"&&A==="horiz",[le.paginationOutsideBottom]:_.position==="outside-1"&&A==="horiz",[le.paginationOutsideTop]:_.position==="outside-2"&&A==="horiz",[le.paginationInsideLeft]:_.position==="inside-1"&&A==="vert",[le.paginationInsideRight]:_.position==="inside-2"&&A==="vert",[le.paginationOutsideLeft]:_.position==="outside-1"&&A==="vert",[le.paginationOutsideRight]:_.position==="outside-2"&&A==="vert",[le.paginationVertical]:A==="vert"}),children:l.jsx("div",{className:le.paginationInner,style:{backgroundColor:_.colors[2],transform:`scale(${_.scale/100}) translate(${E.scalingValue(_.offset.x,r)}, ${E.scalingValue(_.offset.y,r)}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:t.map(($,W)=>l.jsx("button",{onClick:()=>{i&&i.go(W)},className:Ee(le.paginationItem),children:l.jsx("div",{className:Ee(le.dot,{[le.activeDot]:W===x}),style:{backgroundColor:W===x?_.colors[0]:_.colors[1],"--pagination-hover-color":_.hover}})},W))})})]})})}function Di({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 yl={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"]}},vl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",bl="ImageRevealSlider-module__image___Qjt-e",xl="ImageRevealSlider-module__link___N-iLG",Cl="ImageRevealSlider-module__cursor___2U03d",en={imageRevealSlider:vl,image:bl,link:xl,cursor:Cl};function zi(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,s=i.naturalHeight/i.naturalWidth*a,c=a/2,o=s/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-o&&t<=r.y+o)return!0}return!1}function Wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Sl(e,t,n,r){let i,a;if(t==="custom"){i=n;const s=await Wr(e);a=s.height/s.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const s=await Wr(e);a=s.height/s.width*i}else{const s=await Wr(e);i=s.width,a=s.height}return{width:i,height:a,finalWidth:`${i}px`}}function wl({settings:e,content:t,isEditor:n}){const[r,i]=u.useState(null),[a,s]=u.useState([]),[c,o]=u.useState(0),d=u.useRef(0),[p,T]=u.useState({x:0,y:0}),[S,v]=u.useState(1),[g,m]=u.useState("none"),R=u.useRef({x:0,y:0}),[b,x]=u.useState(!1),{sizeType:y,imageWidth:O,randomRangeImageWidth:P}=e.imageSize,{revealPosition:A,visible:L}=e.position,{cursorType:I,target:_,defaultCursorScale:N,defaultCursor:w,hoverCursorScale:B,hoverCursor:V}=e.cursor;u.useEffect(()=>{if(!r)return;const $=(M,k)=>{const D=r.getBoundingClientRect(),Q=M-D.left,re=k-D.top;if(T({x:Q,y:re}),I==="system"){m("none"),v(1);return}const ie=Q,ce=re,C=document.elementFromPoint(D.left+ie,D.top+ce);if(C&&C.closest("a")){m("none"),v(1);return}const oe=zi(ie,ce,a)||_==="area"?{img:V??"none",scale:B}:{img:w??"none",scale:N};m(oe.img),v(oe.scale)},W=M=>{M.stopPropagation(),R.current={x:M.clientX,y:M.clientY},$(M.clientX,M.clientY)},H=()=>{b&&$(R.current.x,R.current.y)};return r.addEventListener("mousemove",W),window.addEventListener("scroll",H,!0),()=>{r.removeEventListener("mousemove",W),window.removeEventListener("scroll",H,!0)}},[r,b,p,I,_,V,w,B,N,a]),u.useEffect(()=>{b||(m("none"),v(0))},[b]);const q=async($,W,H,M={})=>{const{width:k,height:D,finalWidth:Q}=await Sl($.image.url,y,O,P);let re=0,ie=0;A==="same"?(re=W/2,ie=H/2):(re=M.x??Math.random()*W,ie=M.y??Math.random()*H);const ce=Math.min(Math.max(re,k/2),W-k/2),C=Math.min(Math.max(ie,D/2),H-D/2);return{id:d.current++,url:$.image.url,link:$.link,name:$.image.name,x:ce,y:C,width:Q}};u.useEffect(()=>{if(!r||t.length===0)return;const $=r.getBoundingClientRect(),W=$.width,H=$.height,M=[];(async()=>{const D=t[0],Q=await q(D,W,H);M.push(Q),s(M),o(1)})()},[y,O,P,A,r]),u.useEffect(()=>{L==="last One"&&s($=>$.length>0?[$[$.length-1]]:[])},[L]);const Y=async $=>{if(!r)return;const W=r.getBoundingClientRect(),H=$.clientX-W.left,M=$.clientY-W.top;if(_==="image"&&!zi(H,M,a))return;let k=0,D=0;A==="on Click"?(k=H,D=M):A==="same"?(k=W.width/2,D=W.height/2):(k=Math.random()*W.width,D=Math.random()*W.height);const Q=t[c],re=await q(Q,W.width,W.height,{x:k,y:D});s(ie=>L==="all"?[...ie,re]:[re]),o(ie=>ie>=t.length-1?0:ie+1)};return l.jsxs("div",{ref:i,onClick:Y,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:en.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[a.map($=>l.jsx("div",{className:en.wrapper,style:{top:`${$.y}px`,left:`${$.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:$.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:_==="area"&&$.link?l.jsx("a",{href:$.link,target:"_blank",className:en.link,children:l.jsx("img",{src:$.url,alt:$.name,className:en.image},$.id)}):l.jsx("img",{src:$.url,alt:$.name,className:en.image},$.id)},$.id)),b&&l.jsx("div",{className:en.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const $l={element:wl,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:""}]}}}},Tl="LightBox-module__hidden___9s-9x",Ll="LightBox-module__heroImage___sTxNF",El="LightBox-module__background___rm9ml",Pl="LightBox-module__editor___4ACaY",_l="LightBox-module__contentStyle___Bgnsq",Al="LightBox-module__imageStyle___tLIlB",Rl="LightBox-module__imgWrapper___LuFUp",Il="LightBox-module__contain___8-yaS",Wl="LightBox-module__cover___hNvOG",kl="LightBox-module__caption___b6L2I",Fl="LightBox-module__captionTextInner___rCGNH",Ml="LightBox-module__lightboxSplide___XFuWC",Nl="LightBox-module__arrow___iz38X",Hl="LightBox-module__arrowVertical___Zfz81",Ol="LightBox-module__nextArrow___zkAQN",Bl="LightBox-module__arrowInner___p48sW",Vl="LightBox-module__arrowIcon___3VaFf",Dl="LightBox-module__arrowImg___pNV88",zl="LightBox-module__mirror___pjeXc",jl="LightBox-module__thumbsWrapper___GB-nU",Kl="LightBox-module__thumbsContainerVertical___wttk5",Ul="LightBox-module__thumbsContainer___osSma",ql="LightBox-module__thumbsAlignStart___MO6tY",Gl="LightBox-module__thumbsAlignCenter___Q4sUx",Yl="LightBox-module__thumbsAlignEnd___p4y9R",Xl="LightBox-module__thumbItem___HvnF3",Zl="LightBox-module__closeButton___g2khP",Jl="LightBox-module__fadeIn___0m5GW",Ql="LightBox-module__slideInLeft___gPYwC",ec="LightBox-module__slideInRight___S-pPp",tc="LightBox-module__slideInTop___DFdAj",nc="LightBox-module__slideInBottom___m27kZ",rc="LightBox-module__fadeOut___55qBR",ic="LightBox-module__slideOutLeft___NvU7P",oc="LightBox-module__slideOutRight___SK7eC",ac="LightBox-module__slideOutTop___Vgg0z",sc="LightBox-module__slideOutBottom___nJ0Ef",lc="LightBox-module__scaleSlide___vZriG",X={hidden:Tl,heroImage:Ll,background:El,editor:Pl,contentStyle:_l,imageStyle:Al,imgWrapper:Rl,contain:Il,cover:Wl,caption:kl,captionTextInner:Fl,lightboxSplide:Ml,arrow:Nl,arrowVertical:Hl,nextArrow:Ol,arrowInner:Bl,arrowIcon:Vl,arrowImg:Dl,mirror:zl,thumbsWrapper:jl,thumbsContainerVertical:Kl,thumbsContainer:Ul,thumbsAlignStart:ql,thumbsAlignCenter:Gl,thumbsAlignEnd:Yl,thumbItem:Xl,closeButton:Zl,fadeIn:Jl,slideInLeft:Ql,slideInRight:ec,slideInTop:tc,slideInBottom:nc,fadeOut:rc,slideOutLeft:ic,slideOutRight:oc,slideOutTop:ac,slideOutBottom:sc,scaleSlide:lc},Gn=(e,t,n)=>{const r={},[i,a]=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"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:r.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,r};function Zo(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 ji(e){const t=e.getBoundingClientRect(),n=Zo(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,s=e.naturalHeight,c=r/i,o=a/s;let d,p;o>c?(d=r,p=r/o):(p=i,d=i*o);const T=t.left+n.left,S=t.top+n.top,v=(r-d)/2+T,g=(i-p)/2+S;return{x:v,y:g,width:d,height:p}}function Ki(e){const t=e.getBoundingClientRect(),n=Zo(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Ui(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 cc(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),a=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const dc=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:s})=>{const[c,o]=u.useState(!1),{url:d}=e.thumbnailBlock.cover;return u.useEffect(()=>{i==="close"&&o(!1),i==="open"&&o(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:X.heroImage,onClick:()=>o(!0)}),l.jsx(uc,{isOpen:c,onClose:()=>o(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},uc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:s,metadata:c})=>{var h;const[o,d]=u.useState(0),[p,T]=u.useState(0),[S,v]=u.useState(!1),[g,m]=u.useState(!1),[R,b]=u.useState({}),x=u.useRef(null),y=u.useRef(null),O=u.useRef(null),P=u.useRef(!1),A=u.useRef(null),L=u.useRef(null),I=u.useRef(null),_=u.useRef(null),N=u.useRef(!1),w=u.useRef(null),[B,V]=u.useState(!1),{appear:q,triggers:Y,slider:$,thumbnail:W,controls:H,area:M,caption:k,layout:D}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:re,backdropDisappearClass:ie,disappearClass:ce}=cc(q.type,q.direction),C=(c==null?void 0:c.itemId)??null;u.useEffect(()=>{const f=()=>{setTimeout(()=>{var z,G;(G=(z=x.current)==null?void 0:z.splide)==null||G.refresh()},16)},F=()=>{T(z=>z+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",F),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",F)}},[]),u.useEffect(()=>{if(!e||!W.isActive){V(!1);return}const f=w.current;if(!f)return;const F=()=>{$.direction==="horiz"?V(f.scrollWidth>f.clientWidth):V(f.scrollHeight>f.clientHeight)};F();const z=new ResizeObserver(F);return z.observe(f),()=>z.disconnect()},[e,W.isActive,n.length,R,$.direction]);const oe=u.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,F=Ui(M.color);f&&!s&&F>.9&&(document.body.style.backgroundColor=""),v(!0),P.current=!0;const z=G=>{G.target===A.current&&G.animationName&&(A.current&&L.current&&A.current.removeEventListener("animationend",L.current),L.current=null,P.current&&(P.current=!1,t()),v(!1))};A.current&&(L.current=z,A.current.addEventListener("animationend",z))},[t,M.color,s]),Pe=(f,F,z)=>{var G,ee;if(f){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&o===n.length-1?oe():(G=x.current)==null||G.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const te=f.getBoundingClientRect(),Z=F-te.left,pe=z-te.top,Ce=te.width,he=te.height;let fe;$.direction==="horiz"?fe=Z<Ce/2?"-1":"+1":fe=pe<he/2?"-1":"+1",(ee=x.current)==null||ee.go(fe)}}},ue=f=>{if(N.current){N.current=!1;return}const F=n[o],z=(F==null?void 0:F.image.objectFit)==="cover";let G,ee;if("changedTouches"in f&&f.changedTouches.length>0)G=f.changedTouches[0].clientX,ee=f.changedTouches[0].clientY;else if("clientX"in f)G=f.clientX,ee=f.clientY;else return;let te;if(z&&O.current){const Z=Ki(O.current);te=G>=Z.left&&G<=Z.right&&ee>=Z.top&&ee<=Z.bottom}else{const Z=O.current?ji(O.current):null;if(!Z){f.target===f.currentTarget&&oe();return}te=G>=Z.x&&G<=Z.x+Z.width&&ee>=Z.y&&ee<=Z.y+Z.height}te?Pe(O.current,G,ee):oe()},ye=f=>{const F=f.target;(F.classList.contains(X.thumbsWrapper)||F.classList.contains(X.thumbsContainer))&&ue(f)};u.useEffect(()=>{if(!e)return;const f=F=>{var z,G;if(F.key==="Escape"){oe();return}if(F.key==="ArrowRight"){d(ee=>(ee+1)%Math.max(n.length,1)),(z=x.current)==null||z.go("+1");return}F.key==="ArrowLeft"&&(d(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=x.current)==null||G.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,oe,n.length]),u.useEffect(()=>{if(e){if(d(0),T(F=>F+1),P.current=!1,v(!1),m(!1),b({}),!C)return;const f=new CustomEvent("page-overlay",{detail:{itemId:C}});window.dispatchEvent(f)}return()=>{A.current&&L.current&&(A.current.removeEventListener("animationend",L.current),L.current=null),m(!1)}},[e,C]),u.useEffect(()=>{y.current!==null&&y.current!==$.type&&T(f=>f+1),y.current=$.type},[$.type]),u.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,F=window.matchMedia("(max-width: 768px)").matches,z=Ui(M.color);document.body.style.overflow="hidden",m(!1);const G=te=>{te.target===A.current&&!P.current&&te.animationName&&(F&&!s&&z>.9&&(document.body.style.backgroundColor=M.color),m(!0),A.current&&I.current&&A.current.removeEventListener("animationend",I.current),I.current=null)};A.current&&(I.current=G,A.current.addEventListener("animationend",G));const ee=te=>{const Z=te.target;Z&&(Z.closest(`.${X.thumbsWrapper}`)||Z.closest(`.${X.thumbsContainer}`))||$.type!=="slide"&&te.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",ee),A.current&&I.current&&(A.current.removeEventListener("animationend",I.current),I.current=null),m(!1)}},[e,s,M.color,$.type]),u.useEffect(()=>{if(!e)return;const f=F=>{var G,ee;if(P.current){F.stopPropagation();return}if(N.current){N.current=!1;return}const z=F.target;if(!(z&&(z.closest(`.${X.thumbsContainer}`)||z.closest(`.${X.thumbItem}`)||z.closest(`.${X.arrow}`)||z.closest(`.${X.closeButton}`)||z.closest(`.${X.caption}`)))){if($.type==="slide"&&Y.type==="drag"&&((ee=(G=x.current)==null?void 0:G.splide)!=null&&ee.root)){const te=x.current.splide.root;if(z&&(te.contains(z)||te===z))return}if(F.touches.length===0&&F.changedTouches.length>0){const te=n[o],Z=(te==null?void 0:te.image.objectFit)==="cover",pe=F.changedTouches[0];let Ce;if(Z&&O.current){const he=Ki(O.current);Ce=pe.clientX>=he.left&&pe.clientX<=he.right&&pe.clientY>=he.top&&pe.clientY<=he.bottom}else{const he=O.current?ji(O.current):null;if(!he)return;Ce=pe.clientX>=he.x&&pe.clientX<=he.x+he.width&&pe.clientY>=he.y&&pe.clientY<=he.y+he.height}if(!Ce){F.stopPropagation(),P.current=!0;const he=fe=>{fe.stopPropagation(),fe.preventDefault(),document.removeEventListener("click",he,!0)};document.addEventListener("click",he,!0),oe()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,oe,o,n]);const Re=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&Y.type==="drag";u.useEffect(()=>{var fe,K;if(!e||!Re||!((K=(fe=x.current)==null?void 0:fe.splide)!=null&&K.root))return;const f=x.current.splide.root,F=30,z=(U,j)=>{if(_.current){const de=Math.abs(U-_.current.x),Le=Math.abs(j-_.current.y);(de>0||Le>0)&&(N.current=!0)}},G=U=>{_.current&&(U.preventDefault(),z(U.clientX,U.clientY))},ee=U=>{_.current&&U.touches.length>0&&(U.preventDefault(),z(U.touches[0].clientX,U.touches[0].clientY))},te=(U,j)=>{if(!_.current||!x.current){_.current=null;return}const de=Math.abs(U-_.current.x),Le=Math.abs(j-_.current.y);Le>F&&Le>de&&x.current.go(j<_.current.y?"+1":"-1"),_.current=null},Z=U=>{_.current&&te(U.clientX,U.clientY),document.removeEventListener("pointerup",Z),document.removeEventListener("pointercancel",Z),document.removeEventListener("pointermove",G)},pe=U=>{if(_.current){if(U.changedTouches.length>0){const j=U.changedTouches[0];te(j.clientX,j.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",ee)}},Ce=U=>{_.current={x:U.clientX,y:U.clientY},N.current=!1,document.addEventListener("pointermove",G,{passive:!1}),document.addEventListener("pointerup",Z),document.addEventListener("pointercancel",Z)},he=U=>{U.touches.length>0&&(_.current={x:U.touches[0].clientX,y:U.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return f.addEventListener("pointerdown",Ce),f.addEventListener("touchstart",he),()=>{f.removeEventListener("pointerdown",Ce),f.removeEventListener("touchstart",he),document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Z),document.removeEventListener("pointercancel",Z),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),_.current=null,N.current=!1}},[e,Re,p]);const ne={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:go.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:s?null:A,className:Ee(X.background,S?ie:re,{[X.editor]:s},{[X.hidden]:!e}),style:{...ne,...g&&!s&&!S?{position:"absolute"}:{}}}),l.jsxs("div",{ref:s?A:null,className:Ee(X.contentStyle,S?ce:Q,{[X.editor]:s},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(vi,{onMove:f=>d(f.index),ref:x,className:X.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((f,F)=>{const z=Gn(D.position,D.offset,s),G=`${E.scalingValue(D.padding.top,s)} ${E.scalingValue(D.padding.right,s)} ${E.scalingValue(D.padding.bottom,s)} ${E.scalingValue(D.padding.left,s)}`,ee=$.type==="scale"?(()=>{const{transform:te,...Z}=z;return{...Z,position:"absolute",padding:G,boxSizing:"border-box","--position-transform":te||"none"}})():{...z,position:"absolute",padding:G,boxSizing:"border-box"};return l.jsx(bi,{children:l.jsx("div",{className:X.imgWrapper,onClick:ue,children:l.jsx("img",{ref:F===o?O:null,className:Ee(X.imageStyle,{[X.contain]:f.image.objectFit==="contain",[X.cover]:f.image.objectFit==="cover",[X.scaleSlide]:$.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...ee,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},F)})},p),H.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Ee(X.arrow,{[X.arrowVertical]:$.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(H.offset.x,s)}, ${E.scalingValue(H.offset.y*($.direction==="horiz"?1:-1),s)}) scale(${H.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[H.arrowsImgUrl&&l.jsx(Ft,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Ee(X.arrowImg,X.mirror)}),!H.arrowsImgUrl&&l.jsx(qi,{color:H.color,className:Ee(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:Ee(X.arrow,X.nextArrow,{[X.arrowVertical]:$.direction==="vert"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(H.offset.x*($.direction==="horiz"?-1:1),s)}, ${E.scalingValue(H.offset.y,s)}) scale(${H.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[H.arrowsImgUrl&&l.jsx(Ft,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:X.arrowImg}),!H.arrowsImgUrl&&l.jsx(qi,{color:H.color,className:Ee(X.arrowIcon,X.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const f=Gn(M.closeIconAlign,M.closeIconOffset,s),F=`scale(${M.closeIconScale})`,z=f.transform?`${f.transform} ${F}`:F;return l.jsx("button",{className:X.closeButton,style:{...f,transform:z},onClick:oe,"aria-label":"Close lightbox",children:l.jsx(Ft,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),k&&k.isActive&&r.imageCaption&&((h=n[o])==null?void 0:h.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:F,letterSpacing:z,textAlign:G,wordSpacing:ee,fontSizeLineHeight:te,textAppearance:Z,color:pe}=r.imageCaption;return l.jsx("div",{className:X.caption,style:{...Gn(k.alignment,k.offset,s),fontFamily:Tr(F.fontFamily),fontWeight:F.fontWeight,fontStyle:F.fontStyle,width:f.sizing==="auto"?"max-content":E.scalingValue(f.width,s),letterSpacing:E.scalingValue(z,s),wordSpacing:E.scalingValue(ee,s),textAlign:G,fontSize:E.scalingValue(te.fontSize,s),lineHeight:E.scalingValue(te.lineHeight,s),textTransform:Z.textTransform??"none",textDecoration:Z.textDecoration??"none",fontVariant:Z.fontVariant??"normal",color:pe},onClick:Ce=>Ce.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":k.linkColor,"--link-hover-color":k.linkHoverColor},children:l.jsx(An,{content:n[o].imageCaption})})})})(),W.isActive&&(()=>{const[f,F]=W.position.split("-"),z=$.direction==="horiz"?`${f}-left`:W.position,G=Gn(z,W.offset,s),ee=()=>{if($.direction==="horiz"){if(F==="left")return"flex-start";if(F==="center")return"center";if(F==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:w,className:X.thumbsWrapper,onClick:te=>ye(te),style:{position:s?"absolute":"fixed",...G,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Ee(X.thumbsContainer,{[X.thumbsContainerVertical]:$.direction==="vert",[X.thumbsAlignStart]:W.align==="start",[X.thumbsAlignCenter]:W.align==="center",[X.thumbsAlignEnd]:W.align==="end"}),style:{gap:E.scalingValue(W.grid.gap,s),justifyContent:B?"flex-start":ee()},children:n.map((te,Z)=>{const pe=Z===o,Ce=R[Z],fe=W.grid.size*(pe?W.activeState.scale:1),K=()=>{if(W.fit!=="fit")return{};if(!Ce)return $.direction==="horiz"?{height:E.scalingValue(fe,s)}:{width:E.scalingValue(fe,s)};const U=Ce.width/Ce.height;if($.direction==="horiz"){const j=fe,de=j*U;return{width:E.scalingValue(de,s),height:E.scalingValue(j,s)}}else{const j=fe,de=j/U;return{width:E.scalingValue(j,s),height:E.scalingValue(de,s)}}};return l.jsx("button",{className:X.thumbItem,style:{...$.direction==="horiz"&&W.fit!=="fit"?{height:E.scalingValue(fe,s)}:{},...$.direction==="vert"&&W.fit!=="fit"?{width:E.scalingValue(fe,s)}:{},...W.fit==="cover"?{width:E.scalingValue(fe,s),height:E.scalingValue(fe,s)}:{},...K(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?W.activeState.opacity/100:W.opacity/100,"--thumb-hover":W.activeState.opacity/100},onClick:U=>{var j;U.stopPropagation(),d(Z),(j=x.current)==null||j.go(Z)},onMouseEnter:()=>{var U;W.triggers==="hov"&&((U=x.current)==null||U.go(Z))},children:l.jsx("img",{src:te.image.url,alt:te.image.name??"",onLoad:U=>{const j=U.currentTarget;j.naturalWidth&&j.naturalHeight&&b(de=>({...de,[Z]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:W.fit==="cover"?"cover":"contain",...W.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...W.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${te.image.name}-${Z}`)})})})})()]})]}),document.getElementById(a))};function qi({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.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 pc={element:dc,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 Yn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function mc(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 gc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:a}){const s=!!n,c=r&&t||!t,{prefix:o}=E.useScopedStyles(),{type:d="A",fieldsToShow:p=2,fields:T=[],buttonLabel:S,gap:v,fieldsGap:g,buttonCorners:m,buttonStroke:R,buttonPadding:b,isButtonFullWidth:x,inputCorners:y,inputStroke:O,inputPadding:P,inputColor:_,inputTextColor:L,inputBorderColor:I,placeholderColor:A,buttonColor:N,buttonTextColor:w,buttonBorderColor:B,labelTextColor:V,successColor:U,errorColor:Y,fontFamily:$,inputFontSettings:W,inputFontSize:H,inputLineHeight:M,inputLetterSpacing:F,inputWordSpacing:D,inputTextAppearance:Q,buttonFontSettings:re,buttonFontSize:ie,buttonLineHeight:ce,buttonLetterSpacing:C,buttonWordSpacing:oe,buttonTextAppearance:Pe,labelFontSettings:ue,labelFontSize:ye,labelLineHeight:Re,labelLetterSpacing:ne,labelWordSpacing:h,labelTextAppearance:f,statusFontSettings:k,statusFontSize:j,statusLineHeight:q,statusLetterSpacing:ee,statusWordSpacing:te,statusTextAppearance:J,successMessage:pe,errorMessage:Ce,stateOverrides:he}=e,fe=d==="B",K=T.slice(0,Math.min(p,T.length)),G={fontSettings:{fontFamily:$,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:H??.01,lineHeight:M,letterSpacing:F??0,wordSpacing:D??0,textAppearance:Q,color:L},z=ht(nt(G,t)),de=E.scalingValue(O??0,t),Le=E.scalingValue((M??H??.01)+((P==null?void 0:P.top)??0)+((P==null?void 0:P.bottom)??0)+(d==="C"?O??0:(O??0)*2),t),Me={...z,borderStyle:"solid",borderRadius:d==="C"?0:E.scalingValue(y??0,t),...d==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:E.scalingValue((P==null?void 0:P.top)??0,t),paddingRight:E.scalingValue((P==null?void 0:P.right)??0,t),paddingBottom:E.scalingValue((P==null?void 0:P.bottom)??0,t),paddingLeft:E.scalingValue((P==null?void 0:P.left)??0,t),height:Le,minHeight:Le},ke={fontSettings:{fontFamily:$,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:ce,letterSpacing:C??0,wordSpacing:oe??0,textAppearance:Pe,color:w},Ie=ht(nt(ke,t)),Ue=E.scalingValue(R??0,t),$e={fontSettings:{fontFamily:$,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Re,letterSpacing:ne??0,wordSpacing:h??0,textAppearance:f,color:V},Ne=nt($e,t),ze={fontSettings:{fontFamily:$,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:j??.01,lineHeight:q,letterSpacing:ee??0,wordSpacing:te??0,textAppearance:J,color:U},We=ht(nt(ze,t)),qe=E.buildColorVars(o,{inputColor:_,inputTextColor:L,inputBorderColor:I,placeholderColor:A!=null&&A.trim()?A:"#cccccc",buttonColor:N,buttonTextColor:w,buttonBorderColor:B,labelTextColor:V,successColor:U,errorColor:Y},hc,fc,he),[Ye,bt]=u.useState(()=>Object.fromEntries(K.map(ve=>[ve.name,""]))),[Jt,gt]=u.useState("idle"),[At,_t]=u.useState(null),Se=a==="success"?"success":a==="error"?"error":Jt,dt=a==="error"?Ce:At,rt=a==="filled",Xe=u.useMemo(()=>{if(!rt)return Ye;let ve=null;for(const je of K)(Ye[je.name]??"").trim().length>0||(ve=ve??{...Ye},ve[je.name]="Filled");return ve??Ye},[Ye,rt,K]),Rt=Se==="error"?E.getFormFieldValidationError(K,Xe):null,Zt=`${a&&a!=="default"?`${o}-state-${a}`:""}`.trim(),Qt=i==null?void 0:i.submitUrl,Dt=(ve,je)=>{bt(Ve=>({...Ve,[ve]:je}))},jt=async ve=>{if(ve.preventDefault(),!c)return;const je=Object.fromEntries(K.map(Ke=>{var Qe;return[Ke.name,((Qe=Ye[Ke.name])==null?void 0:Qe.trim())??""]}).filter(([,Ke])=>Ke));if(!Qt){gt("error"),_t("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const Ve=E.getFormFieldValidationError(K,Ye);if(Ve){gt("error"),_t(Ve);return}gt("submitting"),_t(null);try{const Ke=await fetch(Qt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Ke.ok){const Qe=await Ke.text();throw new Error(Qe||`Request failed: ${Ke.status}`)}gt("success"),bt(Object.fromEntries(K.map(Qe=>[Qe.name,""])))}catch(Ke){gt("error"),_t(Ke instanceof Error?Ke.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${d} ${Zt}`.trim(),style:qe,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:mc(o)}}),l.jsxs("form",{onSubmit:jt,className:`${o}-form`,children:[l.jsx("div",{className:`${o}-fields`,children:K.map((ve,je)=>l.jsxs(u.Fragment,{children:[je>0&&l.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${o}-control`:void 0,style:{height:E.scalingValue(g??0,t)}}),l.jsxs("div",{className:`${o}-field-group${fe?` ${o}-labeled`:""}`,children:[fe&&l.jsx("span",{className:`${o}-field-label`,style:Ne?{...Ne,lineHeight:Ne.fontSize}:void 0,children:ve.label||ve.name}),ve.type==="textarea"?l.jsx("textarea",{name:ve.name,autoComplete:"off",value:Xe[ve.name]??"",onChange:Ve=>Dt(ve.name,Ve.target.value),placeholder:ve.placeholder,className:`${o}-input`,style:Me,rows:1,"data-filled":rt||(Xe[ve.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:ve.type==="phone"?"tel":ve.type==="email"?"email":"text",name:ve.name,autoComplete:"off",value:Xe[ve.name]??"",onChange:Ve=>Dt(ve.name,Ve.target.value),placeholder:ve.placeholder,required:ve.isRequired??ve.type==="email",className:`${o}-input`,style:Me,"data-filled":rt||(Xe[ve.name]??"").trim().length>0})]})]},je))}),l.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${o}-control`:void 0,style:{height:E.scalingValue(v??0,t)}}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:c?"submit":"button",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(m??0,t),borderWidth:Ue,paddingTop:E.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:E.scalingValue((b==null?void 0:b.left)??0,t),pointerEvents:c?"auto":void 0,...Ie,...x?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:x?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Jt==="submitting"?"...":S})})})]}),Se==="success"&&l.jsx("p",{className:`${o}-success`,style:{...We},children:pe}),Se==="error"&&l.jsx("p",{className:`${o}-error`,style:{...We},role:"alert",children:Rt??dt??Ce})]})}const hc={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"],yc=`import React, { useMemo, useState } from 'react';\r
158
+ `}function gc({settings:e,isEditor:t,isEditMode:n,isPreviewMode:r,metadata:i,activeEvent:a}){const s=!!n,c=r&&t||!t,{prefix:o}=E.useScopedStyles(),{type:d="A",fieldsToShow:p=2,fields:T=[],buttonLabel:S,gap:v,fieldsGap:g,buttonCorners:m,buttonStroke:R,buttonPadding:b,isButtonFullWidth:x,inputCorners:y,inputStroke:O,inputPadding:P,inputColor:A,inputTextColor:L,inputBorderColor:I,placeholderColor:_,buttonColor:N,buttonTextColor:w,buttonBorderColor:B,labelTextColor:V,successColor:q,errorColor:Y,fontFamily:$,inputFontSettings:W,inputFontSize:H,inputLineHeight:M,inputLetterSpacing:k,inputWordSpacing:D,inputTextAppearance:Q,buttonFontSettings:re,buttonFontSize:ie,buttonLineHeight:ce,buttonLetterSpacing:C,buttonWordSpacing:oe,buttonTextAppearance:Pe,labelFontSettings:ue,labelFontSize:ye,labelLineHeight:Re,labelLetterSpacing:ne,labelWordSpacing:h,labelTextAppearance:f,statusFontSettings:F,statusFontSize:z,statusLineHeight:G,statusLetterSpacing:ee,statusWordSpacing:te,statusTextAppearance:Z,successMessage:pe,errorMessage:Ce,stateOverrides:he}=e,fe=d==="B",K=T.slice(0,Math.min(p,T.length)),U={fontSettings:{fontFamily:$,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:H??.01,lineHeight:M,letterSpacing:k??0,wordSpacing:D??0,textAppearance:Q,color:L},j=ht(nt(U,t)),de=E.scalingValue(O??0,t),Le=E.scalingValue((M??H??.01)+((P==null?void 0:P.top)??0)+((P==null?void 0:P.bottom)??0)+(d==="C"?O??0:(O??0)*2),t),Me={...j,borderStyle:"solid",borderRadius:d==="C"?0:E.scalingValue(y??0,t),...d==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:E.scalingValue((P==null?void 0:P.top)??0,t),paddingRight:E.scalingValue((P==null?void 0:P.right)??0,t),paddingBottom:E.scalingValue((P==null?void 0:P.bottom)??0,t),paddingLeft:E.scalingValue((P==null?void 0:P.left)??0,t),height:Le,minHeight:Le},Fe={fontSettings:{fontFamily:$,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:ce,letterSpacing:C??0,wordSpacing:oe??0,textAppearance:Pe,color:w},Ie=ht(nt(Fe,t)),qe=E.scalingValue(R??0,t),$e={fontSettings:{fontFamily:$,fontWeight:(ue==null?void 0:ue.fontWeight)??400,fontStyle:(ue==null?void 0:ue.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:Re,letterSpacing:ne??0,wordSpacing:h??0,textAppearance:f,color:V},Ne=nt($e,t),je={fontSettings:{fontFamily:$,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:z??.01,lineHeight:G,letterSpacing:ee??0,wordSpacing:te??0,textAppearance:Z,color:q},We=ht(nt(je,t)),Ge=E.buildColorVars(o,{inputColor:A,inputTextColor:L,inputBorderColor:I,placeholderColor:_!=null&&_.trim()?_:"#cccccc",buttonColor:N,buttonTextColor:w,buttonBorderColor:B,labelTextColor:V,successColor:q,errorColor:Y},hc,fc,he),[Ye,bt]=u.useState(()=>Object.fromEntries(K.map(ve=>[ve.name,""]))),[Zt,gt]=u.useState("idle"),[_t,At]=u.useState(null),Se=a==="success"?"success":a==="error"?"error":Zt,dt=a==="error"?Ce:_t,rt=a==="filled",Xe=u.useMemo(()=>{if(!rt)return Ye;let ve=null;for(const ze of K)(Ye[ze.name]??"").trim().length>0||(ve=ve??{...Ye},ve[ze.name]="Filled");return ve??Ye},[Ye,rt,K]),Rt=Se==="error"?E.getFormFieldValidationError(K,Xe):null,Jt=`${a&&a!=="default"?`${o}-state-${a}`:""}`.trim(),Qt=i==null?void 0:i.submitUrl,Dt=(ve,ze)=>{bt(Ve=>({...Ve,[ve]:ze}))},zt=async ve=>{if(ve.preventDefault(),!c)return;const ze=Object.fromEntries(K.map(Ke=>{var Qe;return[Ke.name,((Qe=Ye[Ke.name])==null?void 0:Qe.trim())??""]}).filter(([,Ke])=>Ke));if(!Qt){gt("error"),At("No integrations were found for this form.");return}if(Object.keys(ze).length===0)return;const Ve=E.getFormFieldValidationError(K,Ye);if(Ve){gt("error"),At(Ve);return}gt("submitting"),At(null);try{const Ke=await fetch(Qt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ze)});if(!Ke.ok){const Qe=await Ke.text();throw new Error(Qe||`Request failed: ${Ke.status}`)}gt("success"),bt(Object.fromEntries(K.map(Qe=>[Qe.name,""])))}catch(Ke){gt("error"),At(Ke instanceof Error?Ke.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${d} ${Jt}`.trim(),style:Ge,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:mc(o)}}),l.jsxs("form",{onSubmit:zt,className:`${o}-form`,children:[l.jsx("div",{className:`${o}-fields`,children:K.map((ve,ze)=>l.jsxs(u.Fragment,{children:[ze>0&&l.jsx("div",{"data-controls":s?"fieldsGap":void 0,className:s?`${o}-control`:void 0,style:{height:E.scalingValue(g??0,t)}}),l.jsxs("div",{className:`${o}-field-group${fe?` ${o}-labeled`:""}`,children:[fe&&l.jsx("span",{className:`${o}-field-label`,style:Ne?{...Ne,lineHeight:Ne.fontSize}:void 0,children:ve.label||ve.name}),ve.type==="textarea"?l.jsx("textarea",{name:ve.name,autoComplete:"off",value:Xe[ve.name]??"",onChange:Ve=>Dt(ve.name,Ve.target.value),placeholder:ve.placeholder,className:`${o}-input`,style:Me,rows:1,"data-filled":rt||(Xe[ve.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:ve.type==="phone"?"tel":ve.type==="email"?"email":"text",name:ve.name,autoComplete:"off",value:Xe[ve.name]??"",onChange:Ve=>Dt(ve.name,Ve.target.value),placeholder:ve.placeholder,required:ve.isRequired??ve.type==="email",className:`${o}-input`,style:Me,"data-filled":rt||(Xe[ve.name]??"").trim().length>0})]})]},ze))}),l.jsx("div",{"data-controls":s?"gap":void 0,className:s?`${o}-control`:void 0,style:{height:E.scalingValue(v??0,t)}}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:c?"submit":"button",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(m??0,t),borderWidth:qe,paddingTop:E.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:E.scalingValue((b==null?void 0:b.left)??0,t),pointerEvents:c?"auto":void 0,...Ie,...x?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:x?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Zt==="submitting"?"...":S})})})]}),Se==="success"&&l.jsx("p",{className:`${o}-success`,style:{...We},children:pe}),Se==="error"&&l.jsx("p",{className:`${o}-error`,style:{...We},role:"alert",children:Rt??dt??Ce})]})}const hc={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"],yc=`import React, { useMemo, useState } from 'react';\r
159
159
  import { CommonComponentProps } from '../props';\r
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
789
789
  };\r
790
790
  \r
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
792
- `,vc=[{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"}],Xn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},bc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],xc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},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:{...Xn.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:{...Xn.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:{...Xn.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:{...Xn.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:vc,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","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["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:["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:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...bc],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"]},Cc={element:gc,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:xc,sourceCode:yc};function Jn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sc(e){return`
792
+ `,vc=[{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"}],Xn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},bc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],xc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},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:{...Xn.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:{...Xn.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:{...Xn.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:{...Xn.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:vc,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","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["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:["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:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...bc],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"]},Cc={element:gc,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:xc,sourceCode:yc};function Zn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Sc(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
971
971
  align-items: center;
972
972
  }
973
973
  .${e}-success {
974
- margin-top: ${Jn(8)};
975
- font-size: ${Jn(14)};
974
+ margin-top: ${Zn(8)};
975
+ font-size: ${Zn(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${Jn(8)};
980
- font-size: ${Jn(14)};
979
+ margin-top: ${Zn(8)};
980
+ font-size: ${Zn(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const wc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:a}=E.useScopedStyles(),s=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:d,fieldsToShow:p=1,fontFamily:T,inputFontSettings:S,inputFontSize:v,inputLineHeight:g,inputLetterSpacing:m,inputWordSpacing:R,inputTextAppearance:b,buttonFontSettings:x,buttonFontSize:y,buttonLineHeight:O,buttonLetterSpacing:P,buttonWordSpacing:_,buttonTextAppearance:L,statusFontSettings:I,statusFontSize:A,statusLineHeight:N,statusLetterSpacing:w,statusWordSpacing:B,statusTextAppearance:V,iconMaxWidth:U,minHeight:Y,corners:$,stroke:W,stateOverrides:H,inputPadding:M,buttonPadding:F,successMessage:D="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,re=c.slice(0,Math.min(p,c.length)),[ie,ce]=u.useState(()=>Object.fromEntries(re.map($e=>[$e.name,""]))),[C,oe]=u.useState("idle"),[Pe,ue]=u.useState(null),ye=i==="success"?"success":i==="error"?"error":C,Re=i==="error"?Q:Pe,ne=i==="filled",h=u.useMemo(()=>{if(!ne)return ie;let $e=null;for(const Ne of re)(ie[Ne.name]??"").trim().length>0||($e=$e??{...ie},$e[Ne.name]="Filled");return $e??ie},[ne,ie,re]),f=ye==="error"?E.getFormFieldValidationError(re,h):null,k=i&&i!=="default"?`${a}-state-${i}`:"",j=re.some($e=>(h[$e.name]??"").trim().length>0),q=k!==`${a}-state-filled`&&j?`${a}-state-filled`:"",ee=`${k} ${q}`.trim(),te=r==null?void 0:r.submitUrl,J=d??"",pe=(o==null?void 0:o.icon)??"",Ce=(o==null?void 0:o.mode)==="On",he=J||"Submit",fe={fontSettings:{fontFamily:T,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:g,letterSpacing:m??0,wordSpacing:R??0,textAppearance:b,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:y??.01,lineHeight:O,letterSpacing:P??0,wordSpacing:_??0,textAppearance:L,color:e.buttonTextColor??"#ffffff"},G={fontSettings:{fontFamily:T,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:A??.01,lineHeight:N,letterSpacing:w??0,wordSpacing:B??0,textAppearance:V,color:e.successColor??"#22c55e"},z=ht(nt(fe,t)),de=ht(nt(K,t)),Le=ht(nt(G,t)),Me=E.buildColorVars(a,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(fe==null?void 0:fe.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},$c,Tc,H),ke={borderRadius:E.scalingValue($,t),borderWidth:E.scalingValue(W,t),borderStyle:"solid"},Ie={borderLeftWidth:E.scalingValue(W,t)},Ue=async $e=>{if($e.preventDefault(),!s)return;const Ne=Object.fromEntries(re.map(We=>{var qe;return[We.name,((qe=ie[We.name])==null?void 0:qe.trim())??""]}).filter(([,We])=>We));if(!te){oe("error"),ue("No integrations were found for this form.");return}if(Object.keys(Ne).length===0)return;const ze=E.getFormFieldValidationError(re,ie);if(ze){oe("error"),ue(ze);return}oe("submitting"),ue(null);try{const We=await fetch(te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne)});if(!We.ok){const qe=await We.text();throw new Error(qe||`Request failed: ${We.status}`)}oe("success"),ce(Object.fromEntries(re.map(qe=>[qe.name,""])))}catch(We){oe("error"),ue(We instanceof Error?We.message:"Something went wrong")}};return l.jsxs("div",{className:`${a}-wrapper ${ee}`.trim(),style:Me,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Sc(a)}}),l.jsxs("form",{onSubmit:Ue,className:`${a}-form`,style:{...ke,height:E.scalingValue(Y,t),minHeight:E.scalingValue(Y,t)},children:[l.jsx("div",{className:`${a}-inputWrap ${a}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map($e=>l.jsx("input",{type:$e.type==="email"?"email":$e.type==="phone"?"tel":"text",name:$e.name,autoComplete:"off",value:h[$e.name]??"",onChange:Ne=>ce(ze=>({...ze,[$e.name]:Ne.target.value})),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${a}-input`,style:{...z,paddingRight:E.scalingValue(M.right,t),paddingLeft:E.scalingValue(M.left,t),paddingTop:E.scalingValue(M.top,t),paddingBottom:E.scalingValue(M.bottom,t)}},$e.name))}),l.jsx("div",{className:`${a}-overlayAnchor`,children:l.jsx("button",{type:s?"submit":"button",className:`${a}-submitBtn`,"aria-label":he,style:{...de,...Ie,paddingRight:E.scalingValue(F.right,t),paddingLeft:E.scalingValue(F.left,t),paddingTop:E.scalingValue(F.top,t),paddingBottom:E.scalingValue(F.bottom,t),pointerEvents:s?"auto":void 0},children:C==="submitting"?"...":Ce?pe&&l.jsx(kt,{url:pe,className:`${a}-submitBtnIcon`,style:{maxWidth:E.scalingValue(U??0,t)},fill:`var(--${a}-button-text-color)`,hoverFill:`var(--${a}-button-text-color)`}):J})})]}),ye==="success"&&l.jsx("p",{className:`${a}-success`,style:{...Le},children:D}),ye==="error"&&l.jsx("p",{className:`${a}-error`,style:{...Le},role:"alert",children:f??Re??Q})]})},$c={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"},Tc=["hover","focus","filled","success","error"],Lc=`import React, { useMemo, useState } from 'react';\r
983
+ `}const wc=({settings:e,isEditor:t,isPreviewMode:n,metadata:r,activeEvent:i})=>{const{prefix:a}=E.useScopedStyles(),s=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:d,fieldsToShow:p=1,fontFamily:T,inputFontSettings:S,inputFontSize:v,inputLineHeight:g,inputLetterSpacing:m,inputWordSpacing:R,inputTextAppearance:b,buttonFontSettings:x,buttonFontSize:y,buttonLineHeight:O,buttonLetterSpacing:P,buttonWordSpacing:A,buttonTextAppearance:L,statusFontSettings:I,statusFontSize:_,statusLineHeight:N,statusLetterSpacing:w,statusWordSpacing:B,statusTextAppearance:V,iconMaxWidth:q,minHeight:Y,corners:$,stroke:W,stateOverrides:H,inputPadding:M,buttonPadding:k,successMessage:D="Thanks for subscribing!",errorMessage:Q="Please, fill all required fields."}=e,re=c.slice(0,Math.min(p,c.length)),[ie,ce]=u.useState(()=>Object.fromEntries(re.map($e=>[$e.name,""]))),[C,oe]=u.useState("idle"),[Pe,ue]=u.useState(null),ye=i==="success"?"success":i==="error"?"error":C,Re=i==="error"?Q:Pe,ne=i==="filled",h=u.useMemo(()=>{if(!ne)return ie;let $e=null;for(const Ne of re)(ie[Ne.name]??"").trim().length>0||($e=$e??{...ie},$e[Ne.name]="Filled");return $e??ie},[ne,ie,re]),f=ye==="error"?E.getFormFieldValidationError(re,h):null,F=i&&i!=="default"?`${a}-state-${i}`:"",z=re.some($e=>(h[$e.name]??"").trim().length>0),G=F!==`${a}-state-filled`&&z?`${a}-state-filled`:"",ee=`${F} ${G}`.trim(),te=r==null?void 0:r.submitUrl,Z=d??"",pe=(o==null?void 0:o.icon)??"",Ce=(o==null?void 0:o.mode)==="On",he=Z||"Submit",fe={fontSettings:{fontFamily:T,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:g,letterSpacing:m??0,wordSpacing:R??0,textAppearance:b,color:e.inputTextColor??"#111111"},K={fontSettings:{fontFamily:T,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:y??.01,lineHeight:O,letterSpacing:P??0,wordSpacing:A??0,textAppearance:L,color:e.buttonTextColor??"#ffffff"},U={fontSettings:{fontFamily:T,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:_??.01,lineHeight:N,letterSpacing:w??0,wordSpacing:B??0,textAppearance:V,color:e.successColor??"#22c55e"},j=ht(nt(fe,t)),de=ht(nt(K,t)),Le=ht(nt(U,t)),Me=E.buildColorVars(a,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(fe==null?void 0:fe.color)??"#111111",buttonTextColor:e.buttonTextColor??(K==null?void 0:K.color)??"#ffffff"},$c,Tc,H),Fe={borderRadius:E.scalingValue($,t),borderWidth:E.scalingValue(W,t),borderStyle:"solid"},Ie={borderLeftWidth:E.scalingValue(W,t)},qe=async $e=>{if($e.preventDefault(),!s)return;const Ne=Object.fromEntries(re.map(We=>{var Ge;return[We.name,((Ge=ie[We.name])==null?void 0:Ge.trim())??""]}).filter(([,We])=>We));if(!te){oe("error"),ue("No integrations were found for this form.");return}if(Object.keys(Ne).length===0)return;const je=E.getFormFieldValidationError(re,ie);if(je){oe("error"),ue(je);return}oe("submitting"),ue(null);try{const We=await fetch(te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne)});if(!We.ok){const Ge=await We.text();throw new Error(Ge||`Request failed: ${We.status}`)}oe("success"),ce(Object.fromEntries(re.map(Ge=>[Ge.name,""])))}catch(We){oe("error"),ue(We instanceof Error?We.message:"Something went wrong")}};return l.jsxs("div",{className:`${a}-wrapper ${ee}`.trim(),style:Me,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Sc(a)}}),l.jsxs("form",{onSubmit:qe,className:`${a}-form`,style:{...Fe,height:E.scalingValue(Y,t),minHeight:E.scalingValue(Y,t)},children:[l.jsx("div",{className:`${a}-inputWrap ${a}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map($e=>l.jsx("input",{type:$e.type==="email"?"email":$e.type==="phone"?"tel":"text",name:$e.name,autoComplete:"off",value:h[$e.name]??"",onChange:Ne=>ce(je=>({...je,[$e.name]:Ne.target.value})),placeholder:$e.placeholder,required:$e.isRequired??$e.type==="email",className:`${a}-input`,style:{...j,paddingRight:E.scalingValue(M.right,t),paddingLeft:E.scalingValue(M.left,t),paddingTop:E.scalingValue(M.top,t),paddingBottom:E.scalingValue(M.bottom,t)}},$e.name))}),l.jsx("div",{className:`${a}-overlayAnchor`,children:l.jsx("button",{type:s?"submit":"button",className:`${a}-submitBtn`,"aria-label":he,style:{...de,...Ie,paddingRight:E.scalingValue(k.right,t),paddingLeft:E.scalingValue(k.left,t),paddingTop:E.scalingValue(k.top,t),paddingBottom:E.scalingValue(k.bottom,t),pointerEvents:s?"auto":void 0},children:C==="submitting"?"...":Ce?pe&&l.jsx(Ft,{url:pe,className:`${a}-submitBtnIcon`,style:{maxWidth:E.scalingValue(q??0,t)},fill:`var(--${a}-button-text-color)`,hoverFill:`var(--${a}-button-text-color)`}):Z})})]}),ye==="success"&&l.jsx("p",{className:`${a}-success`,style:{...Le},children:D}),ye==="error"&&l.jsx("p",{className:`${a}-error`,style:{...Le},role:"alert",children:f??Re??Q})]})},$c={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"},Tc=["hover","focus","filled","success","error"],Lc=`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
@@ -1557,7 +1557,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1557
1557
  };\r
1558
1558
  \r
1559
1559
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1560
- `,Ec="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Pc=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{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."}],Fr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ac=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],_c={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","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"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},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"}},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"}},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"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...Fr.fontSettings,scope:"common",title:"Input"},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:{...Fr.fontSettings,scope:"common",title:"Button"},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"}},statusFontSettings:{...Fr.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:{fields:Pc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Ec},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},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:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Ac],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Rc={element:wc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:_c,sourceCode:Lc};function qi(e){return`
1560
+ `,Ec="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Pc=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{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."}],kr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_c=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ac={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","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"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},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"}},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"}},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"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...kr.fontSettings,scope:"common",title:"Input"},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:{...kr.fontSettings,scope:"common",title:"Button"},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"}},statusFontSettings:{...kr.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:{fields:Pc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Ec},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},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:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["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:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[..._c],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Rc={element:wc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Ac,sourceCode:Lc};function Gi(e){return`
1561
1561
  .${e}-marquee-wrapper {
1562
1562
  overflow: hidden;
1563
1563
  width: 100%;
@@ -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 Ic=30,Wc=20,kr=2,Fc=2,kc=(e,t)=>Array.from({length:t},()=>e).flat(),Mc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Nc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Mc(r,e))},Hc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:a,isFirstSet:s,scaled:c,onFirstSetImageDone:o})=>{var L,I,A;const d=u.useRef(null);u.useLayoutEffect(()=>{if(!s)return;const N=d.current;N!=null&&N.complete&&(o==null||o())},[s,(L=e.image)==null?void 0:L.url,o]);const p=n.display==="Cover",T=n.ratioValue??"1:1",S=n.reversed??!1,[v,g]=T.split(":").map(Number),b=(S?g:v)/(S?v:g);let x=r,y=x/b;y>i&&(y=i,x=y*b);const O=c(x),P=c(y),_=((I=e.image)==null?void 0:I.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((A=e.image)==null?void 0:A.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:s?o:void 0,onError:s?o:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:O}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:O,height:P,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:_&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ee(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:_}):_})})},Oc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),{speed:s,direction:c,pauseOnHover:o,gap:d,imageMaxWidth:p,imageMaxHeight:T,imageFit:S,hoverEffect:v}=e,g=!!i,m=!n||!!r,R=m&&v!=="off"&&v!=="randomize"?`${a}-image-hover-${v}`:void 0,b=n?!!r:!0,y=((t==null?void 0:t.length)??0)>0&&(b||!!n),O=Math.max(0,s)*Ic,P=h=>E.scalingValue(h,n??!1),_=u.useRef(null),L=u.useRef(null),I=u.useRef(null),[A,N]=u.useState(0),[w,B]=u.useState(0),V=b&&o==="on",[U,Y]=u.useState(!1),[$,W]=u.useState({}),H=u.useRef($);H.current=$;const M=u.useRef(null),F=u.useRef(0),D=u.useRef(null),Q=u.useMemo(()=>(t??[]).map(h=>{var f;return((f=h.image)==null?void 0:f.url)??""}).join("\0"),[t]),[re,ie]=u.useState(kr),ce=u.useMemo(()=>{const h=t??[];return!b||h.length===0?h:kc(h,re)},[t,b,re]),C=u.useMemo(()=>ce.filter(h=>{var f;return!!((f=h.image)!=null&&f.url)}).length,[ce]),oe=y?Fc:1;u.useLayoutEffect(()=>{F.current=0,W({}),M.current=null,ie(kr),N(0)},[Q]),u.useEffect(()=>{if(!m||v!=="randomize")return;const h=_.current;if(!h)return;const f=ee=>{W(te=>{let J=null;for(const pe of ee)pe in te&&(Nc(h,pe)||(J||(J={...te}),delete J[pe]));return J??te})},k=new IntersectionObserver(ee=>{const te=new Set;for(const J of ee){const pe=J.target.dataset.marqueeItemIndex,Ce=pe!==void 0?Number(pe):NaN;Number.isNaN(Ce)||te.add(Ce)}te.size>0&&f(te)},{root:h,threshold:0});Object.keys($).forEach(ee=>{const te=Number(ee);h.querySelectorAll(`[data-marquee-item-index="${te}"]`).forEach(J=>k.observe(J))});let j=0;const q=()=>{const ee=Object.keys(H.current);ee.length!==0&&(f(ee.map(Number)),j=requestAnimationFrame(q))};return Object.keys(H.current).length>0&&(j=requestAnimationFrame(q)),()=>{cancelAnimationFrame(j),k.disconnect()}},[v,$,m]),u.useLayoutEffect(()=>{if(!y)return;const h=_.current,f=I.current;if(!h||!f)return;let k=0;const j=()=>{const te=h.getBoundingClientRect().width,J=f.getBoundingClientRect().width,pe=M.current,Ce=typeof pe=="number"&&Math.abs(pe-J)<=.25;if(M.current=J,b&&J>0&&re>0){const he=J/re;if(he>0&&te>0){const fe=Math.max(kr,Math.ceil(te/he)+1);if(fe!==re){ie(fe);return}}}if(J>0&&A<=0){N(J);return}Ce&&J!==A?N(J):!Ce&&A<=0&&(cancelAnimationFrame(k),k=requestAnimationFrame(j))},q=()=>{cancelAnimationFrame(k),k=requestAnimationFrame(j)};D.current=q,q();const ee=new ResizeObserver(q);return ee.observe(h),ee.observe(f),()=>{D.current=null,cancelAnimationFrame(k),ee.disconnect()}},[b,y,A,Q,re]),u.useLayoutEffect(()=>{const h=L.current;if(!y||!h)return;const f=A>0?A:0,k=f>0&&O>0?f/O*1e3:0,j=`${Math.max(0,k)/1e3}s`;h.style.setProperty("--marquee-distance",`${f}px`),h.style.setProperty("--marquee-duration",j)},[b,y,O,A]),u.useLayoutEffect(()=>{if(!y){B(0);return}if(A<=0){B(0);return}const h=L.current;if(!h)return;const f=()=>{const j=h.getBoundingClientRect().height;B(j>0?j:0)};f();const k=new ResizeObserver(f);return k.observe(h),()=>k.disconnect()},[y,oe,ce,n,d,p,T,A,S,$]);const Pe=()=>{V&&Y(!0)},ue=()=>{V&&Y(!1)},ye=u.useCallback(()=>{var h;F.current=Math.min(C,F.current+1),(h=D.current)==null||h.call(D)},[C]),Re=u.useCallback((h,f)=>{W(k=>{const j=k[h]??f,q=(t??[]).filter(te=>te!==j);if(q.length===0)return k;const ee=q[Math.floor(Math.random()*q.length)];return{...k,[h]:ee}})},[t]),ne=(h,f,k,j)=>{const q=m&&v==="randomize"&&S.display==="Cover"?$[k]??h:h,ee=`max(${P(d)}, ${Wc}px)`,te=`calc(-0.5 * (${ee} + ${P(d)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":k,onMouseEnter:m&&v==="randomize"&&S.display==="Cover"?()=>Re(k,h):void 0,children:[l.jsx(Hc,{item:q,prefix:a,imageFit:S,imageMaxWidth:p,imageMaxHeight:T,imageHoverClass:R,isEditor:n,isFirstSet:j,scaled:P,onFirstSetImageDone:ye}),g&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:te,width:ee,height:"100%"}})]},`${f}-${k}`)};if(y){const h=b?V&&U?"paused":"running":"paused";return l.jsxs("div",{ref:_,className:Ee(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:A>0&&w>0?{height:w}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:qi(a)}}),l.jsx("div",{ref:L,className:`${a}-marquee-track`,"data-direction":c,onMouseEnter:Pe,onMouseLeave:ue,style:{"--marquee-play-state":h},children:Array.from({length:oe},(f,k)=>l.jsx("div",{ref:k===0?I:void 0,className:Ee(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:P(d),paddingRight:P(d)},"aria-hidden":k>0,children:ce.map((j,q)=>ne(j,k,q,k===0))},`set-${k}`))},"marquee-track")]})}return l.jsxs("div",{ref:_,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:qi(a)}}),l.jsx("div",{className:Ee(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:P(d),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((h,f)=>ne(h,0,f))},"marquee-static")]})},Bc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1692
+ `}const Ic=30,Wc=20,Fr=2,kc=2,Fc=(e,t)=>Array.from({length:t},()=>e).flat(),Mc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Nc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Mc(r,e))},Hc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:a,isFirstSet:s,scaled:c,onFirstSetImageDone:o})=>{var L,I,_;const d=u.useRef(null);u.useLayoutEffect(()=>{if(!s)return;const N=d.current;N!=null&&N.complete&&(o==null||o())},[s,(L=e.image)==null?void 0:L.url,o]);const p=n.display==="Cover",T=n.ratioValue??"1:1",S=n.reversed??!1,[v,g]=T.split(":").map(Number),b=(S?g:v)/(S?v:g);let x=r,y=x/b;y>i&&(y=i,x=y*b);const O=c(x),P=c(y),A=((I=e.image)==null?void 0:I.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((_=e.image)==null?void 0:_.name)??"",style:p?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:s?o:void 0,onError:s?o:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...p?{width:O}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...p?{width:O,height:P,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:A&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ee(`${t}-marquee-link`,!p&&`${t}-marquee-link-contain`),children:A}):A})})},Oc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),{speed:s,direction:c,pauseOnHover:o,gap:d,imageMaxWidth:p,imageMaxHeight:T,imageFit:S,hoverEffect:v}=e,g=!!i,m=!n||!!r,R=m&&v!=="off"&&v!=="randomize"?`${a}-image-hover-${v}`:void 0,b=n?!!r:!0,y=((t==null?void 0:t.length)??0)>0&&(b||!!n),O=Math.max(0,s)*Ic,P=h=>E.scalingValue(h,n??!1),A=u.useRef(null),L=u.useRef(null),I=u.useRef(null),[_,N]=u.useState(0),[w,B]=u.useState(0),V=b&&o==="on",[q,Y]=u.useState(!1),[$,W]=u.useState({}),H=u.useRef($);H.current=$;const M=u.useRef(null),k=u.useRef(0),D=u.useRef(null),Q=u.useMemo(()=>(t??[]).map(h=>{var f;return((f=h.image)==null?void 0:f.url)??""}).join("\0"),[t]),[re,ie]=u.useState(Fr),ce=u.useMemo(()=>{const h=t??[];return!b||h.length===0?h:Fc(h,re)},[t,b,re]),C=u.useMemo(()=>ce.filter(h=>{var f;return!!((f=h.image)!=null&&f.url)}).length,[ce]),oe=y?kc:1;u.useLayoutEffect(()=>{k.current=0,W({}),M.current=null,ie(Fr),N(0)},[Q]),u.useEffect(()=>{if(!m||v!=="randomize")return;const h=A.current;if(!h)return;const f=ee=>{W(te=>{let Z=null;for(const pe of ee)pe in te&&(Nc(h,pe)||(Z||(Z={...te}),delete Z[pe]));return Z??te})},F=new IntersectionObserver(ee=>{const te=new Set;for(const Z of ee){const pe=Z.target.dataset.marqueeItemIndex,Ce=pe!==void 0?Number(pe):NaN;Number.isNaN(Ce)||te.add(Ce)}te.size>0&&f(te)},{root:h,threshold:0});Object.keys($).forEach(ee=>{const te=Number(ee);h.querySelectorAll(`[data-marquee-item-index="${te}"]`).forEach(Z=>F.observe(Z))});let z=0;const G=()=>{const ee=Object.keys(H.current);ee.length!==0&&(f(ee.map(Number)),z=requestAnimationFrame(G))};return Object.keys(H.current).length>0&&(z=requestAnimationFrame(G)),()=>{cancelAnimationFrame(z),F.disconnect()}},[v,$,m]),u.useLayoutEffect(()=>{if(!y)return;const h=A.current,f=I.current;if(!h||!f)return;let F=0;const z=()=>{const te=h.getBoundingClientRect().width,Z=f.getBoundingClientRect().width,pe=M.current,Ce=typeof pe=="number"&&Math.abs(pe-Z)<=.25;if(M.current=Z,b&&Z>0&&re>0){const he=Z/re;if(he>0&&te>0){const fe=Math.max(Fr,Math.ceil(te/he)+1);if(fe!==re){ie(fe);return}}}if(Z>0&&_<=0){N(Z);return}Ce&&Z!==_?N(Z):!Ce&&_<=0&&(cancelAnimationFrame(F),F=requestAnimationFrame(z))},G=()=>{cancelAnimationFrame(F),F=requestAnimationFrame(z)};D.current=G,G();const ee=new ResizeObserver(G);return ee.observe(h),ee.observe(f),()=>{D.current=null,cancelAnimationFrame(F),ee.disconnect()}},[b,y,_,Q,re]),u.useLayoutEffect(()=>{const h=L.current;if(!y||!h)return;const f=_>0?_:0,F=f>0&&O>0?f/O*1e3:0,z=`${Math.max(0,F)/1e3}s`;h.style.setProperty("--marquee-distance",`${f}px`),h.style.setProperty("--marquee-duration",z)},[b,y,O,_]),u.useLayoutEffect(()=>{if(!y){B(0);return}if(_<=0){B(0);return}const h=L.current;if(!h)return;const f=()=>{const z=h.getBoundingClientRect().height;B(z>0?z:0)};f();const F=new ResizeObserver(f);return F.observe(h),()=>F.disconnect()},[y,oe,ce,n,d,p,T,_,S,$]);const Pe=()=>{V&&Y(!0)},ue=()=>{V&&Y(!1)},ye=u.useCallback(()=>{var h;k.current=Math.min(C,k.current+1),(h=D.current)==null||h.call(D)},[C]),Re=u.useCallback((h,f)=>{W(F=>{const z=F[h]??f,G=(t??[]).filter(te=>te!==z);if(G.length===0)return F;const ee=G[Math.floor(Math.random()*G.length)];return{...F,[h]:ee}})},[t]),ne=(h,f,F,z)=>{const G=m&&v==="randomize"&&S.display==="Cover"?$[F]??h:h,ee=`max(${P(d)}, ${Wc}px)`,te=`calc(-0.5 * (${ee} + ${P(d)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":F,onMouseEnter:m&&v==="randomize"&&S.display==="Cover"?()=>Re(F,h):void 0,children:[l.jsx(Hc,{item:G,prefix:a,imageFit:S,imageMaxWidth:p,imageMaxHeight:T,imageHoverClass:R,isEditor:n,isFirstSet:z,scaled:P,onFirstSetImageDone:ye}),g&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:te,width:ee,height:"100%"}})]},`${f}-${F}`)};if(y){const h=b?V&&q?"paused":"running":"paused";return l.jsxs("div",{ref:A,className:Ee(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:_>0&&w>0?{height:w}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Gi(a)}}),l.jsx("div",{ref:L,className:`${a}-marquee-track`,"data-direction":c,onMouseEnter:Pe,onMouseLeave:ue,style:{"--marquee-play-state":h},children:Array.from({length:oe},(f,F)=>l.jsx("div",{ref:F===0?I:void 0,className:Ee(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:P(d),paddingRight:P(d)},"aria-hidden":F>0,children:ce.map((z,G)=>ne(z,F,G,F===0))},`set-${F}`))},"marquee-track")]})}return l.jsxs("div",{ref:A,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Gi(a)}}),l.jsx("div",{className:Ee(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:P(d),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((h,f)=>ne(h,0,f))},"marquee-static")]})},Bc=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1693
1693
  import cn from 'classnames';\r
1694
1694
  import { CommonComponentProps } from '../props';\r
1695
1695
  import { scalingValue } from '../utils/scalingValue';\r
@@ -2406,7 +2406,7 @@ type MarqueeProps = {\r
2406
2406
  pointer-events: auto;
2407
2407
  z-index: 10;
2408
2408
  }
2409
- `}const jc=30,Xi=2,zc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),{autoplay:s,align:c,speed:o,direction:d,pauseOnHover:p,gap:T,cardWidth:S,corners:v,stroke:g,strokeColor:m,bgColor:R,padding:b,logoMarginTop:x,logoWidth:y,logoHeight:O,captionMarginTop:P}=e,_=!!i,L=((t==null?void 0:t.length)??0)>0,I=s==="on"&&(!n||!!r),A=L&&(I||!!n),N=Math.max(0,o)*jc,w=K=>E.scalingValue(K,n??!1),B=u.useRef(null),V=u.useRef(null),U=u.useRef(null),[Y,$]=u.useState(0),[W,H]=u.useState(0),[M,F]=u.useState(0),D=I&&p==="on",[Q,re]=u.useState(!1),ie=u.useRef(null),[ce,C]=u.useState(0),[oe,Pe]=u.useState(0),ue=u.useRef(null),ye=K=>{var z,de,Le,Me,ke;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${K}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${K}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((Le=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Le.textTransform)??"none",textDecoration:((Me=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Me.textDecoration)??"none",fontVariant:((ke=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:ke.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},Re=ye("text"),ne=ye("caption"),h=u.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var G,z;return(((G=K.text)==null?void 0:G.length)??0)>0||(((z=K.caption)==null?void 0:z.length)??0)>0}),[t]),f=u.useMemo(()=>!A||(t==null?void 0:t.length)===0?1:W<=0||Y<=0?Xi:Math.max(Xi,Math.ceil(Y/W)+1),[A,t==null?void 0:t.length,W,Y]);u.useLayoutEffect(()=>{if(!A)return;const K=B.current,G=U.current;if(!K||!G)return;let z=0;const de=()=>{const ke=K.getBoundingClientRect().width,Ie=G.getBoundingClientRect().width,Ue=ue.current,$e=typeof Ue=="number"&&Math.abs(Ue-Ie)<=.25;if(ue.current=Ie,$(ke),typeof Ie=="number"&&Ie>0&&W<=0){H(Ie);return}$e&&Ie!==W?H(Ie):!$e&&W<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(de))},Le=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(de)};Le();const Me=new ResizeObserver(Le);return Me.observe(K),Me.observe(G),()=>{cancelAnimationFrame(z),Me.disconnect()}},[I,A,W]),u.useLayoutEffect(()=>{const K=V.current;if(!A||!K)return;const G=W>0?W:0,z=G>0&&N>0?G/N*1e3:0,de=`${Math.max(0,z)/1e3}s`;K.style.setProperty("--marquee-distance",`${G}px`),K.style.setProperty("--marquee-duration",de)},[I,A,N,W]),u.useLayoutEffect(()=>{if(!A){F(0);return}const K=U.current,G=V.current;if(!K||!G)return;const z=()=>{let Le=0;for(let Me=0;Me<K.children.length;Me++){const Ie=K.children[Me].firstElementChild;Ie&&(Le=Math.max(Le,Ie.offsetHeight))}Le<=0&&(Le=G.offsetHeight),F(Le>0?Le:0)};z();const de=new ResizeObserver(z);return de.observe(K),de.observe(G),()=>{de.disconnect()}},[A,f,t,n,T,S,b,g,v,y,O,ce,oe]);const k=()=>{D&&re(!0)},j=()=>{D&&re(!1)},q=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ee=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),te=u.useCallback((K,G,z,de)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:q,width:"100%"},children:[l.jsx("div",{"data-controls":_?de==null?void 0:de.controlsName:void 0,"data-controls-axis":_?"y":void 0,className:_?`${a}-control`:void 0,style:{height:w((de==null?void 0:de.marginTop)??0)}}),l.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...nt(K,n),textAlign:ee,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:l.jsx(_n,{content:G})})]},z),[q,ee,n,_,a,w]),J=u.useCallback((K,G,z)=>{var de,Le,Me;return l.jsxs("div",{style:{padding:`${w(b.top)} ${w(b.right)} ${w(b.bottom)} ${w(b.left)}`,width:w(S+g*2),height:"100%",borderRadius:w(v),border:`${w(g)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:R}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:q,textAlign:ee},children:[K.text&&te(Re,K.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:q,width:"100%"},children:[l.jsx("div",{"data-controls":_&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:_&&!(z!=null&&z.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:w(x)}}),l.jsx("div",{style:{width:w(y),height:w(O)},children:((de=K.logo)==null?void 0:de.url)&&l.jsx("img",{src:K.logo.url,alt:((Le=K.logo)==null?void 0:Le.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Me=K.logo)==null?void 0:Me.objectFit)||"contain"}})})]}),K.caption&&te(ne,K.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:P,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},G)},[R,P,ne,S,v,O,x,y,q,ee,b.bottom,b.left,b.right,b.top,te,g,m,Re,n,_,a]),pe=u.useCallback(K=>{C(K.maxTextPx),Pe(K.maxCaptionPx)},[]);u.useLayoutEffect(()=>{if(!h){pe({maxTextPx:0,maxCaptionPx:0});return}const K=ie.current;if(!K)return;const G=()=>{E.readTestimonialTextMeasure(K,pe)};G();const z=new ResizeObserver(G);return z.observe(K),()=>{z.disconnect()}},[h,pe,t,J]);const Ce=h?{textMinHeightPx:ce,captionMinHeightPx:oe}:void 0,he=h?l.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,G)=>J(K,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,fe=(K,G)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(K,`card-${G}`,Ce),_&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${w(T)})`,width:w(T),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);if(A){const K=I?D&&Q?"paused":"running":"paused";return l.jsxs("div",{ref:B,className:Ee(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...M>0?{height:M}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yi(a)}}),he,l.jsx("div",{ref:V,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:k,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":K},children:Array.from({length:f},(G,z)=>l.jsx("div",{ref:z===0?U:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:w(T),paddingRight:w(T)},"aria-hidden":z>0,children:t==null?void 0:t.map((de,Le)=>fe(de,`${z}-${Le}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yi(a)}}),he,l.jsx("div",{style:{gap:w(T),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,G)=>fe(K,G))})]})},Kc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2409
+ `}const zc=30,Xi=2,jc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),{autoplay:s,align:c,speed:o,direction:d,pauseOnHover:p,gap:T,cardWidth:S,corners:v,stroke:g,strokeColor:m,bgColor:R,padding:b,logoMarginTop:x,logoWidth:y,logoHeight:O,captionMarginTop:P}=e,A=!!i,L=((t==null?void 0:t.length)??0)>0,I=s==="on"&&(!n||!!r),_=L&&(I||!!n),N=Math.max(0,o)*zc,w=K=>E.scalingValue(K,n??!1),B=u.useRef(null),V=u.useRef(null),q=u.useRef(null),[Y,$]=u.useState(0),[W,H]=u.useState(0),[M,k]=u.useState(0),D=I&&p==="on",[Q,re]=u.useState(!1),ie=u.useRef(null),[ce,C]=u.useState(0),[oe,Pe]=u.useState(0),ue=u.useRef(null),ye=K=>{var j,de,Le,Me,Fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((j=e==null?void 0:e[`${K}FontSettings`])==null?void 0:j.fontWeight)??400,fontStyle:((de=e==null?void 0:e[`${K}FontSettings`])==null?void 0:de.fontStyle)??"normal"},textAppearance:{textTransform:((Le=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Le.textTransform)??"none",textDecoration:((Me=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Me.textDecoration)??"none",fontVariant:((Fe=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Fe.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},Re=ye("text"),ne=ye("caption"),h=u.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var U,j;return(((U=K.text)==null?void 0:U.length)??0)>0||(((j=K.caption)==null?void 0:j.length)??0)>0}),[t]),f=u.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:W<=0||Y<=0?Xi:Math.max(Xi,Math.ceil(Y/W)+1),[_,t==null?void 0:t.length,W,Y]);u.useLayoutEffect(()=>{if(!_)return;const K=B.current,U=q.current;if(!K||!U)return;let j=0;const de=()=>{const Fe=K.getBoundingClientRect().width,Ie=U.getBoundingClientRect().width,qe=ue.current,$e=typeof qe=="number"&&Math.abs(qe-Ie)<=.25;if(ue.current=Ie,$(Fe),typeof Ie=="number"&&Ie>0&&W<=0){H(Ie);return}$e&&Ie!==W?H(Ie):!$e&&W<=0&&(cancelAnimationFrame(j),j=requestAnimationFrame(de))},Le=()=>{cancelAnimationFrame(j),j=requestAnimationFrame(de)};Le();const Me=new ResizeObserver(Le);return Me.observe(K),Me.observe(U),()=>{cancelAnimationFrame(j),Me.disconnect()}},[I,_,W]),u.useLayoutEffect(()=>{const K=V.current;if(!_||!K)return;const U=W>0?W:0,j=U>0&&N>0?U/N*1e3:0,de=`${Math.max(0,j)/1e3}s`;K.style.setProperty("--marquee-distance",`${U}px`),K.style.setProperty("--marquee-duration",de)},[I,_,N,W]),u.useLayoutEffect(()=>{if(!_){k(0);return}const K=q.current,U=V.current;if(!K||!U)return;const j=()=>{let Le=0;for(let Me=0;Me<K.children.length;Me++){const Ie=K.children[Me].firstElementChild;Ie&&(Le=Math.max(Le,Ie.offsetHeight))}Le<=0&&(Le=U.offsetHeight),k(Le>0?Le:0)};j();const de=new ResizeObserver(j);return de.observe(K),de.observe(U),()=>{de.disconnect()}},[_,f,t,n,T,S,b,g,v,y,O,ce,oe]);const F=()=>{D&&re(!0)},z=()=>{D&&re(!1)},G=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ee=u.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),te=u.useCallback((K,U,j,de)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:G,width:"100%"},children:[l.jsx("div",{"data-controls":A?de==null?void 0:de.controlsName:void 0,"data-controls-axis":A?"y":void 0,className:A?`${a}-control`:void 0,style:{height:w((de==null?void 0:de.marginTop)??0)}}),l.jsx("div",{...de!=null&&de.dataMeasureKind?{"data-testimonial-measure":de.dataMeasureKind}:{},style:{...nt(K,n),textAlign:ee,pointerEvents:"auto",...typeof(de==null?void 0:de.minHeightPx)=="number"&&de.minHeightPx>0?{minHeight:de.minHeightPx}:{}},children:l.jsx(An,{content:U})})]},j),[G,ee,n,A,a,w]),Z=u.useCallback((K,U,j)=>{var de,Le,Me;return l.jsxs("div",{style:{padding:`${w(b.top)} ${w(b.right)} ${w(b.bottom)} ${w(b.left)}`,width:w(S+g*2),height:"100%",borderRadius:w(v),border:`${w(g)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:R}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:G,textAlign:ee},children:[K.text&&te(Re,K.text,"text",j!=null&&j.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(j==null?void 0:j.textMinHeightPx)=="number"&&j.textMinHeightPx>0?{minHeightPx:j.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:G,width:"100%"},children:[l.jsx("div",{"data-controls":A&&!(j!=null&&j.dataMeasureAttrs)?"logoMarginTop":void 0,className:A&&!(j!=null&&j.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:w(x)}}),l.jsx("div",{style:{width:w(y),height:w(O)},children:((de=K.logo)==null?void 0:de.url)&&l.jsx("img",{src:K.logo.url,alt:((Le=K.logo)==null?void 0:Le.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Me=K.logo)==null?void 0:Me.objectFit)||"contain"}})})]}),K.caption&&te(ne,K.caption,"caption",{...j!=null&&j.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:P,...j!=null&&j.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(j==null?void 0:j.captionMinHeightPx)=="number"&&j.captionMinHeightPx>0?{minHeightPx:j.captionMinHeightPx}:{}})]})]},U)},[R,P,ne,S,v,O,x,y,G,ee,b.bottom,b.left,b.right,b.top,te,g,m,Re,n,A,a]),pe=u.useCallback(K=>{C(K.maxTextPx),Pe(K.maxCaptionPx)},[]);u.useLayoutEffect(()=>{if(!h){pe({maxTextPx:0,maxCaptionPx:0});return}const K=ie.current;if(!K)return;const U=()=>{E.readTestimonialTextMeasure(K,pe)};U();const j=new ResizeObserver(U);return j.observe(K),()=>{j.disconnect()}},[h,pe,t,Z]);const Ce=h?{textMinHeightPx:ce,captionMinHeightPx:oe}:void 0,he=h?l.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,U)=>Z(K,`measure-${U}`,{dataMeasureAttrs:!0}))}):null,fe=(K,U)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Z(K,`card-${U}`,Ce),A&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${w(T)})`,width:w(T),height:"100%",pointerEvents:"auto",zIndex:2}})]},U);if(_){const K=I?D&&Q?"paused":"running":"paused";return l.jsxs("div",{ref:B,className:Ee(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...M>0?{height:M}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yi(a)}}),he,l.jsx("div",{ref:V,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:F,onMouseLeave:z,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":K},children:Array.from({length:f},(U,j)=>l.jsx("div",{ref:j===0?q:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:w(T),paddingRight:w(T)},"aria-hidden":j>0,children:t==null?void 0:t.map((de,Le)=>fe(de,`${j}-${Le}`))},`set-${j}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Yi(a)}}),he,l.jsx("div",{style:{gap:w(T),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,U)=>fe(K,U))})]})},Kc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2410
2410
  import cn from 'classnames';\r
2411
2411
  import { CommonComponentProps } from '../props';\r
2412
2412
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {\r
3022
3022
  logoHeight: number;\r
3023
3023
  captionMarginTop: number;\r
3024
3024
  };\r
3025
- `,Ji={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Gc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-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:{...Ji.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"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Ji.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"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{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:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{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:[{logo:{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"}]}]},{logo:{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"}]}]},{logo:{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"}]}]}]}},Uc={element:zc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Gc,sourceCode:Kc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function qc(e){return`
3025
+ `,Zi={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Uc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-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:{...Zi.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"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Zi.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"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{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:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{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:[{logo:{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"}]}]},{logo:{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"}]}]},{logo:{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"}]}]}]}},qc={element:jc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Uc,sourceCode:Kc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Gc(e){return`
3026
3026
  .${e}-container {
3027
3027
  position: relative;
3028
3028
  overflow-x: clip;
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {\r
3146
3146
  width: 100%;
3147
3147
  height: 100%;
3148
3148
  }
3149
- `}const Yc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),s=t||[],{autoplay:c,delay:o,align:d,width:p,imageMarginTop:T,textMarginTop:S,captionMarginTop:v,imageWidth:g,imageHeight:m,controlsWidth:R,controlsColor:b,controlsHoverColor:x}=e,y=c==="on"&&r,[O,P]=u.useState(0),[_,L]=u.useState(null),[I,A]=u.useState(!1),N=u.useRef(null),w=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),B=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);u.useEffect(()=>{P(0),L(null),A(!1)},[s.length]);const V=s[O],U=_===null?null:s[_],Y=ne=>{var f,k,j,q,ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ne}FontFamily`])??"Arial",fontWeight:((f=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:f.fontWeight)??400,fontStyle:((k=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:k.fontStyle)??"normal"},textAppearance:{textTransform:((j=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:j.textTransform)??"none",textDecoration:((q=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:q.textDecoration)??"none",fontVariant:((ee=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ne}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ne}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ne}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ne}WordSpacing`])??0,color:(e==null?void 0:e[`${ne}Color`])??"#000000"}},$=Y("text"),W=Y("caption"),H=s.length>1&&s.some(ne=>{var h,f;return(((h=ne.text)==null?void 0:h.length)??0)>0||(((f=ne.caption)==null?void 0:f.length)??0)>0}),M=u.useRef(null),[F,D]=u.useState(0),[Q,re]=u.useState(0),ie=e.controls??{mode:"Off",icon:null},ce=s.length>1,C=u.useCallback((ne,h)=>!ce||h===ne?ne:(N.current&&window.clearTimeout(N.current),L(ne),A(!0),N.current=window.setTimeout(()=>{L(null),A(!1),N.current=null},300),h),[ce]),oe=u.useCallback(()=>{ce&&P(ne=>C(ne,(ne-1+s.length)%s.length))},[ce,C,s.length]),Pe=u.useCallback(()=>{ce&&P(ne=>C(ne,(ne+1)%s.length))},[ce,C,s.length]);u.useEffect(()=>{if(!y||!ce)return;const ne=Math.max(300,Number.isFinite(o*1e3)?o*1e3:0),h=window.setInterval(()=>{P(f=>C(f,(f+1)%s.length))},ne);return()=>{window.clearInterval(h)}},[y,ce,C,s.length,o]),u.useEffect(()=>()=>{N.current&&window.clearTimeout(N.current)},[]);const ue=(ne,h)=>{var ee,te,J,pe;const f=h==null?void 0:h.textMinHeightPx,k=h==null?void 0:h.captionMinHeightPx,j=h==null?void 0:h.dataMeasureAttrs,q=i&&!(h!=null&&h.dataMeasureAttrs)&&!(h!=null&&h.hideControls);return l.jsxs(l.Fragment,{children:[ne.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[l.jsx("div",{"data-controls":q?"textMarginTop":void 0,className:q?`${a}-control`:void 0,style:{height:E.scalingValue(S??0,n??!1)}}),l.jsx("div",{...j&&{"data-testimonial-measure":"text"},style:{...nt($,n),...f&&f>0?{minHeight:f}:{},textAlign:B,pointerEvents:"auto"},children:l.jsx(_n,{content:ne.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[l.jsx("div",{"data-controls":q?"imageMarginTop":void 0,className:q?`${a}-control`:void 0,style:{height:E.scalingValue(T??0,n??!1)}}),l.jsx("div",{style:{width:E.scalingValue(g??0,n??!1),height:E.scalingValue(m??0,n??!1)},children:((ee=ne.image)==null?void 0:ee.url)&&l.jsx("img",{src:(te=ne.image)==null?void 0:te.url,alt:((J=ne.image)==null?void 0:J.name)??"",className:`${a}-icon`,style:{objectFit:((pe=ne.image)==null?void 0:pe.objectFit)||"contain"}})})]}),ne.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[l.jsx("div",{"data-controls":q?"captionMarginTop":void 0,className:q?`${a}-control`:void 0,style:{height:E.scalingValue(v??0,n??!1)}}),l.jsx("div",{...j?{"data-testimonial-measure":"caption"}:{},style:{...nt(W,n),...k&&k>0?{minHeight:k}:{},textAlign:B,pointerEvents:"auto"},children:l.jsx(_n,{content:ne.caption})})]})]})},ye=u.useCallback(ne=>{D(ne.maxTextPx),re(ne.maxCaptionPx)},[]);if(u.useLayoutEffect(()=>{if(!H){ye({maxTextPx:0,maxCaptionPx:0});return}const ne=M.current;if(!ne)return;const h=()=>{E.readTestimonialTextMeasure(ne,ye)};h();const f=new ResizeObserver(h);return f.observe(ne),()=>{f.disconnect()}},[H,ye,t]),!V)return l.jsx(l.Fragment,{});const Re=H?{textMinHeightPx:F,captionMinHeightPx:Q}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:qc(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:E.scalingValue(p??0,n??!1),alignItems:w},children:[H&&l.jsx("div",{ref:M,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((ne,h)=>l.jsx("div",{style:{width:"100%"},children:ue(ne,{dataMeasureAttrs:!0})},h))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[U&&I&&l.jsx("div",{className:Ee(`${a}-fade-item-prev`,`${a}-fade-out`),children:ue(U,{...Re,hideControls:!0})}),l.jsx("div",{className:Ee(`${a}-fade-item-current`,I?`${a}-fade-in`:void 0),children:ue(V,Re)})]})]}),ie.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:E.scalingValue(R??.02,n??!1),height:E.scalingValue(R??.02,n??!1),"--arrow-hover-color":x},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:oe,disabled:!ce,"aria-label":"Previous testimonial",children:ie.icon&&l.jsx(kt,{url:ie.icon,fill:b,hoverFill:x,className:Ee(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:Ee(`${a}-arrow`,`${a}-next-arrow`),style:{width:E.scalingValue(R??.02,n??!1),height:E.scalingValue(R??.02,n??!1),"--arrow-hover-color":x},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:Pe,disabled:!ce,"aria-label":"Next testimonial",children:ie.icon&&l.jsx(kt,{url:ie.icon,fill:b,hoverFill:x,className:`${a}-arrow-img`})})})]})]})})},Xc=`import cn from 'classnames';\r
3149
+ `}const Yc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),s=t||[],{autoplay:c,delay:o,align:d,width:p,imageMarginTop:T,textMarginTop:S,captionMarginTop:v,imageWidth:g,imageHeight:m,controlsWidth:R,controlsColor:b,controlsHoverColor:x}=e,y=c==="on"&&r,[O,P]=u.useState(0),[A,L]=u.useState(null),[I,_]=u.useState(!1),N=u.useRef(null),w=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),B=u.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);u.useEffect(()=>{P(0),L(null),_(!1)},[s.length]);const V=s[O],q=A===null?null:s[A],Y=ne=>{var f,F,z,G,ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ne}FontFamily`])??"Arial",fontWeight:((f=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:f.fontWeight)??400,fontStyle:((F=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:F.fontStyle)??"normal"},textAppearance:{textTransform:((z=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:z.textTransform)??"none",textDecoration:((G=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:G.textDecoration)??"none",fontVariant:((ee=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ne}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ne}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ne}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ne}WordSpacing`])??0,color:(e==null?void 0:e[`${ne}Color`])??"#000000"}},$=Y("text"),W=Y("caption"),H=s.length>1&&s.some(ne=>{var h,f;return(((h=ne.text)==null?void 0:h.length)??0)>0||(((f=ne.caption)==null?void 0:f.length)??0)>0}),M=u.useRef(null),[k,D]=u.useState(0),[Q,re]=u.useState(0),ie=e.controls??{mode:"Off",icon:null},ce=s.length>1,C=u.useCallback((ne,h)=>!ce||h===ne?ne:(N.current&&window.clearTimeout(N.current),L(ne),_(!0),N.current=window.setTimeout(()=>{L(null),_(!1),N.current=null},300),h),[ce]),oe=u.useCallback(()=>{ce&&P(ne=>C(ne,(ne-1+s.length)%s.length))},[ce,C,s.length]),Pe=u.useCallback(()=>{ce&&P(ne=>C(ne,(ne+1)%s.length))},[ce,C,s.length]);u.useEffect(()=>{if(!y||!ce)return;const ne=Math.max(300,Number.isFinite(o*1e3)?o*1e3:0),h=window.setInterval(()=>{P(f=>C(f,(f+1)%s.length))},ne);return()=>{window.clearInterval(h)}},[y,ce,C,s.length,o]),u.useEffect(()=>()=>{N.current&&window.clearTimeout(N.current)},[]);const ue=(ne,h)=>{var ee,te,Z,pe;const f=h==null?void 0:h.textMinHeightPx,F=h==null?void 0:h.captionMinHeightPx,z=h==null?void 0:h.dataMeasureAttrs,G=i&&!(h!=null&&h.dataMeasureAttrs)&&!(h!=null&&h.hideControls);return l.jsxs(l.Fragment,{children:[ne.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[l.jsx("div",{"data-controls":G?"textMarginTop":void 0,className:G?`${a}-control`:void 0,style:{height:E.scalingValue(S??0,n??!1)}}),l.jsx("div",{...z&&{"data-testimonial-measure":"text"},style:{...nt($,n),...f&&f>0?{minHeight:f}:{},textAlign:B,pointerEvents:"auto"},children:l.jsx(An,{content:ne.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[l.jsx("div",{"data-controls":G?"imageMarginTop":void 0,className:G?`${a}-control`:void 0,style:{height:E.scalingValue(T??0,n??!1)}}),l.jsx("div",{style:{width:E.scalingValue(g??0,n??!1),height:E.scalingValue(m??0,n??!1)},children:((ee=ne.image)==null?void 0:ee.url)&&l.jsx("img",{src:(te=ne.image)==null?void 0:te.url,alt:((Z=ne.image)==null?void 0:Z.name)??"",className:`${a}-icon`,style:{objectFit:((pe=ne.image)==null?void 0:pe.objectFit)||"contain"}})})]}),ne.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[l.jsx("div",{"data-controls":G?"captionMarginTop":void 0,className:G?`${a}-control`:void 0,style:{height:E.scalingValue(v??0,n??!1)}}),l.jsx("div",{...z?{"data-testimonial-measure":"caption"}:{},style:{...nt(W,n),...F&&F>0?{minHeight:F}:{},textAlign:B,pointerEvents:"auto"},children:l.jsx(An,{content:ne.caption})})]})]})},ye=u.useCallback(ne=>{D(ne.maxTextPx),re(ne.maxCaptionPx)},[]);if(u.useLayoutEffect(()=>{if(!H){ye({maxTextPx:0,maxCaptionPx:0});return}const ne=M.current;if(!ne)return;const h=()=>{E.readTestimonialTextMeasure(ne,ye)};h();const f=new ResizeObserver(h);return f.observe(ne),()=>{f.disconnect()}},[H,ye,t]),!V)return l.jsx(l.Fragment,{});const Re=H?{textMinHeightPx:k,captionMinHeightPx:Q}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Gc(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:E.scalingValue(p??0,n??!1),alignItems:w},children:[H&&l.jsx("div",{ref:M,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((ne,h)=>l.jsx("div",{style:{width:"100%"},children:ue(ne,{dataMeasureAttrs:!0})},h))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[q&&I&&l.jsx("div",{className:Ee(`${a}-fade-item-prev`,`${a}-fade-out`),children:ue(q,{...Re,hideControls:!0})}),l.jsx("div",{className:Ee(`${a}-fade-item-current`,I?`${a}-fade-in`:void 0),children:ue(V,Re)})]})]}),ie.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:E.scalingValue(R??.02,n??!1),height:E.scalingValue(R??.02,n??!1),"--arrow-hover-color":x},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:oe,disabled:!ce,"aria-label":"Previous testimonial",children:ie.icon&&l.jsx(Ft,{url:ie.icon,fill:b,hoverFill:x,className:Ee(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:Ee(`${a}-arrow`,`${a}-next-arrow`),style:{width:E.scalingValue(R??.02,n??!1),height:E.scalingValue(R??.02,n??!1),"--arrow-hover-color":x},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:Pe,disabled:!ce,"aria-label":"Next testimonial",children:ie.icon&&l.jsx(Ft,{url:ie.icon,fill:b,hoverFill:x,className:`${a}-arrow-img`})})})]})]})})},Xc=`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
@@ -3641,7 +3641,7 @@ type TestimonialsSettings = {\r
3641
3641
  icon?: string | null;\r
3642
3642
  };\r
3643
3643
  };\r
3644
- `,Jc="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>'),Zi={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Zc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,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:{...Zi.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:{...Zi.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:{autoplay:"on",controls:{mode:"On",icon:Jc},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:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{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"}]}]}]}},Qc={element:Yc,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:Zc,sourceCode:Xc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ed(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Qi(e){return((e==null?void 0:e.trim().length)??0)>0}function Mr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Nr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((i-t)/2,r)}}function td(e){return`
3644
+ `,Zc="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>'),Ji={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Jc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,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:{...Ji.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:{...Ji.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:{autoplay:"on",controls:{mode:"On",icon:Zc},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:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{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"}]}]}]}},Qc={element:Yc,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:Jc,sourceCode:Xc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ed(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Qi(e){return((e==null?void 0:e.trim().length)??0)>0}function Mr(e,t,n,r){return t!==void 0&&t<(e??.01)?`${n} ${r}`:n}function Nr(e,t,n,r){const i=e??.01;return t===void 0||t>=i?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((i-t)/2,r)}}function td(e){return`
3645
3645
  .${e}-wrapper {
3646
3646
  display: grid;
3647
3647
  align-items: start;
@@ -3811,7 +3811,7 @@ type TestimonialsSettings = {\r
3811
3811
  pointer-events: auto;
3812
3812
  z-index: 10;
3813
3813
  }
3814
- `}const xt=500,nd=750,It="cubic-bezier(0.22, 1, 0.36, 1)";function Wt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function eo({media:e,className:t,style:n,onImageClick:r}){return Wt(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function rd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:d}){const p=n==="Cover",T=u.useRef(null),S=u.useRef(null),[v,g]=u.useState(null),[m,R]=u.useState(r?"opening":"open"),[b,x]=u.useState(!0),y=u.useRef(t),O=u.useCallback(()=>{const N=T.current,w=S.current;if(!N||!w)return;const B=N.getBoundingClientRect(),V=B.width,U=B.height,Y=w.naturalWidth,$=w.naturalHeight;if(!V||!U||!Y||!$)return;if(n==="Cover"){g({width:V,height:U,left:B.left,top:B.top});return}const W=Y/$,H=V/U;if(W>H){const M=V/W;g({width:V,height:M,left:B.left,top:B.top+(U-M)/2})}else{const M=U*W;g({width:M,height:U,left:B.left+(V-M)/2,top:B.top})}},[n]);u.useEffect(()=>{O();const N=T.current;if(!N)return;const w=new ResizeObserver(()=>O());return w.observe(N),()=>w.disconnect()},[O,t]),u.useEffect(()=>{if(m!=="opening"||!v)return;const N={id:0};return N.id=requestAnimationFrame(()=>{N.id=requestAnimationFrame(()=>R("open"))}),()=>cancelAnimationFrame(N.id)},[m,v]),u.useEffect(()=>{if(m!=="closing")return;const N=setTimeout(()=>a(),xt);return()=>clearTimeout(N)},[m,a]),u.useEffect(()=>{y.current!==t&&x(!1),y.current=t},[t]),u.useEffect(()=>{const N=w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),m!=="closing"&&R("closing"))};return window.addEventListener("keydown",N,!0),()=>window.removeEventListener("keydown",N,!0)},[m]);const P=()=>{m!=="closing"&&R("closing")},_=m==="open",L=m==="closing",I=L&&i&&!!r,A=m==="opening"?r??v:I?r:v;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:P,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?1:0,transition:`opacity ${xt}ms ${It}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${xt}ms ${It}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:_?1:0,transition:`opacity ${xt}ms ${It}`},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]})}),A&&l.jsx("img",{ref:S,src:e[t],onLoad:O,style:{position:"fixed",top:A.top,left:A.left,width:A.width,height:A.height,objectFit:n==="Cover"?"cover":"contain",opacity:L&&!I?0:1,transition:L&&!I?`opacity ${xt}ms ${It}`:I||b?`top ${xt}ms ${It}, left ${xt}ms ${It}, width ${xt}ms ${It}, height ${xt}ms ${It}`:"none",pointerEvents:"none",zIndex:9998}}),_&&v&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:N=>{N.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:N=>{N.stopPropagation(),c()}})]})]})}function id(e){return typeof e=="string"?e==="Cover"?"Cover":"Fit":(e==null?void 0:e.display)==="Cover"?"Cover":"Fit"}function od({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=E.useScopedStyles(),{type:d="A",gridLayout:p,textBoxWidth:T,verticalGap:S,entriesCount:v,lightbox:g,imageDisplay:m,lightboxImageDisplay:R,slider:b,sliderTiming:x,direction:y,transition:O,titleMarginTop:P,subtitleMarginTop:_,titleColor:L,subtitleColor:I,lightboxCounterColor:A,titleFontFamily:N,titleFontSettings:w,titleFontSize:B,titleLineHeight:V,titleLetterSpacing:U,titleWordSpacing:Y,titleTextAppearance:$,subtitleFontFamily:W,subtitleFontSettings:H,subtitleFontSize:M,subtitleLineHeight:F,subtitleLetterSpacing:D,subtitleWordSpacing:Q,subtitleTextAppearance:re,lightboxCounterFontFamily:ie,lightboxCounterFontSettings:ce,lightboxCounterFontSize:C,lightboxCounterLineHeight:oe,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:ue,lightboxCounterTextAppearance:ye,showText:Re="Always",alignEntries:ne="Off"}=e,h={fontSettings:{fontFamily:N,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:B??.01,lineHeight:V,letterSpacing:U??0,wordSpacing:Y??0,textAppearance:$,color:L},k={...ht(nt(h,n))},j={fontSettings:{fontFamily:W,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:M??.01,lineHeight:F,letterSpacing:D??0,wordSpacing:Q??0,textAppearance:re,color:I},ee={...ht(nt(j,n))},te={fontSettings:{fontFamily:ie,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:C??.01,lineHeight:oe,letterSpacing:Pe??0,wordSpacing:ue??0,textAppearance:ye,color:A},pe={...ht(nt(te,n)),...Nr(C,oe,o,n)},Ce=Mr(B,V,`${o}-item-title`,`${o}-text-tight-leading`),he=Mr(M,F,`${o}-item-subtitle`,`${o}-text-tight-leading`),fe=Nr(B,V,o,n),K=Nr(M,F,o,n),G=Mr(C,oe,`${o}-lightbox-counter`,`${o}-text-tight-leading`),z=E.buildColorVars(o,{titleColor:L,subtitleColor:I,lightboxCounterColor:A},ad,sd),Me=`${s&&s!=="default"?`${o}-state-${s}`:""}${Re==="On hover"&&!!r?` ${o}-show-text-hover`:""}`.trim(),ke=v===0?1/0:v,Ie=(t??[]).slice(0,ke),Ue=p.entryWidth??.2,$e=(m==null?void 0:m.display)==="Cover",Ne=(m==null?void 0:m.ratioValue)??"1:1",ze=(m==null?void 0:m.reversed)??!1,[We,qe]=Ne.split(":").map(Number),Jt=`${ze?qe:We} / ${ze?We:qe}`,gt=E.scalingValue(Ue??0,n),At=!$e&&b!=="Off",_t={width:gt,...$e?{aspectRatio:Jt,height:"auto",overflow:"hidden"}:{height:"auto"}},Se=`${o}-item-image-wrapper${At?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),dt=d==="C",rt=dt&&ne==="On",Xe=`calc(${E.scalingValue(Ue??0,n)} * (${T} / 100))`,Rt=E.scalingValue(Ue*T/100,n),vn=$e?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Zt,Qt]=u.useState("ltr"),[Dt,jt]=u.useState(0),ve=u.useRef(null);u.useEffect(()=>{const be=ve.current;if(!be)return;const Z=new ResizeObserver(ae=>{jt(Math.round(ae[0].contentRect.width))});return Z.observe(be),()=>Z.disconnect()},[]),u.useLayoutEffect(()=>{var we;const be=ve.current;if(!be)return;const Z=()=>{be.querySelectorAll("[data-grid-text-block]").forEach(me=>{me.style.minHeight=""})};if(!rt){Z();return}const ae=p.columnsCount,se=()=>{Z();const me=Array.from(be.querySelectorAll(`.${o}-item`));for(let Fe=0;Fe<me.length;Fe+=ae){const et=me.slice(Fe,Fe+ae).map(ot=>ot.querySelector("[data-grid-text-block]")).filter(ot=>ot!==null);if(et.length===0)continue;const Ge=Math.max(...et.map(ot=>ot.offsetHeight));et.forEach(ot=>{ot.style.minHeight=`${Ge}px`})}};se();const xe=new ResizeObserver(()=>se());xe.observe(be);let He=!1;return typeof document<"u"&&((we=document.fonts)!=null&&we.ready)&&document.fonts.ready.then(()=>{He||se()}),()=>{He=!0,xe.disconnect(),Z()}},[o,rt,Ie,p.columnsCount,P,_,Dt]);const je=(()=>{const be={...z},Z=ve.current?getComputedStyle(ve.current).getPropertyValue("--cntrl-article-width").trim():"";return Z&&(be["--cntrl-article-width"]=Z),be})(),[Ve,Ke]=u.useState(!1),[Qe,Er]=u.useState([]),[Dn,bn]=u.useState(0),[Pr,jn]=u.useState(null),zn=(be,Z,ae)=>{if(n&&!r||g==="Off")return;const se=be.currentTarget.getBoundingClientRect();jn({top:se.top,left:se.left,width:se.width,height:se.height}),Er(Z),bn(ae),Ke(!0)};return u.useEffect(()=>{if(!Ve||g!=="On"||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[Ve,g]),u.useEffect(()=>{!n||r||(Ke(!1),jn(null))},[n,r]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:td(o)}}),l.jsx("div",{style:z,children:l.jsx("div",{ref:ve,className:`${o}-wrapper ${o}-type-${d}${rt?` ${o}-align-entries`:""} ${Me}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:E.scalingValue(S??0,n),columnGap:E.scalingValue(p.horizontalGap??0,n),width:E.scalingValue(p.wrapperWidth??0,n)},children:Ie.map((be,Z)=>{var xe,He;const ae=Qi(be.title),se=Qi(be.subtitle);return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:i?`${o}-item-inner`:`${o}-item-inner-hidden`,style:{width:(T??0)>100?`calc(${E.scalingValue(Ue??0,n)} * (${T} / 100))`:E.scalingValue(Ue??0,n)},children:l.jsxs("a",{href:(((xe=be.link)==null?void 0:xe.length)??0)>0&&g==="Off"?be.link:void 0,target:"_blank",className:`${o}-item-image-link`,children:[dt&&l.jsxs("div",{className:`${o}-item-text-block`,"data-grid-text-block":!0,children:[ae&&l.jsx("p",{className:Ce,style:{width:Xe,...k,...fe},children:be.title}),ae&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:E.scalingValue(P??0,n),width:Rt}}),se&&l.jsx("p",{className:he,style:{width:Xe,...ee,...K},children:be.subtitle}),se&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:E.scalingValue(_??0,n),width:Rt}})]}),l.jsx("div",{className:Se,style:_t,children:(((He=be.image)==null?void 0:He.length)??0)===0?null:b==="Off"?(()=>{const we=be.image[0],Fe=be.image.filter(De=>!Wt(De)).map(De=>De.url);return l.jsx(eo,{media:we,className:`${o}-item-${Wt(we)?"video":"image"}`.trim(),style:vn,onImageClick:Wt(we)?void 0:De=>zn(De,Fe,0)})})():l.jsxs(l.Fragment,{children:[At&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:be.image.map(we=>Wt(we)?l.jsx("video",{src:we.url,muted:!0,playsInline:!0},`sizer-${we.url}`):l.jsx("img",{src:we.url,alt:""},`sizer-${we.url}`))}),l.jsx(vi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:x*1e3,width:"100%",height:"100%",speed:nd,type:O==="Fade"?"fade":"loop",rewind:O==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:O==="Fade"?"ltr":y!=="Random"?y==="Horizontal"?"ltr":"ttb":Zt},onMoved:we=>{if(y!=="Random"||O==="Fade")return;const me=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Qt(me),setTimeout(()=>{we.refresh()},0)},children:be.image.map((we,me)=>{const Fe=be.image.filter(Ge=>!Wt(Ge)),De=Fe.map(Ge=>Ge.url),et=Fe.findIndex(Ge=>Ge.url===we.url);return l.jsx(bi,{children:l.jsx(eo,{media:we,className:`${o}-item-${Wt(we)?"video":"image"}`.trim(),style:vn,onImageClick:Wt(we)?void 0:Ge=>zn(Ge,De,et)})},me)})},`${O}-${Ue}-${y}-${x}-${Dt}-${c}`)]})}),!dt&&l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&ae?"titleMarginTop":void 0,className:i&&ae?`${o}-control`:void 0,style:{height:ae?E.scalingValue(P??0,n):0,width:Rt}}),l.jsx("p",{className:Ce,style:{width:Xe,...k,...fe},children:be.title}),l.jsx("div",{"data-controls":i&&se?"subtitleMarginTop":void 0,className:i&&se?`${o}-control`:void 0,style:{height:se?E.scalingValue(_??0,n):0,width:Rt}}),l.jsx("p",{className:he,style:{width:Xe,...ee,...K},children:be.subtitle})]})]})})},Z)})})}),(!n||r)&&Ve&&typeof document<"u"&&g==="On"&&go.createPortal(l.jsx("div",{style:je,"data-selection":"none",children:l.jsx(rd,{images:Qe,index:Dn,imageDisplay:id(R),originRect:Pr,reverseClose:b==="Off",onClose:()=>Ke(!1),onPrev:()=>bn(be=>(be-1+Qe.length)%Qe.length),onNext:()=>bn(be=>(be+1)%Qe.length),counterClassName:G,counterStyle:pe})}),document.body)]})}const ad={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},sd=["hover","focus","filled","success","error"],ld=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3814
+ `}const xt=500,nd=750,It="cubic-bezier(0.22, 1, 0.36, 1)";function Wt(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function eo({media:e,className:t,style:n,onImageClick:r}){return Wt(e)?l.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):l.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:r})}function rd({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:s,onNext:c,counterClassName:o,counterStyle:d}){const p=n==="Cover",T=u.useRef(null),S=u.useRef(null),[v,g]=u.useState(null),[m,R]=u.useState(r?"opening":"open"),[b,x]=u.useState(!0),y=u.useRef(t),O=u.useCallback(()=>{const N=T.current,w=S.current;if(!N||!w)return;const B=N.getBoundingClientRect(),V=B.width,q=B.height,Y=w.naturalWidth,$=w.naturalHeight;if(!V||!q||!Y||!$)return;if(n==="Cover"){g({width:V,height:q,left:B.left,top:B.top});return}const W=Y/$,H=V/q;if(W>H){const M=V/W;g({width:V,height:M,left:B.left,top:B.top+(q-M)/2})}else{const M=q*W;g({width:M,height:q,left:B.left+(V-M)/2,top:B.top})}},[n]);u.useEffect(()=>{O();const N=T.current;if(!N)return;const w=new ResizeObserver(()=>O());return w.observe(N),()=>w.disconnect()},[O,t]),u.useEffect(()=>{if(m!=="opening"||!v)return;const N={id:0};return N.id=requestAnimationFrame(()=>{N.id=requestAnimationFrame(()=>R("open"))}),()=>cancelAnimationFrame(N.id)},[m,v]),u.useEffect(()=>{if(m!=="closing")return;const N=setTimeout(()=>a(),xt);return()=>clearTimeout(N)},[m,a]),u.useEffect(()=>{y.current!==t&&x(!1),y.current=t},[t]),u.useEffect(()=>{const N=w=>{w.key==="Escape"&&(w.preventDefault(),w.stopPropagation(),m!=="closing"&&R("closing"))};return window.addEventListener("keydown",N,!0),()=>window.removeEventListener("keydown",N,!0)},[m]);const P=()=>{m!=="closing"&&R("closing")},A=m==="open",L=m==="closing",I=L&&i&&!!r,_=m==="opening"?r??v:I?r:v;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:P,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:A?1:0,transition:`opacity ${xt}ms ${It}`,pointerEvents:"none"}}),l.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:T,style:{position:"absolute",inset:0}}),l.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:A?1:0,transition:`opacity ${xt}ms ${It}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:T,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:A?1:0,transition:`opacity ${xt}ms ${It}`},children:e.length>1&&l.jsxs("p",{className:o,style:d,children:[t+1," / ",e.length]})})]})}),_&&l.jsx("img",{ref:S,src:e[t],onLoad:O,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:L&&!I?0:1,transition:L&&!I?`opacity ${xt}ms ${It}`:I||b?`top ${xt}ms ${It}, left ${xt}ms ${It}, width ${xt}ms ${It}, height ${xt}ms ${It}`:"none",pointerEvents:"none",zIndex:9998}}),A&&v&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:N=>{N.stopPropagation(),s()}}),l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:N=>{N.stopPropagation(),c()}})]})]})}function id(e){return typeof e=="string"?e==="Cover"?"Cover":"Fit":(e==null?void 0:e.display)==="Cover"?"Cover":"Fit"}function od({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:s,layoutId:c}){const{prefix:o}=E.useScopedStyles(),{type:d="A",gridLayout:p,textBoxWidth:T,verticalGap:S,entriesCount:v,lightbox:g,imageDisplay:m,lightboxImageDisplay:R,slider:b,sliderTiming:x,direction:y,transition:O,titleMarginTop:P,subtitleMarginTop:A,titleColor:L,subtitleColor:I,lightboxCounterColor:_,titleFontFamily:N,titleFontSettings:w,titleFontSize:B,titleLineHeight:V,titleLetterSpacing:q,titleWordSpacing:Y,titleTextAppearance:$,subtitleFontFamily:W,subtitleFontSettings:H,subtitleFontSize:M,subtitleLineHeight:k,subtitleLetterSpacing:D,subtitleWordSpacing:Q,subtitleTextAppearance:re,lightboxCounterFontFamily:ie,lightboxCounterFontSettings:ce,lightboxCounterFontSize:C,lightboxCounterLineHeight:oe,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:ue,lightboxCounterTextAppearance:ye,showText:Re="Always",alignEntries:ne="Off"}=e,h={fontSettings:{fontFamily:N,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:B??.01,lineHeight:V,letterSpacing:q??0,wordSpacing:Y??0,textAppearance:$,color:L},F={...ht(nt(h,n))},z={fontSettings:{fontFamily:W,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:M??.01,lineHeight:k,letterSpacing:D??0,wordSpacing:Q??0,textAppearance:re,color:I},ee={...ht(nt(z,n))},te={fontSettings:{fontFamily:ie,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:C??.01,lineHeight:oe,letterSpacing:Pe??0,wordSpacing:ue??0,textAppearance:ye,color:_},pe={...ht(nt(te,n)),...Nr(C,oe,o,n)},Ce=Mr(B,V,`${o}-item-title`,`${o}-text-tight-leading`),he=Mr(M,k,`${o}-item-subtitle`,`${o}-text-tight-leading`),fe=Nr(B,V,o,n),K=Nr(M,k,o,n),U=Mr(C,oe,`${o}-lightbox-counter`,`${o}-text-tight-leading`),j=E.buildColorVars(o,{titleColor:L,subtitleColor:I,lightboxCounterColor:_},ad,sd),Me=`${s&&s!=="default"?`${o}-state-${s}`:""}${Re==="On hover"&&!!r?` ${o}-show-text-hover`:""}`.trim(),Fe=v===0?1/0:v,Ie=(t??[]).slice(0,Fe),qe=p.entryWidth??.2,$e=(m==null?void 0:m.display)==="Cover",Ne=(m==null?void 0:m.ratioValue)??"1:1",je=(m==null?void 0:m.reversed)??!1,[We,Ge]=Ne.split(":").map(Number),Zt=`${je?Ge:We} / ${je?We:Ge}`,gt=E.scalingValue(qe??0,n),_t=!$e&&b!=="Off",At={width:gt,...$e?{aspectRatio:Zt,height:"auto",overflow:"hidden"}:{height:"auto"}},Se=`${o}-item-image-wrapper${_t?` ${o}-item-image-wrapper-fit-slider`:""}`.trim(),dt=d==="C",rt=dt&&ne==="On",Xe=`calc(${E.scalingValue(qe??0,n)} * (${T} / 100))`,Rt=E.scalingValue(qe*T/100,n),vn=$e?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Jt,Qt]=u.useState("ltr"),[Dt,zt]=u.useState(0),ve=u.useRef(null);u.useEffect(()=>{const be=ve.current;if(!be)return;const J=new ResizeObserver(ae=>{zt(Math.round(ae[0].contentRect.width))});return J.observe(be),()=>J.disconnect()},[]),u.useLayoutEffect(()=>{var we;const be=ve.current;if(!be)return;const J=()=>{be.querySelectorAll("[data-grid-text-block]").forEach(me=>{me.style.minHeight=""})};if(!rt){J();return}const ae=p.columnsCount,se=()=>{J();const me=Array.from(be.querySelectorAll(`.${o}-item`));for(let ke=0;ke<me.length;ke+=ae){const et=me.slice(ke,ke+ae).map(ot=>ot.querySelector("[data-grid-text-block]")).filter(ot=>ot!==null);if(et.length===0)continue;const Ue=Math.max(...et.map(ot=>ot.offsetHeight));et.forEach(ot=>{ot.style.minHeight=`${Ue}px`})}};se();const xe=new ResizeObserver(()=>se());xe.observe(be);let He=!1;return typeof document<"u"&&((we=document.fonts)!=null&&we.ready)&&document.fonts.ready.then(()=>{He||se()}),()=>{He=!0,xe.disconnect(),J()}},[o,rt,Ie,p.columnsCount,P,A,Dt]);const ze=(()=>{const be={...j},J=ve.current?getComputedStyle(ve.current).getPropertyValue("--cntrl-article-width").trim():"";return J&&(be["--cntrl-article-width"]=J),be})(),[Ve,Ke]=u.useState(!1),[Qe,Er]=u.useState([]),[Dn,bn]=u.useState(0),[Pr,zn]=u.useState(null),jn=(be,J,ae)=>{if(n&&!r||g==="Off")return;const se=be.currentTarget.getBoundingClientRect();zn({top:se.top,left:se.left,width:se.width,height:se.height}),Er(J),bn(ae),Ke(!0)};return u.useEffect(()=>{if(!Ve||g!=="On"||typeof document>"u")return;const be=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=be}},[Ve,g]),u.useEffect(()=>{!n||r||(Ke(!1),zn(null))},[n,r]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:td(o)}}),l.jsx("div",{style:j,children:l.jsx("div",{ref:ve,className:`${o}-wrapper ${o}-type-${d}${rt?` ${o}-align-entries`:""} ${Me}`.trim(),style:{gridTemplateColumns:`repeat(${p.columnsCount}, minmax(0, 1fr))`,rowGap:E.scalingValue(S??0,n),columnGap:E.scalingValue(p.horizontalGap??0,n),width:E.scalingValue(p.wrapperWidth??0,n)},children:Ie.map((be,J)=>{var xe,He;const ae=Qi(be.title),se=Qi(be.subtitle);return l.jsx("div",{className:`${o}-item`.trim(),children:l.jsx("div",{className:i?`${o}-item-inner`:`${o}-item-inner-hidden`,style:{width:(T??0)>100?`calc(${E.scalingValue(qe??0,n)} * (${T} / 100))`:E.scalingValue(qe??0,n)},children:l.jsxs("a",{href:(((xe=be.link)==null?void 0:xe.length)??0)>0&&g==="Off"?be.link:void 0,target:"_blank",className:`${o}-item-image-link`,children:[dt&&l.jsxs("div",{className:`${o}-item-text-block`,"data-grid-text-block":!0,children:[ae&&l.jsx("p",{className:Ce,style:{width:Xe,...F,...fe},children:be.title}),ae&&l.jsx("div",{"data-controls":i?"titleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:E.scalingValue(P??0,n),width:Rt}}),se&&l.jsx("p",{className:he,style:{width:Xe,...ee,...K},children:be.subtitle}),se&&l.jsx("div",{"data-controls":i?"subtitleMarginTop":void 0,className:i?`${o}-control`:void 0,style:{height:E.scalingValue(A??0,n),width:Rt}})]}),l.jsx("div",{className:Se,style:At,children:(((He=be.image)==null?void 0:He.length)??0)===0?null:b==="Off"?(()=>{const we=be.image[0],ke=be.image.filter(De=>!Wt(De)).map(De=>De.url);return l.jsx(eo,{media:we,className:`${o}-item-${Wt(we)?"video":"image"}`.trim(),style:vn,onImageClick:Wt(we)?void 0:De=>jn(De,ke,0)})})():l.jsxs(l.Fragment,{children:[_t&&l.jsx("div",{className:`${o}-item-image-wrapper-sizer`,"aria-hidden":"true",children:be.image.map(we=>Wt(we)?l.jsx("video",{src:we.url,muted:!0,playsInline:!0},`sizer-${we.url}`):l.jsx("img",{src:we.url,alt:""},`sizer-${we.url}`))}),l.jsx(vi,{className:`${o}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:x*1e3,width:"100%",height:"100%",speed:nd,type:O==="Fade"?"fade":"loop",rewind:O==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:O==="Fade"?"ltr":y!=="Random"?y==="Horizontal"?"ltr":"ttb":Jt},onMoved:we=>{if(y!=="Random"||O==="Fade")return;const me=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Qt(me),setTimeout(()=>{we.refresh()},0)},children:be.image.map((we,me)=>{const ke=be.image.filter(Ue=>!Wt(Ue)),De=ke.map(Ue=>Ue.url),et=ke.findIndex(Ue=>Ue.url===we.url);return l.jsx(bi,{children:l.jsx(eo,{media:we,className:`${o}-item-${Wt(we)?"video":"image"}`.trim(),style:vn,onImageClick:Wt(we)?void 0:Ue=>jn(Ue,De,et)})},me)})},`${O}-${qe}-${y}-${x}-${Dt}-${c}`)]})}),!dt&&l.jsxs(l.Fragment,{children:[l.jsx("div",{"data-controls":i&&ae?"titleMarginTop":void 0,className:i&&ae?`${o}-control`:void 0,style:{height:ae?E.scalingValue(P??0,n):0,width:Rt}}),l.jsx("p",{className:Ce,style:{width:Xe,...F,...fe},children:be.title}),l.jsx("div",{"data-controls":i&&se?"subtitleMarginTop":void 0,className:i&&se?`${o}-control`:void 0,style:{height:se?E.scalingValue(A??0,n):0,width:Rt}}),l.jsx("p",{className:he,style:{width:Xe,...ee,...K},children:be.subtitle})]})]})})},J)})})}),(!n||r)&&Ve&&typeof document<"u"&&g==="On"&&go.createPortal(l.jsx("div",{style:ze,"data-selection":"none",children:l.jsx(rd,{images:Qe,index:Dn,imageDisplay:id(R),originRect:Pr,reverseClose:b==="Off",onClose:()=>Ke(!1),onPrev:()=>bn(be=>(be-1+Qe.length)%Qe.length),onNext:()=>bn(be=>(be+1)%Qe.length),counterClassName:U,counterStyle:pe})}),document.body)]})}const ad={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},sd=["hover","focus","filled","success","error"],ld=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3815
3815
  import '@splidejs/react-splide/css/core';
3816
3816
  import { CommonComponentProps } from '../props';
3817
3817
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -4931,7 +4931,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
4931
4931
  };
4932
4932
 
4933
4933
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
4934
- `,Hr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},cd=["titleColor","subtitleColor","lightboxCounterColor"],dd={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:"BIRD'S EYE VIEW OVER THE OLD TOWN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMT6MP4CXE4D8M7F07N.jpeg",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"DOORS OF MATERA",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMTTK8C047Y4HVS0Y47.jpeg",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMT6W6J7F3PMQMGQAW5.jpeg",name:"Grid-3.png",objectFit:"cover"}],link:""},{title:"OLD CITY THROUGH THE CRACKS",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMT05YW60A4ZJSQFXMH.jpeg",name:"Grid-4.png",objectFit:"cover"}],link:""},{title:"PRIVATE STONE GARDENS",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMTXRHFWCZ0ENQCCQB8.jpeg",name:"Grid-5.png",objectFit:"cover"},{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMTH9CN4VJ64RCDBR5Y.jpeg",name:"Grid-6.png",objectFit:"cover"},{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMT38ZBD3E1CF9Q95V9.jpeg",name:"Grid-7.png",objectFit:"cover"}],link:""},{title:"EXITING THE OLD TOWN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMTA4P1VVZ4NW8GFX2N.jpeg",name:"Grid-8.png",objectFit:"cover"}],link:""},{title:"LAUNDRY UNDER THE SUN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMT8CC7M3EH3M86DSGD.jpeg",name:"Grid-9.png",objectFit:"cover"}],link:""},{title:"CITY GATES VIEW",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMTE1564HYYJH5GGVGY.jpeg",name:"Grid-10.png",objectFit:"cover"}],link:""},{title:"FORTIFICATIONS AROUND THE CITY",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KVDNXFMTE3YZYKJJPEAZWAD2.jpeg",name:"Grid-11.png",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 Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Hr.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:{...Hr.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:{...Hr.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:"Affigere-Regular",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:"C",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:"C",gridLayout:{entryWidth:.1736,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:100,verticalGap:.0694,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:55e-5,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"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:[{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:[{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:[...cd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},ud={element:od,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:dd,sourceCode:ld};function ir(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pd(e){return String(e??"").trim().length>0}function to(e,t,n,r,i,a,s){const c=E.scalingValue(a,s),o=E.scalingValue(0,s),d=e===0,p=e===t-1&&!i;return{borderTopWidth:d&&n?c:o,borderBottomWidth:!p||r?c:o}}function md(e,t,n){const r=E.scalingValue(t,n),i=E.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const no=10;function gd(e){return`
4934
+ `,Hr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},cd=["titleColor","subtitleColor","lightboxCounterColor"],dd={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:"BIRD'S EYE VIEW OVER THE OLD TOWN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",name:"Grid-1.png",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",name:"Grid-2.png",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",name:"Grid-3.png",objectFit:"cover"}],link:""},{title:"OLD CITY THROUGH THE CRACKS",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",name:"Grid-4.png",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",name:"Grid-5.png",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",name:"Grid-6.png",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",name:"Grid-7.png",objectFit:"cover"}],link:""},{title:"EXITING THE OLD TOWN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",name:"Grid-8.png",objectFit:"cover"}],link:""},{title:"LAUNDRY UNDER THE SUN",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",name:"Grid-9.png",objectFit:"cover"}],link:""},{title:"CITY GATES VIEW",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",name:"Grid-10.png",objectFit:"cover"}],link:""},{title:"FORTIFICATIONS AROUND THE CITY",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",name:"Grid-11.png",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 Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Hr.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:{...Hr.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:{...Hr.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:"Affigere-Regular",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:"C",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:"C",gridLayout:{entryWidth:.1736,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:100,verticalGap:.0694,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:55e-5,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"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:[{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:[{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:[...cd],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},ud={element:od,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:dd,sourceCode:ld};function ir(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pd(e){return String(e??"").trim().length>0}function to(e,t,n,r,i,a,s){const c=E.scalingValue(a,s),o=E.scalingValue(0,s),d=e===0,p=e===t-1&&!i;return{borderTopWidth:d&&n?c:o,borderBottomWidth:!p||r?c:o}}function md(e,t,n){const r=E.scalingValue(t,n),i=E.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const no=10;function gd(e){return`
4935
4935
  .${e}-wrapper {
4936
4936
  display: grid;
4937
4937
  align-items: start;
@@ -5302,7 +5302,7 @@ a.${e}-list-item {
5302
5302
  overflow-wrap: anywhere;
5303
5303
  word-break: break-word;
5304
5304
  }
5305
- `}const Ht=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],xi=["AColumn","BColumn","CColumn","DColumn","EColumn"],Lt="cutLabel",Ci=[...xi,Lt],Lr=["A","B","C","D","E"];function Zo(e){return`${e}ColumnVerticalAlign`}const Jr=["Top","Center","Bottom"];function Si(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Lr.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=Si(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function fd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Lr.includes(n)?n:null}function Qo(e,t,n){const r=fd(e);return r?r===t?!1:hd(n[Zo(r)]):!0}function Rn(e){const t=Si(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Lr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function yd(e,t,n){if(ea(e,t,n))return Rn(e);const r=Rn(e);return r.kind==="baseline"?{kind:"top"}:r}function vd(e){const t=Rn(e);return t.kind==="baseline"?{kind:"top"}:t}function ea(e,t,n){return Qo(e,n,t)?Rn(e).kind==="baseline":!1}function bd(e){const t={};let n=!1;for(const r of Lr){const i=Zo(r),a=e[i];if(e.type==="B"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}Qo(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function xd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Cd(e){const t=Rn(e).kind;return t==="baseline"?"center":t}function Sd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ro(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function wd(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(),a=i-r;return n.remove(),a}function Or(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=wd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-o)/2:e.kind==="bottom"&&(d=c.height-o),c.top-t+d+s}function $d(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),e.offsetHeight,r)}function Td(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Ld={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Te(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Ed={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Pd(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),{type:"row",items:[Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing")]},Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function Ad(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ci.map(e=>[Ed[e],Pd(e)]))}}function mr(e,t){const n=r=>{const i=Te(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===Lt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function io(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 ht(nt(n,t))}function oo(e,t,n,r){const i=mr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ao(e,t,n,r){const i=mr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((a-s)/2,r)}}const lt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],un=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],pn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],mn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],_d={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Rd=["hover","focus","filled","success","error"],so=.004,rn=.004,Br=rn,lo=12,wi=50,In=1440,Wn=wi/In;function ta(e){const t=typeof e=="number"&&e>0?e:In;return wi/t}function Id(e,t){const n={position:"absolute",width:lo,height:lo,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 Ct({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Id(e,r)})})}function Wd(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 In}const na={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function or(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Fd(e,t=1){const n=t/e;return Object.fromEntries(lt.map(r=>[r,n]))}function kd(){return Object.fromEntries([...un.map(e=>[e,0]),...pn.map(e=>[e,0])])}function Md(){return Object.fromEntries(mn.map(e=>[e,0]))}function Zn(e){return Object.fromEntries(lt.map(t=>[t,typeof e[t]=="number"?e[t]:na[t]]))}function ra(e,t,n){const r=e-Wn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ar(e,t,n){const r=$i(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Nd(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=un[i],s=pn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,d=ra(t[i]??0,c,o);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==o&&(r[s]=d.paddingRight)}return r}function $i(e,t,n){if(e<=0)return[];const r=lt.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((d,p)=>d+p,0)+Wn;if(t>=s)return r;const c=[...i];let o=s-t;for(let d=c.length-1;d>=0&&o>0;d-=1){const p=c[d]-Wn;if(p<=0)continue;const T=Math.min(o,p);c[d]-=T,o-=T}return[...c,r[e-1]]}function Hd(e,t,n){if(e<=1)return{};const r=$i(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=lt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function co(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ht]}function Od(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Bd(e,t,n,r){const i=Math.min(r,e.length,lt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const d=lt[o],p=un[o],T=pn[o],S=mn[o],v=lt[s],g=un[s],m=pn[s],R=mn[s],b=n[d],x=n[p],y=n[T],O=n[S];typeof b=="number"&&(a[v]=b),typeof x=="number"&&(a[g]=x),typeof y=="number"&&(a[m]=y),typeof O=="number"&&(a[R]=O)}return a}function Vd(e,t,n){const r=bd(e);r&&(e={...e,...r});const i=ta(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=or(e),o=or(t),d=e.type==="B"||e.type===void 0&&t.type==="B",p=typeof a=="number"?a:typeof s=="number"?s:Ht.length,T=y=>{if(d)return y;const O=Zn({...t,...y}),P=or(y),_=ar(p,P,O),L=Nd(p,_,{...t,...y});return Object.keys(L).length===0?y:{...y,...L}};if(typeof a=="number"&&a!==s){const y={...e,...Fd(a,c),...kd()};if(d)for(const O of mn)typeof t[O]=="number"&&(y[O]=t[O]);else Object.assign(y,Md());return y}const S=co(e),v=co(t);if(!Od(S,v))return T({...e,...Bd(S,v,t,p)});if(c<o&&typeof p=="number"&&!d){const y=Zn({...t,...e});return T({...e,...Hd(p,c,y)})}if(d){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,O=Math.max(0,(c-i)/2);return y>O?{...e,textPaddingLR:O}:e}const g=Zn({...t,...e}),m=ar(p,o,Zn(t)),b=ar(p,c,g).some((y,O)=>y<(m[O]??y)),x=lt.some(y=>{const O=e[y],P=t[y];return typeof O=="number"&&typeof P=="number"&&O!==P});return b||x?T(e):e}function Dd(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(Wn,r-i-a-Wn)}function jd(e,t){return Math.random()*(t-e)+e}function zd(e){return Object.fromEntries(lt.map(t=>[t,typeof e[t]=="number"?e[t]:na[t]]))}function Vr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Kd(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=un[c],d=pn[c],p=mn[c];return{key:s,textPrefix:Ld[s],widthKey:lt[c],width:n[lt[c]],paddingLeftKey:o,paddingRightKey:d,paddingBottomKey:p,paddingLeft:r[o],paddingRight:i[d],paddingBottom:a[p]}})}function Gd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=E.useScopedStyles(),d=!!i,{columns:p,type:T,wrapperWidth:S,entriesCount:v,cellMinHeight:g,dividerWidth:m,showVisibility:R,cut:b,showCut:x,cutCellMinHeight:y,cutLabel:O,imageSize:P,imageOnHover:_,entryHoverEffect:L,entryHoverShowOption:I,rowPaddingTop:A,rowPaddingBottom:N,rowPaddingTopB:w,columnsOrder:B,textPaddingLR:V,textColor:U,backgroundColor:Y,dividerColor:$,textHoverColor:W,backgroundHoverColor:H,dividerHoverColor:M}=e,[F,D]=u.useState(void 0),[Q,re]=u.useState(null),ie=_==="On"&&(!n||r),ce=(b??0)>0,C=T==="B",oe=u.useRef(null),Pe=u.useRef(null),[ue,ye]=u.useState(null),[Re,ne]=u.useState(In),h=ta(Re),f=Math.max(0,((S??0)-h)/2),k=Math.min(V??0,f),j=Math.max(k,rn),q=((S??0)+h)/2;u.useLayoutEffect(()=>{if(!n){ne(In);return}const Z=()=>{ne(Wd(oe.current))};Z();const ae=oe.current;if(!ae)return;const se=new ResizeObserver(Z);se.observe(ae);let xe=ae;for(;xe&&!xe.style.getPropertyValue("--cntrl-article-width");)xe=xe.parentElement;return xe&&se.observe(xe),()=>se.disconnect()},[n,s]),u.useEffect(()=>{D(void 0)},[b,x,t,v]),u.useEffect(()=>{n&&!r&&D(void 0)},[n,r]);const ee=E.buildColorVars(o,{textColor:U,backgroundColor:Y,dividerColor:$,textHoverColor:W,backgroundHoverColor:H,dividerHoverColor:M},_d,Rd),te=a&&a!=="default"?`${o}-state-${a}`:"",pe=`${!n||r?L==="Default"?`${o}-entry-hover-default`:L==="Blinds"?`${o}-entry-hover-blinds`:"":""} ${te}`.trim(),Ce=(R==null?void 0:R[0])??!1,he=(R==null?void 0:R[1])??!1,fe=u.useRef(e),K=u.useRef(s);u.useEffect(()=>{if(!c||!n){fe.current=e,K.current=s;return}if(K.current!==s){fe.current=e,K.current=s;return}const Z=fe.current;if(!(Z!==e))return;const se=Vd(e,Z,{designWidth:Re});fe.current=e,se!==e&&c(se)},[e,c,n,s,Re]);const G=u.useMemo(()=>zd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),z=u.useMemo(()=>Vr(e,un),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=u.useMemo(()=>Vr(e,pn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Le=u.useMemo(()=>Vr(e,mn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Me=u.useMemo(()=>Array.isArray(B)&&B.length>0?B:[...Ht],[B]),ke=u.useMemo(()=>Kd(Me,p,G,z,de,Le),[Me,p,G,z,de,Le]),Ie=or(e),Ue=u.useMemo(()=>lt.slice(0,p).map(Z=>G[Z]),[p,G]),$e=u.useMemo(()=>$i(p,Ie,G),[p,Ie,G]),Ne=u.useMemo(()=>ar(p,Ie,G),[p,Ie,G]),ze=u.useMemo(()=>ke.map((Z,ae)=>ra(Ne[ae]??0,Z.paddingLeft,Z.paddingRight)),[ke,Ne]),We=u.useMemo(()=>{const Z=v===0?1/0:v;return(t??[]).slice(0,Z).map((se,xe)=>({id:xe,cells:Object.fromEntries(Ht.map(He=>[He,se[He]??""])),image:se.image,link:se.link}))},[t,v]),qe=ce?F??b:We.length,Ye=u.useMemo(()=>ce?We.slice(0,qe):We,[We,ce,qe]),bt=ce&&qe<We.length,Jt=Ye.length>1||bt,gt=[Ce?`${o}-divider-top`:"",he||Jt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),At=!n||r,_t=()=>{if(!At)return;const Z=F??b;if(!x){D(We.length);return}D(Math.min(Z+x,We.length))},Se=Z=>E.scalingValue(Z,n??!1),dt=C?w??0:A??0,rt=N??0,Xe=g??0,Rt=dt+Xe/2,vn=Math.max(rt,Br),Zt=to(0,Ye.length,Ce,he,bt,m??0,n??!1).borderTopWidth,Qt=ue!=null?`${ue}px`:`calc(${Zt} + ${Se(Rt)})`,Dt=C?"rowPaddingTopB":"rowPaddingTop",jt=ke[0],ve=ke[ke.length-1],je=ze[0],Ve=ze[ze.length-1],Ke=jt&&je?Math.max(je.paddingLeft,rn):0,Qe=ve&&Ve?Math.max(Ve.paddingRight,rn):0,Er=Ie,Dn=Z=>{const ae=oe.current;if(!ae)return{x:0,y:0};const se=ae.getBoundingClientRect();return{x:Z.clientX-se.left+no,y:Z.clientY-se.top+no}},bn=(Z,ae)=>{if(!ie)return;const se=Z.image;if(!(se!=null&&se.url)){re(null);return}const{x:xe,y:He}=Dn(ae),we=(P==null?void 0:P.min)??80,me=(P==null?void 0:P.max)??320,Fe=(Q==null?void 0:Q.rowId)===Z.id?Q.widthPx:jd(we,me);re({rowId:Z.id,url:se.url,objectFit:se.objectFit??"cover",widthPx:Fe,x:xe,y:He})},Pr=Z=>{if(!ie||!Q)return;const{x:ae,y:se}=Dn(Z);re(xe=>!xe||xe.x===ae&&xe.y===se?xe:{...xe,x:ae,y:se})},jn=()=>{re(null)},zn=()=>{ie&&re(null)};u.useLayoutEffect(()=>{if(!d||C){ye(null);return}const Z=Pe.current,ae=Z==null?void 0:Z.parentElement;if(!Z||!ae){ye(null);return}const se=()=>{const He=Z.querySelector("[data-list-row]");if(!He){ye(null);return}const we=ae.getBoundingClientRect(),me=He.getBoundingClientRect();ye(me.top-we.top+me.height/2)};se();const xe=new ResizeObserver(se);return xe.observe(Z),xe.observe(ae),()=>xe.disconnect()},[d,C,Ye,dt,rt,Xe,t,e,ke,Ne,Re,m,Ce,he,bt]);const be=u.useMemo(()=>!C&&xi.some(Z=>{const ae=Z.charAt(0),se=e[`${Z}VerticalAlign`];return ea(se,e,ae)}),[C,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return u.useLayoutEffect(()=>{var we;const Z=oe.current;if(!Z)return;const ae=()=>{Z.querySelectorAll("[data-list-col]").forEach(me=>{me.style.transform="";const Fe=me.querySelector(`.${o}-list-col`);Fe&&(Fe.style.minHeight="",Fe.style.height="");const De=me.querySelector(`.${o}-list-col-title`);De&&(De.style.transform="")})};if(C||!be){ae();return}const se=()=>{Z.querySelectorAll("[data-list-row]").forEach(me=>{const Fe=Array.from(me.querySelectorAll("[data-list-col]"));Fe.forEach(Ae=>{Ae.style.transform="";const it=Ae.querySelector(`.${o}-list-col`);it&&(it.style.minHeight="",it.style.height="");const Je=Ae.querySelector(`.${o}-list-col-title`);Je&&(Je.style.transform="")}),$d(me,Fe,`${o}-list-col`),me.offsetHeight;const De=me.getBoundingClientRect().top,et=`${o}-baseline-probe`,Ge=new Map,ot=Fe.map(Ae=>{const it=Ae.querySelector(`.${o}-list-col-title`),Je={el:Ae,titleEl:it,letter:Ae.getAttribute("data-col-letter")??"",kind:Ae.getAttribute("data-valign")??"top",anchor:Ae.getAttribute("data-valign-anchor")};return Ge.set(Je.letter,Je),Je}),xn=new Map,Kn=(Ae,it)=>{const Je=xn.get(Ae.letter);if(Je!==void 0)return Je;const Gn=Ae.anchor?Ge.get(Ae.anchor):void 0;if(Ae.kind!=="baseline"||!Gn||it.has(Ae.letter)){const Li=Or(Ae,De,`${o}-list-col`,et);return xn.set(Ae.letter,Li),Li}it.add(Ae.letter);const oa=Kn(Gn,it);it.delete(Ae.letter);const aa=Or(Ae,De,`${o}-list-col`,et),sa=oa-aa;Td(Ae.titleEl,sa);const Ti=Or(Ae,De,`${o}-list-col`,et);return xn.set(Ae.letter,Ti),Ti};ot.forEach(Ae=>Kn(Ae,new Set))})};se();const xe=new ResizeObserver(()=>se());xe.observe(Z);let He=!1;return typeof document<"u"&&((we=document.fonts)!=null&&we.ready)&&document.fonts.ready.then(()=>{He||se()}),()=>{He=!0,xe.disconnect(),ae()}},[be,C,e,t,Re,Ye,Ne]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:gd(o)}}),l.jsx("div",{style:ee,children:l.jsxs("div",{ref:oe,className:`${o}-wrapper ${pe}${gt?` ${gt}`:""}${C?` ${o}-type-b`:""}`.trim(),style:{width:E.scalingValue(S??0,n),...!C&&d?{[`--${o}-first-entry-handle-top`]:Qt}:{}},onMouseMove:ie?Pr:void 0,onMouseLeave:ie?jn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ye.map((Z,ae)=>{var we;const se=(((we=Z.link)==null?void 0:we.length)??0)>0,xe=se&&r?"a":"div",He=to(ae,Ye.length,Ce,he,bt,m??0,n??!1);return l.jsxs(xe,{ref:ae===0?me=>{Pe.current=me}:void 0,className:`${o}-list-item${se||I==="Always"?` ${o}-list-item-has-link`:""}`,...se?{href:Z.link,target:"_blank"}:{},style:He,onMouseEnter:ie?me=>bn(Z,me):void 0,children:[dt>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(dt)}}),l.jsxs("div",{className:`${o}-list-cols-row${C?"":` ${o}-list-cols-row-h`}${d&&ae===0&&C?` ${o}-list-cols-row-controls`:""}`,...C?{}:{"data-list-row":""},style:C?void 0:{minHeight:Se(Xe)},children:[ke.map((me,Fe)=>{const De=Fe===ke.length-1,et=ze[Fe],Ge=me.paddingBottom,ot=pd(Z.cells[me.key]),xn=C&&ot&&Ge>0,Kn=C?{minHeight:Se(Xe)}:{width:Se(Ne[Fe])},Ae=C?{paddingLeft:Se(k),paddingRight:Se(k)}:{paddingLeft:Se(et.paddingLeft),paddingRight:Se(et.paddingRight)},it=me.textPrefix.charAt(0),Je=C?vd(e[`${me.textPrefix}VerticalAlign`]):yd(e[`${me.textPrefix}VerticalAlign`],e,it),Gn=C&&ot&&d&&ae===0;return l.jsxs("div",{className:C?`${o}-list-col-wrap`:void 0,...C?{}:{"data-list-col":"","data-col-letter":it,"data-valign":Je.kind,...Je.kind==="baseline"?{"data-valign-anchor":Je.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${De?` ${o}-list-col-last`:""}`,style:{...Ae,...Kn,...C?{justifyContent:ro(Je.kind)}:{}},"data-test":me.width,children:l.jsx("span",{className:oo(e,me.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...io(mr(e,me.textPrefix),n),...ao(e,me.textPrefix,o,n),...C?{}:xd(Je.kind)},children:Z.cells[me.key]??null})}),xn&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(Ge)}}),Gn&&l.jsx(Ct,{P:o,"data-controls":me.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(Math.max(Ge,Br))}})]},me.key)}),d&&ae===0&&C&&l.jsxs(l.Fragment,{children:[l.jsx(Ct,{P:o,"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(q),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Se(j),height:"100%"}}),l.jsx(Ct,{P:o,"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(q),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Se(Math.max(j,Ie-j)),width:Se(j),height:"100%"}})]})]}),!C&&rt>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(rt)}}),d&&ae===0&&!C&&l.jsx(Ct,{P:o,"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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(vn)}})]},Z.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Ct,{P:o,"data-controls":Dt,"data-controls-static-handle":"",...C?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:C?"center":"left-y",areaStyle:{position:"absolute",top:Zt,left:0,width:"100%",height:Se(Math.max(dt,Br))}})},"row-padding-handles"),d&&!C&&jt&&ve&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Ct,{P:o,"data-controls":jt.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[0]-((je==null?void 0:je.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Se(Ke),height:"100%"}}),l.jsx(Ct,{P:o,"data-controls":ve.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(Ne[ke.length-1]-((Ve==null?void 0:Ve.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Er-Qe),width:Se(Qe),height:"100%"}})]},"column-edge-padding-handles"),d&&!C&&ke.slice(0,-1).map((Z,ae)=>{const se=ke[ae+1],xe=$e.slice(0,ae+1).reduce((De,et)=>De+et,0),He=ze[ae],we=ze[ae+1],me=Math.max(He.paddingRight,rn),Fe=Math.max(we.paddingLeft,rn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Ct,{P:o,"data-controls":Z.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(Ne[ae]-He.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(xe-me),width:Se(me),height:"100%"}}),l.jsx(Ct,{P:o,"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(Ne[ae+1]-we.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(xe),width:Se(Fe),height:"100%"}})]},`${Z.paddingRightKey}-padding`)}),d&&!C&&ke.slice(0,-1).map((Z,ae)=>{const se=Dd(ae,$e,Ue,Ie),He=$e.slice(0,ae+1).reduce((we,me)=>we+me,0)-so/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":Z.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(wi),"data-controls-max-fraction":String(se),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Se(He),width:Se(so),height:"calc(100%)",pointerEvents:"auto"}})},`${Z.widthKey}-junction`)})]}),bt&&(()=>{const Z=mr(e,Lt),ae=Cd(e.cutLabelVerticalAlign),se=Z.textTextAlign==="justify"||C;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:Se(y??0),cursor:At?"pointer":"default",...md(he,m??0,n??!1)},onClick:At?_t:void 0,onMouseEnter:ie?zn:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...C?{paddingLeft:Se(k),paddingRight:Se(k)}:{},justifyContent:Sd(Z.textTextAlign),alignItems:ro(ae)},children:l.jsx("span",{className:oo(e,Lt,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...io(Z,n),...ao(e,Lt,o,n),...se?{width:"100%"}:{}},children:O})})})})(),ie&&Q&&l.jsx("img",{className:`${o}-hover-image`,src:Q.url,alt:"",style:{width:ir(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const Ud=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5305
+ `}const Ht=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],xi=["AColumn","BColumn","CColumn","DColumn","EColumn"],Lt="cutLabel",Ci=[...xi,Lt],Lr=["A","B","C","D","E"];function Jo(e){return`${e}ColumnVerticalAlign`}const Zr=["Top","Center","Bottom"];function Si(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const r=t.slice(-1).toUpperCase();return Lr.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=Si(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function fd(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Lr.includes(n)?n:null}function Qo(e,t,n){const r=fd(e);return r?r===t?!1:hd(n[Jo(r)]):!0}function Rn(e){const t=Si(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Lr.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function yd(e,t,n){if(ea(e,t,n))return Rn(e);const r=Rn(e);return r.kind==="baseline"?{kind:"top"}:r}function vd(e){const t=Rn(e);return t.kind==="baseline"?{kind:"top"}:t}function ea(e,t,n){return Qo(e,n,t)?Rn(e).kind==="baseline":!1}function bd(e){const t={};let n=!1;for(const r of Lr){const i=Jo(r),a=e[i];if(e.type==="B"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(t[i]="Top",n=!0);continue}Qo(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function xd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Cd(e){const t=Rn(e).kind;return t==="baseline"?"center":t}function Sd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function ro(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function wd(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(),a=i-r;return n.remove(),a}function Or(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const s=wd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+s;const c=a.getBoundingClientRect(),o=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-o)/2:e.kind==="bottom"&&(d=c.height-o),c.top-t+d+s}function $d(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),e.offsetHeight,r)}function Td(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const Ld={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Te(e,t){return`${e}${t.replace(/^text/,"Text")}`}const Ed={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Pd(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),{type:"row",items:[Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing")]},Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function _d(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Ci.map(e=>[Ed[e],Pd(e)]))}}function mr(e,t){const n=r=>{const i=Te(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===Lt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function io(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 ht(nt(n,t))}function oo(e,t,n,r){const i=mr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s!==void 0&&s<a?`${n} ${r}`:n}function ao(e,t,n,r){const i=mr(e,t),a=i.textFontSize??.01,s=i.textLineHeight;return s===void 0||s>=a?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((a-s)/2,r)}}const lt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],un=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],pn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],mn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Ad={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Rd=["hover","focus","filled","success","error"],so=.004,rn=.004,Br=rn,lo=12,wi=50,In=1440,Wn=wi/In;function ta(e){const t=typeof e=="number"&&e>0?e:In;return wi/t}function Id(e,t){const n={position:"absolute",width:lo,height:lo,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 Ct({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Id(e,r)})})}function Wd(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 In}const na={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function or(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function kd(e,t=1){const n=t/e;return Object.fromEntries(lt.map(r=>[r,n]))}function Fd(){return Object.fromEntries([...un.map(e=>[e,0]),...pn.map(e=>[e,0])])}function Md(){return Object.fromEntries(mn.map(e=>[e,0]))}function Jn(e){return Object.fromEntries(lt.map(t=>[t,typeof e[t]=="number"?e[t]:na[t]]))}function ra(e,t,n){const r=e-Wn,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function ar(e,t,n){const r=$i(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,s)=>a+s,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Nd(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=un[i],s=pn[i],c=typeof n[a]=="number"?n[a]:0,o=typeof n[s]=="number"?n[s]:0,d=ra(t[i]??0,c,o);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==o&&(r[s]=d.paddingRight)}return r}function $i(e,t,n){if(e<=0)return[];const r=lt.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),s=i.reduce((d,p)=>d+p,0)+Wn;if(t>=s)return r;const c=[...i];let o=s-t;for(let d=c.length-1;d>=0&&o>0;d-=1){const p=c[d]-Wn;if(p<=0)continue;const T=Math.min(o,p);c[d]-=T,o-=T}return[...c,r[e-1]]}function Hd(e,t,n){if(e<=1)return{};const r=$i(e,t,n),i={};for(let a=0;a<e-1;a+=1){const s=lt[a];r[a]!==n[s]&&(i[s]=r[a])}return i}function co(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Ht]}function Od(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Bd(e,t,n,r){const i=Math.min(r,e.length,lt.length),a={};for(let s=0;s<i;s+=1){const c=e[s],o=t.indexOf(c);if(o===-1)continue;const d=lt[o],p=un[o],T=pn[o],S=mn[o],v=lt[s],g=un[s],m=pn[s],R=mn[s],b=n[d],x=n[p],y=n[T],O=n[S];typeof b=="number"&&(a[v]=b),typeof x=="number"&&(a[g]=x),typeof y=="number"&&(a[m]=y),typeof O=="number"&&(a[R]=O)}return a}function Vd(e,t,n){const r=bd(e);r&&(e={...e,...r});const i=ta(n==null?void 0:n.designWidth),a=e.columns,s=t.columns,c=or(e),o=or(t),d=e.type==="B"||e.type===void 0&&t.type==="B",p=typeof a=="number"?a:typeof s=="number"?s:Ht.length,T=y=>{if(d)return y;const O=Jn({...t,...y}),P=or(y),A=ar(p,P,O),L=Nd(p,A,{...t,...y});return Object.keys(L).length===0?y:{...y,...L}};if(typeof a=="number"&&a!==s){const y={...e,...kd(a,c),...Fd()};if(d)for(const O of mn)typeof t[O]=="number"&&(y[O]=t[O]);else Object.assign(y,Md());return y}const S=co(e),v=co(t);if(!Od(S,v))return T({...e,...Bd(S,v,t,p)});if(c<o&&typeof p=="number"&&!d){const y=Jn({...t,...e});return T({...e,...Hd(p,c,y)})}if(d){const y=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,O=Math.max(0,(c-i)/2);return y>O?{...e,textPaddingLR:O}:e}const g=Jn({...t,...e}),m=ar(p,o,Jn(t)),b=ar(p,c,g).some((y,O)=>y<(m[O]??y)),x=lt.some(y=>{const O=e[y],P=t[y];return typeof O=="number"&&typeof P=="number"&&O!==P});return b||x?T(e):e}function Dd(e,t,n,r){const i=t.slice(0,e).reduce((s,c)=>s+c,0),a=n.slice(e+1,t.length-1).reduce((s,c)=>s+c,0);return Math.max(Wn,r-i-a-Wn)}function zd(e,t){return Math.random()*(t-e)+e}function jd(e){return Object.fromEntries(lt.map(t=>[t,typeof e[t]=="number"?e[t]:na[t]]))}function Vr(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Kd(e,t,n,r,i,a){return e.slice(0,t).map((s,c)=>{const o=un[c],d=pn[c],p=mn[c];return{key:s,textPrefix:Ld[s],widthKey:lt[c],width:n[lt[c]],paddingLeftKey:o,paddingRightKey:d,paddingBottomKey:p,paddingLeft:r[o],paddingRight:i[d],paddingBottom:a[p]}})}function Ud({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:s,onUpdateSettings:c}){const{prefix:o}=E.useScopedStyles(),d=!!i,{columns:p,type:T,wrapperWidth:S,entriesCount:v,cellMinHeight:g,dividerWidth:m,showVisibility:R,cut:b,showCut:x,cutCellMinHeight:y,cutLabel:O,imageSize:P,imageOnHover:A,entryHoverEffect:L,entryHoverShowOption:I,rowPaddingTop:_,rowPaddingBottom:N,rowPaddingTopB:w,columnsOrder:B,textPaddingLR:V,textColor:q,backgroundColor:Y,dividerColor:$,textHoverColor:W,backgroundHoverColor:H,dividerHoverColor:M}=e,[k,D]=u.useState(void 0),[Q,re]=u.useState(null),ie=A==="On"&&(!n||r),ce=(b??0)>0,C=T==="B",oe=u.useRef(null),Pe=u.useRef(null),[ue,ye]=u.useState(null),[Re,ne]=u.useState(In),h=ta(Re),f=Math.max(0,((S??0)-h)/2),F=Math.min(V??0,f),z=Math.max(F,rn),G=((S??0)+h)/2;u.useLayoutEffect(()=>{if(!n){ne(In);return}const J=()=>{ne(Wd(oe.current))};J();const ae=oe.current;if(!ae)return;const se=new ResizeObserver(J);se.observe(ae);let xe=ae;for(;xe&&!xe.style.getPropertyValue("--cntrl-article-width");)xe=xe.parentElement;return xe&&se.observe(xe),()=>se.disconnect()},[n,s]),u.useEffect(()=>{D(void 0)},[b,x,t,v]),u.useEffect(()=>{n&&!r&&D(void 0)},[n,r]);const ee=E.buildColorVars(o,{textColor:q,backgroundColor:Y,dividerColor:$,textHoverColor:W,backgroundHoverColor:H,dividerHoverColor:M},Ad,Rd),te=a&&a!=="default"?`${o}-state-${a}`:"",pe=`${!n||r?L==="Default"?`${o}-entry-hover-default`:L==="Blinds"?`${o}-entry-hover-blinds`:"":""} ${te}`.trim(),Ce=(R==null?void 0:R[0])??!1,he=(R==null?void 0:R[1])??!1,fe=u.useRef(e),K=u.useRef(s);u.useEffect(()=>{if(!c||!n){fe.current=e,K.current=s;return}if(K.current!==s){fe.current=e,K.current=s;return}const J=fe.current;if(!(J!==e))return;const se=Vd(e,J,{designWidth:Re});fe.current=e,se!==e&&c(se)},[e,c,n,s,Re]);const U=u.useMemo(()=>jd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),j=u.useMemo(()=>Vr(e,un),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),de=u.useMemo(()=>Vr(e,pn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),Le=u.useMemo(()=>Vr(e,mn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Me=u.useMemo(()=>Array.isArray(B)&&B.length>0?B:[...Ht],[B]),Fe=u.useMemo(()=>Kd(Me,p,U,j,de,Le),[Me,p,U,j,de,Le]),Ie=or(e),qe=u.useMemo(()=>lt.slice(0,p).map(J=>U[J]),[p,U]),$e=u.useMemo(()=>$i(p,Ie,U),[p,Ie,U]),Ne=u.useMemo(()=>ar(p,Ie,U),[p,Ie,U]),je=u.useMemo(()=>Fe.map((J,ae)=>ra(Ne[ae]??0,J.paddingLeft,J.paddingRight)),[Fe,Ne]),We=u.useMemo(()=>{const J=v===0?1/0:v;return(t??[]).slice(0,J).map((se,xe)=>({id:xe,cells:Object.fromEntries(Ht.map(He=>[He,se[He]??""])),image:se.image,link:se.link}))},[t,v]),Ge=ce?k??b:We.length,Ye=u.useMemo(()=>ce?We.slice(0,Ge):We,[We,ce,Ge]),bt=ce&&Ge<We.length,Zt=Ye.length>1||bt,gt=[Ce?`${o}-divider-top`:"",he||Zt?`${o}-divider-bottom`:""].filter(Boolean).join(" "),_t=!n||r,At=()=>{if(!_t)return;const J=k??b;if(!x){D(We.length);return}D(Math.min(J+x,We.length))},Se=J=>E.scalingValue(J,n??!1),dt=C?w??0:_??0,rt=N??0,Xe=g??0,Rt=dt+Xe/2,vn=Math.max(rt,Br),Jt=to(0,Ye.length,Ce,he,bt,m??0,n??!1).borderTopWidth,Qt=ue!=null?`${ue}px`:`calc(${Jt} + ${Se(Rt)})`,Dt=C?"rowPaddingTopB":"rowPaddingTop",zt=Fe[0],ve=Fe[Fe.length-1],ze=je[0],Ve=je[je.length-1],Ke=zt&&ze?Math.max(ze.paddingLeft,rn):0,Qe=ve&&Ve?Math.max(Ve.paddingRight,rn):0,Er=Ie,Dn=J=>{const ae=oe.current;if(!ae)return{x:0,y:0};const se=ae.getBoundingClientRect();return{x:J.clientX-se.left+no,y:J.clientY-se.top+no}},bn=(J,ae)=>{if(!ie)return;const se=J.image;if(!(se!=null&&se.url)){re(null);return}const{x:xe,y:He}=Dn(ae),we=(P==null?void 0:P.min)??80,me=(P==null?void 0:P.max)??320,ke=(Q==null?void 0:Q.rowId)===J.id?Q.widthPx:zd(we,me);re({rowId:J.id,url:se.url,objectFit:se.objectFit??"cover",widthPx:ke,x:xe,y:He})},Pr=J=>{if(!ie||!Q)return;const{x:ae,y:se}=Dn(J);re(xe=>!xe||xe.x===ae&&xe.y===se?xe:{...xe,x:ae,y:se})},zn=()=>{re(null)},jn=()=>{ie&&re(null)};u.useLayoutEffect(()=>{if(!d||C){ye(null);return}const J=Pe.current,ae=J==null?void 0:J.parentElement;if(!J||!ae){ye(null);return}const se=()=>{const He=J.querySelector("[data-list-row]");if(!He){ye(null);return}const we=ae.getBoundingClientRect(),me=He.getBoundingClientRect();ye(me.top-we.top+me.height/2)};se();const xe=new ResizeObserver(se);return xe.observe(J),xe.observe(ae),()=>xe.disconnect()},[d,C,Ye,dt,rt,Xe,t,e,Fe,Ne,Re,m,Ce,he,bt]);const be=u.useMemo(()=>!C&&xi.some(J=>{const ae=J.charAt(0),se=e[`${J}VerticalAlign`];return ea(se,e,ae)}),[C,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return u.useLayoutEffect(()=>{var we;const J=oe.current;if(!J)return;const ae=()=>{J.querySelectorAll("[data-list-col]").forEach(me=>{me.style.transform="";const ke=me.querySelector(`.${o}-list-col`);ke&&(ke.style.minHeight="",ke.style.height="");const De=me.querySelector(`.${o}-list-col-title`);De&&(De.style.transform="")})};if(C||!be){ae();return}const se=()=>{J.querySelectorAll("[data-list-row]").forEach(me=>{const ke=Array.from(me.querySelectorAll("[data-list-col]"));ke.forEach(_e=>{_e.style.transform="";const it=_e.querySelector(`.${o}-list-col`);it&&(it.style.minHeight="",it.style.height="");const Ze=_e.querySelector(`.${o}-list-col-title`);Ze&&(Ze.style.transform="")}),$d(me,ke,`${o}-list-col`),me.offsetHeight;const De=me.getBoundingClientRect().top,et=`${o}-baseline-probe`,Ue=new Map,ot=ke.map(_e=>{const it=_e.querySelector(`.${o}-list-col-title`),Ze={el:_e,titleEl:it,letter:_e.getAttribute("data-col-letter")??"",kind:_e.getAttribute("data-valign")??"top",anchor:_e.getAttribute("data-valign-anchor")};return Ue.set(Ze.letter,Ze),Ze}),xn=new Map,Kn=(_e,it)=>{const Ze=xn.get(_e.letter);if(Ze!==void 0)return Ze;const Un=_e.anchor?Ue.get(_e.anchor):void 0;if(_e.kind!=="baseline"||!Un||it.has(_e.letter)){const Li=Or(_e,De,`${o}-list-col`,et);return xn.set(_e.letter,Li),Li}it.add(_e.letter);const oa=Kn(Un,it);it.delete(_e.letter);const aa=Or(_e,De,`${o}-list-col`,et),sa=oa-aa;Td(_e.titleEl,sa);const Ti=Or(_e,De,`${o}-list-col`,et);return xn.set(_e.letter,Ti),Ti};ot.forEach(_e=>Kn(_e,new Set))})};se();const xe=new ResizeObserver(()=>se());xe.observe(J);let He=!1;return typeof document<"u"&&((we=document.fonts)!=null&&we.ready)&&document.fonts.ready.then(()=>{He||se()}),()=>{He=!0,xe.disconnect(),ae()}},[be,C,e,t,Re,Ye,Ne]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:gd(o)}}),l.jsx("div",{style:ee,children:l.jsxs("div",{ref:oe,className:`${o}-wrapper ${pe}${gt?` ${gt}`:""}${C?` ${o}-type-b`:""}`.trim(),style:{width:E.scalingValue(S??0,n),...!C&&d?{[`--${o}-first-entry-handle-top`]:Qt}:{}},onMouseMove:ie?Pr:void 0,onMouseLeave:ie?zn:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[Ye.map((J,ae)=>{var we;const se=(((we=J.link)==null?void 0:we.length)??0)>0,xe=se&&r?"a":"div",He=to(ae,Ye.length,Ce,he,bt,m??0,n??!1);return l.jsxs(xe,{ref:ae===0?me=>{Pe.current=me}:void 0,className:`${o}-list-item${se||I==="Always"?` ${o}-list-item-has-link`:""}`,...se?{href:J.link,target:"_blank"}:{},style:He,onMouseEnter:ie?me=>bn(J,me):void 0,children:[dt>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(dt)}}),l.jsxs("div",{className:`${o}-list-cols-row${C?"":` ${o}-list-cols-row-h`}${d&&ae===0&&C?` ${o}-list-cols-row-controls`:""}`,...C?{}:{"data-list-row":""},style:C?void 0:{minHeight:Se(Xe)},children:[Fe.map((me,ke)=>{const De=ke===Fe.length-1,et=je[ke],Ue=me.paddingBottom,ot=pd(J.cells[me.key]),xn=C&&ot&&Ue>0,Kn=C?{minHeight:Se(Xe)}:{width:Se(Ne[ke])},_e=C?{paddingLeft:Se(F),paddingRight:Se(F)}:{paddingLeft:Se(et.paddingLeft),paddingRight:Se(et.paddingRight)},it=me.textPrefix.charAt(0),Ze=C?vd(e[`${me.textPrefix}VerticalAlign`]):yd(e[`${me.textPrefix}VerticalAlign`],e,it),Un=C&&ot&&d&&ae===0;return l.jsxs("div",{className:C?`${o}-list-col-wrap`:void 0,...C?{}:{"data-list-col":"","data-col-letter":it,"data-valign":Ze.kind,...Ze.kind==="baseline"?{"data-valign-anchor":Ze.anchorLetter}:{}},children:[l.jsx("div",{className:`${o}-list-col${De?` ${o}-list-col-last`:""}`,style:{..._e,...Kn,...C?{justifyContent:ro(Ze.kind)}:{}},"data-test":me.width,children:l.jsx("span",{className:oo(e,me.textPrefix,`${o}-list-col-title`,`${o}-text-tight-leading`),style:{...io(mr(e,me.textPrefix),n),...ao(e,me.textPrefix,o,n),...C?{}:xd(Ze.kind)},children:J.cells[me.key]??null})}),xn&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(Ue)}}),Un&&l.jsx(Ct,{P:o,"data-controls":me.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(Math.max(Ue,Br))}})]},me.key)}),d&&ae===0&&C&&l.jsxs(l.Fragment,{children:[l.jsx(Ct,{P:o,"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(G),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:Se(z),height:"100%"}}),l.jsx(Ct,{P:o,"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(G),className:`${o}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:Se(Math.max(z,Ie-z)),width:Se(z),height:"100%"}})]})]}),!C&&rt>0&&l.jsx("div",{className:`${o}-row-padding-handle`,style:{height:Se(rt)}}),d&&ae===0&&!C&&l.jsx(Ct,{P:o,"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:`${o}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:Se(vn)}})]},J.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(Ct,{P:o,"data-controls":Dt,"data-controls-static-handle":"",...C?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${o}-padding-control-handle`,hitPlacement:C?"center":"left-y",areaStyle:{position:"absolute",top:Jt,left:0,width:"100%",height:Se(Math.max(dt,Br))}})},"row-padding-handles"),d&&!C&&zt&&ve&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Ct,{P:o,"data-controls":zt.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ne[0]-((ze==null?void 0:ze.paddingRight)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:Se(Ke),height:"100%"}}),l.jsx(Ct,{P:o,"data-controls":ve.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(Ne[Fe.length-1]-((Ve==null?void 0:Ve.paddingLeft)??0)),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(Er-Qe),width:Se(Qe),height:"100%"}})]},"column-edge-padding-handles"),d&&!C&&Fe.slice(0,-1).map((J,ae)=>{const se=Fe[ae+1],xe=$e.slice(0,ae+1).reduce((De,et)=>De+et,0),He=je[ae],we=je[ae+1],me=Math.max(He.paddingRight,rn),ke=Math.max(we.paddingLeft,rn);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(Ct,{P:o,"data-controls":J.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(Ne[ae]-He.paddingLeft),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(xe-me),width:Se(me),height:"100%"}}),l.jsx(Ct,{P:o,"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(Ne[ae+1]-we.paddingRight),className:`${o}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:Se(xe),width:Se(ke),height:"100%"}})]},`${J.paddingRightKey}-padding`)}),d&&!C&&Fe.slice(0,-1).map((J,ae)=>{const se=Dd(ae,$e,qe,Ie),He=$e.slice(0,ae+1).reduce((we,me)=>we+me,0)-so/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":J.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(wi),"data-controls-max-fraction":String(se),"data-controls-variant":"column-width",className:`${o}-col-resize-handle`,style:{position:"absolute",top:"0px",left:Se(He),width:Se(so),height:"calc(100%)",pointerEvents:"auto"}})},`${J.widthKey}-junction`)})]}),bt&&(()=>{const J=mr(e,Lt),ae=Cd(e.cutLabelVerticalAlign),se=J.textTextAlign==="justify"||C;return l.jsx("button",{type:"button",className:`${o}-cut-item`,style:{minHeight:Se(y??0),cursor:_t?"pointer":"default",...md(he,m??0,n??!1)},onClick:_t?At:void 0,onMouseEnter:ie?jn:void 0,children:l.jsx("div",{className:`${o}-list-cols-row`,style:{...C?{paddingLeft:Se(F),paddingRight:Se(F)}:{},justifyContent:Sd(J.textTextAlign),alignItems:ro(ae)},children:l.jsx("span",{className:oo(e,Lt,`${o}-cut-label`,`${o}-text-tight-leading`),style:{...io(J,n),...ao(e,Lt,o,n),...se?{width:"100%"}:{}},children:O})})})})(),ie&&Q&&l.jsx("img",{className:`${o}-hover-image`,src:Q.url,alt:"",style:{width:ir(Q.widthPx),objectFit:Q.objectFit,left:Q.x,top:Q.y}})]})})]})}const qd=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
5306
5306
  import { CommonComponentProps } from '../props';
5307
5307
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5308
5308
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8077,4 +8077,4 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8077
8077
  </>
8078
8078
  );
8079
8079
  }
8080
- `,yn=["A","B","C","D","E"],uo=[...Jr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Kt={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 qd(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Qn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Yd(){return Object.fromEntries(yn.map((e,t)=>{const n=Ht[t],r=`${e} column`;return[n,qd(r)]}))}function Xd(){const e={};for(const t of yn)e[`${t}ColumnWidth`]=Qn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Qn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Qn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Qn(`${t} column padding bottom`);return e}function po(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Ht]};for(const a of yn)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="B"&&t?t:{};return{...r,...i,...n}}function Jd(e){const t={};if(e===Lt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Jr]},enum:[...Jr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...uo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...uo]}}return t[Te(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Te(e,"textFontSettings")]={...Kt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Te(e,"textFontSize")]={...Kt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Te(e,"textLineHeight")]={...Kt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Te(e,"textLetterSpacing")]={...Kt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Te(e,"textWordSpacing")]={...Kt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Te(e,"textTextAlign")]={...Kt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Te(e,"textTextAppearance")]={...Kt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Zd=Ci.reduce((e,t)=>({...e,...Jd(t)}),{});function Qd(e){return{verticalAlign:e===Lt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Lt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function eu(e,t={}){var n;return{...Qd(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const mo=new Set(["textFontFamily","textFontSettings"]);function tu(e,t,n){const r=a=>n===void 0?!0:n==="common"?mo.has(a):!mo.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Si(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Te(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Te(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Te(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Te(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Te(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Te(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Te(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Te(e,"textTextAppearance")]=t.textTextAppearance),i}function sr(e={},t){return Ci.reduce((n,r)=>({...n,...tu(r,eu(r,e),t)}),{})}const nu=sr(),ru=Ad();function ia(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing"),Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function iu(){const e=[];return xi.forEach((t,n)=>{const r=Ht[n],i=ia(t);for(let a=1;a<Ht.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const ou=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],au=["cutLabel","cutCellMinHeight","showCut"],su=ia(Lt),lu=[...au,...su],cu=[...yn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Gt=[{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDBHFMF0NKJMYCGGRA.jpeg",name:"List-1.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD194E6Z49QD9GG03N.jpeg",name:"List-2.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDNZRY59Q8JJVYY92K.jpeg",name:"List-3.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDRXD5QWHB5YF8H3XM.jpeg",name:"List-4.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3C6H5Q9QX0SX8PSP.jpeg",name:"List-5.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDM6VHTFVXVD58V0D6.jpeg",name:"List-6.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3QT4RPG3VMM2NK5K.jpeg",name:"List-7.png"}],du=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Gt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Gt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Gt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Gt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Gt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Gt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Gt[6],link:""}],uu=[...yn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],pu={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:{...Yd(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:du},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:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell 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:"Cut",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"]}},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"}},...Xd(),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"}},...Zd,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",...nu,...sr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:po({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},...sr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:po({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},...sr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:0,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...iu(),...lu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...cu.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}},...yn.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",...uu]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",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:["columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:[{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:[ru]}],paletteBookmark:{items:[...ou],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},mu={element:Gd,id:"list",name:"Default List",category:"lists",layoutMode:"structured",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:pu,sourceCode:Ud},gu=[yl,$l,pc,Cc,Rc,Dc,Uc,Qc,ud,mu];exports.components=gu;exports.isSchemaV1=la;
8080
+ `,yn=["A","B","C","D","E"],uo=[...Zr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Kt={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 Gd(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Qn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Yd(){return Object.fromEntries(yn.map((e,t)=>{const n=Ht[t],r=`${e} column`;return[n,Gd(r)]}))}function Xd(){const e={};for(const t of yn)e[`${t}ColumnWidth`]=Qn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Qn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Qn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Qn(`${t} column padding bottom`);return e}function po(e={}){const{typeBDefaults:t,...n}=e,r={wrapperWidth:1,columnsOrder:[...Ht]};for(const a of yn)r[`${a}ColumnWidth`]=a==="A"?.0798:.32,r[`${a}ColumnPaddingLeft`]=0,r[`${a}ColumnPaddingRight`]=0,r[`${a}ColumnPaddingBottom`]=0;const i=n.type==="B"&&t?t:{};return{...r,...i,...n}}function Zd(e){const t={};if(e===Lt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Zr]},enum:[...Zr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...uo],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...uo]}}return t[Te(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Te(e,"textFontSettings")]={...Kt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Te(e,"textFontSize")]={...Kt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Te(e,"textLineHeight")]={...Kt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Te(e,"textLetterSpacing")]={...Kt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Te(e,"textWordSpacing")]={...Kt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Te(e,"textTextAlign")]={...Kt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Te(e,"textTextAppearance")]={...Kt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const Jd=Ci.reduce((e,t)=>({...e,...Zd(t)}),{});function Qd(e){return{verticalAlign:e===Lt?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Lt?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function eu(e,t={}){var n;return{...Qd(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const mo=new Set(["textFontFamily","textFontSettings"]);function tu(e,t,n){const r=a=>n===void 0?!0:n==="common"?mo.has(a):!mo.has(a),i={};return r("verticalAlign")&&t.verticalAlign!==void 0&&(i[`${e}VerticalAlign`]=Si(t.verticalAlign)),r("textFontFamily")&&t.textFontFamily!==void 0&&(i[Te(e,"textFontFamily")]=t.textFontFamily),r("textFontSettings")&&t.textFontSettings!==void 0&&(i[Te(e,"textFontSettings")]=t.textFontSettings),r("textFontSize")&&t.textFontSize!==void 0&&(i[Te(e,"textFontSize")]=t.textFontSize),r("textLineHeight")&&t.textLineHeight!==void 0&&(i[Te(e,"textLineHeight")]=t.textLineHeight),r("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(i[Te(e,"textLetterSpacing")]=t.textLetterSpacing),r("textWordSpacing")&&t.textWordSpacing!==void 0&&(i[Te(e,"textWordSpacing")]=t.textWordSpacing),r("textTextAlign")&&t.textTextAlign!==void 0&&(i[Te(e,"textTextAlign")]=t.textTextAlign),r("textTextAppearance")&&t.textTextAppearance!==void 0&&(i[Te(e,"textTextAppearance")]=t.textTextAppearance),i}function sr(e={},t){return Ci.reduce((n,r)=>({...n,...tu(r,eu(r,e),t)}),{})}const nu=sr(),ru=_d();function ia(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing"),Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function iu(){const e=[];return xi.forEach((t,n)=>{const r=Ht[n],i=ia(t);for(let a=1;a<Ht.length;a+=1){const s=[{name:"columns",value:a},...Array.from({length:a},(c,o)=>({name:`columnsOrder.${o}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:s,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const ou=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],au=["cutLabel","cutCellMinHeight","showCut"],su=ia(Lt),lu=[...au,...su],cu=[...yn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Ut=[{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(1).webp",name:"List-1.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(2).webp",name:"List-2.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(3).webp",name:"List-3.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(4).webp",name:"List-4.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(5).webp",name:"List-5.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(6).webp",name:"List-6.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/default-list(7).webp",name:"List-7.png"}],du=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Ut[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Ut[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Ut[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Ut[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Ut[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Ut[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Ut[6],link:""}],uu=[...yn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],pu={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:{...Yd(),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:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:du},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:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell 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:"Cut",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"]}},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"}},...Xd(),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"}},...Jd,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",...nu,...sr({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:po({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},...sr({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:po({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},...sr({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:0,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...iu(),...lu.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...cu.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}},...yn.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",...uu]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",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:["columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:[{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:[ru]}],paletteBookmark:{items:[...ou],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},mu={element:Ud,id:"list",name:"Default List",category:"lists",layoutMode:"structured",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:pu,sourceCode:qd},gu=[yl,$l,pc,Cc,Rc,Dc,qc,Qc,ud,mu];exports.components=gu;exports.isSchemaV1=la;