@cntrl-site/components 1.0.7-alpha.4 → 1.0.7-alpha.6

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"),_=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function xr(t){return t.type==="object"&&t.version===1}const Sr="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",Lr="ControlSlider-module__arrowInner___aEra3",Er="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",zr="ControlSlider-module__paginationItem___nTRbk",Vr="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",qr="ControlSlider-module__imgWrapper___UjEgB",Gr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Kr="ControlSlider-module__active___WZK4G",Zr="ControlSlider-module__withPointerEvents___t-18M",Jr="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",Z={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:$r,arrow:Tr,arrowVertical:_r,nextArrow:Ar,arrowInner:Lr,arrowIcon:Er,arrowImg:Fr,mirror:kr,pagination:Ir,paginationInner:Rr,paginationVertical:Wr,paginationItem:zr,dot:Vr,activeDot:Mr,paginationInsideBottom:Nr,paginationInsideTop:Pr,paginationOutsideBottom:Hr,paginationOutsideTop:jr,paginationInsideLeft:Or,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:qr,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Zr,topLeftAlignment:Jr,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,Se=4,Me=5,Je=6,nn=7,gi={CREATED:ge,MOUNTED:di,IDLE:ve,MOVING:Se,SCROLLING:Me,DRAGGING:Je,DESTROYED:nn};function Gt(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 Eo=setTimeout,An=function(){};function ao(t){return requestAnimationFrame(t)}function sn(t,e){return typeof e===t}function Ee(t){return!Mn(t)&&sn("object",t)}var Vn=Array.isArray,Fo=dt(sn,"function"),Jt=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 Vn(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 Mt(t,e){Dt(t,Jt(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){Vn(n)?t[o]=n.slice():Ee(n)?t[o]=Kt({},Ee(t[o])?t[o]:{},n):t[o]=n})}),t}function lo(t,e){Lt(e||ke(t),function(n){delete t[n]})}function Nt(t,e){Lt(t,function(n){Lt(e,function(o){n&&n.removeAttribute(o)})})}function et(t,e,n){Ee(e)?ie(e,function(o,r){et(t,r,o)}):Lt(t,function(o){Mn(n)||n===""?Nt(o,e):o.setAttribute(e,String(n))})}function me(t,e,n){var o=document.createElement(t);return e&&(Jt(e)?Mt(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 _t(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 zo(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 Ln(t){return t.timeStamp}function re(t){return Jt(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 Vo(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 En(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,l,p,g){r(i,l,function(u,F,S){var f="addEventListener"in u,d=f?u.removeEventListener.bind(u,F,p,g):u.removeListener.bind(u,p);f?u.addEventListener(F,p,g):u.addListener(p),t.push([u,F,S,p,d])})}function n(i,l,p){r(i,l,function(g,u,F){t=t.filter(function(S){return S[0]===g&&S[1]===u&&S[2]===F&&(!p||S[3]===p)?(S[4](),!1):!0})})}function o(i,l,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(l,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(l,u,!1,p)),i.dispatchEvent(g),g}function r(i,l,p){Lt(i,function(g){g&&Lt(l,function(u){u.split(" ").forEach(function(F){var S=F.split(".");p(g,S[0],S[1])})})})}function a(){t.forEach(function(i){i[4]()}),Gt(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",vt="refresh",wt="updated",be="resize",cn="resized",Oo="drag",Bo="dragging",Do="dragged",pn="scroll",se="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",qo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",qn="autoplay:play",Xo="autoplay:playing",Gn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Zo="sh",an="ei";function yt(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Mo();function o(a,i){n.bind(e,Pe(a).join(" "),function(l){i.apply(i,Vn(l.detail)?l.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,l,p=!0,g=0;function u(){if(!p){if(i=t?Qt((r()-a)/t,1):1,n&&n(i),i>=1&&(e(),a=r(),o&&++g>=o))return S();l=ao(u)}}function F(x){x||d(),a=r()-(x?i*t:0),p=!1,l=ao(u)}function S(){p=!0}function f(){a=r(),i=0,n&&n(i)}function d(){l&&cancelAnimationFrame(l),i=0,l=0,p=!0}function m(x){t=x}function w(){return p}return{start:F,rewind:f,pause:S,cancel:d,set:m,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(),l=[];function p(){var d=n.mediaQuery==="min";ke(r).sort(function(m,w){return d?+m-+w:+w-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(a,io),F()}function g(d){d&&i.destroy()}function u(d,m){var w=matchMedia(m);i.bind(w,"change",F),l.push([d,w])}function F(){var d=o.is(nn),m=n.direction,w=l.reduce(function(x,b){return Kt(x,b[1].matches?b[0]:{})},{});lo(n),f(w),n.destroy?t.destroy(n.destroy==="completely"):d?(g(!0),t.mount()):m!==n.direction&&t.refresh()}function S(d){matchMedia(io).matches&&(d?Kt(n,a):lo(n,ke(a)))}function f(d,m,w){Kt(n,d),m&&Kt(Object.getPrototypeOf(n),d),(w||!o.is(ge))&&t.emit(wt,n)}return{setup:p,destroy:g,reduce:S,set:f}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Jo=dn+"Up",Qo=dn+"Down",po="rtl",fn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,mn],ArrowRight:[Qo,gn]};function bi(t,e,n){function o(a,i,l){l=l||n.direction;var p=l===po&&!i?1:l===fn?0:-1;return Sn[a]&&Sn[a][p]||a.replace(/width|left|right/i,function(g,u){var F=Sn[g.toLowerCase()][p]||g;return u>0?F.charAt(0).toUpperCase()+F.slice(1):F})}function r(a){return a*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var qt="role",fe="tabindex",xi="disabled",Wt="aria-",Be=Wt+"controls",tr=Wt+"current",uo=Wt+"selected",At=Wt+"label",Xn=Wt+"labelledby",er=Wt+"hidden",Kn=Wt+"orientation",ze=Wt+"roledescription",go=Wt+"live",mo=Wt+"busy",fo=Wt+"atomic",Zn=[qt,fe,xi,Be,tr,At,Xn,er,Kn,ze],Pt=Oe+"__",ne="is-",Cn=Oe,yo=Pt+"track",Si=Pt+"list",yn=Pt+"slide",nr=yn+"--clone",Ci=yn+"__container",Jn=Pt+"arrows",hn=Pt+"arrow",or=hn+"--prev",rr=hn+"--next",vn=Pt+"pagination",ir=vn+"__page",wi=Pt+"progress",$i=wi+"__bar",Ti=Pt+"toggle",_i=Pt+"spinner",Ai=Pt+"sr",Li=ne+"initialized",le=ne+"active",ar=ne+"prev",lr=ne+"next",In=ne+"visible",Rn=ne+"loading",sr=ne+"focus-in",cr=ne+"overflow",Ei=[le,In,ar,lr,Rn,sr,cr],Fi={slide:yn,clone:nr,arrows:Jn,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=yt(t),r=o.on,a=o.bind,i=t.root,l=n.i18n,p={},g=[],u=[],F=[],S,f,d;function m(){$(),j(),b()}function w(){r(vt,x),r(vt,m),r(wt,b),a(document,pr+" keydown",function(y){d=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Dt(i,sr,!!d)})}function x(y){var L=Zn.concat("style");Gt(g),Ut(i,u),Ut(S,F),Nt([S,f],L),Nt(i,y?L:["style",ze])}function b(){Ut(i,u),Ut(S,F),u=C(Cn),F=C(yo),Mt(i,u),Mt(S,F),et(i,At,n.label),et(i,Xn,n.labelledby)}function $(){S=W("."+yo),f=je(S,"."+Si),Ae(S&&f,"A track/list element is missing."),Qe(g,Io(f,"."+yn+":not(."+nr+")")),ie({arrows:Jn,pagination:vn,prev:or,next:rr,bar:$i,toggle:Ti},function(y,L){p[L]=W("."+y)}),Ie(p,{root:i,track:S,list:f,slides:g})}function j(){var y=i.id||mi(Oe),L=n.role;i.id=y,S.id=S.id||y+"-track",f.id=f.id||y+"-list",!Rt(i,qt)&&i.tagName!=="SECTION"&&L&&et(i,qt,L),et(i,ze,l.carousel),et(f,qt,"presentation")}function W(y){var L=zo(i,y);return L&&ki(L,"."+Cn)===i?L:void 0}function C(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===Cn&&le]}return Ie(p,{setup:m,mount:w,destroy:x})}var xe="slide",we="loop",De="fade";function Wi(t,e,n,o){var r=yt(t),a=r.on,i=r.emit,l=r.bind,p=t.Components,g=t.root,u=t.options,F=u.isNavigation,S=u.updateOnMove,f=u.i18n,d=u.pagination,m=u.slideFocus,w=p.Direction.resolve,x=Rt(o,"style"),b=Rt(o,At),$=n>-1,j=je(o,"."+Ci),W;function C(){$||(o.id=g.id+"-slide"+On(e+1),et(o,qt,d?"tabpanel":"group"),et(o,ze,f.slide),et(o,At,b||Fn(f.slideLabel,[e+1,t.length]))),y()}function y(){l(o,"click",dt(i,Bn,R)),l(o,"keydown",dt(i,Ko,R)),a([Ce,Zo,se],T),a(Un,h),S&&a(Yt,P)}function L(){W=!0,r.destroy(),Ut(o,Ei),Nt(o,Zn),et(o,"style",x),et(o,At,b||"")}function h(){var E=t.splides.map(function(A){var V=A.splide.Components.Slides.getAt(e);return V?V.slide.id:""}).join(" ");et(o,At,Fn(f.slideX,($?n:e)+1)),et(o,Be,E),et(o,qt,m?"button":""),m&&Nt(o,ze)}function P(){W||T()}function T(){if(!W){var E=t.index;z(),k(),Dt(o,ar,e===E-1),Dt(o,lr,e===E+1)}}function z(){var E=O();E!==so(o,le)&&(Dt(o,le,E),et(o,tr,F&&E||""),i(E?No:Po,R))}function k(){var E=v(),A=!E&&(!O()||$);if(t.state.is([Se,Me])||et(o,er,A||""),et(Hn(o,u.focusableNodes||""),fe,A?-1:""),m&&et(o,fe,A?-1:0),E!==so(o,In)&&(Dt(o,In,E),i(E?Ho:jo,R)),!E&&document.activeElement===o){var V=p.Slides.getAt(t.index);V&&Ro(V.slide)}}function U(E,A,V){It(V&&j||o,E,A)}function O(){var E=t.index;return E===e||u.cloneStatus&&E===n}function v(){if(t.is(De))return O();var E=_t(p.Elements.track),A=_t(o),V=w("left",!0),X=w("right",!0);return rn(E[V])<=We(A[V])&&rn(A[X])<=We(E[X])}function I(E,A){var V=$t(E-e);return!$&&(u.rewind||t.is(we))&&(V=Qt(V,t.length-V)),V<=A}var R={index:e,slideIndex:n,slide:o,container:j,isClone:$,mount:C,destroy:L,update:T,style:U,isWithin:I};return R}function zi(t,e,n){var o=yt(t),r=o.on,a=o.emit,i=o.bind,l=e.Elements,p=l.slides,g=l.list,u=[];function F(){S(),r(vt,f),r(vt,S)}function S(){p.forEach(function(T,z){m(T,z,-1)})}function f(){W(function(T){T.destroy()}),Gt(u)}function d(){W(function(T){T.update()})}function m(T,z,k){var U=Wi(t,z,k,T);U.mount(),u.push(U),u.sort(function(O,v){return O.index-v.index})}function w(T){return T?C(function(z){return!z.isClone}):u}function x(T){var z=e.Controller,k=z.toIndex(T),U=z.hasFocus()?1:n.perPage;return C(function(O){return tn(O.index,k,k+U-1)})}function b(T){return C(T)[0]}function $(T,z){Lt(T,function(k){if(Jt(k)&&(k=Wo(k)),ko(k)){var U=p[z];U?Pn(k,U):He(g,k),Mt(k,n.classes.slide),L(k,dt(a,be))}}),a(vt)}function j(T){ae(C(T).map(function(z){return z.slide})),a(vt)}function W(T,z){w(z).forEach(T)}function C(T){return u.filter(Fo(T)?T:function(z){return Jt(T)?Fe(z.slide,T):Nn(Pe(T),z.index)})}function y(T,z,k){W(function(U){U.style(T,z,k)})}function L(T,z){var k=Hn(T,"img"),U=k.length;U?k.forEach(function(O){i(O,"load error",function(){--U||z()})}):z()}function h(T){return T?p.length:u.length}function P(){return u.length>n.perPage}return{mount:F,destroy:f,update:d,register:m,get:w,getIn:x,getAt:b,add:$,remove:j,forEach:W,filter:C,style:y,getLength:h,isEnough:P}}function Vi(t,e,n){var o=yt(t),r=o.on,a=o.bind,i=o.emit,l=e.Slides,p=e.Direction.resolve,g=e.Elements,u=g.root,F=g.track,S=g.list,f=l.getAt,d=l.style,m,w,x;function b(){$(),a(window,"resize load",hi(dt(i,be))),r([wt,vt],$),r(be,j)}function $(){m=n.direction===fn,It(u,"maxWidth",re(n.width)),It(F,p("paddingLeft"),W(!1)),It(F,p("paddingRight"),W(!0)),j(!0)}function j(R){var E=_t(u);(R||w.width!==E.width||w.height!==E.height)&&(It(F,"height",C()),d(p("marginRight"),re(n.gap)),d("width",L()),d("height",h(),!0),w=E,i(cn),x!==(x=I())&&(Dt(u,cr,x),i(fi,x)))}function W(R){var E=n.padding,A=p(R?"right":"left");return E&&re(E[A]||(Ee(E)?0:E))||"0px"}function C(){var R="";return m&&(R=y(),Ae(R,"height or heightRatio is missing."),R="calc("+R+" - "+W(!1)+" - "+W(!0)+")"),R}function y(){return re(n.height||_t(S).width*n.heightRatio)}function L(){return n.autoWidth?null:re(n.fixedWidth)||(m?"":P())}function h(){return re(n.fixedHeight)||(m?n.autoHeight?null:P():y())}function P(){var R=re(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function T(){return _t(S)[p("width")]}function z(R,E){var A=f(R||0);return A?_t(A.slide)[p("width")]+(E?0:O()):0}function k(R,E){var A=f(R);if(A){var V=_t(A.slide)[p("right")],X=_t(S)[p("left")];return $t(V-X)+(E?0:O())}return 0}function U(R){return k(t.length-1)-k(0)+z(0,R)}function O(){var R=f(0);return R&&parseFloat(It(R.slide,p("marginRight")))||0}function v(R){return parseFloat(It(F,p("padding"+(R?"Right":"Left"))))||0}function I(){return t.is(De)||U(!0)>T()}return{mount:b,resize:j,listSize:T,slideSize:z,sliderSize:U,totalSize:k,getPadding:v,isOverflow:I}}var Mi=2;function Ni(t,e,n){var o=yt(t),r=o.on,a=e.Elements,i=e.Slides,l=e.Direction.resolve,p=[],g;function u(){r(vt,F),r([wt,be],f),(g=w())&&(d(g),e.Layout.resize(!0))}function F(){S(),u()}function S(){ae(p),Gt(p),o.destroy()}function f(){var x=w();g!==x&&(g<x||!x)&&o.emit(vt)}function d(x){var b=i.get().slice(),$=b.length;if($){for(;b.length<x;)Qe(b,b);Qe(b.slice(-x),b.slice(0,x)).forEach(function(j,W){var C=W<x,y=m(j.slide,W);C?Pn(y,b[0].slide):He(a.list,y),Qe(p,y),i.register(y,W-x+(C?0:$),j.index)})}}function m(x,b){var $=x.cloneNode(!0);return Mt($,n.classes.clone),$.id=t.root.id+"-clone"+On(b+1),$}function w(){var x=n.clones;if(!t.is(we))x=0;else if(Ne(x)){var b=n[l("fixedWidth")]&&e.Layout.slideSize(0),$=b&&We(_t(a.track)[l("width")]/b);x=$||n[l("autoWidth")]&&t.length||n.perPage*Mi}return x}return{mount:u,destroy:S}}function Pi(t,e,n){var o=yt(t),r=o.on,a=o.emit,i=t.state.set,l=e.Layout,p=l.slideSize,g=l.getPadding,u=l.totalSize,F=l.listSize,S=l.sliderSize,f=e.Direction,d=f.resolve,m=f.orient,w=e.Elements,x=w.list,b=w.track,$;function j(){$=e.Transition,r([ee,cn,wt,vt],W)}function W(){e.Controller.isBusy()||(e.Scroll.cancel(),y(t.index),e.Slides.update())}function C(A,V,X,rt){A!==V&&R(A>X)&&(T(),L(P(U(),A>X),!0)),i(Se),a(Yt,V,X,A),$.start(V,function(){i(ve),a(Ce,V,X,A),rt&&rt()})}function y(A){L(k(A,!0))}function L(A,V){if(!t.is(De)){var X=V?A:h(A);It(x,"transform","translate"+d("X")+"("+X+"px)"),A!==X&&a(Zo)}}function h(A){if(t.is(we)){var V=z(A),X=V>e.Controller.getEnd(),rt=V<0;(rt||X)&&(A=P(A,X))}return A}function P(A,V){var X=A-I(V),rt=S();return A-=m(rt*(We($t(X)/rt)||1))*(V?1:-1),A}function T(){L(U(),!0),$.cancel()}function z(A){for(var V=e.Slides.get(),X=0,rt=1/0,ot=0;ot<V.length;ot++){var lt=V[ot].index,M=$t(k(lt,!0)-A);if(M<=rt)rt=M,X=lt;else break}return X}function k(A,V){var X=m(u(A-1)-v(A));return V?O(X):X}function U(){var A=d("left");return _t(x)[A]-_t(b)[A]+m(g(!1))}function O(A){return n.trimSpace&&t.is(xe)&&(A=ue(A,0,m(S(!0)-F()))),A}function v(A){var V=n.focus;return V==="center"?(F()-p(A,!0))/2:+V*p(A)||0}function I(A){return k(A?e.Controller.getEnd():0,!!n.trimSpace)}function R(A){var V=m(P(U(),A));return A?V>=0:V<=x[d("scrollWidth")]-_t(b)[d("width")]}function E(A,V){V=Ne(V)?U():V;var X=A!==!0&&m(V)<m(I(!1)),rt=A!==!1&&m(V)>m(I(!0));return X||rt}return{mount:j,move:C,jump:y,translate:L,shift:P,cancel:T,toIndex:z,toPosition:k,getPosition:U,getLimit:I,exceededLimit:E,reposition:W}}function Hi(t,e,n){var o=yt(t),r=o.on,a=o.emit,i=e.Move,l=i.getPosition,p=i.getLimit,g=i.toPosition,u=e.Slides,F=u.isEnough,S=u.getLength,f=n.omitEnd,d=t.is(we),m=t.is(xe),w=dt(U,!1),x=dt(U,!0),b=n.start||0,$,j=b,W,C,y;function L(){h(),r([wt,vt,an],h),r(cn,P)}function h(){W=S(!0),C=n.perMove,y=n.perPage,$=R();var M=ue(b,0,f?$:W-1);M!==b&&(b=M,i.reposition())}function P(){$!==R()&&a(an)}function T(M,Q,ft){if(!lt()){var st=k(M),gt=I(st);gt>-1&&(Q||gt!==b)&&(X(gt),i.move(st,gt,j,ft))}}function z(M,Q,ft,st){e.Scroll.scroll(M,Q,ft,function(){var gt=I(i.toIndex(l()));X(f?Qt(gt,$):gt),st&&st()})}function k(M){var Q=b;if(Jt(M)){var ft=M.match(/([+\-<>])(\d+)?/)||[],st=ft[1],gt=ft[2];st==="+"||st==="-"?Q=O(b+ +(""+st+(+gt||1)),b):st===">"?Q=gt?E(+gt):w(!0):st==="<"&&(Q=x(!0))}else Q=d?M:ue(M,0,$);return Q}function U(M,Q){var ft=C||(ot()?1:y),st=O(b+ft*(M?-1:1),b,!(C||ot()));return st===-1&&m&&!Vo(l(),p(!M),1)?M?0:$:Q?st:I(st)}function O(M,Q,ft){if(F()||ot()){var st=v(M);st!==M&&(Q=M,M=st,ft=!1),M<0||M>$?!C&&(tn(0,M,Q,!0)||tn($,Q,M,!0))?M=E(A(M)):d?M=ft?M<0?-(W%y||y):W:M:n.rewind?M=M<0?$:0:M=-1:ft&&M!==Q&&(M=E(A(Q)+(M<Q?-1:1)))}else M=-1;return M}function v(M){if(m&&n.trimSpace==="move"&&M!==b)for(var Q=l();Q===g(M,!0)&&tn(M,0,t.length-1,!n.rewind);)M<b?--M:++M;return M}function I(M){return d?(M+W)%W||0:M}function R(){for(var M=W-(ot()||d&&C?1:y);f&&M-- >0;)if(g(W-1,!0)!==g(M,!0)){M++;break}return ue(M,0,W-1)}function E(M){return ue(ot()?M:y*M,0,$)}function A(M){return ot()?Qt(M,$):rn((M>=$?W-1:M)/y)}function V(M){var Q=i.toIndex(M);return m?ue(Q,0,$):Q}function X(M){M!==b&&(j=b,b=M)}function rt(M){return M?j:b}function ot(){return!Ne(n.focus)||n.isNavigation}function lt(){return t.state.is([Se,Me])&&!!n.waitForTransition}return{mount:L,go:T,scroll:z,getNext:w,getPrev:x,getAdjacent:U,getEnd:R,setIndex:X,getIndex:rt,toIndex:E,toPage:A,toDest:V,hasFocus:ot,isBusy:lt}}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",Ge=40;function Bi(t,e,n){var o=yt(t),r=o.on,a=o.bind,i=o.emit,l=n.classes,p=n.i18n,g=e.Elements,u=e.Controller,F=g.arrows,S=g.track,f=F,d=g.prev,m=g.next,w,x,b={};function $(){W(),r(wt,j)}function j(){C(),$()}function W(){var z=n.arrows;z&&!(d&&m)&&h(),d&&m&&(Ie(b,{prev:d,next:m}),Re(f,z?"":"none"),Mt(f,x=Jn+"--"+n.direction),z&&(y(),T(),et([d,m],Be,S.id),i(Uo,d,m)))}function C(){o.destroy(),Ut(f,x),w?(ae(F?[d,m]:f),d=m=null):Nt([d,m],Zn)}function y(){r([ee,Ce,vt,se,an],T),a(m,"click",dt(L,">")),a(d,"click",dt(L,"<"))}function L(z){u.go(z,!0)}function h(){f=F||me("div",l.arrows),d=P(!0),m=P(!1),w=!0,He(f,[d,m]),!F&&Pn(f,S)}function P(z){var k='<button class="'+l.arrow+" "+(z?l.prev:l.next)+'" type="button"><svg xmlns="'+ji+'" viewBox="0 0 '+Ge+" "+Ge+'" width="'+Ge+'" height="'+Ge+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Wo(k)}function T(){if(d&&m){var z=t.index,k=u.getPrev(),U=u.getNext(),O=k>-1&&z<k?p.last:p.prev,v=U>-1&&z>U?p.first:p.next;d.disabled=k<0,m.disabled=U<0,et(d,At,O),et(m,At,v),i(qo,d,m,k,U)}}return{arrows:b,mount:$,destroy:C,update:T}}var Di=jn+"-interval";function Ui(t,e,n){var o=yt(t),r=o.on,a=o.bind,i=o.emit,l=un(n.interval,t.go.bind(t,">"),y),p=l.isPaused,g=e.Elements,u=e.Elements,F=u.root,S=u.toggle,f=n.autoplay,d,m,w=f==="pause";function x(){f&&(b(),S&&et(S,Be,g.track.id),w||$(),C())}function b(){n.pauseOnHover&&a(F,"mouseenter mouseleave",function(h){d=h.type==="mouseenter",W()}),n.pauseOnFocus&&a(F,"focusin focusout",function(h){m=h.type==="focusin",W()}),S&&a(S,"click",function(){w?$():j(!0)}),r([Yt,pn,vt],l.rewind),r(Yt,L)}function $(){p()&&e.Slides.isEnough()&&(l.start(!n.resetProgress),m=d=w=!1,C(),i(qn))}function j(h){h===void 0&&(h=!0),w=!!h,C(),p()||(l.pause(),i(Gn))}function W(){w||(d||m?j(!1):$())}function C(){S&&(Dt(S,le,!w),et(S,At,n.i18n[w?"play":"pause"]))}function y(h){var P=g.bar;P&&It(P,"width",h*100+"%"),i(Xo,h)}function L(h){var P=e.Slides.getAt(h);l.set(P&&+Rt(P.slide,Di)||n.interval)}return{mount:x,destroy:l.cancel,play:$,pause:j,isPaused:p}}function qi(t,e,n){var o=yt(t),r=o.on;function a(){n.cover&&(r(Yn,dt(l,!0)),r([ee,wt,vt],dt(i,!0)))}function i(p){e.Slides.forEach(function(g){var u=je(g.container||g.slide,"img");u&&u.src&&l(p,u,g)})}function l(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Re(g,p?"none":"")}return{mount:a,destroy:dt(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Zi=800;function Ji(t,e,n){var o=yt(t),r=o.on,a=o.emit,i=t.state.set,l=e.Move,p=l.getPosition,g=l.getLimit,u=l.exceededLimit,F=l.translate,S=t.is(xe),f,d,m=1;function w(){r(Yt,j),r([wt,vt],W)}function x(y,L,h,P,T){var z=p();if(j(),h&&(!S||!u())){var k=e.Layout.sliderSize(),U=En(y)*k*rn($t(y)/k)||0;y=l.toPosition(e.Controller.toDest(y%k))+U}var O=Vo(z,y,1);m=1,L=O?0:L||on($t(y-z)/Ki,Zi),d=P,f=un(L,b,dt($,z,y,T),1),i(Me),a(pn),f.start()}function b(){i(ve),d&&d(),a(se)}function $(y,L,h,P){var T=p(),z=y+(L-y)*C(P),k=(z-T)*m;F(T+k),S&&!h&&u()&&(m*=Xi,$t(k)<Gi&&x(g(u(!0)),Yi,!1,d,!0))}function j(){f&&f.cancel()}function W(){f&&!f.isPaused()&&(j(),b())}function C(y){var L=n.easingFunc;return L?L(y):1-Math.pow(1-y,4)}return{mount:w,destroy:j,scroll:x,cancel:W}}var de={passive:!1,capture:!0};function Qi(t,e,n){var o=yt(t),r=o.on,a=o.emit,i=o.bind,l=o.unbind,p=t.state,g=e.Move,u=e.Scroll,F=e.Controller,S=e.Elements.track,f=e.Media.reduce,d=e.Direction,m=d.resolve,w=d.orient,x=g.getPosition,b=g.exceededLimit,$,j,W,C,y,L=!1,h,P,T;function z(){i(S,wn,An,de),i(S,$n,An,de),i(S,pr,U,de),i(S,"click",I,{capture:!0}),i(S,"dragstart",Bt),r([ee,wt],k)}function k(){var q=n.drag;zt(!q),C=q==="free"}function U(q){if(h=!1,!P){var c=gt(q);st(q.target)&&(c||!q.button)&&(F.isBusy()?Bt(q,!0):(T=c?S:window,y=p.is([Se,Me]),W=null,i(T,wn,O,de),i(T,$n,v,de),g.cancel(),u.cancel(),R(q)))}}function O(q){if(p.is(Je)||(p.set(Je),a(Oo)),q.cancelable)if(y){g.translate($+ft(ot(q)));var c=lt(q)>ho,N=L!==(L=b());(c||N)&&R(q),h=!0,a(Bo),Bt(q)}else V(q)&&(y=A(q),Bt(q))}function v(q){p.is(Je)&&(p.set(ve),a(Do)),y&&(E(q),Bt(q)),l(T,wn,O),l(T,$n,v),y=!1}function I(q){!P&&h&&Bt(q,!0)}function R(q){W=j,j=q,$=x()}function E(q){var c=X(q),N=rt(c),B=n.rewind&&n.rewindByDrag;f(!1),C?F.scroll(N,0,n.snap):t.is(De)?F.go(w(En(c))<0?B?"<":"-":B?">":"+"):t.is(xe)&&L&&B?F.go(b(!0)?">":"<"):F.go(F.toDest(N),!0),f(!0)}function A(q){var c=n.dragMinThreshold,N=Ee(c),B=N&&c.mouse||0,Y=(N?c.touch:+c)||10;return $t(ot(q))>(gt(q)?Y:B)}function V(q){return $t(ot(q))>$t(ot(q,!0))}function X(q){if(t.is(we)||!L){var c=lt(q);if(c&&c<ho)return ot(q)/c}return 0}function rt(q){return x()+En(q)*Qt($t(q)*(n.flickPower||600),C?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function ot(q,c){return Q(q,c)-Q(M(q),c)}function lt(q){return Ln(q)-Ln(M(q))}function M(q){return j===q&&W||j}function Q(q,c){return(gt(q)?q.changedTouches[0]:q)["page"+m(c?"Y":"X")]}function ft(q){return q/(L&&t.is(xe)?Ii:1)}function st(q){var c=n.noDrag;return!Fe(q,"."+ir+", ."+hn)&&(!c||!Fe(q,c))}function gt(q){return typeof TouchEvent<"u"&&q instanceof TouchEvent}function bt(){return y}function zt(q){P=q}return{mount:z,disable:zt,isDragging:bt}}var ta={Spacebar:" ",Right:mn,Left:gn,Up:Jo,Down:Qo};function Qn(t){return t=Jt(t)?t:t.key,ta[t]||t}var vo="keydown";function ea(t,e,n){var o=yt(t),r=o.on,a=o.bind,i=o.unbind,l=t.root,p=e.Direction.resolve,g,u;function F(){S(),r(wt,f),r(wt,S),r(Yt,m)}function S(){var x=n.keyboard;x&&(g=x==="global"?window:l,a(g,vo,w))}function f(){i(g,vo)}function d(x){u=x}function m(){var x=u;u=!0,Eo(function(){u=x})}function w(x){if(!u){var b=Qn(x);b===p(gn)?t.go("<"):b===p(mn)&&t.go(">")}}return{mount:F,destroy:f,disable:d}}var Le=jn+"-lazy",en=Le+"-srcset",na="["+Le+"], ["+en+"]";function oa(t,e,n){var o=yt(t),r=o.on,a=o.off,i=o.bind,l=o.emit,p=n.lazyLoad==="sequential",g=[Ce,se],u=[];function F(){n.lazyLoad&&(S(),r(vt,S))}function S(){Gt(u),f(),p?x():(a(g),r(g,d),d())}function f(){e.Slides.forEach(function(b){Hn(b.slide,na).forEach(function($){var j=Rt($,Le),W=Rt($,en);if(j!==$.src||W!==$.srcset){var C=n.classes.spinner,y=$.parentElement,L=je(y,"."+C)||me("span",C,y);u.push([$,b,L]),$.src||Re($,"none")}})})}function d(){u=u.filter(function(b){var $=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(t.index,$)?m(b):!0}),u.length||a(g)}function m(b){var $=b[0];Mt(b[1].slide,Rn),i($,"load error",dt(w,b)),et($,"src",Rt($,Le)),et($,"srcset",Rt($,en)),Nt($,Le),Nt($,en)}function w(b,$){var j=b[0],W=b[1];Ut(W.slide,Rn),$.type!=="error"&&(ae(b[2]),Re(j,""),l(Yn,j,W),l(be)),p&&x()}function x(){u.length&&m(u.shift())}return{mount:F,destroy:dt(Gt,u),check:d}}function ra(t,e,n){var o=yt(t),r=o.on,a=o.emit,i=o.bind,l=e.Slides,p=e.Elements,g=e.Controller,u=g.hasFocus,F=g.getIndex,S=g.go,f=e.Direction.resolve,d=p.pagination,m=[],w,x;function b(){$(),r([wt,vt,an],b);var P=n.pagination;d&&Re(d,P?"":"none"),P&&(r([Yt,pn,se],h),j(),h(),a(Go,{list:w,items:m},L(t.index)))}function $(){w&&(ae(d?te(w.children):w),Ut(w,x),Gt(m),w=null),o.destroy()}function j(){var P=t.length,T=n.classes,z=n.i18n,k=n.perPage,U=u()?g.getEnd()+1:We(P/k);w=d||me("ul",T.pagination,p.track.parentElement),Mt(w,x=vn+"--"+y()),et(w,qt,"tablist"),et(w,At,z.select),et(w,Kn,y()===fn?"vertical":"");for(var O=0;O<U;O++){var v=me("li",null,w),I=me("button",{class:T.page,type:"button"},v),R=l.getIn(O).map(function(A){return A.slide.id}),E=!u()&&k>1?z.pageX:z.slideX;i(I,"click",dt(W,O)),n.paginationKeyboard&&i(I,"keydown",dt(C,O)),et(v,qt,"presentation"),et(I,qt,"tab"),et(I,Be,R.join(" ")),et(I,At,Fn(E,O+1)),et(I,fe,-1),m.push({li:v,button:I,page:O})}}function W(P){S(">"+P,!0)}function C(P,T){var z=m.length,k=Qn(T),U=y(),O=-1;k===f(mn,!1,U)?O=++P%z:k===f(gn,!1,U)?O=(--P+z)%z:k==="Home"?O=0:k==="End"&&(O=z-1);var v=m[O];v&&(Ro(v.button),S(">"+O),Bt(T,!0))}function y(){return n.paginationDirection||n.direction}function L(P){return m[g.toPage(P)]}function h(){var P=L(F(!0)),T=L(F());if(P){var z=P.button;Ut(z,le),Nt(z,uo),et(z,fe,-1)}if(T){var k=T.button;Mt(k,le),et(k,uo,!0),et(k,fe,"")}a(Yo,{list:w,items:m},P,T)}return{items:m,mount:b,destroy:$,getAt:L,update:h}}var ia=[" ","Enter"];function aa(t,e,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){t.splides.forEach(function(d){d.isParent||(g(t,d.splide),g(d.splide,t))}),o&&u()}function l(){a.forEach(function(d){d.destroy()}),Gt(a)}function p(){l(),i()}function g(d,m){var w=yt(d);w.on(Yt,function(x,b,$){m.go(m.is(we)?$:x)}),a.push(w)}function u(){var d=yt(t),m=d.on;m(Bn,S),m(Ko,f),m([ee,wt],F),a.push(d),d.emit(Un,t.splides)}function F(){et(e.Elements.list,Kn,n.direction===fn?"vertical":"")}function S(d){t.go(d.index)}function f(d,m){Nn(ia,Qn(m))&&(S(d),Bt(m))}return{setup:dt(e.Media.set,{slideFocus:Ne(r)?o:r},!0),mount:i,destroy:l,remount:p}}function la(t,e,n){var o=yt(t),r=o.bind,a=0;function i(){n.wheel&&r(e.Elements.track,"wheel",l,de)}function l(g){if(g.cancelable){var u=g.deltaY,F=u<0,S=Ln(g),f=n.wheelMinThreshold||0,d=n.wheelSleep||0;$t(u)>f&&S-a>d&&(t.go(F?"<":">"),a=S),p(F)&&Bt(g)}}function p(g){return!n.releaseWheel||t.state.is(Se)||e.Controller.getAdjacent(g)!==-1}return{mount:i}}var sa=90;function ca(t,e,n){var o=yt(t),r=o.on,a=e.Elements.track,i=n.live&&!n.isNavigation,l=me("span",Ai),p=un(sa,dt(u,!1));function g(){i&&(S(!e.Autoplay.isPaused()),et(a,fo,!0),l.textContent="…",r(qn,dt(S,!0)),r(Gn,dt(S,!1)),r([Ce,se],dt(u,!0)))}function u(f){et(a,mo,f),f?(He(a,l),p.start()):(ae(l),p.cancel())}function F(){Nt(a,[go,fo,mo]),ae(l)}function S(f){i&&et(a,go,f?"off":"polite")}return{mount:g,disable:S,destroy:F}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:zi,Layout:Vi,Clones:Ni,Move:Pi,Controller:Hi,Arrows:Bi,Autoplay:Ui,Cover:qi,Scroll:Ji,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(){yt(t).on([ee,vt],a)}function a(){o.forEach(function(l){l.style("transform","translateX(-"+100*l.index+"%)")})}function i(l,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}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,l=dt(It,i,"transition"),p;function g(){yt(t).bind(i,"transitionend",function(f){f.target===i&&p&&(F(),p())})}function u(f,d){var m=o.toPosition(f,!0),w=o.getPosition(),x=S(f);$t(m-w)>=1&&x>=1?n.useScroll?a.scroll(m,x,!1,d):(l("transform "+x+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(f),d())}function F(){l(""),a.cancel()}function S(f){var d=n.rewindSpeed;if(t.is(xe)&&d){var m=r.getIndex(!0),w=r.getEnd();if(m===0&&f>=w||m>=w&&f===0)return d}return n.speed}return{mount:g,start:u,cancel:F}}var fa=(function(){function t(n,o){this.event=yt(),this.Components={},this.state=yi(ge),this.splides=[],this._o={},this._E={};var r=Jt(n)?zo(document,n):n;Ae(r,r+" is invalid."),this.root=r,o=Kt({label:Rt(r,At)||"",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,l=this.Components;Ae(i.is([ge,nn]),"Already mounted!"),i.set(ge),this._C=l,this._T=r||this._T||(this.is(De)?ga:ma),this._E=o||this._E;var p=Ie({},pa,this._E,{Transition:this._T});return ie(p,function(g,u){var F=g(a,l,a._o);l[u]=F,F.setup&&F.setup()}),ie(l,function(g){g.mount&&g.mount()}),this.emit(ee),Mt(this.root,Li),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(vt),this},e.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ge)?yt(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&&Gt(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"],[vt,"onRefresh"],[wt,"onUpdated"],[be,"onResize"],[cn,"onResized"],[Oo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[pn,"onScroll"],[se,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[Gn,"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 zn(t,e){const n=t;return ha(e,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=zn(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=zn({},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=zn({},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 a=require("react/jsx-runtime"),k=require("react"),pe=require("classnames"),w=require("./useScopedStyles-DpVdqfXj.js"),xr=require("react-dom");function Sr(e){return e.type==="object"&&e.version===1}const Cr="ControlSlider-module__wrapper___sHEkd",wr="ControlSlider-module__hoverArrow___A-dOH",Tr="ControlSlider-module__sliderItem___QQSkR",_r="ControlSlider-module__sliderImage___9hRl-",$r="ControlSlider-module__arrow___05ghY",Ar="ControlSlider-module__arrowVertical___tBfVN",Ir="ControlSlider-module__nextArrow___-30Yc",Lr="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Fr="ControlSlider-module__arrowImg___2dwJW",kr="ControlSlider-module__mirror___brd6U",Rr="ControlSlider-module__pagination___bicLF",Wr="ControlSlider-module__paginationInner___bT-P-",Mr="ControlSlider-module__paginationVertical___zYqKw",zr="ControlSlider-module__paginationItem___nTRbk",Hr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",Vr="ControlSlider-module__paginationInsideBottom___R3FWn",Pr="ControlSlider-module__paginationInsideTop___V-qb-",jr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",Br="ControlSlider-module__paginationInsideLeft___yOBRZ",Dr="ControlSlider-module__paginationInsideRight___Rtt3o",Ur="ControlSlider-module__paginationOutsideLeft___lahaw",qr="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",Yr="ControlSlider-module__captionBlock___dJ6-j",Xr="ControlSlider-module__captionTextWrapper___HFlpf",Kr="ControlSlider-module__captionText___uGBVc",Zr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Qr="ControlSlider-module__topLeftAlignment___zjnGM",ei="ControlSlider-module__topCenterAlignment___gD1xW",ti="ControlSlider-module__topRightAlignment___NMapS",ni="ControlSlider-module__middleLeftAlignment___OnUrY",oi="ControlSlider-module__middleCenterAlignment___Tdkl0",ri="ControlSlider-module__middleRightAlignment___wEbfX",ii="ControlSlider-module__bottomLeftAlignment___cTP2-",ai="ControlSlider-module__bottomCenterAlignment___c54fB",li="ControlSlider-module__bottomRightAlignment___kEwrz",si="ControlSlider-module__clickOverlay___DZA28",ci="ControlSlider-module__contain___pLyq7",pi="ControlSlider-module__cover___KdDat",J={wrapper:Cr,hoverArrow:wr,sliderItem:Tr,sliderImage:_r,arrow:$r,arrowVertical:Ar,nextArrow:Ir,arrowInner:Lr,arrowIcon:Er,arrowImg:Fr,mirror:kr,pagination:Rr,paginationInner:Wr,paginationVertical:Mr,paginationItem:zr,dot:Hr,activeDot:Nr,paginationInsideBottom:Vr,paginationInsideTop:Pr,paginationOutsideBottom:jr,paginationOutsideTop:Or,paginationInsideLeft:Br,paginationInsideRight:Dr,paginationOutsideLeft:Ur,paginationOutsideRight:qr,imgWrapper:Gr,captionBlock:Yr,captionTextWrapper:Xr,captionText:Kr,active:Zr,withPointerEvents:Jr,topLeftAlignment:Qr,topCenterAlignment:ei,topRightAlignment:ti,middleLeftAlignment:ni,middleCenterAlignment:oi,middleRightAlignment:ri,bottomLeftAlignment:ii,bottomCenterAlignment:ai,bottomRightAlignment:li,clickOverlay:si,contain:ci,cover:pi};function ui(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 di(e,t,n){return t&&ui(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",mt=1,gi=2,vt=3,St=4,Ht=5,Jt=6,nn=7,mi={CREATED:mt,MOUNTED:gi,IDLE:vt,MOVING:St,SCROLLING:Ht,DRAGGING:Jt,DESTROYED:nn};function Ge(e){e.length=0}function tt(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(tt(arguments,1)))}var Eo=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function sn(e,t){return typeof t===e}function Lt(e){return!Hn(e)&&sn("object",e)}var zn=Array.isArray,Fo=ve(sn,"function"),Qe=ve(sn,"string"),Nt=ve(sn,"undefined");function Hn(e){return e===null}function ko(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vt(e){return zn(e)?e:[e]}function Ee(e,t){Vt(e).forEach(t)}function Nn(e,t){return e.indexOf(t)>-1}function Qt(e,t){return e.push.apply(e,Vt(t)),e}function De(e,t,n){e&&Ee(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function He(e,t){De(e,Qe(t)?t.split(" "):t,!0)}function Pt(e,t){Ee(t,e.appendChild.bind(e))}function Vn(e,t){Ee(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Et(e,t){return ko(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?tt(e.children):[];return t?n.filter(function(o){return Et(o,t)}):n}function jt(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var Ft=Object.keys;function at(e,t,n){return e&&(n?Ft(e).reverse():Ft(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function kt(e){return tt(arguments,1).forEach(function(t){at(t,function(n,o){e[o]=t[o]})}),e}function Ke(e){return tt(arguments,1).forEach(function(t){at(t,function(n,o){zn(n)?e[o]=n.slice():Lt(n)?e[o]=Ke({},Lt(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Ee(t||Ft(e),function(n){delete e[n]})}function Ne(e,t){Ee(e,function(n){Ee(t,function(o){n&&n.removeAttribute(o)})})}function re(e,t,n){Lt(t)?at(t,function(o,r){re(e,r,o)}):Ee(e,function(o){Hn(n)||n===""?Ne(o,t):o.setAttribute(t,String(n))})}function ft(e,t,n){var o=document.createElement(e);return t&&(Qe(t)?He(o,t):re(o,t)),n&&Pt(n,o),o}function ke(e,t,n){if(Nt(n))return getComputedStyle(e)[t];Hn(n)||(e.style[t]=""+n)}function Rt(e,t){ke(e,"display",t)}function Wo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Re(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Ie(e){return e.getBoundingClientRect()}function lt(e){Ee(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Be(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function zo(e,t){return e&&e.querySelector(t)}function Pn(e,t){return t?tt(e.querySelectorAll(t)):[]}function Ue(e,t){De(e,t,!1)}function In(e){return e.timeStamp}function it(e){return Qe(e)?e:e?e+"px":""}var Ot="splide",jn="data-"+Ot;function At(e,t){if(!e)throw new Error("["+Ot+"] "+(t||""))}var et=Math.min,on=Math.max,rn=Math.floor,Wt=Math.ceil,Ae=Math.abs;function Ho(e,t,n){return Ae(e-t)<n}function en(e,t,n,o){var r=et(t,n),s=on(t,n);return o?r<e&&e<s:r<=e&&e<=s}function dt(e,t,n){var o=et(t,n),r=on(t,n);return et(on(o,e),r)}function Ln(e){return+(e>0)-+(e<0)}function En(e,t){return Ee(t,function(n){e=e.replace("%s",""+n)}),e}function On(e){return e<10?"0"+e:""+e}var co={};function fi(e){return""+e+On(co[e]=(co[e]||0)+1)}function No(){var e=[];function t(i,c,p,g){r(i,c,function(u,L,v){var f="addEventListener"in u,d=f?u.removeEventListener.bind(u,L,p,g):u.removeListener.bind(u,p);f?u.addEventListener(L,p,g):u.addListener(p),e.push([u,L,v,p,d])})}function n(i,c,p){r(i,c,function(g,u,L){e=e.filter(function(v){return v[0]===g&&v[1]===u&&v[2]===L&&(!p||v[3]===p)?(v[4](),!1):!0})})}function o(i,c,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(c,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(c,u,!1,p)),i.dispatchEvent(g),g}function r(i,c,p){Ee(i,function(g){g&&Ee(c,function(u){u.split(" ").forEach(function(L){var v=L.split(".");p(g,v[0],v[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ge(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var nt="mounted",Fn="ready",Ye="move",Ct="moved",Bn="click",Vo="active",Po="inactive",jo="visible",Oo="hidden",Se="refresh",$e="updated",bt="resize",cn="resized",Bo="drag",Do="dragging",Uo="dragged",pn="scroll",ct="scrolled",yi="overflow",Dn="destroy",qo="arrows:mounted",Go="arrows:updated",Yo="pagination:mounted",Xo="pagination:updated",Un="navigation:mounted",qn="autoplay:play",Ko="autoplay:playing",Gn="autoplay:pause",Yn="lazyload:loaded",Zo="sk",Jo="sh",an="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function o(s,i){n.bind(t,Vt(s).join(" "),function(c){i.apply(i,zn(c.detail)?c.detail:[])})}function r(s){n.dispatch(t,s,tt(arguments,1))}return e&&e.event.on(Dn,n.destroy),kt(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function un(e,t,n,o){var r=Date.now,s,i=0,c,p=!0,g=0;function u(){if(!p){if(i=e?et((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++g>=o))return v();c=ao(u)}}function L(b){b||d(),s=r()-(b?i*e:0),p=!1,c=ao(u)}function v(){p=!0}function f(){s=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function m(b){e=b}function _(){return p}return{start:L,rewind:f,pause:v,cancel:d,set:m,isPaused:_}}function hi(e){var t=e;function n(r){t=r}function o(r){return Nn(Vt(r),t)}return{set:n,is:o}}function vi(e,t){var n=un(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=No(),c=[];function p(){var d=n.mediaQuery==="min";Ft(r).sort(function(m,_){return d?+m-+_:+_-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(s,io),L()}function g(d){d&&i.destroy()}function u(d,m){var _=matchMedia(m);i.bind(_,"change",L),c.push([d,_])}function L(){var d=o.is(nn),m=n.direction,_=c.reduce(function(b,h){return Ke(b,h[1].matches?h[0]:{})},{});lo(n),f(_),n.destroy?e.destroy(n.destroy==="completely"):d?(g(!0),e.mount()):m!==n.direction&&e.refresh()}function v(d){matchMedia(io).matches&&(d?Ke(n,s):lo(n,Ft(s)))}function f(d,m,_){Ke(n,d),m&&Ke(Object.getPrototypeOf(n),d),(_||!o.is(mt))&&e.emit($e,n)}return{setup:p,destroy:g,reduce:v,set:f}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Qo=dn+"Up",er=dn+"Down",po="rtl",fn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qo,mn],ArrowRight:[er,gn]};function xi(e,t,n){function o(s,i,c){c=c||n.direction;var p=c===po&&!i?1:c===fn?0:-1;return Sn[s]&&Sn[s][p]||s.replace(/width|left|right/i,function(g,u){var L=Sn[g.toLowerCase()][p]||g;return u>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function r(s){return s*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var qe="role",yt="tabindex",Si="disabled",We="aria-",Bt=We+"controls",tr=We+"current",uo=We+"selected",Le=We+"label",Xn=We+"labelledby",nr=We+"hidden",Kn=We+"orientation",Mt=We+"roledescription",go=We+"live",mo=We+"busy",fo=We+"atomic",Zn=[qe,yt,Si,Bt,tr,Le,Xn,nr,Kn,Mt],Ve=Ot+"__",ot="is-",Cn=Ot,yo=Ve+"track",Ci=Ve+"list",yn=Ve+"slide",or=yn+"--clone",wi=yn+"__container",Jn=Ve+"arrows",hn=Ve+"arrow",rr=hn+"--prev",ir=hn+"--next",vn=Ve+"pagination",ar=vn+"__page",Ti=Ve+"progress",_i=Ti+"__bar",$i=Ve+"toggle",Ai=Ve+"spinner",Ii=Ve+"sr",Li=ot+"initialized",st=ot+"active",lr=ot+"prev",sr=ot+"next",kn=ot+"visible",Rn=ot+"loading",cr=ot+"focus-in",pr=ot+"overflow",Ei=[st,kn,lr,sr,Rn,cr,pr],Fi={slide:yn,clone:or,arrows:Jn,arrow:hn,prev:rr,next:ir,pagination:vn,page:ar,spinner:Ai};function ki(e,t){if(Fo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Et(n,t);)n=n.parentElement;return n}var Ri=5,ho=200,ur="touchstart mousedown",wn="touchmove mousemove",Tn="touchend touchcancel mouseup click";function Wi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,c=n.i18n,p={},g=[],u=[],L=[],v,f,d;function m(){E(),Y(),h()}function _(){r(Se,b),r(Se,m),r($e,h),s(document,ur+" keydown",function(x){d=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){De(i,cr,!!d)})}function b(x){var R=Zn.concat("style");Ge(g),Ue(i,u),Ue(v,L),Ne([v,f],R),Ne(i,x?R:["style",Mt])}function h(){Ue(i,u),Ue(v,L),u=C(Cn),L=C(yo),He(i,u),He(v,L),re(i,Le,n.label),re(i,Xn,n.labelledby)}function E(){v=j("."+yo),f=jt(v,"."+Ci),At(v&&f,"A track/list element is missing."),Qt(g,Ro(f,"."+yn+":not(."+or+")")),at({arrows:Jn,pagination:vn,prev:rr,next:ir,bar:_i,toggle:$i},function(x,R){p[R]=j("."+x)}),kt(p,{root:i,track:v,list:f,slides:g})}function Y(){var x=i.id||fi(Ot),R=n.role;i.id=x,v.id=v.id||x+"-track",f.id=f.id||x+"-list",!Re(i,qe)&&i.tagName!=="SECTION"&&R&&re(i,qe,R),re(i,Mt,c.carousel),re(f,qe,"presentation")}function j(x){var R=zo(i,x);return R&&ki(R,"."+Cn)===i?R:void 0}function C(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Cn&&st]}return kt(p,{setup:m,mount:_,destroy:b})}var xt="slide",wt="loop",Dt="fade";function Mi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,c=r.bind,p=e.Components,g=e.root,u=e.options,L=u.isNavigation,v=u.updateOnMove,f=u.i18n,d=u.pagination,m=u.slideFocus,_=p.Direction.resolve,b=Re(o,"style"),h=Re(o,Le),E=n>-1,Y=jt(o,"."+wi),j;function C(){E||(o.id=g.id+"-slide"+On(t+1),re(o,qe,d?"tabpanel":"group"),re(o,Mt,f.slide),re(o,Le,h||En(f.slideLabel,[t+1,e.length]))),x()}function x(){c(o,"click",ve(i,Bn,F)),c(o,"keydown",ve(i,Zo,F)),s([Ct,Jo,ct],W),s(Un,T),v&&s(Ye,O)}function R(){j=!0,r.destroy(),Ue(o,Ei),Ne(o,Zn),re(o,"style",b),re(o,Le,h||"")}function T(){var I=e.splides.map(function(S){var $=S.splide.Components.Slides.getAt(t);return $?$.slide.id:""}).join(" ");re(o,Le,En(f.slideX,(E?n:t)+1)),re(o,Bt,I),re(o,qe,m?"button":""),m&&Ne(o,Mt)}function O(){j||W()}function W(){if(!j){var I=e.index;H(),N(),De(o,lr,t===I-1),De(o,sr,t===I+1)}}function H(){var I=D();I!==so(o,st)&&(De(o,st,I),re(o,tr,L&&I||""),i(I?Vo:Po,F))}function N(){var I=y(),S=!I&&(!D()||E);if(e.state.is([St,Ht])||re(o,nr,S||""),re(Pn(o,u.focusableNodes||""),yt,S?-1:""),m&&re(o,yt,S?-1:0),I!==so(o,kn)&&(De(o,kn,I),i(I?jo:Oo,F)),!I&&document.activeElement===o){var $=p.Slides.getAt(e.index);$&&Wo($.slide)}}function X(I,S,$){ke($&&Y||o,I,S)}function D(){var I=e.index;return I===t||u.cloneStatus&&I===n}function y(){if(e.is(Dt))return D();var I=Ie(p.Elements.track),S=Ie(o),$=_("left",!0),Z=_("right",!0);return rn(I[$])<=Wt(S[$])&&rn(S[Z])<=Wt(I[Z])}function M(I,S){var $=Ae(I-t);return!E&&(u.rewind||e.is(wt))&&($=et($,e.length-$)),$<=S}var F={index:t,slideIndex:n,slide:o,container:Y,isClone:E,mount:C,destroy:R,update:W,style:X,isWithin:M};return F}function zi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,c=t.Elements,p=c.slides,g=c.list,u=[];function L(){v(),r(Se,f),r(Se,v)}function v(){p.forEach(function(W,H){m(W,H,-1)})}function f(){j(function(W){W.destroy()}),Ge(u)}function d(){j(function(W){W.update()})}function m(W,H,N){var X=Mi(e,H,N,W);X.mount(),u.push(X),u.sort(function(D,y){return D.index-y.index})}function _(W){return W?C(function(H){return!H.isClone}):u}function b(W){var H=t.Controller,N=H.toIndex(W),X=H.hasFocus()?1:n.perPage;return C(function(D){return en(D.index,N,N+X-1)})}function h(W){return C(W)[0]}function E(W,H){Ee(W,function(N){if(Qe(N)&&(N=Mo(N)),ko(N)){var X=p[H];X?Vn(N,X):Pt(g,N),He(N,n.classes.slide),R(N,ve(s,bt))}}),s(Se)}function Y(W){lt(C(W).map(function(H){return H.slide})),s(Se)}function j(W,H){_(H).forEach(W)}function C(W){return u.filter(Fo(W)?W:function(H){return Qe(W)?Et(H.slide,W):Nn(Vt(W),H.index)})}function x(W,H,N){j(function(X){X.style(W,H,N)})}function R(W,H){var N=Pn(W,"img"),X=N.length;X?N.forEach(function(D){i(D,"load error",function(){--X||H()})}):H()}function T(W){return W?p.length:u.length}function O(){return u.length>n.perPage}return{mount:L,destroy:f,update:d,register:m,get:_,getIn:b,getAt:h,add:E,remove:Y,forEach:j,filter:C,style:x,getLength:T,isEnough:O}}function Hi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,g=t.Elements,u=g.root,L=g.track,v=g.list,f=c.getAt,d=c.style,m,_,b;function h(){E(),s(window,"resize load",vi(ve(i,bt))),r([$e,Se],E),r(bt,Y)}function E(){m=n.direction===fn,ke(u,"maxWidth",it(n.width)),ke(L,p("paddingLeft"),j(!1)),ke(L,p("paddingRight"),j(!0)),Y(!0)}function Y(F){var I=Ie(u);(F||_.width!==I.width||_.height!==I.height)&&(ke(L,"height",C()),d(p("marginRight"),it(n.gap)),d("width",R()),d("height",T(),!0),_=I,i(cn),b!==(b=M())&&(De(u,pr,b),i(yi,b)))}function j(F){var I=n.padding,S=p(F?"right":"left");return I&&it(I[S]||(Lt(I)?0:I))||"0px"}function C(){var F="";return m&&(F=x(),At(F,"height or heightRatio is missing."),F="calc("+F+" - "+j(!1)+" - "+j(!0)+")"),F}function x(){return it(n.height||Ie(v).width*n.heightRatio)}function R(){return n.autoWidth?null:it(n.fixedWidth)||(m?"":O())}function T(){return it(n.fixedHeight)||(m?n.autoHeight?null:O():x())}function O(){var F=it(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function W(){return Ie(v)[p("width")]}function H(F,I){var S=f(F||0);return S?Ie(S.slide)[p("width")]+(I?0:D()):0}function N(F,I){var S=f(F);if(S){var $=Ie(S.slide)[p("right")],Z=Ie(v)[p("left")];return Ae($-Z)+(I?0:D())}return 0}function X(F){return N(e.length-1)-N(0)+H(0,F)}function D(){var F=f(0);return F&&parseFloat(ke(F.slide,p("marginRight")))||0}function y(F){return parseFloat(ke(L,p("padding"+(F?"Right":"Left"))))||0}function M(){return e.is(Dt)||X(!0)>W()}return{mount:h,resize:Y,listSize:W,slideSize:H,sliderSize:X,totalSize:N,getPadding:y,isOverflow:M}}var Ni=2;function Vi(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],g;function u(){r(Se,L),r([$e,bt],f),(g=_())&&(d(g),t.Layout.resize(!0))}function L(){v(),u()}function v(){lt(p),Ge(p),o.destroy()}function f(){var b=_();g!==b&&(g<b||!b)&&o.emit(Se)}function d(b){var h=i.get().slice(),E=h.length;if(E){for(;h.length<b;)Qt(h,h);Qt(h.slice(-b),h.slice(0,b)).forEach(function(Y,j){var C=j<b,x=m(Y.slide,j);C?Vn(x,h[0].slide):Pt(s.list,x),Qt(p,x),i.register(x,j-b+(C?0:E),Y.index)})}}function m(b,h){var E=b.cloneNode(!0);return He(E,n.classes.clone),E.id=e.root.id+"-clone"+On(h+1),E}function _(){var b=n.clones;if(!e.is(wt))b=0;else if(Nt(b)){var h=n[c("fixedWidth")]&&t.Layout.slideSize(0),E=h&&Wt(Ie(s.track)[c("width")]/h);b=E||n[c("autoWidth")]&&e.length||n.perPage*Ni}return b}return{mount:u,destroy:v}}function Pi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,g=c.getPadding,u=c.totalSize,L=c.listSize,v=c.sliderSize,f=t.Direction,d=f.resolve,m=f.orient,_=t.Elements,b=_.list,h=_.track,E;function Y(){E=t.Transition,r([nt,cn,$e,Se],j)}function j(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function C(S,$,Z,ie){S!==$&&F(S>Z)&&(W(),R(O(X(),S>Z),!0)),i(St),s(Ye,$,Z,S),E.start($,function(){i(vt),s(Ct,$,Z,S),ie&&ie()})}function x(S){R(N(S,!0))}function R(S,$){if(!e.is(Dt)){var Z=$?S:T(S);ke(b,"transform","translate"+d("X")+"("+Z+"px)"),S!==Z&&s(Jo)}}function T(S){if(e.is(wt)){var $=H(S),Z=$>t.Controller.getEnd(),ie=$<0;(ie||Z)&&(S=O(S,Z))}return S}function O(S,$){var Z=S-M($),ie=v();return S-=m(ie*(Wt(Ae(Z)/ie)||1))*($?1:-1),S}function W(){R(X(),!0),E.cancel()}function H(S){for(var $=t.Slides.get(),Z=0,ie=1/0,ne=0;ne<$.length;ne++){var se=$[ne].index,z=Ae(N(se,!0)-S);if(z<=ie)ie=z,Z=se;else break}return Z}function N(S,$){var Z=m(u(S-1)-y(S));return $?D(Z):Z}function X(){var S=d("left");return Ie(b)[S]-Ie(h)[S]+m(g(!1))}function D(S){return n.trimSpace&&e.is(xt)&&(S=dt(S,0,m(v(!0)-L()))),S}function y(S){var $=n.focus;return $==="center"?(L()-p(S,!0))/2:+$*p(S)||0}function M(S){return N(S?t.Controller.getEnd():0,!!n.trimSpace)}function F(S){var $=m(O(X(),S));return S?$>=0:$<=b[d("scrollWidth")]-Ie(h)[d("width")]}function I(S,$){$=Nt($)?X():$;var Z=S!==!0&&m($)<m(M(!1)),ie=S!==!1&&m($)>m(M(!0));return Z||ie}return{mount:Y,move:C,jump:x,translate:R,shift:O,cancel:W,toIndex:H,toPosition:N,getPosition:X,getLimit:M,exceededLimit:I,reposition:j}}function ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,g=i.toPosition,u=t.Slides,L=u.isEnough,v=u.getLength,f=n.omitEnd,d=e.is(wt),m=e.is(xt),_=ve(X,!1),b=ve(X,!0),h=n.start||0,E,Y=h,j,C,x;function R(){T(),r([$e,Se,an],T),r(cn,O)}function T(){j=v(!0),C=n.perMove,x=n.perPage,E=F();var z=dt(h,0,f?E:j-1);z!==h&&(h=z,i.reposition())}function O(){E!==F()&&s(an)}function W(z,ee,me){if(!se()){var ae=N(z),ue=M(ae);ue>-1&&(ee||ue!==h)&&(Z(ue),i.move(ae,ue,Y,me))}}function H(z,ee,me,ae){t.Scroll.scroll(z,ee,me,function(){var ue=M(i.toIndex(c()));Z(f?et(ue,E):ue),ae&&ae()})}function N(z){var ee=h;if(Qe(z)){var me=z.match(/([+\-<>])(\d+)?/)||[],ae=me[1],ue=me[2];ae==="+"||ae==="-"?ee=D(h+ +(""+ae+(+ue||1)),h):ae===">"?ee=ue?I(+ue):_(!0):ae==="<"&&(ee=b(!0))}else ee=d?z:dt(z,0,E);return ee}function X(z,ee){var me=C||(ne()?1:x),ae=D(h+me*(z?-1:1),h,!(C||ne()));return ae===-1&&m&&!Ho(c(),p(!z),1)?z?0:E:ee?ae:M(ae)}function D(z,ee,me){if(L()||ne()){var ae=y(z);ae!==z&&(ee=z,z=ae,me=!1),z<0||z>E?!C&&(en(0,z,ee,!0)||en(E,ee,z,!0))?z=I(S(z)):d?z=me?z<0?-(j%x||x):j:z:n.rewind?z=z<0?E:0:z=-1:me&&z!==ee&&(z=I(S(ee)+(z<ee?-1:1)))}else z=-1;return z}function y(z){if(m&&n.trimSpace==="move"&&z!==h)for(var ee=c();ee===g(z,!0)&&en(z,0,e.length-1,!n.rewind);)z<h?--z:++z;return z}function M(z){return d?(z+j)%j||0:z}function F(){for(var z=j-(ne()||d&&C?1:x);f&&z-- >0;)if(g(j-1,!0)!==g(z,!0)){z++;break}return dt(z,0,j-1)}function I(z){return dt(ne()?z:x*z,0,E)}function S(z){return ne()?et(z,E):rn((z>=E?j-1:z)/x)}function $(z){var ee=i.toIndex(z);return m?dt(ee,0,E):ee}function Z(z){z!==h&&(Y=h,h=z)}function ie(z){return z?Y:h}function ne(){return!Nt(n.focus)||n.isNavigation}function se(){return e.state.is([St,Ht])&&!!n.waitForTransition}return{mount:R,go:W,scroll:H,getNext:_,getPrev:b,getAdjacent:X,getEnd:F,setIndex:Z,getIndex:ie,toIndex:I,toPage:S,toDest:$,hasFocus:ne,isBusy:se}}var Oi="http://www.w3.org/2000/svg",Bi="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",Gt=40;function Di(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,c=n.classes,p=n.i18n,g=t.Elements,u=t.Controller,L=g.arrows,v=g.track,f=L,d=g.prev,m=g.next,_,b,h={};function E(){j(),r($e,Y)}function Y(){C(),E()}function j(){var H=n.arrows;H&&!(d&&m)&&T(),d&&m&&(kt(h,{prev:d,next:m}),Rt(f,H?"":"none"),He(f,b=Jn+"--"+n.direction),H&&(x(),W(),re([d,m],Bt,v.id),i(qo,d,m)))}function C(){o.destroy(),Ue(f,b),_?(lt(L?[d,m]:f),d=m=null):Ne([d,m],Zn)}function x(){r([nt,Ct,Se,ct,an],W),s(m,"click",ve(R,">")),s(d,"click",ve(R,"<"))}function R(H){u.go(H,!0)}function T(){f=L||ft("div",c.arrows),d=O(!0),m=O(!1),_=!0,Pt(f,[d,m]),!L&&Vn(f,v)}function O(H){var N='<button class="'+c.arrow+" "+(H?c.prev:c.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+Gt+" "+Gt+'" width="'+Gt+'" height="'+Gt+'" focusable="false"><path d="'+(n.arrowPath||Bi)+'" />';return Mo(N)}function W(){if(d&&m){var H=e.index,N=u.getPrev(),X=u.getNext(),D=N>-1&&H<N?p.last:p.prev,y=X>-1&&H>X?p.first:p.next;d.disabled=N<0,m.disabled=X<0,re(d,Le,D),re(m,Le,y),i(Go,d,m,N,X)}}return{arrows:h,mount:E,destroy:C,update:W}}var Ui=jn+"-interval";function qi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,c=un(n.interval,e.go.bind(e,">"),x),p=c.isPaused,g=t.Elements,u=t.Elements,L=u.root,v=u.toggle,f=n.autoplay,d,m,_=f==="pause";function b(){f&&(h(),v&&re(v,Bt,g.track.id),_||E(),C())}function h(){n.pauseOnHover&&s(L,"mouseenter mouseleave",function(T){d=T.type==="mouseenter",j()}),n.pauseOnFocus&&s(L,"focusin focusout",function(T){m=T.type==="focusin",j()}),v&&s(v,"click",function(){_?E():Y(!0)}),r([Ye,pn,Se],c.rewind),r(Ye,R)}function E(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=d=_=!1,C(),i(qn))}function Y(T){T===void 0&&(T=!0),_=!!T,C(),p()||(c.pause(),i(Gn))}function j(){_||(d||m?Y(!1):E())}function C(){v&&(De(v,st,!_),re(v,Le,n.i18n[_?"play":"pause"]))}function x(T){var O=g.bar;O&&ke(O,"width",T*100+"%"),i(Ko,T)}function R(T){var O=t.Slides.getAt(T);c.set(O&&+Re(O.slide,Ui)||n.interval)}return{mount:b,destroy:c.cancel,play:E,pause:Y,isPaused:p}}function Gi(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Yn,ve(c,!0)),r([nt,$e,Se],ve(i,!0)))}function i(p){t.Slides.forEach(function(g){var u=jt(g.container||g.slide,"img");u&&u.src&&c(p,u,g)})}function c(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Rt(g,p?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Yi=10,Xi=600,Ki=.6,Zi=1.5,Ji=800;function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,g=c.getLimit,u=c.exceededLimit,L=c.translate,v=e.is(xt),f,d,m=1;function _(){r(Ye,Y),r([$e,Se],j)}function b(x,R,T,O,W){var H=p();if(Y(),T&&(!v||!u())){var N=t.Layout.sliderSize(),X=Ln(x)*N*rn(Ae(x)/N)||0;x=c.toPosition(t.Controller.toDest(x%N))+X}var D=Ho(H,x,1);m=1,R=D?0:R||on(Ae(x-H)/Zi,Ji),d=O,f=un(R,h,ve(E,H,x,W),1),i(Ht),s(pn),f.start()}function h(){i(vt),d&&d(),s(ct)}function E(x,R,T,O){var W=p(),H=x+(R-x)*C(O),N=(H-W)*m;L(W+N),v&&!T&&u()&&(m*=Ki,Ae(N)<Yi&&b(g(u(!0)),Xi,!1,d,!0))}function Y(){f&&f.cancel()}function j(){f&&!f.isPaused()&&(Y(),h())}function C(x){var R=n.easingFunc;return R?R(x):1-Math.pow(1-x,4)}return{mount:_,destroy:Y,scroll:b,cancel:j}}var gt={passive:!1,capture:!0};function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,c=o.unbind,p=e.state,g=t.Move,u=t.Scroll,L=t.Controller,v=t.Elements.track,f=t.Media.reduce,d=t.Direction,m=d.resolve,_=d.orient,b=g.getPosition,h=g.exceededLimit,E,Y,j,C,x,R=!1,T,O,W;function H(){i(v,wn,An,gt),i(v,Tn,An,gt),i(v,ur,X,gt),i(v,"click",M,{capture:!0}),i(v,"dragstart",Be),r([nt,$e],N)}function N(){var V=n.drag;fe(!V),C=V==="free"}function X(V){if(T=!1,!O){var l=ue(V);ae(V.target)&&(l||!V.button)&&(L.isBusy()?Be(V,!0):(W=l?v:window,x=p.is([St,Ht]),j=null,i(W,wn,D,gt),i(W,Tn,y,gt),g.cancel(),u.cancel(),F(V)))}}function D(V){if(p.is(Jt)||(p.set(Jt),s(Bo)),V.cancelable)if(x){g.translate(E+me(ne(V)));var l=se(V)>ho,A=R!==(R=h());(l||A)&&F(V),T=!0,s(Do),Be(V)}else $(V)&&(x=S(V),Be(V))}function y(V){p.is(Jt)&&(p.set(vt),s(Uo)),x&&(I(V),Be(V)),c(W,wn,D),c(W,Tn,y),x=!1}function M(V){!O&&T&&Be(V,!0)}function F(V){j=Y,Y=V,E=b()}function I(V){var l=Z(V),A=ie(l),P=n.rewind&&n.rewindByDrag;f(!1),C?L.scroll(A,0,n.snap):e.is(Dt)?L.go(_(Ln(l))<0?P?"<":"-":P?">":"+"):e.is(xt)&&R&&P?L.go(h(!0)?">":"<"):L.go(L.toDest(A),!0),f(!0)}function S(V){var l=n.dragMinThreshold,A=Lt(l),P=A&&l.mouse||0,B=(A?l.touch:+l)||10;return Ae(ne(V))>(ue(V)?B:P)}function $(V){return Ae(ne(V))>Ae(ne(V,!0))}function Z(V){if(e.is(wt)||!R){var l=se(V);if(l&&l<ho)return ne(V)/l}return 0}function ie(V){return b()+Ln(V)*et(Ae(V)*(n.flickPower||600),C?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(V,l){return ee(V,l)-ee(z(V),l)}function se(V){return In(V)-In(z(V))}function z(V){return Y===V&&j||Y}function ee(V,l){return(ue(V)?V.changedTouches[0]:V)["page"+m(l?"Y":"X")]}function me(V){return V/(R&&e.is(xt)?Ri:1)}function ae(V){var l=n.noDrag;return!Et(V,"."+ar+", ."+hn)&&(!l||!Et(V,l))}function ue(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function Q(){return x}function fe(V){O=V}return{mount:H,disable:fe,isDragging:Q}}var ta={Spacebar:" ",Right:mn,Left:gn,Up:Qo,Down:er};function Qn(e){return e=Qe(e)?e:e.key,ta[e]||e}var vo="keydown";function na(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,g,u;function L(){v(),r($e,f),r($e,v),r(Ye,m)}function v(){var b=n.keyboard;b&&(g=b==="global"?window:c,s(g,vo,_))}function f(){i(g,vo)}function d(b){u=b}function m(){var b=u;u=!0,Eo(function(){u=b})}function _(b){if(!u){var h=Qn(b);h===p(gn)?e.go("<"):h===p(mn)&&e.go(">")}}return{mount:L,destroy:f,disable:d}}var It=jn+"-lazy",tn=It+"-srcset",oa="["+It+"], ["+tn+"]";function ra(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",g=[Ct,ct],u=[];function L(){n.lazyLoad&&(v(),r(Se,v))}function v(){Ge(u),f(),p?b():(s(g),r(g,d),d())}function f(){t.Slides.forEach(function(h){Pn(h.slide,oa).forEach(function(E){var Y=Re(E,It),j=Re(E,tn);if(Y!==E.src||j!==E.srcset){var C=n.classes.spinner,x=E.parentElement,R=jt(x,"."+C)||ft("span",C,x);u.push([E,h,R]),E.src||Rt(E,"none")}})})}function d(){u=u.filter(function(h){var E=n.perPage*((n.preloadPages||1)+1)-1;return h[1].isWithin(e.index,E)?m(h):!0}),u.length||s(g)}function m(h){var E=h[0];He(h[1].slide,Rn),i(E,"load error",ve(_,h)),re(E,"src",Re(E,It)),re(E,"srcset",Re(E,tn)),Ne(E,It),Ne(E,tn)}function _(h,E){var Y=h[0],j=h[1];Ue(j.slide,Rn),E.type!=="error"&&(lt(h[2]),Rt(Y,""),c(Yn,Y,j),c(bt)),p&&b()}function b(){u.length&&m(u.shift())}return{mount:L,destroy:ve(Ge,u),check:d}}function ia(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,c=t.Slides,p=t.Elements,g=t.Controller,u=g.hasFocus,L=g.getIndex,v=g.go,f=t.Direction.resolve,d=p.pagination,m=[],_,b;function h(){E(),r([$e,Se,an],h);var O=n.pagination;d&&Rt(d,O?"":"none"),O&&(r([Ye,pn,ct],T),Y(),T(),s(Yo,{list:_,items:m},R(e.index)))}function E(){_&&(lt(d?tt(_.children):_),Ue(_,b),Ge(m),_=null),o.destroy()}function Y(){var O=e.length,W=n.classes,H=n.i18n,N=n.perPage,X=u()?g.getEnd()+1:Wt(O/N);_=d||ft("ul",W.pagination,p.track.parentElement),He(_,b=vn+"--"+x()),re(_,qe,"tablist"),re(_,Le,H.select),re(_,Kn,x()===fn?"vertical":"");for(var D=0;D<X;D++){var y=ft("li",null,_),M=ft("button",{class:W.page,type:"button"},y),F=c.getIn(D).map(function(S){return S.slide.id}),I=!u()&&N>1?H.pageX:H.slideX;i(M,"click",ve(j,D)),n.paginationKeyboard&&i(M,"keydown",ve(C,D)),re(y,qe,"presentation"),re(M,qe,"tab"),re(M,Bt,F.join(" ")),re(M,Le,En(I,D+1)),re(M,yt,-1),m.push({li:y,button:M,page:D})}}function j(O){v(">"+O,!0)}function C(O,W){var H=m.length,N=Qn(W),X=x(),D=-1;N===f(mn,!1,X)?D=++O%H:N===f(gn,!1,X)?D=(--O+H)%H:N==="Home"?D=0:N==="End"&&(D=H-1);var y=m[D];y&&(Wo(y.button),v(">"+D),Be(W,!0))}function x(){return n.paginationDirection||n.direction}function R(O){return m[g.toPage(O)]}function T(){var O=R(L(!0)),W=R(L());if(O){var H=O.button;Ue(H,st),Ne(H,uo),re(H,yt,-1)}if(W){var N=W.button;He(N,st),re(N,uo,!0),re(N,yt,"")}s(Xo,{list:_,items:m},O,W)}return{items:m,mount:h,destroy:E,getAt:R,update:T}}var aa=[" ","Enter"];function la(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(d){d.isParent||(g(e,d.splide),g(d.splide,e))}),o&&u()}function c(){s.forEach(function(d){d.destroy()}),Ge(s)}function p(){c(),i()}function g(d,m){var _=be(d);_.on(Ye,function(b,h,E){m.go(m.is(wt)?E:b)}),s.push(_)}function u(){var d=be(e),m=d.on;m(Bn,v),m(Zo,f),m([nt,$e],L),s.push(d),d.emit(Un,e.splides)}function L(){re(t.Elements.list,Kn,n.direction===fn?"vertical":"")}function v(d){e.go(d.index)}function f(d,m){Nn(aa,Qn(m))&&(v(d),Be(m))}return{setup:ve(t.Media.set,{slideFocus:Nt(r)?o:r},!0),mount:i,destroy:c,remount:p}}function sa(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,gt)}function c(g){if(g.cancelable){var u=g.deltaY,L=u<0,v=In(g),f=n.wheelMinThreshold||0,d=n.wheelSleep||0;Ae(u)>f&&v-s>d&&(e.go(L?"<":">"),s=v),p(L)&&Be(g)}}function p(g){return!n.releaseWheel||e.state.is(St)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var ca=90;function pa(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,c=ft("span",Ii),p=un(ca,ve(u,!1));function g(){i&&(v(!t.Autoplay.isPaused()),re(s,fo,!0),c.textContent="…",r(qn,ve(v,!0)),r(Gn,ve(v,!1)),r([Ct,ct],ve(u,!0)))}function u(f){re(s,mo,f),f?(Pt(s,c),p.start()):(lt(c),p.cancel())}function L(){Ne(s,[go,fo,mo]),lt(c)}function v(f){i&&re(s,go,f?"off":"polite")}return{mount:g,disable:v,destroy:L}}var ua=Object.freeze({__proto__:null,Media:bi,Direction:xi,Elements:Wi,Slides:zi,Layout:Hi,Clones:Vi,Move:Pi,Controller:ji,Arrows:Di,Autoplay:qi,Cover:Gi,Scroll:Qi,Drag:ea,Keyboard:na,LazyLoad:ra,Pagination:ia,Sync:la,Wheel:sa,Live:pa}),da={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"},ga={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:da,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ma(e,t,n){var o=t.Slides;function r(){be(e).on([nt,Se],s)}function s(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}return{mount:r,start:i,cancel:An}}function fa(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,c=ve(ke,i,"transition"),p;function g(){be(e).bind(i,"transitionend",function(f){f.target===i&&p&&(L(),p())})}function u(f,d){var m=o.toPosition(f,!0),_=o.getPosition(),b=v(f);Ae(m-_)>=1&&b>=1?n.useScroll?s.scroll(m,b,!1,d):(c("transform "+b+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(f),d())}function L(){c(""),s.cancel()}function v(f){var d=n.rewindSpeed;if(e.is(xt)&&d){var m=r.getIndex(!0),_=r.getEnd();if(m===0&&f>=_||m>=_&&f===0)return d}return n.speed}return{mount:g,start:u,cancel:L}}var ya=(function(){function e(n,o){this.event=be(),this.Components={},this.state=hi(mt),this.splides=[],this._o={},this._E={};var r=Qe(n)?zo(document,n):n;At(r,r+" is invalid."),this.root=r,o=Ke({label:Re(r,Le)||"",labelledby:Re(r,Xn)||""},ga,e.defaults,o||{});try{Ke(o,JSON.parse(Re(r,jn)))}catch{At(!1,"Invalid JSON")}this._o=Object.create(Ke({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,c=this.Components;At(i.is([mt,nn]),"Already mounted!"),i.set(mt),this._C=c,this._T=r||this._T||(this.is(Dt)?ma:fa),this._E=o||this._E;var p=kt({},ua,this._E,{Transition:this._T});return at(p,function(g,u){var L=g(s,c,s._o);c[u]=L,L.setup&&L.setup()}),at(c,function(g){g.mount&&g.mount()}),this.emit(nt),He(this.root,Li),i.set(vt),this.emit(Fn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(vt)&&(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(tt(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(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(Fn,this.destroy.bind(this,o)):(at(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&Ge(this.splides),s.set(nn)),this},di(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})(),eo=ya;eo.defaults={};eo.STATES=mi;var bo=[[nt,"onMounted"],[Fn,"onReady"],[Ye,"onMove"],[Ct,"onMoved"],[Bn,"onClick"],[Vo,"onActive"],[Po,"onInactive"],[jo,"onVisible"],[Oo,"onHidden"],[Se,"onRefresh"],[$e,"onUpdated"],[bt,"onResize"],[cn,"onResized"],[Bo,"onDrag"],[Do,"onDragging"],[Uo,"onDragged"],[pn,"onScroll"],[ct,"onScrolled"],[Dn,"onDestroy"],[qo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Yo,"onPaginationMounted"],[Xo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Ko,"onAutoplayPlaying"],[Gn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function to(...e){return e.filter(Boolean).join(" ")}function ln(e){return e!==null&&typeof e=="object"}function Wn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Wn(n,t[o]));if(ln(e)&&ln(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Wn(e[r],t[r]))}return e===t}function ha(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function va(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 Mn(e,t){const n=e;return va(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():ln(o)?n[r]=Mn(ln(n[r])?n[r]:{},o):n[r]=o}),n}var ba=({children:e,className:t,...n})=>k.createElement("div",{className:to("splide__track",t),...n},k.createElement("ul",{className:"splide__list"},e)),dr=class extends k.Component{constructor(){super(...arguments),this.splideRef=k.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new eo(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Mn({},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&&!Wn(this.options,e)&&(this.splide.options=e,this.options=Mn({},e));const t=this.getSlides();ha(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){bo.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 k.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(s=>s[1])])},n?k.createElement(ba,null,o):o)}},gr=({children:e,className:t,...n})=>k.createElement("li",{className:to("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",xa={link:ba},Ve=({content:t})=>{const e=n=>n.map((o,r)=>o.type==="link"?s.jsx("a",{className:xa.link,href:o.value,target:o.target,children:e(o.children)},r):s.jsx("span",{style:Sa(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 Sa(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-",xo={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 l=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(l)}},[]),!$a(t)||!a?s.jsx("img",{src:t,alt:"",className:mt(xo.img,o),style:r}):s.jsx("span",{"data-supports-mask":a,className:mt(xo.svg,o),style:{"--svg":Ta(t),"--fill":e,"--hover-fill":n,...r??{}}})},_a={"top-left":Z.topLeftAlignment,"top-center":Z.topCenterAlignment,"top-right":Z.topRightAlignment,"middle-left":Z.middleLeftAlignment,"middle-center":Z.middleCenterAlignment,"middle-right":Z.middleRightAlignment,"bottom-left":Z.bottomLeftAlignment,"bottom-center":Z.bottomCenterAlignment,"bottom-right":Z.bottomRightAlignment};function Aa({settings:t,content:e,styles:n,isEditor:o}){const[r,a]=H.useState(null),{widthSettings:i,fontSettings:l,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:F,textAppearance:S,color:f}=n.imageCaption,[d,m]=H.useState(void 0),[w,x]=H.useState(null),[b,$]=H.useState(0),[j,W]=H.useState(0),{direction:C,transition:y,controls:L,pagination:h,imageCaption:P,triggers:T}=t,z=H.useRef(y.type),{x:k,y:U}=t.controls.offset,O=v=>{r&&r.go(v)};return H.useEffect(()=>{if(!w)return;const v=new ResizeObserver(I=>{if(!r)return;const[R]=I;m({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return v.observe(w),()=>v.unobserve(w)},[w]),H.useEffect(()=>{!r||z.current===y.type||(W(v=>v+1),z.current=y.type)},[y.type]),s.jsx("div",{className:mt(Z.wrapper,{[Z.editor]:o}),ref:x,children:s.jsxs("div",{className:Z.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&s.jsx("div",{className:mt(Z.captionBlock),children:s.jsx("div",{className:Z.captionTextWrapper,children:e.map((v,I)=>s.jsx("div",{className:mt(Z.captionText,_a[P.alignment],{[Z.withPointerEvents]:I===b&&o,[Z.active]:I===b}),style:{fontFamily:l.fontFamily,fontWeight:l.fontWeight,fontStyle:l.fontStyle,width:i.sizing==="auto"?"max-content":_.scalingValue(i.width,o),letterSpacing:_.scalingValue(p,o),wordSpacing:_.scalingValue(u,o),textAlign:g,fontSize:_.scalingValue(F.fontSize,o),lineHeight:_.scalingValue(F.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:f,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:s.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-hover-color":P.linkHoverColor,"--link-color":P.linkColor,position:"relative",top:_.scalingValue(P.offset.y,o),left:_.scalingValue(P.offset.x,o)},children:s.jsx(Ve,{content:v.imageCaption})})},I))})}),s.jsx(ur,{onMove:v=>{$(v.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:T.autoPlay!==null,...T.autoPlay!==null&&{interval:parseInt(T.autoPlay)*1e3},direction:C==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:T.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((v,I)=>s.jsx(dr,{children:s.jsx("div",{className:Z.sliderItem,children:s.jsx("div",{className:Z.imgWrapper,children:s.jsx("img",{className:mt(Z.sliderImage,{[Z.contain]:v.image.objectFit==="contain",[Z.cover]:v.image.objectFit==="cover"}),src:v.image.url,alt:v.image.name??""})})})},I))},j),L.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:mt(Z.arrow,{[Z.arrowVertical]:C==="vert",[Z.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:s.jsxs("button",{onClick:()=>{O("-1")},className:Z.arrowInner,style:{transform:`translate(${_.scalingValue(k,o)}, ${_.scalingValue(U*(C==="horiz"?1:-1),o)}) scale(${t.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&s.jsx(ye,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:mt(Z.arrowImg,Z.mirror)}),!L.arrowsImgUrl&&s.jsx(So,{color:L.color,className:mt(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),s.jsx("div",{className:mt(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:C==="vert",[Z.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:s.jsxs("button",{className:Z.arrowInner,onClick:()=>O("+1"),style:{transform:`translate(${_.scalingValue(k*(C==="horiz"?-1:1),o)}, ${_.scalingValue(U,o)}) scale(${t.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&s.jsx(ye,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Z.arrowImg}),!L.arrowsImgUrl&&s.jsx(So,{color:L.color,className:mt(Z.arrowIcon,Z.arrowImg)})]})})]}),T.triggersList.click&&s.jsx("div",{className:Z.clickOverlay,onClick:()=>{r&&r.go("+1")}}),h.isActive&&s.jsx("div",{className:mt(Z.pagination,{[Z.paginationInsideBottom]:h.position==="inside-1"&&C==="horiz",[Z.paginationInsideTop]:h.position==="inside-2"&&C==="horiz",[Z.paginationOutsideBottom]:h.position==="outside-1"&&C==="horiz",[Z.paginationOutsideTop]:h.position==="outside-2"&&C==="horiz",[Z.paginationInsideLeft]:h.position==="inside-1"&&C==="vert",[Z.paginationInsideRight]:h.position==="inside-2"&&C==="vert",[Z.paginationOutsideLeft]:h.position==="outside-1"&&C==="vert",[Z.paginationOutsideRight]:h.position==="outside-2"&&C==="vert",[Z.paginationVertical]:C==="vert"}),children:s.jsx("div",{className:Z.paginationInner,style:{backgroundColor:h.colors[2],transform:`scale(${h.scale/100}) translate(${_.scalingValue(h.offset.x,o)}, ${_.scalingValue(h.offset.y,o)}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:e.map((v,I)=>s.jsx("button",{onClick:()=>{r&&r.go(I)},className:mt(Z.paginationItem),children:s.jsx("div",{className:mt(Z.dot,{[Z.activeDot]:I===b}),style:{backgroundColor:I===b?h.colors[0]:h.colors[1],"--pagination-hover-color":h.hover}})},I))})})]})})}function So({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 La={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"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",ka="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",pe={imageRevealSlider:Ea,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,l=a/2,p=i/2;if(t>=o.x-l&&t<=o.x+l&&e>=o.y-p&&e<=o.y+p)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([]),[l,p]=H.useState(0),g=H.useRef(0),[u,F]=H.useState({x:0,y:0}),[S,f]=H.useState(1),[d,m]=H.useState("none"),w=H.useRef({x:0,y:0}),[x,b]=H.useState(!1),{sizeType:$,imageWidth:j,randomRangeImageWidth:W}=t.imageSize,{revealPosition:C,visible:y}=t.position,{cursorType:L,target:h,defaultCursorScale:P,defaultCursor:T,hoverCursorScale:z,hoverCursor:k}=t.cursor;H.useEffect(()=>{if(!o)return;const v=(E,A)=>{const V=o.getBoundingClientRect(),X=E-V.left,rt=A-V.top;if(F({x:X,y:rt}),L==="system"){m("none"),f(1);return}const ot=X,lt=rt,M=document.elementFromPoint(V.left+ot,V.top+lt);if(M&&M.closest("a")){m("none"),f(1);return}const Q=Co(ot,lt,a)||h==="area"?{img:k??"none",scale:z}:{img:T??"none",scale:P};m(Q.img),f(Q.scale)},I=E=>{E.stopPropagation(),w.current={x:E.clientX,y:E.clientY},v(E.clientX,E.clientY)},R=()=>{x&&v(w.current.x,w.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",R,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",R,!0)}},[o,x,u,L,h,k,T,z,P,a]),H.useEffect(()=>{x||(m("none"),f(0))},[x]);const U=async(v,I,R,E={})=>{const{width:A,height:V,finalWidth:X}=await Ra(v.image.url,$,j,W);let rt=0,ot=0;C==="same"?(rt=I/2,ot=R/2):(rt=E.x??Math.random()*I,ot=E.y??Math.random()*R);const lt=Math.min(Math.max(rt,A/2),I-A/2),M=Math.min(Math.max(ot,V/2),R-V/2);return{id:g.current++,url:v.image.url,link:v.link,name:v.image.name,x:lt,y:M,width:X}};H.useEffect(()=>{if(!o||e.length===0)return;const v=o.getBoundingClientRect(),I=v.width,R=v.height,E=[];(async()=>{const V=e[0],X=await U(V,I,R);E.push(X),i(E),p(1)})()},[$,j,W,C,o]),H.useEffect(()=>{y==="last One"&&i(v=>v.length>0?[v[v.length-1]]:[])},[y]);const O=async v=>{if(!o)return;const I=o.getBoundingClientRect(),R=v.clientX-I.left,E=v.clientY-I.top;if(h==="image"&&!Co(R,E,a))return;let A=0,V=0;C==="on Click"?(A=R,V=E):C==="same"?(A=I.width/2,V=I.height/2):(A=Math.random()*I.width,V=Math.random()*I.height);const X=e[l],rt=await U(X,I.width,I.height,{x:A,y:V});i(ot=>y==="all"?[...ot,rt]:[rt]),p(ot=>ot>=e.length-1?0:ot+1)};return s.jsxs("div",{ref:r,onClick:O,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:pe.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[a.map(v=>s.jsx("div",{className:pe.wrapper,style:{top:`${v.y}px`,left:`${v.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:v.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:h==="area"&&v.link?s.jsx("a",{href:v.link,target:"_blank",className:pe.link,children:s.jsx("img",{src:v.url,alt:v.name,className:pe.image},v.id)}):s.jsx("img",{src:v.url,alt:v.name,className:pe.image},v.id)},v.id)),x&&s.jsx("div",{className:pe.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const za={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:""}]}}}},Va="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",qa="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Za="LightBox-module__arrowInner___p48sW",Ja="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",D={hidden:Va,heroImage:Ma,background:Na,editor:Pa,contentStyle:Ha,imageStyle:ja,imgWrapper:Oa,contain:Ba,cover:Da,caption:Ua,captionTextInner:qa,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Za,arrowIcon:Ja,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% + ${_.scalingValue(e.x,n)}), calc(-50% + ${_.scalingValue(e.y,n)}))`:r==="middle"?o.transform=`translate(${_.scalingValue(e.x,n)}, calc(-50% + ${_.scalingValue(e.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(e.x,n)}), ${_.scalingValue(e.y,n)})`:o.transform=`translate(${_.scalingValue(e.x,n)}, ${_.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,l=o/r,p=a/i;let g,u;p>l?(g=o,u=o/p):(u=r,g=r*p);const F=e.left+n.left,S=e.top+n.top,f=(o-g)/2+F,d=(r-u)/2+S;return{x:f,y:d,width:g,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 xl(t,e){const n=(()=>{if(t==="fade in")return D.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return D.fadeIn;if(t==="slide in")switch(e){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return D.fadeOut;if(t==="slide in")switch(e){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})(),a=(()=>{if(t==="fade in")return D.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const Sl=({settings:t,content:e,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,l]=H.useState(!1),{url:p}=t.thumbnailBlock.cover;return H.useEffect(()=>{r==="close"&&l(!1),r==="open"&&l(!0)},[r]),s.jsxs(s.Fragment,{children:[s.jsx("img",{src:p,alt:"Cover",className:D.heroImage,onClick:()=>l(!0)}),s.jsx(Cl,{isOpen:i,onClose:()=>l(!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:l})=>{var q;const[p,g]=H.useState(0),[u,F]=H.useState(0),[S,f]=H.useState(!1),[d,m]=H.useState(!1),[w,x]=H.useState({}),b=H.useRef(null),$=H.useRef(null),j=H.useRef(null),W=H.useRef(!1),C=H.useRef(null),y=H.useRef(null),L=H.useRef(null),h=H.useRef(null),P=H.useRef(!1),T=H.useRef(null),[z,k]=H.useState(!1),{appear:U,triggers:O,slider:v,thumbnail:I,controls:R,area:E,caption:A,layout:V}=r.lightboxBlock,{appearClass:X,backdropAppearClass:rt,backdropDisappearClass:ot,disappearClass:lt}=xl(U.type,U.direction),M=(l==null?void 0:l.itemId)??null;H.useEffect(()=>{const c=()=>{setTimeout(()=>{var B,Y;(Y=(B=b.current)==null?void 0:B.splide)==null||Y.refresh()},16)},N=()=>{F(B=>B+1)};return window.addEventListener("ArticleEditor.Layout:change",c),window.addEventListener("ArticleEditor.ComponentContent:change",N),()=>{window.removeEventListener("ArticleEditor.Layout:change",c),window.removeEventListener("ArticleEditor.ComponentContent:change",N)}},[]),H.useEffect(()=>{if(!t||!I.isActive){k(!1);return}const c=T.current;if(!c)return;const N=()=>{v.direction==="horiz"?k(c.scrollWidth>c.clientWidth):k(c.scrollHeight>c.clientHeight)};N();const B=new ResizeObserver(N);return B.observe(c),()=>B.disconnect()},[t,I.isActive,n.length,w,v.direction]);const Q=H.useCallback(()=>{const c=window.matchMedia("(max-width: 768px)").matches,N=To(E.color);c&&!i&&N>.9&&(document.body.style.backgroundColor=""),f(!0),W.current=!0;const B=Y=>{Y.target===C.current&&Y.animationName&&(C.current&&y.current&&C.current.removeEventListener("animationend",y.current),y.current=null,W.current&&(W.current=!1,e()),f(!1))};C.current&&(y.current=B,C.current.addEventListener("animationend",B))},[e,E.color,i]),ft=(c,N,B)=>{var Y,G;if(c){if(O.type==="click"&&O.switch==="image")O.repeat==="close"&&p===n.length-1?Q():(Y=b.current)==null||Y.go("+1");else if(O.type==="click"&&O.switch==="50/50"){const K=c.getBoundingClientRect(),J=N-K.left,nt=B-K.top,it=K.width,at=K.height;let pt;v.direction==="horiz"?pt=J<it/2?"-1":"+1":pt=nt<at/2?"-1":"+1",(G=b.current)==null||G.go(pt)}}},st=c=>{if(P.current){P.current=!1;return}const N=n[p],B=(N==null?void 0:N.image.objectFit)==="cover";let Y,G;if("changedTouches"in c&&c.changedTouches.length>0)Y=c.changedTouches[0].clientX,G=c.changedTouches[0].clientY;else if("clientX"in c)Y=c.clientX,G=c.clientY;else return;let K;if(B&&j.current){const J=$o(j.current);K=Y>=J.left&&Y<=J.right&&G>=J.top&&G<=J.bottom}else{const J=j.current?wo(j.current):null;if(!J){c.target===c.currentTarget&&Q();return}K=Y>=J.x&&Y<=J.x+J.width&&G>=J.y&&G<=J.y+J.height}K?ft(j.current,Y,G):Q()},gt=c=>{const N=c.target;(N.classList.contains(D.thumbsWrapper)||N.classList.contains(D.thumbsContainer))&&st(c)};H.useEffect(()=>{if(!t)return;const c=N=>{var B,Y;if(N.key==="Escape"){Q();return}if(N.key==="ArrowRight"){g(G=>(G+1)%Math.max(n.length,1)),(B=b.current)==null||B.go("+1");return}N.key==="ArrowLeft"&&(g(G=>(G-1+Math.max(n.length,1))%Math.max(n.length,1)),(Y=b.current)==null||Y.go("-1"))};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[t,Q,n.length]),H.useEffect(()=>{if(t){if(g(0),F(N=>N+1),W.current=!1,f(!1),m(!1),x({}),!M)return;const c=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(c)}return()=>{C.current&&y.current&&(C.current.removeEventListener("animationend",y.current),y.current=null),m(!1)}},[t,M]),H.useEffect(()=>{$.current!==null&&$.current!==v.type&&F(c=>c+1),$.current=v.type},[v.type]),H.useEffect(()=>{if(!t)return;const c=document.body.style.overflow,N=window.matchMedia("(max-width: 768px)").matches,B=To(E.color);document.body.style.overflow="hidden",m(!1);const Y=K=>{K.target===C.current&&!W.current&&K.animationName&&(N&&!i&&B>.9&&(document.body.style.backgroundColor=E.color),m(!0),C.current&&L.current&&C.current.removeEventListener("animationend",L.current),L.current=null)};C.current&&(L.current=Y,C.current.addEventListener("animationend",Y));const G=K=>{const J=K.target;J&&(J.closest(`.${D.thumbsWrapper}`)||J.closest(`.${D.thumbsContainer}`))||v.type!=="slide"&&K.preventDefault()};return document.addEventListener("touchmove",G,{passive:!1}),()=>{document.body.style.overflow=c,document.removeEventListener("touchmove",G),C.current&&L.current&&(C.current.removeEventListener("animationend",L.current),L.current=null),m(!1)}},[t,i,E.color,v.type]),H.useEffect(()=>{if(!t)return;const c=N=>{var Y,G;if(W.current){N.stopPropagation();return}if(P.current){P.current=!1;return}const B=N.target;if(!(B&&(B.closest(`.${D.thumbsContainer}`)||B.closest(`.${D.thumbItem}`)))){if(v.type==="slide"&&O.type==="drag"&&((G=(Y=b.current)==null?void 0:Y.splide)!=null&&G.root)){const K=b.current.splide.root;if(B&&(K.contains(B)||K===B))return}if(N.touches.length===0&&N.changedTouches.length>0){const K=n[p],J=(K==null?void 0:K.image.objectFit)==="cover",nt=N.changedTouches[0];let it;if(J&&j.current){const at=$o(j.current);it=nt.clientX>=at.left&&nt.clientX<=at.right&&nt.clientY>=at.top&&nt.clientY<=at.bottom}else{const at=j.current?wo(j.current):null;if(!at)return;it=nt.clientX>=at.x&&nt.clientX<=at.x+at.width&&nt.clientY>=at.y&&nt.clientY<=at.y+at.height}if(!it){N.stopPropagation(),W.current=!0;const at=pt=>{pt.stopPropagation(),pt.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0),Q()}}}};return document.addEventListener("touchend",c,{passive:!0}),()=>{document.removeEventListener("touchend",c)}},[t,Q,p,n]);const bt=(v.type==="scale"||v.type==="fade")&&v.direction==="vert"&&O.type==="drag";H.useEffect(()=>{var pt,Tt;if(!t||!bt||!((Tt=(pt=b.current)==null?void 0:pt.splide)!=null&&Tt.root))return;const c=b.current.splide.root,N=30,B=(tt,ut)=>{if(h.current){const St=Math.abs(tt-h.current.x),Xt=Math.abs(ut-h.current.y);(St>0||Xt>0)&&(P.current=!0)}},Y=tt=>{h.current&&(tt.preventDefault(),B(tt.clientX,tt.clientY))},G=tt=>{h.current&&tt.touches.length>0&&(tt.preventDefault(),B(tt.touches[0].clientX,tt.touches[0].clientY))},K=(tt,ut)=>{if(!h.current||!b.current){h.current=null;return}const St=Math.abs(tt-h.current.x),Xt=Math.abs(ut-h.current.y);Xt>N&&Xt>St&&b.current.go(ut<h.current.y?"+1":"-1"),h.current=null},J=tt=>{h.current&&K(tt.clientX,tt.clientY),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("pointermove",Y)},nt=tt=>{if(h.current){if(tt.changedTouches.length>0){const ut=tt.changedTouches[0];K(ut.clientX,ut.clientY)}document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),document.removeEventListener("touchmove",G)}},it=tt=>{h.current={x:tt.clientX,y:tt.clientY},P.current=!1,document.addEventListener("pointermove",Y,{passive:!1}),document.addEventListener("pointerup",J),document.addEventListener("pointercancel",J)},at=tt=>{tt.touches.length>0&&(h.current={x:tt.touches[0].clientX,y:tt.touches[0].clientY},P.current=!1,document.addEventListener("touchmove",G,{passive:!1}),document.addEventListener("touchend",nt),document.addEventListener("touchcancel",nt))};return c.addEventListener("pointerdown",it),c.addEventListener("touchstart",at),()=>{c.removeEventListener("pointerdown",it),c.removeEventListener("touchstart",at),document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",J),document.removeEventListener("pointercancel",J),document.removeEventListener("touchmove",G),document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),h.current=null,P.current=!1}},[t,bt,u]);const zt={backgroundColor:E.color,backdropFilter:`blur(${E.blur}px)`,animationDuration:`${parseInt(U.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:C,className:mt(D.background,S?ot:rt,{[D.editor]:i},{[D.hidden]:!t}),style:{...zt,...d&&!i&&!S?{position:"absolute"}:{}}}),s.jsxs("div",{ref:i?C:null,className:mt(D.contentStyle,S?lt:X,{[D.editor]:i},{[D.hidden]:!t}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[s.jsx(ur,{onMove:c=>g(c.index),ref:b,className:D.lightboxSplide,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,direction:v.direction==="horiz"||v.type==="fade"||v.type==="scale"?"ltr":"ttb",pagination:!1,drag:O.type==="drag"&&!bt,perPage:1,width:"100%",height:"100%",type:v.type==="fade"||v.type==="scale"?"fade":"loop",padding:0,rewind:O.repeat!=="close",start:0},style:{"--splide-speed":v.duration},children:n.map((c,N)=>{const B=Ye(V.position,V.offset,i),Y=`${_.scalingValue(V.padding.top,i)} ${_.scalingValue(V.padding.right,i)} ${_.scalingValue(V.padding.bottom,i)} ${_.scalingValue(V.padding.left,i)}`,G=v.type==="scale"?(()=>{const{transform:K,...J}=B;return{...J,position:"absolute",padding:Y,boxSizing:"border-box","--position-transform":K||"none"}})():{...B,position:"absolute",padding:Y,boxSizing:"border-box"};return s.jsx(dr,{children:s.jsx("div",{className:D.imgWrapper,onClick:st,children:s.jsx("img",{ref:N===p?j:null,className:mt(D.imageStyle,{[D.contain]:c.image.objectFit==="contain",[D.cover]:c.image.objectFit==="cover",[D.scaleSlide]:v.type==="scale"}),src:c.image.url,alt:c.image.name??"",style:{...G,pointerEvents:c.image.objectFit==="contain"?"none":"auto"}})})},N)})},u),R.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:mt(D.arrow,{[D.arrowVertical]:v.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:s.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${_.scalingValue(R.offset.x,i)}, ${_.scalingValue(R.offset.y*(v.direction==="horiz"?1:-1),i)}) scale(${R.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var c;return(c=b.current)==null?void 0:c.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&s.jsx(ye,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:mt(D.arrowImg,D.mirror)}),!R.arrowsImgUrl&&s.jsx(_o,{color:R.color,className:mt(D.arrowIcon,D.arrowImg,D.mirror)})]})}),s.jsx("div",{className:mt(D.arrow,D.nextArrow,{[D.arrowVertical]:v.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:s.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${_.scalingValue(R.offset.x*(v.direction==="horiz"?-1:1),i)}, ${_.scalingValue(R.offset.y,i)}) scale(${R.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var c;return(c=b.current)==null?void 0:c.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&s.jsx(ye,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:D.arrowImg}),!R.arrowsImgUrl&&s.jsx(_o,{color:R.color,className:mt(D.arrowIcon,D.arrowImg)})]})})]}),E.closeIconUrl&&(()=>{const c=Ye(E.closeIconAlign,E.closeIconOffset,i),N=`scale(${E.closeIconScale})`,B=c.transform?`${c.transform} ${N}`:N;return s.jsx("button",{className:D.closeButton,style:{...c,transform:B},onClick:Q,"aria-label":"Close lightbox",children:s.jsx(ye,{url:E.closeIconUrl,fill:E.closeIconColor??"#000000",hoverFill:E.closeIconHover??"#cccccc"})})})(),A&&A.isActive&&o.imageCaption&&((q=n[p])==null?void 0:q.imageCaption)&&(()=>{const{widthSettings:c,fontSettings:N,letterSpacing:B,textAlign:Y,wordSpacing:G,fontSizeLineHeight:K,textAppearance:J,color:nt}=o.imageCaption;return s.jsx("div",{className:D.caption,style:{...Ye(A.alignment,A.offset,i),fontFamily:N.fontFamily,fontWeight:N.fontWeight,fontStyle:N.fontStyle,width:c.sizing==="auto"?"max-content":_.scalingValue(c.width,i),letterSpacing:_.scalingValue(B,i),wordSpacing:_.scalingValue(G,i),textAlign:Y,fontSize:_.scalingValue(K.fontSize,i),lineHeight:_.scalingValue(K.lineHeight,i),textTransform:J.textTransform??"none",textDecoration:J.textDecoration??"none",fontVariant:J.fontVariant??"normal",color:nt},onClick:it=>it.stopPropagation(),children:s.jsx("div",{"data-styles":"imageCaption",className:D.captionTextInner,style:{"--link-color":A.linkColor,"--link-hover-color":A.linkHoverColor},children:s.jsx(Ve,{content:n[p].imageCaption})})})})(),I.isActive&&(()=>{const[c,N]=I.position.split("-"),B=v.direction==="horiz"?`${c}-left`:I.position,Y=Ye(B,I.offset,i),G=()=>{if(v.direction==="horiz"){if(N==="left")return"flex-start";if(N==="center")return"center";if(N==="right")return"flex-end"}else{if(c==="top")return"flex-start";if(c==="middle")return"center";if(c==="bottom")return"flex-end"}return"flex-start"};return s.jsx("div",{ref:T,className:D.thumbsWrapper,onClick:K=>gt(K),style:{position:i?"absolute":"fixed",...Y,...v.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:s.jsx("div",{className:mt(D.thumbsContainer,{[D.thumbsContainerVertical]:v.direction==="vert",[D.thumbsAlignStart]:I.align==="start",[D.thumbsAlignCenter]:I.align==="center",[D.thumbsAlignEnd]:I.align==="end"}),style:{gap:_.scalingValue(I.grid.gap,i),justifyContent:z?"flex-start":G()},children:n.map((K,J)=>{const nt=J===p,it=w[J],pt=I.grid.size*(nt?I.activeState.scale:1),Tt=()=>{if(I.fit!=="fit")return{};if(!it)return v.direction==="horiz"?{height:_.scalingValue(pt,i)}:{width:_.scalingValue(pt,i)};const tt=it.width/it.height;if(v.direction==="horiz"){const ut=pt,St=ut*tt;return{width:_.scalingValue(St,i),height:_.scalingValue(ut,i)}}else{const ut=pt,St=ut/tt;return{width:_.scalingValue(ut,i),height:_.scalingValue(St,i)}}};return s.jsx("button",{className:D.thumbItem,style:{...v.direction==="horiz"&&I.fit!=="fit"?{height:_.scalingValue(pt,i)}:{},...v.direction==="vert"&&I.fit!=="fit"?{width:_.scalingValue(pt,i)}:{},...I.fit==="cover"?{width:_.scalingValue(pt,i),height:_.scalingValue(pt,i)}:{},...Tt(),transition:nt?"all 0.25s ease-out":"none",opacity:nt?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:tt=>{var ut;tt.stopPropagation(),g(J),(ut=b.current)==null||ut.go(J)},onMouseEnter:()=>{var tt;I.triggers==="hov"&&((tt=b.current)==null||tt.go(J))},children:s.jsx("img",{src:K.image.url,alt:K.image.name??"",onLoad:tt=>{const ut=tt.currentTarget;ut.naturalWidth&&ut.naturalHeight&&x(St=>({...St,[J]:{width:ut.naturalWidth,height:ut.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${K.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:Sl,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 Zt(t,e){var n,o,r;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:_.scalingValue(t.letterSpacing,e),wordSpacing:_.scalingValue(t.wordSpacing,e),fontSize:_.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?_.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 xa="RichTextRenderer-module__link___BWeZ2",Sa={link:xa},zt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:Ca(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function Ca(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 wa="SvgImage-module__svg___q3xE-",Ta="SvgImage-module__img___VsTm-",xo={svg:wa,img:Ta},_a=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,'\\"')}")`,Je=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=k.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return k.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!_a(e)||!s?a.jsx("img",{src:e,alt:"",className:pe(xo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:pe(xo.svg,o),style:{"--svg":$a(e),"--fill":t,"--hover-fill":n,...r??{}}})},Aa={"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 Ia({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=k.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:L,textAppearance:v,color:f}=n.imageCaption,[d,m]=k.useState(void 0),[_,b]=k.useState(null),[h,E]=k.useState(0),[Y,j]=k.useState(0),{direction:C,transition:x,controls:R,pagination:T,imageCaption:O,triggers:W}=e,H=k.useRef(x.type),{x:N,y:X}=e.controls.offset,D=y=>{r&&r.go(y)};return k.useEffect(()=>{if(!_)return;const y=new ResizeObserver(M=>{if(!r)return;const[F]=M;m({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return y.observe(_),()=>y.unobserve(_)},[_]),k.useEffect(()=>{!r||H.current===x.type||(j(y=>y+1),H.current=x.type)},[x.type]),a.jsx("div",{className:pe(J.wrapper,{[J.editor]:o}),ref:b,children:a.jsxs("div",{className:J.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:pe(J.captionBlock),children:a.jsx("div",{className:J.captionTextWrapper,children:t.map((y,M)=>a.jsx("div",{className:pe(J.captionText,Aa[O.alignment],{[J.withPointerEvents]:M===h&&o,[J.active]:M===h}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":w.scalingValue(i.width,o),letterSpacing:w.scalingValue(p,o),wordSpacing:w.scalingValue(u,o),textAlign:g,fontSize:w.scalingValue(L.fontSize,o),lineHeight:w.scalingValue(L.lineHeight,o),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:f,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:w.scalingValue(O.offset.y,o),left:w.scalingValue(O.offset.x,o)},children:a.jsx(zt,{content:y.imageCaption})})},M))})}),a.jsx(dr,{onMove:y=>{E(y.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:C==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((y,M)=>a.jsx(gr,{children:a.jsx("div",{className:J.sliderItem,children:a.jsx("div",{className:J.imgWrapper,children:a.jsx("img",{className:pe(J.sliderImage,{[J.contain]:y.image.objectFit==="contain",[J.cover]:y.image.objectFit==="cover"}),src:y.image.url,alt:y.image.name??""})})})},M))},Y),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pe(J.arrow,{[J.arrowVertical]:C==="vert",[J.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{onClick:()=>{D("-1")},className:J.arrowInner,style:{transform:`translate(${w.scalingValue(N,o)}, ${w.scalingValue(X*(C==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(Je,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:pe(J.arrowImg,J.mirror)}),!R.arrowsImgUrl&&a.jsx(So,{color:R.color,className:pe(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:pe(J.arrow,J.nextArrow,{[J.arrowVertical]:C==="vert",[J.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:J.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${w.scalingValue(N*(C==="horiz"?-1:1),o)}, ${w.scalingValue(X,o)}) scale(${e.controls.scale/100}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&a.jsx(Je,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:J.arrowImg}),!R.arrowsImgUrl&&a.jsx(So,{color:R.color,className:pe(J.arrowIcon,J.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:J.clickOverlay,onClick:()=>{r&&r.go("+1")}}),T.isActive&&a.jsx("div",{className:pe(J.pagination,{[J.paginationInsideBottom]:T.position==="inside-1"&&C==="horiz",[J.paginationInsideTop]:T.position==="inside-2"&&C==="horiz",[J.paginationOutsideBottom]:T.position==="outside-1"&&C==="horiz",[J.paginationOutsideTop]:T.position==="outside-2"&&C==="horiz",[J.paginationInsideLeft]:T.position==="inside-1"&&C==="vert",[J.paginationInsideRight]:T.position==="inside-2"&&C==="vert",[J.paginationOutsideLeft]:T.position==="outside-1"&&C==="vert",[J.paginationOutsideRight]:T.position==="outside-2"&&C==="vert",[J.paginationVertical]:C==="vert"}),children:a.jsx("div",{className:J.paginationInner,style:{backgroundColor:T.colors[2],transform:`scale(${T.scale/100}) translate(${w.scalingValue(T.offset.x,o)}, ${w.scalingValue(T.offset.y,o)}) rotate(${C==="horiz"?"0deg":"90deg"})`},children:t.map((y,M)=>a.jsx("button",{onClick:()=>{r&&r.go(M)},className:pe(J.paginationItem),children:a.jsx("div",{className:pe(J.dot,{[J.activeDot]:M===h}),style:{backgroundColor:M===h?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},M))})})]})})}function So({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const La={element:Ia,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"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",ka="ImageRevealSlider-module__link___N-iLG",Ra="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:Ea,image:Fa,link:ka,cursor:Ra};function Co(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,c=s/2,p=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-p&&t<=o.y+p)return!0}return!1}function _n(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Wa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await _n(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await _n(e);s=i.height/i.width*r}else{const i=await _n(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=k.useState(null),[s,i]=k.useState([]),[c,p]=k.useState(0),g=k.useRef(0),[u,L]=k.useState({x:0,y:0}),[v,f]=k.useState(1),[d,m]=k.useState("none"),_=k.useRef({x:0,y:0}),[b,h]=k.useState(!1),{sizeType:E,imageWidth:Y,randomRangeImageWidth:j}=e.imageSize,{revealPosition:C,visible:x}=e.position,{cursorType:R,target:T,defaultCursorScale:O,defaultCursor:W,hoverCursorScale:H,hoverCursor:N}=e.cursor;k.useEffect(()=>{if(!o)return;const y=(I,S)=>{const $=o.getBoundingClientRect(),Z=I-$.left,ie=S-$.top;if(L({x:Z,y:ie}),R==="system"){m("none"),f(1);return}const ne=Z,se=ie,z=document.elementFromPoint($.left+ne,$.top+se);if(z&&z.closest("a")){m("none"),f(1);return}const ee=Co(ne,se,s)||T==="area"?{img:N??"none",scale:H}:{img:W??"none",scale:O};m(ee.img),f(ee.scale)},M=I=>{I.stopPropagation(),_.current={x:I.clientX,y:I.clientY},y(I.clientX,I.clientY)},F=()=>{b&&y(_.current.x,_.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",F,!0)}},[o,b,u,R,T,N,W,H,O,s]),k.useEffect(()=>{b||(m("none"),f(0))},[b]);const X=async(y,M,F,I={})=>{const{width:S,height:$,finalWidth:Z}=await Wa(y.image.url,E,Y,j);let ie=0,ne=0;C==="same"?(ie=M/2,ne=F/2):(ie=I.x??Math.random()*M,ne=I.y??Math.random()*F);const se=Math.min(Math.max(ie,S/2),M-S/2),z=Math.min(Math.max(ne,$/2),F-$/2);return{id:g.current++,url:y.image.url,link:y.link,name:y.image.name,x:se,y:z,width:Z}};k.useEffect(()=>{if(!o||t.length===0)return;const y=o.getBoundingClientRect(),M=y.width,F=y.height,I=[];(async()=>{const $=t[0],Z=await X($,M,F);I.push(Z),i(I),p(1)})()},[E,Y,j,C,o]),k.useEffect(()=>{x==="last One"&&i(y=>y.length>0?[y[y.length-1]]:[])},[x]);const D=async y=>{if(!o)return;const M=o.getBoundingClientRect(),F=y.clientX-M.left,I=y.clientY-M.top;if(T==="image"&&!Co(F,I,s))return;let S=0,$=0;C==="on Click"?(S=F,$=I):C==="same"?(S=M.width/2,$=M.height/2):(S=Math.random()*M.width,$=Math.random()*M.height);const Z=t[c],ie=await X(Z,M.width,M.height,{x:S,y:$});i(ne=>x==="all"?[...ne,ie]:[ie]),p(ne=>ne>=t.length-1?0:ne+1)};return a.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:ut.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[s.map(y=>a.jsx("div",{className:ut.wrapper,style:{top:`${y.y}px`,left:`${y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:y.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:T==="area"&&y.link?a.jsx("a",{href:y.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:y.url,alt:y.name,className:ut.image},y.id)}):a.jsx("img",{src:y.url,alt:y.name,className:ut.image},y.id)},y.id)),b&&a.jsx("div",{className:ut.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const za={element:Ma,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:""}]}}}},Ha="LightBox-module__hidden___9s-9x",Na="LightBox-module__heroImage___sTxNF",Va="LightBox-module__background___rm9ml",Pa="LightBox-module__editor___4ACaY",ja="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",Ba="LightBox-module__imgWrapper___LuFUp",Da="LightBox-module__contain___8-yaS",Ua="LightBox-module__cover___hNvOG",qa="LightBox-module__caption___b6L2I",Ga="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Ka="LightBox-module__arrowVertical___Zfz81",Za="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Qa="LightBox-module__arrowIcon___3VaFf",el="LightBox-module__arrowImg___pNV88",tl="LightBox-module__mirror___pjeXc",nl="LightBox-module__thumbsWrapper___GB-nU",ol="LightBox-module__thumbsContainerVertical___wttk5",rl="LightBox-module__thumbsContainer___osSma",il="LightBox-module__thumbsAlignStart___MO6tY",al="LightBox-module__thumbsAlignCenter___Q4sUx",ll="LightBox-module__thumbsAlignEnd___p4y9R",sl="LightBox-module__thumbItem___HvnF3",cl="LightBox-module__closeButton___g2khP",pl="LightBox-module__fadeIn___0m5GW",ul="LightBox-module__slideInLeft___gPYwC",dl="LightBox-module__slideInRight___S-pPp",gl="LightBox-module__slideInTop___DFdAj",ml="LightBox-module__slideInBottom___m27kZ",fl="LightBox-module__fadeOut___55qBR",yl="LightBox-module__slideOutLeft___NvU7P",hl="LightBox-module__slideOutRight___SK7eC",vl="LightBox-module__slideOutTop___Vgg0z",bl="LightBox-module__slideOutBottom___nJ0Ef",xl="LightBox-module__scaleSlide___vZriG",U={hidden:Ha,heroImage:Na,background:Va,editor:Pa,contentStyle:ja,imageStyle:Oa,imgWrapper:Ba,contain:Da,cover:Ua,caption:qa,captionTextInner:Ga,lightboxSplide:Ya,arrow:Xa,arrowVertical:Ka,nextArrow:Za,arrowInner:Ja,arrowIcon:Qa,arrowImg:el,mirror:tl,thumbsWrapper:nl,thumbsContainerVertical:ol,thumbsContainer:rl,thumbsAlignStart:il,thumbsAlignCenter:al,thumbsAlignEnd:ll,thumbItem:sl,closeButton:cl,fadeIn:pl,slideInLeft:ul,slideInRight:dl,slideInTop:gl,slideInBottom:ml,fadeOut:fl,slideOutLeft:yl,slideOutRight:hl,slideOutTop:vl,slideOutBottom:bl,scaleSlide:xl},Yt=(e,t,n)=>{const o={},[r,s]=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"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), calc(-50% + ${w.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${w.scalingValue(t.x,n)}, calc(-50% + ${w.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${w.scalingValue(t.x,n)}), ${w.scalingValue(t.y,n)})`:o.transform=`translate(${w.scalingValue(t.x,n)}, ${w.scalingValue(t.y,n)})`,o};function mr(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 wo(e){const t=e.getBoundingClientRect(),n=mr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,c=o/r,p=s/i;let g,u;p>c?(g=o,u=o/p):(u=r,g=r*p);const L=t.left+n.left,v=t.top+n.top,f=(o-g)/2+L,d=(r-u)/2+v;return{x:f,y:d,width:g,height:u}}function To(e){const t=e.getBoundingClientRect(),n=mr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function _o(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 Sl(e,t){const n=(()=>{if(e==="fade in")return U.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return U.fadeIn;if(e==="slide in")switch(t){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return U.fadeOut;if(e==="slide in")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})(),s=(()=>{if(e==="fade in")return U.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Cl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,c]=k.useState(!1),{url:p}=e.thumbnailBlock.cover;return k.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:U.heroImage,onClick:()=>c(!0)}),a.jsx(wl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},wl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:c})=>{var V;const[p,g]=k.useState(0),[u,L]=k.useState(0),[v,f]=k.useState(!1),[d,m]=k.useState(!1),[_,b]=k.useState({}),h=k.useRef(null),E=k.useRef(null),Y=k.useRef(null),j=k.useRef(!1),C=k.useRef(null),x=k.useRef(null),R=k.useRef(null),T=k.useRef(null),O=k.useRef(!1),W=k.useRef(null),[H,N]=k.useState(!1),{appear:X,triggers:D,slider:y,thumbnail:M,controls:F,area:I,caption:S,layout:$}=r.lightboxBlock,{appearClass:Z,backdropAppearClass:ie,backdropDisappearClass:ne,disappearClass:se}=Sl(X.type,X.direction),z=(c==null?void 0:c.itemId)??null;k.useEffect(()=>{const l=()=>{setTimeout(()=>{var P,B;(B=(P=h.current)==null?void 0:P.splide)==null||B.refresh()},16)},A=()=>{L(P=>P+1)};return window.addEventListener("ArticleEditor.Layout:change",l),window.addEventListener("ArticleEditor.ComponentContent:change",A),()=>{window.removeEventListener("ArticleEditor.Layout:change",l),window.removeEventListener("ArticleEditor.ComponentContent:change",A)}},[]),k.useEffect(()=>{if(!e||!M.isActive){N(!1);return}const l=W.current;if(!l)return;const A=()=>{y.direction==="horiz"?N(l.scrollWidth>l.clientWidth):N(l.scrollHeight>l.clientHeight)};A();const P=new ResizeObserver(A);return P.observe(l),()=>P.disconnect()},[e,M.isActive,n.length,_,y.direction]);const ee=k.useCallback(()=>{const l=window.matchMedia("(max-width: 768px)").matches,A=_o(I.color);l&&!i&&A>.9&&(document.body.style.backgroundColor=""),f(!0),j.current=!0;const P=B=>{B.target===C.current&&B.animationName&&(C.current&&x.current&&C.current.removeEventListener("animationend",x.current),x.current=null,j.current&&(j.current=!1,t()),f(!1))};C.current&&(x.current=P,C.current.addEventListener("animationend",P))},[t,I.color,i]),me=(l,A,P)=>{var B,q;if(l){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&p===n.length-1?ee():(B=h.current)==null||B.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const G=l.getBoundingClientRect(),K=A-G.left,te=P-G.top,le=G.width,ce=G.height;let de;y.direction==="horiz"?de=K<le/2?"-1":"+1":de=te<ce/2?"-1":"+1",(q=h.current)==null||q.go(de)}}},ae=l=>{if(O.current){O.current=!1;return}const A=n[p],P=(A==null?void 0:A.image.objectFit)==="cover";let B,q;if("changedTouches"in l&&l.changedTouches.length>0)B=l.changedTouches[0].clientX,q=l.changedTouches[0].clientY;else if("clientX"in l)B=l.clientX,q=l.clientY;else return;let G;if(P&&Y.current){const K=To(Y.current);G=B>=K.left&&B<=K.right&&q>=K.top&&q<=K.bottom}else{const K=Y.current?wo(Y.current):null;if(!K){l.target===l.currentTarget&&ee();return}G=B>=K.x&&B<=K.x+K.width&&q>=K.y&&q<=K.y+K.height}G?me(Y.current,B,q):ee()},ue=l=>{const A=l.target;(A.classList.contains(U.thumbsWrapper)||A.classList.contains(U.thumbsContainer))&&ae(l)};k.useEffect(()=>{if(!e)return;const l=A=>{var P,B;if(A.key==="Escape"){ee();return}if(A.key==="ArrowRight"){g(q=>(q+1)%Math.max(n.length,1)),(P=h.current)==null||P.go("+1");return}A.key==="ArrowLeft"&&(g(q=>(q-1+Math.max(n.length,1))%Math.max(n.length,1)),(B=h.current)==null||B.go("-1"))};return window.addEventListener("keydown",l),()=>{window.removeEventListener("keydown",l)}},[e,ee,n.length]),k.useEffect(()=>{if(e){if(g(0),L(A=>A+1),j.current=!1,f(!1),m(!1),b({}),!z)return;const l=new CustomEvent("page-overlay",{detail:{itemId:z}});window.dispatchEvent(l)}return()=>{C.current&&x.current&&(C.current.removeEventListener("animationend",x.current),x.current=null),m(!1)}},[e,z]),k.useEffect(()=>{E.current!==null&&E.current!==y.type&&L(l=>l+1),E.current=y.type},[y.type]),k.useEffect(()=>{if(!e)return;const l=document.body.style.overflow,A=window.matchMedia("(max-width: 768px)").matches,P=_o(I.color);document.body.style.overflow="hidden",m(!1);const B=G=>{G.target===C.current&&!j.current&&G.animationName&&(A&&!i&&P>.9&&(document.body.style.backgroundColor=I.color),m(!0),C.current&&R.current&&C.current.removeEventListener("animationend",R.current),R.current=null)};C.current&&(R.current=B,C.current.addEventListener("animationend",B));const q=G=>{const K=G.target;K&&(K.closest(`.${U.thumbsWrapper}`)||K.closest(`.${U.thumbsContainer}`))||y.type!=="slide"&&G.preventDefault()};return document.addEventListener("touchmove",q,{passive:!1}),()=>{document.body.style.overflow=l,document.removeEventListener("touchmove",q),C.current&&R.current&&(C.current.removeEventListener("animationend",R.current),R.current=null),m(!1)}},[e,i,I.color,y.type]),k.useEffect(()=>{if(!e)return;const l=A=>{var B,q;if(j.current){A.stopPropagation();return}if(O.current){O.current=!1;return}const P=A.target;if(!(P&&(P.closest(`.${U.thumbsContainer}`)||P.closest(`.${U.thumbItem}`)))){if(y.type==="slide"&&D.type==="drag"&&((q=(B=h.current)==null?void 0:B.splide)!=null&&q.root)){const G=h.current.splide.root;if(P&&(G.contains(P)||G===P))return}if(A.touches.length===0&&A.changedTouches.length>0){const G=n[p],K=(G==null?void 0:G.image.objectFit)==="cover",te=A.changedTouches[0];let le;if(K&&Y.current){const ce=To(Y.current);le=te.clientX>=ce.left&&te.clientX<=ce.right&&te.clientY>=ce.top&&te.clientY<=ce.bottom}else{const ce=Y.current?wo(Y.current):null;if(!ce)return;le=te.clientX>=ce.x&&te.clientX<=ce.x+ce.width&&te.clientY>=ce.y&&te.clientY<=ce.y+ce.height}if(!le){A.stopPropagation(),j.current=!0;const ce=de=>{de.stopPropagation(),de.preventDefault(),document.removeEventListener("click",ce,!0)};document.addEventListener("click",ce,!0),ee()}}}};return document.addEventListener("touchend",l,{passive:!0}),()=>{document.removeEventListener("touchend",l)}},[e,ee,p,n]);const Q=(y.type==="scale"||y.type==="fade")&&y.direction==="vert"&&D.type==="drag";k.useEffect(()=>{var de,we;if(!e||!Q||!((we=(de=h.current)==null?void 0:de.splide)!=null&&we.root))return;const l=h.current.splide.root,A=30,P=(oe,ye)=>{if(T.current){const Te=Math.abs(oe-T.current.x),Xe=Math.abs(ye-T.current.y);(Te>0||Xe>0)&&(O.current=!0)}},B=oe=>{T.current&&(oe.preventDefault(),P(oe.clientX,oe.clientY))},q=oe=>{T.current&&oe.touches.length>0&&(oe.preventDefault(),P(oe.touches[0].clientX,oe.touches[0].clientY))},G=(oe,ye)=>{if(!T.current||!h.current){T.current=null;return}const Te=Math.abs(oe-T.current.x),Xe=Math.abs(ye-T.current.y);Xe>A&&Xe>Te&&h.current.go(ye<T.current.y?"+1":"-1"),T.current=null},K=oe=>{T.current&&G(oe.clientX,oe.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",B)},te=oe=>{if(T.current){if(oe.changedTouches.length>0){const ye=oe.changedTouches[0];G(ye.clientX,ye.clientY)}document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),document.removeEventListener("touchmove",q)}},le=oe=>{T.current={x:oe.clientX,y:oe.clientY},O.current=!1,document.addEventListener("pointermove",B,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},ce=oe=>{oe.touches.length>0&&(T.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",te),document.addEventListener("touchcancel",te))};return l.addEventListener("pointerdown",le),l.addEventListener("touchstart",ce),()=>{l.removeEventListener("pointerdown",le),l.removeEventListener("touchstart",ce),document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),T.current=null,O.current=!1}},[e,Q,u]);const fe={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:xr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:C,className:pe(U.background,v?ne:ie,{[U.editor]:i},{[U.hidden]:!e}),style:{...fe,...d&&!i&&!v?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?C:null,className:pe(U.contentStyle,v?se:Z,{[U.editor]:i},{[U.hidden]:!e}),style:{animationDuration:`${parseInt(X.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(dr,{onMove:l=>g(l.index),ref:h,className:U.lightboxSplide,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,direction:y.direction==="horiz"||y.type==="fade"||y.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!Q,perPage:1,width:"100%",height:"100%",type:y.type==="fade"||y.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":y.duration},children:n.map((l,A)=>{const P=Yt($.position,$.offset,i),B=`${w.scalingValue($.padding.top,i)} ${w.scalingValue($.padding.right,i)} ${w.scalingValue($.padding.bottom,i)} ${w.scalingValue($.padding.left,i)}`,q=y.type==="scale"?(()=>{const{transform:G,...K}=P;return{...K,position:"absolute",padding:B,boxSizing:"border-box","--position-transform":G||"none"}})():{...P,position:"absolute",padding:B,boxSizing:"border-box"};return a.jsx(gr,{children:a.jsx("div",{className:U.imgWrapper,onClick:ae,children:a.jsx("img",{ref:A===p?Y:null,className:pe(U.imageStyle,{[U.contain]:l.image.objectFit==="contain",[U.cover]:l.image.objectFit==="cover",[U.scaleSlide]:y.type==="scale"}),src:l.image.url,alt:l.image.name??"",style:{...q,pointerEvents:l.image.objectFit==="contain"?"none":"auto"}})})},A)})},u),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:pe(U.arrow,{[U.arrowVertical]:y.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${w.scalingValue(F.offset.x,i)}, ${w.scalingValue(F.offset.y*(y.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var l;return(l=h.current)==null?void 0:l.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&a.jsx(Je,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:pe(U.arrowImg,U.mirror)}),!F.arrowsImgUrl&&a.jsx($o,{color:F.color,className:pe(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:pe(U.arrow,U.nextArrow,{[U.arrowVertical]:y.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${w.scalingValue(F.offset.x*(y.direction==="horiz"?-1:1),i)}, ${w.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var l;return(l=h.current)==null?void 0:l.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&a.jsx(Je,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:U.arrowImg}),!F.arrowsImgUrl&&a.jsx($o,{color:F.color,className:pe(U.arrowIcon,U.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const l=Yt(I.closeIconAlign,I.closeIconOffset,i),A=`scale(${I.closeIconScale})`,P=l.transform?`${l.transform} ${A}`:A;return a.jsx("button",{className:U.closeButton,style:{...l,transform:P},onClick:ee,"aria-label":"Close lightbox",children:a.jsx(Je,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),S&&S.isActive&&o.imageCaption&&((V=n[p])==null?void 0:V.imageCaption)&&(()=>{const{widthSettings:l,fontSettings:A,letterSpacing:P,textAlign:B,wordSpacing:q,fontSizeLineHeight:G,textAppearance:K,color:te}=o.imageCaption;return a.jsx("div",{className:U.caption,style:{...Yt(S.alignment,S.offset,i),fontFamily:A.fontFamily,fontWeight:A.fontWeight,fontStyle:A.fontStyle,width:l.sizing==="auto"?"max-content":w.scalingValue(l.width,i),letterSpacing:w.scalingValue(P,i),wordSpacing:w.scalingValue(q,i),textAlign:B,fontSize:w.scalingValue(G.fontSize,i),lineHeight:w.scalingValue(G.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te},onClick:le=>le.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":S.linkColor,"--link-hover-color":S.linkHoverColor},children:a.jsx(zt,{content:n[p].imageCaption})})})})(),M.isActive&&(()=>{const[l,A]=M.position.split("-"),P=y.direction==="horiz"?`${l}-left`:M.position,B=Yt(P,M.offset,i),q=()=>{if(y.direction==="horiz"){if(A==="left")return"flex-start";if(A==="center")return"center";if(A==="right")return"flex-end"}else{if(l==="top")return"flex-start";if(l==="middle")return"center";if(l==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:U.thumbsWrapper,onClick:G=>ue(G),style:{position:i?"absolute":"fixed",...B,...y.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:pe(U.thumbsContainer,{[U.thumbsContainerVertical]:y.direction==="vert",[U.thumbsAlignStart]:M.align==="start",[U.thumbsAlignCenter]:M.align==="center",[U.thumbsAlignEnd]:M.align==="end"}),style:{gap:w.scalingValue(M.grid.gap,i),justifyContent:H?"flex-start":q()},children:n.map((G,K)=>{const te=K===p,le=_[K],de=M.grid.size*(te?M.activeState.scale:1),we=()=>{if(M.fit!=="fit")return{};if(!le)return y.direction==="horiz"?{height:w.scalingValue(de,i)}:{width:w.scalingValue(de,i)};const oe=le.width/le.height;if(y.direction==="horiz"){const ye=de,Te=ye*oe;return{width:w.scalingValue(Te,i),height:w.scalingValue(ye,i)}}else{const ye=de,Te=ye/oe;return{width:w.scalingValue(ye,i),height:w.scalingValue(Te,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...y.direction==="horiz"&&M.fit!=="fit"?{height:w.scalingValue(de,i)}:{},...y.direction==="vert"&&M.fit!=="fit"?{width:w.scalingValue(de,i)}:{},...M.fit==="cover"?{width:w.scalingValue(de,i),height:w.scalingValue(de,i)}:{},...we(),transition:te?"all 0.25s ease-out":"none",opacity:te?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:oe=>{var ye;oe.stopPropagation(),g(K),(ye=h.current)==null||ye.go(K)},onMouseEnter:()=>{var oe;M.triggers==="hov"&&((oe=h.current)==null||oe.go(K))},children:a.jsx("img",{src:G.image.url,alt:G.image.name??"",onLoad:oe=>{const ye=oe.currentTarget;ye.naturalWidth&&ye.naturalHeight&&b(Te=>({...Te,[K]:{width:ye.naturalWidth,height:ye.naturalHeight}}))},style:{objectFit:M.fit==="cover"?"cover":"contain",...M.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...M.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${G.image.name}-${K}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Tl={element:Cl,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 ht(e){const{color:t,...n}=e;return n}function Ze(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:w.scalingValue(e.letterSpacing,t),wordSpacing:w.scalingValue(e.wordSpacing,t),fontSize:w.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?w.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 Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _l(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: ${Xt(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: ${Xt(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: ${Xt(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: ${Xt(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}=_.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:l=[],buttonLabel:p,gap:g,fieldsGap:u,buttonCorners:F,buttonStroke:S,buttonPadding:f,isButtonFullWidth:d,inputCorners:m,inputStroke:w,inputPadding:x,inputColor:b,inputTextColor:$,inputBorderColor:j,placeholderColor:W,buttonColor:C,buttonTextColor:y,buttonBorderColor:L,labelTextColor:h,successColor:P,errorColor:T,fontFamily:z,inputFontSettings:k,inputFontSize:U,inputLineHeight:O,inputLetterSpacing:v,inputWordSpacing:I,inputTextAppearance:R,buttonFontSettings:E,buttonFontSize:A,buttonLineHeight:V,buttonLetterSpacing:X,buttonWordSpacing:rt,buttonTextAppearance:ot,labelFontSettings:lt,labelFontSize:M,labelLineHeight:Q,labelLetterSpacing:ft,labelWordSpacing:st,labelTextAppearance:gt,statusFontSettings:bt,statusFontSize:zt,statusLineHeight:q,statusLetterSpacing:c,statusWordSpacing:N,statusTextAppearance:B,successMessage:Y,errorMessage:G,stateOverrides:K}=t,J=a==="B",nt=l.slice(0,Math.min(i,l.length)),it={fontSettings:{fontFamily:z,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:U??.01,lineHeight:O,letterSpacing:v??0,wordSpacing:I??0,textAppearance:R,color:$},at=he(Zt(it,e)),pt=_.scalingValue(w??0,e),Tt=_.scalingValue((O??U??.01)+((x==null?void 0:x.top)??0)+((x==null?void 0:x.bottom)??0)+(a==="C"?w??0:(w??0)*2),e),tt={...at,borderStyle:"solid",borderRadius:a==="C"?0:_.scalingValue(m??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pt,borderLeftWidth:0}:{borderWidth:pt},paddingTop:_.scalingValue((x==null?void 0:x.top)??0,e),paddingRight:_.scalingValue((x==null?void 0:x.right)??0,e),paddingBottom:_.scalingValue((x==null?void 0:x.bottom)??0,e),paddingLeft:_.scalingValue((x==null?void 0:x.left)??0,e),height:Tt,minHeight:Tt},ut={fontSettings:{fontFamily:z,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:A??.01,lineHeight:V,letterSpacing:X??0,wordSpacing:rt??0,textAppearance:ot,color:y},St=he(Zt(ut,e)),Xt=_.scalingValue(S??0,e),bn={fontSettings:{fontFamily:z,fontWeight:(lt==null?void 0:lt.fontWeight)??400,fontStyle:(lt==null?void 0:lt.fontStyle)??"normal"},fontSize:M??.01,lineHeight:Q,letterSpacing:ft??0,wordSpacing:st??0,textAppearance:gt,color:h},$e=Zt(bn,e),ht={fontSettings:{fontFamily:z,fontWeight:(bt==null?void 0:bt.fontWeight)??400,fontStyle:(bt==null?void 0:bt.fontStyle)??"normal"},fontSize:zt??.01,lineHeight:q,letterSpacing:c??0,wordSpacing:N??0,textAppearance:B,color:P},Vt=he(Zt(ht,e)),oe=_.buildColorVars(r,{inputColor:b,inputTextColor:$,inputBorderColor:j,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:C,buttonTextColor:y,buttonBorderColor:L,labelTextColor:h,successColor:P,errorColor:T},_l,Al,K),[xt,Ht]=H.useState(()=>Object.fromEntries(nt.map(ct=>[ct.name,""]))),[no,Te]=H.useState("idle"),[mr,Ue]=H.useState(null),xn=o==="success"?"success":o==="error"?"error":no,fr=o==="error"?G:mr,qe=o==="filled",_e=H.useMemo(()=>{if(!qe)return xt;let ct=null;for(const jt of nt)(xt[jt.name]??"").trim().length>0||(ct=ct??{...xt},ct[jt.name]="Filled");return ct??xt},[xt,qe,nt]),yr=xn==="error"?_.getFormFieldValidationError(nt,_e):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(ct,jt)=>{Ht(Ot=>({...Ot,[ct]:jt}))},vr=async ct=>{ct.preventDefault();const jt=Object.fromEntries(nt.map(Et=>{var ce;return[Et.name,((ce=xt[Et.name])==null?void 0:ce.trim())??""]}).filter(([,Et])=>Et));if(!oo){Te("error"),Ue("No integrations were found for this form.");return}if(Object.keys(jt).length===0)return;const Ot=_.getFormFieldValidationError(nt,xt);if(Ot){Te("error"),Ue(Ot);return}Te("submitting"),Ue(null);try{const Et=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(jt)});if(!Et.ok){const ce=await Et.text();throw new Error(ce||`Request failed: ${Et.status}`)}Te("success"),Ht(Object.fromEntries(nt.map(ce=>[ce.name,""])))}catch(Et){Te("error"),Ue(Et instanceof Error?Et.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:_.scalingValue(g??0,e)},children:[s.jsx("div",{className:`${r}-fields`,style:{gap:_.scalingValue(u??0,e)},children:nt.map((ct,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:ct.label||ct.name}),ct.type==="textarea"?s.jsx("textarea",{name:ct.name,autoComplete:"off",value:_e[ct.name]??"",onChange:Ot=>ro(ct.name,Ot.target.value),placeholder:ct.placeholder,className:`${r}-input`,style:tt,rows:1,"data-filled":qe||(_e[ct.name]??"").trim().length>0,"data-field-type":"textarea"}):s.jsx("input",{type:ct.type==="phone"?"tel":ct.type==="email"?"email":"text",name:ct.name,autoComplete:"off",value:_e[ct.name]??"",onChange:Ot=>ro(ct.name,Ot.target.value),placeholder:ct.placeholder,required:ct.isRequired??ct.type==="email",className:`${r}-input`,style:tt,"data-filled":qe||(_e[ct.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:_.scalingValue(F??0,e),borderWidth:Xt,paddingTop:_.scalingValue((f==null?void 0:f.top)??0,e),paddingRight:_.scalingValue((f==null?void 0:f.right)??0,e),paddingBottom:_.scalingValue((f==null?void 0:f.bottom)??0,e),paddingLeft:_.scalingValue((f==null?void 0:f.left)??0,e),...St,...d?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:s.jsx("span",{className:`${r}-overlay-anchor`,style:d?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":p})})})]}),xn==="success"&&s.jsx("p",{className:`${r}-success`,style:{...Vt},children:Y}),xn==="error"&&s.jsx("p",{className:`${r}-error`,style:{...Vt},role:"alert",children:yr??fr??G})]})}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"],Ll=`import React, { useMemo, useState } from 'react';
142
+ `}function $l({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=w.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:c=[],buttonLabel:p,gap:g,fieldsGap:u,buttonCorners:L,buttonStroke:v,buttonPadding:f,isButtonFullWidth:d,inputCorners:m,inputStroke:_,inputPadding:b,inputColor:h,inputTextColor:E,inputBorderColor:Y,placeholderColor:j,buttonColor:C,buttonTextColor:x,buttonBorderColor:R,labelTextColor:T,successColor:O,errorColor:W,fontFamily:H,inputFontSettings:N,inputFontSize:X,inputLineHeight:D,inputLetterSpacing:y,inputWordSpacing:M,inputTextAppearance:F,buttonFontSettings:I,buttonFontSize:S,buttonLineHeight:$,buttonLetterSpacing:Z,buttonWordSpacing:ie,buttonTextAppearance:ne,labelFontSettings:se,labelFontSize:z,labelLineHeight:ee,labelLetterSpacing:me,labelWordSpacing:ae,labelTextAppearance:ue,statusFontSettings:Q,statusFontSize:fe,statusLineHeight:V,statusLetterSpacing:l,statusWordSpacing:A,statusTextAppearance:P,successMessage:B,errorMessage:q,stateOverrides:G}=e,K=s==="B",te=c.slice(0,Math.min(i,c.length)),le={fontSettings:{fontFamily:H,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:X??.01,lineHeight:D,letterSpacing:y??0,wordSpacing:M??0,textAppearance:F,color:E},ce=ht(Ze(le,t)),de=w.scalingValue(_??0,t),we=w.scalingValue((D??X??.01)+((b==null?void 0:b.top)??0)+((b==null?void 0:b.bottom)??0)+(s==="C"?_??0:(_??0)*2),t),oe={...ce,borderStyle:"solid",borderRadius:s==="C"?0:w.scalingValue(m??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:de,borderLeftWidth:0}:{borderWidth:de},paddingTop:w.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:w.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:w.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:w.scalingValue((b==null?void 0:b.left)??0,t),height:we,minHeight:we},ye={fontSettings:{fontFamily:H,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:S??.01,lineHeight:$,letterSpacing:Z??0,wordSpacing:ie??0,textAppearance:ne,color:x},Te=ht(Ze(ye,t)),Xe=w.scalingValue(v??0,t),bn={fontSettings:{fontFamily:H,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:z??.01,lineHeight:ee,letterSpacing:me??0,wordSpacing:ae??0,textAppearance:ue,color:T},Tt=Ze(bn,t),xe={fontSettings:{fontFamily:H,fontWeight:(Q==null?void 0:Q.fontWeight)??400,fontStyle:(Q==null?void 0:Q.fontStyle)??"normal"},fontSize:fe??.01,lineHeight:V,letterSpacing:l??0,wordSpacing:A??0,textAppearance:P,color:O},Me=ht(Ze(xe,t)),rt=w.buildColorVars(r,{inputColor:h,inputTextColor:E,inputBorderColor:Y,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:C,buttonTextColor:x,buttonBorderColor:R,labelTextColor:T,successColor:O,errorColor:W},Al,Il,G),[Ce,Pe]=k.useState(()=>Object.fromEntries(te.map(ge=>[ge.name,""]))),[no,_t]=k.useState("idle"),[fr,Ut]=k.useState(null),xn=o==="success"?"success":o==="error"?"error":no,yr=o==="error"?q:fr,qt=o==="filled",$t=k.useMemo(()=>{if(!qt)return Ce;let ge=null;for(const je of te)(Ce[je.name]??"").trim().length>0||(ge=ge??{...Ce},ge[je.name]="Filled");return ge??Ce},[Ce,qt,te]),hr=xn==="error"?w.getFormFieldValidationError(te,$t):null,vr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),oo=n==null?void 0:n.submitUrl,ro=(ge,je)=>{Pe(Oe=>({...Oe,[ge]:je}))},br=async ge=>{ge.preventDefault();const je=Object.fromEntries(te.map(Fe=>{var pt;return[Fe.name,((pt=Ce[Fe.name])==null?void 0:pt.trim())??""]}).filter(([,Fe])=>Fe));if(!oo){_t("error"),Ut("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const Oe=w.getFormFieldValidationError(te,Ce);if(Oe){_t("error"),Ut(Oe);return}_t("submitting"),Ut(null);try{const Fe=await fetch(oo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Fe.ok){const pt=await Fe.text();throw new Error(pt||`Request failed: ${Fe.status}`)}_t("success"),Pe(Object.fromEntries(te.map(pt=>[pt.name,""])))}catch(Fe){_t("error"),Ut(Fe instanceof Error?Fe.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${vr}`.trim(),style:rt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_l(r)}}),a.jsxs("form",{onSubmit:br,className:`${r}-form`,style:{gap:w.scalingValue(g??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:w.scalingValue(u??0,t)},children:te.map((ge,je)=>a.jsxs("div",{className:`${r}-field-group${K?` ${r}-labeled`:""}`,children:[K&&a.jsx("span",{className:`${r}-field-label`,style:Tt?{...Tt,lineHeight:Tt.fontSize}:void 0,children:ge.label||ge.name}),ge.type==="textarea"?a.jsx("textarea",{name:ge.name,autoComplete:"off",value:$t[ge.name]??"",onChange:Oe=>ro(ge.name,Oe.target.value),placeholder:ge.placeholder,className:`${r}-input`,style:oe,rows:1,"data-filled":qt||($t[ge.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ge.type==="phone"?"tel":ge.type==="email"?"email":"text",name:ge.name,autoComplete:"off",value:$t[ge.name]??"",onChange:Oe=>ro(ge.name,Oe.target.value),placeholder:ge.placeholder,required:ge.isRequired??ge.type==="email",className:`${r}-input`,style:oe,"data-filled":qt||($t[ge.name]??"").trim().length>0})]},je))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:w.scalingValue(L??0,t),borderWidth:Xe,paddingTop:w.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:w.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:w.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:w.scalingValue((f==null?void 0:f.left)??0,t),...Te,...d?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:d?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:no==="submitting"?"...":p})})})]}),xn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Me},children:B}),xn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:hr??yr??q})]})}const Al={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"},Il=["hover","focus","filled","success","error"],Ll=`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
- `,El=[{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:El,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:Ll};function Ze(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Rl(t){return`
744
- .${t}-wrapper {
743
+ `,El=[{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"}],Kt={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:{...Kt.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:{...Kt.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:{...Kt.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:{...Kt.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:El,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"]},Rl={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:kl,sourceCode:Ll};function Zt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wl(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: ${Ze(8)};
926
- font-size: ${Ze(14)};
927
- color: var(--${t}-success-success-color, var(--${t}-success-color));
924
+ .${e}-success {
925
+ margin-top: ${Zt(8)};
926
+ font-size: ${Zt(14)};
927
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
- .${t}-error {
930
- margin-top: ${Ze(8)};
931
- font-size: ${Ze(14)};
932
- color: var(--${t}-error-error-color, var(--${t}-error-color));
929
+ .${e}-error {
930
+ margin-top: ${Zt(8)};
931
+ font-size: ${Zt(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}=_.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:l,fieldsToShow:p=1,fontFamily:g,inputFontSettings:u,inputFontSize:F,inputLineHeight:S,inputLetterSpacing:f,inputWordSpacing:d,inputTextAppearance:m,buttonFontSettings:w,buttonFontSize:x,buttonLineHeight:b,buttonLetterSpacing:$,buttonWordSpacing:j,buttonTextAppearance:W,statusFontSettings:C,statusFontSize:y,statusLineHeight:L,statusLetterSpacing:h,statusWordSpacing:P,statusTextAppearance:T,iconMaxWidth:z,minHeight:k,corners:U,stroke:O,stateOverrides:v,inputPadding:I,buttonPadding:R,successMessage:E="Thanks for subscribing!",errorMessage:A="Please, fill all required fields."}=t,V=a.slice(0,Math.min(p,a.length)),[X,rt]=H.useState(()=>Object.fromEntries(V.map(ht=>[ht.name,""]))),[ot,lt]=H.useState("idle"),[M,Q]=H.useState(null),ft=o==="success"?"success":o==="error"?"error":ot,st=o==="error"?A:M,gt=o==="filled",bt=H.useMemo(()=>{if(!gt)return X;let ht=null;for(const Vt of V)(X[Vt.name]??"").trim().length>0||(ht=ht??{...X},ht[Vt.name]="Filled");return ht??X},[gt,X,V]),zt=ft==="error"?_.getFormFieldValidationError(V,bt):null,q=o&&o!=="default"?`${r}-state-${o}`:"",c=V.some(ht=>(bt[ht.name]??"").trim().length>0),N=q!==`${r}-state-filled`&&c?`${r}-state-filled`:"",B=`${q} ${N}`.trim(),Y=n==null?void 0:n.submitUrl,G=l??"",K=(i==null?void 0:i.icon)??"",J=(i==null?void 0:i.mode)==="On",nt=G||"Submit",it={fontSettings:{fontFamily:g,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:F??.01,lineHeight:S,letterSpacing:f??0,wordSpacing:d??0,textAppearance:m,color:t.inputTextColor??"#111111"},at={fontSettings:{fontFamily:g,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:x??.01,lineHeight:b,letterSpacing:$??0,wordSpacing:j??0,textAppearance:W,color:t.buttonTextColor??"#ffffff"},pt={fontSettings:{fontFamily:g,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:y??.01,lineHeight:L,letterSpacing:h??0,wordSpacing:P??0,textAppearance:T,color:t.successColor??"#22c55e"},Tt=he(Zt(it,e)),tt=he(Zt(at,e)),ut=he(Zt(pt,e)),St=_.buildColorVars(r,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(it==null?void 0:it.color)??"#111111",buttonTextColor:t.buttonTextColor??(at==null?void 0:at.color)??"#ffffff"},zl,Vl,v),Xt={borderRadius:_.scalingValue(U,e),borderWidth:_.scalingValue(O,e),borderStyle:"solid"},bn={borderLeftWidth:_.scalingValue(O,e)},$e=async ht=>{ht.preventDefault();const Vt=Object.fromEntries(V.map(xt=>{var Ht;return[xt.name,((Ht=X[xt.name])==null?void 0:Ht.trim())??""]}).filter(([,xt])=>xt));if(!Y){lt("error"),Q("No integrations were found for this form.");return}if(Object.keys(Vt).length===0)return;const oe=_.getFormFieldValidationError(V,X);if(oe){lt("error"),Q(oe);return}lt("submitting"),Q(null);try{const xt=await fetch(Y,{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}`)}lt("success"),rt(Object.fromEntries(V.map(Ht=>[Ht.name,""])))}catch(xt){lt("error"),Q(xt instanceof Error?xt.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${B}`.trim(),style:St,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(r)}}),s.jsxs("form",{onSubmit:$e,className:`${r}-form`,style:{...Xt,height:_.scalingValue(k,e),minHeight:_.scalingValue(k,e)},children:[s.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:V.map(ht=>s.jsx("input",{type:ht.type==="email"?"email":ht.type==="phone"?"tel":"text",name:ht.name,autoComplete:"off",value:bt[ht.name]??"",onChange:Vt=>rt(oe=>({...oe,[ht.name]:Vt.target.value})),placeholder:ht.placeholder,required:ht.isRequired??ht.type==="email",className:`${r}-input`,style:{...Tt,paddingRight:_.scalingValue(I.right,e),paddingLeft:_.scalingValue(I.left,e),paddingTop:_.scalingValue(I.top,e),paddingBottom:_.scalingValue(I.bottom,e)}},ht.name))}),s.jsx("div",{className:`${r}-overlayAnchor`,children:s.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":nt,style:{...tt,...bn,paddingRight:_.scalingValue(R.right,e),paddingLeft:_.scalingValue(R.left,e),paddingTop:_.scalingValue(R.top,e),paddingBottom:_.scalingValue(R.bottom,e)},children:ot==="submitting"?"...":J?K&&s.jsx(ye,{url:K,className:`${r}-submitBtnIcon`,style:{maxWidth:_.scalingValue(z??0,e)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):G})})]}),ft==="success"&&s.jsx("p",{className:`${r}-success`,style:{...ut},children:E}),ft==="error"&&s.jsx("p",{className:`${r}-error`,style:{...ut},role:"alert",children:zt??st??A})]})},zl={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"},Vl=["hover","focus","filled","success","error"],Ml=`import React, { useMemo, useState } from 'react';
934
+ `}const Ml=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=w.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:p=1,fontFamily:g,inputFontSettings:u,inputFontSize:L,inputLineHeight:v,inputLetterSpacing:f,inputWordSpacing:d,inputTextAppearance:m,buttonFontSettings:_,buttonFontSize:b,buttonLineHeight:h,buttonLetterSpacing:E,buttonWordSpacing:Y,buttonTextAppearance:j,statusFontSettings:C,statusFontSize:x,statusLineHeight:R,statusLetterSpacing:T,statusWordSpacing:O,statusTextAppearance:W,iconMaxWidth:H,minHeight:N,corners:X,stroke:D,stateOverrides:y,inputPadding:M,buttonPadding:F,successMessage:I="Thanks for subscribing!",errorMessage:S="Please, fill all required fields."}=e,$=s.slice(0,Math.min(p,s.length)),[Z,ie]=k.useState(()=>Object.fromEntries($.map(xe=>[xe.name,""]))),[ne,se]=k.useState("idle"),[z,ee]=k.useState(null),me=o==="success"?"success":o==="error"?"error":ne,ae=o==="error"?S:z,ue=o==="filled",Q=k.useMemo(()=>{if(!ue)return Z;let xe=null;for(const Me of $)(Z[Me.name]??"").trim().length>0||(xe=xe??{...Z},xe[Me.name]="Filled");return xe??Z},[ue,Z,$]),fe=me==="error"?w.getFormFieldValidationError($,Q):null,V=o&&o!=="default"?`${r}-state-${o}`:"",l=$.some(xe=>(Q[xe.name]??"").trim().length>0),A=V!==`${r}-state-filled`&&l?`${r}-state-filled`:"",P=`${V} ${A}`.trim(),B=n==null?void 0:n.submitUrl,q=c??"",G=(i==null?void 0:i.icon)??"",K=(i==null?void 0:i.mode)==="On",te=q||"Submit",le={fontSettings:{fontFamily:g,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:L??.01,lineHeight:v,letterSpacing:f??0,wordSpacing:d??0,textAppearance:m,color:e.inputTextColor??"#111111"},ce={fontSettings:{fontFamily:g,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:b??.01,lineHeight:h,letterSpacing:E??0,wordSpacing:Y??0,textAppearance:j,color:e.buttonTextColor??"#ffffff"},de={fontSettings:{fontFamily:g,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:x??.01,lineHeight:R,letterSpacing:T??0,wordSpacing:O??0,textAppearance:W,color:e.successColor??"#22c55e"},we=ht(Ze(le,t)),oe=ht(Ze(ce,t)),ye=ht(Ze(de,t)),Te=w.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(le==null?void 0:le.color)??"#111111",buttonTextColor:e.buttonTextColor??(ce==null?void 0:ce.color)??"#ffffff"},zl,Hl,y),Xe={borderRadius:w.scalingValue(X,t),borderWidth:w.scalingValue(D,t),borderStyle:"solid"},bn={borderLeftWidth:w.scalingValue(D,t)},Tt=async xe=>{xe.preventDefault();const Me=Object.fromEntries($.map(Ce=>{var Pe;return[Ce.name,((Pe=Z[Ce.name])==null?void 0:Pe.trim())??""]}).filter(([,Ce])=>Ce));if(!B){se("error"),ee("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const rt=w.getFormFieldValidationError($,Z);if(rt){se("error"),ee(rt);return}se("submitting"),ee(null);try{const Ce=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const Pe=await Ce.text();throw new Error(Pe||`Request failed: ${Ce.status}`)}se("success"),ie(Object.fromEntries($.map(Pe=>[Pe.name,""])))}catch(Ce){se("error"),ee(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${P}`.trim(),style:Te,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Wl(r)}}),a.jsxs("form",{onSubmit:Tt,className:`${r}-form`,style:{...Xe,height:w.scalingValue(N,t),minHeight:w.scalingValue(N,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:$.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:Q[xe.name]??"",onChange:Me=>ie(rt=>({...rt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...we,paddingRight:w.scalingValue(M.right,t),paddingLeft:w.scalingValue(M.left,t),paddingTop:w.scalingValue(M.top,t),paddingBottom:w.scalingValue(M.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":te,style:{...oe,...bn,paddingRight:w.scalingValue(F.right,t),paddingLeft:w.scalingValue(F.left,t),paddingTop:w.scalingValue(F.top,t),paddingBottom:w.scalingValue(F.bottom,t)},children:ne==="submitting"?"...":K?G&&a.jsx(Je,{url:G,className:`${r}-submitBtnIcon`,style:{maxWidth:w.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):q})})]}),me==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ye},children:I}),me==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ye},role:"alert",children:fe??ae??S})]})},zl={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"},Hl=["hover","focus","filled","success","error"],Nl=`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,7 +1503,7 @@ 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",ql="Testimonials-module__wrapper___MSG51",Gl="Testimonials-module__cover___8N6A3",Yl="Testimonials-module__elementsOverlay___ar14y",Xl="Testimonials-module__image___fqDvN",Kl="Testimonials-module__control___ORbH3",Ft={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:ql,cover:Gl,elementsOverlay:Yl,image:Xl,control:Kl},Zl=30,Jl=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,isPreviewMode:o})=>{const{autoplay:r,align:a,speed:i,direction:l,pauseOnHover:p,gap:g,cardWidth:u,cardHeight:F,corners:S,stroke:f,strokeColor:d,bgColor:m,padding:w,logoMarginTop:x,logoWidth:b,textMarginTop:$,textMinHeight:j,captionMarginTop:W}=t,C=r==="on",y=C&&!o,L=Math.max(0,Jl(i))*Zl,h=c=>_.scalingValue(c,n??!1),P=H.useRef(null),T=H.useRef(null),z=H.useRef(null),[k,U]=H.useState(0),[O,v]=H.useState(0),I=H.useRef(0),R=H.useRef(!1),E=H.useRef(null),A=H.useRef(l),V=y&&p==="on",X=H.useMemo(()=>typeof l=="boolean"?l?"right":"left":String(l??"").trim().toLowerCase()==="right"?"right":"left",[l]),rt=c=>{var St;const N=(St=t==null?void 0:t.styles)==null?void 0:St[c];if(N)return N;const B=c==="text"?"text":"caption",Y=t==null?void 0:t[`${B}FontFamily`],G=t==null?void 0:t[`${B}FontSettings`],K=t==null?void 0:t[`${B}LetterSpacing`],J=t==null?void 0:t[`${B}WordSpacing`],nt=t==null?void 0:t[`${B}TextAlign`],it=t==null?void 0:t[`${B}TextAppearance`],at=(t==null?void 0:t[`${B}Color`])??(c==="text"?t==null?void 0:t.imageCaptionColor:void 0),pt=t==null?void 0:t[`${B}FontSize`],Tt=t==null?void 0:t[`${B}LineHeight`];return typeof Y=="string"||!!G||typeof K=="number"||typeof J=="number"||typeof nt=="string"||!!it||typeof at=="string"||typeof pt=="number"||typeof Tt=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof Y=="string"?Y:"Arial",fontWeight:typeof(G==null?void 0:G.fontWeight)=="number"?G.fontWeight:400,fontStyle:typeof(G==null?void 0:G.fontStyle)=="string"?G.fontStyle:"normal"},letterSpacing:typeof K=="number"?K:0,wordSpacing:typeof J=="number"?J:0,textAlign:nt==="left"||nt==="center"||nt==="right"?nt:"left",fontSizeLineHeight:{fontSize:typeof pt=="number"?pt:.01,lineHeight:typeof Tt=="number"?Tt:.01},textAppearance:{textTransform:(it==null?void 0:it.textTransform)??"none",textDecoration:(it==null?void 0:it.textDecoration)??"none",fontVariant:(it==null?void 0:it.fontVariant)??"normal"},color:typeof at=="string"?at:"#000000"}:void 0},ot=rt("text"),lt=rt("caption"),M=H.useMemo(()=>!C||(e==null?void 0:e.length)===0?1:O<=0||k<=0?2:Math.max(2,Math.ceil(k/O)+1),[C,e==null?void 0:e.length,O,k]);H.useLayoutEffect(()=>{if(!C)return;const c=P.current,N=z.current;if(!c||!N)return;let B=0;const Y=()=>{U(c.getBoundingClientRect().width),v(N.getBoundingClientRect().width)},G=()=>{cancelAnimationFrame(B),B=requestAnimationFrame(Y)};G();const K=new ResizeObserver(G);return K.observe(c),K.observe(N),()=>{cancelAnimationFrame(B),K.disconnect()}},[C,e==null?void 0:e.length]),H.useLayoutEffect(()=>{const c=T.current;if(!C||!c||!y)return;if(O<=0||L<=0){c.style.transform="translate3d(0, 0, 0)";return}A.current!==l&&(I.current=1-I.current,A.current=l);const N=O/L*1e3,B=X==="left"?-O:0,Y=X==="left"?0:-O,G=c.animate([{transform:`translate3d(${B}px, 0, 0)`},{transform:`translate3d(${Y}px, 0, 0)`}],{duration:N,iterations:1/0,easing:"linear"});return G.currentTime=I.current*N,R.current&&G.pause(),E.current=G,()=>{const K=typeof G.currentTime=="number"?G.currentTime:0;I.current=N>0?K/N%1:0,G.cancel(),E.current===G&&(E.current=null)}},[C,y,O,L,l]);const Q=()=>{var c;V&&(R.current=!0,(c=E.current)==null||c.pause())},ft=()=>{var c;V&&(R.current=!1,(c=E.current)==null||c.play())},st=H.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),gt=H.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),bt=(c,N,B,Y,G,K,J)=>s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:st,width:"100%"},children:[s.jsx("div",{"data-controls":Y,className:Ft.control,style:{width:"100%",height:h(K)}}),s.jsx("div",{"data-styles":B,className:Ft.caption,style:{...Zt(Ql(c),n),textAlign:gt,pointerEvents:"auto",...J?{minHeight:h(J)}:{}},children:s.jsx(Ve,{content:N})})]},G),zt=(c,N)=>{var B,Y,G,K;return s.jsxs("div",{style:{padding:`${h(w.top)} ${h(w.right)} ${h(w.bottom)} ${h(w.left)}`,width:h(u+f*2),minHeight:h(F),height:"100%",borderRadius:h(S),border:`${h(f)} solid ${d}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[((B=c.image)==null?void 0:B.url)&&s.jsx("img",{className:Ft.image,src:c.image.url,alt:c.image.name,style:{objectFit:c.image.objectFit||"cover",borderRadius:h(S),height:h(F)}}),s.jsx("div",{className:Ft.cover,style:{background:m,height:"100%"}}),s.jsxs("div",{className:Ft.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:st,textAlign:gt},children:[ot&&bt(ot,c.text,"text","textMarginTop","text",$,j),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:st,width:"100%"},children:[s.jsx("div",{"data-controls":"logoMarginTop",className:Ft.control,style:{width:"100%",height:h(x)}}),s.jsx("div",{style:{width:h(b)},children:s.jsx("img",{src:(Y=c.logo)==null?void 0:Y.url,alt:(G=c.logo)==null?void 0:G.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((K=c.logo)==null?void 0:K.objectFit)||"cover"}})})]},"logo"),lt&&bt(lt,c.caption,"caption","captionMarginTop","caption",W)]})]},N)},q=(c,N,B)=>s.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[zt(c,`card-${N}`),n&&!B&&s.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${h(g)})`,width:h(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},N);return C&&(e!=null&&e.length)&&e.length>0?s.jsx("div",{ref:P,className:mt(Ft.wrapper,Ft.marqueeWrapper),"aria-label":"Testimonials",children:s.jsx("div",{ref:T,className:Ft.marqueeTrack,onMouseEnter:Q,onMouseLeave:ft,children:Array.from({length:M},(c,N)=>s.jsx("div",{ref:N===0?z:void 0,className:Ft.marqueeSet,style:{gap:h(g),paddingRight:h(g)},"aria-hidden":N>0,children:e==null?void 0:e.map((B,Y)=>q(B,`${N}-${Y}`,Y===((e==null?void 0:e.length)??0)-1))},`set-${N}`))})}):s.jsx("div",{className:Ft.wrapper,children:s.jsx("div",{style:{display:"flex",flexDirection:"row",gap:h(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:e==null?void 0:e.map((c,N)=>q(c,N,N===((e==null?void 0:e.length)??0)-1))})})},es=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1506
+ `,Vl="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"}}}},jl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ol={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:Vl},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:[...jl],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"]},Bl={element:Ml,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:Ol,sourceCode:Nl},Dl="Testimonials-module__marqueeWrapper___CwgXx",Ul="Testimonials-module__marqueeTrack___0eRvh",ql="Testimonials-module__marqueeSet___Zz-mH",Gl="Testimonials-module__wrapper___MSG51",Yl="Testimonials-module__cover___8N6A3",Xl="Testimonials-module__elementsOverlay___ar14y",Kl="Testimonials-module__control___ORbH3",ze={marqueeWrapper:Dl,marqueeTrack:Ul,marqueeSet:ql,wrapper:Gl,cover:Yl,elementsOverlay:Xl,control:Kl},Zl=30,Jl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Ql=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),es=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:s,speed:i,direction:c,pauseOnHover:p,gap:g,cardWidth:u,corners:L,stroke:v,strokeColor:f,bgColor:d,padding:m,logoMarginTop:_,logoWidth:b,logoHeight:h,textMinHeight:E,captionMinHeight:Y,captionMarginTop:j}=e,C=r==="on",x=C&&!o,R=Math.max(0,Jl(i))*Zl,T=l=>w.scalingValue(l,n??!1),O=k.useRef(null),W=k.useRef(null),H=k.useRef(null),[N,X]=k.useState(0),[D,y]=k.useState(0),M=k.useRef(0),F=k.useRef(!1),I=k.useRef(null),S=x&&p==="on",$=k.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),Z=k.useRef($),ie=l=>{var Te;const A=(Te=e==null?void 0:e.styles)==null?void 0:Te[l];if(A)return A;const P=l==="text"?"text":"caption",B=e==null?void 0:e[`${P}FontFamily`],q=e==null?void 0:e[`${P}FontSettings`],G=e==null?void 0:e[`${P}LetterSpacing`],K=e==null?void 0:e[`${P}WordSpacing`],te=e==null?void 0:e[`${P}TextAlign`],le=e==null?void 0:e[`${P}TextAppearance`],ce=(e==null?void 0:e[`${P}Color`])??(l==="text"?e==null?void 0:e.textColor:void 0)??(l==="caption"?e==null?void 0:e.captionColor:void 0),de=e==null?void 0:e[`${P}FontSize`],we=e==null?void 0:e[`${P}LineHeight`];return typeof B=="string"||!!q||typeof G=="number"||typeof K=="number"||typeof te=="string"||!!le||typeof ce=="string"||typeof de=="number"||typeof we=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof B=="string"?B:"Arial",fontWeight:typeof(q==null?void 0:q.fontWeight)=="number"?q.fontWeight:400,fontStyle:typeof(q==null?void 0:q.fontStyle)=="string"?q.fontStyle:"normal"},letterSpacing:typeof G=="number"?G:0,wordSpacing:typeof K=="number"?K:0,textAlign:te==="left"||te==="center"||te==="right"?te:"left",fontSizeLineHeight:{fontSize:typeof de=="number"?de:.01,lineHeight:typeof we=="number"?we:.01},textAppearance:{textTransform:(le==null?void 0:le.textTransform)??"none",textDecoration:(le==null?void 0:le.textDecoration)??"none",fontVariant:(le==null?void 0:le.fontVariant)??"normal"},color:typeof ce=="string"?ce:"#000000"}:void 0},ne=ie("text"),se=ie("caption"),z=k.useMemo(()=>!C||(t==null?void 0:t.length)===0?1:D<=0||N<=0?2:Math.max(2,Math.ceil(N/D)+1),[C,t==null?void 0:t.length,D,N]);k.useLayoutEffect(()=>{if(!C)return;const l=O.current,A=H.current;if(!l||!A)return;let P=0;const B=()=>{X(l.getBoundingClientRect().width),y(A.getBoundingClientRect().width)},q=()=>{cancelAnimationFrame(P),P=requestAnimationFrame(B)};q();const G=new ResizeObserver(q);return G.observe(l),G.observe(A),()=>{cancelAnimationFrame(P),G.disconnect()}},[C,t==null?void 0:t.length]),k.useLayoutEffect(()=>{const l=W.current;if(!C||!l||!x)return;if(D<=0||R<=0){l.style.transform="translate3d(0, 0, 0)";return}Z.current!==$&&(M.current=1-M.current,Z.current=$);const A=D/R*1e3,P=$==="left"?-D:0,B=$==="left"?0:-D,q=l.animate([{transform:`translate3d(${P}px, 0, 0)`},{transform:`translate3d(${B}px, 0, 0)`}],{duration:A,iterations:1/0,easing:"linear"});return q.currentTime=M.current*A,F.current&&q.pause(),I.current=q,()=>{const G=typeof q.currentTime=="number"?q.currentTime:0;M.current=A>0?G/A%1:0,q.cancel(),I.current===q&&(I.current=null)}},[C,x,D,R,$]);const ee=()=>{var l;S&&(F.current=!0,(l=I.current)==null||l.pause())},me=()=>{var l;S&&(F.current=!1,(l=I.current)==null||l.play())},ae=k.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),ue=k.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),Q=(l,A,P,B)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ae,width:"100%"},children:[B!=null&&B.marginTop?a.jsx("div",{"data-controls":B.controlsName,"data-controls-axis":"y",className:ze.control,style:{width:"100%",height:T(B.marginTop)}}):null,a.jsx("div",{className:ze.caption,style:{...Ze(Ql(l),n),textAlign:ue,pointerEvents:"auto",...B!=null&&B.minHeight?{minHeight:T(B.minHeight)}:{}},children:a.jsx(zt,{content:A})})]},P),fe=(l,A)=>{var P,B,q;return a.jsxs("div",{style:{padding:`${T(m.top)} ${T(m.right)} ${T(m.bottom)} ${T(m.left)}`,width:T(u+v*2),height:"100%",borderRadius:T(L),border:`${T(v)} solid ${f}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:ze.cover,style:{background:d,height:"100%"}}),a.jsxs("div",{className:ze.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:ae,textAlign:ue},children:[ne&&l.text&&Q(ne,l.text,"text",{minHeight:E}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:ae,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:ze.control,style:{width:"100%",height:T(_)}}),a.jsx("div",{style:{width:T(b),height:T(h)},children:a.jsx("img",{src:(P=l.logo)==null?void 0:P.url,alt:(B=l.logo)==null?void 0:B.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((q=l.logo)==null?void 0:q.objectFit)||"cover"}})})]},"logo"),se&&l.caption&&Q(se,l.caption,"caption",{controlsName:"captionMarginTop",marginTop:j,minHeight:Y})]})]},A)},V=(l,A,P)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[fe(l,`card-${A}`),n&&!P&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(g)})`,width:T(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},A);return C&&(t!=null&&t.length)&&t.length>0?a.jsx("div",{ref:O,className:pe(ze.wrapper,ze.marqueeWrapper),"aria-label":"Testimonials",children:a.jsx("div",{ref:W,className:ze.marqueeTrack,onMouseEnter:ee,onMouseLeave:me,children:Array.from({length:z},(l,A)=>a.jsx("div",{ref:A===0?H:void 0,className:ze.marqueeSet,style:{gap:T(g),paddingRight:T(g)},"aria-hidden":A>0,children:t==null?void 0:t.map((P,B)=>V(P,`${A}-${B}`,B===((t==null?void 0:t.length)??0)-1))},`set-${A}`))})}):a.jsx("div",{className:ze.wrapper,children:a.jsx("div",{style:{display:"flex",flexDirection:"row",gap:T(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((l,A)=>V(l,A,A===((t==null?void 0:t.length)??0)-1))})})},ts=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
1507
1507
  import cn from 'classnames';
1508
1508
  import classes from './Testimonials.module.scss';
1509
1509
  import { CommonComponentProps } from '../props';
@@ -1562,7 +1562,7 @@ const resolveCaptionTextStyles = (caption: CaptionStyles): TextStyles => ({
1562
1562
  });
1563
1563
 
1564
1564
  export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
1565
- const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, cardHeight, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, textMarginTop, textMinHeight, captionMarginTop } = settings;
1565
+ const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, textMinHeight, captionMinHeight, captionMarginTop } = settings;
1566
1566
  const isAutoplay = autoplay === 'on';
1567
1567
  const isAnimating = isAutoplay && !isPreviewMode;
1568
1568
  const pxPerSec = Math.max(0, parseSpeed(speed)) * PX_PER_SEC_PER_SPEED_UNIT;
@@ -1575,7 +1575,6 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1575
1575
  const progressRef = useRef(0);
1576
1576
  const hoveringRef = useRef(false);
1577
1577
  const animRef = useRef<Animation | null>(null);
1578
- const lastDirectionRef = useRef(direction);
1579
1578
  const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
1580
1579
 
1581
1580
  const normalizedDirection = useMemo<'left' | 'right'>(() => {
@@ -1584,6 +1583,8 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1584
1583
  return d === 'right' ? 'right' : 'left';
1585
1584
  }, [direction]);
1586
1585
 
1586
+ const lastDirectionRef = useRef<'left' | 'right'>(normalizedDirection);
1587
+
1587
1588
  const resolveCaptionStyle = (kind: 'text' | 'caption'): CaptionStyles | undefined => {
1588
1589
  const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
1589
1590
  if (fromNested) return fromNested;
@@ -1597,7 +1598,8 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1597
1598
  const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
1598
1599
  const color =
1599
1600
  (settings as any)?.[\`\${prefix}Color\`] ??
1600
- (kind === 'text' ? (settings as any)?.imageCaptionColor : undefined);
1601
+ (kind === 'text' ? (settings as any)?.textColor : undefined) ??
1602
+ (kind === 'caption' ? (settings as any)?.captionColor : undefined);
1601
1603
  const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
1602
1604
  const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
1603
1605
 
@@ -1678,9 +1680,9 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1678
1680
  track.style.transform = 'translate3d(0, 0, 0)';
1679
1681
  return;
1680
1682
  }
1681
- if (lastDirectionRef.current !== direction) {
1683
+ if (lastDirectionRef.current !== normalizedDirection) {
1682
1684
  progressRef.current = 1 - progressRef.current;
1683
- lastDirectionRef.current = direction;
1685
+ lastDirectionRef.current = normalizedDirection;
1684
1686
  }
1685
1687
  const duration = (setWidth / pxPerSec) * 1000;
1686
1688
  const from = normalizedDirection === 'left' ? -setWidth : 0;
@@ -1699,7 +1701,7 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1699
1701
  anim.cancel();
1700
1702
  if (animRef.current === anim) animRef.current = null;
1701
1703
  };
1702
- }, [isAutoplay, isAnimating, setWidth, pxPerSec, direction]);
1704
+ }, [isAutoplay, isAnimating, setWidth, pxPerSec, normalizedDirection]);
1703
1705
 
1704
1706
  const onTrackEnter = () => {
1705
1707
  if (!hoverPauseEnabled) return;
@@ -1739,11 +1741,12 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1739
1741
  const renderText = (
1740
1742
  style: CaptionStyles,
1741
1743
  content: any[],
1742
- dataStyles: string,
1743
- dataControls: string,
1744
1744
  key: string,
1745
- marginTop: number,
1746
- minHeight?: number
1745
+ options?: {
1746
+ controlsName?: string;
1747
+ marginTop?: number;
1748
+ minHeight?: number;
1749
+ }
1747
1750
  ) => (
1748
1751
  <div
1749
1752
  key={key}
@@ -1754,19 +1757,21 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1754
1757
  width: '100%',
1755
1758
  }}
1756
1759
  >
1760
+ {options?.marginTop ? (
1761
+ <div
1762
+ data-controls={options.controlsName}
1763
+ data-controls-axis="y"
1764
+ className={classes.control}
1765
+ style={{ width: '100%', height: scaled(options.marginTop) }}
1766
+ />
1767
+ ) : null}
1757
1768
  <div
1758
- data-controls={dataControls}
1759
- className={classes.control}
1760
- style={{ width: '100%', height: scaled(marginTop) }}
1761
- />
1762
- <div
1763
- data-styles={dataStyles}
1764
1769
  className={classes.caption}
1765
1770
  style={{
1766
1771
  ...textStylesToCss(resolveCaptionTextStyles(style), isEditor),
1767
1772
  textAlign: overlayTextAlign,
1768
1773
  pointerEvents: 'auto',
1769
- ...(minHeight ? { minHeight: scaled(minHeight) } : {}),
1774
+ ...(options?.minHeight ? { minHeight: scaled(options.minHeight) } : {}),
1770
1775
  }}
1771
1776
  >
1772
1777
  <RichTextRenderer content={content} />
@@ -1780,7 +1785,6 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1780
1785
  style={{
1781
1786
  padding: \`\${scaled(padding.top)} \${scaled(padding.right)} \${scaled(padding.bottom)} \${scaled(padding.left)}\`,
1782
1787
  width: scaled(cardWidth + stroke * 2),
1783
- minHeight: scaled(cardHeight),
1784
1788
  height: '100%',
1785
1789
  borderRadius: scaled(corners),
1786
1790
  border: \`\${scaled(stroke)} solid \${strokeColor}\`,
@@ -1789,18 +1793,6 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1789
1793
  overflow: 'hidden',
1790
1794
  }}
1791
1795
  >
1792
- {item.image?.url && (
1793
- <img
1794
- className={classes.image}
1795
- src={item.image.url}
1796
- alt={item.image.name}
1797
- style={{
1798
- objectFit: item.image.objectFit || 'cover',
1799
- borderRadius: scaled(corners),
1800
- height: scaled(cardHeight),
1801
- }}
1802
- />
1803
- )}
1804
1796
  <div
1805
1797
  className={classes.cover}
1806
1798
  style={{background: bgColor,height: '100%'}}
@@ -1815,7 +1807,7 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1815
1807
  textAlign: overlayTextAlign,
1816
1808
  }}
1817
1809
  >
1818
- {textStyle && renderText(textStyle, item.text, 'text', 'textMarginTop', 'text', textMarginTop, textMinHeight)}
1810
+ {textStyle && item.text && renderText(textStyle, item.text, 'text', { minHeight: textMinHeight })}
1819
1811
  <div
1820
1812
  key="logo"
1821
1813
  style={{
@@ -1830,7 +1822,7 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1830
1822
  className={classes.control}
1831
1823
  style={{ width: '100%', height: scaled(logoMarginTop) }}
1832
1824
  />
1833
- <div style={{ width: scaled(logoWidth) }}>
1825
+ <div style={{ width: scaled(logoWidth), height: scaled(logoHeight) }}>
1834
1826
  <img
1835
1827
  src={item.logo?.url}
1836
1828
  alt={item.logo?.name}
@@ -1838,7 +1830,12 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1838
1830
  />
1839
1831
  </div>
1840
1832
  </div>
1841
- {captionStyle && renderText(captionStyle, item.caption, 'caption', 'captionMarginTop', 'caption', captionMarginTop)}
1833
+ {captionStyle && item.caption &&
1834
+ renderText(captionStyle, item.caption, 'caption', {
1835
+ controlsName: 'captionMarginTop',
1836
+ marginTop: captionMarginTop,
1837
+ minHeight: captionMinHeight,
1838
+ })}
1842
1839
  </div>
1843
1840
  </div>
1844
1841
  );
@@ -1919,18 +1916,13 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
1919
1916
  };
1920
1917
 
1921
1918
  export type TestimonialsItem = {
1922
- image?: {
1923
- url?: string;
1924
- name?: string;
1925
- objectFit?: 'cover' | 'contain';
1926
- };
1927
1919
  logo?: {
1928
1920
  url?: string;
1929
1921
  name?: string;
1930
1922
  objectFit?: 'cover' | 'contain';
1931
1923
  };
1932
- text: any[];
1933
- caption: any[];
1924
+ text?: any[];
1925
+ caption?: any[];
1934
1926
  };
1935
1927
 
1936
1928
  type Padding = {
@@ -1941,7 +1933,6 @@ type Padding = {
1941
1933
  };
1942
1934
 
1943
1935
  type TestimonialsSettings = {
1944
- type: 'A' | 'B';
1945
1936
  autoplay: 'on' | 'off';
1946
1937
  speed: number;
1947
1938
  align: 'start' | 'center' | 'end';
@@ -1949,7 +1940,6 @@ type TestimonialsSettings = {
1949
1940
  pauseOnHover: 'on' | 'off';
1950
1941
  gap: number;
1951
1942
  cardWidth: number;
1952
- cardHeight: number;
1953
1943
  corners: number;
1954
1944
  stroke: number;
1955
1945
  strokeColor: string;
@@ -1957,8 +1947,9 @@ type TestimonialsSettings = {
1957
1947
  padding: Padding;
1958
1948
  logoMarginTop: number;
1959
1949
  logoWidth: number;
1960
- textMarginTop: number;
1950
+ logoHeight: number;
1961
1951
  textMinHeight: number;
1952
+ captionMinHeight: number;
1962
1953
  captionMarginTop: number;
1963
1954
  styles: TestimonialsStyles;
1964
1955
  };
@@ -1992,17 +1983,19 @@ type TestimonialsStyles = {
1992
1983
  text: CaptionStyles;
1993
1984
  caption: CaptionStyles;
1994
1985
  };
1995
- `,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:.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"}},cardHeight:{type:"number",scope:"layout",title:"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",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:"Logo 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:"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:{autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",imageCaptionColor:"#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,cardHeight:.2,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,cardHeight:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,textMarginTop:0,textMinHeight:.07,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","cardHeight","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","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",title:"",items:["pauseOnHover","direction"]}]},{type:"row",items:["align"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","cardHeight","corners","stroke"]},{type:"group",title:"",items:["padding","logoWidth"]}]},{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:!1},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"]}}},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:[{image:{},logo:{objectFit:"cover",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:{},logo:{objectFit:"cover",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:{},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"}]}]}]}},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:750,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__icon___Cpw7E",cs="Testimonials-module__control___DktvH",kt={container:rs,wrapper:is,cover:as,elementsOverlay:ls,icon:ss,control:cs},ps=({settings:t,content:e,isEditor:n})=>{var b;const o=e||[],{autoplay:r,speed:a,imageWidth:i}=t,l=r==="on",p=t.width??0,g=t.imageMarginTop??0,u=t.textMarginTop??0,F=t.textMinHeight??0,S=t.captionMarginTop??0,f=o[0],d=$=>{var I;const j=(I=t==null?void 0:t.styles)==null?void 0:I[$];if(j)return j;const W=$==="text"?"text":"caption",C=t==null?void 0:t[`${W}FontFamily`],y=t==null?void 0:t[`${W}FontSettings`],L=t==null?void 0:t[`${W}LetterSpacing`],h=t==null?void 0:t[`${W}WordSpacing`],P=t==null?void 0:t[`${W}TextAlign`],T=t==null?void 0:t[`${W}TextAppearance`],z=t==null?void 0:t[`${W}Color`],k=t==null?void 0:t[`${W}FontSize`],U=t==null?void 0:t[`${W}LineHeight`];return typeof C=="string"||!!y||typeof L=="number"||typeof h=="number"||typeof P=="string"||!!T||typeof z=="string"||typeof k=="number"||typeof U=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof C=="string"?C:"Arial",fontWeight:typeof(y==null?void 0:y.fontWeight)=="number"?y.fontWeight:400,fontStyle:typeof(y==null?void 0:y.fontStyle)=="string"?y.fontStyle:"normal"},letterSpacing:typeof L=="number"?L:0,wordSpacing:typeof h=="number"?h:0,textAlign:P==="left"||P==="center"||P==="right"?P:"left",fontSizeLineHeight:{fontSize:typeof k=="number"?k:.01,lineHeight:typeof U=="number"?U:.01},textAppearance:{textTransform:(T==null?void 0:T.textTransform)??"none",textDecoration:(T==null?void 0:T.textDecoration)??"none",fontVariant:(T==null?void 0:T.fontVariant)??"normal"},color:typeof z=="string"?z:"#000000"}:void 0},m=d("text"),w=d("caption"),x=H.useMemo(()=>["text","image","caption"].map((j,W)=>({key:j,order:W})),[]);return f?s.jsx(s.Fragment,{children:s.jsxs("div",{className:kt.container,style:{flexDirection:"column",alignItems:"center"},children:[s.jsx("div",{className:mt(kt.wrapper,!l&&kt.wrapperAutoplayOff),style:{width:_.scalingValue(p,n??!1)},children:s.jsxs("div",{style:{width:_.scalingValue(p,n??!1),height:"100%",boxSizing:"border-box",position:"relative"},children:[s.jsx("div",{className:kt.cover}),s.jsx("div",{className:kt.elementsOverlay,style:{display:"flex",flexDirection:"column",inset:0,pointerEvents:"none"},children:x.map(({key:$,order:j})=>{var W,C,y;if($==="image")return s.jsxs("div",{style:{order:j,zIndex:j},children:[s.jsx("div",{"data-controls":"imageMarginTop",className:kt.control,style:{height:_.scalingValue(g,n??!1)}}),s.jsx("div",{style:{width:"100%"},children:s.jsx("img",{src:(W=f.image)==null?void 0:W.url,alt:(C=f.image)==null?void 0:C.name,className:kt.icon,style:{pointerEvents:"auto",objectFit:((y=f.image)==null?void 0:y.objectFit)||"cover",width:_.scalingValue(i??0,n??!1),height:"100%"}})})]},"image");if($==="text"&&m){const{widthSettings:L,fontSettings:h,letterSpacing:P,textAlign:T,wordSpacing:z,fontSizeLineHeight:k,textAppearance:U,color:O}=m;return s.jsxs("div",{style:{order:j,zIndex:j},children:[s.jsx("div",{"data-controls":"textMarginTop",className:kt.control,style:{height:_.scalingValue(u,n??!1)}}),s.jsx("div",{"data-styles":"text",className:kt.caption,style:{fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontStyle:h.fontStyle,minHeight:_.scalingValue(F,n??!1),letterSpacing:_.scalingValue(P,n),wordSpacing:_.scalingValue(z,n),textAlign:T,fontSize:_.scalingValue(k.fontSize,n),lineHeight:_.scalingValue(k.lineHeight,n),textTransform:U.textTransform??"none",textDecoration:U.textDecoration??"none",fontVariant:U.fontVariant??"normal",color:O,pointerEvents:"auto"},children:s.jsx(Ve,{content:f.text??[]})})]},"text")}if($==="caption"&&w){const{widthSettings:L,fontSettings:h,letterSpacing:P,textAlign:T,wordSpacing:z,fontSizeLineHeight:k,textAppearance:U,color:O}=w;return s.jsxs("div",{style:{order:j,zIndex:j},children:[s.jsx("div",{"data-controls":"captionMarginTop",className:kt.control,style:{height:_.scalingValue(S,n??!1)}}),s.jsx("div",{"data-styles":"caption",className:kt.caption,style:{fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontStyle:h.fontStyle,minHeight:0,letterSpacing:_.scalingValue(P,n),wordSpacing:_.scalingValue(z,n),textAlign:T,fontSize:_.scalingValue(k.fontSize,n),lineHeight:_.scalingValue(k.lineHeight,n),textTransform:U.textTransform??"none",textDecoration:U.textDecoration??"none",fontVariant:U.fontVariant??"normal",color:O,pointerEvents:"auto"},children:s.jsx(Ve,{content:f.caption})})]},"caption")}return null})})]})}),((b=t.controls)==null?void 0:b.isActive)==="visible"&&t.autoplay==="off"&&s.jsx("div",{children:"Controls"})]})}):s.jsx(s.Fragment,{})},us=`import cn from 'classnames';
1996
- import { useMemo } from 'react';
1986
+ `,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:.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"}},textMinHeight:{type:"number",scope:"layout",title:"Quote",min:0,max:300,display:{type:"range-control"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",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:{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,textMinHeight:.01,captionMinHeight:.01,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,textMinHeight:.07,captionMinHeight:.01,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","textMinHeight","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:"Min Height",items:["textMinHeight","captionMinHeight"]},{type:"row",title:"Logo Container",items:["logoWidth","logoHeight"]}]},{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:["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"}]}]}]}},os={element:es,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:ns,sourceCode:ts,assetsPaths:{content:[{path:"logo.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__elementsOverlay___5I51C",ls="Testimonials-module__fadeStack___pJSKQ",ss="Testimonials-module__fadeItemPrev___WZi3c",cs="Testimonials-module__fadeItemCurrent___OGTsN",ps="Testimonials-module__fadeIn___uRrx-",us="Testimonials-module__fadeOut___mRrw5",ds="Testimonials-module__icon___Cpw7E",gs="Testimonials-module__controls___W8bgx",ms="Testimonials-module__arrow___7-oep",fs="Testimonials-module__nextArrow___Sko-w",ys="Testimonials-module__arrowInner___YX29M",hs="Testimonials-module__arrowIcon___ro9aw",vs="Testimonials-module__arrowImg___uA7a-",bs="Testimonials-module__mirror___Kadn2",xs="Testimonials-module__control___DktvH",he={container:rs,wrapper:is,elementsOverlay:as,fadeStack:ls,fadeItemPrev:ss,fadeItemCurrent:cs,fadeIn:ps,fadeOut:us,icon:ds,controls:gs,arrow:ms,nextArrow:fs,arrowInner:ys,arrowIcon:hs,arrowImg:vs,mirror:bs,control:xs},Ss=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const r=t||[],{autoplay:s,speed:i,align:c,imageWidth:p,imageHeight:g,controlsWidth:u,controlsColor:L,controlsHoverColor:v,textMinHeight:f,captionMinHeight:d}=e,m=(()=>{const Q=s;if(typeof Q=="boolean")return Q;if(typeof Q=="string"){const fe=Q.trim().toLowerCase();return fe==="on"||fe==="true"}return!1})(),_=m&&!o,b=e.width??0,h=e.imageMarginTop??0,E=e.captionMarginTop??0,Y=e.textMarginTop??0,[j,C]=k.useState(0),[x,R]=k.useState(null),[T,O]=k.useState(!1),W=k.useRef(null),H=k.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),N=k.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);k.useEffect(()=>{C(0),R(null),O(!1)},[r.length]);const X=r[j],D=x===null?null:r[x],y=Q=>{var we;const fe=(we=e==null?void 0:e.styles)==null?void 0:we[Q];if(fe)return fe;const V=Q==="text"?"text":"caption",l=e==null?void 0:e[`${V}FontFamily`],A=e==null?void 0:e[`${V}FontSettings`],P=e==null?void 0:e[`${V}LetterSpacing`],B=e==null?void 0:e[`${V}WordSpacing`],q=e==null?void 0:e[`${V}TextAlign`],G=e==null?void 0:e[`${V}TextAppearance`],K=e==null?void 0:e[`${V}Color`],te=e==null?void 0:e[`${V}FontSize`],le=e==null?void 0:e[`${V}LineHeight`];return typeof l=="string"||!!A||typeof P=="number"||typeof B=="number"||typeof q=="string"||!!G||typeof K=="string"||typeof te=="number"||typeof le=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof l=="string"?l:"Arial",fontWeight:typeof(A==null?void 0:A.fontWeight)=="number"?A.fontWeight:400,fontStyle:typeof(A==null?void 0:A.fontStyle)=="string"?A.fontStyle:"normal"},letterSpacing:typeof P=="number"?P:0,wordSpacing:typeof B=="number"?B:0,textAlign:q==="left"||q==="center"||q==="right"?q:"left",fontSizeLineHeight:{fontSize:typeof te=="number"?te:.01,lineHeight:typeof le=="number"?le:.01},textAppearance:{textTransform:(G==null?void 0:G.textTransform)??"none",textDecoration:(G==null?void 0:G.textDecoration)??"none",fontVariant:(G==null?void 0:G.fontVariant)??"normal"},color:typeof K=="string"?K:"#000000"}:void 0},M=y("text"),F=y("caption");if(!X)return a.jsx(a.Fragment,{});const I=Q=>w.scalingValue(Q,n??!1),S=r.length>1,$=k.useCallback((Q,fe)=>!S||fe===Q?Q:(W.current&&window.clearTimeout(W.current),R(Q),O(!0),W.current=window.setTimeout(()=>{R(null),O(!1),W.current=null},300),fe),[S]);k.useCallback(Q=>{C(fe=>$(fe,Q))},[$]);const Z=k.useCallback(()=>{S&&C(Q=>$(Q,(Q-1+r.length)%r.length))},[S,$,r.length]),ie=k.useCallback(()=>{S&&C(Q=>$(Q,(Q+1)%r.length))},[S,$,r.length]);k.useEffect(()=>{if(!_||!S)return;const Q=typeof i=="number"&&Number.isFinite(i)?i:0,fe=Math.max(.1,Q)*1e3,V=window.setInterval(()=>{C(l=>$(l,(l+1)%r.length))},fe);return()=>{window.clearInterval(V)}},[_,S,$,r.length,i]),k.useEffect(()=>()=>{W.current&&window.clearTimeout(W.current)},[]);const ne=e.controls??{isActive:"visible",arrowsImgUrl:null},se=ne.mode,ee=(ne.isActive==="visible"||se==="On")&&S,me=k.useMemo(()=>I(.01),[n]),ae=k.useMemo(()=>w.scalingValue(u??.02,n??!1),[u,n]),ue=k.useCallback(Q=>a.jsx(a.Fragment,{children:["text","image","caption"].map(fe=>{var V,l,A;if(fe==="image")return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:he.control,style:{height:w.scalingValue(h,n??!1),width:"100%"}}),a.jsx("img",{src:(V=Q.image)==null?void 0:V.url,alt:(l=Q.image)==null?void 0:l.name,className:he.icon,style:{pointerEvents:"auto",objectFit:((A=Q.image)==null?void 0:A.objectFit)||"cover",width:w.scalingValue(p??0,n??!1),height:w.scalingValue(g??0,n??!1)}})]},"image");if(fe==="text"&&M){const{fontSettings:P,letterSpacing:B,wordSpacing:q,fontSizeLineHeight:G,textAppearance:K,color:te}=M;return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:he.control,style:{height:w.scalingValue(Y,n??!1),width:"100%"}}),a.jsx("div",{style:{fontFamily:P.fontFamily,fontWeight:P.fontWeight,fontStyle:P.fontStyle,minHeight:w.scalingValue(f??0,n??!1),letterSpacing:w.scalingValue(B,n),wordSpacing:w.scalingValue(q,n),textAlign:N,fontSize:w.scalingValue(G.fontSize,n),lineHeight:w.scalingValue(G.lineHeight,n),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te,pointerEvents:"auto"},children:a.jsx(zt,{content:Q.text??[]})})]},"text")}if(fe==="caption"&&F){const{fontSettings:P,letterSpacing:B,wordSpacing:q,fontSizeLineHeight:G,textAppearance:K,color:te}=F;return a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:he.control,style:{height:w.scalingValue(E,n??!1),width:"100%"}}),a.jsx("div",{style:{fontFamily:P.fontFamily,fontWeight:P.fontWeight,fontStyle:P.fontStyle,minHeight:w.scalingValue(d??0,n??!1),letterSpacing:w.scalingValue(B,n),wordSpacing:w.scalingValue(q,n),textAlign:N,fontSize:w.scalingValue(G.fontSize,n),lineHeight:w.scalingValue(G.lineHeight,n),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te,pointerEvents:"auto"},children:a.jsx(zt,{content:Q.caption})})]},"caption")}return null})}),[E,F,h,p,g,n,H,N,f,M]);return a.jsx(a.Fragment,{children:a.jsxs("div",{className:he.container,style:{flexDirection:"column",alignItems:"center"},children:[a.jsx("div",{className:pe(he.elementsOverlay,he.wrapper,!m&&he.wrapperAutoplayOff),style:{width:w.scalingValue(b,n??!1),display:"flex",flexDirection:"column",alignItems:H,inset:0,pointerEvents:"none",height:"100%",boxSizing:"border-box",position:"relative"},children:a.jsxs("div",{className:he.fadeStack,children:[D&&T&&a.jsx("div",{className:pe(he.fadeItemPrev,he.fadeOut),children:ue(D)}),a.jsx("div",{className:pe(he.fadeItemCurrent,T?he.fadeIn:void 0),children:ue(X)})]})}),ee&&a.jsxs("div",{className:he.controls,style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:me,paddingRight:me},children:[a.jsx("div",{className:he.arrow,style:{pointerEvents:"auto",width:ae,height:ae,"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:he.arrowInner,onClick:Z,"aria-label":"Previous testimonial",style:{pointerEvents:"auto"},children:ne.arrowsImgUrl?a.jsx(Je,{url:ne.arrowsImgUrl,fill:L,hoverFill:v,className:pe(he.arrowImg,he.mirror)}):a.jsx(Io,{color:L,className:pe(he.arrowIcon,he.arrowImg,he.mirror)})})}),a.jsx("div",{className:pe(he.arrow,he.nextArrow),style:{pointerEvents:"auto",width:ae,height:ae,"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:he.arrowInner,onClick:ie,"aria-label":"Next testimonial",style:{pointerEvents:"auto"},children:ne.arrowsImgUrl?a.jsx(Je,{url:ne.arrowsImgUrl,fill:L,hoverFill:v,className:he.arrowImg}):a.jsx(Io,{color:L,className:pe(he.arrowIcon,he.arrowImg)})})})]})]})})},Io=({color:e,className:t})=>a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})}),Cs=`import cn from 'classnames';
1987
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
1997
1988
  import classes from './Testimonials.module.scss';
1998
1989
  import { CommonComponentProps } from '../props';
1999
1990
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
2000
1991
  import { scalingValue } from '../utils/scalingValue';
1992
+ import { SvgImage } from '../helpers/SvgImage/SvgImage';
2001
1993
 
2002
1994
  type TestimonialsProps = {
2003
1995
  settings: TestimonialsSettings;
2004
1996
  content?: TestimonialsItem[];
2005
1997
  isEditor?: boolean;
1998
+ isPreviewMode?: boolean;
2006
1999
  } & CommonComponentProps;
2007
2000
 
2008
2001
  type CaptionStyleFromFlatSettings = {
@@ -2030,18 +2023,62 @@ type CaptionStyleFromFlatSettings = {
2030
2023
  color: string;
2031
2024
  };
2032
2025
 
2033
- export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsProps) => {
2026
+ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
2034
2027
  const items = content || [];
2035
- const { autoplay, speed, imageWidth } = settings;
2036
- const isAutoplay = autoplay === 'on';
2028
+ const { autoplay, speed, align, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor, textMinHeight, captionMinHeight } = settings;
2029
+ const isAutoplay = (() => {
2030
+ const v = autoplay as unknown;
2031
+ if (typeof v === 'boolean') return v;
2032
+ if (typeof v === 'string') {
2033
+ const s = v.trim().toLowerCase();
2034
+ return s === 'on' || s === 'true';
2035
+ }
2036
+ return false;
2037
+ })();
2038
+ const isAnimating = isAutoplay && !isPreviewMode;
2037
2039
 
2038
2040
  const cardWidth = settings.width ?? 0;
2039
2041
  const imageMarginTop = settings.imageMarginTop ?? 0;
2040
- const textMarginTop = settings.textMarginTop ?? 0;
2041
- const textMinHeight = settings.textMinHeight ?? 0;
2042
2042
  const captionMarginTop = settings.captionMarginTop ?? 0;
2043
+ const textMarginTop = settings.textMarginTop ?? 0;
2044
+
2045
+ const [activeIndex, setActiveIndex] = useState(0);
2046
+ const [prevIndex, setPrevIndex] = useState<number | null>(null);
2047
+ const [isFading, setIsFading] = useState(false);
2048
+ const fadeTimerRef = useRef<number | null>(null);
2049
+
2050
+ const overlayAlignItems = useMemo(() => {
2051
+ switch (align) {
2052
+ case 'center':
2053
+ return 'center' as const;
2054
+ case 'end':
2055
+ return 'flex-end' as const;
2056
+ case 'start':
2057
+ default:
2058
+ return 'flex-start' as const;
2059
+ }
2060
+ }, [align]);
2061
+
2062
+ const overlayTextAlign = useMemo(() => {
2063
+ switch (align) {
2064
+ case 'center':
2065
+ return 'center' as const;
2066
+ case 'end':
2067
+ return 'right' as const;
2068
+ case 'start':
2069
+ default:
2070
+ return 'left' as const;
2071
+ }
2072
+ }, [align]);
2043
2073
 
2044
- const item = items[0];
2074
+ useEffect(() => {
2075
+ setActiveIndex(0);
2076
+ setPrevIndex(null);
2077
+ setIsFading(false);
2078
+ }, [items.length]);
2079
+
2080
+ const currentItem = items[activeIndex];
2081
+ const previousItem = prevIndex === null ? null : items[prevIndex];
2045
2082
 
2046
2083
  const resolveCaptionStyle = (
2047
2084
  kind: 'text' | 'caption'
@@ -2099,12 +2136,209 @@ export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsP
2099
2136
 
2100
2137
  const textStyle = resolveCaptionStyle('text');
2101
2138
  const captionStyle = resolveCaptionStyle('caption');
2102
- const elementOrder = useMemo(() => {
2103
- const order: ElementOrderKey[] = ['text', 'image', 'caption'];
2104
- return order.map((key, index: number) => ({ key, order: index }));
2139
+
2140
+ if (!currentItem) return <></>;
2141
+
2142
+ const scaled = (v: number) => scalingValue(v, isEditor ?? false);
2143
+
2144
+ const canSwitch = items.length > 1;
2145
+ const commitTransition = useCallback((currentIndex: number, nextIndex: number) => {
2146
+ if (!canSwitch) return currentIndex;
2147
+ if (nextIndex === currentIndex) return currentIndex;
2148
+ if (fadeTimerRef.current) window.clearTimeout(fadeTimerRef.current);
2149
+ setPrevIndex(currentIndex);
2150
+ setIsFading(true);
2151
+ fadeTimerRef.current = window.setTimeout(() => {
2152
+ setPrevIndex(null);
2153
+ setIsFading(false);
2154
+ fadeTimerRef.current = null;
2155
+ }, 300);
2156
+ return nextIndex;
2157
+ }, [canSwitch]);
2158
+
2159
+ const transitionToIndex = useCallback((nextIndex: number) => {
2160
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, nextIndex));
2161
+ }, [commitTransition]);
2162
+
2163
+ const goPrev = useCallback(() => {
2164
+ if (!canSwitch) return;
2165
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex - 1 + items.length) % items.length));
2166
+ }, [canSwitch, commitTransition, items.length]);
2167
+
2168
+ const goNext = useCallback(() => {
2169
+ if (!canSwitch) return;
2170
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2171
+ }, [canSwitch, commitTransition, items.length]);
2172
+
2173
+ useEffect(() => {
2174
+ if (!isAnimating || !canSwitch) return;
2175
+ const speedSeconds = typeof speed === 'number' && Number.isFinite(speed) ? speed : 0;
2176
+ const intervalMs = Math.max(0.1, speedSeconds) * 1000;
2177
+ const id = window.setInterval(() => {
2178
+ setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
2179
+ }, intervalMs);
2180
+ return () => {
2181
+ window.clearInterval(id);
2182
+ };
2183
+ }, [isAnimating, canSwitch, commitTransition, items.length, speed]);
2184
+
2185
+ useEffect(() => {
2186
+ return () => {
2187
+ if (fadeTimerRef.current) window.clearTimeout(fadeTimerRef.current);
2188
+ };
2105
2189
  }, []);
2106
2190
 
2107
- if (!item) return <></>;
2191
+ const controls: TestimonialsSettings['controls'] = settings.controls ?? {
2192
+ isActive: 'visible',
2193
+ arrowsImgUrl: null,
2194
+ align: 'bottom-center',
2195
+ gap: 0.01,
2196
+ scale: 100,
2197
+ color: '#FFFFFF',
2198
+ hover: '#EABC01',
2199
+ };
2200
+
2201
+ const controlsMode = (controls as unknown as { mode?: string }).mode;
2202
+ const isControlsVisible =
2203
+ controls.isActive === 'visible' ||
2204
+ controlsMode === 'On';
2205
+ const showControls = isControlsVisible && canSwitch;
2206
+ const controlsInsetX = useMemo(() => scaled(0.01), [isEditor]);
2207
+ const controlsIconSize = useMemo(
2208
+ () => scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
2209
+ [controlsWidth, isEditor]
2210
+ );
2211
+
2212
+ const renderItemContent = useCallback((item: TestimonialsItem) => {
2213
+ return (
2214
+ <>
2215
+ {['text', 'image', 'caption'].map((key: string) => {
2216
+ if (key === 'image') {
2217
+ return (
2218
+ <div
2219
+ key="image"
2220
+ style={{
2221
+ display: 'flex',
2222
+ flexDirection: 'column',
2223
+ alignItems: overlayAlignItems,
2224
+ width: '100%',
2225
+ }}
2226
+ >
2227
+ <div
2228
+ data-controls="imageMarginTop"
2229
+ className={classes.control}
2230
+ style={{ height: scalingValue(imageMarginTop, isEditor ?? false), width: '100%' }}
2231
+ />
2232
+ <img
2233
+ src={item.image?.url}
2234
+ alt={item.image?.name}
2235
+ className={classes.icon}
2236
+ style={{
2237
+ pointerEvents: 'auto',
2238
+ objectFit: item.image?.objectFit || 'cover',
2239
+ width: scalingValue(imageWidth ?? 0, isEditor ?? false),
2240
+ height: scalingValue(imageHeight ?? 0, isEditor ?? false),
2241
+ }}
2242
+ />
2243
+ </div>
2244
+ );
2245
+ }
2246
+ if (key === 'text' && textStyle) {
2247
+ const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = textStyle;
2248
+ return (
2249
+ <div
2250
+ key="text"
2251
+ style={{
2252
+ display: 'flex',
2253
+ flexDirection: 'column',
2254
+ alignItems: overlayAlignItems,
2255
+ width: '100%',
2256
+ }}
2257
+ >
2258
+ <div
2259
+ data-controls="textMarginTop"
2260
+ className={classes.control}
2261
+ style={{ height: scalingValue(textMarginTop, isEditor ?? false), width: '100%' }}
2262
+ />
2263
+ <div
2264
+ style={{
2265
+ fontFamily: fontSettings.fontFamily,
2266
+ fontWeight: fontSettings.fontWeight,
2267
+ fontStyle: fontSettings.fontStyle,
2268
+ minHeight: scalingValue(textMinHeight ?? 0, isEditor ?? false),
2269
+ letterSpacing: scalingValue(letterSpacing, isEditor),
2270
+ wordSpacing: scalingValue(wordSpacing, isEditor),
2271
+ textAlign: overlayTextAlign,
2272
+ fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2273
+ lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2274
+ textTransform: textAppearance.textTransform ?? 'none',
2275
+ textDecoration: textAppearance.textDecoration ?? 'none',
2276
+ fontVariant: textAppearance.fontVariant ?? 'normal',
2277
+ color,
2278
+ pointerEvents: 'auto',
2279
+ }}
2280
+ >
2281
+ <RichTextRenderer content={item.text ?? []} />
2282
+ </div>
2283
+ </div>
2284
+ );
2285
+ }
2286
+ if (key === 'caption' && captionStyle) {
2287
+ const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = captionStyle;
2288
+ return (
2289
+ <div
2290
+ key="caption"
2291
+ style={{
2292
+ display: 'flex',
2293
+ flexDirection: 'column',
2294
+ alignItems: overlayAlignItems,
2295
+ width: '100%',
2296
+ }}
2297
+ >
2298
+ <div
2299
+ data-controls="captionMarginTop"
2300
+ className={classes.control}
2301
+ style={{ height: scalingValue(captionMarginTop, isEditor ?? false), width: '100%' }}
2302
+ />
2303
+ <div
2304
+ style={{
2305
+ fontFamily: fontSettings.fontFamily,
2306
+ fontWeight: fontSettings.fontWeight,
2307
+ fontStyle: fontSettings.fontStyle,
2308
+ minHeight: scalingValue(captionMinHeight ?? 0, isEditor ?? false),
2309
+ letterSpacing: scalingValue(letterSpacing, isEditor),
2310
+ wordSpacing: scalingValue(wordSpacing, isEditor),
2311
+ textAlign: overlayTextAlign,
2312
+ fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2313
+ lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2314
+ textTransform: textAppearance.textTransform ?? 'none',
2315
+ textDecoration: textAppearance.textDecoration ?? 'none',
2316
+ fontVariant: textAppearance.fontVariant ?? 'normal',
2317
+ color,
2318
+ pointerEvents: 'auto',
2319
+ }}
2320
+ >
2321
+ <RichTextRenderer content={item.caption} />
2322
+ </div>
2323
+ </div>
2324
+ );
2325
+ }
2326
+ return null;
2327
+ })}
2328
+ </>
2329
+ );
2330
+ }, [
2331
+ captionMarginTop,
2332
+ captionStyle,
2333
+ imageMarginTop,
2334
+ imageWidth,
2335
+ imageHeight,
2336
+ isEditor,
2337
+ overlayAlignItems,
2338
+ overlayTextAlign,
2339
+ textMinHeight,
2340
+ textStyle,
2341
+ ]);
2108
2342
 
2109
2343
  return (
2110
2344
  <>
@@ -2116,138 +2350,121 @@ export const TestimonialSingle = ({ settings, content, isEditor }: TestimonialsP
2116
2350
  }}
2117
2351
  >
2118
2352
  <div
2119
- className={cn(classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2353
+ className={cn(classes.elementsOverlay, classes.wrapper, !isAutoplay && classes.wrapperAutoplayOff)}
2120
2354
  style={{
2121
2355
  width: scalingValue(cardWidth, isEditor ?? false),
2356
+ display: 'flex',
2357
+ flexDirection: 'column',
2358
+ alignItems: overlayAlignItems,
2359
+ inset: 0,
2360
+ pointerEvents: 'none',
2361
+ height: '100%',
2362
+ boxSizing: 'border-box',
2363
+ position: 'relative',
2122
2364
  }}
2123
2365
  >
2366
+ <div className={classes.fadeStack}>
2367
+ {previousItem && isFading && (
2368
+ <div className={cn(classes.fadeItemPrev, classes.fadeOut)}>
2369
+ {renderItemContent(previousItem)}
2370
+ </div>
2371
+ )}
2372
+ <div className={cn(classes.fadeItemCurrent, isFading ? classes.fadeIn : undefined)}>
2373
+ {renderItemContent(currentItem)}
2374
+ </div>
2375
+ </div>
2376
+ </div>
2377
+ {showControls && (
2124
2378
  <div
2379
+ className={classes.controls}
2125
2380
  style={{
2126
- width: scalingValue(cardWidth, isEditor ?? false),
2127
- height: '100%',
2128
- boxSizing: 'border-box',
2129
- position: 'relative',
2381
+ position: 'absolute',
2382
+ inset: 0,
2383
+ pointerEvents: 'none',
2384
+ display: 'flex',
2385
+ alignItems: 'center',
2386
+ justifyContent: 'space-between',
2387
+ paddingLeft: controlsInsetX,
2388
+ paddingRight: controlsInsetX,
2130
2389
  }}
2131
2390
  >
2132
- <div className={classes.cover} />
2133
2391
  <div
2134
- className={classes.elementsOverlay}
2392
+ className={classes.arrow}
2135
2393
  style={{
2136
- display: 'flex',
2137
- flexDirection: 'column',
2138
- inset: 0,
2139
- pointerEvents: 'none',
2394
+ pointerEvents: 'auto',
2395
+ width: controlsIconSize,
2396
+ height: controlsIconSize,
2397
+ ['--arrow-hover-color' as string]: controlsHoverColor,
2140
2398
  }}
2141
2399
  >
2142
- {elementOrder.map(({ key, order: orderIndex }: { key: ElementOrderKey, order: number }) => {
2143
- if (key === 'image') {
2144
- return (
2145
- <div key="image" style={{ order: orderIndex, zIndex: orderIndex }}>
2146
- <div
2147
- data-controls="imageMarginTop"
2148
- className={classes.control}
2149
- style={{ height: scalingValue(imageMarginTop, isEditor ?? false) }}
2150
- />
2151
- <div style={{ width: '100%'}}>
2152
- <img
2153
- src={item.image?.url}
2154
- alt={item.image?.name}
2155
- className={classes.icon}
2156
- style={{
2157
- pointerEvents: 'auto',
2158
- objectFit: item.image?.objectFit || 'cover',
2159
- width: scalingValue(imageWidth ?? 0, isEditor ?? false),
2160
- height: '100%',
2161
- }}
2162
- />
2163
- </div>
2164
- </div>
2165
- );
2166
- }
2167
- if (key === 'text' && textStyle) {
2168
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2169
- textStyle;
2170
- return (
2171
- <div key="text" style={{ order: orderIndex, zIndex: orderIndex }}>
2172
- <div
2173
- data-controls="textMarginTop"
2174
- className={classes.control}
2175
- style={{ height: scalingValue(textMarginTop, isEditor ?? false) }}
2176
- />
2177
- <div
2178
- data-styles="text"
2179
- className={classes.caption}
2180
- style={{
2181
- fontFamily: fontSettings.fontFamily,
2182
- fontWeight: fontSettings.fontWeight,
2183
- fontStyle: fontSettings.fontStyle,
2184
- minHeight: scalingValue(textMinHeight, isEditor ?? false),
2185
- letterSpacing: scalingValue(letterSpacing, isEditor),
2186
- wordSpacing: scalingValue(wordSpacing, isEditor),
2187
- textAlign,
2188
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2189
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2190
- textTransform: textAppearance.textTransform ?? 'none',
2191
- textDecoration: textAppearance.textDecoration ?? 'none',
2192
- fontVariant: textAppearance.fontVariant ?? 'normal',
2193
- color,
2194
- pointerEvents: 'auto'
2195
- }}
2196
- >
2197
- <RichTextRenderer content={item.text ?? []} />
2198
- </div>
2199
- </div>
2200
- );
2201
- }
2202
- if (key === 'caption' && captionStyle) {
2203
- const { widthSettings, fontSettings, letterSpacing, textAlign, wordSpacing, fontSizeLineHeight, textAppearance, color } =
2204
- captionStyle;
2205
- return (
2206
- <div key="caption" style={{ order: orderIndex, zIndex: orderIndex }}>
2207
- <div
2208
- data-controls="captionMarginTop"
2209
- className={classes.control}
2210
- style={{ height: scalingValue(captionMarginTop, isEditor ?? false) }}
2211
- />
2212
- <div
2213
- data-styles="caption"
2214
- className={classes.caption}
2215
- style={{
2216
- fontFamily: fontSettings.fontFamily,
2217
- fontWeight: fontSettings.fontWeight,
2218
- fontStyle: fontSettings.fontStyle,
2219
- minHeight: 0,
2220
- letterSpacing: scalingValue(letterSpacing, isEditor),
2221
- wordSpacing: scalingValue(wordSpacing, isEditor),
2222
- textAlign,
2223
- fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
2224
- lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
2225
- textTransform: textAppearance.textTransform ?? 'none',
2226
- textDecoration: textAppearance.textDecoration ?? 'none',
2227
- fontVariant: textAppearance.fontVariant ?? 'normal',
2228
- color,
2229
- pointerEvents: 'auto'
2230
- }}
2231
- >
2232
- <RichTextRenderer content={item.caption} />
2233
- </div>
2234
- </div>
2235
- );
2236
- }
2237
- return null;
2238
- })}
2400
+ <button
2401
+ type="button"
2402
+ className={classes.arrowInner}
2403
+ onClick={goPrev}
2404
+ aria-label="Previous testimonial"
2405
+ style={{ pointerEvents: 'auto' }}
2406
+ >
2407
+ {controls.arrowsImgUrl ? (
2408
+ <SvgImage
2409
+ url={controls.arrowsImgUrl}
2410
+ fill={controlsColor}
2411
+ hoverFill={controlsHoverColor}
2412
+ className={cn(classes.arrowImg, classes.mirror)}
2413
+ />
2414
+ ) : (
2415
+ <ArrowIcon color={controlsColor} className={cn(classes.arrowIcon, classes.arrowImg, classes.mirror)} />
2416
+ )}
2417
+ </button>
2418
+ </div>
2419
+ <div
2420
+ className={cn(classes.arrow, classes.nextArrow)}
2421
+ style={{
2422
+ pointerEvents: 'auto',
2423
+ width: controlsIconSize,
2424
+ height: controlsIconSize,
2425
+ ['--arrow-hover-color' as string]: controlsHoverColor,
2426
+ }}
2427
+ >
2428
+ <button
2429
+ type="button"
2430
+ className={classes.arrowInner}
2431
+ onClick={goNext}
2432
+ aria-label="Next testimonial"
2433
+ style={{ pointerEvents: 'auto' }}
2434
+ >
2435
+ {controls.arrowsImgUrl ? (
2436
+ <SvgImage
2437
+ url={controls.arrowsImgUrl}
2438
+ fill={controlsColor}
2439
+ hoverFill={controlsHoverColor}
2440
+ className={classes.arrowImg}
2441
+ />
2442
+ ) : (
2443
+ <ArrowIcon color={controlsColor} className={cn(classes.arrowIcon, classes.arrowImg)} />
2444
+ )}
2445
+ </button>
2239
2446
  </div>
2240
2447
  </div>
2241
- </div>
2242
- {settings.controls?.isActive === 'visible' && settings.autoplay === 'off' && (
2243
- // TODO: Add controls
2244
- <div>Controls</div>
2245
2448
  )}
2246
2449
  </div>
2247
2450
  </>
2248
2451
  );
2249
2452
  };
2250
2453
 
2454
+ const ArrowIcon = ({ color, className }: { color: string; className: string }) => {
2455
+ return (
2456
+ <svg viewBox="0 0 10 18" className={className}>
2457
+ <g stroke="none" strokeWidth="1" fillRule="evenodd">
2458
+ <path
2459
+ 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"
2460
+ fill={color}
2461
+ transform="translate(5, 9) rotate(-90) translate(-5, -9)"
2462
+ />
2463
+ </g>
2464
+ </svg>
2465
+ );
2466
+ };
2467
+
2251
2468
  export type TestimonialsItem = {
2252
2469
  image?: {
2253
2470
  url?: string;
@@ -2268,21 +2485,24 @@ type Padding = {
2268
2485
  type TestimonialsSettings = {
2269
2486
  autoplay: 'on' | 'off';
2270
2487
  speed: number;
2488
+ delay: number;
2489
+ align: 'start' | 'center' | 'end';
2271
2490
  width: number;
2272
2491
  imageMarginTop?: number;
2273
2492
  imageWidth?: number;
2274
- textMarginTop?: number;
2493
+ imageHeight?: number;
2275
2494
  textMinHeight?: number;
2495
+ textMarginTop?: number;
2496
+ captionMinHeight?: number;
2276
2497
  captionMarginTop?: number;
2277
2498
  styles: TestimonialsStyles;
2499
+ controlsColor: string;
2500
+ controlsHoverColor: string;
2501
+ controlsWidth?: number;
2278
2502
  controls: {
2279
2503
  isActive: 'visible' | 'hidden';
2280
2504
  arrowsImgUrl: string | null;
2281
- align: 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right' | 'center-center' | 'center-left' | 'center-right';
2282
- gap: number;
2283
- scale: number;
2284
- color: string;
2285
- hover: string;
2505
+
2286
2506
  };
2287
2507
  };
2288
2508
 
@@ -2317,4 +2537,4 @@ type TestimonialsStyles = {
2317
2537
  };
2318
2538
 
2319
2539
  type ElementOrderKey = 'text' | 'image' | 'caption';
2320
- `,Lo={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"},ds={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},width:{type:"number",scope:"layout",title:"Card width",min:0,max:400,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"Image width",min:0,max:100,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,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"}},captionFontFamily:{type:"string",scope:"common",title:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Lo.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:"Text",display:{type:"font-family-select"}},textFontSettings:{...Lo.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",textFontFamily:Ct.fontSettings.fontFamily,textFontSettings:{fontWeight:Ct.fontSettings.fontWeight,fontStyle:Ct.fontSettings.fontStyle},textLetterSpacing:Ct.letterSpacing,textWordSpacing:Ct.wordSpacing,textTextAlign:Ct.textAlign,textTextAppearance:Ct.textAppearance,textColor: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,imageMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.15},d:{speed:5,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:0,textMarginTop:0,textMinHeight:.01,captionMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.15}},displayRules:[],layout:["__componentName__","autoplay","speed","width","imageMarginTop","textMarginTop","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls","speed"]},{type:"row",items:[{type:"group",title:"",items:["width"]}]},{type:"row",items:[{type:"group",title:"",items:["delay","imageWidth"]}]}]},{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:["textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},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:"cover",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:"cover",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:"cover",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"}]}]}]}},gs={element:ps,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:ds,sourceCode:us,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},ms=[La,za,wl,Il,Ol,os,gs];exports.components=ms;exports.isSchemaV1=xr;
2540
+ `,Lo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},_e={fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},ws={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",reverse:!0},min:.5,max:10},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:400,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:100,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:100,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:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Lo.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:"Text",display:{type:"font-family-select"}},textFontSettings:{...Lo.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",controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:_e.fontSettings.fontFamily,textFontSettings:{fontWeight:_e.fontSettings.fontWeight,fontStyle:_e.fontSettings.fontStyle},textLetterSpacing:_e.letterSpacing,textWordSpacing:_e.wordSpacing,textTextAlign:_e.textAlign,textTextAppearance:_e.textAppearance,textColor:_e.color,captionFontFamily:_e.fontSettings.fontFamily,captionFontSettings:{fontWeight:_e.fontSettings.fontWeight,fontStyle:_e.fontSettings.fontStyle},captionLetterSpacing:_e.letterSpacing,captionWordSpacing:_e.wordSpacing,captionTextAlign:_e.textAlign,captionTextAppearance:_e.textAppearance,captionColor:_e.color},layoutDefaults:{m:{speed:5,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:{speed:5,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:[],layout:["__componentName__","autoplay","speed","width","imageMarginTop","textMarginTop","textMinHeight","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:["speed","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Min Height",items:["textMinHeight","captionMinHeight"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{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:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},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"}]}]}]}},Ts={element:Ss,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:ws,sourceCode:Cs,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},_s=[La,za,Tl,Rl,Bl,os,Ts];exports.components=_s;exports.isSchemaV1=Sr;