@cntrl-site/components 1.0.7-alpha.1 → 1.0.7-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,145 +1,145 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),H=require("react"),mt=require("classnames"),x=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function Sr(t){return t.type==="object"&&t.version===1}const xr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",wr="ControlSlider-module__sliderItem___QQSkR",$r="ControlSlider-module__sliderImage___9hRl-",Tr="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Er="ControlSlider-module__arrowInner___aEra3",Lr="ControlSlider-module__arrowIcon___S4ztF",Fr="ControlSlider-module__arrowImg___2dwJW",kr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Wr="ControlSlider-module__paginationVertical___zYqKw",Vr="ControlSlider-module__paginationItem___nTRbk",zr="ControlSlider-module__dot___p1Qun",Mr="ControlSlider-module__activeDot___LHFaj",Nr="ControlSlider-module__paginationInsideBottom___R3FWn",Pr="ControlSlider-module__paginationInsideTop___V-qb-",Hr="ControlSlider-module__paginationOutsideBottom___14w8D",jr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",qr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Kr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Zr="ControlSlider-module__topLeftAlignment___zjnGM",Qr="ControlSlider-module__topCenterAlignment___gD1xW",ti="ControlSlider-module__topRightAlignment___NMapS",ei="ControlSlider-module__middleLeftAlignment___OnUrY",ni="ControlSlider-module__middleCenterAlignment___Tdkl0",oi="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ii="ControlSlider-module__bottomCenterAlignment___c54fB",ai="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",si="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",Y={wrapper:xr,hoverArrow:Cr,sliderItem:wr,sliderImage:$r,arrow:Tr,arrowVertical:_r,nextArrow:Ar,arrowInner:Er,arrowIcon:Lr,arrowImg:Fr,mirror:kr,pagination:Ir,paginationInner:Rr,paginationVertical:Wr,paginationItem:Vr,dot:zr,activeDot:Mr,paginationInsideBottom:Nr,paginationInsideTop:Pr,paginationOutsideBottom:Hr,paginationOutsideTop:jr,paginationInsideLeft:Or,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:Gr,captionBlock:qr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Jr,topLeftAlignment:Zr,topCenterAlignment:Qr,topRightAlignment:ti,middleLeftAlignment:ei,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};function pi(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ui(t,e,n){return e&&pi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var io="(prefers-reduced-motion: reduce)",ge=1,di=2,ve=3,xe=4,Me=5,Ze=6,nn=7,gi={CREATED:ge,MOUNTED:di,IDLE:ve,MOVING:xe,SCROLLING:Me,DRAGGING:Ze,DESTROYED:nn};function qt(t){t.length=0}function te(t,e,n){return Array.prototype.slice.call(t,e,n)}function dt(t){return t.bind.apply(t,[null].concat(te(arguments,1)))}var Lo=setTimeout,An=function(){};function ao(t){return requestAnimationFrame(t)}function sn(t,e){return typeof e===t}function Le(t){return!Mn(t)&&sn("object",t)}var zn=Array.isArray,Fo=dt(sn,"function"),Zt=dt(sn,"string"),Ne=dt(sn,"undefined");function Mn(t){return t===null}function ko(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Pe(t){return zn(t)?t:[t]}function Lt(t,e){Pe(t).forEach(e)}function Nn(t,e){return t.indexOf(e)>-1}function Qe(t,e){return t.push.apply(t,Pe(e)),t}function Dt(t,e,n){t&&Lt(e,function(o){o&&t.classList[n?"add":"remove"](o)})}function zt(t,e){Dt(t,Zt(e)?e.split(" "):e,!0)}function He(t,e){Lt(e,t.appendChild.bind(t))}function Pn(t,e){Lt(t,function(n){var o=(e||n).parentNode;o&&o.insertBefore(n,e)})}function Fe(t,e){return ko(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Io(t,e){var n=t?te(t.children):[];return e?n.filter(function(o){return Fe(o,e)}):n}function je(t,e){return e?Io(t,e)[0]:t.firstElementChild}var ke=Object.keys;function ie(t,e,n){return t&&(n?ke(t).reverse():ke(t)).forEach(function(o){o!=="__proto__"&&e(t[o],o)}),t}function Ie(t){return te(arguments,1).forEach(function(e){ie(e,function(n,o){t[o]=e[o]})}),t}function Kt(t){return te(arguments,1).forEach(function(e){ie(e,function(n,o){zn(n)?t[o]=n.slice():Le(n)?t[o]=Kt({},Le(t[o])?t[o]:{},n):t[o]=n})}),t}function lo(t,e){Lt(e||ke(t),function(n){delete t[n]})}function Mt(t,e){Lt(t,function(n){Lt(e,function(o){n&&n.removeAttribute(o)})})}function et(t,e,n){Le(e)?ie(e,function(o,r){et(t,r,o)}):Lt(t,function(o){Mn(n)||n===""?Mt(o,e):o.setAttribute(e,String(n))})}function me(t,e,n){var o=document.createElement(t);return e&&(Zt(e)?zt(o,e):et(o,e)),n&&He(n,o),o}function It(t,e,n){if(Ne(n))return getComputedStyle(t)[e];Mn(n)||(t.style[e]=""+n)}function Re(t,e){It(t,"display",e)}function Ro(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Rt(t,e){return t.getAttribute(e)}function so(t,e){return t&&t.classList.contains(e)}function At(t){return t.getBoundingClientRect()}function ae(t){Lt(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Wo(t){return je(new DOMParser().parseFromString(t,"text/html").body)}function Bt(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Vo(t,e){return t&&t.querySelector(e)}function Hn(t,e){return e?te(t.querySelectorAll(e)):[]}function Ut(t,e){Dt(t,e,!1)}function En(t){return t.timeStamp}function re(t){return Zt(t)?t:t?t+"px":""}var Oe="splide",jn="data-"+Oe;function Ae(t,e){if(!t)throw new Error("["+Oe+"] "+(e||""))}var Qt=Math.min,on=Math.max,rn=Math.floor,We=Math.ceil,$t=Math.abs;function zo(t,e,n){return $t(t-e)<n}function tn(t,e,n,o){var r=Qt(e,n),a=on(e,n);return o?r<t&&t<a:r<=t&&t<=a}function ue(t,e,n){var o=Qt(e,n),r=on(e,n);return Qt(on(o,t),r)}function Ln(t){return+(t>0)-+(t<0)}function Fn(t,e){return Lt(e,function(n){t=t.replace("%s",""+n)}),t}function On(t){return t<10?"0"+t:""+t}var co={};function mi(t){return""+t+On(co[t]=(co[t]||0)+1)}function Mo(){var t=[];function e(i,p,c,m){r(i,p,function(u,I,S){var y="addEventListener"in u,l=y?u.removeEventListener.bind(u,I,c,m):u.removeListener.bind(u,c);y?u.addEventListener(I,c,m):u.addListener(c),t.push([u,I,S,c,l])})}function n(i,p,c){r(i,p,function(m,u,I){t=t.filter(function(S){return S[0]===m&&S[1]===u&&S[2]===I&&(!c||S[3]===c)?(S[4](),!1):!0})})}function o(i,p,c){var m,u=!0;return typeof CustomEvent=="function"?m=new CustomEvent(p,{bubbles:u,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(p,u,!1,c)),i.dispatchEvent(m),m}function r(i,p,c){Lt(i,function(m){m&&Lt(p,function(u){u.split(" ").forEach(function(I){var S=I.split(".");c(m,S[0],S[1])})})})}function a(){t.forEach(function(i){i[4]()}),qt(t)}return{bind:e,unbind:n,dispatch:o,destroy:a}}var ee="mounted",kn="ready",Yt="move",Ce="moved",Bn="click",No="active",Po="inactive",Ho="visible",jo="hidden",St="refresh",wt="updated",be="resize",cn="resized",Oo="drag",Bo="dragging",Do="dragged",pn="scroll",se="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",Go="arrows:updated",qo="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",Gn="autoplay:play",Xo="autoplay:playing",qn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Jo="sh",an="ei";function ht(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Mo();function o(a,i){n.bind(e,Pe(a).join(" "),function(p){i.apply(i,zn(p.detail)?p.detail:[])})}function r(a){n.dispatch(e,a,te(arguments,1))}return t&&t.event.on(Dn,n.destroy),Ie(n,{bus:e,on:o,off:dt(n.unbind,e),emit:r})}function un(t,e,n,o){var r=Date.now,a,i=0,p,c=!0,m=0;function u(){if(!c){if(i=t?Qt((r()-a)/t,1):1,n&&n(i),i>=1&&(e(),a=r(),o&&++m>=o))return S();p=ao(u)}}function I(v){v||l(),a=r()-(v?i*t:0),c=!1,p=ao(u)}function S(){c=!0}function y(){a=r(),i=0,n&&n(i)}function l(){p&&cancelAnimationFrame(p),i=0,p=0,c=!0}function g(v){t=v}function w(){return c}return{start:I,rewind:y,pause:S,cancel:l,set:g,isPaused:w}}function yi(t){var e=t;function n(r){e=r}function o(r){return Nn(Pe(r),e)}return{set:n,is:o}}function hi(t,e){var n=un(0,t,null,1);return function(){n.isPaused()&&n.start()}}function vi(t,e,n){var o=t.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Mo(),p=[];function c(){var l=n.mediaQuery==="min";ke(r).sort(function(g,w){return l?+g-+w:+w-+g}).forEach(function(g){u(r[g],"("+(l?"min":"max")+"-width:"+g+"px)")}),u(a,io),I()}function m(l){l&&i.destroy()}function u(l,g){var w=matchMedia(g);i.bind(w,"change",I),p.push([l,w])}function I(){var l=o.is(nn),g=n.direction,w=p.reduce(function(v,b){return Kt(v,b[1].matches?b[0]:{})},{});lo(n),y(w),n.destroy?t.destroy(n.destroy==="completely"):l?(m(!0),t.mount()):g!==n.direction&&t.refresh()}function S(l){matchMedia(io).matches&&(l?Kt(n,a):lo(n,ke(a)))}function y(l,g,w){Kt(n,l),g&&Kt(Object.getPrototypeOf(n),l),(w||!o.is(ge))&&t.emit(wt,n)}return{setup:c,destroy:m,reduce:S,set:y}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Zo=dn+"Up",Qo=dn+"Down",po="rtl",fn="ttb",xn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,mn],ArrowRight:[Qo,gn]};function bi(t,e,n){function o(a,i,p){p=p||n.direction;var c=p===po&&!i?1:p===fn?0:-1;return xn[a]&&xn[a][c]||a.replace(/width|left|right/i,function(m,u){var I=xn[m.toLowerCase()][c]||m;return u>0?I.charAt(0).toUpperCase()+I.slice(1):I})}function r(a){return a*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var Gt="role",fe="tabindex",Si="disabled",Wt="aria-",Be=Wt+"controls",tr=Wt+"current",uo=Wt+"selected",Et=Wt+"label",Xn=Wt+"labelledby",er=Wt+"hidden",Kn=Wt+"orientation",Ve=Wt+"roledescription",go=Wt+"live",mo=Wt+"busy",fo=Wt+"atomic",Jn=[Gt,fe,Si,Be,tr,Et,Xn,er,Kn,Ve],Nt=Oe+"__",ne="is-",Cn=Oe,yo=Nt+"track",xi=Nt+"list",yn=Nt+"slide",nr=yn+"--clone",Ci=yn+"__container",Zn=Nt+"arrows",hn=Nt+"arrow",or=hn+"--prev",rr=hn+"--next",vn=Nt+"pagination",ir=vn+"__page",wi=Nt+"progress",$i=wi+"__bar",Ti=Nt+"toggle",_i=Nt+"spinner",Ai=Nt+"sr",Ei=ne+"initialized",le=ne+"active",ar=ne+"prev",lr=ne+"next",In=ne+"visible",Rn=ne+"loading",sr=ne+"focus-in",cr=ne+"overflow",Li=[le,In,ar,lr,Rn,sr,cr],Fi={slide:yn,clone:nr,arrows:Zn,arrow:hn,prev:or,next:rr,pagination:vn,page:ir,spinner:_i};function ki(t,e){if(Fo(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!Fe(n,e);)n=n.parentElement;return n}var Ii=5,ho=200,pr="touchstart mousedown",wn="touchmove mousemove",$n="touchend touchcancel mouseup click";function Ri(t,e,n){var o=ht(t),r=o.on,a=o.bind,i=t.root,p=n.i18n,c={},m=[],u=[],I=[],S,y,l;function g(){E(),B(),b()}function w(){r(St,v),r(St,g),r(wt,b),a(document,pr+" keydown",function(f){l=f.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Dt(i,sr,!!l)})}function v(f){var F=Jn.concat("style");qt(m),Ut(i,u),Ut(S,I),Mt([S,y],F),Mt(i,f?F:["style",Ve])}function b(){Ut(i,u),Ut(S,I),u=L(Cn),I=L(yo),zt(i,u),zt(S,I),et(i,Et,n.label),et(i,Xn,n.labelledby)}function E(){S=P("."+yo),y=je(S,"."+xi),Ae(S&&y,"A track/list element is missing."),Qe(m,Io(y,"."+yn+":not(."+nr+")")),ie({arrows:Zn,pagination:vn,prev:or,next:rr,bar:$i,toggle:Ti},function(f,F){c[F]=P("."+f)}),Ie(c,{root:i,track:S,list:y,slides:m})}function B(){var f=i.id||mi(Oe),F=n.role;i.id=f,S.id=S.id||f+"-track",y.id=y.id||f+"-list",!Rt(i,Gt)&&i.tagName!=="SECTION"&&F&&et(i,Gt,F),et(i,Ve,p.carousel),et(y,Gt,"presentation")}function P(f){var F=Vo(i,f);return F&&ki(F,"."+Cn)===i?F:void 0}function L(f){return[f+"--"+n.type,f+"--"+n.direction,n.drag&&f+"--draggable",n.isNavigation&&f+"--nav",f===Cn&&le]}return Ie(c,{setup:g,mount:w,destroy:v})}var Se="slide",we="loop",De="fade";function Wi(t,e,n,o){var r=ht(t),a=r.on,i=r.emit,p=r.bind,c=t.Components,m=t.root,u=t.options,I=u.isNavigation,S=u.updateOnMove,y=u.i18n,l=u.pagination,g=u.slideFocus,w=c.Direction.resolve,v=Rt(o,"style"),b=Rt(o,Et),E=n>-1,B=je(o,"."+Ci),P;function L(){E||(o.id=m.id+"-slide"+On(e+1),et(o,Gt,l?"tabpanel":"group"),et(o,Ve,y.slide),et(o,Et,b||Fn(y.slideLabel,[e+1,t.length]))),f()}function f(){p(o,"click",dt(i,Bn,C)),p(o,"keydown",dt(i,Ko,C)),a([Ce,Jo,se],R),a(Un,k),S&&a(Yt,N)}function F(){P=!0,r.destroy(),Ut(o,Li),Mt(o,Jn),et(o,"style",v),et(o,Et,b||"")}function k(){var T=t.splides.map(function(A){var z=A.splide.Components.Slides.getAt(e);return z?z.slide.id:""}).join(" ");et(o,Et,Fn(y.slideX,(E?n:e)+1)),et(o,Be,T),et(o,Gt,g?"button":""),g&&Mt(o,Ve)}function N(){P||R()}function R(){if(!P){var T=t.index;W(),_(),Dt(o,ar,e===T-1),Dt(o,lr,e===T+1)}}function W(){var T=j();T!==so(o,le)&&(Dt(o,le,T),et(o,tr,I&&T||""),i(T?No:Po,C))}function _(){var T=d(),A=!T&&(!j()||E);if(t.state.is([xe,Me])||et(o,er,A||""),et(Hn(o,u.focusableNodes||""),fe,A?-1:""),g&&et(o,fe,A?-1:0),T!==so(o,In)&&(Dt(o,In,T),i(T?Ho:jo,C)),!T&&document.activeElement===o){var z=c.Slides.getAt(t.index);z&&Ro(z.slide)}}function D(T,A,z){It(z&&B||o,T,A)}function j(){var T=t.index;return T===e||u.cloneStatus&&T===n}function d(){if(t.is(De))return j();var T=At(c.Elements.track),A=At(o),z=w("left",!0),q=w("right",!0);return rn(T[z])<=We(A[z])&&rn(A[q])<=We(T[q])}function $(T,A){var z=$t(T-e);return!E&&(u.rewind||t.is(we))&&(z=Qt(z,t.length-z)),z<=A}var C={index:e,slideIndex:n,slide:o,container:B,isClone:E,mount:L,destroy:F,update:R,style:D,isWithin:$};return C}function Vi(t,e,n){var o=ht(t),r=o.on,a=o.emit,i=o.bind,p=e.Elements,c=p.slides,m=p.list,u=[];function I(){S(),r(St,y),r(St,S)}function S(){c.forEach(function(R,W){g(R,W,-1)})}function y(){P(function(R){R.destroy()}),qt(u)}function l(){P(function(R){R.update()})}function g(R,W,_){var D=Wi(t,W,_,R);D.mount(),u.push(D),u.sort(function(j,d){return j.index-d.index})}function w(R){return R?L(function(W){return!W.isClone}):u}function v(R){var W=e.Controller,_=W.toIndex(R),D=W.hasFocus()?1:n.perPage;return L(function(j){return tn(j.index,_,_+D-1)})}function b(R){return L(R)[0]}function E(R,W){Lt(R,function(_){if(Zt(_)&&(_=Wo(_)),ko(_)){var D=c[W];D?Pn(_,D):He(m,_),zt(_,n.classes.slide),F(_,dt(a,be))}}),a(St)}function B(R){ae(L(R).map(function(W){return W.slide})),a(St)}function P(R,W){w(W).forEach(R)}function L(R){return u.filter(Fo(R)?R:function(W){return Zt(R)?Fe(W.slide,R):Nn(Pe(R),W.index)})}function f(R,W,_){P(function(D){D.style(R,W,_)})}function F(R,W){var _=Hn(R,"img"),D=_.length;D?_.forEach(function(j){i(j,"load error",function(){--D||W()})}):W()}function k(R){return R?c.length:u.length}function N(){return u.length>n.perPage}return{mount:I,destroy:y,update:l,register:g,get:w,getIn:v,getAt:b,add:E,remove:B,forEach:P,filter:L,style:f,getLength:k,isEnough:N}}function zi(t,e,n){var o=ht(t),r=o.on,a=o.bind,i=o.emit,p=e.Slides,c=e.Direction.resolve,m=e.Elements,u=m.root,I=m.track,S=m.list,y=p.getAt,l=p.style,g,w,v;function b(){E(),a(window,"resize load",hi(dt(i,be))),r([wt,St],E),r(be,B)}function E(){g=n.direction===fn,It(u,"maxWidth",re(n.width)),It(I,c("paddingLeft"),P(!1)),It(I,c("paddingRight"),P(!0)),B(!0)}function B(C){var T=At(u);(C||w.width!==T.width||w.height!==T.height)&&(It(I,"height",L()),l(c("marginRight"),re(n.gap)),l("width",F()),l("height",k(),!0),w=T,i(cn),v!==(v=$())&&(Dt(u,cr,v),i(fi,v)))}function P(C){var T=n.padding,A=c(C?"right":"left");return T&&re(T[A]||(Le(T)?0:T))||"0px"}function L(){var C="";return g&&(C=f(),Ae(C,"height or heightRatio is missing."),C="calc("+C+" - "+P(!1)+" - "+P(!0)+")"),C}function f(){return re(n.height||At(S).width*n.heightRatio)}function F(){return n.autoWidth?null:re(n.fixedWidth)||(g?"":N())}function k(){return re(n.fixedHeight)||(g?n.autoHeight?null:N():f())}function N(){var C=re(n.gap);return"calc((100%"+(C&&" + "+C)+")/"+(n.perPage||1)+(C&&" - "+C)+")"}function R(){return At(S)[c("width")]}function W(C,T){var A=y(C||0);return A?At(A.slide)[c("width")]+(T?0:j()):0}function _(C,T){var A=y(C);if(A){var z=At(A.slide)[c("right")],q=At(S)[c("left")];return $t(z-q)+(T?0:j())}return 0}function D(C){return _(t.length-1)-_(0)+W(0,C)}function j(){var C=y(0);return C&&parseFloat(It(C.slide,c("marginRight")))||0}function d(C){return parseFloat(It(I,c("padding"+(C?"Right":"Left"))))||0}function $(){return t.is(De)||D(!0)>R()}return{mount:b,resize:B,listSize:R,slideSize:W,sliderSize:D,totalSize:_,getPadding:d,isOverflow:$}}var Mi=2;function Ni(t,e,n){var o=ht(t),r=o.on,a=e.Elements,i=e.Slides,p=e.Direction.resolve,c=[],m;function u(){r(St,I),r([wt,be],y),(m=w())&&(l(m),e.Layout.resize(!0))}function I(){S(),u()}function S(){ae(c),qt(c),o.destroy()}function y(){var v=w();m!==v&&(m<v||!v)&&o.emit(St)}function l(v){var b=i.get().slice(),E=b.length;if(E){for(;b.length<v;)Qe(b,b);Qe(b.slice(-v),b.slice(0,v)).forEach(function(B,P){var L=P<v,f=g(B.slide,P);L?Pn(f,b[0].slide):He(a.list,f),Qe(c,f),i.register(f,P-v+(L?0:E),B.index)})}}function g(v,b){var E=v.cloneNode(!0);return zt(E,n.classes.clone),E.id=t.root.id+"-clone"+On(b+1),E}function w(){var v=n.clones;if(!t.is(we))v=0;else if(Ne(v)){var b=n[p("fixedWidth")]&&e.Layout.slideSize(0),E=b&&We(At(a.track)[p("width")]/b);v=E||n[p("autoWidth")]&&t.length||n.perPage*Mi}return v}return{mount:u,destroy:S}}function Pi(t,e,n){var o=ht(t),r=o.on,a=o.emit,i=t.state.set,p=e.Layout,c=p.slideSize,m=p.getPadding,u=p.totalSize,I=p.listSize,S=p.sliderSize,y=e.Direction,l=y.resolve,g=y.orient,w=e.Elements,v=w.list,b=w.track,E;function B(){E=e.Transition,r([ee,cn,wt,St],P)}function P(){e.Controller.isBusy()||(e.Scroll.cancel(),f(t.index),e.Slides.update())}function L(A,z,q,at){A!==z&&C(A>q)&&(R(),F(N(D(),A>q),!0)),i(xe),a(Yt,z,q,A),E.start(z,function(){i(ve),a(Ce,z,q,A),at&&at()})}function f(A){F(_(A,!0))}function F(A,z){if(!t.is(De)){var q=z?A:k(A);It(v,"transform","translate"+l("X")+"("+q+"px)"),A!==q&&a(Jo)}}function k(A){if(t.is(we)){var z=W(A),q=z>e.Controller.getEnd(),at=z<0;(at||q)&&(A=N(A,q))}return A}function N(A,z){var q=A-$(z),at=S();return A-=g(at*(We($t(q)/at)||1))*(z?1:-1),A}function R(){F(D(),!0),E.cancel()}function W(A){for(var z=e.Slides.get(),q=0,at=1/0,it=0;it<z.length;it++){var ct=z[it].index,M=$t(_(ct,!0)-A);if(M<=at)at=M,q=ct;else break}return q}function _(A,z){var q=g(u(A-1)-d(A));return z?j(q):q}function D(){var A=l("left");return At(v)[A]-At(b)[A]+g(m(!1))}function j(A){return n.trimSpace&&t.is(Se)&&(A=ue(A,0,g(S(!0)-I()))),A}function d(A){var z=n.focus;return z==="center"?(I()-c(A,!0))/2:+z*c(A)||0}function $(A){return _(A?e.Controller.getEnd():0,!!n.trimSpace)}function C(A){var z=g(N(D(),A));return A?z>=0:z<=v[l("scrollWidth")]-At(b)[l("width")]}function T(A,z){z=Ne(z)?D():z;var q=A!==!0&&g(z)<g($(!1)),at=A!==!1&&g(z)>g($(!0));return q||at}return{mount:B,move:L,jump:f,translate:F,shift:N,cancel:R,toIndex:W,toPosition:_,getPosition:D,getLimit:$,exceededLimit:T,reposition:P}}function Hi(t,e,n){var o=ht(t),r=o.on,a=o.emit,i=e.Move,p=i.getPosition,c=i.getLimit,m=i.toPosition,u=e.Slides,I=u.isEnough,S=u.getLength,y=n.omitEnd,l=t.is(we),g=t.is(Se),w=dt(D,!1),v=dt(D,!0),b=n.start||0,E,B=b,P,L,f;function F(){k(),r([wt,St,an],k),r(cn,N)}function k(){P=S(!0),L=n.perMove,f=n.perPage,E=C();var M=ue(b,0,y?E:P-1);M!==b&&(b=M,i.reposition())}function N(){E!==C()&&a(an)}function R(M,Z,gt){if(!ct()){var G=_(M),Q=$(G);Q>-1&&(Z||Q!==b)&&(q(Q),i.move(G,Q,B,gt))}}function W(M,Z,gt,G){e.Scroll.scroll(M,Z,gt,function(){var Q=$(i.toIndex(p()));q(y?Qt(Q,E):Q),G&&G()})}function _(M){var Z=b;if(Zt(M)){var gt=M.match(/([+\-<>])(\d+)?/)||[],G=gt[1],Q=gt[2];G==="+"||G==="-"?Z=j(b+ +(""+G+(+Q||1)),b):G===">"?Z=Q?T(+Q):w(!0):G==="<"&&(Z=v(!0))}else Z=l?M:ue(M,0,E);return Z}function D(M,Z){var gt=L||(it()?1:f),G=j(b+gt*(M?-1:1),b,!(L||it()));return G===-1&&g&&!zo(p(),c(!M),1)?M?0:E:Z?G:$(G)}function j(M,Z,gt){if(I()||it()){var G=d(M);G!==M&&(Z=M,M=G,gt=!1),M<0||M>E?!L&&(tn(0,M,Z,!0)||tn(E,Z,M,!0))?M=T(A(M)):l?M=gt?M<0?-(P%f||f):P:M:n.rewind?M=M<0?E:0:M=-1:gt&&M!==Z&&(M=T(A(Z)+(M<Z?-1:1)))}else M=-1;return M}function d(M){if(g&&n.trimSpace==="move"&&M!==b)for(var Z=p();Z===m(M,!0)&&tn(M,0,t.length-1,!n.rewind);)M<b?--M:++M;return M}function $(M){return l?(M+P)%P||0:M}function C(){for(var M=P-(it()||l&&L?1:f);y&&M-- >0;)if(m(P-1,!0)!==m(M,!0)){M++;break}return ue(M,0,P-1)}function T(M){return ue(it()?M:f*M,0,E)}function A(M){return it()?Qt(M,E):rn((M>=E?P-1:M)/f)}function z(M){var Z=i.toIndex(M);return g?ue(Z,0,E):Z}function q(M){M!==b&&(B=b,b=M)}function at(M){return M?B:b}function it(){return!Ne(n.focus)||n.isNavigation}function ct(){return t.state.is([xe,Me])&&!!n.waitForTransition}return{mount:F,go:R,scroll:W,getNext:w,getPrev:v,getAdjacent:D,getEnd:C,setIndex:q,getIndex:at,toIndex:T,toPage:A,toDest:z,hasFocus:it,isBusy:ct}}var ji="http://www.w3.org/2000/svg",Oi="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",qe=40;function Bi(t,e,n){var o=ht(t),r=o.on,a=o.bind,i=o.emit,p=n.classes,c=n.i18n,m=e.Elements,u=e.Controller,I=m.arrows,S=m.track,y=I,l=m.prev,g=m.next,w,v,b={};function E(){P(),r(wt,B)}function B(){L(),E()}function P(){var W=n.arrows;W&&!(l&&g)&&k(),l&&g&&(Ie(b,{prev:l,next:g}),Re(y,W?"":"none"),zt(y,v=Zn+"--"+n.direction),W&&(f(),R(),et([l,g],Be,S.id),i(Uo,l,g)))}function L(){o.destroy(),Ut(y,v),w?(ae(I?[l,g]:y),l=g=null):Mt([l,g],Jn)}function f(){r([ee,Ce,St,se,an],R),a(g,"click",dt(F,">")),a(l,"click",dt(F,"<"))}function F(W){u.go(W,!0)}function k(){y=I||me("div",p.arrows),l=N(!0),g=N(!1),w=!0,He(y,[l,g]),!I&&Pn(y,S)}function N(W){var _='<button class="'+p.arrow+" "+(W?p.prev:p.next)+'" type="button"><svg xmlns="'+ji+'" viewBox="0 0 '+qe+" "+qe+'" width="'+qe+'" height="'+qe+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Wo(_)}function R(){if(l&&g){var W=t.index,_=u.getPrev(),D=u.getNext(),j=_>-1&&W<_?c.last:c.prev,d=D>-1&&W>D?c.first:c.next;l.disabled=_<0,g.disabled=D<0,et(l,Et,j),et(g,Et,d),i(Go,l,g,_,D)}}return{arrows:b,mount:E,destroy:L,update:R}}var Di=jn+"-interval";function Ui(t,e,n){var o=ht(t),r=o.on,a=o.bind,i=o.emit,p=un(n.interval,t.go.bind(t,">"),f),c=p.isPaused,m=e.Elements,u=e.Elements,I=u.root,S=u.toggle,y=n.autoplay,l,g,w=y==="pause";function v(){y&&(b(),S&&et(S,Be,m.track.id),w||E(),L())}function b(){n.pauseOnHover&&a(I,"mouseenter mouseleave",function(k){l=k.type==="mouseenter",P()}),n.pauseOnFocus&&a(I,"focusin focusout",function(k){g=k.type==="focusin",P()}),S&&a(S,"click",function(){w?E():B(!0)}),r([Yt,pn,St],p.rewind),r(Yt,F)}function E(){c()&&e.Slides.isEnough()&&(p.start(!n.resetProgress),g=l=w=!1,L(),i(Gn))}function B(k){k===void 0&&(k=!0),w=!!k,L(),c()||(p.pause(),i(qn))}function P(){w||(l||g?B(!1):E())}function L(){S&&(Dt(S,le,!w),et(S,Et,n.i18n[w?"play":"pause"]))}function f(k){var N=m.bar;N&&It(N,"width",k*100+"%"),i(Xo,k)}function F(k){var N=e.Slides.getAt(k);p.set(N&&+Rt(N.slide,Di)||n.interval)}return{mount:v,destroy:p.cancel,play:E,pause:B,isPaused:c}}function Gi(t,e,n){var o=ht(t),r=o.on;function a(){n.cover&&(r(Yn,dt(p,!0)),r([ee,wt,St],dt(i,!0)))}function i(c){e.Slides.forEach(function(m){var u=je(m.container||m.slide,"img");u&&u.src&&p(c,u,m)})}function p(c,m,u){u.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),Re(m,c?"none":"")}return{mount:a,destroy:dt(i,!1)}}var qi=10,Yi=600,Xi=.6,Ki=1.5,Ji=800;function Zi(t,e,n){var o=ht(t),r=o.on,a=o.emit,i=t.state.set,p=e.Move,c=p.getPosition,m=p.getLimit,u=p.exceededLimit,I=p.translate,S=t.is(Se),y,l,g=1;function w(){r(Yt,B),r([wt,St],P)}function v(f,F,k,N,R){var W=c();if(B(),k&&(!S||!u())){var _=e.Layout.sliderSize(),D=Ln(f)*_*rn($t(f)/_)||0;f=p.toPosition(e.Controller.toDest(f%_))+D}var j=zo(W,f,1);g=1,F=j?0:F||on($t(f-W)/Ki,Ji),l=N,y=un(F,b,dt(E,W,f,R),1),i(Me),a(pn),y.start()}function b(){i(ve),l&&l(),a(se)}function E(f,F,k,N){var R=c(),W=f+(F-f)*L(N),_=(W-R)*g;I(R+_),S&&!k&&u()&&(g*=Xi,$t(_)<qi&&v(m(u(!0)),Yi,!1,l,!0))}function B(){y&&y.cancel()}function P(){y&&!y.isPaused()&&(B(),b())}function L(f){var F=n.easingFunc;return F?F(f):1-Math.pow(1-f,4)}return{mount:w,destroy:B,scroll:v,cancel:P}}var de={passive:!1,capture:!0};function Qi(t,e,n){var o=ht(t),r=o.on,a=o.emit,i=o.bind,p=o.unbind,c=t.state,m=e.Move,u=e.Scroll,I=e.Controller,S=e.Elements.track,y=e.Media.reduce,l=e.Direction,g=l.resolve,w=l.orient,v=m.getPosition,b=m.exceededLimit,E,B,P,L,f,F=!1,k,N,R;function W(){i(S,wn,An,de),i(S,$n,An,de),i(S,pr,D,de),i(S,"click",$,{capture:!0}),i(S,"dragstart",Bt),r([ee,wt],_)}function _(){var V=n.drag;ft(!V),L=V==="free"}function D(V){if(k=!1,!N){var h=Q(V);G(V.target)&&(h||!V.button)&&(I.isBusy()?Bt(V,!0):(R=h?S:window,f=c.is([xe,Me]),P=null,i(R,wn,j,de),i(R,$n,d,de),m.cancel(),u.cancel(),C(V)))}}function j(V){if(c.is(Ze)||(c.set(Ze),a(Oo)),V.cancelable)if(f){m.translate(E+gt(it(V)));var h=ct(V)>ho,U=F!==(F=b());(h||U)&&C(V),k=!0,a(Bo),Bt(V)}else z(V)&&(f=A(V),Bt(V))}function d(V){c.is(Ze)&&(c.set(ve),a(Do)),f&&(T(V),Bt(V)),p(R,wn,j),p(R,$n,d),f=!1}function $(V){!N&&k&&Bt(V,!0)}function C(V){P=B,B=V,E=v()}function T(V){var h=q(V),U=at(h),X=n.rewind&&n.rewindByDrag;y(!1),L?I.scroll(U,0,n.snap):t.is(De)?I.go(w(Ln(h))<0?X?"<":"-":X?">":"+"):t.is(Se)&&F&&X?I.go(b(!0)?">":"<"):I.go(I.toDest(U),!0),y(!0)}function A(V){var h=n.dragMinThreshold,U=Le(h),X=U&&h.mouse||0,K=(U?h.touch:+h)||10;return $t(it(V))>(Q(V)?K:X)}function z(V){return $t(it(V))>$t(it(V,!0))}function q(V){if(t.is(we)||!F){var h=ct(V);if(h&&h<ho)return it(V)/h}return 0}function at(V){return v()+Ln(V)*Qt($t(V)*(n.flickPower||600),L?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function it(V,h){return Z(V,h)-Z(M(V),h)}function ct(V){return En(V)-En(M(V))}function M(V){return B===V&&P||B}function Z(V,h){return(Q(V)?V.changedTouches[0]:V)["page"+g(h?"Y":"X")]}function gt(V){return V/(F&&t.is(Se)?Ii:1)}function G(V){var h=n.noDrag;return!Fe(V,"."+ir+", ."+hn)&&(!h||!Fe(V,h))}function Q(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function rt(){return f}function ft(V){N=V}return{mount:W,disable:ft,isDragging:rt}}var ta={Spacebar:" ",Right:mn,Left:gn,Up:Zo,Down:Qo};function Qn(t){return t=Zt(t)?t:t.key,ta[t]||t}var vo="keydown";function ea(t,e,n){var o=ht(t),r=o.on,a=o.bind,i=o.unbind,p=t.root,c=e.Direction.resolve,m,u;function I(){S(),r(wt,y),r(wt,S),r(Yt,g)}function S(){var v=n.keyboard;v&&(m=v==="global"?window:p,a(m,vo,w))}function y(){i(m,vo)}function l(v){u=v}function g(){var v=u;u=!0,Lo(function(){u=v})}function w(v){if(!u){var b=Qn(v);b===c(gn)?t.go("<"):b===c(mn)&&t.go(">")}}return{mount:I,destroy:y,disable:l}}var Ee=jn+"-lazy",en=Ee+"-srcset",na="["+Ee+"], ["+en+"]";function oa(t,e,n){var o=ht(t),r=o.on,a=o.off,i=o.bind,p=o.emit,c=n.lazyLoad==="sequential",m=[Ce,se],u=[];function I(){n.lazyLoad&&(S(),r(St,S))}function S(){qt(u),y(),c?v():(a(m),r(m,l),l())}function y(){e.Slides.forEach(function(b){Hn(b.slide,na).forEach(function(E){var B=Rt(E,Ee),P=Rt(E,en);if(B!==E.src||P!==E.srcset){var L=n.classes.spinner,f=E.parentElement,F=je(f,"."+L)||me("span",L,f);u.push([E,b,F]),E.src||Re(E,"none")}})})}function l(){u=u.filter(function(b){var E=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(t.index,E)?g(b):!0}),u.length||a(m)}function g(b){var E=b[0];zt(b[1].slide,Rn),i(E,"load error",dt(w,b)),et(E,"src",Rt(E,Ee)),et(E,"srcset",Rt(E,en)),Mt(E,Ee),Mt(E,en)}function w(b,E){var B=b[0],P=b[1];Ut(P.slide,Rn),E.type!=="error"&&(ae(b[2]),Re(B,""),p(Yn,B,P),p(be)),c&&v()}function v(){u.length&&g(u.shift())}return{mount:I,destroy:dt(qt,u),check:l}}function ra(t,e,n){var o=ht(t),r=o.on,a=o.emit,i=o.bind,p=e.Slides,c=e.Elements,m=e.Controller,u=m.hasFocus,I=m.getIndex,S=m.go,y=e.Direction.resolve,l=c.pagination,g=[],w,v;function b(){E(),r([wt,St,an],b);var N=n.pagination;l&&Re(l,N?"":"none"),N&&(r([Yt,pn,se],k),B(),k(),a(qo,{list:w,items:g},F(t.index)))}function E(){w&&(ae(l?te(w.children):w),Ut(w,v),qt(g),w=null),o.destroy()}function B(){var N=t.length,R=n.classes,W=n.i18n,_=n.perPage,D=u()?m.getEnd()+1:We(N/_);w=l||me("ul",R.pagination,c.track.parentElement),zt(w,v=vn+"--"+f()),et(w,Gt,"tablist"),et(w,Et,W.select),et(w,Kn,f()===fn?"vertical":"");for(var j=0;j<D;j++){var d=me("li",null,w),$=me("button",{class:R.page,type:"button"},d),C=p.getIn(j).map(function(A){return A.slide.id}),T=!u()&&_>1?W.pageX:W.slideX;i($,"click",dt(P,j)),n.paginationKeyboard&&i($,"keydown",dt(L,j)),et(d,Gt,"presentation"),et($,Gt,"tab"),et($,Be,C.join(" ")),et($,Et,Fn(T,j+1)),et($,fe,-1),g.push({li:d,button:$,page:j})}}function P(N){S(">"+N,!0)}function L(N,R){var W=g.length,_=Qn(R),D=f(),j=-1;_===y(mn,!1,D)?j=++N%W:_===y(gn,!1,D)?j=(--N+W)%W:_==="Home"?j=0:_==="End"&&(j=W-1);var d=g[j];d&&(Ro(d.button),S(">"+j),Bt(R,!0))}function f(){return n.paginationDirection||n.direction}function F(N){return g[m.toPage(N)]}function k(){var N=F(I(!0)),R=F(I());if(N){var W=N.button;Ut(W,le),Mt(W,uo),et(W,fe,-1)}if(R){var _=R.button;zt(_,le),et(_,uo,!0),et(_,fe,"")}a(Yo,{list:w,items:g},N,R)}return{items:g,mount:b,destroy:E,getAt:F,update:k}}var ia=[" ","Enter"];function aa(t,e,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){t.splides.forEach(function(l){l.isParent||(m(t,l.splide),m(l.splide,t))}),o&&u()}function p(){a.forEach(function(l){l.destroy()}),qt(a)}function c(){p(),i()}function m(l,g){var w=ht(l);w.on(Yt,function(v,b,E){g.go(g.is(we)?E:v)}),a.push(w)}function u(){var l=ht(t),g=l.on;g(Bn,S),g(Ko,y),g([ee,wt],I),a.push(l),l.emit(Un,t.splides)}function I(){et(e.Elements.list,Kn,n.direction===fn?"vertical":"")}function S(l){t.go(l.index)}function y(l,g){Nn(ia,Qn(g))&&(S(l),Bt(g))}return{setup:dt(e.Media.set,{slideFocus:Ne(r)?o:r},!0),mount:i,destroy:p,remount:c}}function la(t,e,n){var o=ht(t),r=o.bind,a=0;function i(){n.wheel&&r(e.Elements.track,"wheel",p,de)}function p(m){if(m.cancelable){var u=m.deltaY,I=u<0,S=En(m),y=n.wheelMinThreshold||0,l=n.wheelSleep||0;$t(u)>y&&S-a>l&&(t.go(I?"<":">"),a=S),c(I)&&Bt(m)}}function c(m){return!n.releaseWheel||t.state.is(xe)||e.Controller.getAdjacent(m)!==-1}return{mount:i}}var sa=90;function ca(t,e,n){var o=ht(t),r=o.on,a=e.Elements.track,i=n.live&&!n.isNavigation,p=me("span",Ai),c=un(sa,dt(u,!1));function m(){i&&(S(!e.Autoplay.isPaused()),et(a,fo,!0),p.textContent="…",r(Gn,dt(S,!0)),r(qn,dt(S,!1)),r([Ce,se],dt(u,!0)))}function u(y){et(a,mo,y),y?(He(a,p),c.start()):(ae(p),c.cancel())}function I(){Mt(a,[go,fo,mo]),ae(p)}function S(y){i&&et(a,go,y?"off":"polite")}return{mount:m,disable:S,destroy:I}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:Vi,Layout:zi,Clones:Ni,Move:Pi,Controller:Hi,Arrows:Bi,Autoplay:Ui,Cover:Gi,Scroll:Zi,Drag:Qi,Keyboard:ea,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:la,Live:ca}),ua={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"},da={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:Fi,i18n:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(t,e,n){var o=e.Slides;function r(){ht(t).on([ee,St],a)}function a(){o.forEach(function(p){p.style("transform","translateX(-"+100*p.index+"%)")})}function i(p,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Lo(c)}return{mount:r,start:i,cancel:An}}function ma(t,e,n){var o=e.Move,r=e.Controller,a=e.Scroll,i=e.Elements.list,p=dt(It,i,"transition"),c;function m(){ht(t).bind(i,"transitionend",function(y){y.target===i&&c&&(I(),c())})}function u(y,l){var g=o.toPosition(y,!0),w=o.getPosition(),v=S(y);$t(g-w)>=1&&v>=1?n.useScroll?a.scroll(g,v,!1,l):(p("transform "+v+"ms "+n.easing),o.translate(g,!0),c=l):(o.jump(y),l())}function I(){p(""),a.cancel()}function S(y){var l=n.rewindSpeed;if(t.is(Se)&&l){var g=r.getIndex(!0),w=r.getEnd();if(g===0&&y>=w||g>=w&&y===0)return l}return n.speed}return{mount:m,start:u,cancel:I}}var fa=(function(){function t(n,o){this.event=ht(),this.Components={},this.state=yi(ge),this.splides=[],this._o={},this._E={};var r=Zt(n)?Vo(document,n):n;Ae(r,r+" is invalid."),this.root=r,o=Kt({label:Rt(r,Et)||"",labelledby:Rt(r,Xn)||""},da,t.defaults,o||{});try{Kt(o,JSON.parse(Rt(r,jn)))}catch{Ae(!1,"Invalid JSON")}this._o=Object.create(Kt({},o))}var e=t.prototype;return e.mount=function(o,r){var a=this,i=this.state,p=this.Components;Ae(i.is([ge,nn]),"Already mounted!"),i.set(ge),this._C=p,this._T=r||this._T||(this.is(De)?ga:ma),this._E=o||this._E;var c=Ie({},pa,this._E,{Transition:this._T});return ie(c,function(m,u){var I=m(a,p,a._o);p[u]=I,I.setup&&I.setup()}),ie(p,function(m){m.mount&&m.mount()}),this.emit(ee),zt(this.root,Ei),i.set(ve),this.emit(kn),this},e.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ve)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},e.go=function(o){return this._C.Controller.go(o),this},e.on=function(o,r){return this.event.on(o,r),this},e.off=function(o){return this.event.off(o),this},e.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(te(arguments,1))),this},e.add=function(o,r){return this._C.Slides.add(o,r),this},e.remove=function(o){return this._C.Slides.remove(o),this},e.is=function(o){return this._o.type===o},e.refresh=function(){return this.emit(St),this},e.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ge)?ht(this).on(kn,this.destroy.bind(this,o)):(ie(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&qt(this.splides),a.set(nn)),this},ui(t,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t})(),to=fa;to.defaults={};to.STATES=gi;var bo=[[ee,"onMounted"],[kn,"onReady"],[Yt,"onMove"],[Ce,"onMoved"],[Bn,"onClick"],[No,"onActive"],[Po,"onInactive"],[Ho,"onVisible"],[jo,"onHidden"],[St,"onRefresh"],[wt,"onUpdated"],[be,"onResize"],[cn,"onResized"],[Oo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[pn,"onScroll"],[se,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[qo,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[Gn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function eo(...t){return t.filter(Boolean).join(" ")}function ln(t){return t!==null&&typeof t=="object"}function Wn(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,o)=>!Wn(n,e[o]));if(ln(t)&&ln(e)){const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(e,r)||!Wn(t[r],e[r]))}return t===e}function ya(t,e){return t.length===e.length&&!t.some((n,o)=>n!==e[o])}function ha(t,e){if(t){const n=Object.keys(t);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&e(t[r],r)===!1)break}}return t}function Vn(t,e){const n=t;return ha(e,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=Vn(ln(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:t,className:e,...n})=>H.createElement("div",{className:eo("splide__track",e),...n},H.createElement("ul",{className:"splide__list"},t)),ur=class extends H.Component{constructor(){super(...arguments),this.splideRef=H.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new to(o,t),this.bind(this.splide),this.splide.mount(e,n),this.options=Vn({},t||{}),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:t}=this.props;t&&!Wn(this.options,t)&&(this.splide.options=t,this.options=Vn({},t));const e=this.getSlides();ya(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){bo.forEach(([e,n])=>{const o=this.props[n];typeof o=="function"&&t.on(e,(...r)=>{o(t,...r)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:o,...r}=this.props;return H.createElement(e,{className:eo("splide",t),ref:this.splideRef,...this.omit(r,["options",...bo.map(a=>a[1])])},n?H.createElement(va,null,o):o)}},dr=({children:t,className:e,...n})=>H.createElement("li",{className:eo("splide__slide",e),...n},t);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),C=require("react"),ge=require("classnames"),$=require("./useTestimonialTextMeasure-CNYd-juE.js"),yr=require("react-dom");function vr(e){return e.type==="object"&&e.version===1}const br="ControlSlider-module__wrapper___sHEkd",xr="ControlSlider-module__hoverArrow___A-dOH",Sr="ControlSlider-module__sliderItem___QQSkR",Cr="ControlSlider-module__sliderImage___9hRl-",$r="ControlSlider-module__arrow___05ghY",wr="ControlSlider-module__arrowVertical___tBfVN",Tr="ControlSlider-module__nextArrow___-30Yc",_r="ControlSlider-module__arrowInner___aEra3",Ar="ControlSlider-module__arrowIcon___S4ztF",Er="ControlSlider-module__arrowImg___2dwJW",Lr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",kr="ControlSlider-module__paginationInner___bT-P-",Fr="ControlSlider-module__paginationVertical___zYqKw",Pr="ControlSlider-module__paginationItem___nTRbk",Rr="ControlSlider-module__dot___p1Qun",Mr="ControlSlider-module__activeDot___LHFaj",Wr="ControlSlider-module__paginationInsideBottom___R3FWn",Nr="ControlSlider-module__paginationInsideTop___V-qb-",Hr="ControlSlider-module__paginationOutsideBottom___14w8D",Vr="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",zr="ControlSlider-module__paginationOutsideLeft___lahaw",Br="ControlSlider-module__paginationOutsideRight___EtuQa",Dr="ControlSlider-module__imgWrapper___UjEgB",Ur="ControlSlider-module__captionBlock___dJ6-j",qr="ControlSlider-module__captionTextWrapper___HFlpf",Gr="ControlSlider-module__captionText___uGBVc",Yr="ControlSlider-module__active___WZK4G",Xr="ControlSlider-module__withPointerEvents___t-18M",Kr="ControlSlider-module__topLeftAlignment___zjnGM",Zr="ControlSlider-module__topCenterAlignment___gD1xW",Jr="ControlSlider-module__topRightAlignment___NMapS",Qr="ControlSlider-module__middleLeftAlignment___OnUrY",ei="ControlSlider-module__middleCenterAlignment___Tdkl0",ti="ControlSlider-module__middleRightAlignment___wEbfX",ni="ControlSlider-module__bottomLeftAlignment___cTP2-",oi="ControlSlider-module__bottomCenterAlignment___c54fB",ri="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",J={wrapper:br,hoverArrow:xr,sliderItem:Sr,sliderImage:Cr,arrow:$r,arrowVertical:wr,nextArrow:Tr,arrowInner:_r,arrowIcon:Ar,arrowImg:Er,mirror:Lr,pagination:Ir,paginationInner:kr,paginationVertical:Fr,paginationItem:Pr,dot:Rr,activeDot:Mr,paginationInsideBottom:Wr,paginationInsideTop:Nr,paginationOutsideBottom:Hr,paginationOutsideTop:Vr,paginationInsideLeft:jr,paginationInsideRight:Or,paginationOutsideLeft:zr,paginationOutsideRight:Br,imgWrapper:Dr,captionBlock:Ur,captionTextWrapper:qr,captionText:Gr,active:Yr,withPointerEvents:Xr,topLeftAlignment:Kr,topCenterAlignment:Zr,topRightAlignment:Jr,middleLeftAlignment:Qr,middleCenterAlignment:ei,middleRightAlignment:ti,bottomLeftAlignment:ni,bottomCenterAlignment:oi,bottomRightAlignment:ri,clickOverlay:ii,contain:ai,cover:li};function si(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ci(e,t,n){return t&&si(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var no="(prefers-reduced-motion: reduce)",pt=1,ui=2,ft=3,vt=4,Rt=5,Xt=6,Qt=7,pi={CREATED:pt,MOUNTED:ui,IDLE:ft,MOVING:vt,SCROLLING:Rt,DRAGGING:Xt,DESTROYED:Qt};function Ue(e){e.length=0}function Je(e,t,n){return Array.prototype.slice.call(e,t,n)}function ye(e){return e.bind.apply(e,[null].concat(Je(arguments,1)))}var Ao=setTimeout,wn=function(){};function oo(e){return requestAnimationFrame(e)}function rn(e,t){return typeof t===e}function _t(e){return!Rn(e)&&rn("object",e)}var Pn=Array.isArray,Eo=ye(rn,"function"),Ke=ye(rn,"string"),Mt=ye(rn,"undefined");function Rn(e){return e===null}function Lo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Wt(e){return Pn(e)?e:[e]}function Ee(e,t){Wt(e).forEach(t)}function Mn(e,t){return e.indexOf(t)>-1}function Kt(e,t){return e.push.apply(e,Wt(t)),e}function ze(e,t,n){e&&Ee(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Me(e,t){ze(e,Ke(t)?t.split(" "):t,!0)}function Nt(e,t){Ee(t,e.appendChild.bind(e))}function Wn(e,t){Ee(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function At(e,t){return Lo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Io(e,t){var n=e?Je(e.children):[];return t?n.filter(function(o){return At(o,t)}):n}function Ht(e,t){return t?Io(e,t)[0]:e.firstElementChild}var Et=Object.keys;function ot(e,t,n){return e&&(n?Et(e).reverse():Et(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Lt(e){return Je(arguments,1).forEach(function(t){ot(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Je(arguments,1).forEach(function(t){ot(t,function(n,o){Pn(n)?e[o]=n.slice():_t(n)?e[o]=Ye({},_t(e[o])?e[o]:{},n):e[o]=n})}),e}function ro(e,t){Ee(t||Et(e),function(n){delete e[n]})}function We(e,t){Ee(e,function(n){Ee(t,function(o){n&&n.removeAttribute(o)})})}function le(e,t,n){_t(t)?ot(t,function(o,r){le(e,r,o)}):Ee(e,function(o){Rn(n)||n===""?We(o,t):o.setAttribute(t,String(n))})}function dt(e,t,n){var o=document.createElement(e);return t&&(Ke(t)?Me(o,t):le(o,t)),n&&Nt(n,o),o}function Ie(e,t,n){if(Mt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function ko(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ke(e,t){return e.getAttribute(t)}function io(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function rt(e){Ee(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Fo(e){return Ht(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Po(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Je(e.querySelectorAll(t)):[]}function Be(e,t){ze(e,t,!1)}function Tn(e){return e.timeStamp}function nt(e){return Ke(e)?e:e?e+"px":""}var Vt="splide",Hn="data-"+Vt;function wt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Ze=Math.min,en=Math.max,tn=Math.floor,kt=Math.ceil,$e=Math.abs;function Ro(e,t,n){return $e(e-t)<n}function Zt(e,t,n,o){var r=Ze(t,n),a=en(t,n);return o?r<e&&e<a:r<=e&&e<=a}function ct(e,t,n){var o=Ze(t,n),r=en(t,n);return Ze(en(o,e),r)}function _n(e){return+(e>0)-+(e<0)}function An(e,t){return Ee(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var ao={};function di(e){return""+e+Vn(ao[e]=(ao[e]||0)+1)}function Mo(){var e=[];function t(i,u,s,g){r(i,u,function(c,A,x){var f="addEventListener"in c,p=f?c.removeEventListener.bind(c,A,s,g):c.removeListener.bind(c,s);f?c.addEventListener(A,s,g):c.addListener(s),e.push([c,A,x,s,p])})}function n(i,u,s){r(i,u,function(g,c,A){e=e.filter(function(x){return x[0]===g&&x[1]===c&&x[2]===A&&(!s||x[3]===s)?(x[4](),!1):!0})})}function o(i,u,s){var g,c=!0;return typeof CustomEvent=="function"?g=new CustomEvent(u,{bubbles:c,detail:s}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(u,c,!1,s)),i.dispatchEvent(g),g}function r(i,u,s){Ee(i,function(g){g&&Ee(u,function(c){c.split(" ").forEach(function(A){var x=A.split(".");s(g,x[0],x[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var Qe="mounted",En="ready",qe="move",bt="moved",jn="click",Wo="active",No="inactive",Ho="visible",Vo="hidden",xe="refresh",Ce="updated",ht="resize",an="resized",jo="drag",Oo="dragging",zo="dragged",ln="scroll",at="scrolled",gi="overflow",On="destroy",Bo="arrows:mounted",Do="arrows:updated",Uo="pagination:mounted",qo="pagination:updated",zn="navigation:mounted",Bn="autoplay:play",Go="autoplay:playing",Dn="autoplay:pause",Un="lazyload:loaded",Yo="sk",Xo="sh",nn="ei";function ve(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Mo();function o(a,i){n.bind(t,Wt(a).join(" "),function(u){i.apply(i,Pn(u.detail)?u.detail:[])})}function r(a){n.dispatch(t,a,Je(arguments,1))}return e&&e.event.on(On,n.destroy),Lt(n,{bus:t,on:o,off:ye(n.unbind,t),emit:r})}function sn(e,t,n,o){var r=Date.now,a,i=0,u,s=!0,g=0;function c(){if(!s){if(i=e?Ze((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++g>=o))return x();u=oo(c)}}function A(y){y||p(),a=r()-(y?i*e:0),s=!1,u=oo(c)}function x(){s=!0}function f(){a=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,s=!0}function d(y){e=y}function S(){return s}return{start:A,rewind:f,pause:x,cancel:p,set:d,isPaused:S}}function mi(e){var t=e;function n(r){t=r}function o(r){return Mn(Wt(r),t)}return{set:n,is:o}}function fi(e,t){var n=sn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Mo(),u=[];function s(){var p=n.mediaQuery==="min";Et(r).sort(function(d,S){return p?+d-+S:+S-+d}).forEach(function(d){c(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),c(a,no),A()}function g(p){p&&i.destroy()}function c(p,d){var S=matchMedia(d);i.bind(S,"change",A),u.push([p,S])}function A(){var p=o.is(Qt),d=n.direction,S=u.reduce(function(y,v){return Ye(y,v[1].matches?v[0]:{})},{});ro(n),f(S),n.destroy?e.destroy(n.destroy==="completely"):p?(g(!0),e.mount()):d!==n.direction&&e.refresh()}function x(p){matchMedia(no).matches&&(p?Ye(n,a):ro(n,Et(a)))}function f(p,d,S){Ye(n,p),d&&Ye(Object.getPrototypeOf(n),p),(S||!o.is(pt))&&e.emit(Ce,n)}return{setup:s,destroy:g,reduce:x,set:f}}var cn="Arrow",un=cn+"Left",pn=cn+"Right",Ko=cn+"Up",Zo=cn+"Down",lo="rtl",dn="ttb",vn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ko,pn],ArrowRight:[Zo,un]};function yi(e,t,n){function o(a,i,u){u=u||n.direction;var s=u===lo&&!i?1:u===dn?0:-1;return vn[a]&&vn[a][s]||a.replace(/width|left|right/i,function(g,c){var A=vn[g.toLowerCase()][s]||g;return c>0?A.charAt(0).toUpperCase()+A.slice(1):A})}function r(a){return a*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var De="role",gt="tabindex",vi="disabled",Fe="aria-",jt=Fe+"controls",Jo=Fe+"current",so=Fe+"selected",Ae=Fe+"label",qn=Fe+"labelledby",Qo=Fe+"hidden",Gn=Fe+"orientation",Ft=Fe+"roledescription",co=Fe+"live",uo=Fe+"busy",po=Fe+"atomic",Yn=[De,gt,vi,jt,Jo,Ae,qn,Qo,Gn,Ft],Ne=Vt+"__",et="is-",bn=Vt,go=Ne+"track",bi=Ne+"list",gn=Ne+"slide",er=gn+"--clone",xi=gn+"__container",Xn=Ne+"arrows",mn=Ne+"arrow",tr=mn+"--prev",nr=mn+"--next",fn=Ne+"pagination",or=fn+"__page",Si=Ne+"progress",Ci=Si+"__bar",$i=Ne+"toggle",wi=Ne+"spinner",Ti=Ne+"sr",_i=et+"initialized",it=et+"active",rr=et+"prev",ir=et+"next",Ln=et+"visible",In=et+"loading",ar=et+"focus-in",lr=et+"overflow",Ai=[it,Ln,rr,ir,In,ar,lr],Ei={slide:gn,clone:er,arrows:Xn,arrow:mn,prev:tr,next:nr,pagination:fn,page:or,spinner:wi};function Li(e,t){if(Eo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!At(n,t);)n=n.parentElement;return n}var Ii=5,mo=200,sr="touchstart mousedown",xn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function ki(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=e.root,u=n.i18n,s={},g=[],c=[],A=[],x,f,p;function d(){_(),D(),v()}function S(){r(xe,y),r(xe,d),r(Ce,v),a(document,sr+" keydown",function(m){p=m.type==="keydown"},{capture:!0}),a(i,"focusin",function(){ze(i,ar,!!p)})}function y(m){var k=Yn.concat("style");Ue(g),Be(i,c),Be(x,A),We([x,f],k),We(i,m?k:["style",Ft])}function v(){Be(i,c),Be(x,A),c=T(bn),A=T(go),Me(i,c),Me(x,A),le(i,Ae,n.label),le(i,qn,n.labelledby)}function _(){x=V("."+go),f=Ht(x,"."+bi),wt(x&&f,"A track/list element is missing."),Kt(g,Io(f,"."+gn+":not(."+er+")")),ot({arrows:Xn,pagination:fn,prev:tr,next:nr,bar:Ci,toggle:$i},function(m,k){s[k]=V("."+m)}),Lt(s,{root:i,track:x,list:f,slides:g})}function D(){var m=i.id||di(Vt),k=n.role;i.id=m,x.id=x.id||m+"-track",f.id=f.id||m+"-list",!ke(i,De)&&i.tagName!=="SECTION"&&k&&le(i,De,k),le(i,Ft,u.carousel),le(f,De,"presentation")}function V(m){var k=Po(i,m);return k&&Li(k,"."+bn)===i?k:void 0}function T(m){return[m+"--"+n.type,m+"--"+n.direction,n.drag&&m+"--draggable",n.isNavigation&&m+"--nav",m===bn&&it]}return Lt(s,{setup:d,mount:S,destroy:y})}var yt="slide",xt="loop",Ot="fade";function Fi(e,t,n,o){var r=ve(e),a=r.on,i=r.emit,u=r.bind,s=e.Components,g=e.root,c=e.options,A=c.isNavigation,x=c.updateOnMove,f=c.i18n,p=c.pagination,d=c.slideFocus,S=s.Direction.resolve,y=ke(o,"style"),v=ke(o,Ae),_=n>-1,D=Ht(o,"."+xi),V;function T(){_||(o.id=g.id+"-slide"+Vn(t+1),le(o,De,p?"tabpanel":"group"),le(o,Ft,f.slide),le(o,Ae,v||An(f.slideLabel,[t+1,e.length]))),m()}function m(){u(o,"click",ye(i,jn,I)),u(o,"keydown",ye(i,Yo,I)),a([bt,Xo,at],F),a(zn,R),x&&a(qe,O)}function k(){V=!0,r.destroy(),Be(o,Ai),We(o,Yn),le(o,"style",y),le(o,Ae,v||"")}function R(){var L=e.splides.map(function(w){var N=w.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");le(o,Ae,An(f.slideX,(_?n:t)+1)),le(o,jt,L),le(o,De,d?"button":""),d&&We(o,Ft)}function O(){V||F()}function F(){if(!V){var L=e.index;H(),M(),ze(o,rr,t===L-1),ze(o,ir,t===L+1)}}function H(){var L=G();L!==io(o,it)&&(ze(o,it,L),le(o,Jo,A&&L||""),i(L?Wo:No,I))}function M(){var L=h(),w=!L&&(!G()||_);if(e.state.is([vt,Rt])||le(o,Qo,w||""),le(Nn(o,c.focusableNodes||""),gt,w?-1:""),d&&le(o,gt,w?-1:0),L!==io(o,Ln)&&(ze(o,Ln,L),i(L?Ho:Vo,I)),!L&&document.activeElement===o){var N=s.Slides.getAt(e.index);N&&ko(N.slide)}}function X(L,w,N){Ie(N&&D||o,L,w)}function G(){var L=e.index;return L===t||c.cloneStatus&&L===n}function h(){if(e.is(Ot))return G();var L=_e(s.Elements.track),w=_e(o),N=S("left",!0),K=S("right",!0);return tn(L[N])<=kt(w[N])&&tn(w[K])<=kt(L[K])}function E(L,w){var N=$e(L-t);return!_&&(c.rewind||e.is(xt))&&(N=Ze(N,e.length-N)),N<=w}var I={index:t,slideIndex:n,slide:o,container:D,isClone:_,mount:T,destroy:k,update:F,style:X,isWithin:E};return I}function Pi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=t.Elements,s=u.slides,g=u.list,c=[];function A(){x(),r(xe,f),r(xe,x)}function x(){s.forEach(function(F,H){d(F,H,-1)})}function f(){V(function(F){F.destroy()}),Ue(c)}function p(){V(function(F){F.update()})}function d(F,H,M){var X=Fi(e,H,M,F);X.mount(),c.push(X),c.sort(function(G,h){return G.index-h.index})}function S(F){return F?T(function(H){return!H.isClone}):c}function y(F){var H=t.Controller,M=H.toIndex(F),X=H.hasFocus()?1:n.perPage;return T(function(G){return Zt(G.index,M,M+X-1)})}function v(F){return T(F)[0]}function _(F,H){Ee(F,function(M){if(Ke(M)&&(M=Fo(M)),Lo(M)){var X=s[H];X?Wn(M,X):Nt(g,M),Me(M,n.classes.slide),k(M,ye(a,ht))}}),a(xe)}function D(F){rt(T(F).map(function(H){return H.slide})),a(xe)}function V(F,H){S(H).forEach(F)}function T(F){return c.filter(Eo(F)?F:function(H){return Ke(F)?At(H.slide,F):Mn(Wt(F),H.index)})}function m(F,H,M){V(function(X){X.style(F,H,M)})}function k(F,H){var M=Nn(F,"img"),X=M.length;X?M.forEach(function(G){i(G,"load error",function(){--X||H()})}):H()}function R(F){return F?s.length:c.length}function O(){return c.length>n.perPage}return{mount:A,destroy:f,update:p,register:d,get:S,getIn:y,getAt:v,add:_,remove:D,forEach:V,filter:T,style:m,getLength:R,isEnough:O}}function Ri(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=t.Slides,s=t.Direction.resolve,g=t.Elements,c=g.root,A=g.track,x=g.list,f=u.getAt,p=u.style,d,S,y;function v(){_(),a(window,"resize load",fi(ye(i,ht))),r([Ce,xe],_),r(ht,D)}function _(){d=n.direction===dn,Ie(c,"maxWidth",nt(n.width)),Ie(A,s("paddingLeft"),V(!1)),Ie(A,s("paddingRight"),V(!0)),D(!0)}function D(I){var L=_e(c);(I||S.width!==L.width||S.height!==L.height)&&(Ie(A,"height",T()),p(s("marginRight"),nt(n.gap)),p("width",k()),p("height",R(),!0),S=L,i(an),y!==(y=E())&&(ze(c,lr,y),i(gi,y)))}function V(I){var L=n.padding,w=s(I?"right":"left");return L&&nt(L[w]||(_t(L)?0:L))||"0px"}function T(){var I="";return d&&(I=m(),wt(I,"height or heightRatio is missing."),I="calc("+I+" - "+V(!1)+" - "+V(!0)+")"),I}function m(){return nt(n.height||_e(x).width*n.heightRatio)}function k(){return n.autoWidth?null:nt(n.fixedWidth)||(d?"":O())}function R(){return nt(n.fixedHeight)||(d?n.autoHeight?null:O():m())}function O(){var I=nt(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function F(){return _e(x)[s("width")]}function H(I,L){var w=f(I||0);return w?_e(w.slide)[s("width")]+(L?0:G()):0}function M(I,L){var w=f(I);if(w){var N=_e(w.slide)[s("right")],K=_e(x)[s("left")];return $e(N-K)+(L?0:G())}return 0}function X(I){return M(e.length-1)-M(0)+H(0,I)}function G(){var I=f(0);return I&&parseFloat(Ie(I.slide,s("marginRight")))||0}function h(I){return parseFloat(Ie(A,s("padding"+(I?"Right":"Left"))))||0}function E(){return e.is(Ot)||X(!0)>F()}return{mount:v,resize:D,listSize:F,slideSize:H,sliderSize:X,totalSize:M,getPadding:h,isOverflow:E}}var Mi=2;function Wi(e,t,n){var o=ve(e),r=o.on,a=t.Elements,i=t.Slides,u=t.Direction.resolve,s=[],g;function c(){r(xe,A),r([Ce,ht],f),(g=S())&&(p(g),t.Layout.resize(!0))}function A(){x(),c()}function x(){rt(s),Ue(s),o.destroy()}function f(){var y=S();g!==y&&(g<y||!y)&&o.emit(xe)}function p(y){var v=i.get().slice(),_=v.length;if(_){for(;v.length<y;)Kt(v,v);Kt(v.slice(-y),v.slice(0,y)).forEach(function(D,V){var T=V<y,m=d(D.slide,V);T?Wn(m,v[0].slide):Nt(a.list,m),Kt(s,m),i.register(m,V-y+(T?0:_),D.index)})}}function d(y,v){var _=y.cloneNode(!0);return Me(_,n.classes.clone),_.id=e.root.id+"-clone"+Vn(v+1),_}function S(){var y=n.clones;if(!e.is(xt))y=0;else if(Mt(y)){var v=n[u("fixedWidth")]&&t.Layout.slideSize(0),_=v&&kt(_e(a.track)[u("width")]/v);y=_||n[u("autoWidth")]&&e.length||n.perPage*Mi}return y}return{mount:c,destroy:x}}function Ni(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=e.state.set,u=t.Layout,s=u.slideSize,g=u.getPadding,c=u.totalSize,A=u.listSize,x=u.sliderSize,f=t.Direction,p=f.resolve,d=f.orient,S=t.Elements,y=S.list,v=S.track,_;function D(){_=t.Transition,r([Qe,an,Ce,xe],V)}function V(){t.Controller.isBusy()||(t.Scroll.cancel(),m(e.index),t.Slides.update())}function T(w,N,K,ie){w!==N&&I(w>K)&&(F(),k(O(X(),w>K),!0)),i(vt),a(qe,N,K,w),_.start(N,function(){i(ft),a(bt,N,K,w),ie&&ie()})}function m(w){k(M(w,!0))}function k(w,N){if(!e.is(Ot)){var K=N?w:R(w);Ie(y,"transform","translate"+p("X")+"("+K+"px)"),w!==K&&a(Xo)}}function R(w){if(e.is(xt)){var N=H(w),K=N>t.Controller.getEnd(),ie=N<0;(ie||K)&&(w=O(w,K))}return w}function O(w,N){var K=w-E(N),ie=x();return w-=d(ie*(kt($e(K)/ie)||1))*(N?1:-1),w}function F(){k(X(),!0),_.cancel()}function H(w){for(var N=t.Slides.get(),K=0,ie=1/0,ne=0;ne<N.length;ne++){var ce=N[ne].index,P=$e(M(ce,!0)-w);if(P<=ie)ie=P,K=ce;else break}return K}function M(w,N){var K=d(c(w-1)-h(w));return N?G(K):K}function X(){var w=p("left");return _e(y)[w]-_e(v)[w]+d(g(!1))}function G(w){return n.trimSpace&&e.is(yt)&&(w=ct(w,0,d(x(!0)-A()))),w}function h(w){var N=n.focus;return N==="center"?(A()-s(w,!0))/2:+N*s(w)||0}function E(w){return M(w?t.Controller.getEnd():0,!!n.trimSpace)}function I(w){var N=d(O(X(),w));return w?N>=0:N<=y[p("scrollWidth")]-_e(v)[p("width")]}function L(w,N){N=Mt(N)?X():N;var K=w!==!0&&d(N)<d(E(!1)),ie=w!==!1&&d(N)>d(E(!0));return K||ie}return{mount:D,move:T,jump:m,translate:k,shift:O,cancel:F,toIndex:H,toPosition:M,getPosition:X,getLimit:E,exceededLimit:L,reposition:V}}function Hi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=t.Move,u=i.getPosition,s=i.getLimit,g=i.toPosition,c=t.Slides,A=c.isEnough,x=c.getLength,f=n.omitEnd,p=e.is(xt),d=e.is(yt),S=ye(X,!1),y=ye(X,!0),v=n.start||0,_,D=v,V,T,m;function k(){R(),r([Ce,xe,nn],R),r(an,O)}function R(){V=x(!0),T=n.perMove,m=n.perPage,_=I();var P=ct(v,0,f?_:V-1);P!==v&&(v=P,i.reposition())}function O(){_!==I()&&a(nn)}function F(P,Q,de){if(!ce()){var pe=M(P),Y=E(pe);Y>-1&&(Q||Y!==v)&&(K(Y),i.move(pe,Y,D,de))}}function H(P,Q,de,pe){t.Scroll.scroll(P,Q,de,function(){var Y=E(i.toIndex(u()));K(f?Ze(Y,_):Y),pe&&pe()})}function M(P){var Q=v;if(Ke(P)){var de=P.match(/([+\-<>])(\d+)?/)||[],pe=de[1],Y=de[2];pe==="+"||pe==="-"?Q=G(v+ +(""+pe+(+Y||1)),v):pe===">"?Q=Y?L(+Y):S(!0):pe==="<"&&(Q=y(!0))}else Q=p?P:ct(P,0,_);return Q}function X(P,Q){var de=T||(ne()?1:m),pe=G(v+de*(P?-1:1),v,!(T||ne()));return pe===-1&&d&&!Ro(u(),s(!P),1)?P?0:_:Q?pe:E(pe)}function G(P,Q,de){if(A()||ne()){var pe=h(P);pe!==P&&(Q=P,P=pe,de=!1),P<0||P>_?!T&&(Zt(0,P,Q,!0)||Zt(_,Q,P,!0))?P=L(w(P)):p?P=de?P<0?-(V%m||m):V:P:n.rewind?P=P<0?_:0:P=-1:de&&P!==Q&&(P=L(w(Q)+(P<Q?-1:1)))}else P=-1;return P}function h(P){if(d&&n.trimSpace==="move"&&P!==v)for(var Q=u();Q===g(P,!0)&&Zt(P,0,e.length-1,!n.rewind);)P<v?--P:++P;return P}function E(P){return p?(P+V)%V||0:P}function I(){for(var P=V-(ne()||p&&T?1:m);f&&P-- >0;)if(g(V-1,!0)!==g(P,!0)){P++;break}return ct(P,0,V-1)}function L(P){return ct(ne()?P:m*P,0,_)}function w(P){return ne()?Ze(P,_):tn((P>=_?V-1:P)/m)}function N(P){var Q=i.toIndex(P);return d?ct(Q,0,_):Q}function K(P){P!==v&&(D=v,v=P)}function ie(P){return P?D:v}function ne(){return!Mt(n.focus)||n.isNavigation}function ce(){return e.state.is([vt,Rt])&&!!n.waitForTransition}return{mount:k,go:F,scroll:H,getNext:S,getPrev:y,getAdjacent:X,getEnd:I,setIndex:K,getIndex:ie,toIndex:L,toPage:w,toDest:N,hasFocus:ne,isBusy:ce}}var Vi="http://www.w3.org/2000/svg",ji="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",Dt=40;function Oi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=n.classes,s=n.i18n,g=t.Elements,c=t.Controller,A=g.arrows,x=g.track,f=A,p=g.prev,d=g.next,S,y,v={};function _(){V(),r(Ce,D)}function D(){T(),_()}function V(){var H=n.arrows;H&&!(p&&d)&&R(),p&&d&&(Lt(v,{prev:p,next:d}),It(f,H?"":"none"),Me(f,y=Xn+"--"+n.direction),H&&(m(),F(),le([p,d],jt,x.id),i(Bo,p,d)))}function T(){o.destroy(),Be(f,y),S?(rt(A?[p,d]:f),p=d=null):We([p,d],Yn)}function m(){r([Qe,bt,xe,at,nn],F),a(d,"click",ye(k,">")),a(p,"click",ye(k,"<"))}function k(H){c.go(H,!0)}function R(){f=A||dt("div",u.arrows),p=O(!0),d=O(!1),S=!0,Nt(f,[p,d]),!A&&Wn(f,x)}function O(H){var M='<button class="'+u.arrow+" "+(H?u.prev:u.next)+'" type="button"><svg xmlns="'+Vi+'" viewBox="0 0 '+Dt+" "+Dt+'" width="'+Dt+'" height="'+Dt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Fo(M)}function F(){if(p&&d){var H=e.index,M=c.getPrev(),X=c.getNext(),G=M>-1&&H<M?s.last:s.prev,h=X>-1&&H>X?s.first:s.next;p.disabled=M<0,d.disabled=X<0,le(p,Ae,G),le(d,Ae,h),i(Do,p,d,M,X)}}return{arrows:v,mount:_,destroy:T,update:F}}var zi=Hn+"-interval";function Bi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.emit,u=sn(n.interval,e.go.bind(e,">"),m),s=u.isPaused,g=t.Elements,c=t.Elements,A=c.root,x=c.toggle,f=n.autoplay,p,d,S=f==="pause";function y(){f&&(v(),x&&le(x,jt,g.track.id),S||_(),T())}function v(){n.pauseOnHover&&a(A,"mouseenter mouseleave",function(R){p=R.type==="mouseenter",V()}),n.pauseOnFocus&&a(A,"focusin focusout",function(R){d=R.type==="focusin",V()}),x&&a(x,"click",function(){S?_():D(!0)}),r([qe,ln,xe],u.rewind),r(qe,k)}function _(){s()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=S=!1,T(),i(Bn))}function D(R){R===void 0&&(R=!0),S=!!R,T(),s()||(u.pause(),i(Dn))}function V(){S||(p||d?D(!1):_())}function T(){x&&(ze(x,it,!S),le(x,Ae,n.i18n[S?"play":"pause"]))}function m(R){var O=g.bar;O&&Ie(O,"width",R*100+"%"),i(Go,R)}function k(R){var O=t.Slides.getAt(R);u.set(O&&+ke(O.slide,zi)||n.interval)}return{mount:y,destroy:u.cancel,play:_,pause:D,isPaused:s}}function Di(e,t,n){var o=ve(e),r=o.on;function a(){n.cover&&(r(Un,ye(u,!0)),r([Qe,Ce,xe],ye(i,!0)))}function i(s){t.Slides.forEach(function(g){var c=Ht(g.container||g.slide,"img");c&&c.src&&u(s,c,g)})}function u(s,g,c){c.style("background",s?'center/cover no-repeat url("'+g.src+'")':"",!0),It(g,s?"none":"")}return{mount:a,destroy:ye(i,!1)}}var Ui=10,qi=600,Gi=.6,Yi=1.5,Xi=800;function Ki(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=e.state.set,u=t.Move,s=u.getPosition,g=u.getLimit,c=u.exceededLimit,A=u.translate,x=e.is(yt),f,p,d=1;function S(){r(qe,D),r([Ce,xe],V)}function y(m,k,R,O,F){var H=s();if(D(),R&&(!x||!c())){var M=t.Layout.sliderSize(),X=_n(m)*M*tn($e(m)/M)||0;m=u.toPosition(t.Controller.toDest(m%M))+X}var G=Ro(H,m,1);d=1,k=G?0:k||en($e(m-H)/Yi,Xi),p=O,f=sn(k,v,ye(_,H,m,F),1),i(Rt),a(ln),f.start()}function v(){i(ft),p&&p(),a(at)}function _(m,k,R,O){var F=s(),H=m+(k-m)*T(O),M=(H-F)*d;A(F+M),x&&!R&&c()&&(d*=Gi,$e(M)<Ui&&y(g(c(!0)),qi,!1,p,!0))}function D(){f&&f.cancel()}function V(){f&&!f.isPaused()&&(D(),v())}function T(m){var k=n.easingFunc;return k?k(m):1-Math.pow(1-m,4)}return{mount:S,destroy:D,scroll:y,cancel:V}}var ut={passive:!1,capture:!0};function Zi(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=o.unbind,s=e.state,g=t.Move,c=t.Scroll,A=t.Controller,x=t.Elements.track,f=t.Media.reduce,p=t.Direction,d=p.resolve,S=p.orient,y=g.getPosition,v=g.exceededLimit,_,D,V,T,m,k=!1,R,O,F;function H(){i(x,xn,wn,ut),i(x,Sn,wn,ut),i(x,sr,X,ut),i(x,"click",E,{capture:!0}),i(x,"dragstart",Oe),r([Qe,Ce],M)}function M(){var j=n.drag;fe(!j),T=j==="free"}function X(j){if(R=!1,!O){var b=Y(j);pe(j.target)&&(b||!j.button)&&(A.isBusy()?Oe(j,!0):(F=b?x:window,m=s.is([vt,Rt]),V=null,i(F,xn,G,ut),i(F,Sn,h,ut),g.cancel(),c.cancel(),I(j)))}}function G(j){if(s.is(Xt)||(s.set(Xt),a(jo)),j.cancelable)if(m){g.translate(_+de(ne(j)));var b=ce(j)>mo,U=k!==(k=v());(b||U)&&I(j),R=!0,a(Oo),Oe(j)}else N(j)&&(m=w(j),Oe(j))}function h(j){s.is(Xt)&&(s.set(ft),a(zo)),m&&(L(j),Oe(j)),u(F,xn,G),u(F,Sn,h),m=!1}function E(j){!O&&R&&Oe(j,!0)}function I(j){V=D,D=j,_=y()}function L(j){var b=K(j),U=ie(b),Z=n.rewind&&n.rewindByDrag;f(!1),T?A.scroll(U,0,n.snap):e.is(Ot)?A.go(S(_n(b))<0?Z?"<":"-":Z?">":"+"):e.is(yt)&&k&&Z?A.go(v(!0)?">":"<"):A.go(A.toDest(U),!0),f(!0)}function w(j){var b=n.dragMinThreshold,U=_t(b),Z=U&&b.mouse||0,te=(U?b.touch:+b)||10;return $e(ne(j))>(Y(j)?te:Z)}function N(j){return $e(ne(j))>$e(ne(j,!0))}function K(j){if(e.is(xt)||!k){var b=ce(j);if(b&&b<mo)return ne(j)/b}return 0}function ie(j){return y()+_n(j)*Ze($e(j)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(j,b){return Q(j,b)-Q(P(j),b)}function ce(j){return Tn(j)-Tn(P(j))}function P(j){return D===j&&V||D}function Q(j,b){return(Y(j)?j.changedTouches[0]:j)["page"+d(b?"Y":"X")]}function de(j){return j/(k&&e.is(yt)?Ii:1)}function pe(j){var b=n.noDrag;return!At(j,"."+or+", ."+mn)&&(!b||!At(j,b))}function Y(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function ae(){return m}function fe(j){O=j}return{mount:H,disable:fe,isDragging:ae}}var Ji={Spacebar:" ",Right:pn,Left:un,Up:Ko,Down:Zo};function Kn(e){return e=Ke(e)?e:e.key,Ji[e]||e}var fo="keydown";function Qi(e,t,n){var o=ve(e),r=o.on,a=o.bind,i=o.unbind,u=e.root,s=t.Direction.resolve,g,c;function A(){x(),r(Ce,f),r(Ce,x),r(qe,d)}function x(){var y=n.keyboard;y&&(g=y==="global"?window:u,a(g,fo,S))}function f(){i(g,fo)}function p(y){c=y}function d(){var y=c;c=!0,Ao(function(){c=y})}function S(y){if(!c){var v=Kn(y);v===s(un)?e.go("<"):v===s(pn)&&e.go(">")}}return{mount:A,destroy:f,disable:p}}var Tt=Hn+"-lazy",Jt=Tt+"-srcset",ea="["+Tt+"], ["+Jt+"]";function ta(e,t,n){var o=ve(e),r=o.on,a=o.off,i=o.bind,u=o.emit,s=n.lazyLoad==="sequential",g=[bt,at],c=[];function A(){n.lazyLoad&&(x(),r(xe,x))}function x(){Ue(c),f(),s?y():(a(g),r(g,p),p())}function f(){t.Slides.forEach(function(v){Nn(v.slide,ea).forEach(function(_){var D=ke(_,Tt),V=ke(_,Jt);if(D!==_.src||V!==_.srcset){var T=n.classes.spinner,m=_.parentElement,k=Ht(m,"."+T)||dt("span",T,m);c.push([_,v,k]),_.src||It(_,"none")}})})}function p(){c=c.filter(function(v){var _=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,_)?d(v):!0}),c.length||a(g)}function d(v){var _=v[0];Me(v[1].slide,In),i(_,"load error",ye(S,v)),le(_,"src",ke(_,Tt)),le(_,"srcset",ke(_,Jt)),We(_,Tt),We(_,Jt)}function S(v,_){var D=v[0],V=v[1];Be(V.slide,In),_.type!=="error"&&(rt(v[2]),It(D,""),u(Un,D,V),u(ht)),s&&y()}function y(){c.length&&d(c.shift())}return{mount:A,destroy:ye(Ue,c),check:p}}function na(e,t,n){var o=ve(e),r=o.on,a=o.emit,i=o.bind,u=t.Slides,s=t.Elements,g=t.Controller,c=g.hasFocus,A=g.getIndex,x=g.go,f=t.Direction.resolve,p=s.pagination,d=[],S,y;function v(){_(),r([Ce,xe,nn],v);var O=n.pagination;p&&It(p,O?"":"none"),O&&(r([qe,ln,at],R),D(),R(),a(Uo,{list:S,items:d},k(e.index)))}function _(){S&&(rt(p?Je(S.children):S),Be(S,y),Ue(d),S=null),o.destroy()}function D(){var O=e.length,F=n.classes,H=n.i18n,M=n.perPage,X=c()?g.getEnd()+1:kt(O/M);S=p||dt("ul",F.pagination,s.track.parentElement),Me(S,y=fn+"--"+m()),le(S,De,"tablist"),le(S,Ae,H.select),le(S,Gn,m()===dn?"vertical":"");for(var G=0;G<X;G++){var h=dt("li",null,S),E=dt("button",{class:F.page,type:"button"},h),I=u.getIn(G).map(function(w){return w.slide.id}),L=!c()&&M>1?H.pageX:H.slideX;i(E,"click",ye(V,G)),n.paginationKeyboard&&i(E,"keydown",ye(T,G)),le(h,De,"presentation"),le(E,De,"tab"),le(E,jt,I.join(" ")),le(E,Ae,An(L,G+1)),le(E,gt,-1),d.push({li:h,button:E,page:G})}}function V(O){x(">"+O,!0)}function T(O,F){var H=d.length,M=Kn(F),X=m(),G=-1;M===f(pn,!1,X)?G=++O%H:M===f(un,!1,X)?G=(--O+H)%H:M==="Home"?G=0:M==="End"&&(G=H-1);var h=d[G];h&&(ko(h.button),x(">"+G),Oe(F,!0))}function m(){return n.paginationDirection||n.direction}function k(O){return d[g.toPage(O)]}function R(){var O=k(A(!0)),F=k(A());if(O){var H=O.button;Be(H,it),We(H,so),le(H,gt,-1)}if(F){var M=F.button;Me(M,it),le(M,so,!0),le(M,gt,"")}a(qo,{list:S,items:d},O,F)}return{items:d,mount:v,destroy:_,getAt:k,update:R}}var oa=[" ","Enter"];function ra(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(p){p.isParent||(g(e,p.splide),g(p.splide,e))}),o&&c()}function u(){a.forEach(function(p){p.destroy()}),Ue(a)}function s(){u(),i()}function g(p,d){var S=ve(p);S.on(qe,function(y,v,_){d.go(d.is(xt)?_:y)}),a.push(S)}function c(){var p=ve(e),d=p.on;d(jn,x),d(Yo,f),d([Qe,Ce],A),a.push(p),p.emit(zn,e.splides)}function A(){le(t.Elements.list,Gn,n.direction===dn?"vertical":"")}function x(p){e.go(p.index)}function f(p,d){Mn(oa,Kn(d))&&(x(p),Oe(d))}return{setup:ye(t.Media.set,{slideFocus:Mt(r)?o:r},!0),mount:i,destroy:u,remount:s}}function ia(e,t,n){var o=ve(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,ut)}function u(g){if(g.cancelable){var c=g.deltaY,A=c<0,x=Tn(g),f=n.wheelMinThreshold||0,p=n.wheelSleep||0;$e(c)>f&&x-a>p&&(e.go(A?"<":">"),a=x),s(A)&&Oe(g)}}function s(g){return!n.releaseWheel||e.state.is(vt)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var aa=90;function la(e,t,n){var o=ve(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,u=dt("span",Ti),s=sn(aa,ye(c,!1));function g(){i&&(x(!t.Autoplay.isPaused()),le(a,po,!0),u.textContent="…",r(Bn,ye(x,!0)),r(Dn,ye(x,!1)),r([bt,at],ye(c,!0)))}function c(f){le(a,uo,f),f?(Nt(a,u),s.start()):(rt(u),s.cancel())}function A(){We(a,[co,po,uo]),rt(u)}function x(f){i&&le(a,co,f?"off":"polite")}return{mount:g,disable:x,destroy:A}}var sa=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:ki,Slides:Pi,Layout:Ri,Clones:Wi,Move:Ni,Controller:Hi,Arrows:Oi,Autoplay:Bi,Cover:Di,Scroll:Ki,Drag:Zi,Keyboard:Qi,LazyLoad:ta,Pagination:na,Sync:ra,Wheel:ia,Live:la}),ca={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"},ua={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:Ei,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(e,t,n){var o=t.Slides;function r(){ve(e).on([Qe,xe],a)}function a(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(s)}return{mount:r,start:i,cancel:wn}}function da(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,u=ye(Ie,i,"transition"),s;function g(){ve(e).bind(i,"transitionend",function(f){f.target===i&&s&&(A(),s())})}function c(f,p){var d=o.toPosition(f,!0),S=o.getPosition(),y=x(f);$e(d-S)>=1&&y>=1?n.useScroll?a.scroll(d,y,!1,p):(u("transform "+y+"ms "+n.easing),o.translate(d,!0),s=p):(o.jump(f),p())}function A(){u(""),a.cancel()}function x(f){var p=n.rewindSpeed;if(e.is(yt)&&p){var d=r.getIndex(!0),S=r.getEnd();if(d===0&&f>=S||d>=S&&f===0)return p}return n.speed}return{mount:g,start:c,cancel:A}}var ga=(function(){function e(n,o){this.event=ve(),this.Components={},this.state=mi(pt),this.splides=[],this._o={},this._E={};var r=Ke(n)?Po(document,n):n;wt(r,r+" is invalid."),this.root=r,o=Ye({label:ke(r,Ae)||"",labelledby:ke(r,qn)||""},ua,e.defaults,o||{});try{Ye(o,JSON.parse(ke(r,Hn)))}catch{wt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,u=this.Components;wt(i.is([pt,Qt]),"Already mounted!"),i.set(pt),this._C=u,this._T=r||this._T||(this.is(Ot)?pa:da),this._E=o||this._E;var s=Lt({},sa,this._E,{Transition:this._T});return ot(s,function(g,c){var A=g(a,u,a._o);u[c]=A,A.setup&&A.setup()}),ot(u,function(g){g.mount&&g.mount()}),this.emit(Qe),Me(this.root,_i),i.set(ft),this.emit(En),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ft)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Je(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(xe),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(pt)?ve(this).on(En,this.destroy.bind(this,o)):(ot(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(On),r.destroy(),o&&Ue(this.splides),a.set(Qt)),this},ci(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Zn=ga;Zn.defaults={};Zn.STATES=pi;var ho=[[Qe,"onMounted"],[En,"onReady"],[qe,"onMove"],[bt,"onMoved"],[jn,"onClick"],[Wo,"onActive"],[No,"onInactive"],[Ho,"onVisible"],[Vo,"onHidden"],[xe,"onRefresh"],[Ce,"onUpdated"],[ht,"onResize"],[an,"onResized"],[jo,"onDrag"],[Oo,"onDragging"],[zo,"onDragged"],[ln,"onScroll"],[at,"onScrolled"],[On,"onDestroy"],[Bo,"onArrowsMounted"],[Do,"onArrowsUpdated"],[Uo,"onPaginationMounted"],[qo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Bn,"onAutoplayPlay"],[Go,"onAutoplayPlaying"],[Dn,"onAutoplayPause"],[Un,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function on(e){return e!==null&&typeof e=="object"}function kn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!kn(n,t[o]));if(on(e)&&on(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!kn(e[r],t[r]))}return e===t}function ma(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function fa(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Fn(e,t){const n=e;return fa(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():on(o)?n[r]=Fn(on(n[r])?n[r]:{},o):n[r]=o}),n}var ha=({children:e,className:t,...n})=>C.createElement("div",{className:Jn("splide__track",t),...n},C.createElement("ul",{className:"splide__list"},e)),cr=class extends C.Component{constructor(){super(...arguments),this.splideRef=C.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Zn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Fn({},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&&!kn(this.options,e)&&(this.splide.options=e,this.options=Fn({},e));const t=this.getSlides();ma(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){ho.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}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:o,...r}=this.props;return C.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...ho.map(a=>a[1])])},n?C.createElement(ha,null,o):o)}},ur=({children:e,className:t,...n})=>C.createElement("li",{className:Jn("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 ba="RichTextRenderer-module__link___BWeZ2",Sa={link:ba},ze=({content:t})=>{const e=n=>n.map((o,r)=>o.type==="link"?s.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:e(o.children)},r):s.jsx("span",{style:xa(o),children:o.text},r));return s.jsx(s.Fragment,{children:t.map((n,o)=>{const r=n.children;return s.jsx("div",{children:e(r)},o)})})};function xa(t){return{...t.fontFamily&&{fontFamily:t.fontFamily},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const Ca="SvgImage-module__svg___q3xE-",wa="SvgImage-module__img___VsTm-",So={svg:Ca,img:wa},$a=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},Ta=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ye=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=H.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return H.useEffect(()=>{if(typeof window<"u"&&window.CSS){const p=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(p)}},[]),!$a(t)||!a?s.jsx("img",{src:t,alt:"",className:mt(So.img,o),style:r}):s.jsx("span",{"data-supports-mask":a,className:mt(So.svg,o),style:{"--svg":Ta(t),"--fill":e,"--hover-fill":n,...r??{}}})},_a={"top-left":Y.topLeftAlignment,"top-center":Y.topCenterAlignment,"top-right":Y.topRightAlignment,"middle-left":Y.middleLeftAlignment,"middle-center":Y.middleCenterAlignment,"middle-right":Y.middleRightAlignment,"bottom-left":Y.bottomLeftAlignment,"bottom-center":Y.bottomCenterAlignment,"bottom-right":Y.bottomRightAlignment};function Aa({settings:t,content:e,styles:n,isEditor:o}){const[r,a]=H.useState(null),{widthSettings:i,fontSettings:p,letterSpacing:c,textAlign:m,wordSpacing:u,fontSizeLineHeight:I,textAppearance:S,color:y}=n.imageCaption,[l,g]=H.useState(void 0),[w,v]=H.useState(null),[b,E]=H.useState(0),[B,P]=H.useState(0),{direction:L,transition:f,controls:F,pagination:k,imageCaption:N,triggers:R}=t,W=H.useRef(f.type),{x:_,y:D}=t.controls.offset,j=d=>{r&&r.go(d)};return H.useEffect(()=>{if(!w)return;const d=new ResizeObserver($=>{if(!r)return;const[C]=$;g({width:Math.round(C.contentRect.width),height:Math.round(C.contentRect.height)})});return d.observe(w),()=>d.unobserve(w)},[w]),H.useEffect(()=>{!r||W.current===f.type||(P(d=>d+1),W.current=f.type)},[f.type]),s.jsx("div",{className:mt(Y.wrapper,{[Y.editor]:o}),ref:v,children:s.jsxs("div",{className:Y.sliderInner,style:{width:l?l.width:"100%",height:l?l.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&s.jsx("div",{className:mt(Y.captionBlock),children:s.jsx("div",{className:Y.captionTextWrapper,children:e.map((d,$)=>s.jsx("div",{className:mt(Y.captionText,_a[N.alignment],{[Y.withPointerEvents]:$===b&&o,[Y.active]:$===b}),style:{fontFamily:p.fontFamily,fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:i.sizing==="auto"?"max-content":x.scalingValue(i.width,o),letterSpacing:x.scalingValue(c,o),wordSpacing:x.scalingValue(u,o),textAlign:m,fontSize:x.scalingValue(I.fontSize,o),lineHeight:x.scalingValue(I.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:y,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:s.jsx("div",{"data-styles":"imageCaption",className:Y.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:x.scalingValue(N.offset.y,o),left:x.scalingValue(N.offset.x,o)},children:s.jsx(ze,{content:d.imageCaption})})},$))})}),s.jsx(ur,{onMove:d=>{E(d.index)},ref:a,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:L==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:l?l.width:"100%",height:l?l.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((d,$)=>s.jsx(dr,{children:s.jsx("div",{className:Y.sliderItem,children:s.jsx("div",{className:Y.imgWrapper,children:s.jsx("img",{className:mt(Y.sliderImage,{[Y.contain]:d.image.objectFit==="contain",[Y.cover]:d.image.objectFit==="cover"}),src:d.image.url,alt:d.image.name??""})})})},$))},B),F.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:mt(Y.arrow,{[Y.arrowVertical]:L==="vert",[Y.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:s.jsxs("button",{onClick:()=>{j("-1")},className:Y.arrowInner,style:{transform:`translate(${x.scalingValue(_,o)}, ${x.scalingValue(D*(L==="horiz"?1:-1),o)}) scale(${t.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&s.jsx(ye,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:mt(Y.arrowImg,Y.mirror)}),!F.arrowsImgUrl&&s.jsx(xo,{color:F.color,className:mt(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),s.jsx("div",{className:mt(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:L==="vert",[Y.hoverArrow]:F.show==="on hover"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:s.jsxs("button",{className:Y.arrowInner,onClick:()=>j("+1"),style:{transform:`translate(${x.scalingValue(_*(L==="horiz"?-1:1),o)}, ${x.scalingValue(D,o)}) scale(${t.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[F.arrowsImgUrl&&s.jsx(ye,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:Y.arrowImg}),!F.arrowsImgUrl&&s.jsx(xo,{color:F.color,className:mt(Y.arrowIcon,Y.arrowImg)})]})})]}),R.triggersList.click&&s.jsx("div",{className:Y.clickOverlay,onClick:()=>{r&&r.go("+1")}}),k.isActive&&s.jsx("div",{className:mt(Y.pagination,{[Y.paginationInsideBottom]:k.position==="inside-1"&&L==="horiz",[Y.paginationInsideTop]:k.position==="inside-2"&&L==="horiz",[Y.paginationOutsideBottom]:k.position==="outside-1"&&L==="horiz",[Y.paginationOutsideTop]:k.position==="outside-2"&&L==="horiz",[Y.paginationInsideLeft]:k.position==="inside-1"&&L==="vert",[Y.paginationInsideRight]:k.position==="inside-2"&&L==="vert",[Y.paginationOutsideLeft]:k.position==="outside-1"&&L==="vert",[Y.paginationOutsideRight]:k.position==="outside-2"&&L==="vert",[Y.paginationVertical]:L==="vert"}),children:s.jsx("div",{className:Y.paginationInner,style:{backgroundColor:k.colors[2],transform:`scale(${k.scale/100}) translate(${x.scalingValue(k.offset.x,o)}, ${x.scalingValue(k.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:e.map((d,$)=>s.jsx("button",{onClick:()=>{r&&r.go($)},className:mt(Y.paginationItem),children:s.jsx("div",{className:mt(Y.dot,{[Y.activeDot]:$===b}),style:{backgroundColor:$===b?k.colors[0]:k.colors[1],"--pagination-hover-color":k.hover}})},$))})})]})})}function xo({color:t,className:e}){return s.jsx("svg",{viewBox:"0 0 10 18",className:e,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ea={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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:"outside-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"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",ka="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",pe={imageRevealSlider:La,image:Fa,link:ka,cursor:Ia};function Co(t,e,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,p=a/2,c=i/2;if(t>=o.x-p&&t<=o.x+p&&e>=o.y-c&&e<=o.y+c)return!0}return!1}function Tn(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(t,e,n,o){let r,a;if(e==="custom"){r=n;const i=await Tn(t);a=i.height/i.width*r}else if(e==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Tn(t);a=i.height/i.width*r}else{const i=await Tn(t);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Wa({settings:t,content:e,isEditor:n}){const[o,r]=H.useState(null),[a,i]=H.useState([]),[p,c]=H.useState(0),m=H.useRef(0),[u,I]=H.useState({x:0,y:0}),[S,y]=H.useState(1),[l,g]=H.useState("none"),w=H.useRef({x:0,y:0}),[v,b]=H.useState(!1),{sizeType:E,imageWidth:B,randomRangeImageWidth:P}=t.imageSize,{revealPosition:L,visible:f}=t.position,{cursorType:F,target:k,defaultCursorScale:N,defaultCursor:R,hoverCursorScale:W,hoverCursor:_}=t.cursor;H.useEffect(()=>{if(!o)return;const d=(T,A)=>{const z=o.getBoundingClientRect(),q=T-z.left,at=A-z.top;if(I({x:q,y:at}),F==="system"){g("none"),y(1);return}const it=q,ct=at,M=document.elementFromPoint(z.left+it,z.top+ct);if(M&&M.closest("a")){g("none"),y(1);return}const Z=Co(it,ct,a)||k==="area"?{img:_??"none",scale:W}:{img:R??"none",scale:N};g(Z.img),y(Z.scale)},$=T=>{T.stopPropagation(),w.current={x:T.clientX,y:T.clientY},d(T.clientX,T.clientY)},C=()=>{v&&d(w.current.x,w.current.y)};return o.addEventListener("mousemove",$),window.addEventListener("scroll",C,!0),()=>{o.removeEventListener("mousemove",$),window.removeEventListener("scroll",C,!0)}},[o,v,u,F,k,_,R,W,N,a]),H.useEffect(()=>{v||(g("none"),y(0))},[v]);const D=async(d,$,C,T={})=>{const{width:A,height:z,finalWidth:q}=await Ra(d.image.url,E,B,P);let at=0,it=0;L==="same"?(at=$/2,it=C/2):(at=T.x??Math.random()*$,it=T.y??Math.random()*C);const ct=Math.min(Math.max(at,A/2),$-A/2),M=Math.min(Math.max(it,z/2),C-z/2);return{id:m.current++,url:d.image.url,link:d.link,name:d.image.name,x:ct,y:M,width:q}};H.useEffect(()=>{if(!o||e.length===0)return;const d=o.getBoundingClientRect(),$=d.width,C=d.height,T=[];(async()=>{const z=e[0],q=await D(z,$,C);T.push(q),i(T),c(1)})()},[E,B,P,L,o]),H.useEffect(()=>{f==="last One"&&i(d=>d.length>0?[d[d.length-1]]:[])},[f]);const j=async d=>{if(!o)return;const $=o.getBoundingClientRect(),C=d.clientX-$.left,T=d.clientY-$.top;if(k==="image"&&!Co(C,T,a))return;let A=0,z=0;L==="on Click"?(A=C,z=T):L==="same"?(A=$.width/2,z=$.height/2):(A=Math.random()*$.width,z=Math.random()*$.height);const q=e[p],at=await D(q,$.width,$.height,{x:A,y:z});i(it=>f==="all"?[...it,at]:[at]),c(it=>it>=e.length-1?0:it+1)};return s.jsxs("div",{ref:r,onClick:j,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:pe.imageRevealSlider,style:{cursor:l==="none"?"default":"none"},children:[a.map(d=>s.jsx("div",{className:pe.wrapper,style:{top:`${d.y}px`,left:`${d.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:d.width??"auto",height:"auto",cursor:l==="none"?"default":"none"},children:k==="area"&&d.link?s.jsx("a",{href:d.link,target:"_blank",className:pe.link,children:s.jsx("img",{src:d.url,alt:d.name,className:pe.image},d.id)}):s.jsx("img",{src:d.url,alt:d.name,className:pe.image},d.id)},d.id)),v&&s.jsx("div",{className:pe.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${l}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Va={element:Wa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{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:""}]}}}},za="LightBox-module__hidden___9s-9x",Ma="LightBox-module__heroImage___sTxNF",Na="LightBox-module__background___rm9ml",Pa="LightBox-module__editor___4ACaY",Ha="LightBox-module__contentStyle___Bgnsq",ja="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",Ga="LightBox-module__captionTextInner___rCGNH",qa="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Za="LightBox-module__arrowIcon___3VaFf",Qa="LightBox-module__arrowImg___pNV88",tl="LightBox-module__mirror___pjeXc",el="LightBox-module__thumbsWrapper___GB-nU",nl="LightBox-module__thumbsContainerVertical___wttk5",ol="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",il="LightBox-module__thumbsAlignCenter___Q4sUx",al="LightBox-module__thumbsAlignEnd___p4y9R",ll="LightBox-module__thumbItem___HvnF3",sl="LightBox-module__closeButton___g2khP",cl="LightBox-module__fadeIn___0m5GW",pl="LightBox-module__slideInLeft___gPYwC",ul="LightBox-module__slideInRight___S-pPp",dl="LightBox-module__slideInTop___DFdAj",gl="LightBox-module__slideInBottom___m27kZ",ml="LightBox-module__fadeOut___55qBR",fl="LightBox-module__slideOutLeft___NvU7P",yl="LightBox-module__slideOutRight___SK7eC",hl="LightBox-module__slideOutTop___Vgg0z",vl="LightBox-module__slideOutBottom___nJ0Ef",bl="LightBox-module__scaleSlide___vZriG",O={hidden:za,heroImage:Ma,background:Na,editor:Pa,contentStyle:Ha,imageStyle:ja,imgWrapper:Oa,contain:Ba,cover:Da,caption:Ua,captionTextInner:Ga,lightboxSplide:qa,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Ja,arrowIcon:Za,arrowImg:Qa,mirror:tl,thumbsWrapper:el,thumbsContainerVertical:nl,thumbsContainer:ol,thumbsAlignStart:rl,thumbsAlignCenter:il,thumbsAlignEnd:al,thumbItem:ll,closeButton:sl,fadeIn:cl,slideInLeft:pl,slideInRight:ul,slideInTop:dl,slideInBottom:gl,fadeOut:ml,slideOutLeft:fl,slideOutRight:yl,slideOutTop:hl,slideOutBottom:vl,scaleSlide:bl},Ye=(t,e,n)=>{const o={},[r,a]=t.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${x.scalingValue(e.x,n)}), calc(-50% + ${x.scalingValue(e.y,n)}))`:r==="middle"?o.transform=`translate(${x.scalingValue(e.x,n)}, calc(-50% + ${x.scalingValue(e.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${x.scalingValue(e.x,n)}), ${x.scalingValue(e.y,n)})`:o.transform=`translate(${x.scalingValue(e.x,n)}, ${x.scalingValue(e.y,n)})`,o};function gr(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function wo(t){const e=t.getBoundingClientRect(),n=gr(t),o=Math.max(0,e.width-n.left-n.right),r=Math.max(0,e.height-n.top-n.bottom),a=t.naturalWidth,i=t.naturalHeight,p=o/r,c=a/i;let m,u;c>p?(m=o,u=o/c):(u=r,m=r*c);const I=e.left+n.left,S=e.top+n.top,y=(o-m)/2+I,l=(r-u)/2+S;return{x:y,y:l,width:m,height:u}}function $o(t){const e=t.getBoundingClientRect(),n=gr(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function To(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const o=e[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Sl(t,e){const n=(()=>{if(t==="fade in")return O.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return O.slideInLeft;case"right":return O.slideInRight;case"top":return O.slideInTop;case"bottom":return O.slideInBottom;default:return O.slideInRight}return O.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return O.fadeIn;if(t==="slide in")switch(e){case"left":return O.slideInLeft;case"right":return O.slideInRight;case"top":return O.slideInTop;case"bottom":return O.slideInBottom;default:return O.slideInRight}return O.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return O.fadeOut;if(t==="slide in")switch(e){case"left":return O.slideOutLeft;case"right":return O.slideOutRight;case"top":return O.slideOutTop;case"bottom":return O.slideOutBottom;default:return O.slideOutRight}return O.fadeOut})(),a=(()=>{if(t==="fade in")return O.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return O.slideOutLeft;case"right":return O.slideOutRight;case"top":return O.slideOutTop;case"bottom":return O.slideOutBottom;default:return O.slideOutRight}return O.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const xl=({settings:t,content:e,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,p]=H.useState(!1),{url:c}=t.thumbnailBlock.cover;return H.useEffect(()=>{r==="close"&&p(!1),r==="open"&&p(!0)},[r]),s.jsxs(s.Fragment,{children:[s.jsx("img",{src:c,alt:"Cover",className:O.heroImage,onClick:()=>p(!0)}),s.jsx(Cl,{isOpen:i,onClose:()=>p(!1),content:e,settings:t,lightboxStyles:n,portalId:o,isEditor:a})]})},Cl=({isOpen:t,onClose:e,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:p})=>{var V;const[c,m]=H.useState(0),[u,I]=H.useState(0),[S,y]=H.useState(!1),[l,g]=H.useState(!1),[w,v]=H.useState({}),b=H.useRef(null),E=H.useRef(null),B=H.useRef(null),P=H.useRef(!1),L=H.useRef(null),f=H.useRef(null),F=H.useRef(null),k=H.useRef(null),N=H.useRef(!1),R=H.useRef(null),[W,_]=H.useState(!1),{appear:D,triggers:j,slider:d,thumbnail:$,controls:C,area:T,caption:A,layout:z}=r.lightboxBlock,{appearClass:q,backdropAppearClass:at,backdropDisappearClass:it,disappearClass:ct}=Sl(D.type,D.direction),M=(p==null?void 0:p.itemId)??null;H.useEffect(()=>{const h=()=>{setTimeout(()=>{var X,K;(K=(X=b.current)==null?void 0:X.splide)==null||K.refresh()},16)},U=()=>{I(X=>X+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),H.useEffect(()=>{if(!t||!$.isActive){_(!1);return}const h=R.current;if(!h)return;const U=()=>{d.direction==="horiz"?_(h.scrollWidth>h.clientWidth):_(h.scrollHeight>h.clientHeight)};U();const X=new ResizeObserver(U);return X.observe(h),()=>X.disconnect()},[t,$.isActive,n.length,w,d.direction]);const Z=H.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,U=To(T.color);h&&!i&&U>.9&&(document.body.style.backgroundColor=""),y(!0),P.current=!0;const X=K=>{K.target===L.current&&K.animationName&&(L.current&&f.current&&L.current.removeEventListener("animationend",f.current),f.current=null,P.current&&(P.current=!1,e()),y(!1))};L.current&&(f.current=X,L.current.addEventListener("animationend",X))},[e,T.color,i]),gt=(h,U,X)=>{var K,nt;if(h){if(j.type==="click"&&j.switch==="image")j.repeat==="close"&&c===n.length-1?Z():(K=b.current)==null||K.go("+1");else if(j.type==="click"&&j.switch==="50/50"){const tt=h.getBoundingClientRect(),J=U-tt.left,lt=X-tt.top,vt=tt.width,st=tt.height;let yt;d.direction==="horiz"?yt=J<vt/2?"-1":"+1":yt=lt<st/2?"-1":"+1",(nt=b.current)==null||nt.go(yt)}}},G=h=>{if(N.current){N.current=!1;return}const U=n[c],X=(U==null?void 0:U.image.objectFit)==="cover";let K,nt;if("changedTouches"in h&&h.changedTouches.length>0)K=h.changedTouches[0].clientX,nt=h.changedTouches[0].clientY;else if("clientX"in h)K=h.clientX,nt=h.clientY;else return;let tt;if(X&&B.current){const J=$o(B.current);tt=K>=J.left&&K<=J.right&&nt>=J.top&&nt<=J.bottom}else{const J=B.current?wo(B.current):null;if(!J){h.target===h.currentTarget&&Z();return}tt=K>=J.x&&K<=J.x+J.width&&nt>=J.y&&nt<=J.y+J.height}tt?gt(B.current,K,nt):Z()},Q=h=>{const U=h.target;(U.classList.contains(O.thumbsWrapper)||U.classList.contains(O.thumbsContainer))&&G(h)};H.useEffect(()=>{if(!t)return;const h=U=>{var X,K;if(U.key==="Escape"){Z();return}if(U.key==="ArrowRight"){m(nt=>(nt+1)%Math.max(n.length,1)),(X=b.current)==null||X.go("+1");return}U.key==="ArrowLeft"&&(m(nt=>(nt-1+Math.max(n.length,1))%Math.max(n.length,1)),(K=b.current)==null||K.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[t,Z,n.length]),H.useEffect(()=>{if(t){if(m(0),I(U=>U+1),P.current=!1,y(!1),g(!1),v({}),!M)return;const h=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(h)}return()=>{L.current&&f.current&&(L.current.removeEventListener("animationend",f.current),f.current=null),g(!1)}},[t,M]),H.useEffect(()=>{E.current!==null&&E.current!==d.type&&I(h=>h+1),E.current=d.type},[d.type]),H.useEffect(()=>{if(!t)return;const h=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,X=To(T.color);document.body.style.overflow="hidden",g(!1);const K=tt=>{tt.target===L.current&&!P.current&&tt.animationName&&(U&&!i&&X>.9&&(document.body.style.backgroundColor=T.color),g(!0),L.current&&F.current&&L.current.removeEventListener("animationend",F.current),F.current=null)};L.current&&(F.current=K,L.current.addEventListener("animationend",K));const nt=tt=>{const J=tt.target;J&&(J.closest(`.${O.thumbsWrapper}`)||J.closest(`.${O.thumbsContainer}`))||d.type!=="slide"&&tt.preventDefault()};return document.addEventListener("touchmove",nt,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",nt),L.current&&F.current&&(L.current.removeEventListener("animationend",F.current),F.current=null),g(!1)}},[t,i,T.color,d.type]),H.useEffect(()=>{if(!t)return;const h=U=>{var K,nt;if(P.current){U.stopPropagation();return}if(N.current){N.current=!1;return}const X=U.target;if(!(X&&(X.closest(`.${O.thumbsContainer}`)||X.closest(`.${O.thumbItem}`)))){if(d.type==="slide"&&j.type==="drag"&&((nt=(K=b.current)==null?void 0:K.splide)!=null&&nt.root)){const tt=b.current.splide.root;if(X&&(tt.contains(X)||tt===X))return}if(U.touches.length===0&&U.changedTouches.length>0){const tt=n[c],J=(tt==null?void 0:tt.image.objectFit)==="cover",lt=U.changedTouches[0];let vt;if(J&&B.current){const st=$o(B.current);vt=lt.clientX>=st.left&&lt.clientX<=st.right&&lt.clientY>=st.top&&lt.clientY<=st.bottom}else{const st=B.current?wo(B.current):null;if(!st)return;vt=lt.clientX>=st.x&&lt.clientX<=st.x+st.width&&lt.clientY>=st.y&&lt.clientY<=st.y+st.height}if(!vt){U.stopPropagation(),P.current=!0;const st=yt=>{yt.stopPropagation(),yt.preventDefault(),document.removeEventListener("click",st,!0)};document.addEventListener("click",st,!0),Z()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[t,Z,c,n]);const rt=(d.type==="scale"||d.type==="fade")&&d.direction==="vert"&&j.type==="drag";H.useEffect(()=>{var yt,Pt;if(!t||!rt||!((Pt=(yt=b.current)==null?void 0:yt.splide)!=null&&Pt.root))return;const h=b.current.splide.root,U=30,X=(ot,ut)=>{if(k.current){const Tt=Math.abs(ot-k.current.x),Xt=Math.abs(ut-k.current.y);(Tt>0||Xt>0)&&(N.current=!0)}},K=ot=>{k.current&&(ot.preventDefault(),X(ot.clientX,ot.clientY))},nt=ot=>{k.current&&ot.touches.length>0&&(ot.preventDefault(),X(ot.touches[0].clientX,ot.touches[0].clientY))},tt=(ot,ut)=>{if(!k.current||!b.current){k.current=null;return}const Tt=Math.abs(ot-k.current.x),Xt=Math.abs(ut-k.current.y);Xt>U&&Xt>Tt&&b.current.go(ut<k.current.y?"+1":"-1"),k.current=null},J=ot=>{k.current&&tt(ot.clientX,ot.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",K)},lt=ot=>{if(k.current){if(ot.changedTouches.length>0){const ut=ot.changedTouches[0];tt(ut.clientX,ut.clientY)}document.removeEventListener("touchend",lt),document.removeEventListener("touchcancel",lt),document.removeEventListener("touchmove",nt)}},vt=ot=>{k.current={x:ot.clientX,y:ot.clientY},N.current=!1,document.addEventListener("pointermove",K,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},st=ot=>{ot.touches.length>0&&(k.current={x:ot.touches[0].clientX,y:ot.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",nt,{passive:!1}),document.addEventListener("touchend",lt),document.addEventListener("touchcancel",lt))};return h.addEventListener("pointerdown",vt),h.addEventListener("touchstart",st),()=>{h.removeEventListener("pointerdown",vt),h.removeEventListener("touchstart",st),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",nt),document.removeEventListener("touchend",lt),document.removeEventListener("touchcancel",lt),k.current=null,N.current=!1}},[t,rt,u]);const ft={backgroundColor:T.color,backdropFilter:`blur(${T.blur}px)`,animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:br.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:i?null:L,className:mt(O.background,S?it:at,{[O.editor]:i},{[O.hidden]:!t}),style:{...ft,...l&&!i&&!S?{position:"absolute"}:{}}}),s.jsxs("div",{ref:i?L:null,className:mt(O.contentStyle,S?ct:q,{[O.editor]:i},{[O.hidden]:!t}),style:{animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[s.jsx(ur,{onMove:h=>m(h.index),ref:b,className:O.lightboxSplide,options:{arrows:!1,speed:d.duration?parseInt(d.duration):500,direction:d.direction==="horiz"||d.type==="fade"||d.type==="scale"?"ltr":"ttb",pagination:!1,drag:j.type==="drag"&&!rt,perPage:1,width:"100%",height:"100%",type:d.type==="fade"||d.type==="scale"?"fade":"loop",padding:0,rewind:j.repeat!=="close",start:0},style:{"--splide-speed":d.duration},children:n.map((h,U)=>{const X=Ye(z.position,z.offset,i),K=`${x.scalingValue(z.padding.top,i)} ${x.scalingValue(z.padding.right,i)} ${x.scalingValue(z.padding.bottom,i)} ${x.scalingValue(z.padding.left,i)}`,nt=d.type==="scale"?(()=>{const{transform:tt,...J}=X;return{...J,position:"absolute",padding:K,boxSizing:"border-box","--position-transform":tt||"none"}})():{...X,position:"absolute",padding:K,boxSizing:"border-box"};return s.jsx(dr,{children:s.jsx("div",{className:O.imgWrapper,onClick:G,children:s.jsx("img",{ref:U===c?B:null,className:mt(O.imageStyle,{[O.contain]:h.image.objectFit==="contain",[O.cover]:h.image.objectFit==="cover",[O.scaleSlide]:d.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...nt,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},U)})},u),C.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:mt(O.arrow,{[O.arrowVertical]:d.direction==="vert"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:O.arrowInner,style:{transform:`translate(${x.scalingValue(C.offset.x,i)}, ${x.scalingValue(C.offset.y*(d.direction==="horiz"?1:-1),i)}) scale(${C.scale}) rotate(${d.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=b.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[C.arrowsImgUrl&&s.jsx(ye,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:mt(O.arrowImg,O.mirror)}),!C.arrowsImgUrl&&s.jsx(_o,{color:C.color,className:mt(O.arrowIcon,O.arrowImg,O.mirror)})]})}),s.jsx("div",{className:mt(O.arrow,O.nextArrow,{[O.arrowVertical]:d.direction==="vert"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:O.arrowInner,style:{transform:`translate(${x.scalingValue(C.offset.x*(d.direction==="horiz"?-1:1),i)}, ${x.scalingValue(C.offset.y,i)}) scale(${C.scale}) rotate(${d.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=b.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[C.arrowsImgUrl&&s.jsx(ye,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:O.arrowImg}),!C.arrowsImgUrl&&s.jsx(_o,{color:C.color,className:mt(O.arrowIcon,O.arrowImg)})]})})]}),T.closeIconUrl&&(()=>{const h=Ye(T.closeIconAlign,T.closeIconOffset,i),U=`scale(${T.closeIconScale})`,X=h.transform?`${h.transform} ${U}`:U;return s.jsx("button",{className:O.closeButton,style:{...h,transform:X},onClick:Z,"aria-label":"Close lightbox",children:s.jsx(ye,{url:T.closeIconUrl,fill:T.closeIconColor??"#000000",hoverFill:T.closeIconHover??"#cccccc"})})})(),A&&A.isActive&&o.imageCaption&&((V=n[c])==null?void 0:V.imageCaption)&&(()=>{const{widthSettings:h,fontSettings:U,letterSpacing:X,textAlign:K,wordSpacing:nt,fontSizeLineHeight:tt,textAppearance:J,color:lt}=o.imageCaption;return s.jsx("div",{className:O.caption,style:{...Ye(A.alignment,A.offset,i),fontFamily:U.fontFamily,fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:h.sizing==="auto"?"max-content":x.scalingValue(h.width,i),letterSpacing:x.scalingValue(X,i),wordSpacing:x.scalingValue(nt,i),textAlign:K,fontSize:x.scalingValue(tt.fontSize,i),lineHeight:x.scalingValue(tt.lineHeight,i),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:lt},onClick:vt=>vt.stopPropagation(),children:s.jsx("div",{"data-styles":"imageCaption",className:O.captionTextInner,style:{"--link-color":A.linkColor,"--link-hover-color":A.linkHoverColor},children:s.jsx(ze,{content:n[c].imageCaption})})})})(),$.isActive&&(()=>{const[h,U]=$.position.split("-"),X=d.direction==="horiz"?`${h}-left`:$.position,K=Ye(X,$.offset,i),nt=()=>{if(d.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return s.jsx("div",{ref:R,className:O.thumbsWrapper,onClick:tt=>Q(tt),style:{position:i?"absolute":"fixed",...K,...d.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:s.jsx("div",{className:mt(O.thumbsContainer,{[O.thumbsContainerVertical]:d.direction==="vert",[O.thumbsAlignStart]:$.align==="start",[O.thumbsAlignCenter]:$.align==="center",[O.thumbsAlignEnd]:$.align==="end"}),style:{gap:x.scalingValue($.grid.gap,i),justifyContent:W?"flex-start":nt()},children:n.map((tt,J)=>{const lt=J===c,vt=w[J],yt=$.grid.size*(lt?$.activeState.scale:1),Pt=()=>{if($.fit!=="fit")return{};if(!vt)return d.direction==="horiz"?{height:x.scalingValue(yt,i)}:{width:x.scalingValue(yt,i)};const ot=vt.width/vt.height;if(d.direction==="horiz"){const ut=yt,Tt=ut*ot;return{width:x.scalingValue(Tt,i),height:x.scalingValue(ut,i)}}else{const ut=yt,Tt=ut/ot;return{width:x.scalingValue(ut,i),height:x.scalingValue(Tt,i)}}};return s.jsx("button",{className:O.thumbItem,style:{...d.direction==="horiz"&&$.fit!=="fit"?{height:x.scalingValue(yt,i)}:{},...d.direction==="vert"&&$.fit!=="fit"?{width:x.scalingValue(yt,i)}:{},...$.fit==="cover"?{width:x.scalingValue(yt,i),height:x.scalingValue(yt,i)}:{},...Pt(),transition:lt?"all 0.25s ease-out":"none",opacity:lt?$.activeState.opacity/100:$.opacity/100,"--thumb-hover":$.activeState.opacity/100},onClick:ot=>{var ut;ot.stopPropagation(),m(J),(ut=b.current)==null||ut.go(J)},onMouseEnter:()=>{var ot;$.triggers==="hov"&&((ot=b.current)==null||ot.go(J))},children:s.jsx("img",{src:tt.image.url,alt:tt.image.name??"",onLoad:ot=>{const ut=ot.currentTarget;ut.naturalWidth&&ut.naturalHeight&&v(Tt=>({...Tt,[J]:{width:ut.naturalWidth,height:ut.naturalHeight}}))},style:{objectFit:$.fit==="cover"?"cover":"contain",...$.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...$.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${tt.image.name}-${J}`)})})})})()]})]}),document.getElementById(a))};function _o({color:t,className:e}){return s.jsx("svg",{viewBox:"0 0 10 18",className:e,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.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:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const wl={element:xl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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 he(t){const{color:e,...n}=t;return n}function Jt(t,e){var n,o,r;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:x.scalingValue(t.letterSpacing,e),wordSpacing:x.scalingValue(t.wordSpacing,e),fontSize:x.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?x.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=t.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=t.textAppearance)==null?void 0:r.fontVariant,color:t.color}}function Xe(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function $l(t){return`
7
- .${t}-wrapper {
6
+ */const ya="RichTextRenderer-module__link___BWeZ2",va={link:ya},Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?l.jsx("a",{className:va.link,href:o.value,target:o.target,children:t(o.children)},r):l.jsx("span",{style:ba(o),children:o.text},r));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const r=n.children;return l.jsx("div",{children:t(r)},o)})})};function ba(e){return{...e.fontFamily&&{fontFamily: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 xa="SvgImage-module__svg___q3xE-",Sa="SvgImage-module__img___VsTm-",yo={svg:xa,img:Sa},Ca=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},$a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=C.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return C.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ca(e)||!a?l.jsx("img",{src:e,alt:"",className:ge(yo.img,o),style:r}):l.jsx("span",{"data-supports-mask":a,className:ge(yo.svg,o),style:{"--svg":$a(e),"--fill":t,"--hover-fill":n,...r??{}}})},wa={"top-left":J.topLeftAlignment,"top-center":J.topCenterAlignment,"top-right":J.topRightAlignment,"middle-left":J.middleLeftAlignment,"middle-center":J.middleCenterAlignment,"middle-right":J.middleRightAlignment,"bottom-left":J.bottomLeftAlignment,"bottom-center":J.bottomCenterAlignment,"bottom-right":J.bottomRightAlignment};function Ta({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=C.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:s,textAlign:g,wordSpacing:c,fontSizeLineHeight:A,textAppearance:x,color:f}=n.imageCaption,[p,d]=C.useState(void 0),[S,y]=C.useState(null),[v,_]=C.useState(0),[D,V]=C.useState(0),{direction:T,transition:m,controls:k,pagination:R,imageCaption:O,triggers:F}=e,H=C.useRef(m.type),{x:M,y:X}=e.controls.offset,G=h=>{r&&r.go(h)};return C.useEffect(()=>{if(!S)return;const h=new ResizeObserver(E=>{if(!r)return;const[I]=E;d({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return h.observe(S),()=>h.unobserve(S)},[S]),C.useEffect(()=>{!r||H.current===m.type||(V(h=>h+1),H.current=m.type)},[m.type]),l.jsx("div",{className:ge(J.wrapper,{[J.editor]:o}),ref:y,children:l.jsxs("div",{className:J.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:m.backgroundColor&&m.type==="fade in"?m.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:ge(J.captionBlock),children:l.jsx("div",{className:J.captionTextWrapper,children:t.map((h,E)=>l.jsx("div",{className:ge(J.captionText,wa[O.alignment],{[J.withPointerEvents]:E===v&&o,[J.active]:E===v}),style:{fontFamily:u.fontFamily,fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":$.scalingValue(i.width,o),letterSpacing:$.scalingValue(s,o),wordSpacing:$.scalingValue(c,o),textAlign:g,fontSize:$.scalingValue(A.fontSize,o),lineHeight:$.scalingValue(A.lineHeight,o),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:f,transitionDuration:m.duration?`${Math.round(parseInt(m.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:$.scalingValue(O.offset.y,o),left:$.scalingValue(O.offset.x,o)},children:l.jsx(Pt,{content:h.imageCaption})})},E))})}),l.jsx(cr,{onMove:h=>{_(h.index)},ref:a,options:{arrows:!1,speed:m.duration?parseInt(m.duration):500,autoplay:F.autoPlay!==null,...F.autoPlay!==null&&{interval:parseInt(F.autoPlay)*1e3},direction:T==="horiz"||m.type==="fade in"?"ltr":"ttb",pagination:!1,drag:F.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:m.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((h,E)=>l.jsx(ur,{children:l.jsx("div",{className:J.sliderItem,children:l.jsx("div",{className:J.imgWrapper,children:l.jsx("img",{className:ge(J.sliderImage,{[J.contain]:h.image.objectFit==="contain",[J.cover]:h.image.objectFit==="cover"}),src:h.image.url,alt:h.image.name??""})})})},E))},D),k.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ge(J.arrow,{[J.arrowVertical]:T==="vert",[J.hoverArrow]:k.show==="on hover"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:l.jsxs("button",{onClick:()=>{G("-1")},className:J.arrowInner,style:{transform:`translate(${$.scalingValue(M,o)}, ${$.scalingValue(X*(T==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[k.arrowsImgUrl&&l.jsx(Xe,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:ge(J.arrowImg,J.mirror)}),!k.arrowsImgUrl&&l.jsx(vo,{color:k.color,className:ge(J.arrowIcon,J.arrowImg,J.mirror)})]})}),l.jsx("div",{className:ge(J.arrow,J.nextArrow,{[J.arrowVertical]:T==="vert",[J.hoverArrow]:k.show==="on hover"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:l.jsxs("button",{className:J.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${$.scalingValue(M*(T==="horiz"?-1:1),o)}, ${$.scalingValue(X,o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[k.arrowsImgUrl&&l.jsx(Xe,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:J.arrowImg}),!k.arrowsImgUrl&&l.jsx(vo,{color:k.color,className:ge(J.arrowIcon,J.arrowImg)})]})})]}),F.triggersList.click&&l.jsx("div",{className:J.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&l.jsx("div",{className:ge(J.pagination,{[J.paginationInsideBottom]:R.position==="inside-1"&&T==="horiz",[J.paginationInsideTop]:R.position==="inside-2"&&T==="horiz",[J.paginationOutsideBottom]:R.position==="outside-1"&&T==="horiz",[J.paginationOutsideTop]:R.position==="outside-2"&&T==="horiz",[J.paginationInsideLeft]:R.position==="inside-1"&&T==="vert",[J.paginationInsideRight]:R.position==="inside-2"&&T==="vert",[J.paginationOutsideLeft]:R.position==="outside-1"&&T==="vert",[J.paginationOutsideRight]:R.position==="outside-2"&&T==="vert",[J.paginationVertical]:T==="vert"}),children:l.jsx("div",{className:J.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${$.scalingValue(R.offset.x,o)}, ${$.scalingValue(R.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((h,E)=>l.jsx("button",{onClick:()=>{r&&r.go(E)},className:ge(J.paginationItem),children:l.jsx("div",{className:ge(J.dot,{[J.activeDot]:E===v}),style:{backgroundColor:E===v?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},E))})})]})})}function vo({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 _a={element:Ta,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},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:"outside-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"]}},Aa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ea="ImageRevealSlider-module__image___Qjt-e",La="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",st={imageRevealSlider:Aa,image:Ea,link:La,cursor:Ia};function bo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,u=a/2,s=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-s&&t<=o.y+s)return!0}return!1}function Cn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ka(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await Cn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Cn(e);a=i.height/i.width*r}else{const i=await Cn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Fa({settings:e,content:t,isEditor:n}){const[o,r]=C.useState(null),[a,i]=C.useState([]),[u,s]=C.useState(0),g=C.useRef(0),[c,A]=C.useState({x:0,y:0}),[x,f]=C.useState(1),[p,d]=C.useState("none"),S=C.useRef({x:0,y:0}),[y,v]=C.useState(!1),{sizeType:_,imageWidth:D,randomRangeImageWidth:V}=e.imageSize,{revealPosition:T,visible:m}=e.position,{cursorType:k,target:R,defaultCursorScale:O,defaultCursor:F,hoverCursorScale:H,hoverCursor:M}=e.cursor;C.useEffect(()=>{if(!o)return;const h=(L,w)=>{const N=o.getBoundingClientRect(),K=L-N.left,ie=w-N.top;if(A({x:K,y:ie}),k==="system"){d("none"),f(1);return}const ne=K,ce=ie,P=document.elementFromPoint(N.left+ne,N.top+ce);if(P&&P.closest("a")){d("none"),f(1);return}const Q=bo(ne,ce,a)||R==="area"?{img:M??"none",scale:H}:{img:F??"none",scale:O};d(Q.img),f(Q.scale)},E=L=>{L.stopPropagation(),S.current={x:L.clientX,y:L.clientY},h(L.clientX,L.clientY)},I=()=>{y&&h(S.current.x,S.current.y)};return o.addEventListener("mousemove",E),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",E),window.removeEventListener("scroll",I,!0)}},[o,y,c,k,R,M,F,H,O,a]),C.useEffect(()=>{y||(d("none"),f(0))},[y]);const X=async(h,E,I,L={})=>{const{width:w,height:N,finalWidth:K}=await ka(h.image.url,_,D,V);let ie=0,ne=0;T==="same"?(ie=E/2,ne=I/2):(ie=L.x??Math.random()*E,ne=L.y??Math.random()*I);const ce=Math.min(Math.max(ie,w/2),E-w/2),P=Math.min(Math.max(ne,N/2),I-N/2);return{id:g.current++,url:h.image.url,link:h.link,name:h.image.name,x:ce,y:P,width:K}};C.useEffect(()=>{if(!o||t.length===0)return;const h=o.getBoundingClientRect(),E=h.width,I=h.height,L=[];(async()=>{const N=t[0],K=await X(N,E,I);L.push(K),i(L),s(1)})()},[_,D,V,T,o]),C.useEffect(()=>{m==="last One"&&i(h=>h.length>0?[h[h.length-1]]:[])},[m]);const G=async h=>{if(!o)return;const E=o.getBoundingClientRect(),I=h.clientX-E.left,L=h.clientY-E.top;if(R==="image"&&!bo(I,L,a))return;let w=0,N=0;T==="on Click"?(w=I,N=L):T==="same"?(w=E.width/2,N=E.height/2):(w=Math.random()*E.width,N=Math.random()*E.height);const K=t[u],ie=await X(K,E.width,E.height,{x:w,y:N});i(ne=>m==="all"?[...ne,ie]:[ie]),s(ne=>ne>=t.length-1?0:ne+1)};return l.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:st.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[a.map(h=>l.jsx("div",{className:st.wrapper,style:{top:`${h.y}px`,left:`${h.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:h.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:R==="area"&&h.link?l.jsx("a",{href:h.link,target:"_blank",className:st.link,children:l.jsx("img",{src:h.url,alt:h.name,className:st.image},h.id)}):l.jsx("img",{src:h.url,alt:h.name,className:st.image},h.id)},h.id)),y&&l.jsx("div",{className:st.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Pa={element:Fa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{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:""}]}}}},Ra="LightBox-module__hidden___9s-9x",Ma="LightBox-module__heroImage___sTxNF",Wa="LightBox-module__background___rm9ml",Na="LightBox-module__editor___4ACaY",Ha="LightBox-module__contentStyle___Bgnsq",Va="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Oa="LightBox-module__contain___8-yaS",za="LightBox-module__cover___hNvOG",Ba="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",Ua="LightBox-module__lightboxSplide___XFuWC",qa="LightBox-module__arrow___iz38X",Ga="LightBox-module__arrowVertical___Zfz81",Ya="LightBox-module__nextArrow___zkAQN",Xa="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Za="LightBox-module__arrowImg___pNV88",Ja="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",el="LightBox-module__thumbsContainerVertical___wttk5",tl="LightBox-module__thumbsContainer___osSma",nl="LightBox-module__thumbsAlignStart___MO6tY",ol="LightBox-module__thumbsAlignCenter___Q4sUx",rl="LightBox-module__thumbsAlignEnd___p4y9R",il="LightBox-module__thumbItem___HvnF3",al="LightBox-module__closeButton___g2khP",ll="LightBox-module__fadeIn___0m5GW",sl="LightBox-module__slideInLeft___gPYwC",cl="LightBox-module__slideInRight___S-pPp",ul="LightBox-module__slideInTop___DFdAj",pl="LightBox-module__slideInBottom___m27kZ",dl="LightBox-module__fadeOut___55qBR",gl="LightBox-module__slideOutLeft___NvU7P",ml="LightBox-module__slideOutRight___SK7eC",fl="LightBox-module__slideOutTop___Vgg0z",hl="LightBox-module__slideOutBottom___nJ0Ef",yl="LightBox-module__scaleSlide___vZriG",B={hidden:Ra,heroImage:Ma,background:Wa,editor:Na,contentStyle:Ha,imageStyle:Va,imgWrapper:ja,contain:Oa,cover:za,caption:Ba,captionTextInner:Da,lightboxSplide:Ua,arrow:qa,arrowVertical:Ga,nextArrow:Ya,arrowInner:Xa,arrowIcon:Ka,arrowImg:Za,mirror:Ja,thumbsWrapper:Qa,thumbsContainerVertical:el,thumbsContainer:tl,thumbsAlignStart:nl,thumbsAlignCenter:ol,thumbsAlignEnd:rl,thumbItem:il,closeButton:al,fadeIn:ll,slideInLeft:sl,slideInRight:cl,slideInTop:ul,slideInBottom:pl,fadeOut:dl,slideOutLeft:gl,slideOutRight:ml,slideOutTop:fl,slideOutBottom:hl,scaleSlide:yl},Ut=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), calc(-50% + ${$.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${$.scalingValue(t.x,n)}, calc(-50% + ${$.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), ${$.scalingValue(t.y,n)})`:o.transform=`translate(${$.scalingValue(t.x,n)}, ${$.scalingValue(t.y,n)})`,o};function pr(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 xo(e){const t=e.getBoundingClientRect(),n=pr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,u=o/r,s=a/i;let g,c;s>u?(g=o,c=o/s):(c=r,g=r*s);const A=t.left+n.left,x=t.top+n.top,f=(o-g)/2+A,p=(r-c)/2+x;return{x:f,y:p,width:g,height:c}}function So(e){const t=e.getBoundingClientRect(),n=pr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Co(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function vl(e,t){const n=(()=>{if(e==="fade in")return B.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return B.slideInLeft;case"right":return B.slideInRight;case"top":return B.slideInTop;case"bottom":return B.slideInBottom;default:return B.slideInRight}return B.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return B.fadeIn;if(e==="slide in")switch(t){case"left":return B.slideInLeft;case"right":return B.slideInRight;case"top":return B.slideInTop;case"bottom":return B.slideInBottom;default:return B.slideInRight}return B.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return B.fadeOut;if(e==="slide in")switch(t){case"left":return B.slideOutLeft;case"right":return B.slideOutRight;case"top":return B.slideOutTop;case"bottom":return B.slideOutBottom;default:return B.slideOutRight}return B.fadeOut})(),a=(()=>{if(e==="fade in")return B.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return B.slideOutLeft;case"right":return B.slideOutRight;case"top":return B.slideOutTop;case"bottom":return B.slideOutBottom;default:return B.slideOutRight}return B.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const bl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,u]=C.useState(!1),{url:s}=e.thumbnailBlock.cover;return C.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:s,alt:"Cover",className:B.heroImage,onClick:()=>u(!0)}),l.jsx(xl,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},xl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:u})=>{var j;const[s,g]=C.useState(0),[c,A]=C.useState(0),[x,f]=C.useState(!1),[p,d]=C.useState(!1),[S,y]=C.useState({}),v=C.useRef(null),_=C.useRef(null),D=C.useRef(null),V=C.useRef(!1),T=C.useRef(null),m=C.useRef(null),k=C.useRef(null),R=C.useRef(null),O=C.useRef(!1),F=C.useRef(null),[H,M]=C.useState(!1),{appear:X,triggers:G,slider:h,thumbnail:E,controls:I,area:L,caption:w,layout:N}=r.lightboxBlock,{appearClass:K,backdropAppearClass:ie,backdropDisappearClass:ne,disappearClass:ce}=vl(X.type,X.direction),P=(u==null?void 0:u.itemId)??null;C.useEffect(()=>{const b=()=>{setTimeout(()=>{var Z,te;(te=(Z=v.current)==null?void 0:Z.splide)==null||te.refresh()},16)},U=()=>{A(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),C.useEffect(()=>{if(!e||!E.isActive){M(!1);return}const b=F.current;if(!b)return;const U=()=>{h.direction==="horiz"?M(b.scrollWidth>b.clientWidth):M(b.scrollHeight>b.clientHeight)};U();const Z=new ResizeObserver(U);return Z.observe(b),()=>Z.disconnect()},[e,E.isActive,n.length,S,h.direction]);const Q=C.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,U=Co(L.color);b&&!i&&U>.9&&(document.body.style.backgroundColor=""),f(!0),V.current=!0;const Z=te=>{te.target===T.current&&te.animationName&&(T.current&&m.current&&T.current.removeEventListener("animationend",m.current),m.current=null,V.current&&(V.current=!1,t()),f(!1))};T.current&&(m.current=Z,T.current.addEventListener("animationend",Z))},[t,L.color,i]),de=(b,U,Z)=>{var te,re;if(b){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&s===n.length-1?Q():(te=v.current)==null||te.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const W=b.getBoundingClientRect(),z=U-W.left,q=Z-W.top,ee=W.width,oe=W.height;let ue;h.direction==="horiz"?ue=z<ee/2?"-1":"+1":ue=q<oe/2?"-1":"+1",(re=v.current)==null||re.go(ue)}}},pe=b=>{if(O.current){O.current=!1;return}const U=n[s],Z=(U==null?void 0:U.image.objectFit)==="cover";let te,re;if("changedTouches"in b&&b.changedTouches.length>0)te=b.changedTouches[0].clientX,re=b.changedTouches[0].clientY;else if("clientX"in b)te=b.clientX,re=b.clientY;else return;let W;if(Z&&D.current){const z=So(D.current);W=te>=z.left&&te<=z.right&&re>=z.top&&re<=z.bottom}else{const z=D.current?xo(D.current):null;if(!z){b.target===b.currentTarget&&Q();return}W=te>=z.x&&te<=z.x+z.width&&re>=z.y&&re<=z.y+z.height}W?de(D.current,te,re):Q()},Y=b=>{const U=b.target;(U.classList.contains(B.thumbsWrapper)||U.classList.contains(B.thumbsContainer))&&pe(b)};C.useEffect(()=>{if(!e)return;const b=U=>{var Z,te;if(U.key==="Escape"){Q();return}if(U.key==="ArrowRight"){g(re=>(re+1)%Math.max(n.length,1)),(Z=v.current)==null||Z.go("+1");return}U.key==="ArrowLeft"&&(g(re=>(re-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=v.current)==null||te.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,Q,n.length]),C.useEffect(()=>{if(e){if(g(0),A(U=>U+1),V.current=!1,f(!1),d(!1),y({}),!P)return;const b=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(b)}return()=>{T.current&&m.current&&(T.current.removeEventListener("animationend",m.current),m.current=null),d(!1)}},[e,P]),C.useEffect(()=>{_.current!==null&&_.current!==h.type&&A(b=>b+1),_.current=h.type},[h.type]),C.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,Z=Co(L.color);document.body.style.overflow="hidden",d(!1);const te=W=>{W.target===T.current&&!V.current&&W.animationName&&(U&&!i&&Z>.9&&(document.body.style.backgroundColor=L.color),d(!0),T.current&&k.current&&T.current.removeEventListener("animationend",k.current),k.current=null)};T.current&&(k.current=te,T.current.addEventListener("animationend",te));const re=W=>{const z=W.target;z&&(z.closest(`.${B.thumbsWrapper}`)||z.closest(`.${B.thumbsContainer}`))||h.type!=="slide"&&W.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",re),T.current&&k.current&&(T.current.removeEventListener("animationend",k.current),k.current=null),d(!1)}},[e,i,L.color,h.type]),C.useEffect(()=>{if(!e)return;const b=U=>{var te,re;if(V.current){U.stopPropagation();return}if(O.current){O.current=!1;return}const Z=U.target;if(!(Z&&(Z.closest(`.${B.thumbsContainer}`)||Z.closest(`.${B.thumbItem}`)))){if(h.type==="slide"&&G.type==="drag"&&((re=(te=v.current)==null?void 0:te.splide)!=null&&re.root)){const W=v.current.splide.root;if(Z&&(W.contains(Z)||W===Z))return}if(U.touches.length===0&&U.changedTouches.length>0){const W=n[s],z=(W==null?void 0:W.image.objectFit)==="cover",q=U.changedTouches[0];let ee;if(z&&D.current){const oe=So(D.current);ee=q.clientX>=oe.left&&q.clientX<=oe.right&&q.clientY>=oe.top&&q.clientY<=oe.bottom}else{const oe=D.current?xo(D.current):null;if(!oe)return;ee=q.clientX>=oe.x&&q.clientX<=oe.x+oe.width&&q.clientY>=oe.y&&q.clientY<=oe.y+oe.height}if(!ee){U.stopPropagation(),V.current=!0;const oe=ue=>{ue.stopPropagation(),ue.preventDefault(),document.removeEventListener("click",oe,!0)};document.addEventListener("click",oe,!0),Q()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,Q,s,n]);const ae=(h.type==="scale"||h.type==="fade")&&h.direction==="vert"&&G.type==="drag";C.useEffect(()=>{var ue,Te;if(!e||!ae||!((Te=(ue=v.current)==null?void 0:ue.splide)!=null&&Te.root))return;const b=v.current.splide.root,U=30,Z=(se,he)=>{if(R.current){const we=Math.abs(se-R.current.x),Ge=Math.abs(he-R.current.y);(we>0||Ge>0)&&(O.current=!0)}},te=se=>{R.current&&(se.preventDefault(),Z(se.clientX,se.clientY))},re=se=>{R.current&&se.touches.length>0&&(se.preventDefault(),Z(se.touches[0].clientX,se.touches[0].clientY))},W=(se,he)=>{if(!R.current||!v.current){R.current=null;return}const we=Math.abs(se-R.current.x),Ge=Math.abs(he-R.current.y);Ge>U&&Ge>we&&v.current.go(he<R.current.y?"+1":"-1"),R.current=null},z=se=>{R.current&&W(se.clientX,se.clientY),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("pointermove",te)},q=se=>{if(R.current){if(se.changedTouches.length>0){const he=se.changedTouches[0];W(he.clientX,he.clientY)}document.removeEventListener("touchend",q),document.removeEventListener("touchcancel",q),document.removeEventListener("touchmove",re)}},ee=se=>{R.current={x:se.clientX,y:se.clientY},O.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",z),document.addEventListener("pointercancel",z)},oe=se=>{se.touches.length>0&&(R.current={x:se.touches[0].clientX,y:se.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",q),document.addEventListener("touchcancel",q))};return b.addEventListener("pointerdown",ee),b.addEventListener("touchstart",oe),()=>{b.removeEventListener("pointerdown",ee),b.removeEventListener("touchstart",oe),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",q),document.removeEventListener("touchcancel",q),R.current=null,O.current=!1}},[e,ae,c]);const fe={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:yr.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:T,className:ge(B.background,x?ne:ie,{[B.editor]:i},{[B.hidden]:!e}),style:{...fe,...p&&!i&&!x?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?T:null,className:ge(B.contentStyle,x?ce:K,{[B.editor]:i},{[B.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(cr,{onMove:b=>g(b.index),ref:v,className:B.lightboxSplide,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,direction:h.direction==="horiz"||h.type==="fade"||h.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!ae,perPage:1,width:"100%",height:"100%",type:h.type==="fade"||h.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":h.duration},children:n.map((b,U)=>{const Z=Ut(N.position,N.offset,i),te=`${$.scalingValue(N.padding.top,i)} ${$.scalingValue(N.padding.right,i)} ${$.scalingValue(N.padding.bottom,i)} ${$.scalingValue(N.padding.left,i)}`,re=h.type==="scale"?(()=>{const{transform:W,...z}=Z;return{...z,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":W||"none"}})():{...Z,position:"absolute",padding:te,boxSizing:"border-box"};return l.jsx(ur,{children:l.jsx("div",{className:B.imgWrapper,onClick:pe,children:l.jsx("img",{ref:U===s?D:null,className:ge(B.imageStyle,{[B.contain]:b.image.objectFit==="contain",[B.cover]:b.image.objectFit==="cover",[B.scaleSlide]:h.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...re,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},U)})},c),I.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ge(B.arrow,{[B.arrowVertical]:h.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:B.arrowInner,style:{transform:`translate(${$.scalingValue(I.offset.x,i)}, ${$.scalingValue(I.offset.y*(h.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=v.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&l.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:ge(B.arrowImg,B.mirror)}),!I.arrowsImgUrl&&l.jsx($o,{color:I.color,className:ge(B.arrowIcon,B.arrowImg,B.mirror)})]})}),l.jsx("div",{className:ge(B.arrow,B.nextArrow,{[B.arrowVertical]:h.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:l.jsxs("button",{className:B.arrowInner,style:{transform:`translate(${$.scalingValue(I.offset.x*(h.direction==="horiz"?-1:1),i)}, ${$.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=v.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&l.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:B.arrowImg}),!I.arrowsImgUrl&&l.jsx($o,{color:I.color,className:ge(B.arrowIcon,B.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const b=Ut(L.closeIconAlign,L.closeIconOffset,i),U=`scale(${L.closeIconScale})`,Z=b.transform?`${b.transform} ${U}`:U;return l.jsx("button",{className:B.closeButton,style:{...b,transform:Z},onClick:Q,"aria-label":"Close lightbox",children:l.jsx(Xe,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),w&&w.isActive&&o.imageCaption&&((j=n[s])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:U,letterSpacing:Z,textAlign:te,wordSpacing:re,fontSizeLineHeight:W,textAppearance:z,color:q}=o.imageCaption;return l.jsx("div",{className:B.caption,style:{...Ut(w.alignment,w.offset,i),fontFamily:U.fontFamily,fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:b.sizing==="auto"?"max-content":$.scalingValue(b.width,i),letterSpacing:$.scalingValue(Z,i),wordSpacing:$.scalingValue(re,i),textAlign:te,fontSize:$.scalingValue(W.fontSize,i),lineHeight:$.scalingValue(W.lineHeight,i),textTransform:z.textTransform??"none",textDecoration:z.textDecoration??"none",fontVariant:z.fontVariant??"normal",color:q},onClick:ee=>ee.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:B.captionTextInner,style:{"--link-color":w.linkColor,"--link-hover-color":w.linkHoverColor},children:l.jsx(Pt,{content:n[s].imageCaption})})})})(),E.isActive&&(()=>{const[b,U]=E.position.split("-"),Z=h.direction==="horiz"?`${b}-left`:E.position,te=Ut(Z,E.offset,i),re=()=>{if(h.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(b==="top")return"flex-start";if(b==="middle")return"center";if(b==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:F,className:B.thumbsWrapper,onClick:W=>Y(W),style:{position:i?"absolute":"fixed",...te,...h.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:ge(B.thumbsContainer,{[B.thumbsContainerVertical]:h.direction==="vert",[B.thumbsAlignStart]:E.align==="start",[B.thumbsAlignCenter]:E.align==="center",[B.thumbsAlignEnd]:E.align==="end"}),style:{gap:$.scalingValue(E.grid.gap,i),justifyContent:H?"flex-start":re()},children:n.map((W,z)=>{const q=z===s,ee=S[z],ue=E.grid.size*(q?E.activeState.scale:1),Te=()=>{if(E.fit!=="fit")return{};if(!ee)return h.direction==="horiz"?{height:$.scalingValue(ue,i)}:{width:$.scalingValue(ue,i)};const se=ee.width/ee.height;if(h.direction==="horiz"){const he=ue,we=he*se;return{width:$.scalingValue(we,i),height:$.scalingValue(he,i)}}else{const he=ue,we=he/se;return{width:$.scalingValue(he,i),height:$.scalingValue(we,i)}}};return l.jsx("button",{className:B.thumbItem,style:{...h.direction==="horiz"&&E.fit!=="fit"?{height:$.scalingValue(ue,i)}:{},...h.direction==="vert"&&E.fit!=="fit"?{width:$.scalingValue(ue,i)}:{},...E.fit==="cover"?{width:$.scalingValue(ue,i),height:$.scalingValue(ue,i)}:{},...Te(),transition:q?"all 0.25s ease-out":"none",opacity:q?E.activeState.opacity/100:E.opacity/100,"--thumb-hover":E.activeState.opacity/100},onClick:se=>{var he;se.stopPropagation(),g(z),(he=v.current)==null||he.go(z)},onMouseEnter:()=>{var se;E.triggers==="hov"&&((se=v.current)==null||se.go(z))},children:l.jsx("img",{src:W.image.url,alt:W.image.name??"",onLoad:se=>{const he=se.currentTarget;he.naturalWidth&&he.naturalHeight&&y(we=>({...we,[z]:{width:he.naturalWidth,height:he.naturalHeight}}))},style:{objectFit:E.fit==="cover"?"cover":"contain",...E.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...E.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${W.image.name}-${z}`)})})})})()]})]}),document.getElementById(a))};function $o({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 Sl={element:bl,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},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 mt(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:$.scalingValue(e.letterSpacing,t),wordSpacing:$.scalingValue(e.wordSpacing,t),fontSize:$.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?$.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function qt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cl(e){return`
7
+ .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Xe(48)};
11
+ min-height: ${qt(48)};
12
12
  }
13
- .${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
14
- .${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
13
+ .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
+ .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
15
15
  outline: none;
16
16
  }
17
- .${t}-form {
17
+ .${e}-form {
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  width: 100%;
21
21
  }
22
- .${t}-fields {
22
+ .${e}-fields {
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  flex: 1;
26
26
  min-width: 0;
27
27
  }
28
- .${t}-field-group {
28
+ .${e}-field-group {
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  flex: 1;
32
32
  min-width: 0;
33
33
  }
34
- .${t}-field-group.${t}-labeled {
35
- gap: ${Xe(4)};
34
+ .${e}-field-group.${e}-labeled {
35
+ gap: ${qt(4)};
36
36
  }
37
- .${t}-field-label {
37
+ .${e}-field-label {
38
38
  white-space: nowrap;
39
- color: var(--${t}-label-text-color);
39
+ color: var(--${e}-label-text-color);
40
40
  }
41
- .${t}-input {
41
+ .${e}-input {
42
42
  width: 100%;
43
43
  box-sizing: border-box;
44
44
  outline: none;
45
45
  -webkit-tap-highlight-color: transparent;
46
- background-color: var(--${t}-input-color);
47
- color: var(--${t}-input-text-color);
48
- border-color: var(--${t}-input-border-color);
46
+ background-color: var(--${e}-input-color);
47
+ color: var(--${e}-input-text-color);
48
+ border-color: var(--${e}-input-border-color);
49
49
  transition: color 250ms, border-color 250ms, background-color 250ms;
50
50
  }
51
- .${t}-input::placeholder {
52
- color: var(--${t}-placeholder-color);
51
+ .${e}-input::placeholder {
52
+ color: var(--${e}-placeholder-color);
53
53
  opacity: 1;
54
54
  transition: color 250ms, opacity 250ms;
55
55
  }
56
- .${t}-input:hover {
57
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
58
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
59
- border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
60
- }
61
- .${t}-wrapper.${t}-state-hover .${t}-input {
62
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
63
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
64
- border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
65
- }
66
- .${t}-input:focus,
67
- .${t}-input:focus-visible,
68
- .${t}-wrapper.${t}-state-focus .${t}-input {
69
- background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
70
- color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
71
- border-color: var(--${t}-focus-input-border-color, var(--${t}-input-border-color));
72
- }
73
- .${t}-input[data-filled="true"] {
74
- background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
75
- color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
76
- border-color: var(--${t}-filled-input-border-color, var(--${t}-input-border-color));
77
- }
78
- .${t}-wrapper.${t}-state-filled .${t}-button {
79
- background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
80
- color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
81
- border-color: var(--${t}-filled-button-border-color, var(--${t}-button-border-color));
82
- }
83
- .${t}-wrapper.${t}-state-success .${t}-input,
84
- .${t}-wrapper.${t}-state-success .${t}-button {
56
+ .${e}-input:hover {
57
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
58
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
59
+ border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
60
+ }
61
+ .${e}-wrapper.${e}-state-hover .${e}-input {
62
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
63
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
64
+ border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
65
+ }
66
+ .${e}-input:focus,
67
+ .${e}-input:focus-visible,
68
+ .${e}-wrapper.${e}-state-focus .${e}-input {
69
+ background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
70
+ color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
71
+ border-color: var(--${e}-focus-input-border-color, var(--${e}-input-border-color));
72
+ }
73
+ .${e}-input[data-filled="true"] {
74
+ background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
75
+ color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
76
+ border-color: var(--${e}-filled-input-border-color, var(--${e}-input-border-color));
77
+ }
78
+ .${e}-wrapper.${e}-state-filled .${e}-button {
79
+ background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
80
+ color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
81
+ border-color: var(--${e}-filled-button-border-color, var(--${e}-button-border-color));
82
+ }
83
+ .${e}-wrapper.${e}-state-success .${e}-input,
84
+ .${e}-wrapper.${e}-state-success .${e}-button {
85
85
  pointer-events: none;
86
86
  }
87
- .${t}-wrapper.${t}-state-error .${t}-input {
87
+ .${e}-wrapper.${e}-state-error .${e}-input {
88
88
  }
89
- .${t}-input[data-field-type="textarea"] {
89
+ .${e}-input[data-field-type="textarea"] {
90
90
  resize: vertical;
91
91
  }
92
- .${t}-input:disabled {
92
+ .${e}-input:disabled {
93
93
  cursor: not-allowed;
94
94
  }
95
- .${t}-button {
95
+ .${e}-button {
96
96
  cursor: pointer;
97
97
  white-space: nowrap;
98
98
  box-sizing: border-box;
99
99
  outline: none;
100
- background-color: var(--${t}-button-color);
101
- color: var(--${t}-button-text-color);
102
- border-color: var(--${t}-button-border-color);
100
+ background-color: var(--${e}-button-color);
101
+ color: var(--${e}-button-text-color);
102
+ border-color: var(--${e}-button-border-color);
103
103
  transition: color 250ms, background-color 250ms, border-color 250ms;
104
104
  }
105
- .${t}-button:hover {
106
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
107
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
108
- border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
109
- }
110
- .${t}-wrapper.${t}-state-hover .${t}-button {
111
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
112
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
113
- border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
114
- }
115
- .${t}-button:focus,
116
- .${t}-button:focus-visible,
117
- .${t}-wrapper.${t}-state-focus .${t}-button {
118
- background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
119
- color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
120
- border-color: var(--${t}-focus-button-border-color, var(--${t}-button-border-color));
121
- }
122
- .${t}-input:focus-visible,
123
- .${t}-wrapper.${t}-state-focus .${t}-input {
105
+ .${e}-button:hover {
106
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
107
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
108
+ border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
109
+ }
110
+ .${e}-wrapper.${e}-state-hover .${e}-button {
111
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
112
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
113
+ border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
114
+ }
115
+ .${e}-button:focus,
116
+ .${e}-button:focus-visible,
117
+ .${e}-wrapper.${e}-state-focus .${e}-button {
118
+ background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
119
+ color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
120
+ border-color: var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
121
+ }
122
+ .${e}-input:focus-visible,
123
+ .${e}-wrapper.${e}-state-focus .${e}-input {
124
124
  outline: none;
125
125
  }
126
- .${t}-button:focus-visible,
127
- .${t}-wrapper.${t}-state-focus .${t}-button {
126
+ .${e}-button:focus-visible,
127
+ .${e}-wrapper.${e}-state-focus .${e}-button {
128
128
  outline: none;
129
129
  }
130
- .${t}-success {
131
- margin-top: ${Xe(8)};
132
- color: var(--${t}-success-success-color, var(--${t}-success-color));
130
+ .${e}-success {
131
+ margin-top: ${qt(8)};
132
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
- .${t}-error {
135
- margin-top: ${Xe(8)};
136
- color: var(--${t}-error-error-color, var(--${t}-error-color));
134
+ .${e}-error {
135
+ margin-top: ${qt(8)};
136
+ color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
- .${t}-overlay-anchor {
138
+ .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function Tl({settings:t,isEditor:e,metadata:n,activeEvent:o}){const{prefix:r}=x.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:p=[],buttonLabel:c,gap:m,fieldsGap:u,buttonCorners:I,buttonStroke:S,buttonPadding:y,isButtonFullWidth:l,inputCorners:g,inputStroke:w,inputPadding:v,inputColor:b,inputTextColor:E,inputBorderColor:B,placeholderColor:P,buttonColor:L,buttonTextColor:f,buttonBorderColor:F,labelTextColor:k,successColor:N,errorColor:R,fontFamily:W,inputFontSettings:_,inputFontSize:D,inputLineHeight:j,inputLetterSpacing:d,inputWordSpacing:$,inputTextAppearance:C,buttonFontSettings:T,buttonFontSize:A,buttonLineHeight:z,buttonLetterSpacing:q,buttonWordSpacing:at,buttonTextAppearance:it,labelFontSettings:ct,labelFontSize:M,labelLineHeight:Z,labelLetterSpacing:gt,labelWordSpacing:G,labelTextAppearance:Q,statusFontSettings:rt,statusFontSize:ft,statusLineHeight:V,statusLetterSpacing:h,statusWordSpacing:U,statusTextAppearance:X,successMessage:K,errorMessage:nt,stateOverrides:tt}=t,J=a==="B",lt=p.slice(0,Math.min(i,p.length)),vt={fontSettings:{fontFamily:W,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:D??.01,lineHeight:j,letterSpacing:d??0,wordSpacing:$??0,textAppearance:C,color:E},st=he(Jt(vt,e)),yt=x.scalingValue(w??0,e),Pt=x.scalingValue((j??D??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(a==="C"?w??0:(w??0)*2),e),ot={...st,borderStyle:"solid",borderRadius:a==="C"?0:x.scalingValue(g??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:yt,borderLeftWidth:0}:{borderWidth:yt},paddingTop:x.scalingValue((v==null?void 0:v.top)??0,e),paddingRight:x.scalingValue((v==null?void 0:v.right)??0,e),paddingBottom:x.scalingValue((v==null?void 0:v.bottom)??0,e),paddingLeft:x.scalingValue((v==null?void 0:v.left)??0,e),height:Pt,minHeight:Pt},ut={fontSettings:{fontFamily:W,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:A??.01,lineHeight:z,letterSpacing:q??0,wordSpacing:at??0,textAppearance:it,color:f},Tt=he(Jt(ut,e)),Xt=x.scalingValue(S??0,e),bn={fontSettings:{fontFamily:W,fontWeight:(ct==null?void 0:ct.fontWeight)??400,fontStyle:(ct==null?void 0:ct.fontStyle)??"normal"},fontSize:M??.01,lineHeight:Z,letterSpacing:gt??0,wordSpacing:G??0,textAppearance:Q,color:k},$e=Jt(bn,e),bt={fontSettings:{fontFamily:W,fontWeight:(rt==null?void 0:rt.fontWeight)??400,fontStyle:(rt==null?void 0:rt.fontStyle)??"normal"},fontSize:ft??.01,lineHeight:V,letterSpacing:h??0,wordSpacing:U??0,textAppearance:X,color:N},Vt=he(Jt(bt,e)),oe=x.buildColorVars(r,{inputColor:b,inputTextColor:E,inputBorderColor:B,placeholderColor:P!=null&&P.trim()?P:"#cccccc",buttonColor:L,buttonTextColor:f,buttonBorderColor:F,labelTextColor:k,successColor:N,errorColor:R},_l,Al,tt),[xt,Ht]=H.useState(()=>Object.fromEntries(lt.map(pt=>[pt.name,""]))),[no,Te]=H.useState("idle"),[mr,Ue]=H.useState(null),Sn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?nt:mr,Ge=o==="filled",_e=H.useMemo(()=>{if(!Ge)return xt;let pt=null;for(const jt of lt)(xt[jt.name]??"").trim().length>0||(pt=pt??{...xt},pt[jt.name]="Filled");return pt??xt},[xt,Ge,lt]),yr=Sn==="error"?x.getFormFieldValidationError(lt,_e):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(pt,jt)=>{Ht(Ot=>({...Ot,[pt]:jt}))},vr=async pt=>{pt.preventDefault();const jt=Object.fromEntries(lt.map(Ft=>{var ce;return[Ft.name,((ce=xt[Ft.name])==null?void 0:ce.trim())??""]}).filter(([,Ft])=>Ft));if(!oo){Te("error"),Ue("No integrations were found for this form.");return}if(Object.keys(jt).length===0)return;const Ot=x.getFormFieldValidationError(lt,xt);if(Ot){Te("error"),Ue(Ot);return}Te("submitting"),Ue(null);try{const Ft=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(jt)});if(!Ft.ok){const ce=await Ft.text();throw new Error(ce||`Request failed: ${Ft.status}`)}Te("success"),Ht(Object.fromEntries(lt.map(ce=>[ce.name,""])))}catch(Ft){Te("error"),Ue(Ft instanceof Error?Ft.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${hr}`.trim(),style:oe,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:$l(r)}}),s.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:x.scalingValue(m??0,e)},children:[s.jsx("div",{className:`${r}-fields`,style:{gap:x.scalingValue(u??0,e)},children:lt.map((pt,jt)=>s.jsxs("div",{className:`${r}-field-group${J?` ${r}-labeled`:""}`,children:[J&&s.jsx("span",{className:`${r}-field-label`,style:$e?{...$e,lineHeight:$e.fontSize}:void 0,children:pt.label||pt.name}),pt.type==="textarea"?s.jsx("textarea",{name:pt.name,autoComplete:"off",value:_e[pt.name]??"",onChange:Ot=>ro(pt.name,Ot.target.value),placeholder:pt.placeholder,className:`${r}-input`,style:ot,rows:1,"data-filled":Ge||(_e[pt.name]??"").trim().length>0,"data-field-type":"textarea"}):s.jsx("input",{type:pt.type==="phone"?"tel":pt.type==="email"?"email":"text",name:pt.name,autoComplete:"off",value:_e[pt.name]??"",onChange:Ot=>ro(pt.name,Ot.target.value),placeholder:pt.placeholder,required:pt.isRequired??pt.type==="email",className:`${r}-input`,style:ot,"data-filled":Ge||(_e[pt.name]??"").trim().length>0})]},jt))}),s.jsx("div",{className:`${r}-overlay-anchor`,children:s.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:x.scalingValue(I??0,e),borderWidth:Xt,paddingTop:x.scalingValue((y==null?void 0:y.top)??0,e),paddingRight:x.scalingValue((y==null?void 0:y.right)??0,e),paddingBottom:x.scalingValue((y==null?void 0:y.bottom)??0,e),paddingLeft:x.scalingValue((y==null?void 0:y.left)??0,e),...Tt,...l?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:s.jsx("span",{className:`${r}-overlay-anchor`,style:l?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":c})})})]}),Sn==="success"&&s.jsx("p",{className:`${r}-success`,style:{...Vt},children:K}),Sn==="error"&&s.jsx("p",{className:`${r}-error`,style:{...Vt},role:"alert",children:yr??fr??nt})]})}const _l={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"},Al=["hover","focus","filled","success","error"],El=`import React, { useMemo, useState } from 'react';
142
+ `}function $l({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=$.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:u=[],buttonLabel:s,gap:g,fieldsGap:c,buttonCorners:A,buttonStroke:x,buttonPadding:f,isButtonFullWidth:p,inputCorners:d,inputStroke:S,inputPadding:y,inputColor:v,inputTextColor:_,inputBorderColor:D,placeholderColor:V,buttonColor:T,buttonTextColor:m,buttonBorderColor:k,labelTextColor:R,successColor:O,errorColor:F,fontFamily:H,inputFontSettings:M,inputFontSize:X,inputLineHeight:G,inputLetterSpacing:h,inputWordSpacing:E,inputTextAppearance:I,buttonFontSettings:L,buttonFontSize:w,buttonLineHeight:N,buttonLetterSpacing:K,buttonWordSpacing:ie,buttonTextAppearance:ne,labelFontSettings:ce,labelFontSize:P,labelLineHeight:Q,labelLetterSpacing:de,labelWordSpacing:pe,labelTextAppearance:Y,statusFontSettings:ae,statusFontSize:fe,statusLineHeight:j,statusLetterSpacing:b,statusWordSpacing:U,statusTextAppearance:Z,successMessage:te,errorMessage:re,stateOverrides:W}=e,z=a==="B",q=u.slice(0,Math.min(i,u.length)),ee={fontSettings:{fontFamily:H,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:X??.01,lineHeight:G,letterSpacing:h??0,wordSpacing:E??0,textAppearance:I,color:_},oe=mt(Re(ee,t)),ue=$.scalingValue(S??0,t),Te=$.scalingValue((G??X??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(a==="C"?S??0:(S??0)*2),t),se={...oe,borderStyle:"solid",borderRadius:a==="C"?0:$.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ue,borderLeftWidth:0}:{borderWidth:ue},paddingTop:$.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:$.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:$.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:$.scalingValue((y==null?void 0:y.left)??0,t),height:Te,minHeight:Te},he={fontSettings:{fontFamily:H,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:w??.01,lineHeight:N,letterSpacing:K??0,wordSpacing:ie??0,textAppearance:ne,color:m},we=mt(Re(he,t)),Ge=$.scalingValue(x??0,t),hn={fontSettings:{fontFamily:H,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:P??.01,lineHeight:Q,letterSpacing:de??0,wordSpacing:pe??0,textAppearance:Y,color:R},St=Re(hn,t),be={fontSettings:{fontFamily:H,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:fe??.01,lineHeight:j,letterSpacing:b??0,wordSpacing:U??0,textAppearance:Z,color:O},Pe=mt(Re(be,t)),tt=$.buildColorVars(r,{inputColor:v,inputTextColor:_,inputBorderColor:D,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:T,buttonTextColor:m,buttonBorderColor:k,labelTextColor:R,successColor:O,errorColor:F},wl,Tl,W),[Se,He]=C.useState(()=>Object.fromEntries(q.map(me=>[me.name,""]))),[Qn,Ct]=C.useState("idle"),[dr,zt]=C.useState(null),yn=o==="success"?"success":o==="error"?"error":Qn,gr=o==="error"?re:dr,Bt=o==="filled",$t=C.useMemo(()=>{if(!Bt)return Se;let me=null;for(const Ve of q)(Se[Ve.name]??"").trim().length>0||(me=me??{...Se},me[Ve.name]="Filled");return me??Se},[Se,Bt,q]),mr=yn==="error"?$.getFormFieldValidationError(q,$t):null,fr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),eo=n==null?void 0:n.submitUrl,to=(me,Ve)=>{He(je=>({...je,[me]:Ve}))},hr=async me=>{me.preventDefault();const Ve=Object.fromEntries(q.map(Le=>{var lt;return[Le.name,((lt=Se[Le.name])==null?void 0:lt.trim())??""]}).filter(([,Le])=>Le));if(!eo){Ct("error"),zt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const je=$.getFormFieldValidationError(q,Se);if(je){Ct("error"),zt(je);return}Ct("submitting"),zt(null);try{const Le=await fetch(eo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Le.ok){const lt=await Le.text();throw new Error(lt||`Request failed: ${Le.status}`)}Ct("success"),He(Object.fromEntries(q.map(lt=>[lt.name,""])))}catch(Le){Ct("error"),zt(Le instanceof Error?Le.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${fr}`.trim(),style:tt,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Cl(r)}}),l.jsxs("form",{onSubmit:hr,className:`${r}-form`,style:{gap:$.scalingValue(g??0,t)},children:[l.jsx("div",{className:`${r}-fields`,style:{gap:$.scalingValue(c??0,t)},children:q.map((me,Ve)=>l.jsxs("div",{className:`${r}-field-group${z?` ${r}-labeled`:""}`,children:[z&&l.jsx("span",{className:`${r}-field-label`,style:St?{...St,lineHeight:St.fontSize}:void 0,children:me.label||me.name}),me.type==="textarea"?l.jsx("textarea",{name:me.name,autoComplete:"off",value:$t[me.name]??"",onChange:je=>to(me.name,je.target.value),placeholder:me.placeholder,className:`${r}-input`,style:se,rows:1,"data-filled":Bt||($t[me.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:me.type==="phone"?"tel":me.type==="email"?"email":"text",name:me.name,autoComplete:"off",value:$t[me.name]??"",onChange:je=>to(me.name,je.target.value),placeholder:me.placeholder,required:me.isRequired??me.type==="email",className:`${r}-input`,style:se,"data-filled":Bt||($t[me.name]??"").trim().length>0})]},Ve))}),l.jsx("div",{className:`${r}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:$.scalingValue(A??0,t),borderWidth:Ge,paddingTop:$.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:$.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:$.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:$.scalingValue((f==null?void 0:f.left)??0,t),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Qn==="submitting"?"...":s})})})]}),yn==="success"&&l.jsx("p",{className:`${r}-success`,style:{...Pe},children:te}),yn==="error"&&l.jsx("p",{className:`${r}-error`,style:{...Pe},role:"alert",children:mr??gr??re})]})}const wl={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"},Tl=["hover","focus","filled","success","error"],_l=`import React, { useMemo, useState } from 'react';
143
143
  import { CommonComponentProps } from '../props';
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -740,8 +740,8 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
740
740
  };
741
741
 
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
743
- `,Ll=[{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."},{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"}],Ke={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],kl={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:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",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:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",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:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",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:{...Ke.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:{...Ke.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:{...Ke.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:{...Ke.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:Ll,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{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:[...Fl],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"]},Il={element:Tl,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:kl,sourceCode:El};function Je(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Rl(t){return`
744
- .${t}-wrapper {
743
+ `,Al=[{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."},{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"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},El=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ll={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:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",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:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",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:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",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:{...Gt.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:{...Gt.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:{...Gt.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:{...Gt.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:Al,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{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:[...El],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"]},Il={element:$l,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Ll,sourceCode:_l};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function kl(e){return`
744
+ .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
747
747
  width: 100%;
@@ -749,90 +749,90 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
749
749
  align-items: stretch;
750
750
  justify-content: center;
751
751
  }
752
- .${t}-form {
752
+ .${e}-form {
753
753
  display: flex;
754
754
  width: 100%;
755
755
  align-items: stretch;
756
756
  overflow: hidden;
757
- border-color: var(--${t}-stroke-color);
757
+ border-color: var(--${e}-stroke-color);
758
758
  transition: border-color 250ms;
759
759
  }
760
- .${t}-form:hover {
761
- border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
760
+ .${e}-form:hover {
761
+ border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
762
762
  }
763
- .${t}-form:focus-within {
764
- border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
763
+ .${e}-form:focus-within {
764
+ border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
765
765
  }
766
- .${t}-wrapper.${t}-state-hover .${t}-form {
767
- border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
766
+ .${e}-wrapper.${e}-state-hover .${e}-form {
767
+ border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
768
768
  }
769
- .${t}-wrapper.${t}-state-focus .${t}-form {
770
- border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
769
+ .${e}-wrapper.${e}-state-focus .${e}-form {
770
+ border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
771
771
  }
772
- .${t}-wrapper.${t}-state-filled .${t}-form {
773
- border-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
772
+ .${e}-wrapper.${e}-state-filled .${e}-form {
773
+ border-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
774
774
  }
775
- .${t}-inputWrap {
775
+ .${e}-inputWrap {
776
776
  position: relative;
777
777
  display: flex;
778
778
  align-items: center;
779
779
  flex: 1;
780
780
  min-width: 0;
781
- background-color: var(--${t}-input-color);
781
+ background-color: var(--${e}-input-color);
782
782
  transition: background-color 250ms;
783
783
  }
784
- .${t}-inputWrap:hover,
785
- .${t}-wrapper.${t}-state-hover .${t}-inputWrap {
786
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
784
+ .${e}-inputWrap:hover,
785
+ .${e}-wrapper.${e}-state-hover .${e}-inputWrap {
786
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
787
787
  }
788
- .${t}-inputWrap:focus-within,
789
- .${t}-wrapper.${t}-state-focus .${t}-inputWrap {
790
- background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
788
+ .${e}-inputWrap:focus-within,
789
+ .${e}-wrapper.${e}-state-focus .${e}-inputWrap {
790
+ background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
791
791
  }
792
- .${t}-wrapper.${t}-state-filled .${t}-inputWrap {
793
- background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
792
+ .${e}-wrapper.${e}-state-filled .${e}-inputWrap {
793
+ background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
794
794
  }
795
- .${t}-input {
795
+ .${e}-input {
796
796
  flex: 1;
797
797
  min-width: 0;
798
798
  background: transparent;
799
799
  border: none;
800
800
  outline: none;
801
801
  -webkit-tap-highlight-color: transparent;
802
- color: var(--${t}-input-text-color);
802
+ color: var(--${e}-input-text-color);
803
803
  transition: color 250ms, background-color 250ms, border-color 250ms;
804
804
  }
805
- .${t}-input:hover {
806
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
805
+ .${e}-input:hover {
806
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
807
807
  }
808
- .${t}-inputWrap:hover .${t}-input,
809
- .${t}-wrapper.${t}-state-hover .${t}-input {
810
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
808
+ .${e}-inputWrap:hover .${e}-input,
809
+ .${e}-wrapper.${e}-state-hover .${e}-input {
810
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
811
811
  }
812
- .${t}-input:focus,
813
- .${t}-wrapper.${t}-state-focus .${t}-input {
814
- color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
812
+ .${e}-input:focus,
813
+ .${e}-wrapper.${e}-state-focus .${e}-input {
814
+ color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
815
815
  }
816
- .${t}-wrapper.${t}-state-filled .${t}-input {
817
- color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
816
+ .${e}-wrapper.${e}-state-filled .${e}-input {
817
+ color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
818
818
  }
819
- .${t}-input::placeholder {
820
- color: var(--${t}-placeholder-color);
819
+ .${e}-input::placeholder {
820
+ color: var(--${e}-placeholder-color);
821
821
  opacity: 1;
822
822
  transition: color 250ms, opacity 250ms;
823
823
  }
824
- .${t}-inputWrap:hover .${t}-input::placeholder,
825
- .${t}-wrapper.${t}-state-hover .${t}-input::placeholder {
826
- color: var(--${t}-hover-placeholder-color, var(--${t}-placeholder-color));
824
+ .${e}-inputWrap:hover .${e}-input::placeholder,
825
+ .${e}-wrapper.${e}-state-hover .${e}-input::placeholder {
826
+ color: var(--${e}-hover-placeholder-color, var(--${e}-placeholder-color));
827
827
  }
828
- .${t}-inputWrap:focus-within .${t}-input::placeholder,
829
- .${t}-wrapper.${t}-state-focus .${t}-input::placeholder {
830
- color: var(--${t}-focus-placeholder-color, var(--${t}-placeholder-color));
828
+ .${e}-inputWrap:focus-within .${e}-input::placeholder,
829
+ .${e}-wrapper.${e}-state-focus .${e}-input::placeholder {
830
+ color: var(--${e}-focus-placeholder-color, var(--${e}-placeholder-color));
831
831
  }
832
- .${t}-wrapper.${t}-state-filled .${t}-input::placeholder {
833
- color: var(--${t}-filled-placeholder-color, var(--${t}-placeholder-color));
832
+ .${e}-wrapper.${e}-state-filled .${e}-input::placeholder {
833
+ color: var(--${e}-filled-placeholder-color, var(--${e}-placeholder-color));
834
834
  }
835
- .${t}-submitBtn {
835
+ .${e}-submitBtn {
836
836
  box-sizing: border-box;
837
837
  height: 100%;
838
838
  display: flex;
@@ -841,13 +841,13 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
841
841
  border: none;
842
842
  cursor: pointer;
843
843
  white-space: nowrap;
844
- background-color: var(--${t}-button-color);
845
- color: var(--${t}-button-text-color);
844
+ background-color: var(--${e}-button-color);
845
+ color: var(--${e}-button-text-color);
846
846
  border-left-style: solid;
847
- border-left-color: var(--${t}-stroke-color);
847
+ border-left-color: var(--${e}-stroke-color);
848
848
  transition: color 250ms, background-color 250ms, border-color 250ms;
849
849
  }
850
- .${t}-submitBtn img {
850
+ .${e}-submitBtn img {
851
851
  display: block;
852
852
  box-sizing: border-box;
853
853
  flex: 0 1 auto;
@@ -858,7 +858,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
858
858
  max-height: 100%;
859
859
  object-fit: contain;
860
860
  }
861
- .${t}-submitBtn svg {
861
+ .${e}-submitBtn svg {
862
862
  display: block;
863
863
  box-sizing: border-box;
864
864
  flex: 0 1 auto;
@@ -868,7 +868,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
868
868
  max-width: 100%;
869
869
  max-height: 100%;
870
870
  }
871
- .${t}-submitBtn .${t}-submitBtnIcon {
871
+ .${e}-submitBtn .${e}-submitBtnIcon {
872
872
  position: relative;
873
873
  top: auto;
874
874
  left: auto;
@@ -884,54 +884,54 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
884
884
  max-width: 100%;
885
885
  max-height: 100%;
886
886
  }
887
- .${t}-submitBtn:hover,
888
- .${t}-wrapper.${t}-state-hover .${t}-submitBtn {
889
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
890
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
891
- border-left-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
887
+ .${e}-submitBtn:hover,
888
+ .${e}-wrapper.${e}-state-hover .${e}-submitBtn {
889
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
890
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
891
+ border-left-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
892
892
  }
893
- .${t}-submitBtn:focus,
894
- .${t}-wrapper.${t}-state-focus .${t}-submitBtn {
895
- background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
896
- color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
897
- border-left-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
893
+ .${e}-submitBtn:focus,
894
+ .${e}-wrapper.${e}-state-focus .${e}-submitBtn {
895
+ background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
896
+ color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
897
+ border-left-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
898
898
  }
899
- .${t}-wrapper.${t}-state-filled .${t}-submitBtn {
900
- background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
901
- color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
902
- border-left-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
899
+ .${e}-wrapper.${e}-state-filled .${e}-submitBtn {
900
+ background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
901
+ color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
902
+ border-left-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
903
903
  }
904
- .${t}-submitBtn:hover .${t}-submitBtnIcon,
905
- .${t}-wrapper.${t}-state-hover .${t}-submitBtn .${t}-submitBtnIcon {
906
- background-color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
904
+ .${e}-submitBtn:hover .${e}-submitBtnIcon,
905
+ .${e}-wrapper.${e}-state-hover .${e}-submitBtn .${e}-submitBtnIcon {
906
+ background-color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
907
907
  }
908
- .${t}-submitBtn:focus .${t}-submitBtnIcon,
909
- .${t}-wrapper.${t}-state-focus .${t}-submitBtn .${t}-submitBtnIcon {
910
- background-color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
908
+ .${e}-submitBtn:focus .${e}-submitBtnIcon,
909
+ .${e}-wrapper.${e}-state-focus .${e}-submitBtn .${e}-submitBtnIcon {
910
+ background-color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
911
911
  }
912
- .${t}-wrapper.${t}-state-filled .${t}-submitBtn .${t}-submitBtnIcon {
913
- background-color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
912
+ .${e}-wrapper.${e}-state-filled .${e}-submitBtn .${e}-submitBtnIcon {
913
+ background-color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
914
914
  }
915
- .${t}-wrapper.${t}-state-success .${t}-input,
916
- .${t}-wrapper.${t}-state-success .${t}-submitBtn {
915
+ .${e}-wrapper.${e}-state-success .${e}-input,
916
+ .${e}-wrapper.${e}-state-success .${e}-submitBtn {
917
917
  pointer-events: none;
918
918
  }
919
- .${t}-overlayAnchor {
919
+ .${e}-overlayAnchor {
920
920
  position: relative;
921
921
  display: flex;
922
922
  align-items: center;
923
923
  }
924
- .${t}-success {
925
- margin-top: ${Je(8)};
926
- font-size: ${Je(14)};
927
- color: var(--${t}-success-success-color, var(--${t}-success-color));
924
+ .${e}-success {
925
+ margin-top: ${Yt(8)};
926
+ font-size: ${Yt(14)};
927
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
- .${t}-error {
930
- margin-top: ${Je(8)};
931
- font-size: ${Je(14)};
932
- color: var(--${t}-error-error-color, var(--${t}-error-color));
929
+ .${e}-error {
930
+ margin-top: ${Yt(8)};
931
+ font-size: ${Yt(14)};
932
+ color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Wl=({settings:t,isEditor:e,metadata:n,activeEvent:o})=>{const{prefix:r}=x.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:p,fieldsToShow:c=1,fontFamily:m,inputFontSettings:u,inputFontSize:I,inputLineHeight:S,inputLetterSpacing:y,inputWordSpacing:l,inputTextAppearance:g,buttonFontSettings:w,buttonFontSize:v,buttonLineHeight:b,buttonLetterSpacing:E,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:L,statusFontSize:f,statusLineHeight:F,statusLetterSpacing:k,statusWordSpacing:N,statusTextAppearance:R,iconMaxWidth:W,minHeight:_,corners:D,stroke:j,stateOverrides:d,inputPadding:$,buttonPadding:C,successMessage:T="Thanks for subscribing!",errorMessage:A="Please, fill all required fields."}=t,z=a.slice(0,Math.min(c,a.length)),[q,at]=H.useState(()=>Object.fromEntries(z.map(bt=>[bt.name,""]))),[it,ct]=H.useState("idle"),[M,Z]=H.useState(null),gt=o==="success"?"success":o==="error"?"error":it,G=o==="error"?A:M,Q=o==="filled",rt=H.useMemo(()=>{if(!Q)return q;let bt=null;for(const Vt of z)(q[Vt.name]??"").trim().length>0||(bt=bt??{...q},bt[Vt.name]="Filled");return bt??q},[Q,q,z]),ft=gt==="error"?x.getFormFieldValidationError(z,rt):null,V=o&&o!=="default"?`${r}-state-${o}`:"",h=z.some(bt=>(rt[bt.name]??"").trim().length>0),U=V!==`${r}-state-filled`&&h?`${r}-state-filled`:"",X=`${V} ${U}`.trim(),K=n==null?void 0:n.submitUrl,nt=p??"",tt=(i==null?void 0:i.icon)??"",J=(i==null?void 0:i.mode)==="On",lt=nt||"Submit",vt={fontSettings:{fontFamily:m,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:I??.01,lineHeight:S,letterSpacing:y??0,wordSpacing:l??0,textAppearance:g,color:t.inputTextColor??"#111111"},st={fontSettings:{fontFamily:m,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:v??.01,lineHeight:b,letterSpacing:E??0,wordSpacing:B??0,textAppearance:P,color:t.buttonTextColor??"#ffffff"},yt={fontSettings:{fontFamily:m,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:f??.01,lineHeight:F,letterSpacing:k??0,wordSpacing:N??0,textAppearance:R,color:t.successColor??"#22c55e"},Pt=he(Jt(vt,e)),ot=he(Jt(st,e)),ut=he(Jt(yt,e)),Tt=x.buildColorVars(r,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(vt==null?void 0:vt.color)??"#111111",buttonTextColor:t.buttonTextColor??(st==null?void 0:st.color)??"#ffffff"},Vl,zl,d),Xt={borderRadius:x.scalingValue(D,e),borderWidth:x.scalingValue(j,e),borderStyle:"solid"},bn={borderLeftWidth:x.scalingValue(j,e)},$e=async bt=>{bt.preventDefault();const Vt=Object.fromEntries(z.map(xt=>{var Ht;return[xt.name,((Ht=q[xt.name])==null?void 0:Ht.trim())??""]}).filter(([,xt])=>xt));if(!K){ct("error"),Z("No integrations were found for this form.");return}if(Object.keys(Vt).length===0)return;const oe=x.getFormFieldValidationError(z,q);if(oe){ct("error"),Z(oe);return}ct("submitting"),Z(null);try{const xt=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Vt)});if(!xt.ok){const Ht=await xt.text();throw new Error(Ht||`Request failed: ${xt.status}`)}ct("success"),at(Object.fromEntries(z.map(Ht=>[Ht.name,""])))}catch(xt){ct("error"),Z(xt instanceof Error?xt.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${X}`.trim(),style:Tt,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),s.jsxs("form",{onSubmit:$e,className:`${r}-form`,style:{...Xt,height:x.scalingValue(_,e),minHeight:x.scalingValue(_,e)},children:[s.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:z.map(bt=>s.jsx("input",{type:bt.type==="email"?"email":bt.type==="phone"?"tel":"text",name:bt.name,autoComplete:"off",value:rt[bt.name]??"",onChange:Vt=>at(oe=>({...oe,[bt.name]:Vt.target.value})),placeholder:bt.placeholder,required:bt.isRequired??bt.type==="email",className:`${r}-input`,style:{...Pt,paddingRight:x.scalingValue($.right,e),paddingLeft:x.scalingValue($.left,e),paddingTop:x.scalingValue($.top,e),paddingBottom:x.scalingValue($.bottom,e)}},bt.name))}),s.jsx("div",{className:`${r}-overlayAnchor`,children:s.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":lt,style:{...ot,...bn,paddingRight:x.scalingValue(C.right,e),paddingLeft:x.scalingValue(C.left,e),paddingTop:x.scalingValue(C.top,e),paddingBottom:x.scalingValue(C.bottom,e)},children:it==="submitting"?"...":J?tt&&s.jsx(ye,{url:tt,className:`${r}-submitBtnIcon`,style:{maxWidth:x.scalingValue(W??0,e)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):nt})})]}),gt==="success"&&s.jsx("p",{className:`${r}-success`,style:{...ut},children:T}),gt==="error"&&s.jsx("p",{className:`${r}-error`,style:{...ut},role:"alert",children:ft??G??A})]})},Vl={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"},zl=["hover","focus","filled","success","error"],Ml=`import React, { useMemo, useState } from 'react';
934
+ `}const Fl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=$.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:s=1,fontFamily:g,inputFontSettings:c,inputFontSize:A,inputLineHeight:x,inputLetterSpacing:f,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:S,buttonFontSize:y,buttonLineHeight:v,buttonLetterSpacing:_,buttonWordSpacing:D,buttonTextAppearance:V,statusFontSettings:T,statusFontSize:m,statusLineHeight:k,statusLetterSpacing:R,statusWordSpacing:O,statusTextAppearance:F,iconMaxWidth:H,minHeight:M,corners:X,stroke:G,stateOverrides:h,inputPadding:E,buttonPadding:I,successMessage:L="Thanks for subscribing!",errorMessage:w="Please, fill all required fields."}=e,N=a.slice(0,Math.min(s,a.length)),[K,ie]=C.useState(()=>Object.fromEntries(N.map(be=>[be.name,""]))),[ne,ce]=C.useState("idle"),[P,Q]=C.useState(null),de=o==="success"?"success":o==="error"?"error":ne,pe=o==="error"?w:P,Y=o==="filled",ae=C.useMemo(()=>{if(!Y)return K;let be=null;for(const Pe of N)(K[Pe.name]??"").trim().length>0||(be=be??{...K},be[Pe.name]="Filled");return be??K},[Y,K,N]),fe=de==="error"?$.getFormFieldValidationError(N,ae):null,j=o&&o!=="default"?`${r}-state-${o}`:"",b=N.some(be=>(ae[be.name]??"").trim().length>0),U=j!==`${r}-state-filled`&&b?`${r}-state-filled`:"",Z=`${j} ${U}`.trim(),te=n==null?void 0:n.submitUrl,re=u??"",W=(i==null?void 0:i.icon)??"",z=(i==null?void 0:i.mode)==="On",q=re||"Submit",ee={fontSettings:{fontFamily:g,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:A??.01,lineHeight:x,letterSpacing:f??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},oe={fontSettings:{fontFamily:g,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:y??.01,lineHeight:v,letterSpacing:_??0,wordSpacing:D??0,textAppearance:V,color:e.buttonTextColor??"#ffffff"},ue={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:m??.01,lineHeight:k,letterSpacing:R??0,wordSpacing:O??0,textAppearance:F,color:e.successColor??"#22c55e"},Te=mt(Re(ee,t)),se=mt(Re(oe,t)),he=mt(Re(ue,t)),we=$.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ee==null?void 0:ee.color)??"#111111",buttonTextColor:e.buttonTextColor??(oe==null?void 0:oe.color)??"#ffffff"},Pl,Rl,h),Ge={borderRadius:$.scalingValue(X,t),borderWidth:$.scalingValue(G,t),borderStyle:"solid"},hn={borderLeftWidth:$.scalingValue(G,t)},St=async be=>{be.preventDefault();const Pe=Object.fromEntries(N.map(Se=>{var He;return[Se.name,((He=K[Se.name])==null?void 0:He.trim())??""]}).filter(([,Se])=>Se));if(!te){ce("error"),Q("No integrations were found for this form.");return}if(Object.keys(Pe).length===0)return;const tt=$.getFormFieldValidationError(N,K);if(tt){ce("error"),Q(tt);return}ce("submitting"),Q(null);try{const Se=await fetch(te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(!Se.ok){const He=await Se.text();throw new Error(He||`Request failed: ${Se.status}`)}ce("success"),ie(Object.fromEntries(N.map(He=>[He.name,""])))}catch(Se){ce("error"),Q(Se instanceof Error?Se.message:"Something went wrong")}};return l.jsxs("div",{className:`${r}-wrapper ${Z}`.trim(),style:we,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:kl(r)}}),l.jsxs("form",{onSubmit:St,className:`${r}-form`,style:{...Ge,height:$.scalingValue(M,t),minHeight:$.scalingValue(M,t)},children:[l.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(be=>l.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:ae[be.name]??"",onChange:Pe=>ie(tt=>({...tt,[be.name]:Pe.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${r}-input`,style:{...Te,paddingRight:$.scalingValue(E.right,t),paddingLeft:$.scalingValue(E.left,t),paddingTop:$.scalingValue(E.top,t),paddingBottom:$.scalingValue(E.bottom,t)}},be.name))}),l.jsx("div",{className:`${r}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":q,style:{...se,...hn,paddingRight:$.scalingValue(I.right,t),paddingLeft:$.scalingValue(I.left,t),paddingTop:$.scalingValue(I.top,t),paddingBottom:$.scalingValue(I.bottom,t)},children:ne==="submitting"?"...":z?W&&l.jsx(Xe,{url:W,className:`${r}-submitBtnIcon`,style:{maxWidth:$.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):re})})]}),de==="success"&&l.jsx("p",{className:`${r}-success`,style:{...he},children:L}),de==="error"&&l.jsx("p",{className:`${r}-error`,style:{...he},role:"alert",children:fe??pe??w})]})},Pl={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"},Rl=["hover","focus","filled","success","error"],Ml=`import React, { useMemo, useState } from 'react';
935
935
  import { CommonComponentProps } from '../props';
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1503,67 +1503,170 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Nl="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>'),Pl=[{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."}],_n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],jl={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:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",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 Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",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:{..._n.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:{..._n.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:{..._n.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:Pl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Nl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",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:0,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:0,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"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:[...Hl],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"]},Ol={element:Wl,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:jl,sourceCode:Ml},Bl="Testimonials-module__marqueeWrapper___CwgXx",Dl="Testimonials-module__marqueeTrack___0eRvh",Ul="Testimonials-module__marqueeSet___Zz-mH",Gl="Testimonials-module__wrapper___MSG51",ql="Testimonials-module__cover___8N6A3",Yl="Testimonials-module__elementsOverlay___ar14y",Xl="Testimonials-module__image___fqDvN",Kl="Testimonials-module__control___ORbH3",kt={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:Gl,cover:ql,elementsOverlay:Yl,image:Xl,control:Kl},Jl=30,Zl=t=>{if(typeof t=="number")return t;const e=parseFloat(String(t??""));return Number.isFinite(e)?e:0},Ql=t=>({fontSettings:{...t.fontSettings},letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,fontSize:t.fontSizeLineHeight.fontSize,lineHeight:t.fontSizeLineHeight.lineHeight,textAppearance:t.textAppearance,color:t.color}),ts=({settings:t,content:e,isEditor:n})=>{const{type:o,autoplay:r,speed:a,direction:i,pauseOnHover:p,gap:c,cardWidth:m,cardHeight:u,corners:I,stroke:S,strokeColor:y,bgColor:l,padding:g,iconMarginTop:w,iconWidth:v,textMarginTop:b,textMinHeight:E,captionMarginTop:B}=t,P=r==="on",L=Math.max(0,Zl(a))*Jl,f=G=>x.scalingValue(G,n??!1),F=H.useRef(null),k=H.useRef(null),N=H.useRef(null),[R,W]=H.useState(0),[_,D]=H.useState(0),j=H.useRef(0),d=H.useRef(!1),$=H.useRef(null),C=H.useRef(i),T=P&&p==="on",A=H.useMemo(()=>typeof i=="boolean"?i?"right":"left":String(i??"").trim().toLowerCase()==="right"?"right":"left",[i]),z=G=>{var st;const Q=(st=t==null?void 0:t.styles)==null?void 0:st[G];if(Q)return Q;const rt=G==="text"?"text":"caption",ft=t==null?void 0:t[`${rt}FontFamily`],V=t==null?void 0:t[`${rt}FontSettings`],h=t==null?void 0:t[`${rt}LetterSpacing`],U=t==null?void 0:t[`${rt}WordSpacing`],X=t==null?void 0:t[`${rt}TextAlign`],K=t==null?void 0:t[`${rt}TextAppearance`],nt=(t==null?void 0:t[`${rt}Color`])??(G==="text"?t==null?void 0:t.imageCaptionColor:void 0),tt=t==null?void 0:t[`${rt}FontSize`],J=t==null?void 0:t[`${rt}LineHeight`];return typeof ft=="string"||!!V||typeof h=="number"||typeof U=="number"||typeof X=="string"||!!K||typeof nt=="string"||typeof tt=="number"||typeof J=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof ft=="string"?ft:"Arial",fontWeight:typeof(V==null?void 0:V.fontWeight)=="number"?V.fontWeight:400,fontStyle:typeof(V==null?void 0:V.fontStyle)=="string"?V.fontStyle:"normal"},letterSpacing:typeof h=="number"?h:0,wordSpacing:typeof U=="number"?U:0,textAlign:X==="left"||X==="center"||X==="right"?X:"left",fontSizeLineHeight:{fontSize:typeof tt=="number"?tt:.01,lineHeight:typeof J=="number"?J:.01},textAppearance:{textTransform:(K==null?void 0:K.textTransform)??"none",textDecoration:(K==null?void 0:K.textDecoration)??"none",fontVariant:(K==null?void 0:K.fontVariant)??"normal"},color:typeof nt=="string"?nt:"#000000"}:void 0},q=z("text"),at=z("caption"),it=H.useMemo(()=>!P||(e==null?void 0:e.length)===0?1:_<=0||R<=0?2:Math.max(2,Math.ceil(R/_)+1),[P,e==null?void 0:e.length,_,R]);H.useLayoutEffect(()=>{if(!P)return;const G=F.current,Q=N.current;if(!G||!Q)return;let rt=0;const ft=()=>{W(G.getBoundingClientRect().width),D(Q.getBoundingClientRect().width)},V=()=>{cancelAnimationFrame(rt),rt=requestAnimationFrame(ft)};V();const h=new ResizeObserver(V);return h.observe(G),h.observe(Q),()=>{cancelAnimationFrame(rt),h.disconnect()}},[P,e==null?void 0:e.length]),H.useLayoutEffect(()=>{const G=k.current;if(!P||!G)return;if(_<=0||L<=0){G.style.transform="translate3d(0, 0, 0)";return}C.current!==i&&(j.current=1-j.current,C.current=i);const Q=_/L*1e3,rt=A==="left"?-_:0,ft=A==="left"?0:-_,V=G.animate([{transform:`translate3d(${rt}px, 0, 0)`},{transform:`translate3d(${ft}px, 0, 0)`}],{duration:Q,iterations:1/0,easing:"linear"});return V.currentTime=j.current*Q,d.current&&V.pause(),$.current=V,()=>{const h=typeof V.currentTime=="number"?V.currentTime:0;j.current=Q>0?h/Q%1:0,V.cancel(),$.current===V&&($.current=null)}},[P,_,L,i]);const ct=()=>{var G;T&&(d.current=!0,(G=$.current)==null||G.pause())},M=()=>{var G;T&&(d.current=!1,(G=$.current)==null||G.play())},Z=(G,Q,rt,ft,V,h,U)=>s.jsxs("div",{children:[s.jsx("div",{"data-controls":ft,className:kt.control}),s.jsx("div",{"data-styles":rt,className:kt.caption,style:{...Jt(Ql(G),n),textAlign:G.textAlign,pointerEvents:"auto",marginTop:f(h),...U?{minHeight:f(U)}:{}},children:s.jsx(ze,{content:Q})})]},V),gt=(G,Q)=>{var rt,ft,V,h;return s.jsxs("div",{style:{padding:`${f(g.top)} ${f(g.right)} ${f(g.bottom)} ${f(g.left)}`,width:f(m+S*2),minHeight:f(u),height:"100%",borderRadius:f(I),border:`${f(S)} solid ${y}`,boxSizing:"border-box",position:"relative",flex:"0 0 auto",overflow:"hidden"},children:[((rt=G.image)==null?void 0:rt.url)&&s.jsx("img",{className:kt.image,src:G.image.url,alt:G.image.name,style:{objectFit:G.image.objectFit||"cover",borderRadius:f(I),height:f(u)}}),s.jsx("div",{className:kt.cover,style:{background:l,height:"100%"}}),s.jsxs("div",{className:kt.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none"},children:[o==="B"&&q&&Z(q,G.text,"text","elements.text.margin.top","text",b,E),s.jsx("div",{children:s.jsx("div",{"data-controls":"elements.icon.margin.top",className:kt.control,style:{marginTop:f(w),width:f(v)},children:s.jsx("img",{src:(ft=G.icon)==null?void 0:ft.url,alt:(V=G.icon)==null?void 0:V.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((h=G.icon)==null?void 0:h.objectFit)||"cover"}})})},"icon"),o!=="B"&&q&&Z(q,G.text,"text","elements.text.margin.top","text",b,E),at&&Z(at,G.caption,"caption","elements.caption.margin.top","caption",B)]})]},Q)};return P&&(e!=null&&e.length)&&e.length>0?s.jsx("div",{ref:F,className:mt(kt.wrapper,kt.marqueeWrapper),"aria-label":"Testimonials",children:s.jsx("div",{ref:k,className:kt.marqueeTrack,onMouseEnter:ct,onMouseLeave:M,children:Array.from({length:it},(G,Q)=>s.jsx("div",{ref:Q===0?N:void 0,className:kt.marqueeSet,style:{gap:f(c),paddingRight:f(c)},"aria-hidden":Q>0,children:e==null?void 0:e.map((rt,ft)=>gt(rt,`${Q}-${ft}`))},`set-${Q}`))})}):s.jsx("div",{className:kt.wrapper,children:s.jsx("div",{style:{display:"flex",flexDirection:"row",gap:f(c),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:e==null?void 0:e.map((G,Q)=>gt(G,Q))})})},es=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1506
+ `,Wl="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>'),Nl=[{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."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Hl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vl={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:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",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 Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",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:{...$n.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:{...$n.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:{...$n.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:Nl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Wl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",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:0,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:0,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"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:[...Hl],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"]},jl={element:Fl,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Vl,sourceCode:Ml};function wo(e){return`
1507
+ .${e}-marquee-wrapper {
1508
+ overflow: hidden;
1509
+ width: 100%;
1510
+ height: 100%;
1511
+ }
1512
+
1513
+ .${e}-marquee-track {
1514
+ display: flex;
1515
+ flex-direction: row;
1516
+ width: max-content;
1517
+ will-change: transform;
1518
+ backface-visibility: hidden;
1519
+ transform: translateZ(0);
1520
+ }
1521
+
1522
+ .${e}-marquee-set {
1523
+ display: flex;
1524
+ flex-direction: row;
1525
+ flex: 0 0 auto;
1526
+ }
1527
+
1528
+ .${e}-wrapper {
1529
+ position: relative;
1530
+ width: 100%;
1531
+ height: 100%;
1532
+ order: 1;
1533
+ }
1534
+
1535
+ .${e}-cover {
1536
+ position: absolute;
1537
+ width: 100%;
1538
+ height: 100%;
1539
+ top: 0;
1540
+ left: 0;
1541
+ }
1542
+
1543
+ .${e}-elements-overlay {
1544
+ position: relative;
1545
+ inset: 0;
1546
+ display: flex;
1547
+ flex-direction: column;
1548
+ pointer-events: none;
1549
+ }
1550
+
1551
+ .${e}-control {
1552
+ position: relative;
1553
+ z-index: 2;
1554
+ width: 100%;
1555
+ }
1556
+
1557
+ .${e}-control::before {
1558
+ content: "";
1559
+ position: absolute;
1560
+ top: 0;
1561
+ left: 0;
1562
+ width: 100%;
1563
+ height: 100%;
1564
+ min-height: 20px;
1565
+ pointer-events: auto;
1566
+ z-index: 10;
1567
+ }
1568
+ `}const Ol=30,zl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),{autoplay:a,align:i,speed:u,direction:s,pauseOnHover:g,gap:c,cardWidth:A,corners:x,stroke:f,strokeColor:p,bgColor:d,padding:S,logoMarginTop:y,logoWidth:v,logoHeight:_,captionMarginTop:D}=e,V=a==="on"&&!o,T=Math.max(0,u)*Ol,m=W=>$.scalingValue(W,n??!1),k=C.useRef(null),R=C.useRef(null),O=C.useRef(null),[F,H]=C.useState(0),[M,X]=C.useState(0),G=C.useRef(0),h=C.useRef(!1),E=C.useRef(null),I=V&&g==="on",L=C.useRef(null),[w,N]=C.useState(0),[K,ie]=C.useState(0),ne=C.useRef(s),ce=W=>{var q,ee,oe,ue,Te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${W}FontFamily`])??"Arial",fontWeight:((q=e==null?void 0:e[`${W}FontSettings`])==null?void 0:q.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${W}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((ue=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:ue.textDecoration)??"none",fontVariant:((Te=e==null?void 0:e[`${W}TextAppearance`])==null?void 0:Te.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${W}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${W}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${W}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${W}LineHeight`])??.01,color:(e==null?void 0:e[`${W}Color`])??"#000000"}},P=ce("text"),Q=ce("caption"),de=C.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(W=>{var z,q;return(((z=W.text)==null?void 0:z.length)??0)>0||(((q=W.caption)==null?void 0:q.length)??0)>0}),[t]),pe=C.useMemo(()=>a==="off"||(t==null?void 0:t.length)===0?1:M<=0||F<=0?2:Math.max(2,Math.ceil(F/M)+1),[a,t==null?void 0:t.length,M,F]);C.useLayoutEffect(()=>{if(a==="off")return;const W=k.current,z=O.current;if(!W||!z)return;let q=0;const ee=()=>{H(W.getBoundingClientRect().width),X(z.getBoundingClientRect().width)},oe=()=>{cancelAnimationFrame(q),q=requestAnimationFrame(ee)};oe();const ue=new ResizeObserver(oe);return ue.observe(W),ue.observe(z),()=>{cancelAnimationFrame(q),ue.disconnect()}},[a,t==null?void 0:t.length]),C.useLayoutEffect(()=>{const W=R.current;if(a==="off"||!W||!V)return;if(M<=0||T<=0){W.style.transform="translate3d(0, 0, 0)";return}ne.current!==s&&(G.current=1-G.current,ne.current=s);const z=M/T*1e3,q=s==="left"?-M:0,ee=s==="left"?0:-M,oe=W.animate([{transform:`translate3d(${q}px, 0, 0)`},{transform:`translate3d(${ee}px, 0, 0)`}],{duration:z,iterations:1/0,easing:"linear"});return oe.currentTime=G.current*z,h.current&&oe.pause(),E.current=oe,()=>{const ue=typeof oe.currentTime=="number"?oe.currentTime:0;G.current=z>0?ue/z%1:0,oe.cancel(),E.current===oe&&(E.current=null)}},[a,V,M,T,s]);const Y=()=>{var W;I&&(h.current=!0,(W=E.current)==null||W.pause())},ae=()=>{var W;I&&(h.current=!1,(W=E.current)==null||W.play())},fe=C.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),j=C.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),b=C.useCallback((W,z,q,ee)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[l.jsx("div",{"data-controls":ee==null?void 0:ee.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:m((ee==null?void 0:ee.marginTop)??0)}}),l.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...Re(W,n),textAlign:j,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:l.jsx(Pt,{content:z})})]},q),[fe,j,n]),U=C.useCallback((W,z,q)=>{var ee,oe,ue;return l.jsxs("div",{style:{padding:`${m(S.top)} ${m(S.right)} ${m(S.bottom)} ${m(S.left)}`,width:m(A+f*2),height:"100%",borderRadius:m(x),border:`${m(f)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${r}-cover`,style:{background:d}}),l.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:fe,textAlign:j},children:[P&&W.text&&b(P,W.text,"text",q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(q==null?void 0:q.textMinHeightPx)=="number"&&q.textMinHeightPx>0?{minHeightPx:q.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:fe,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:m(y)}}),l.jsx("div",{style:{width:m(v),height:m(_)},children:((ee=W.logo)==null?void 0:ee.url)&&l.jsx("img",{src:W.logo.url,alt:((oe=W.logo)==null?void 0:oe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ue=W.logo)==null?void 0:ue.objectFit)||"contain"}})})]},"logo"),Q&&W.caption&&b(Q,W.caption,"caption",{controlsName:"captionMarginTop",marginTop:D,...q!=null&&q.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(q==null?void 0:q.captionMinHeightPx)=="number"&&q.captionMinHeightPx>0?{minHeightPx:q.captionMinHeightPx}:{}})]})]},z)},[d,D,Q,A,x,_,y,v,fe,j,S.bottom,S.left,S.right,S.top,b,f,p,P,n]);$.useTestimonialTextMeasure({enabled:de,rootRef:L,onExtents:({maxTextPx:W,maxCaptionPx:z})=>{N(W),ie(z)},deps:[t,U]});const Z=de?{textMinHeightPx:w,captionMinHeightPx:K}:void 0,te=de?l.jsx("div",{ref:L,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((W,z)=>U(W,`measure-${z}`,{dataMeasureAttrs:!0}))}):null,re=(W,z,q)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[U(W,`card-${z}`,Z),n&&!q&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${m(c)})`,width:m(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},z);return a==="on"&&(t!=null&&t.length)&&t.length>0?l.jsxs("div",{ref:k,className:ge(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:wo(r)}}),te,l.jsx("div",{ref:R,className:`${r}-marquee-track`,onMouseEnter:Y,onMouseLeave:ae,children:Array.from({length:pe},(W,z)=>l.jsx("div",{ref:z===0?O:void 0,className:`${r}-marquee-set`,style:{gap:m(c),paddingRight:m(c)},"aria-hidden":z>0,children:t==null?void 0:t.map((q,ee)=>re(q,`${z}-${ee}`,ee===((t==null?void 0:t.length)??0)-1))},`set-${z}`))})]}):l.jsxs("div",{className:`${r}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:wo(r)}}),te,l.jsx("div",{style:{gap:m(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((W,z)=>re(W,z,z===((t==null?void 0:t.length)??0)-1))})]})},Bl=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
1507
1569
  import cn from 'classnames';
1508
- import classes from './Testimonials.module.scss';
1509
1570
  import { CommonComponentProps } from '../props';
1510
1571
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1511
1572
  import { scalingValue } from '../utils/scalingValue';
1512
1573
  import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
1574
+ import { useScopedStyles } from '../utils/useScopedStyles';
1575
+ import { useTestimonialTextMeasure } from '../utils/useTestimonialTextMeasure';
1576
+
1577
+ function getCSS(P: string): string {
1578
+ return \`
1579
+ .\${P}-marquee-wrapper {
1580
+ overflow: hidden;
1581
+ width: 100%;
1582
+ height: 100%;
1583
+ }
1584
+
1585
+ .\${P}-marquee-track {
1586
+ display: flex;
1587
+ flex-direction: row;
1588
+ width: max-content;
1589
+ will-change: transform;
1590
+ backface-visibility: hidden;
1591
+ transform: translateZ(0);
1592
+ }
1593
+
1594
+ .\${P}-marquee-set {
1595
+ display: flex;
1596
+ flex-direction: row;
1597
+ flex: 0 0 auto;
1598
+ }
1599
+
1600
+ .\${P}-wrapper {
1601
+ position: relative;
1602
+ width: 100%;
1603
+ height: 100%;
1604
+ order: 1;
1605
+ }
1606
+
1607
+ .\${P}-cover {
1608
+ position: absolute;
1609
+ width: 100%;
1610
+ height: 100%;
1611
+ top: 0;
1612
+ left: 0;
1613
+ }
1614
+
1615
+ .\${P}-elements-overlay {
1616
+ position: relative;
1617
+ inset: 0;
1618
+ display: flex;
1619
+ flex-direction: column;
1620
+ pointer-events: none;
1621
+ }
1622
+
1623
+ .\${P}-control {
1624
+ position: relative;
1625
+ z-index: 2;
1626
+ width: 100%;
1627
+ }
1628
+
1629
+ .\${P}-control::before {
1630
+ content: "";
1631
+ position: absolute;
1632
+ top: 0;
1633
+ left: 0;
1634
+ width: 100%;
1635
+ height: 100%;
1636
+ min-height: 20px;
1637
+ pointer-events: auto;
1638
+ z-index: 10;
1639
+ }
1640
+ \`;
1641
+ }
1513
1642
 
1514
1643
  type TestimonialsProps = {
1515
1644
  settings: TestimonialsSettings;
1516
1645
  content?: TestimonialsItem[];
1517
1646
  isEditor?: boolean;
1647
+ isPreviewMode?: boolean;
1518
1648
  } & CommonComponentProps;
1519
1649
 
1520
- type CaptionStyleFromFlatSettings = {
1521
- fontSettings: {
1522
- fontFamily: string;
1523
- fontWeight: number;
1524
- fontStyle: string;
1525
- };
1526
- widthSettings: {
1527
- width: number;
1528
- sizing: 'auto' | 'manual';
1529
- };
1530
- letterSpacing: number;
1531
- textAlign: 'left' | 'center' | 'right';
1532
- wordSpacing: number;
1533
- fontSizeLineHeight: {
1534
- fontSize: number;
1535
- lineHeight: number;
1536
- };
1537
- textAppearance: {
1538
- textTransform: 'none' | 'uppercase' | 'lowercase';
1539
- textDecoration: 'none' | 'underline';
1540
- fontVariant: 'normal' | 'small-caps';
1541
- };
1542
- color: string;
1543
- };
1544
-
1545
1650
  const PX_PER_SEC_PER_SPEED_UNIT = 30;
1546
1651
 
1547
- const parseSpeed = (speed: unknown): number => {
1548
- if (typeof speed === 'number') return speed;
1549
- const n = parseFloat(String(speed ?? ''));
1550
- return Number.isFinite(n) ? n : 0;
1652
+ type RenderCardOpts = {
1653
+ textMinHeightPx?: number;
1654
+ captionMinHeightPx?: number;
1655
+ dataMeasureAttrs?: boolean;
1656
+ };
1657
+
1658
+ type RenderTextOpts = {
1659
+ controlsName?: string;
1660
+ marginTop?: number;
1661
+ minHeightPx?: number;
1662
+ dataMeasureKind?: 'text' | 'caption';
1551
1663
  };
1552
1664
 
1553
- const resolveCaptionTextStyles = (caption: CaptionStyles): TextStyles => ({
1554
- fontSettings: { ...caption.fontSettings },
1555
- letterSpacing: caption.letterSpacing,
1556
- wordSpacing: caption.wordSpacing,
1557
- fontSize: caption.fontSizeLineHeight.fontSize,
1558
- lineHeight: caption.fontSizeLineHeight.lineHeight,
1559
- textAppearance: caption.textAppearance,
1560
- color: caption.color,
1561
- });
1562
-
1563
- export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps) => {
1564
- const { type, autoplay, speed, direction, pauseOnHover, gap, cardWidth, cardHeight, corners, stroke, strokeColor, bgColor, padding, iconMarginTop, iconWidth, textMarginTop, textMinHeight, captionMarginTop } = settings;
1565
- const isAutoplay = autoplay === 'on';
1566
- const pxPerSec = Math.max(0, parseSpeed(speed)) * PX_PER_SEC_PER_SPEED_UNIT;
1665
+ export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
1666
+ const { prefix: P } = useScopedStyles();
1667
+ const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, captionMarginTop } = settings;
1668
+ const isAnimating = autoplay === 'on' && !isPreviewMode;
1669
+ const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
1567
1670
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
1568
1671
  const wrapperRef = useRef<HTMLDivElement | null>(null);
1569
1672
  const trackRef = useRef<HTMLDivElement | null>(null);
@@ -1573,80 +1676,51 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1573
1676
  const progressRef = useRef(0);
1574
1677
  const hoveringRef = useRef(false);
1575
1678
  const animRef = useRef<Animation | null>(null);
1576
- const lastDirectionRef = useRef(direction);
1577
- const hoverPauseEnabled = isAutoplay && pauseOnHover === 'on';
1578
-
1579
- const normalizedDirection = useMemo<'left' | 'right'>(() => {
1580
- if (typeof direction === 'boolean') return direction ? 'right' : 'left';
1581
- const d = String(direction ?? '').trim().toLowerCase();
1582
- return d === 'right' ? 'right' : 'left';
1583
- }, [direction]);
1584
-
1585
- const resolveCaptionStyle = (kind: 'text' | 'caption'): CaptionStyles | undefined => {
1586
- const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
1587
- if (fromNested) return fromNested;
1588
-
1589
- const prefix = kind === 'text' ? 'text' : 'caption';
1590
- const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
1591
- const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
1592
- const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
1593
- const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
1594
- const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
1595
- const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1596
- const color =
1597
- (settings as any)?.[\`\${prefix}Color\`] ??
1598
- (kind === 'text' ? (settings as any)?.imageCaptionColor : undefined);
1599
- const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1600
- const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1601
-
1602
- const hasAnyFlat =
1603
- typeof fontFamily === 'string' ||
1604
- !!fontSettings ||
1605
- typeof letterSpacing === 'number' ||
1606
- typeof wordSpacing === 'number' ||
1607
- typeof textAlign === 'string' ||
1608
- !!textAppearance ||
1609
- typeof color === 'string' ||
1610
- typeof fontSize === 'number' ||
1611
- typeof lineHeight === 'number';
1612
- if (!hasAnyFlat) return undefined;
1613
-
1614
- const flat: CaptionStyleFromFlatSettings = {
1615
- widthSettings: { width: 0.13, sizing: 'manual' },
1679
+ const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
1680
+ const measureLayerRef = useRef<HTMLDivElement>(null);
1681
+ const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
1682
+ const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
1683
+ const lastDirectionRef = useRef<'left' | 'right'>(direction);
1684
+
1685
+ const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
1686
+ const styles: TextStyles = {
1616
1687
  fontSettings: {
1617
- fontFamily: typeof fontFamily === 'string' ? fontFamily : 'Arial',
1618
- fontWeight: typeof fontSettings?.fontWeight === 'number' ? fontSettings.fontWeight : 400,
1619
- fontStyle: typeof fontSettings?.fontStyle === 'string' ? fontSettings.fontStyle : 'normal',
1620
- },
1621
- letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
1622
- wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
1623
- textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
1624
- fontSizeLineHeight: {
1625
- fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
1626
- lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
1688
+ fontFamily: (settings as any)?.[\`\${kind}FontFamily\`] ?? 'Arial',
1689
+ fontWeight: (settings as any)?.[\`\${kind}FontSettings\`]?.fontWeight ?? 400,
1690
+ fontStyle: (settings as any)?.[\`\${kind}FontSettings\`]?.fontStyle ?? 'normal',
1627
1691
  },
1628
1692
  textAppearance: {
1629
- textTransform: textAppearance?.textTransform ?? 'none',
1630
- textDecoration: textAppearance?.textDecoration ?? 'none',
1631
- fontVariant: textAppearance?.fontVariant ?? 'normal',
1693
+ textTransform: (settings as any)?.[\`\${kind}TextAppearance\`]?.textTransform ?? 'none',
1694
+ textDecoration: (settings as any)?.[\`\${kind}TextAppearance\`]?.textDecoration ?? 'none',
1695
+ fontVariant: (settings as any)?.[\`\${kind}TextAppearance\`]?.fontVariant ?? 'normal',
1632
1696
  },
1633
- color: typeof color === 'string' ? color : '#000000',
1697
+ letterSpacing: (settings as any)?.[\`\${kind}LetterSpacing\`] ?? 0,
1698
+ wordSpacing: (settings as any)?.[\`\${kind}WordSpacing\`] ?? 0,
1699
+ fontSize: (settings as any)?.[\`\${kind}FontSize\`] ?? 0.01,
1700
+ lineHeight: (settings as any)?.[\`\${kind}LineHeight\`] ?? 0.01,
1701
+ color: (settings as any)?.[\`\${kind}Color\`] ?? '#000000',
1634
1702
  };
1635
-
1636
- return flat as CaptionStyles;
1703
+ return styles;
1637
1704
  };
1638
1705
 
1639
- const textStyle = resolveCaptionStyle('text');
1640
- const captionStyle = resolveCaptionStyle('caption');
1706
+ const textStyle = resolveTextStyle('text');
1707
+ const captionStyle = resolveTextStyle('caption');
1708
+
1709
+ const shouldMeasureTextExtents = useMemo(
1710
+ () =>
1711
+ (content?.length ?? 0) > 1 &&
1712
+ (content ?? []).some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0),
1713
+ [content]
1714
+ );
1641
1715
 
1642
1716
  const copies = useMemo(() => {
1643
- if (!isAutoplay || content?.length === 0) return 1;
1717
+ if (autoplay === 'off' || content?.length === 0) return 1;
1644
1718
  if (setWidth <= 0 || containerWidth <= 0) return 2;
1645
1719
  return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1646
- }, [isAutoplay, content?.length, setWidth, containerWidth]);
1720
+ }, [autoplay, content?.length, setWidth, containerWidth]);
1647
1721
 
1648
1722
  useLayoutEffect(() => {
1649
- if (!isAutoplay) return;
1723
+ if (autoplay === 'off') return;
1650
1724
  const wrapper = wrapperRef.current;
1651
1725
  const set = setRef.current;
1652
1726
  if (!wrapper || !set) return;
@@ -1667,11 +1741,11 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1667
1741
  cancelAnimationFrame(raf);
1668
1742
  ro.disconnect();
1669
1743
  };
1670
- }, [isAutoplay, content?.length]);
1744
+ }, [autoplay, content?.length]);
1671
1745
 
1672
1746
  useLayoutEffect(() => {
1673
1747
  const track = trackRef.current;
1674
- if (!isAutoplay || !track) return;
1748
+ if (autoplay === 'off' || !track || !isAnimating) return;
1675
1749
  if (setWidth <= 0 || pxPerSec <= 0) {
1676
1750
  track.style.transform = 'translate3d(0, 0, 0)';
1677
1751
  return;
@@ -1681,8 +1755,8 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1681
1755
  lastDirectionRef.current = direction;
1682
1756
  }
1683
1757
  const duration = (setWidth / pxPerSec) * 1000;
1684
- const from = normalizedDirection === 'left' ? -setWidth : 0;
1685
- const to = normalizedDirection === 'left' ? 0 : -setWidth;
1758
+ const from = direction === 'left' ? -setWidth : 0;
1759
+ const to = direction === 'left' ? 0 : -setWidth;
1686
1760
  const anim = track.animate(
1687
1761
  [{ transform: \`translate3d(\${from}px, 0, 0)\` }, { transform: \`translate3d(\${to}px, 0, 0)\` }],
1688
1762
  { duration, iterations: Infinity, easing: 'linear' }
@@ -1697,7 +1771,7 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1697
1771
  anim.cancel();
1698
1772
  if (animRef.current === anim) animRef.current = null;
1699
1773
  };
1700
- }, [isAutoplay, setWidth, pxPerSec, direction]);
1774
+ }, [autoplay, isAnimating, setWidth, pxPerSec, direction]);
1701
1775
 
1702
1776
  const onTrackEnter = () => {
1703
1777
  if (!hoverPauseEnabled) return;
@@ -1710,100 +1784,217 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1710
1784
  animRef.current?.play();
1711
1785
  };
1712
1786
 
1713
- const renderText = (
1714
- style: CaptionStyles,
1715
- content: any[],
1716
- dataStyles: string,
1717
- dataControls: string,
1718
- key: string,
1719
- marginTop: number,
1720
- minHeight?: number
1721
- ) => (
1722
- <div key={key}>
1723
- <div data-controls={dataControls} className={classes.control} />
1787
+ const overlayAlignItems = useMemo(() => {
1788
+ switch (align) {
1789
+ case 'center':
1790
+ return 'center' as const;
1791
+ case 'end':
1792
+ return 'flex-end' as const;
1793
+ case 'start':
1794
+ default:
1795
+ return 'flex-start' as const;
1796
+ }
1797
+ }, [align]);
1798
+
1799
+ const overlayTextAlign = useMemo(() => {
1800
+ switch (align) {
1801
+ case 'center':
1802
+ return 'center' as const;
1803
+ case 'end':
1804
+ return 'right' as const;
1805
+ case 'start':
1806
+ default:
1807
+ return 'left' as const;
1808
+ }
1809
+ }, [align]);
1810
+
1811
+ const renderText = useCallback(
1812
+ (style: TextStyles, richContent: any[], key: string, options?: RenderTextOpts) => (
1724
1813
  <div
1725
- data-styles={dataStyles}
1726
- className={classes.caption}
1814
+ key={key}
1727
1815
  style={{
1728
- ...textStylesToCss(resolveCaptionTextStyles(style), isEditor),
1729
- textAlign: style.textAlign,
1730
- pointerEvents: 'auto',
1731
- marginTop: scaled(marginTop),
1732
- ...(minHeight ? { minHeight: scaled(minHeight) } : {}),
1816
+ display: 'flex',
1817
+ flexDirection: 'column',
1818
+ alignItems: overlayAlignItems,
1819
+ width: '100%',
1733
1820
  }}
1734
1821
  >
1735
- <RichTextRenderer content={content} />
1822
+ <div
1823
+ data-controls={options?.controlsName}
1824
+ data-controls-axis="y"
1825
+ className={\`\${P}-control\`}
1826
+ style={{ height: scaled(options?.marginTop ?? 0) }}
1827
+ />
1828
+ <div
1829
+ {...(options?.dataMeasureKind ? { 'data-testimonial-measure': options.dataMeasureKind } : {})}
1830
+ style={{
1831
+ ...textStylesToCss(style, isEditor),
1832
+ textAlign: overlayTextAlign,
1833
+ pointerEvents: 'auto',
1834
+ ...(typeof options?.minHeightPx === 'number' && options.minHeightPx > 0
1835
+ ? { minHeight: options.minHeightPx }
1836
+ : {}),
1837
+ }}
1838
+ >
1839
+ <RichTextRenderer content={richContent} />
1840
+ </div>
1736
1841
  </div>
1737
- </div>
1842
+ ),
1843
+ [overlayAlignItems, overlayTextAlign, isEditor]
1738
1844
  );
1739
1845
 
1740
- const renderCard = (item: TestimonialsItem, key: string | number) => (
1741
- <div
1742
- key={key}
1743
- style={{
1744
- padding: \`\${scaled(padding.top)} \${scaled(padding.right)} \${scaled(padding.bottom)} \${scaled(padding.left)}\`,
1745
- width: scaled(cardWidth + stroke * 2),
1746
- minHeight: scaled(cardHeight),
1747
- height: '100%',
1748
- borderRadius: scaled(corners),
1749
- border: \`\${scaled(stroke)} solid \${strokeColor}\`,
1750
- boxSizing: 'border-box',
1751
- position: 'relative',
1752
- flex: '0 0 auto',
1753
- overflow: 'hidden',
1754
- }}
1755
- >
1756
- {item.image?.url && (
1757
- <img
1758
- className={classes.image}
1759
- src={item.image.url}
1760
- alt={item.image.name}
1761
- style={{
1762
- objectFit: item.image.objectFit || 'cover',
1763
- borderRadius: scaled(corners),
1764
- height: scaled(cardHeight),
1765
- }}
1766
- />
1767
- )}
1846
+ const renderCard = useCallback(
1847
+ (item: TestimonialsItem, key: string | number, opts?: RenderCardOpts) => (
1768
1848
  <div
1769
- className={classes.cover}
1849
+ key={key}
1770
1850
  style={{
1771
- background: bgColor,
1851
+ padding: \`\${scaled(padding.top)} \${scaled(padding.right)} \${scaled(padding.bottom)} \${scaled(padding.left)}\`,
1852
+ width: scaled(cardWidth + stroke * 2),
1772
1853
  height: '100%',
1854
+ borderRadius: scaled(corners),
1855
+ border: \`\${scaled(stroke)} solid \${strokeColor}\`,
1856
+ boxSizing: 'border-box',
1857
+ position: 'relative',
1858
+ overflow: 'hidden',
1773
1859
  }}
1774
- />
1775
- <div
1776
- className={classes.elementsOverlay}
1777
- style={{ display: 'flex', flexDirection: 'column', pointerEvents: 'none' }}
1778
1860
  >
1779
- {type === 'B' && textStyle && renderText(textStyle, item.text, 'text', 'elements.text.margin.top', 'text', textMarginTop, textMinHeight)}
1780
-
1781
- <div key="icon">
1861
+ <div className={\`\${P}-cover\`} style={{ background: bgColor }} />
1862
+ <div
1863
+ className={\`\${P}-elements-overlay\`}
1864
+ style={{ alignItems: overlayAlignItems, textAlign: overlayTextAlign }}
1865
+ >
1866
+ {textStyle && item.text && renderText(
1867
+ textStyle,
1868
+ item.text,
1869
+ 'text',
1870
+ opts?.dataMeasureAttrs
1871
+ ? { dataMeasureKind: 'text' }
1872
+ : typeof opts?.textMinHeightPx === 'number' && opts.textMinHeightPx > 0
1873
+ ? { minHeightPx: opts.textMinHeightPx }
1874
+ : undefined
1875
+ )}
1782
1876
  <div
1783
- data-controls="elements.icon.margin.top"
1784
- className={classes.control}
1785
- style={{ marginTop: scaled(iconMarginTop), width: scaled(iconWidth) }}
1877
+ key="logo"
1878
+ style={{
1879
+ display: 'flex',
1880
+ flexDirection: 'column',
1881
+ alignItems: overlayAlignItems,
1882
+ width: '100%',
1883
+ }}
1786
1884
  >
1787
- <img
1788
- src={item.icon?.url}
1789
- alt={item.icon?.name}
1790
- style={{ pointerEvents: 'auto', width: '100%', height: '100%', objectFit: item.icon?.objectFit || 'cover' }}
1885
+ <div
1886
+ data-controls="logoMarginTop"
1887
+ className={\`\${P}-control\`}
1888
+ style={{ height: scaled(logoMarginTop) }}
1791
1889
  />
1890
+ <div style={{ width: scaled(logoWidth), height: scaled(logoHeight) }}>
1891
+ {item.logo?.url && (
1892
+ <img
1893
+ src={item.logo.url}
1894
+ alt={item.logo?.name ?? ''}
1895
+ style={{ pointerEvents: 'auto', width: '100%', height: '100%', objectFit: item.logo?.objectFit || 'contain' }}
1896
+ />
1897
+ )}
1898
+ </div>
1792
1899
  </div>
1900
+ {captionStyle &&
1901
+ item.caption &&
1902
+ renderText(captionStyle, item.caption, 'caption', {
1903
+ controlsName: 'captionMarginTop',
1904
+ marginTop: captionMarginTop,
1905
+ ...(opts?.dataMeasureAttrs
1906
+ ? { dataMeasureKind: 'caption' as const }
1907
+ : typeof opts?.captionMinHeightPx === 'number' && opts.captionMinHeightPx > 0
1908
+ ? { minHeightPx: opts.captionMinHeightPx }
1909
+ : {}),
1910
+ })}
1793
1911
  </div>
1794
-
1795
- {type !== 'B' && textStyle && renderText(textStyle, item.text, 'text', 'elements.text.margin.top', 'text', textMarginTop, textMinHeight)}
1796
- {captionStyle && renderText(captionStyle, item.caption, 'caption', 'elements.caption.margin.top', 'caption', captionMarginTop)}
1797
1912
  </div>
1913
+ ),
1914
+ [
1915
+ bgColor,
1916
+ captionMarginTop,
1917
+ captionStyle,
1918
+ cardWidth,
1919
+ corners,
1920
+ logoHeight,
1921
+ logoMarginTop,
1922
+ logoWidth,
1923
+ overlayAlignItems,
1924
+ overlayTextAlign,
1925
+ padding.bottom,
1926
+ padding.left,
1927
+ padding.right,
1928
+ padding.top,
1929
+ renderText,
1930
+ stroke,
1931
+ strokeColor,
1932
+ textStyle,
1933
+ isEditor,
1934
+ ]
1935
+ );
1936
+
1937
+ useTestimonialTextMeasure({
1938
+ enabled: shouldMeasureTextExtents,
1939
+ rootRef: measureLayerRef,
1940
+ onExtents: ({ maxTextPx, maxCaptionPx }) => {
1941
+ setMeasuredTextMinPx(maxTextPx);
1942
+ setMeasuredCaptionMinPx(maxCaptionPx);
1943
+ },
1944
+ deps: [content, renderCard],
1945
+ });
1946
+
1947
+ const visibleCardOpts: RenderCardOpts | undefined = shouldMeasureTextExtents
1948
+ ? { textMinHeightPx: measuredTextMinPx, captionMinHeightPx: measuredCaptionMinPx }
1949
+ : undefined;
1950
+
1951
+ const measureLayerEl = shouldMeasureTextExtents ? (
1952
+ <div
1953
+ ref={measureLayerRef}
1954
+ aria-hidden
1955
+ style={{
1956
+ position: 'absolute',
1957
+ left: 0,
1958
+ top: 0,
1959
+ width: '100%',
1960
+ visibility: 'hidden',
1961
+ pointerEvents: 'none',
1962
+ zIndex: -1,
1963
+ }}
1964
+ >
1965
+ {(content ?? []).map((item, index) => renderCard(item, \`measure-\${index}\`, { dataMeasureAttrs: true }))}
1966
+ </div>
1967
+ ) : null;
1968
+
1969
+ const renderCardWrapper = (item: TestimonialsItem, key: string | number, isLast: boolean) => (
1970
+ <div key={key} style={{ position: 'relative', flex: '0 0 auto', height: '100%' }}>
1971
+ {renderCard(item, \`card-\${key}\`, visibleCardOpts)}
1972
+ {isEditor && !isLast && (
1973
+ <div
1974
+ data-controls="gap"
1975
+ data-controls-axis="x"
1976
+ style={{
1977
+ position: 'absolute',
1978
+ top: 0,
1979
+ right: \`calc(-1 * \${scaled(gap)})\`,
1980
+ width: scaled(gap),
1981
+ height: '100%',
1982
+ pointerEvents: 'auto',
1983
+ zIndex: 2,
1984
+ }}
1985
+ />
1986
+ )}
1798
1987
  </div>
1799
1988
  );
1800
1989
 
1801
- if (isAutoplay && content?.length && content.length > 0) {
1990
+ if (autoplay === 'on' && content?.length && content.length > 0) {
1802
1991
  return (
1803
- <div ref={wrapperRef} className={cn(classes.wrapper, classes.marqueeWrapper)} aria-label="Testimonials">
1992
+ <div ref={wrapperRef} className={cn(\`\${P}-wrapper\`, \`\${P}-marquee-wrapper\`)} aria-label="Testimonials">
1993
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
1994
+ {measureLayerEl}
1804
1995
  <div
1805
1996
  ref={trackRef}
1806
- className={classes.marqueeTrack}
1997
+ className={\`\${P}-marquee-track\`}
1807
1998
  onMouseEnter={onTrackEnter}
1808
1999
  onMouseLeave={onTrackLeave}
1809
2000
  >
@@ -1811,11 +2002,13 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1811
2002
  <div
1812
2003
  key={\`set-\${copyIndex}\`}
1813
2004
  ref={copyIndex === 0 ? setRef : undefined}
1814
- className={classes.marqueeSet}
2005
+ className={\`\${P}-marquee-set\`}
1815
2006
  style={{ gap: scaled(gap), paddingRight: scaled(gap) }}
1816
2007
  aria-hidden={copyIndex > 0}
1817
2008
  >
1818
- {content?.map((item: TestimonialsItem, index: number) => renderCard(item, \`\${copyIndex}-\${index}\`))}
2009
+ {content?.map((item: TestimonialsItem, index: number) =>
2010
+ renderCardWrapper(item, \`\${copyIndex}-\${index}\`, index === (content?.length ?? 0) - 1)
2011
+ )}
1819
2012
  </div>
1820
2013
  ))}
1821
2014
  </div>
@@ -1824,36 +2017,35 @@ export const Testimonials = ({ settings, content, isEditor }: TestimonialsProps)
1824
2017
  }
1825
2018
 
1826
2019
  return (
1827
- <div className={classes.wrapper}>
2020
+ <div className={\`\${P}-wrapper\`}>
2021
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
2022
+ {measureLayerEl}
1828
2023
  <div
1829
2024
  style={{
1830
- display: 'flex',
1831
- flexDirection: 'row',
1832
2025
  gap: scaled(gap),
1833
2026
  justifyContent: 'center',
1834
2027
  overflowX: 'auto',
2028
+ display: 'flex',
2029
+ flexDirection: 'row',
1835
2030
  }}
1836
2031
  aria-label="Testimonials"
1837
2032
  >
1838
- {content?.map((item: TestimonialsItem, index: number) => renderCard(item, index))}
2033
+ {content?.map((item: TestimonialsItem, index: number) =>
2034
+ renderCardWrapper(item, index, index === (content?.length ?? 0) - 1)
2035
+ )}
1839
2036
  </div>
1840
2037
  </div>
1841
2038
  );
1842
2039
  };
1843
2040
 
1844
2041
  export type TestimonialsItem = {
1845
- image?: {
1846
- url?: string;
1847
- name?: string;
1848
- objectFit?: 'cover' | 'contain';
1849
- };
1850
- icon?: {
2042
+ logo?: {
1851
2043
  url?: string;
1852
2044
  name?: string;
1853
2045
  objectFit?: 'cover' | 'contain';
1854
2046
  };
1855
- text: any[];
1856
- caption: any[];
2047
+ text?: any[];
2048
+ caption?: any[];
1857
2049
  };
1858
2050
 
1859
2051
  type Padding = {
@@ -1864,402 +2056,673 @@ type Padding = {
1864
2056
  };
1865
2057
 
1866
2058
  type TestimonialsSettings = {
1867
- type: 'A' | 'B';
1868
2059
  autoplay: 'on' | 'off';
1869
2060
  speed: number;
2061
+ align: 'start' | 'center' | 'end';
1870
2062
  direction: 'left' | 'right';
1871
2063
  pauseOnHover: 'on' | 'off';
1872
2064
  gap: number;
1873
2065
  cardWidth: number;
1874
- cardHeight: number;
1875
2066
  corners: number;
1876
2067
  stroke: number;
1877
2068
  strokeColor: string;
1878
2069
  bgColor: string;
1879
2070
  padding: Padding;
1880
- iconMarginTop: number;
1881
- iconWidth: number;
1882
- textMarginTop: number;
1883
- textMinHeight: number;
2071
+ logoMarginTop: number;
2072
+ logoWidth: number;
2073
+ logoHeight: number;
1884
2074
  captionMarginTop: number;
1885
- styles: TestimonialsStyles;
1886
2075
  };
2076
+ `,To={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dl={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:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",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:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...To.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:{...To.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:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Logo 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:"Logo",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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Ul={element:zl,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:Dl,sourceCode:Bl,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ql(e){return`
2077
+ .${e}-container {
2078
+ overflow-x: clip;
2079
+ display: flex;
2080
+ height: 100%;
2081
+ width: 100%;
2082
+ flex-direction: column;
2083
+ align-items: center;
2084
+ }
1887
2085
 
1888
- type CaptionStyles = {
1889
- fontSettings: {
1890
- fontFamily: string;
1891
- fontWeight: number;
1892
- fontStyle: string;
1893
- };
1894
- widthSettings: {
1895
- width: number;
1896
- sizing: 'auto' | 'manual';
1897
- };
1898
- letterSpacing: number;
1899
- textAlign: 'left' | 'center' | 'right';
1900
- wordSpacing: number;
1901
- fontSizeLineHeight: {
1902
- fontSize: number;
1903
- lineHeight: number;
1904
- };
1905
- textAppearance: {
1906
- textTransform: 'none' | 'uppercase' | 'lowercase';
1907
- textDecoration: 'none' | 'underline';
1908
- fontVariant: 'normal' | 'small-caps';
1909
- };
1910
- color: string;
1911
- };
2086
+ .${e}-wrapper {
2087
+ position: relative;
2088
+ width: 100%;
2089
+ height: 100%;
2090
+ order: 1;
2091
+ display: flex;
2092
+ flex-direction: column;
2093
+ inset: 0;
2094
+ pointer-events: none;
2095
+ height: 100%;
2096
+ box-sizing: border-box;
2097
+ position: relative;
2098
+ }
1912
2099
 
1913
- type TestimonialsStyles = {
1914
- text: CaptionStyles;
1915
- caption: CaptionStyles;
1916
- };
1917
- `,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ns={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:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle",enum:["Left","Right"]}},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},cardWidth:{type:"number",scope:"layout",title:"Card width",min:0,max:400,display:{type:"range-control"}},cardHeight:{type:"number",scope:"layout",title:"Card height",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:20,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker"}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},iconMarginTop:{type:"number",scope:"layout",title:"Icon margin top",min:0,max:100,display:{type:"range-control"}},iconWidth:{type:"number",scope:"layout",title:"Icon width",min:0,max:200,display:{type:"range-control"}},imageCaptionColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text min height",min:0,max:300,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Ao.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:"Text",display:{type:"font-family-select"}},textFontSettings:{...Ao.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:{type:"A",autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.2)",imageCaptionColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,cardHeight:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,iconWidth:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,captionFontSize:.01},d:{speed:5,gap:.02,cardWidth:.15,cardHeight:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,iconWidth:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,captionFontSize:.01}},displayRules:[],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","cardHeight","corners","stroke","strokeColor","bgColor","padding","iconMarginTop","iconWidth","textMarginTop","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},"type",{type:"row",items:["pauseOnHover","speed"]},{type:"row",items:["direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","cardHeight","corners","stroke"]},{type:"group",title:"",items:["padding","iconWidth"]}]},{type:"row",title:"Quote",items:["textMinHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}],paletteBookmark:{items:["strokeColor","bgColor","imageCaptionColor","captionColor"],panelIds:["general","typeStyle"]},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"]}}},icon:{type:"object",label:"Icon",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:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},os={element:ts,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:700,height:300},schema:ns,sourceCode:es,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},rs="Testimonials-module__container___Hxc4p",is="Testimonials-module__wrapper___uBekx",as="Testimonials-module__cover___ZvEoE",ls="Testimonials-module__elementsOverlay___5I51C",ss="Testimonials-module__image___afGk-",cs="Testimonials-module__icon___Cpw7E",ps="Testimonials-module__control___DktvH",_t={container:rs,wrapper:is,cover:as,elementsOverlay:ls,image:ss,icon:cs,control:ps},us=({settings:t,content:e,isEditor:n})=>{var E,B,P,L,f;const o=e||[],{autoplay:r,speed:a}=t,i=r==="on",p=t.width??0,c=t.iconMarginTop??0,m=t.iconAlign??"left",u=t.iconScale??100,I=t.textMarginTop??0,S=t.textMinHeight??0,y=t.captionMarginTop??0,l=o[0],g=F=>{var q;const k=(q=t==null?void 0:t.styles)==null?void 0:q[F];if(k)return k;const N=F==="imageCaption"?"imageCaption":"caption",R=t==null?void 0:t[`${N}FontFamily`],W=t==null?void 0:t[`${N}FontSettings`],_=t==null?void 0:t[`${N}LetterSpacing`],D=t==null?void 0:t[`${N}WordSpacing`],j=t==null?void 0:t[`${N}TextAlign`],d=t==null?void 0:t[`${N}TextAppearance`],$=t==null?void 0:t[`${N}Color`],C=t==null?void 0:t[`${N}FontSize`],T=t==null?void 0:t[`${N}LineHeight`];return typeof R=="string"||!!W||typeof _=="number"||typeof D=="number"||typeof j=="string"||!!d||typeof $=="string"||typeof C=="number"||typeof T=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof R=="string"?R:"Arial",fontWeight:typeof(W==null?void 0:W.fontWeight)=="number"?W.fontWeight:400,fontStyle:typeof(W==null?void 0:W.fontStyle)=="string"?W.fontStyle:"normal"},letterSpacing:typeof _=="number"?_:0,wordSpacing:typeof D=="number"?D:0,textAlign:j==="left"||j==="center"||j==="right"?j:"left",fontSizeLineHeight:{fontSize:typeof C=="number"?C:.01,lineHeight:typeof T=="number"?T:.01},textAppearance:{textTransform:(d==null?void 0:d.textTransform)??"none",textDecoration:(d==null?void 0:d.textDecoration)??"none",fontVariant:(d==null?void 0:d.fontVariant)??"normal"},color:typeof $=="string"?$:"#000000"}:void 0},w=g("imageCaption"),v=g("caption"),b=H.useMemo(()=>["text","icon","caption"].map((k,N)=>({key:k,order:N})),[]);return l?s.jsx(s.Fragment,{children:s.jsxs("div",{className:_t.container,style:{flexDirection:"column",alignItems:"center"},children:[s.jsx("div",{className:mt(_t.wrapper,!i&&_t.wrapperAutoplayOff),style:{width:x.scalingValue(p,n??!1)},children:s.jsxs("div",{style:{padding:`${x.scalingValue(t.padding.top,n??!1)} ${x.scalingValue(t.padding.right,n??!1)} ${x.scalingValue(t.padding.bottom,n??!1)} ${x.scalingValue(t.padding.left,n??!1)}`,width:x.scalingValue(p,n??!1),height:"100%",boxSizing:"border-box",position:"relative"},children:[((E=l.image)==null?void 0:E.url)&&s.jsx("img",{className:_t.image,src:(B=l.image)==null?void 0:B.url,alt:(P=l.image)==null?void 0:P.name,style:{objectFit:((L=l.image)==null?void 0:L.objectFit)||"cover"}}),s.jsx("div",{className:_t.cover}),s.jsx("div",{className:_t.elementsOverlay,style:{display:"flex",flexDirection:"column",inset:0,pointerEvents:"none"},children:b.map(({key:F,order:k})=>{var N,R;if(F==="icon")return s.jsxs("div",{style:{order:k,zIndex:k},children:[s.jsx("div",{"data-controls":"iconMarginTop",className:_t.control,style:{height:x.scalingValue(c,n??!1)}}),s.jsx("div",{style:{width:"100%",textAlign:m},children:s.jsx("img",{src:(N=l.icon)==null?void 0:N.url,alt:(R=l.icon)==null?void 0:R.name,className:_t.icon,style:{transform:`scale(${u/100})`,pointerEvents:"auto"}})})]},"icon");if(F==="text"&&w){const{widthSettings:W,fontSettings:_,letterSpacing:D,textAlign:j,wordSpacing:d,fontSizeLineHeight:$,textAppearance:C,color:T}=w;return s.jsxs("div",{style:{order:k,zIndex:k},children:[s.jsx("div",{"data-controls":"textMarginTop",className:_t.control,style:{height:x.scalingValue(I,n??!1)}}),s.jsx("div",{"data-styles":"imageCaption",className:_t.caption,style:{fontFamily:_.fontFamily,fontWeight:_.fontWeight,fontStyle:_.fontStyle,minHeight:x.scalingValue(S,n??!1),letterSpacing:x.scalingValue(D,n),wordSpacing:x.scalingValue(d,n),textAlign:j,fontSize:x.scalingValue($.fontSize,n),lineHeight:x.scalingValue($.lineHeight,n),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:T,pointerEvents:"auto"},children:s.jsx(ze,{content:l.imageCaption??l.text??[]})})]},"text")}if(F==="caption"&&v){const{widthSettings:W,fontSettings:_,letterSpacing:D,textAlign:j,wordSpacing:d,fontSizeLineHeight:$,textAppearance:C,color:T}=v;return s.jsxs("div",{style:{order:k,zIndex:k},children:[s.jsx("div",{"data-controls":"captionMarginTop",className:_t.control,style:{height:x.scalingValue(y,n??!1)}}),s.jsx("div",{"data-styles":"caption",className:_t.caption,style:{fontFamily:_.fontFamily,fontWeight:_.fontWeight,fontStyle:_.fontStyle,minHeight:0,letterSpacing:x.scalingValue(D,n),wordSpacing:x.scalingValue(d,n),textAlign:j,fontSize:x.scalingValue($.fontSize,n),lineHeight:x.scalingValue($.lineHeight,n),textTransform:C.textTransform??"none",textDecoration:C.textDecoration??"none",fontVariant:C.fontVariant??"normal",color:T,pointerEvents:"auto"},children:s.jsx(ze,{content:l.caption})})]},"caption")}return null})})]})}),((f=t.controls)==null?void 0:f.isActive)==="visible"&&t.autoplay==="off"&&s.jsx("div",{children:"Controls"})]})}):s.jsx(s.Fragment,{})},ds=`import cn from 'classnames';
1918
- import { useMemo } from 'react';
1919
- import classes from './Testimonials.module.scss';
2100
+ .${e}-wrapper-autoplay-off {
2101
+ overflow-x: hidden;
2102
+ }
2103
+
2104
+ .${e}-elements-overlay {
2105
+ position: relative;
2106
+ inset: 0;
2107
+ }
2108
+
2109
+ .${e}-fade-stack {
2110
+ position: relative;
2111
+ width: 100%;
2112
+ }
2113
+
2114
+ .${e}-fade-item-prev {
2115
+ position: absolute;
2116
+ inset: 0;
2117
+ width: 100%;
2118
+ height: 100%;
2119
+ }
2120
+
2121
+ .${e}-fade-item-current {
2122
+ position: relative;
2123
+ width: 100%;
2124
+ }
2125
+
2126
+ @keyframes ${e}-testimonial-fade-in {
2127
+ from { opacity: 0; }
2128
+ to { opacity: 1; }
2129
+ }
2130
+
2131
+ @keyframes ${e}-testimonial-fade-out {
2132
+ from { opacity: 1; }
2133
+ to { opacity: 0; }
2134
+ }
2135
+
2136
+ .${e}-fade-in {
2137
+ animation: ${e}-testimonial-fade-in 300ms ease-in forwards;
2138
+ }
2139
+
2140
+ .${e}-fade-out {
2141
+ animation: ${e}-testimonial-fade-out 300ms ease-in forwards;
2142
+ }
2143
+
2144
+ .${e}-controls {
2145
+ position: absolute;
2146
+ inset: 0;
2147
+ pointer-events: none;
2148
+ display: flex;
2149
+ width: 100%;
2150
+ align-items: center;
2151
+ justify-content: space-between;
2152
+ }
2153
+
2154
+ .${e}-arrow {
2155
+ pointer-events: auto;
2156
+ position: relative;
2157
+ display: flex;
2158
+ align-items: center;
2159
+ justify-content: center;
2160
+ border: none;
2161
+ background-color: transparent;
2162
+ z-index: 1;
2163
+ padding: 0;
2164
+ }
2165
+
2166
+ .${e}-next-arrow {
2167
+ left: unset;
2168
+ }
2169
+
2170
+ .${e}-arrow-inner {
2171
+ all: unset;
2172
+ cursor: pointer;
2173
+ width: 100%;
2174
+ height: 100%;
2175
+ pointer-events: auto;
2176
+ }
2177
+
2178
+ .${e}-arrow-img {
2179
+ position: absolute;
2180
+ top: 50%;
2181
+ left: 50%;
2182
+ transform: translate(-50%, -50%);
2183
+ }
2184
+
2185
+ .${e}-mirror {
2186
+ transform: translate(-50%, -50%) scaleX(-1) !important;
2187
+ }
2188
+
2189
+ .${e}-control {
2190
+ position: relative;
2191
+ z-index: 2;
2192
+ pointer-events: auto;
2193
+ width: 100%;
2194
+ }
2195
+
2196
+ .${e}-control::before {
2197
+ content: "";
2198
+ position: absolute;
2199
+ top: 0;
2200
+ left: 0;
2201
+ width: 100%;
2202
+ height: 100%;
2203
+ pointer-events: auto;
2204
+ z-index: 10;
2205
+ }
2206
+ .${e}-icon {
2207
+ pointer-events: auto;
2208
+ width: 100%;
2209
+ height: 100%;
2210
+ }
2211
+ `}const Gl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),a=t||[],{autoplay:i,delay:u,align:s,width:g,imageMarginTop:c,textMarginTop:A,captionMarginTop:x,imageWidth:f,imageHeight:p,controlsWidth:d,controlsColor:S,controlsHoverColor:y}=e,v=i==="on"&&!o,[_,D]=C.useState(0),[V,T]=C.useState(null),[m,k]=C.useState(!1),R=C.useRef(null),O=C.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),F=C.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);C.useEffect(()=>{D(0),T(null),k(!1)},[a.length]);const H=a[_],M=V===null?null:a[V],X=Y=>{var fe,j,b,U,Z;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Y}FontFamily`])??"Arial",fontWeight:((fe=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:fe.fontWeight)??400,fontStyle:((j=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:j.fontStyle)??"normal"},textAppearance:{textTransform:((b=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:b.textTransform)??"none",textDecoration:((U=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:U.textDecoration)??"none",fontVariant:((Z=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:Z.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Y}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Y}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Y}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Y}WordSpacing`])??0,color:(e==null?void 0:e[`${Y}Color`])??"#000000"}},G=X("text"),h=X("caption"),E=a.length>1&&a.some(Y=>{var ae,fe;return(((ae=Y.text)==null?void 0:ae.length)??0)>0||(((fe=Y.caption)==null?void 0:fe.length)??0)>0}),I=C.useRef(null),[L,w]=C.useState(0),[N,K]=C.useState(0),ie=e.controls??{mode:"Off",icon:null},ne=a.length>1,ce=C.useCallback((Y,ae)=>!ne||ae===Y?Y:(R.current&&window.clearTimeout(R.current),T(Y),k(!0),R.current=window.setTimeout(()=>{T(null),k(!1),R.current=null},300),ae),[ne]),P=C.useCallback(()=>{ne&&D(Y=>ce(Y,(Y-1+a.length)%a.length))},[ne,ce,a.length]),Q=C.useCallback(()=>{ne&&D(Y=>ce(Y,(Y+1)%a.length))},[ne,ce,a.length]);C.useEffect(()=>{if(!v||!ne)return;const Y=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),ae=window.setInterval(()=>{D(fe=>ce(fe,(fe+1)%a.length))},Y);return()=>{window.clearInterval(ae)}},[v,ne,ce,a.length,u]),C.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const de=C.useCallback((Y,ae)=>{var U,Z,te,re;const fe=ae==null?void 0:ae.textMinHeightPx,j=ae==null?void 0:ae.captionMinHeightPx,b=ae==null?void 0:ae.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[Y.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:$.scalingValue(A??0,n??!1)}}),l.jsx("div",{...b&&{"data-testimonial-measure":"text"},style:{...Re(G,n),...fe&&fe>0?{minHeight:fe}:{},textAlign:F,pointerEvents:"auto"},children:l.jsx(Pt,{content:Y.text})})]},"text"),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:$.scalingValue(c??0,n??!1)}}),l.jsx("div",{style:{width:$.scalingValue(f??0,n??!1),height:$.scalingValue(p??0,n??!1)},children:((U=Y.image)==null?void 0:U.url)&&l.jsx("img",{src:(Z=Y.image)==null?void 0:Z.url,alt:(te=Y.image)==null?void 0:te.name,className:`${r}-icon`,style:{objectFit:((re=Y.image)==null?void 0:re.objectFit)||"contain"}})})]},"image"),Y.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:$.scalingValue(x??0,n??!1)}}),l.jsx("div",{...b?{"data-testimonial-measure":"caption"}:{},style:{...Re(h,n),...j&&j>0?{minHeight:j}:{},textAlign:F,pointerEvents:"auto"},children:l.jsx(Pt,{content:Y.caption})})]},"caption")]})},[x,h,c,f,p,n,O,F,A,G]);if($.useTestimonialTextMeasure({enabled:E,rootRef:I,onExtents:({maxTextPx:Y,maxCaptionPx:ae})=>{w(Y),K(ae)},deps:[a,de]}),!H)return l.jsx(l.Fragment,{});const pe=E?{textMinHeightPx:L,captionMinHeightPx:N}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${r}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:ql(r)}}),l.jsxs("div",{className:ge(`${r}-elements-overlay`,`${r}-wrapper`,i==="off"&&`${r}-wrapper-autoplay-off`),style:{width:$.scalingValue(g??0,n??!1),alignItems:O},children:[E&&l.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Y,ae)=>l.jsx("div",{style:{width:"100%"},children:de(Y,{dataMeasureAttrs:!0})},ae))}),l.jsxs("div",{className:`${r}-fade-stack`,children:[M&&m&&l.jsx("div",{className:ge(`${r}-fade-item-prev`,`${r}-fade-out`),children:de(M,pe)}),l.jsx("div",{className:ge(`${r}-fade-item-current`,m?`${r}-fade-in`:void 0),children:de(H,pe)})]})]}),ie.mode==="On"&&l.jsxs("div",{className:`${r}-controls`,children:[l.jsx("div",{className:`${r}-arrow`,style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":y},children:l.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:P,"aria-label":"Previous testimonial",children:ie.icon&&l.jsx(Xe,{url:ie.icon,fill:S,hoverFill:y,className:ge(`${r}-arrow-img`,`${r}-mirror`)})})}),l.jsx("div",{className:ge(`${r}-arrow`,`${r}-next-arrow`),style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":y},children:l.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:Q,"aria-label":"Next testimonial",children:ie.icon&&l.jsx(Xe,{url:ie.icon,fill:S,hoverFill:y,className:`${r}-arrow-img`})})})]})]})})},Yl=`import cn from 'classnames';
2212
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
1920
2213
  import { CommonComponentProps } from '../props';
1921
2214
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
1922
2215
  import { scalingValue } from '../utils/scalingValue';
2216
+ import { SvgImage } from '../helpers/SvgImage/SvgImage';
2217
+ import { useScopedStyles } from '../utils/useScopedStyles';
2218
+ import { useTestimonialTextMeasure } from '../utils/useTestimonialTextMeasure';
2219
+ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
2220
+
2221
+ function getCSS(P: string): string {
2222
+ return \`
2223
+ .\${P}-container {
2224
+ overflow-x: clip;
2225
+ display: flex;
2226
+ height: 100%;
2227
+ width: 100%;
2228
+ flex-direction: column;
2229
+ align-items: center;
2230
+ }
2231
+
2232
+ .\${P}-wrapper {
2233
+ position: relative;
2234
+ width: 100%;
2235
+ height: 100%;
2236
+ order: 1;
2237
+ display: flex;
2238
+ flex-direction: column;
2239
+ inset: 0;
2240
+ pointer-events: none;
2241
+ height: 100%;
2242
+ box-sizing: border-box;
2243
+ position: relative;
2244
+ }
2245
+
2246
+ .\${P}-wrapper-autoplay-off {
2247
+ overflow-x: hidden;
2248
+ }
2249
+
2250
+ .\${P}-elements-overlay {
2251
+ position: relative;
2252
+ inset: 0;
2253
+ }
2254
+
2255
+ .\${P}-fade-stack {
2256
+ position: relative;
2257
+ width: 100%;
2258
+ }
2259
+
2260
+ .\${P}-fade-item-prev {
2261
+ position: absolute;
2262
+ inset: 0;
2263
+ width: 100%;
2264
+ height: 100%;
2265
+ }
2266
+
2267
+ .\${P}-fade-item-current {
2268
+ position: relative;
2269
+ width: 100%;
2270
+ }
2271
+
2272
+ @keyframes \${P}-testimonial-fade-in {
2273
+ from { opacity: 0; }
2274
+ to { opacity: 1; }
2275
+ }
2276
+
2277
+ @keyframes \${P}-testimonial-fade-out {
2278
+ from { opacity: 1; }
2279
+ to { opacity: 0; }
2280
+ }
2281
+
2282
+ .\${P}-fade-in {
2283
+ animation: \${P}-testimonial-fade-in 300ms ease-in forwards;
2284
+ }
2285
+
2286
+ .\${P}-fade-out {
2287
+ animation: \${P}-testimonial-fade-out 300ms ease-in forwards;
2288
+ }
2289
+
2290
+ .\${P}-controls {
2291
+ position: absolute;
2292
+ inset: 0;
2293
+ pointer-events: none;
2294
+ display: flex;
2295
+ width: 100%;
2296
+ align-items: center;
2297
+ justify-content: space-between;
2298
+ }
2299
+
2300
+ .\${P}-arrow {
2301
+ pointer-events: auto;
2302
+ position: relative;
2303
+ display: flex;
2304
+ align-items: center;
2305
+ justify-content: center;
2306
+ border: none;
2307
+ background-color: transparent;
2308
+ z-index: 1;
2309
+ padding: 0;
2310
+ }
2311
+
2312
+ .\${P}-next-arrow {
2313
+ left: unset;
2314
+ }
2315
+
2316
+ .\${P}-arrow-inner {
2317
+ all: unset;
2318
+ cursor: pointer;
2319
+ width: 100%;
2320
+ height: 100%;
2321
+ pointer-events: auto;
2322
+ }
2323
+
2324
+ .\${P}-arrow-img {
2325
+ position: absolute;
2326
+ top: 50%;
2327
+ left: 50%;
2328
+ transform: translate(-50%, -50%);
2329
+ }
2330
+
2331
+ .\${P}-mirror {
2332
+ transform: translate(-50%, -50%) scaleX(-1) !important;
2333
+ }
2334
+
2335
+ .\${P}-control {
2336
+ position: relative;
2337
+ z-index: 2;
2338
+ pointer-events: auto;
2339
+ width: 100%;
2340
+ }
2341
+
2342
+ .\${P}-control::before {
2343
+ content: "";
2344
+ position: absolute;
2345
+ top: 0;
2346
+ left: 0;
2347
+ width: 100%;
2348
+ height: 100%;
2349
+ pointer-events: auto;
2350
+ z-index: 10;
2351
+ }
2352
+ .\${P}-icon {
2353
+ pointer-events: auto;
2354
+ width: 100%;
2355
+ height: 100%;
2356
+ }
2357
+ \`;
2358
+ }
1923
2359
 
1924
2360
  type TestimonialsProps = {
1925
2361
  settings: TestimonialsSettings;
1926
2362
  content?: TestimonialsItem[];
1927
2363
  isEditor?: boolean;
2364
+ isPreviewMode?: boolean;
1928
2365
  } & CommonComponentProps;
1929
2366
 
1930
- type CaptionStyleFromFlatSettings = {
1931
- fontSettings: {
1932
- fontFamily: string;
1933
- fontWeight: number;
1934
- fontStyle: string;
1935
- };
1936
- widthSettings: {
1937
- width: number;
1938
- sizing: 'auto' | 'manual';
1939
- };
1940
- letterSpacing: number;
1941
- textAlign: 'left' | 'center' | 'right';
1942
- wordSpacing: number;
1943
- fontSizeLineHeight: {
1944
- fontSize: number;
1945
- lineHeight: number;
1946
- };
1947
- textAppearance: {
1948
- textTransform: 'none' | 'uppercase' | 'lowercase';
1949
- textDecoration: 'none' | 'underline';
1950
- fontVariant: 'normal' | 'small-caps';
1951
- };
1952
- color: string;
2367
+ type RenderItemContentOpts = {
2368
+ textMinHeightPx?: number;
2369
+ captionMinHeightPx?: number;
2370
+ dataMeasureAttrs?: boolean;
1953
2371
  };
1954
2372
 
1955
- export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsProps) => {
2373
+ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
2374
+ const { prefix: P } = useScopedStyles();
1956
2375
  const items = content || [];
1957
- const { autoplay, speed } = settings;
1958
- const isAutoplay = autoplay === 'on';
1959
-
1960
- const cardWidth = settings.width ?? 0;
1961
- const iconMarginTop = settings.iconMarginTop ?? 0;
1962
- const iconAlign = settings.iconAlign ?? 'left';
1963
- const iconScale = settings.iconScale ?? 100;
1964
- const textMarginTop = settings.textMarginTop ?? 0;
1965
- const textMinHeight = settings.textMinHeight ?? 0;
1966
- const captionMarginTop = settings.captionMarginTop ?? 0;
1967
-
1968
- const item = items[0];
1969
-
1970
- const resolveCaptionStyle = (
1971
- kind: 'imageCaption' | 'caption'
1972
- ): CaptionStyles | undefined => {
1973
- const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
1974
- if (fromNested) return fromNested;
1975
-
1976
- const prefix = kind === 'imageCaption' ? 'imageCaption' : 'caption';
1977
- const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
1978
- const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
1979
- const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
1980
- const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
1981
- const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
1982
- const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1983
- const color = (settings as any)?.[\`\${prefix}Color\`];
1984
- const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1985
- const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1986
-
1987
- const hasAnyFlat =
1988
- typeof fontFamily === 'string' ||
1989
- !!fontSettings ||
1990
- typeof letterSpacing === 'number' ||
1991
- typeof wordSpacing === 'number' ||
1992
- typeof textAlign === 'string' ||
1993
- !!textAppearance ||
1994
- typeof color === 'string' ||
1995
- typeof fontSize === 'number' ||
1996
- typeof lineHeight === 'number';
1997
- if (!hasAnyFlat) return undefined;
1998
-
1999
- const flat: CaptionStyleFromFlatSettings = {
2000
- widthSettings: { width: 0.13, sizing: 'manual' },
2376
+ const { autoplay, delay, align, width, imageMarginTop, textMarginTop, captionMarginTop, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor } = settings;
2377
+ const isAnimating = autoplay === 'on' && !isPreviewMode;
2378
+ const [activeIndex, setActiveIndex] = useState(0);
2379
+ const [prevIndex, setPrevIndex] = useState<number | null>(null);
2380
+ const [isFading, setIsFading] = useState(false);
2381
+ const fadeTimerRef = useRef<number | null>(null);
2382
+
2383
+ const overlayAlignItems = useMemo(() => {
2384
+ switch (align) {
2385
+ case 'center':
2386
+ return 'center' as const;
2387
+ case 'end':
2388
+ return 'flex-end' as const;
2389
+ case 'start':
2390
+ default:
2391
+ return 'flex-start' as const;
2392
+ }
2393
+ }, [align]);
2394
+
2395
+ const overlayTextAlign = useMemo(() => {
2396
+ switch (align) {
2397
+ case 'center':
2398
+ return 'center' as const;
2399
+ case 'end':
2400
+ return 'right' as const;
2401
+ case 'start':
2402
+ default:
2403
+ return 'left' as const;
2404
+ }
2405
+ }, [align]);
2406
+
2407
+ useEffect(() => {
2408
+ setActiveIndex(0);
2409
+ setPrevIndex(null);
2410
+ setIsFading(false);
2411
+ }, [items.length]);
2412
+
2413
+ const currentItem = items[activeIndex];
2414
+ const previousItem = prevIndex === null ? null : items[prevIndex];
2415
+
2416
+ const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
2417
+ const styles: TextStyles = {
2001
2418
  fontSettings: {
2002
- fontFamily: typeof fontFamily === 'string' ? fontFamily : 'Arial',
2003
- fontWeight: typeof fontSettings?.fontWeight === 'number' ? fontSettings.fontWeight : 400,
2004
- fontStyle: typeof fontSettings?.fontStyle === 'string' ? fontSettings.fontStyle : 'normal',
2005
- },
2006
- letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
2007
- wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
2008
- textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
2009
- fontSizeLineHeight: {
2010
- fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
2011
- lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
2419
+ fontFamily: (settings as any)?.[\`\${kind}FontFamily\`] ?? 'Arial',
2420
+ fontWeight: (settings as any)?.[\`\${kind}FontSettings\`]?.fontWeight ?? 400,
2421
+ fontStyle: (settings as any)?.[\`\${kind}FontSettings\`]?.fontStyle ?? 'normal',
2012
2422
  },
2013
2423
  textAppearance: {
2014
- textTransform: textAppearance?.textTransform ?? 'none',
2015
- textDecoration: textAppearance?.textDecoration ?? 'none',
2016
- fontVariant: textAppearance?.fontVariant ?? 'normal',
2424
+ textTransform: (settings as any)?.[\`\${kind}TextAppearance\`]?.textTransform ?? 'none',
2425
+ textDecoration: (settings as any)?.[\`\${kind}TextAppearance\`]?.textDecoration ?? 'none',
2426
+ fontVariant: (settings as any)?.[\`\${kind}TextAppearance\`]?.fontVariant ?? 'normal',
2017
2427
  },
2018
- color: typeof color === 'string' ? color : '#000000',
2428
+ fontSize: (settings as any)?.[\`\${kind}FontSize\`] ?? 0.01,
2429
+ lineHeight: (settings as any)?.[\`\${kind}LineHeight\`] ?? 0.01,
2430
+ letterSpacing: (settings as any)?.[\`\${kind}LetterSpacing\`] ?? 0,
2431
+ wordSpacing: (settings as any)?.[\`\${kind}WordSpacing\`] ?? 0,
2432
+ color: (settings as any)?.[\`\${kind}Color\`] ?? '#000000',
2019
2433
  };
2020
-
2021
- return flat as CaptionStyles;
2434
+ return styles;
2022
2435
  };
2023
2436
 
2024
- const imageCaptionStyle = resolveCaptionStyle('imageCaption');
2025
- const captionStyle = resolveCaptionStyle('caption');
2026
- const elementOrder = useMemo(() => {
2027
- const order: ElementOrderKey[] = ['text', 'icon', 'caption'];
2028
- return order.map((key, index: number) => ({ key, order: index }));
2437
+ const textStyle = resolveTextStyle('text');
2438
+ const captionStyle = resolveTextStyle('caption');
2439
+ const shouldMeasureTextExtents =
2440
+ items.length > 1 && items.some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0);
2441
+ const measureLayerRef = useRef<HTMLDivElement>(null);
2442
+ const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
2443
+ const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
2444
+ const controls: TestimonialsSettings['controls'] = settings.controls ?? { mode: 'Off', icon: null };
2445
+ const canSwitch = items.length > 1;
2446
+
2447
+ const commitTransition = useCallback((currentIndex: number, nextIndex: number) => {
2448
+ if (!canSwitch) return currentIndex;
2449
+ if (nextIndex === currentIndex) return currentIndex;
2450
+ if (fadeTimerRef.current) window.clearTimeout(fadeTimerRef.current);
2451
+ setPrevIndex(currentIndex);
2452
+ setIsFading(true);
2453
+ fadeTimerRef.current = window.setTimeout(() => {
2454
+ setPrevIndex(null);
2455
+ setIsFading(false);
2456
+ fadeTimerRef.current = null;
2457
+ }, 300);
2458
+ return nextIndex;
2459
+ }, [canSwitch]);
2460
+
2461
+ const goPrev = useCallback(() => {
2462
+ if (!canSwitch) return;
2463
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex - 1 + items.length) % items.length));
2464
+ }, [canSwitch, commitTransition, items.length]);
2465
+
2466
+ const goNext = useCallback(() => {
2467
+ if (!canSwitch) return;
2468
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2469
+ }, [canSwitch, commitTransition, items.length]);
2470
+
2471
+ useEffect(() => {
2472
+ if (!isAnimating || !canSwitch) return;
2473
+ const safeDelayMs = Math.max(300, Number.isFinite(delay * 1000) ? delay * 1000 : 0);
2474
+ const id = window.setInterval(() => {
2475
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2476
+ }, safeDelayMs);
2477
+ return () => {
2478
+ window.clearInterval(id);
2479
+ };
2480
+ }, [isAnimating, canSwitch, commitTransition, items.length, delay]);
2481
+
2482
+ useEffect(() => {
2483
+ return () => {
2484
+ if (fadeTimerRef.current) window.clearTimeout(fadeTimerRef.current);
2485
+ };
2029
2486
  }, []);
2030
2487
 
2031
- if (!item) return <></>;
2032
-
2033
- return (
2034
- <>
2035
- <div
2036
- className={classes.container}
2037
- style={{
2038
- flexDirection: 'column',
2039
- alignItems: 'center'
2040
- }}
2041
- >
2488
+ const renderItemContent = useCallback((item: TestimonialsItem, opts?: RenderItemContentOpts) => {
2489
+ const textMinHeightPx = opts?.textMinHeightPx;
2490
+ const captionMinHeightPx = opts?.captionMinHeightPx;
2491
+ const dataMeasureAttrs = opts?.dataMeasureAttrs;
2492
+
2493
+ return (
2494
+ <>
2495
+ {item.text && (
2496
+ <div
2497
+ key="text"
2498
+ style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}
2499
+ >
2500
+ <div
2501
+ data-controls="textMarginTop"
2502
+ className={\`\${P}-control\`}
2503
+ style={{ height: scalingValue(textMarginTop ?? 0, isEditor ?? false) }}
2504
+ />
2505
+ <div
2506
+ {...(dataMeasureAttrs && { 'data-testimonial-measure': 'text' as const })}
2507
+ style={{
2508
+ ...textStylesToCss(textStyle, isEditor),
2509
+ ...(textMinHeightPx && textMinHeightPx > 0 ? { minHeight: textMinHeightPx } : {}),
2510
+ textAlign: overlayTextAlign,
2511
+ pointerEvents: 'auto',
2512
+ }}
2513
+ >
2514
+ <RichTextRenderer content={item.text} />
2515
+ </div>
2516
+ </div>
2517
+ )}
2042
2518
  <div
2043
- className={cn(classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2519
+ key="image"
2044
2520
  style={{
2045
- width: scalingValue(cardWidth, isEditor ?? false),
2521
+ display: 'flex',
2522
+ flexDirection: 'column',
2523
+ alignItems: overlayAlignItems,
2524
+ width: '100%',
2046
2525
  }}
2047
2526
  >
2527
+ <div
2528
+ data-controls="imageMarginTop"
2529
+ className={\`\${P}-control\`}
2530
+ style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false) }}
2531
+ />
2532
+ <div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
2533
+ {item.image?.url &&
2534
+ <img
2535
+ src={item.image?.url}
2536
+ alt={item.image?.name}
2537
+ className={\`\${P}-icon\`}
2538
+ style={{ objectFit: item.image?.objectFit || 'contain' }}
2539
+ />
2540
+ }
2541
+ </div>
2542
+ </div>
2543
+ {item.caption && (
2048
2544
  <div
2545
+ key="caption"
2049
2546
  style={{
2050
- padding: \`\${scalingValue(settings.padding.top, isEditor ?? false)} \${scalingValue(settings.padding.right, isEditor ?? false)} \${scalingValue(settings.padding.bottom, isEditor ?? false)} \${scalingValue(settings.padding.left, isEditor ?? false)}\`,
2051
- width: scalingValue(cardWidth, isEditor ?? false),
2052
- height: '100%',
2053
- boxSizing: 'border-box',
2054
- position: 'relative',
2547
+ display: 'flex',
2548
+ flexDirection: 'column',
2549
+ alignItems: overlayAlignItems,
2550
+ width: '100%',
2055
2551
  }}
2056
2552
  >
2057
- {item.image?.url && (
2058
- <img
2059
- className={classes.image}
2060
- src={item.image?.url}
2061
- alt={item.image?.name}
2062
- style={{objectFit: item.image?.objectFit || 'cover'}}
2063
- />
2064
- )}
2065
- <div className={classes.cover} />
2066
2553
  <div
2067
- className={classes.elementsOverlay}
2554
+ data-controls="captionMarginTop"
2555
+ className={\`\${P}-control\`}
2556
+ style={{ height: scalingValue(captionMarginTop ?? 0, isEditor ?? false) }}
2557
+ />
2558
+ <div
2559
+ {...(dataMeasureAttrs ? { 'data-testimonial-measure': 'caption' as const } : {})}
2560
+ style={{
2561
+ ...textStylesToCss(captionStyle, isEditor),
2562
+ ...(captionMinHeightPx && captionMinHeightPx > 0 ? { minHeight: captionMinHeightPx } : {}),
2563
+ textAlign: overlayTextAlign,
2564
+ pointerEvents: 'auto',
2565
+ }}
2566
+ >
2567
+ <RichTextRenderer content={item.caption} />
2568
+ </div>
2569
+ </div>
2570
+ )}
2571
+ </>
2572
+ );
2573
+ }, [
2574
+ captionMarginTop,
2575
+ captionStyle,
2576
+ imageMarginTop,
2577
+ imageWidth,
2578
+ imageHeight,
2579
+ isEditor,
2580
+ overlayAlignItems,
2581
+ overlayTextAlign,
2582
+ textMarginTop,
2583
+ textStyle,
2584
+ ]);
2585
+
2586
+ useTestimonialTextMeasure({
2587
+ enabled: shouldMeasureTextExtents,
2588
+ rootRef: measureLayerRef,
2589
+ onExtents: ({ maxTextPx, maxCaptionPx }) => {
2590
+ setMeasuredTextMinPx(maxTextPx);
2591
+ setMeasuredCaptionMinPx(maxCaptionPx);
2592
+ },
2593
+ deps: [items, renderItemContent],
2594
+ });
2595
+
2596
+ if (!currentItem) return <></>;
2597
+
2598
+ const visibleContentOpts: RenderItemContentOpts | undefined = shouldMeasureTextExtents
2599
+ ? { textMinHeightPx: measuredTextMinPx, captionMinHeightPx: measuredCaptionMinPx }
2600
+ : undefined;
2601
+
2602
+ return (
2603
+ <>
2604
+ <div className={\`\${P}-container\`}>
2605
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
2606
+ <div
2607
+ className={cn(\`\${P}-elements-overlay\`, \`\${P}-wrapper\`, autoplay === 'off' && \`\${P}-wrapper-autoplay-off\`)}
2608
+ style={{ width: scalingValue(width ?? 0, isEditor ?? false), alignItems: overlayAlignItems }}
2609
+ >
2610
+ {shouldMeasureTextExtents && (
2611
+ <div
2612
+ ref={measureLayerRef}
2613
+ aria-hidden
2068
2614
  style={{
2069
- display: 'flex',
2070
- flexDirection: 'column',
2071
- inset: 0,
2615
+ position: 'absolute',
2616
+ left: 0,
2617
+ top: 0,
2618
+ width: '100%',
2619
+ visibility: 'hidden',
2072
2620
  pointerEvents: 'none',
2621
+ zIndex: -1,
2073
2622
  }}
2074
2623
  >
2075
- {elementOrder.map(({ key, order: orderIndex }: { key: ElementOrderKey, order: number }) => {
2076
- if (key === 'icon') {
2077
- return (
2078
- <div key="icon" style={{ order: orderIndex, zIndex: orderIndex }}>
2079
- <div
2080
- data-controls="iconMarginTop"
2081
- className={classes.control}
2082
- style={{ height: scalingValue(iconMarginTop, isEditor ?? false) }}
2083
- />
2084
- <div
2085
- style={{
2086
- width: '100%',
2087
- textAlign: iconAlign
2088
- }}
2089
- >
2090
- <img
2091
- src={item.icon?.url}
2092
- alt={item.icon?.name}
2093
- className={classes.icon}
2094
- style={{
2095
- transform: \`scale(\${iconScale / 100})\`,
2096
- pointerEvents: 'auto'
2097
- }}
2098
- />
2099
- </div>
2100
- </div>
2101
- );
2102
- }
2103
- if (key === 'text' && imageCaptionStyle) {
2104
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2105
- imageCaptionStyle;
2106
- return (
2107
- <div key="text" style={{ order: orderIndex, zIndex: orderIndex }}>
2108
- <div
2109
- data-controls="textMarginTop"
2110
- className={classes.control}
2111
- style={{ height: scalingValue(textMarginTop, isEditor ?? false) }}
2112
- />
2113
- <div
2114
- data-styles="imageCaption"
2115
- className={classes.caption}
2116
- style={{
2117
- fontFamily: fontSettings.fontFamily,
2118
- fontWeight: fontSettings.fontWeight,
2119
- fontStyle: fontSettings.fontStyle,
2120
- minHeight: scalingValue(textMinHeight, isEditor ?? false),
2121
- letterSpacing: scalingValue(letterSpacing, isEditor),
2122
- wordSpacing: scalingValue(wordSpacing, isEditor),
2123
- textAlign,
2124
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2125
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2126
- textTransform: textAppearance.textTransform ?? 'none',
2127
- textDecoration: textAppearance.textDecoration ?? 'none',
2128
- fontVariant: textAppearance.fontVariant ?? 'normal',
2129
- color,
2130
- pointerEvents: 'auto'
2131
- }}
2132
- >
2133
- <RichTextRenderer content={item.imageCaption ?? item.text ?? []} />
2134
- </div>
2135
- </div>
2136
- );
2137
- }
2138
- if (key === 'caption' && captionStyle) {
2139
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2140
- captionStyle;
2141
- return (
2142
- <div key="caption" style={{ order: orderIndex, zIndex: orderIndex }}>
2143
- <div
2144
- data-controls="captionMarginTop"
2145
- className={classes.control}
2146
- style={{ height: scalingValue(captionMarginTop, isEditor ?? false) }}
2147
- />
2148
- <div
2149
- data-styles="caption"
2150
- className={classes.caption}
2151
- style={{
2152
- fontFamily: fontSettings.fontFamily,
2153
- fontWeight: fontSettings.fontWeight,
2154
- fontStyle: fontSettings.fontStyle,
2155
- minHeight: 0,
2156
- letterSpacing: scalingValue(letterSpacing, isEditor),
2157
- wordSpacing: scalingValue(wordSpacing, isEditor),
2158
- textAlign,
2159
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2160
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2161
- textTransform: textAppearance.textTransform ?? 'none',
2162
- textDecoration: textAppearance.textDecoration ?? 'none',
2163
- fontVariant: textAppearance.fontVariant ?? 'normal',
2164
- color,
2165
- pointerEvents: 'auto'
2166
- }}
2167
- >
2168
- <RichTextRenderer content={item.caption} />
2169
- </div>
2170
- </div>
2171
- );
2172
- }
2173
- return null;
2174
- })}
2624
+ {items.map((item, index) => (
2625
+ <div key={index} style={{ width: '100%' }}>
2626
+ {renderItemContent(item, { dataMeasureAttrs: true })}
2627
+ </div>
2628
+ ))}
2629
+ </div>
2630
+ )}
2631
+ <div className={\`\${P}-fade-stack\`}>
2632
+ {previousItem && isFading && (
2633
+ <div className={cn(\`\${P}-fade-item-prev\`, \`\${P}-fade-out\`)}>
2634
+ {renderItemContent(previousItem, visibleContentOpts)}
2635
+ </div>
2636
+ )}
2637
+ <div className={cn(\`\${P}-fade-item-current\`, isFading ? \`\${P}-fade-in\` : undefined)}>
2638
+ {renderItemContent(currentItem, visibleContentOpts)}
2175
2639
  </div>
2176
2640
  </div>
2177
2641
  </div>
2178
- {settings.controls?.isActive === 'visible' && settings.autoplay === 'off' && (
2179
- // TODO: Add controls
2180
- <div>Controls</div>
2642
+ {controls.mode === 'On' && (
2643
+ <div className={\`\${P}-controls\`}>
2644
+ <div
2645
+ className={\`\${P}-arrow\`}
2646
+ style={{
2647
+ width: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2648
+ height: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2649
+ ['--arrow-hover-color' as string]: controlsHoverColor,
2650
+ }}
2651
+ >
2652
+ <button
2653
+ type="button"
2654
+ className={\`\${P}-arrow-inner\`}
2655
+ onClick={goPrev}
2656
+ aria-label="Previous testimonial"
2657
+ >
2658
+ {controls.icon && (
2659
+ <SvgImage
2660
+ url={controls.icon }
2661
+ fill={controlsColor}
2662
+ hoverFill={controlsHoverColor}
2663
+ className={cn(\`\${P}-arrow-img\`, \`\${P}-mirror\`)}
2664
+ />
2665
+ )}
2666
+ </button>
2667
+ </div>
2668
+ <div
2669
+ className={cn(\`\${P}-arrow\`, \`\${P}-next-arrow\`)}
2670
+ style={{
2671
+ width: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2672
+ height: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2673
+ ['--arrow-hover-color' as string]: controlsHoverColor,
2674
+ }}
2675
+ >
2676
+ <button
2677
+ type="button"
2678
+ className={\`\${P}-arrow-inner\`}
2679
+ onClick={goNext}
2680
+ aria-label="Next testimonial"
2681
+ >
2682
+ {controls.icon && (
2683
+ <SvgImage
2684
+ url={controls.icon }
2685
+ fill={controlsColor}
2686
+ hoverFill={controlsHoverColor}
2687
+ className={\`\${P}-arrow-img\`}
2688
+ />
2689
+ )}
2690
+ </button>
2691
+ </div>
2692
+ </div>
2181
2693
  )}
2182
2694
  </div>
2183
2695
  </>
2184
2696
  );
2185
2697
  };
2186
2698
 
2699
+
2187
2700
  export type TestimonialsItem = {
2188
2701
  image?: {
2189
2702
  url?: string;
2190
2703
  name?: string;
2191
2704
  objectFit?: 'cover' | 'contain';
2192
2705
  };
2193
- icon?: {
2194
- url?: string;
2195
- name?: string;
2196
- objectFit?: 'cover' | 'contain';
2197
- };
2198
2706
  text: any[];
2199
- imageCaption?: any[];
2200
2707
  caption: any[];
2201
2708
  };
2202
2709
 
2203
- type Padding = {
2204
- top: number;
2205
- right: number;
2206
- bottom: number;
2207
- left: number;
2208
- };
2209
-
2210
2710
  type TestimonialsSettings = {
2211
2711
  autoplay: 'on' | 'off';
2212
- speed: number;
2712
+ delay: number;
2713
+ align: 'start' | 'center' | 'end';
2213
2714
  width: number;
2214
- iconMarginTop?: number;
2215
- iconAlign?: 'left' | 'center' | 'right';
2216
- iconScale?: number;
2715
+ imageMarginTop?: number;
2716
+ imageWidth?: number;
2717
+ imageHeight?: number;
2217
2718
  textMarginTop?: number;
2218
- textMinHeight?: number;
2219
2719
  captionMarginTop?: number;
2220
- padding: Padding;
2221
- styles: TestimonialsStyles;
2720
+ controlsColor: string;
2721
+ controlsHoverColor: string;
2722
+ controlsWidth?: number;
2222
2723
  controls: {
2223
- isActive: 'visible' | 'hidden';
2224
- arrowsImgUrl: string | null;
2225
- align: 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right' | 'center-center' | 'center-left' | 'center-right';
2226
- gap: number;
2227
- scale: number;
2228
- color: string;
2229
- hover: string;
2724
+ mode?: 'On' | 'Off';
2725
+ icon?: string | null;
2230
2726
  };
2231
2727
  };
2232
-
2233
- type CaptionStyles = {
2234
- fontSettings: {
2235
- fontFamily: string;
2236
- fontWeight: number;
2237
- fontStyle: string;
2238
- };
2239
- widthSettings: {
2240
- width: number;
2241
- sizing: 'auto' | 'manual';
2242
- };
2243
- letterSpacing: number;
2244
- textAlign: 'left' | 'center' | 'right';
2245
- wordSpacing: number;
2246
- fontSizeLineHeight: {
2247
- fontSize: number;
2248
- lineHeight: number;
2249
- };
2250
- textAppearance: {
2251
- textTransform: 'none' | 'uppercase' | 'lowercase';
2252
- textDecoration: 'none' | 'underline';
2253
- fontVariant: 'normal' | 'small-caps';
2254
- };
2255
- color: string;
2256
- };
2257
-
2258
- type TestimonialsStyles = {
2259
- imageCaption?: CaptionStyles;
2260
- text: CaptionStyles;
2261
- caption: CaptionStyles;
2262
- };
2263
-
2264
- type ElementOrderKey = 'text' | 'icon' | 'caption';
2265
- `,Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ct={fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},gs={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-toggle"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:1,max:10},width:{type:"number",scope:"layout",title:"Card width",min:0,max:400,display:{type:"range-control"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},iconMarginTop:{type:"number",scope:"layout",title:"Icon margin top",min:0,max:100,display:{type:"range-control"}},iconAlign:{type:"string",scope:"common",title:"Icon align",enum:["left","center","right"],display:{type:"align-group",direction:"vertical"}},iconScale:{type:"number",scope:"layout",title:"Icon scale",min:50,max:600,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text min height",min:0,max:300,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},imageCaptionFontFamily:{type:"string",scope:"common",title:"Text Font Family",display:{type:"font-family-select"}},imageCaptionFontSettings:{...Eo.fontSettings,scope:"common",title:"Text",display:{type:"font-settings-weight"}},imageCaptionFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},imageCaptionLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},imageCaptionLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},imageCaptionWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},imageCaptionTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},imageCaptionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},imageCaptionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},captionFontFamily:{type:"string",scope:"common",title:"Caption Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Eo.fontSettings,scope:"common",title:"Caption",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"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"}},defaults:{autoplay:"off",iconAlign:"left",iconScale:100,imageCaptionFontFamily:Ct.fontSettings.fontFamily,imageCaptionFontSettings:{fontWeight:Ct.fontSettings.fontWeight,fontStyle:Ct.fontSettings.fontStyle},imageCaptionLetterSpacing:Ct.letterSpacing,imageCaptionWordSpacing:Ct.wordSpacing,imageCaptionTextAlign:Ct.textAlign,imageCaptionTextAppearance:Ct.textAppearance,imageCaptionColor:Ct.color,captionFontFamily:Ct.fontSettings.fontFamily,captionFontSettings:{fontWeight:Ct.fontSettings.fontWeight,fontStyle:Ct.fontSettings.fontStyle},captionLetterSpacing:Ct.letterSpacing,captionWordSpacing:Ct.wordSpacing,captionTextAlign:Ct.textAlign,captionTextAppearance:Ct.textAppearance,captionColor:Ct.color},layoutDefaults:{m:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0},d:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,padding:{top:0,right:0,bottom:0,left:0},iconMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0}},displayRules:[],layout:["__componentName__","autoplay","speed","width","padding","iconMarginTop","iconAlign","iconScale","textMarginTop","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed"]},{type:"row",items:[{type:"group",title:"",items:["width"]},{type:"group",title:"",items:["padding"]}]},{type:"row",items:[{type:"group",title:"",items:["iconMarginTop","iconAlign","iconScale"]}]},{type:"row",items:[{type:"group",title:"",items:["textMarginTop","textMinHeight","captionMarginTop"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"",items:[{type:"row",items:["imageCaptionFontFamily","imageCaptionFontSettings"]},{type:"row",items:["imageCaptionFontSize","imageCaptionLineHeight","imageCaptionLetterSpacing","imageCaptionWordSpacing"]},"imageCaptionTextAppearance",{type:"row",items:["imageCaptionTextAlign","imageCaptionColor"]}]},{type:"group",title:"",items:[{type:"row",items:["captionFontFamily","captionFontSettings"]},{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance",{type:"row",items:["captionTextAlign","captionColor"]}]}]}],paletteBookmark:{items:["imageCaptionColor","captionColor"],panelIds:["general","typeStyle"]},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"]},icon:{type:"object",label:"Icon",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:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{},icon:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01GJ2SPNXG3V5P35ZA35YM1JTW/articles-assets/01KFXFA89BHQHVAJNAZCJMWDA1.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},ms={element:us,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/tesimonialsSingle.png"},defaultSize:{width:700,height:300},schema:gs,sourceCode:ds,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"},{path:"styles.caption.fontSettings"}]}},fs=[Ea,Va,wl,Il,Ol,os,ms];exports.components=fs;exports.isSchemaV1=Sr;
2728
+ `,Xl="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>'),_o={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Kl={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:"common",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text",min:0,max:300,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,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:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:100,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{..._o.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"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{..._o.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"}},textTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"off",controls:{mode:"Off",icon:Xl},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAlign:"left",captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMinHeight:.1,captionMarginTop:.01,textMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01},d:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMarginTop:0,textMinHeight:.08,captionMarginTop:.01,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01}},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:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Zl={element:Gl,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonialsSingle.png"},defaultSize:{width:700,height:300},schema:Kl,sourceCode:Yl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},Jl=[_a,Pa,Sl,Il,jl,Ul,Zl];exports.components=Jl;exports.isSchemaV1=vr;