@cntrl-site/components 1.0.11-alpha.10 → 1.0.11-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("react"),he=require("classnames"),_=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),br=require("react-dom");function xr(e){return e.type==="object"&&e.version===1}const Sr="ControlSlider-module__wrapper___sHEkd",wr="ControlSlider-module__hoverArrow___A-dOH",Cr="ControlSlider-module__sliderItem___QQSkR",$r="ControlSlider-module__sliderImage___9hRl-",Tr="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",Er="ControlSlider-module__nextArrow___-30Yc",kr="ControlSlider-module__arrowInner___aEra3",Ir="ControlSlider-module__arrowIcon___S4ztF",Ar="ControlSlider-module__arrowImg___2dwJW",Lr="ControlSlider-module__mirror___brd6U",Fr="ControlSlider-module__pagination___bicLF",Mr="ControlSlider-module__paginationInner___bT-P-",Rr="ControlSlider-module__paginationVertical___zYqKw",Pr="ControlSlider-module__paginationItem___nTRbk",Wr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",Hr="ControlSlider-module__paginationInsideBottom___R3FWn",jr="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",zr="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",qr="ControlSlider-module__paginationOutsideRight___EtuQa",Ur="ControlSlider-module__imgWrapper___UjEgB",Kr="ControlSlider-module__captionBlock___dJ6-j",Gr="ControlSlider-module__captionTextWrapper___HFlpf",Yr="ControlSlider-module__captionText___uGBVc",Xr="ControlSlider-module__active___WZK4G",Zr="ControlSlider-module__withPointerEvents___t-18M",Jr="ControlSlider-module__topLeftAlignment___zjnGM",Qr="ControlSlider-module__topCenterAlignment___gD1xW",ei="ControlSlider-module__topRightAlignment___NMapS",ti="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",si="ControlSlider-module__clickOverlay___DZA28",li="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",oe={wrapper:Sr,hoverArrow:wr,sliderItem:Cr,sliderImage:$r,arrow:Tr,arrowVertical:_r,nextArrow:Er,arrowInner:kr,arrowIcon:Ir,arrowImg:Ar,mirror:Lr,pagination:Fr,paginationInner:Mr,paginationVertical:Rr,paginationItem:Pr,dot:Wr,activeDot:Nr,paginationInsideBottom:Hr,paginationInsideTop:jr,paginationOutsideBottom:Vr,paginationOutsideTop:Or,paginationInsideLeft:zr,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:qr,imgWrapper:Ur,captionBlock:Kr,captionTextWrapper:Gr,captionText:Yr,active:Xr,withPointerEvents:Zr,topLeftAlignment:Jr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:si,contain:li,cover:ci};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 pi(e,t,n){return t&&ui(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,di=2,yt=3,xt=4,Pt=5,Xt=6,en=7,mi={CREATED:mt,MOUNTED:di,IDLE:yt,MOVING:xt,SCROLLING:Pt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Io=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Pn(e)&&an("object",e)}var Rn=Array.isArray,Ao=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Pn(e){return e===null}function Lo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return Rn(e)?e:[e]}function Ie(e,t){Nt(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Nt(t)),e}function Be(e,t,n){e&&Ie(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){Be(e,Ze(t)?t.split(" "):t,!0)}function Ht(e,t){Ie(t,e.appendChild.bind(e))}function Nn(e,t){Ie(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Lo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fo(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Fo(e,t)[0]:e.firstElementChild}var It=Object.keys;function rt(e,t,n){return e&&(n?It(e).reverse():It(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function At(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Rn(n)?e[o]=n.slice():Et(n)?e[o]=Ye({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function io(e,t){Ie(t||It(e),function(n){delete e[n]})}function Ne(e,t){Ie(e,function(n){Ie(t,function(o){n&&n.removeAttribute(o)})})}function de(e,t,n){Et(t)?rt(t,function(o,r){de(e,r,o)}):Ie(e,function(o){Pn(n)||n===""?Ne(o,t):o.setAttribute(t,String(n))})}function gt(e,t,n){var o=document.createElement(e);return t&&(Ze(t)?We(o,t):de(o,t)),n&&Ht(n,o),o}function Le(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Pn(n)||(e.style[t]=""+n)}function Lt(e,t){Le(e,"display",t)}function Mo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function ao(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Ie(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Ro(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function ze(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Po(e,t){return e&&e.querySelector(t)}function Hn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){Be(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",jn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Wo(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function kn(e,t){return Ie(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var so={};function gi(e){return""+e+Vn(so[e]=(so[e]||0)+1)}function No(){var e=[];function t(i,u,l,m){r(i,u,function(c,T,S){var g="addEventListener"in c,p=g?c.removeEventListener.bind(c,T,l,m):c.removeListener.bind(c,l);g?c.addEventListener(T,l,m):c.addListener(l),e.push([c,T,S,l,p])})}function n(i,u,l){r(i,u,function(m,c,T){e=e.filter(function(S){return S[0]===m&&S[1]===c&&S[2]===T&&(!l||S[3]===l)?(S[4](),!1):!0})})}function o(i,u,l){var m,c=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:c,detail:l}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,c,!1,l)),i.dispatchEvent(m),m}function r(i,u,l){Ie(i,function(m){m&&Ie(u,function(c){c.split(" ").forEach(function(T){var S=T.split(".");l(m,S[0],S[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",In="ready",Ke="move",St="moved",On="click",Ho="active",jo="inactive",Vo="visible",Oo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",zo="drag",Bo="dragging",Do="dragged",ln="scroll",st="scrolled",fi="overflow",zn="destroy",qo="arrows:mounted",Uo="arrows:updated",Ko="pagination:mounted",Go="pagination:updated",Bn="navigation:mounted",Dn="autoplay:play",Yo="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Xo="sk",Zo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function o(s,i){n.bind(t,Nt(s).join(" "),function(u){i.apply(i,Rn(u.detail)?u.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(zn,n.destroy),At(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,u,l=!0,m=0;function c(){if(!l){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++m>=o))return S();u=ro(c)}}function T(y){y||p(),s=r()-(y?i*e:0),l=!1,u=ro(c)}function S(){l=!0}function g(){s=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,l=!0}function d(y){e=y}function x(){return l}return{start:T,rewind:g,pause:S,cancel:p,set:d,isPaused:x}}function hi(e){var t=e;function n(r){t=r}function o(r){return Wn(Nt(r),t)}return{set:n,is:o}}function yi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function vi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=No(),u=[];function l(){var p=n.mediaQuery==="min";It(r).sort(function(d,x){return p?+d-+x:+x-+d}).forEach(function(d){c(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),c(s,oo),T()}function m(p){p&&i.destroy()}function c(p,d){var x=matchMedia(d);i.bind(x,"change",T),u.push([p,x])}function T(){var p=o.is(en),d=n.direction,x=u.reduce(function(y,b){return Ye(y,b[1].matches?b[0]:{})},{});io(n),g(x),n.destroy?e.destroy(n.destroy==="completely"):p?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function S(p){matchMedia(oo).matches&&(p?Ye(n,s):io(n,It(s)))}function g(p,d,x){Ye(n,p),d&&Ye(Object.getPrototypeOf(n),p),(x||!o.is(mt))&&e.emit(Te,n)}return{setup:l,destroy:m,reduce:S,set:g}}var un="Arrow",pn=un+"Left",dn=un+"Right",Jo=un+"Up",Qo=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,dn],ArrowRight:[Qo,pn]};function bi(e,t,n){function o(s,i,u){u=u||n.direction;var l=u===lo&&!i?1:u===mn?0:-1;return bn[s]&&bn[s][l]||s.replace(/width|left|right/i,function(m,c){var T=bn[m.toLowerCase()][l]||m;return c>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function r(s){return s*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",xi="disabled",Me="aria-",Ot=Me+"controls",er=Me+"current",co=Me+"selected",ke=Me+"label",Kn=Me+"labelledby",tr=Me+"hidden",Gn=Me+"orientation",Mt=Me+"roledescription",uo=Me+"live",po=Me+"busy",mo=Me+"atomic",Yn=[qe,ft,xi,Ot,er,ke,Kn,tr,Gn,Mt],He=Vt+"__",tt="is-",xn=Vt,go=He+"track",Si=He+"list",gn=He+"slide",nr=gn+"--clone",wi=gn+"__container",Xn=He+"arrows",fn=He+"arrow",or=fn+"--prev",rr=fn+"--next",hn=He+"pagination",ir=hn+"__page",Ci=He+"progress",$i=Ci+"__bar",Ti=He+"toggle",_i=He+"spinner",Ei=He+"sr",ki=tt+"initialized",at=tt+"active",ar=tt+"prev",sr=tt+"next",An=tt+"visible",Ln=tt+"loading",lr=tt+"focus-in",cr=tt+"overflow",Ii=[at,An,ar,sr,Ln,lr,cr],Ai={slide:gn,clone:nr,arrows:Xn,arrow:fn,prev:or,next:rr,pagination:hn,page:ir,spinner:_i};function Li(e,t){if(Ao(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Fi=5,fo=200,ur="touchstart mousedown",Sn="touchmove mousemove",wn="touchend touchcancel mouseup click";function Mi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,u=n.i18n,l={},m=[],c=[],T=[],S,g,p;function d(){E(),K(),b()}function x(){r(Se,y),r(Se,d),r(Te,b),s(document,ur+" keydown",function(w){p=w.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Be(i,lr,!!p)})}function y(w){var C=Yn.concat("style");Ue(m),De(i,c),De(S,T),Ne([S,g],C),Ne(i,w?C:["style",Mt])}function b(){De(i,c),De(S,T),c=I(xn),T=I(go),We(i,c),We(S,T),de(i,ke,n.label),de(i,Kn,n.labelledby)}function E(){S=k("."+go),g=jt(S,"."+Si),Tt(S&&g,"A track/list element is missing."),Zt(m,Fo(g,"."+gn+":not(."+nr+")")),rt({arrows:Xn,pagination:hn,prev:or,next:rr,bar:$i,toggle:Ti},function(w,C){l[C]=k("."+w)}),At(l,{root:i,track:S,list:g,slides:m})}function K(){var w=i.id||gi(Vt),C=n.role;i.id=w,S.id=S.id||w+"-track",g.id=g.id||w+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&C&&de(i,qe,C),de(i,Mt,u.carousel),de(g,qe,"presentation")}function k(w){var C=Po(i,w);return C&&Li(C,"."+xn)===i?C:void 0}function I(w){return[w+"--"+n.type,w+"--"+n.direction,n.drag&&w+"--draggable",n.isNavigation&&w+"--nav",w===xn&&at]}return At(l,{setup:d,mount:x,destroy:y})}var bt="slide",wt="loop",zt="fade";function Ri(e,t,n,o){var r=be(e),s=r.on,i=r.emit,u=r.bind,l=e.Components,m=e.root,c=e.options,T=c.isNavigation,S=c.updateOnMove,g=c.i18n,p=c.pagination,d=c.slideFocus,x=l.Direction.resolve,y=Fe(o,"style"),b=Fe(o,ke),E=n>-1,K=jt(o,"."+wi),k;function I(){E||(o.id=m.id+"-slide"+Vn(t+1),de(o,qe,p?"tabpanel":"group"),de(o,Mt,g.slide),de(o,ke,b||kn(g.slideLabel,[t+1,e.length]))),w()}function w(){u(o,"click",ve(i,On,A)),u(o,"keydown",ve(i,Xo,A)),s([St,Zo,st],P),s(Bn,R),S&&s(Ke,z)}function C(){k=!0,r.destroy(),De(o,Ii),Ne(o,Yn),de(o,"style",y),de(o,ke,b||"")}function R(){var M=e.splides.map(function($){var N=$.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");de(o,ke,kn(g.slideX,(E?n:t)+1)),de(o,Ot,M),de(o,qe,d?"button":""),d&&Ne(o,Mt)}function z(){k||P()}function P(){if(!k){var M=e.index;H(),j(),Be(o,ar,t===M-1),Be(o,sr,t===M+1)}}function H(){var M=G();M!==ao(o,at)&&(Be(o,at,M),de(o,er,T&&M||""),i(M?Ho:jo,A))}function j(){var M=v(),$=!M&&(!G()||E);if(e.state.is([xt,Pt])||de(o,tr,$||""),de(Hn(o,c.focusableNodes||""),ft,$?-1:""),d&&de(o,ft,$?-1:0),M!==ao(o,An)&&(Be(o,An,M),i(M?Vo:Oo,A)),!M&&document.activeElement===o){var N=l.Slides.getAt(e.index);N&&Mo(N.slide)}}function D(M,$,N){Le(N&&K||o,M,$)}function G(){var M=e.index;return M===t||c.cloneStatus&&M===n}function v(){if(e.is(zt))return G();var M=Ee(l.Elements.track),$=Ee(o),N=x("left",!0),J=x("right",!0);return nn(M[N])<=Ft($[N])&&nn($[J])<=Ft(M[J])}function F(M,$){var N=_e(M-t);return!E&&(c.rewind||e.is(wt))&&(N=Je(N,e.length-N)),N<=$}var A={index:t,slideIndex:n,slide:o,container:K,isClone:E,mount:I,destroy:C,update:P,style:D,isWithin:F};return A}function Pi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Elements,l=u.slides,m=u.list,c=[];function T(){S(),r(Se,g),r(Se,S)}function S(){l.forEach(function(P,H){d(P,H,-1)})}function g(){k(function(P){P.destroy()}),Ue(c)}function p(){k(function(P){P.update()})}function d(P,H,j){var D=Ri(e,H,j,P);D.mount(),c.push(D),c.sort(function(G,v){return G.index-v.index})}function x(P){return P?I(function(H){return!H.isClone}):c}function y(P){var H=t.Controller,j=H.toIndex(P),D=H.hasFocus()?1:n.perPage;return I(function(G){return Jt(G.index,j,j+D-1)})}function b(P){return I(P)[0]}function E(P,H){Ie(P,function(j){if(Ze(j)&&(j=Ro(j)),Lo(j)){var D=l[H];D?Nn(j,D):Ht(m,j),We(j,n.classes.slide),C(j,ve(s,vt))}}),s(Se)}function K(P){it(I(P).map(function(H){return H.slide})),s(Se)}function k(P,H){x(H).forEach(P)}function I(P){return c.filter(Ao(P)?P:function(H){return Ze(P)?kt(H.slide,P):Wn(Nt(P),H.index)})}function w(P,H,j){k(function(D){D.style(P,H,j)})}function C(P,H){var j=Hn(P,"img"),D=j.length;D?j.forEach(function(G){i(G,"load error",function(){--D||H()})}):H()}function R(P){return P?l.length:c.length}function z(){return c.length>n.perPage}return{mount:T,destroy:g,update:p,register:d,get:x,getIn:y,getAt:b,add:E,remove:K,forEach:k,filter:I,style:w,getLength:R,isEnough:z}}function Wi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=t.Slides,l=t.Direction.resolve,m=t.Elements,c=m.root,T=m.track,S=m.list,g=u.getAt,p=u.style,d,x,y;function b(){E(),s(window,"resize load",yi(ve(i,vt))),r([Te,Se],E),r(vt,K)}function E(){d=n.direction===mn,Le(c,"maxWidth",ot(n.width)),Le(T,l("paddingLeft"),k(!1)),Le(T,l("paddingRight"),k(!0)),K(!0)}function K(A){var M=Ee(c);(A||x.width!==M.width||x.height!==M.height)&&(Le(T,"height",I()),p(l("marginRight"),ot(n.gap)),p("width",C()),p("height",R(),!0),x=M,i(sn),y!==(y=F())&&(Be(c,cr,y),i(fi,y)))}function k(A){var M=n.padding,$=l(A?"right":"left");return M&&ot(M[$]||(Et(M)?0:M))||"0px"}function I(){var A="";return d&&(A=w(),Tt(A,"height or heightRatio is missing."),A="calc("+A+" - "+k(!1)+" - "+k(!0)+")"),A}function w(){return ot(n.height||Ee(S).width*n.heightRatio)}function C(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":z())}function R(){return ot(n.fixedHeight)||(d?n.autoHeight?null:z():w())}function z(){var A=ot(n.gap);return"calc((100%"+(A&&" + "+A)+")/"+(n.perPage||1)+(A&&" - "+A)+")"}function P(){return Ee(S)[l("width")]}function H(A,M){var $=g(A||0);return $?Ee($.slide)[l("width")]+(M?0:G()):0}function j(A,M){var $=g(A);if($){var N=Ee($.slide)[l("right")],J=Ee(S)[l("left")];return _e(N-J)+(M?0:G())}return 0}function D(A){return j(e.length-1)-j(0)+H(0,A)}function G(){var A=g(0);return A&&parseFloat(Le(A.slide,l("marginRight")))||0}function v(A){return parseFloat(Le(T,l("padding"+(A?"Right":"Left"))))||0}function F(){return e.is(zt)||D(!0)>P()}return{mount:b,resize:K,listSize:P,slideSize:H,sliderSize:D,totalSize:j,getPadding:v,isOverflow:F}}var Ni=2;function Hi(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,u=t.Direction.resolve,l=[],m;function c(){r(Se,T),r([Te,vt],g),(m=x())&&(p(m),t.Layout.resize(!0))}function T(){S(),c()}function S(){it(l),Ue(l),o.destroy()}function g(){var y=x();m!==y&&(m<y||!y)&&o.emit(Se)}function p(y){var b=i.get().slice(),E=b.length;if(E){for(;b.length<y;)Zt(b,b);Zt(b.slice(-y),b.slice(0,y)).forEach(function(K,k){var I=k<y,w=d(K.slide,k);I?Nn(w,b[0].slide):Ht(s.list,w),Zt(l,w),i.register(w,k-y+(I?0:E),K.index)})}}function d(y,b){var E=y.cloneNode(!0);return We(E,n.classes.clone),E.id=e.root.id+"-clone"+Vn(b+1),E}function x(){var y=n.clones;if(!e.is(wt))y=0;else if(Wt(y)){var b=n[u("fixedWidth")]&&t.Layout.slideSize(0),E=b&&Ft(Ee(s.track)[u("width")]/b);y=E||n[u("autoWidth")]&&e.length||n.perPage*Ni}return y}return{mount:c,destroy:S}}function ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Layout,l=u.slideSize,m=u.getPadding,c=u.totalSize,T=u.listSize,S=u.sliderSize,g=t.Direction,p=g.resolve,d=g.orient,x=t.Elements,y=x.list,b=x.track,E;function K(){E=t.Transition,r([et,sn,Te,Se],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),w(e.index),t.Slides.update())}function I($,N,J,ce){$!==N&&A($>J)&&(P(),C(z(D(),$>J),!0)),i(xt),s(Ke,N,J,$),E.start(N,function(){i(yt),s(St,N,J,$),ce&&ce()})}function w($){C(j($,!0))}function C($,N){if(!e.is(zt)){var J=N?$:R($);Le(y,"transform","translate"+p("X")+"("+J+"px)"),$!==J&&s(Zo)}}function R($){if(e.is(wt)){var N=H($),J=N>t.Controller.getEnd(),ce=N<0;(ce||J)&&($=z($,J))}return $}function z($,N){var J=$-F(N),ce=S();return $-=d(ce*(Ft(_e(J)/ce)||1))*(N?1:-1),$}function P(){C(D(),!0),E.cancel()}function H($){for(var N=t.Slides.get(),J=0,ce=1/0,re=0;re<N.length;re++){var ge=N[re].index,W=_e(j(ge,!0)-$);if(W<=ce)ce=W,J=ge;else break}return J}function j($,N){var J=d(c($-1)-v($));return N?G(J):J}function D(){var $=p("left");return Ee(y)[$]-Ee(b)[$]+d(m(!1))}function G($){return n.trimSpace&&e.is(bt)&&($=pt($,0,d(S(!0)-T()))),$}function v($){var N=n.focus;return N==="center"?(T()-l($,!0))/2:+N*l($)||0}function F($){return j($?t.Controller.getEnd():0,!!n.trimSpace)}function A($){var N=d(z(D(),$));return $?N>=0:N<=y[p("scrollWidth")]-Ee(b)[p("width")]}function M($,N){N=Wt(N)?D():N;var J=$!==!0&&d(N)<d(F(!1)),ce=$!==!1&&d(N)>d(F(!0));return J||ce}return{mount:K,move:I,jump:w,translate:C,shift:z,cancel:P,toIndex:H,toPosition:j,getPosition:D,getLimit:F,exceededLimit:M,reposition:k}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,u=i.getPosition,l=i.getLimit,m=i.toPosition,c=t.Slides,T=c.isEnough,S=c.getLength,g=n.omitEnd,p=e.is(wt),d=e.is(bt),x=ve(D,!1),y=ve(D,!0),b=n.start||0,E,K=b,k,I,w;function C(){R(),r([Te,Se,on],R),r(sn,z)}function R(){k=S(!0),I=n.perMove,w=n.perPage,E=A();var W=pt(b,0,g?E:k-1);W!==b&&(b=W,i.reposition())}function z(){E!==A()&&s(on)}function P(W,V,Q){if(!ge()){var te=j(W),se=F(te);se>-1&&(V||se!==b)&&(J(se),i.move(te,se,K,Q))}}function H(W,V,Q,te){t.Scroll.scroll(W,V,Q,function(){var se=F(i.toIndex(u()));J(g?Je(se,E):se),te&&te()})}function j(W){var V=b;if(Ze(W)){var Q=W.match(/([+\-<>])(\d+)?/)||[],te=Q[1],se=Q[2];te==="+"||te==="-"?V=G(b+ +(""+te+(+se||1)),b):te===">"?V=se?M(+se):x(!0):te==="<"&&(V=y(!0))}else V=p?W:pt(W,0,E);return V}function D(W,V){var Q=I||(re()?1:w),te=G(b+Q*(W?-1:1),b,!(I||re()));return te===-1&&d&&!Wo(u(),l(!W),1)?W?0:E:V?te:F(te)}function G(W,V,Q){if(T()||re()){var te=v(W);te!==W&&(V=W,W=te,Q=!1),W<0||W>E?!I&&(Jt(0,W,V,!0)||Jt(E,V,W,!0))?W=M($(W)):p?W=Q?W<0?-(k%w||w):k:W:n.rewind?W=W<0?E:0:W=-1:Q&&W!==V&&(W=M($(V)+(W<V?-1:1)))}else W=-1;return W}function v(W){if(d&&n.trimSpace==="move"&&W!==b)for(var V=u();V===m(W,!0)&&Jt(W,0,e.length-1,!n.rewind);)W<b?--W:++W;return W}function F(W){return p?(W+k)%k||0:W}function A(){for(var W=k-(re()||p&&I?1:w);g&&W-- >0;)if(m(k-1,!0)!==m(W,!0)){W++;break}return pt(W,0,k-1)}function M(W){return pt(re()?W:w*W,0,E)}function $(W){return re()?Je(W,E):nn((W>=E?k-1:W)/w)}function N(W){var V=i.toIndex(W);return d?pt(V,0,E):V}function J(W){W!==b&&(K=b,b=W)}function ce(W){return W?K:b}function re(){return!Wt(n.focus)||n.isNavigation}function ge(){return e.state.is([xt,Pt])&&!!n.waitForTransition}return{mount:C,go:P,scroll:H,getNext:x,getPrev:y,getAdjacent:D,getEnd:A,setIndex:J,getIndex:ce,toIndex:M,toPage:$,toDest:N,hasFocus:re,isBusy:ge}}var Oi="http://www.w3.org/2000/svg",zi="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",qt=40;function Bi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=n.classes,l=n.i18n,m=t.Elements,c=t.Controller,T=m.arrows,S=m.track,g=T,p=m.prev,d=m.next,x,y,b={};function E(){k(),r(Te,K)}function K(){I(),E()}function k(){var H=n.arrows;H&&!(p&&d)&&R(),p&&d&&(At(b,{prev:p,next:d}),Lt(g,H?"":"none"),We(g,y=Xn+"--"+n.direction),H&&(w(),P(),de([p,d],Ot,S.id),i(qo,p,d)))}function I(){o.destroy(),De(g,y),x?(it(T?[p,d]:g),p=d=null):Ne([p,d],Yn)}function w(){r([et,St,Se,st,on],P),s(d,"click",ve(C,">")),s(p,"click",ve(C,"<"))}function C(H){c.go(H,!0)}function R(){g=T||gt("div",u.arrows),p=z(!0),d=z(!1),x=!0,Ht(g,[p,d]),!T&&Nn(g,S)}function z(H){var j='<button class="'+u.arrow+" "+(H?u.prev:u.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||zi)+'" />';return Ro(j)}function P(){if(p&&d){var H=e.index,j=c.getPrev(),D=c.getNext(),G=j>-1&&H<j?l.last:l.prev,v=D>-1&&H>D?l.first:l.next;p.disabled=j<0,d.disabled=D<0,de(p,ke,G),de(d,ke,v),i(Uo,p,d,j,D)}}return{arrows:b,mount:E,destroy:I,update:P}}var Di=jn+"-interval";function qi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),w),l=u.isPaused,m=t.Elements,c=t.Elements,T=c.root,S=c.toggle,g=n.autoplay,p,d,x=g==="pause";function y(){g&&(b(),S&&de(S,Ot,m.track.id),x||E(),I())}function b(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(R){p=R.type==="mouseenter",k()}),n.pauseOnFocus&&s(T,"focusin focusout",function(R){d=R.type==="focusin",k()}),S&&s(S,"click",function(){x?E():K(!0)}),r([Ke,ln,Se],u.rewind),r(Ke,C)}function E(){l()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=x=!1,I(),i(Dn))}function K(R){R===void 0&&(R=!0),x=!!R,I(),l()||(u.pause(),i(qn))}function k(){x||(p||d?K(!1):E())}function I(){S&&(Be(S,at,!x),de(S,ke,n.i18n[x?"play":"pause"]))}function w(R){var z=m.bar;z&&Le(z,"width",R*100+"%"),i(Yo,R)}function C(R){var z=t.Slides.getAt(R);u.set(z&&+Fe(z.slide,Di)||n.interval)}return{mount:y,destroy:u.cancel,play:E,pause:K,isPaused:l}}function Ui(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Un,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(l){t.Slides.forEach(function(m){var c=jt(m.container||m.slide,"img");c&&c.src&&u(l,c,m)})}function u(l,m,c){c.style("background",l?'center/cover no-repeat url("'+m.src+'")':"",!0),Lt(m,l?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Ki=10,Gi=600,Yi=.6,Xi=1.5,Zi=800;function Ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Move,l=u.getPosition,m=u.getLimit,c=u.exceededLimit,T=u.translate,S=e.is(bt),g,p,d=1;function x(){r(Ke,K),r([Te,Se],k)}function y(w,C,R,z,P){var H=l();if(K(),R&&(!S||!c())){var j=t.Layout.sliderSize(),D=En(w)*j*nn(_e(w)/j)||0;w=u.toPosition(t.Controller.toDest(w%j))+D}var G=Wo(H,w,1);d=1,C=G?0:C||tn(_e(w-H)/Xi,Zi),p=z,g=cn(C,b,ve(E,H,w,P),1),i(Pt),s(ln),g.start()}function b(){i(yt),p&&p(),s(st)}function E(w,C,R,z){var P=l(),H=w+(C-w)*I(z),j=(H-P)*d;T(P+j),S&&!R&&c()&&(d*=Yi,_e(j)<Ki&&y(m(c(!0)),Gi,!1,p,!0))}function K(){g&&g.cancel()}function k(){g&&!g.isPaused()&&(K(),b())}function I(w){var C=n.easingFunc;return C?C(w):1-Math.pow(1-w,4)}return{mount:x,destroy:K,scroll:y,cancel:k}}var dt={passive:!1,capture:!0};function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=o.unbind,l=e.state,m=t.Move,c=t.Scroll,T=t.Controller,S=t.Elements.track,g=t.Media.reduce,p=t.Direction,d=p.resolve,x=p.orient,y=m.getPosition,b=m.exceededLimit,E,K,k,I,w,C=!1,R,z,P;function H(){i(S,Sn,Tn,dt),i(S,wn,Tn,dt),i(S,ur,D,dt),i(S,"click",F,{capture:!0}),i(S,"dragstart",ze),r([et,Te],j)}function j(){var L=n.drag;ie(!L),I=L==="free"}function D(L){if(R=!1,!z){var f=se(L);te(L.target)&&(f||!L.button)&&(T.isBusy()?ze(L,!0):(P=f?S:window,w=l.is([xt,Pt]),k=null,i(P,Sn,G,dt),i(P,wn,v,dt),m.cancel(),c.cancel(),A(L)))}}function G(L){if(l.is(Xt)||(l.set(Xt),s(zo)),L.cancelable)if(w){m.translate(E+Q(re(L)));var f=ge(L)>fo,O=C!==(C=b());(f||O)&&A(L),R=!0,s(Bo),ze(L)}else N(L)&&(w=$(L),ze(L))}function v(L){l.is(Xt)&&(l.set(yt),s(Do)),w&&(M(L),ze(L)),u(P,Sn,G),u(P,wn,v),w=!1}function F(L){!z&&R&&ze(L,!0)}function A(L){k=K,K=L,E=y()}function M(L){var f=J(L),O=ce(f),Y=n.rewind&&n.rewindByDrag;g(!1),I?T.scroll(O,0,n.snap):e.is(zt)?T.go(x(En(f))<0?Y?"<":"-":Y?">":"+"):e.is(bt)&&C&&Y?T.go(b(!0)?">":"<"):T.go(T.toDest(O),!0),g(!0)}function $(L){var f=n.dragMinThreshold,O=Et(f),Y=O&&f.mouse||0,ee=(O?f.touch:+f)||10;return _e(re(L))>(se(L)?ee:Y)}function N(L){return _e(re(L))>_e(re(L,!0))}function J(L){if(e.is(wt)||!C){var f=ge(L);if(f&&f<fo)return re(L)/f}return 0}function ce(L){return y()+En(L)*Je(_e(L)*(n.flickPower||600),I?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function re(L,f){return V(L,f)-V(W(L),f)}function ge(L){return _n(L)-_n(W(L))}function W(L){return K===L&&k||K}function V(L,f){return(se(L)?L.changedTouches[0]:L)["page"+d(f?"Y":"X")]}function Q(L){return L/(C&&e.is(bt)?Fi:1)}function te(L){var f=n.noDrag;return!kt(L,"."+ir+", ."+fn)&&(!f||!kt(L,f))}function se(L){return typeof TouchEvent<"u"&&L instanceof TouchEvent}function q(){return w}function ie(L){z=L}return{mount:H,disable:ie,isDragging:q}}var ea={Spacebar:" ",Right:dn,Left:pn,Up:Jo,Down:Qo};function Zn(e){return e=Ze(e)?e:e.key,ea[e]||e}var ho="keydown";function ta(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,u=e.root,l=t.Direction.resolve,m,c;function T(){S(),r(Te,g),r(Te,S),r(Ke,d)}function S(){var y=n.keyboard;y&&(m=y==="global"?window:u,s(m,ho,x))}function g(){i(m,ho)}function p(y){c=y}function d(){var y=c;c=!0,Io(function(){c=y})}function x(y){if(!c){var b=Zn(y);b===l(pn)?e.go("<"):b===l(dn)&&e.go(">")}}return{mount:T,destroy:g,disable:p}}var _t=jn+"-lazy",Qt=_t+"-srcset",na="["+_t+"], ["+Qt+"]";function oa(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,u=o.emit,l=n.lazyLoad==="sequential",m=[St,st],c=[];function T(){n.lazyLoad&&(S(),r(Se,S))}function S(){Ue(c),g(),l?y():(s(m),r(m,p),p())}function g(){t.Slides.forEach(function(b){Hn(b.slide,na).forEach(function(E){var K=Fe(E,_t),k=Fe(E,Qt);if(K!==E.src||k!==E.srcset){var I=n.classes.spinner,w=E.parentElement,C=jt(w,"."+I)||gt("span",I,w);c.push([E,b,C]),E.src||Lt(E,"none")}})})}function p(){c=c.filter(function(b){var E=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,E)?d(b):!0}),c.length||s(m)}function d(b){var E=b[0];We(b[1].slide,Ln),i(E,"load error",ve(x,b)),de(E,"src",Fe(E,_t)),de(E,"srcset",Fe(E,Qt)),Ne(E,_t),Ne(E,Qt)}function x(b,E){var K=b[0],k=b[1];De(k.slide,Ln),E.type!=="error"&&(it(b[2]),Lt(K,""),u(Un,K,k),u(vt)),l&&y()}function y(){c.length&&d(c.shift())}return{mount:T,destroy:ve(Ue,c),check:p}}function ra(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Slides,l=t.Elements,m=t.Controller,c=m.hasFocus,T=m.getIndex,S=m.go,g=t.Direction.resolve,p=l.pagination,d=[],x,y;function b(){E(),r([Te,Se,on],b);var z=n.pagination;p&&Lt(p,z?"":"none"),z&&(r([Ke,ln,st],R),K(),R(),s(Ko,{list:x,items:d},C(e.index)))}function E(){x&&(it(p?Qe(x.children):x),De(x,y),Ue(d),x=null),o.destroy()}function K(){var z=e.length,P=n.classes,H=n.i18n,j=n.perPage,D=c()?m.getEnd()+1:Ft(z/j);x=p||gt("ul",P.pagination,l.track.parentElement),We(x,y=hn+"--"+w()),de(x,qe,"tablist"),de(x,ke,H.select),de(x,Gn,w()===mn?"vertical":"");for(var G=0;G<D;G++){var v=gt("li",null,x),F=gt("button",{class:P.page,type:"button"},v),A=u.getIn(G).map(function($){return $.slide.id}),M=!c()&&j>1?H.pageX:H.slideX;i(F,"click",ve(k,G)),n.paginationKeyboard&&i(F,"keydown",ve(I,G)),de(v,qe,"presentation"),de(F,qe,"tab"),de(F,Ot,A.join(" ")),de(F,ke,kn(M,G+1)),de(F,ft,-1),d.push({li:v,button:F,page:G})}}function k(z){S(">"+z,!0)}function I(z,P){var H=d.length,j=Zn(P),D=w(),G=-1;j===g(dn,!1,D)?G=++z%H:j===g(pn,!1,D)?G=(--z+H)%H:j==="Home"?G=0:j==="End"&&(G=H-1);var v=d[G];v&&(Mo(v.button),S(">"+G),ze(P,!0))}function w(){return n.paginationDirection||n.direction}function C(z){return d[m.toPage(z)]}function R(){var z=C(T(!0)),P=C(T());if(z){var H=z.button;De(H,at),Ne(H,co),de(H,ft,-1)}if(P){var j=P.button;We(j,at),de(j,co,!0),de(j,ft,"")}s(Go,{list:x,items:d},z,P)}return{items:d,mount:b,destroy:E,getAt:C,update:R}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&c()}function u(){s.forEach(function(p){p.destroy()}),Ue(s)}function l(){u(),i()}function m(p,d){var x=be(p);x.on(Ke,function(y,b,E){d.go(d.is(wt)?E:y)}),s.push(x)}function c(){var p=be(e),d=p.on;d(On,S),d(Xo,g),d([et,Te],T),s.push(p),p.emit(Bn,e.splides)}function T(){de(t.Elements.list,Gn,n.direction===mn?"vertical":"")}function S(p){e.go(p.index)}function g(p,d){Wn(ia,Zn(d))&&(S(p),ze(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:l}}function sa(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(m){if(m.cancelable){var c=m.deltaY,T=c<0,S=_n(m),g=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(c)>g&&S-s>p&&(e.go(T?"<":">"),s=S),l(T)&&ze(m)}}function l(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var la=90;function ca(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",Ei),l=cn(la,ve(c,!1));function m(){i&&(S(!t.Autoplay.isPaused()),de(s,mo,!0),u.textContent="…",r(Dn,ve(S,!0)),r(qn,ve(S,!1)),r([St,st],ve(c,!0)))}function c(g){de(s,po,g),g?(Ht(s,u),l.start()):(it(u),l.cancel())}function T(){Ne(s,[uo,mo,po]),it(u)}function S(g){i&&de(s,uo,g?"off":"polite")}return{mount:m,disable:S,destroy:T}}var ua=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Mi,Slides:Pi,Layout:Wi,Clones:Hi,Move:ji,Controller:Vi,Arrows:Bi,Autoplay:qi,Cover:Ui,Scroll:Ji,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:sa,Live:ca}),pa={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:Ai,i18n:pa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ma(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),Io(l)}return{mount:r,start:i,cancel:Tn}}function ga(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,u=ve(Le,i,"transition"),l;function m(){be(e).bind(i,"transitionend",function(g){g.target===i&&l&&(T(),l())})}function c(g,p){var d=o.toPosition(g,!0),x=o.getPosition(),y=S(g);_e(d-x)>=1&&y>=1?n.useScroll?s.scroll(d,y,!1,p):(u("transform "+y+"ms "+n.easing),o.translate(d,!0),l=p):(o.jump(g),p())}function T(){u(""),s.cancel()}function S(g){var p=n.rewindSpeed;if(e.is(bt)&&p){var d=r.getIndex(!0),x=r.getEnd();if(d===0&&g>=x||d>=x&&g===0)return p}return n.speed}return{mount:m,start:c,cancel:T}}var fa=(function(){function e(n,o){this.event=be(),this.Components={},this.state=hi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Po(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ye({label:Fe(r,ke)||"",labelledby:Fe(r,Kn)||""},da,e.defaults,o||{});try{Ye(o,JSON.parse(Fe(r,jn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,u=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=u,this._T=r||this._T||(this.is(zt)?ma:ga),this._E=o||this._E;var l=At({},ua,this._E,{Transition:this._T});return rt(l,function(m,c){var T=m(s,u,s._o);u[c]=T,T.setup&&T.setup()}),rt(u,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,ki),i.set(yt),this.emit(In),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(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(Qe(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(In,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(zn),r.destroy(),o&&Ue(this.splides),s.set(en)),this},pi(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})(),Jn=fa;Jn.defaults={};Jn.STATES=mi;var yo=[[et,"onMounted"],[In,"onReady"],[Ke,"onMove"],[St,"onMoved"],[On,"onClick"],[Ho,"onActive"],[jo,"onInactive"],[Vo,"onVisible"],[Oo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[zo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[zn,"onDestroy"],[qo,"onArrowsMounted"],[Uo,"onArrowsUpdated"],[Ko,"onPaginationMounted"],[Go,"onPaginationUpdated"],[Bn,"onNavigationMounted"],[Dn,"onAutoplayPlay"],[Yo,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Un,"onLazyLoadLoaded"]];function Qn(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function Fn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Fn(n,t[o]));if(rn(e)&&rn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Fn(e[r],t[r]))}return e===t}function ha(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ya(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 ya(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Mn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>h.createElement("div",{className:Qn("splide__track",t),...n},h.createElement("ul",{className:"splide__list"},e)),pr=class extends h.Component{constructor(){super(...arguments),this.splideRef=h.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(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&&!Fn(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){yo.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 h.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(s=>s[1])])},n?h.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>h.createElement("li",{className:Qn("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("react"),he=require("classnames"),k=require("./readTestimonialTextMeasure-CB_Uq-fO.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",$r="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",Er="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",kr="ControlSlider-module__nextArrow___-30Yc",Ir="ControlSlider-module__arrowInner___aEra3",Ar="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",Mr="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Nr="ControlSlider-module__dot___p1Qun",Hr="ControlSlider-module__activeDot___LHFaj",jr="ControlSlider-module__paginationInsideBottom___R3FWn",Or="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",zr="ControlSlider-module__paginationOutsideTop___SCLqB",Br="ControlSlider-module__paginationInsideLeft___yOBRZ",Dr="ControlSlider-module__paginationInsideRight___Rtt3o",qr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",Kr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Zr="ControlSlider-module__active___WZK4G",Qr="ControlSlider-module__withPointerEvents___t-18M",Jr="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",si="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",ci="ControlSlider-module__contain___pLyq7",ui="ControlSlider-module__cover___KdDat",ne={wrapper:Cr,hoverArrow:wr,sliderItem:$r,sliderImage:Tr,arrow:Er,arrowVertical:_r,nextArrow:kr,arrowInner:Ir,arrowIcon:Ar,arrowImg:Lr,mirror:Fr,pagination:Mr,paginationInner:Rr,paginationVertical:Pr,paginationItem:Wr,dot:Nr,activeDot:Hr,paginationInsideBottom:jr,paginationInsideTop:Or,paginationOutsideBottom:Vr,paginationOutsideTop:zr,paginationInsideLeft:Br,paginationInsideRight:Dr,paginationOutsideLeft:qr,paginationOutsideRight:Ur,imgWrapper:Gr,captionBlock:Kr,captionTextWrapper:Yr,captionText:Xr,active:Zr,withPointerEvents:Qr,topLeftAlignment:Jr,topCenterAlignment:ei,topRightAlignment:ti,middleLeftAlignment:ni,middleCenterAlignment:oi,middleRightAlignment:ri,bottomLeftAlignment:ii,bottomCenterAlignment:ai,bottomRightAlignment:si,clickOverlay:li,contain:ci,cover:ui};function pi(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&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ro="(prefers-reduced-motion: reduce)",mt=1,mi=2,yt=3,xt=4,Pt=5,Xt=6,en=7,gi={CREATED:mt,MOUNTED:mi,IDLE:yt,MOVING:xt,SCROLLING:Pt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Je(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Je(arguments,1)))}var Ao=setTimeout,En=function(){};function io(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function _t(e){return!Wn(e)&&an("object",e)}var Pn=Array.isArray,Lo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Wn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return Pn(e)?e:[e]}function Ie(e,t){Nt(e).forEach(t)}function Nn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Nt(t)),e}function Be(e,t,n){e&&Ie(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){Be(e,Ze(t)?t.split(" "):t,!0)}function Ht(e,t){Ie(t,e.appendChild.bind(e))}function Hn(e,t){Ie(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Mo(e,t){var n=e?Je(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Mo(e,t)[0]:e.firstElementChild}var It=Object.keys;function rt(e,t,n){return e&&(n?It(e).reverse():It(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function At(e){return Je(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Je(arguments,1).forEach(function(t){rt(t,function(n,o){Pn(n)?e[o]=n.slice():_t(n)?e[o]=Ye({},_t(e[o])?e[o]:{},n):e[o]=n})}),e}function ao(e,t){Ie(t||It(e),function(n){delete e[n]})}function Ne(e,t){Ie(e,function(n){Ie(t,function(o){n&&n.removeAttribute(o)})})}function ue(e,t,n){_t(t)?rt(t,function(o,r){ue(e,r,o)}):Ie(e,function(o){Wn(n)||n===""?Ne(o,t):o.setAttribute(t,String(n))})}function gt(e,t,n){var o=document.createElement(e);return t&&(Ze(t)?We(o,t):ue(o,t)),n&&Ht(n,o),o}function Le(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Wn(n)||(e.style[t]=""+n)}function Lt(e,t){Le(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function _e(e){return e.getBoundingClientRect()}function it(e){Ie(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function ze(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function jn(e,t){return t?Je(e.querySelectorAll(t)):[]}function De(e,t){Be(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Ot="splide",On="data-"+Ot;function Tt(e,t){if(!e)throw new Error("["+Ot+"] "+(t||""))}var Qe=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,Ee=Math.abs;function No(e,t,n){return Ee(e-t)<n}function Qt(e,t,n,o){var r=Qe(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Qe(t,n),r=tn(t,n);return Qe(tn(o,e),r)}function kn(e){return+(e>0)-+(e<0)}function In(e,t){return Ie(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var lo={};function fi(e){return""+e+Vn(lo[e]=(lo[e]||0)+1)}function Ho(){var e=[];function t(i,p,c,d){r(i,p,function(u,E,y){var h="addEventListener"in u,l=h?u.removeEventListener.bind(u,E,c,d):u.removeListener.bind(u,c);h?u.addEventListener(E,c,d):u.addListener(c),e.push([u,E,y,c,l])})}function n(i,p,c){r(i,p,function(d,u,E){e=e.filter(function(y){return y[0]===d&&y[1]===u&&y[2]===E&&(!c||y[3]===c)?(y[4](),!1):!0})})}function o(i,p,c){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(p,{bubbles:u,detail:c}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(p,u,!1,c)),i.dispatchEvent(d),d}function r(i,p,c){Ie(i,function(d){d&&Ie(p,function(u){u.split(" ").forEach(function(E){var y=E.split(".");c(d,y[0],y[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",zn="click",jo="active",Oo="inactive",Vo="visible",zo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",Bo="drag",Do="dragging",qo="dragged",ln="scroll",st="scrolled",hi="overflow",Bn="destroy",Uo="arrows:mounted",Go="arrows:updated",Ko="pagination:mounted",Yo="pagination:updated",Dn="navigation:mounted",qn="autoplay:play",Xo="autoplay:playing",Un="autoplay:pause",Gn="lazyload:loaded",Zo="sk",Qo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ho();function o(s,i){n.bind(t,Nt(s).join(" "),function(p){i.apply(i,Pn(p.detail)?p.detail:[])})}function r(s){n.dispatch(t,s,Je(arguments,1))}return e&&e.event.on(Bn,n.destroy),At(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,p,c=!0,d=0;function u(){if(!c){if(i=e?Qe((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++d>=o))return y();p=io(u)}}function E(v){v||l(),s=r()-(v?i*e:0),c=!1,p=io(u)}function y(){c=!0}function h(){s=r(),i=0,n&&n(i)}function l(){p&&cancelAnimationFrame(p),i=0,p=0,c=!0}function m(v){e=v}function S(){return c}return{start:E,rewind:h,pause:y,cancel:l,set:m,isPaused:S}}function yi(e){var t=e;function n(r){t=r}function o(r){return Nn(Nt(r),t)}return{set:n,is:o}}function vi(e,t){var n=cn(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=Ho(),p=[];function c(){var l=n.mediaQuery==="min";It(r).sort(function(m,S){return l?+m-+S:+S-+m}).forEach(function(m){u(r[m],"("+(l?"min":"max")+"-width:"+m+"px)")}),u(s,ro),E()}function d(l){l&&i.destroy()}function u(l,m){var S=matchMedia(m);i.bind(S,"change",E),p.push([l,S])}function E(){var l=o.is(en),m=n.direction,S=p.reduce(function(v,x){return Ye(v,x[1].matches?x[0]:{})},{});ao(n),h(S),n.destroy?e.destroy(n.destroy==="completely"):l?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function y(l){matchMedia(ro).matches&&(l?Ye(n,s):ao(n,It(s)))}function h(l,m,S){Ye(n,l),m&&Ye(Object.getPrototypeOf(n),l),(S||!o.is(mt))&&e.emit(Te,n)}return{setup:c,destroy:d,reduce:y,set:h}}var un="Arrow",pn=un+"Left",dn=un+"Right",Jo=un+"Up",er=un+"Down",co="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,dn],ArrowRight:[er,pn]};function xi(e,t,n){function o(s,i,p){p=p||n.direction;var c=p===co&&!i?1:p===mn?0:-1;return bn[s]&&bn[s][c]||s.replace(/width|left|right/i,function(d,u){var E=bn[d.toLowerCase()][c]||d;return u>0?E.charAt(0).toUpperCase()+E.slice(1):E})}function r(s){return s*(n.direction===co?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",Si="disabled",Me="aria-",Vt=Me+"controls",tr=Me+"current",uo=Me+"selected",ke=Me+"label",Kn=Me+"labelledby",nr=Me+"hidden",Yn=Me+"orientation",Mt=Me+"roledescription",po=Me+"live",mo=Me+"busy",go=Me+"atomic",Xn=[qe,ft,Si,Vt,tr,ke,Kn,nr,Yn,Mt],He=Ot+"__",tt="is-",xn=Ot,fo=He+"track",Ci=He+"list",gn=He+"slide",or=gn+"--clone",wi=gn+"__container",Zn=He+"arrows",fn=He+"arrow",rr=fn+"--prev",ir=fn+"--next",hn=He+"pagination",ar=hn+"__page",$i=He+"progress",Ti=$i+"__bar",Ei=He+"toggle",_i=He+"spinner",ki=He+"sr",Ii=tt+"initialized",at=tt+"active",sr=tt+"prev",lr=tt+"next",Ln=tt+"visible",Fn=tt+"loading",cr=tt+"focus-in",ur=tt+"overflow",Ai=[at,Ln,sr,lr,Fn,cr,ur],Li={slide:gn,clone:or,arrows:Zn,arrow:fn,prev:rr,next:ir,pagination:hn,page:ar,spinner:_i};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Mi=5,ho=200,pr="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Ri(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,p=n.i18n,c={},d=[],u=[],E=[],y,h,l;function m(){I(),G(),x()}function S(){r(Se,v),r(Se,m),r(Te,x),s(document,pr+" keydown",function(C){l=C.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Be(i,cr,!!l)})}function v(C){var w=Xn.concat("style");Ue(d),De(i,u),De(y,E),Ne([y,h],w),Ne(i,C?w:["style",Mt])}function x(){De(i,u),De(y,E),u=$(xn),E=$(fo),We(i,u),We(y,E),ue(i,ke,n.label),ue(i,Kn,n.labelledby)}function I(){y=j("."+fo),h=jt(y,"."+Ci),Tt(y&&h,"A track/list element is missing."),Zt(d,Mo(h,"."+gn+":not(."+or+")")),rt({arrows:Zn,pagination:hn,prev:rr,next:ir,bar:Ti,toggle:Ei},function(C,w){c[w]=j("."+C)}),At(c,{root:i,track:y,list:h,slides:d})}function G(){var C=i.id||fi(Ot),w=n.role;i.id=C,y.id=y.id||C+"-track",h.id=h.id||C+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&w&&ue(i,qe,w),ue(i,Mt,p.carousel),ue(h,qe,"presentation")}function j(C){var w=Wo(i,C);return w&&Fi(w,"."+xn)===i?w:void 0}function $(C){return[C+"--"+n.type,C+"--"+n.direction,n.drag&&C+"--draggable",n.isNavigation&&C+"--nav",C===xn&&at]}return At(c,{setup:m,mount:S,destroy:v})}var bt="slide",Ct="loop",zt="fade";function Pi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,p=r.bind,c=e.Components,d=e.root,u=e.options,E=u.isNavigation,y=u.updateOnMove,h=u.i18n,l=u.pagination,m=u.slideFocus,S=c.Direction.resolve,v=Fe(o,"style"),x=Fe(o,ke),I=n>-1,G=jt(o,"."+wi),j;function $(){I||(o.id=d.id+"-slide"+Vn(t+1),ue(o,qe,l?"tabpanel":"group"),ue(o,Mt,h.slide),ue(o,ke,x||In(h.slideLabel,[t+1,e.length]))),C()}function C(){p(o,"click",ve(i,zn,A)),p(o,"keydown",ve(i,Zo,A)),s([St,Qo,st],P),s(Dn,R),y&&s(Ge,z)}function w(){j=!0,r.destroy(),De(o,Ai),Ne(o,Xn),ue(o,"style",v),ue(o,ke,x||"")}function R(){var F=e.splides.map(function(T){var W=T.splide.Components.Slides.getAt(t);return W?W.slide.id:""}).join(" ");ue(o,ke,In(h.slideX,(I?n:t)+1)),ue(o,Vt,F),ue(o,qe,m?"button":""),m&&Ne(o,Mt)}function z(){j||P()}function P(){if(!j){var F=e.index;O(),H(),Be(o,sr,t===F-1),Be(o,lr,t===F+1)}}function O(){var F=X();F!==so(o,at)&&(Be(o,at,F),ue(o,tr,E&&F||""),i(F?jo:Oo,A))}function H(){var F=b(),T=!F&&(!X()||I);if(e.state.is([xt,Pt])||ue(o,nr,T||""),ue(jn(o,u.focusableNodes||""),ft,T?-1:""),m&&ue(o,ft,T?-1:0),F!==so(o,Ln)&&(Be(o,Ln,F),i(F?Vo:zo,A)),!F&&document.activeElement===o){var W=c.Slides.getAt(e.index);W&&Ro(W.slide)}}function q(F,T,W){Le(W&&G||o,F,T)}function X(){var F=e.index;return F===t||u.cloneStatus&&F===n}function b(){if(e.is(zt))return X();var F=_e(c.Elements.track),T=_e(o),W=S("left",!0),J=S("right",!0);return nn(F[W])<=Ft(T[W])&&nn(T[J])<=Ft(F[J])}function L(F,T){var W=Ee(F-t);return!I&&(u.rewind||e.is(Ct))&&(W=Qe(W,e.length-W)),W<=T}var A={index:t,slideIndex:n,slide:o,container:G,isClone:I,mount:$,destroy:w,update:P,style:q,isWithin:L};return A}function Wi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=t.Elements,c=p.slides,d=p.list,u=[];function E(){y(),r(Se,h),r(Se,y)}function y(){c.forEach(function(P,O){m(P,O,-1)})}function h(){j(function(P){P.destroy()}),Ue(u)}function l(){j(function(P){P.update()})}function m(P,O,H){var q=Pi(e,O,H,P);q.mount(),u.push(q),u.sort(function(X,b){return X.index-b.index})}function S(P){return P?$(function(O){return!O.isClone}):u}function v(P){var O=t.Controller,H=O.toIndex(P),q=O.hasFocus()?1:n.perPage;return $(function(X){return Qt(X.index,H,H+q-1)})}function x(P){return $(P)[0]}function I(P,O){Ie(P,function(H){if(Ze(H)&&(H=Po(H)),Fo(H)){var q=c[O];q?Hn(H,q):Ht(d,H),We(H,n.classes.slide),w(H,ve(s,vt))}}),s(Se)}function G(P){it($(P).map(function(O){return O.slide})),s(Se)}function j(P,O){S(O).forEach(P)}function $(P){return u.filter(Lo(P)?P:function(O){return Ze(P)?kt(O.slide,P):Nn(Nt(P),O.index)})}function C(P,O,H){j(function(q){q.style(P,O,H)})}function w(P,O){var H=jn(P,"img"),q=H.length;q?H.forEach(function(X){i(X,"load error",function(){--q||O()})}):O()}function R(P){return P?c.length:u.length}function z(){return u.length>n.perPage}return{mount:E,destroy:h,update:l,register:m,get:S,getIn:v,getAt:x,add:I,remove:G,forEach:j,filter:$,style:C,getLength:R,isEnough:z}}function Ni(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=t.Slides,c=t.Direction.resolve,d=t.Elements,u=d.root,E=d.track,y=d.list,h=p.getAt,l=p.style,m,S,v;function x(){I(),s(window,"resize load",vi(ve(i,vt))),r([Te,Se],I),r(vt,G)}function I(){m=n.direction===mn,Le(u,"maxWidth",ot(n.width)),Le(E,c("paddingLeft"),j(!1)),Le(E,c("paddingRight"),j(!0)),G(!0)}function G(A){var F=_e(u);(A||S.width!==F.width||S.height!==F.height)&&(Le(E,"height",$()),l(c("marginRight"),ot(n.gap)),l("width",w()),l("height",R(),!0),S=F,i(sn),v!==(v=L())&&(Be(u,ur,v),i(hi,v)))}function j(A){var F=n.padding,T=c(A?"right":"left");return F&&ot(F[T]||(_t(F)?0:F))||"0px"}function $(){var A="";return m&&(A=C(),Tt(A,"height or heightRatio is missing."),A="calc("+A+" - "+j(!1)+" - "+j(!0)+")"),A}function C(){return ot(n.height||_e(y).width*n.heightRatio)}function w(){return n.autoWidth?null:ot(n.fixedWidth)||(m?"":z())}function R(){return ot(n.fixedHeight)||(m?n.autoHeight?null:z():C())}function z(){var A=ot(n.gap);return"calc((100%"+(A&&" + "+A)+")/"+(n.perPage||1)+(A&&" - "+A)+")"}function P(){return _e(y)[c("width")]}function O(A,F){var T=h(A||0);return T?_e(T.slide)[c("width")]+(F?0:X()):0}function H(A,F){var T=h(A);if(T){var W=_e(T.slide)[c("right")],J=_e(y)[c("left")];return Ee(W-J)+(F?0:X())}return 0}function q(A){return H(e.length-1)-H(0)+O(0,A)}function X(){var A=h(0);return A&&parseFloat(Le(A.slide,c("marginRight")))||0}function b(A){return parseFloat(Le(E,c("padding"+(A?"Right":"Left"))))||0}function L(){return e.is(zt)||q(!0)>P()}return{mount:x,resize:G,listSize:P,slideSize:O,sliderSize:q,totalSize:H,getPadding:b,isOverflow:L}}var Hi=2;function ji(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,p=t.Direction.resolve,c=[],d;function u(){r(Se,E),r([Te,vt],h),(d=S())&&(l(d),t.Layout.resize(!0))}function E(){y(),u()}function y(){it(c),Ue(c),o.destroy()}function h(){var v=S();d!==v&&(d<v||!v)&&o.emit(Se)}function l(v){var x=i.get().slice(),I=x.length;if(I){for(;x.length<v;)Zt(x,x);Zt(x.slice(-v),x.slice(0,v)).forEach(function(G,j){var $=j<v,C=m(G.slide,j);$?Hn(C,x[0].slide):Ht(s.list,C),Zt(c,C),i.register(C,j-v+($?0:I),G.index)})}}function m(v,x){var I=v.cloneNode(!0);return We(I,n.classes.clone),I.id=e.root.id+"-clone"+Vn(x+1),I}function S(){var v=n.clones;if(!e.is(Ct))v=0;else if(Wt(v)){var x=n[p("fixedWidth")]&&t.Layout.slideSize(0),I=x&&Ft(_e(s.track)[p("width")]/x);v=I||n[p("autoWidth")]&&e.length||n.perPage*Hi}return v}return{mount:u,destroy:y}}function Oi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,p=t.Layout,c=p.slideSize,d=p.getPadding,u=p.totalSize,E=p.listSize,y=p.sliderSize,h=t.Direction,l=h.resolve,m=h.orient,S=t.Elements,v=S.list,x=S.track,I;function G(){I=t.Transition,r([et,sn,Te,Se],j)}function j(){t.Controller.isBusy()||(t.Scroll.cancel(),C(e.index),t.Slides.update())}function $(T,W,J,le){T!==W&&A(T>J)&&(P(),w(z(q(),T>J),!0)),i(xt),s(Ge,W,J,T),I.start(W,function(){i(yt),s(St,W,J,T),le&&le()})}function C(T){w(H(T,!0))}function w(T,W){if(!e.is(zt)){var J=W?T:R(T);Le(v,"transform","translate"+l("X")+"("+J+"px)"),T!==J&&s(Qo)}}function R(T){if(e.is(Ct)){var W=O(T),J=W>t.Controller.getEnd(),le=W<0;(le||J)&&(T=z(T,J))}return T}function z(T,W){var J=T-L(W),le=y();return T-=m(le*(Ft(Ee(J)/le)||1))*(W?1:-1),T}function P(){w(q(),!0),I.cancel()}function O(T){for(var W=t.Slides.get(),J=0,le=1/0,oe=0;oe<W.length;oe++){var me=W[oe].index,N=Ee(H(me,!0)-T);if(N<=le)le=N,J=me;else break}return J}function H(T,W){var J=m(u(T-1)-b(T));return W?X(J):J}function q(){var T=l("left");return _e(v)[T]-_e(x)[T]+m(d(!1))}function X(T){return n.trimSpace&&e.is(bt)&&(T=pt(T,0,m(y(!0)-E()))),T}function b(T){var W=n.focus;return W==="center"?(E()-c(T,!0))/2:+W*c(T)||0}function L(T){return H(T?t.Controller.getEnd():0,!!n.trimSpace)}function A(T){var W=m(z(q(),T));return T?W>=0:W<=v[l("scrollWidth")]-_e(x)[l("width")]}function F(T,W){W=Wt(W)?q():W;var J=T!==!0&&m(W)<m(L(!1)),le=T!==!1&&m(W)>m(L(!0));return J||le}return{mount:G,move:$,jump:C,translate:w,shift:z,cancel:P,toIndex:O,toPosition:H,getPosition:q,getLimit:L,exceededLimit:F,reposition:j}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,p=i.getPosition,c=i.getLimit,d=i.toPosition,u=t.Slides,E=u.isEnough,y=u.getLength,h=n.omitEnd,l=e.is(Ct),m=e.is(bt),S=ve(q,!1),v=ve(q,!0),x=n.start||0,I,G=x,j,$,C;function w(){R(),r([Te,Se,on],R),r(sn,z)}function R(){j=y(!0),$=n.perMove,C=n.perPage,I=A();var N=pt(x,0,h?I:j-1);N!==x&&(x=N,i.reposition())}function z(){I!==A()&&s(on)}function P(N,ie,fe){if(!me()){var ge=H(N),Y=L(ge);Y>-1&&(ie||Y!==x)&&(J(Y),i.move(ge,Y,G,fe))}}function O(N,ie,fe,ge){t.Scroll.scroll(N,ie,fe,function(){var Y=L(i.toIndex(p()));J(h?Qe(Y,I):Y),ge&&ge()})}function H(N){var ie=x;if(Ze(N)){var fe=N.match(/([+\-<>])(\d+)?/)||[],ge=fe[1],Y=fe[2];ge==="+"||ge==="-"?ie=X(x+ +(""+ge+(+Y||1)),x):ge===">"?ie=Y?F(+Y):S(!0):ge==="<"&&(ie=v(!0))}else ie=l?N:pt(N,0,I);return ie}function q(N,ie){var fe=$||(oe()?1:C),ge=X(x+fe*(N?-1:1),x,!($||oe()));return ge===-1&&m&&!No(p(),c(!N),1)?N?0:I:ie?ge:L(ge)}function X(N,ie,fe){if(E()||oe()){var ge=b(N);ge!==N&&(ie=N,N=ge,fe=!1),N<0||N>I?!$&&(Qt(0,N,ie,!0)||Qt(I,ie,N,!0))?N=F(T(N)):l?N=fe?N<0?-(j%C||C):j:N:n.rewind?N=N<0?I:0:N=-1:fe&&N!==ie&&(N=F(T(ie)+(N<ie?-1:1)))}else N=-1;return N}function b(N){if(m&&n.trimSpace==="move"&&N!==x)for(var ie=p();ie===d(N,!0)&&Qt(N,0,e.length-1,!n.rewind);)N<x?--N:++N;return N}function L(N){return l?(N+j)%j||0:N}function A(){for(var N=j-(oe()||l&&$?1:C);h&&N-- >0;)if(d(j-1,!0)!==d(N,!0)){N++;break}return pt(N,0,j-1)}function F(N){return pt(oe()?N:C*N,0,I)}function T(N){return oe()?Qe(N,I):nn((N>=I?j-1:N)/C)}function W(N){var ie=i.toIndex(N);return m?pt(ie,0,I):ie}function J(N){N!==x&&(G=x,x=N)}function le(N){return N?G:x}function oe(){return!Wt(n.focus)||n.isNavigation}function me(){return e.state.is([xt,Pt])&&!!n.waitForTransition}return{mount:w,go:P,scroll:O,getNext:S,getPrev:v,getAdjacent:q,getEnd:A,setIndex:J,getIndex:le,toIndex:F,toPage:T,toDest:W,hasFocus:oe,isBusy:me}}var zi="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",qt=40;function Di(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=n.classes,c=n.i18n,d=t.Elements,u=t.Controller,E=d.arrows,y=d.track,h=E,l=d.prev,m=d.next,S,v,x={};function I(){j(),r(Te,G)}function G(){$(),I()}function j(){var O=n.arrows;O&&!(l&&m)&&R(),l&&m&&(At(x,{prev:l,next:m}),Lt(h,O?"":"none"),We(h,v=Zn+"--"+n.direction),O&&(C(),P(),ue([l,m],Vt,y.id),i(Uo,l,m)))}function $(){o.destroy(),De(h,v),S?(it(E?[l,m]:h),l=m=null):Ne([l,m],Xn)}function C(){r([et,St,Se,st,on],P),s(m,"click",ve(w,">")),s(l,"click",ve(w,"<"))}function w(O){u.go(O,!0)}function R(){h=E||gt("div",p.arrows),l=z(!0),m=z(!1),S=!0,Ht(h,[l,m]),!E&&Hn(h,y)}function z(O){var H='<button class="'+p.arrow+" "+(O?p.prev:p.next)+'" type="button"><svg xmlns="'+zi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||Bi)+'" />';return Po(H)}function P(){if(l&&m){var O=e.index,H=u.getPrev(),q=u.getNext(),X=H>-1&&O<H?c.last:c.prev,b=q>-1&&O>q?c.first:c.next;l.disabled=H<0,m.disabled=q<0,ue(l,ke,X),ue(m,ke,b),i(Go,l,m,H,q)}}return{arrows:x,mount:I,destroy:$,update:P}}var qi=On+"-interval";function Ui(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=cn(n.interval,e.go.bind(e,">"),C),c=p.isPaused,d=t.Elements,u=t.Elements,E=u.root,y=u.toggle,h=n.autoplay,l,m,S=h==="pause";function v(){h&&(x(),y&&ue(y,Vt,d.track.id),S||I(),$())}function x(){n.pauseOnHover&&s(E,"mouseenter mouseleave",function(R){l=R.type==="mouseenter",j()}),n.pauseOnFocus&&s(E,"focusin focusout",function(R){m=R.type==="focusin",j()}),y&&s(y,"click",function(){S?I():G(!0)}),r([Ge,ln,Se],p.rewind),r(Ge,w)}function I(){c()&&t.Slides.isEnough()&&(p.start(!n.resetProgress),m=l=S=!1,$(),i(qn))}function G(R){R===void 0&&(R=!0),S=!!R,$(),c()||(p.pause(),i(Un))}function j(){S||(l||m?G(!1):I())}function $(){y&&(Be(y,at,!S),ue(y,ke,n.i18n[S?"play":"pause"]))}function C(R){var z=d.bar;z&&Le(z,"width",R*100+"%"),i(Xo,R)}function w(R){var z=t.Slides.getAt(R);p.set(z&&+Fe(z.slide,qi)||n.interval)}return{mount:v,destroy:p.cancel,play:I,pause:G,isPaused:c}}function Gi(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Gn,ve(p,!0)),r([et,Te,Se],ve(i,!0)))}function i(c){t.Slides.forEach(function(d){var u=jt(d.container||d.slide,"img");u&&u.src&&p(c,u,d)})}function p(c,d,u){u.style("background",c?'center/cover no-repeat url("'+d.src+'")':"",!0),Lt(d,c?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Ki=10,Yi=600,Xi=.6,Zi=1.5,Qi=800;function Ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,p=t.Move,c=p.getPosition,d=p.getLimit,u=p.exceededLimit,E=p.translate,y=e.is(bt),h,l,m=1;function S(){r(Ge,G),r([Te,Se],j)}function v(C,w,R,z,P){var O=c();if(G(),R&&(!y||!u())){var H=t.Layout.sliderSize(),q=kn(C)*H*nn(Ee(C)/H)||0;C=p.toPosition(t.Controller.toDest(C%H))+q}var X=No(O,C,1);m=1,w=X?0:w||tn(Ee(C-O)/Zi,Qi),l=z,h=cn(w,x,ve(I,O,C,P),1),i(Pt),s(ln),h.start()}function x(){i(yt),l&&l(),s(st)}function I(C,w,R,z){var P=c(),O=C+(w-C)*$(z),H=(O-P)*m;E(P+H),y&&!R&&u()&&(m*=Xi,Ee(H)<Ki&&v(d(u(!0)),Yi,!1,l,!0))}function G(){h&&h.cancel()}function j(){h&&!h.isPaused()&&(G(),x())}function $(C){var w=n.easingFunc;return w?w(C):1-Math.pow(1-C,4)}return{mount:S,destroy:G,scroll:v,cancel:j}}var dt={passive:!1,capture:!0};function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=o.unbind,c=e.state,d=t.Move,u=t.Scroll,E=t.Controller,y=t.Elements.track,h=t.Media.reduce,l=t.Direction,m=l.resolve,S=l.orient,v=d.getPosition,x=d.exceededLimit,I,G,j,$,C,w=!1,R,z,P;function O(){i(y,Sn,En,dt),i(y,Cn,En,dt),i(y,pr,q,dt),i(y,"click",L,{capture:!0}),i(y,"dragstart",ze),r([et,Te],H)}function H(){var _=n.drag;ee(!_),$=_==="free"}function q(_){if(R=!1,!z){var f=Y(_);ge(_.target)&&(f||!_.button)&&(E.isBusy()?ze(_,!0):(P=f?y:window,C=c.is([xt,Pt]),j=null,i(P,Sn,X,dt),i(P,Cn,b,dt),d.cancel(),u.cancel(),A(_)))}}function X(_){if(c.is(Xt)||(c.set(Xt),s(Bo)),_.cancelable)if(C){d.translate(I+fe(oe(_)));var f=me(_)>ho,V=w!==(w=x());(f||V)&&A(_),R=!0,s(Do),ze(_)}else W(_)&&(C=T(_),ze(_))}function b(_){c.is(Xt)&&(c.set(yt),s(qo)),C&&(F(_),ze(_)),p(P,Sn,X),p(P,Cn,b),C=!1}function L(_){!z&&R&&ze(_,!0)}function A(_){j=G,G=_,I=v()}function F(_){var f=J(_),V=le(f),B=n.rewind&&n.rewindByDrag;h(!1),$?E.scroll(V,0,n.snap):e.is(zt)?E.go(S(kn(f))<0?B?"<":"-":B?">":"+"):e.is(bt)&&w&&B?E.go(x(!0)?">":"<"):E.go(E.toDest(V),!0),h(!0)}function T(_){var f=n.dragMinThreshold,V=_t(f),B=V&&f.mouse||0,K=(V?f.touch:+f)||10;return Ee(oe(_))>(Y(_)?K:B)}function W(_){return Ee(oe(_))>Ee(oe(_,!0))}function J(_){if(e.is(Ct)||!w){var f=me(_);if(f&&f<ho)return oe(_)/f}return 0}function le(_){return v()+kn(_)*Qe(Ee(_)*(n.flickPower||600),$?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function oe(_,f){return ie(_,f)-ie(N(_),f)}function me(_){return _n(_)-_n(N(_))}function N(_){return G===_&&j||G}function ie(_,f){return(Y(_)?_.changedTouches[0]:_)["page"+m(f?"Y":"X")]}function fe(_){return _/(w&&e.is(bt)?Mi:1)}function ge(_){var f=n.noDrag;return!kt(_,"."+ar+", ."+fn)&&(!f||!kt(_,f))}function Y(_){return typeof TouchEvent<"u"&&_ instanceof TouchEvent}function M(){return C}function ee(_){z=_}return{mount:O,disable:ee,isDragging:M}}var ta={Spacebar:" ",Right:dn,Left:pn,Up:Jo,Down:er};function Qn(e){return e=Ze(e)?e:e.key,ta[e]||e}var yo="keydown";function na(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,p=e.root,c=t.Direction.resolve,d,u;function E(){y(),r(Te,h),r(Te,y),r(Ge,m)}function y(){var v=n.keyboard;v&&(d=v==="global"?window:p,s(d,yo,S))}function h(){i(d,yo)}function l(v){u=v}function m(){var v=u;u=!0,Ao(function(){u=v})}function S(v){if(!u){var x=Qn(v);x===c(pn)?e.go("<"):x===c(dn)&&e.go(">")}}return{mount:E,destroy:h,disable:l}}var Et=On+"-lazy",Jt=Et+"-srcset",oa="["+Et+"], ["+Jt+"]";function ra(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,p=o.emit,c=n.lazyLoad==="sequential",d=[St,st],u=[];function E(){n.lazyLoad&&(y(),r(Se,y))}function y(){Ue(u),h(),c?v():(s(d),r(d,l),l())}function h(){t.Slides.forEach(function(x){jn(x.slide,oa).forEach(function(I){var G=Fe(I,Et),j=Fe(I,Jt);if(G!==I.src||j!==I.srcset){var $=n.classes.spinner,C=I.parentElement,w=jt(C,"."+$)||gt("span",$,C);u.push([I,x,w]),I.src||Lt(I,"none")}})})}function l(){u=u.filter(function(x){var I=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,I)?m(x):!0}),u.length||s(d)}function m(x){var I=x[0];We(x[1].slide,Fn),i(I,"load error",ve(S,x)),ue(I,"src",Fe(I,Et)),ue(I,"srcset",Fe(I,Jt)),Ne(I,Et),Ne(I,Jt)}function S(x,I){var G=x[0],j=x[1];De(j.slide,Fn),I.type!=="error"&&(it(x[2]),Lt(G,""),p(Gn,G,j),p(vt)),c&&v()}function v(){u.length&&m(u.shift())}return{mount:E,destroy:ve(Ue,u),check:l}}function ia(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=t.Slides,c=t.Elements,d=t.Controller,u=d.hasFocus,E=d.getIndex,y=d.go,h=t.Direction.resolve,l=c.pagination,m=[],S,v;function x(){I(),r([Te,Se,on],x);var z=n.pagination;l&&Lt(l,z?"":"none"),z&&(r([Ge,ln,st],R),G(),R(),s(Ko,{list:S,items:m},w(e.index)))}function I(){S&&(it(l?Je(S.children):S),De(S,v),Ue(m),S=null),o.destroy()}function G(){var z=e.length,P=n.classes,O=n.i18n,H=n.perPage,q=u()?d.getEnd()+1:Ft(z/H);S=l||gt("ul",P.pagination,c.track.parentElement),We(S,v=hn+"--"+C()),ue(S,qe,"tablist"),ue(S,ke,O.select),ue(S,Yn,C()===mn?"vertical":"");for(var X=0;X<q;X++){var b=gt("li",null,S),L=gt("button",{class:P.page,type:"button"},b),A=p.getIn(X).map(function(T){return T.slide.id}),F=!u()&&H>1?O.pageX:O.slideX;i(L,"click",ve(j,X)),n.paginationKeyboard&&i(L,"keydown",ve($,X)),ue(b,qe,"presentation"),ue(L,qe,"tab"),ue(L,Vt,A.join(" ")),ue(L,ke,In(F,X+1)),ue(L,ft,-1),m.push({li:b,button:L,page:X})}}function j(z){y(">"+z,!0)}function $(z,P){var O=m.length,H=Qn(P),q=C(),X=-1;H===h(dn,!1,q)?X=++z%O:H===h(pn,!1,q)?X=(--z+O)%O:H==="Home"?X=0:H==="End"&&(X=O-1);var b=m[X];b&&(Ro(b.button),y(">"+X),ze(P,!0))}function C(){return n.paginationDirection||n.direction}function w(z){return m[d.toPage(z)]}function R(){var z=w(E(!0)),P=w(E());if(z){var O=z.button;De(O,at),Ne(O,uo),ue(O,ft,-1)}if(P){var H=P.button;We(H,at),ue(H,uo,!0),ue(H,ft,"")}s(Yo,{list:S,items:m},z,P)}return{items:m,mount:x,destroy:I,getAt:w,update:R}}var aa=[" ","Enter"];function sa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(l){l.isParent||(d(e,l.splide),d(l.splide,e))}),o&&u()}function p(){s.forEach(function(l){l.destroy()}),Ue(s)}function c(){p(),i()}function d(l,m){var S=be(l);S.on(Ge,function(v,x,I){m.go(m.is(Ct)?I:v)}),s.push(S)}function u(){var l=be(e),m=l.on;m(zn,y),m(Zo,h),m([et,Te],E),s.push(l),l.emit(Dn,e.splides)}function E(){ue(t.Elements.list,Yn,n.direction===mn?"vertical":"")}function y(l){e.go(l.index)}function h(l,m){Nn(aa,Qn(m))&&(y(l),ze(m))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:p,remount:c}}function la(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",p,dt)}function p(d){if(d.cancelable){var u=d.deltaY,E=u<0,y=_n(d),h=n.wheelMinThreshold||0,l=n.wheelSleep||0;Ee(u)>h&&y-s>l&&(e.go(E?"<":">"),s=y),c(E)&&ze(d)}}function c(d){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var ca=90;function ua(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,p=gt("span",ki),c=cn(ca,ve(u,!1));function d(){i&&(y(!t.Autoplay.isPaused()),ue(s,go,!0),p.textContent="…",r(qn,ve(y,!0)),r(Un,ve(y,!1)),r([St,st],ve(u,!0)))}function u(h){ue(s,mo,h),h?(Ht(s,p),c.start()):(it(p),c.cancel())}function E(){Ne(s,[po,go,mo]),it(p)}function y(h){i&&ue(s,po,h?"off":"polite")}return{mount:d,disable:y,destroy:E}}var pa=Object.freeze({__proto__:null,Media:bi,Direction:xi,Elements:Ri,Slides:Wi,Layout:Ni,Clones:ji,Move:Oi,Controller:Vi,Arrows:Di,Autoplay:Ui,Cover:Gi,Scroll:Ji,Drag:ea,Keyboard:na,LazyLoad:ra,Pagination:ia,Sync:sa,Wheel:la,Live:ua}),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"},ma={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:Li,i18n:da,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(p){p.style("transform","translateX(-"+100*p.index+"%)")})}function i(p,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(c)}return{mount:r,start:i,cancel:En}}function fa(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,p=ve(Le,i,"transition"),c;function d(){be(e).bind(i,"transitionend",function(h){h.target===i&&c&&(E(),c())})}function u(h,l){var m=o.toPosition(h,!0),S=o.getPosition(),v=y(h);Ee(m-S)>=1&&v>=1?n.useScroll?s.scroll(m,v,!1,l):(p("transform "+v+"ms "+n.easing),o.translate(m,!0),c=l):(o.jump(h),l())}function E(){p(""),s.cancel()}function y(h){var l=n.rewindSpeed;if(e.is(bt)&&l){var m=r.getIndex(!0),S=r.getEnd();if(m===0&&h>=S||m>=S&&h===0)return l}return n.speed}return{mount:d,start:u,cancel:E}}var ha=(function(){function e(n,o){this.event=be(),this.Components={},this.state=yi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Wo(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ye({label:Fe(r,ke)||"",labelledby:Fe(r,Kn)||""},ma,e.defaults,o||{});try{Ye(o,JSON.parse(Fe(r,On)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,p=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=p,this._T=r||this._T||(this.is(zt)?ga:fa),this._E=o||this._E;var c=At({},pa,this._E,{Transition:this._T});return rt(c,function(d,u){var E=d(s,p,s._o);p[u]=E,E.setup&&E.setup()}),rt(p,function(d){d.mount&&d.mount()}),this.emit(et),We(this.root,Ii),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Je(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(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(An,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Bn),r.destroy(),o&&Ue(this.splides),s.set(en)),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})(),Jn=ha;Jn.defaults={};Jn.STATES=gi;var vo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[zn,"onClick"],[jo,"onActive"],[Oo,"onInactive"],[Vo,"onVisible"],[zo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[Bo,"onDrag"],[Do,"onDragging"],[qo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[Bn,"onDestroy"],[Uo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Ko,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Dn,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[Un,"onAutoplayPause"],[Gn,"onLazyLoadLoaded"]];function eo(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function Mn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Mn(n,t[o]));if(rn(e)&&rn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Mn(e[r],t[r]))}return e===t}function ya(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 Rn(e,t){const n=e;return va(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Rn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var ba=({children:e,className:t,...n})=>g.createElement("div",{className:eo("splide__track",t),...n},g.createElement("ul",{className:"splide__list"},e)),dr=class extends g.Component{constructor(){super(...arguments),this.splideRef=g.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Rn({},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&&!Mn(this.options,e)&&(this.splide.options=e,this.options=Rn({},e));const t=this.getSlides();ya(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){vo.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 g.createElement(t,{className:eo("splide",e),ref:this.splideRef,...this.omit(r,["options",...vo.map(s=>s[1])])},n?g.createElement(ba,null,o):o)}},mr=({children:e,className:t,...n})=>g.createElement("li",{className:eo("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},Sa=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Sa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Pe(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?_.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}const Rt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:wa(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 wa(e){return{...e.fontFamily&&{fontFamily:yn(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 Ca="SvgImage-module__svg___q3xE-",$a="SvgImage-module__img___VsTm-",vo={svg:Ca,img:$a},Ta=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},_a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,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 u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ta(e)||!s?a.jsx("img",{src:e,alt:"",className:he(vo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(vo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},Ea={"top-left":oe.topLeftAlignment,"top-center":oe.topCenterAlignment,"top-right":oe.topRightAlignment,"middle-left":oe.middleLeftAlignment,"middle-center":oe.middleCenterAlignment,"middle-right":oe.middleRightAlignment,"bottom-left":oe.bottomLeftAlignment,"bottom-center":oe.bottomCenterAlignment,"bottom-right":oe.bottomRightAlignment};function ka({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=h.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:l,textAlign:m,wordSpacing:c,fontSizeLineHeight:T,textAppearance:S,color:g}=n.imageCaption,[p,d]=h.useState(void 0),[x,y]=h.useState(null),[b,E]=h.useState(0),[K,k]=h.useState(0),{direction:I,transition:w,controls:C,pagination:R,imageCaption:z,triggers:P}=e,H=h.useRef(w.type),{x:j,y:D}=e.controls.offset,G=v=>{r&&r.go(v)};return h.useEffect(()=>{if(!x)return;const v=new ResizeObserver(F=>{if(!r)return;const[A]=F;d({width:Math.round(A.contentRect.width),height:Math.round(A.contentRect.height)})});return v.observe(x),()=>v.unobserve(x)},[x]),h.useEffect(()=>{!r||H.current===w.type||(k(v=>v+1),H.current=w.type)},[w.type]),a.jsx("div",{className:he(oe.wrapper,{[oe.editor]:o}),ref:y,children:a.jsxs("div",{className:oe.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:w.backgroundColor&&w.type==="fade in"?w.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(oe.captionBlock),children:a.jsx("div",{className:oe.captionTextWrapper,children:t.map((v,F)=>a.jsx("div",{className:he(oe.captionText,Ea[z.alignment],{[oe.withPointerEvents]:F===b&&o,[oe.active]:F===b}),style:{fontFamily:yn(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":_.scalingValue(i.width,o),letterSpacing:_.scalingValue(l,o),wordSpacing:_.scalingValue(c,o),textAlign:m,fontSize:_.scalingValue(T.fontSize,o),lineHeight:_.scalingValue(T.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:g,transitionDuration:w.duration?`${Math.round(parseInt(w.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:oe.captionTextInner,style:{"--link-hover-color":z.linkHoverColor,"--link-color":z.linkColor,position:"relative",top:_.scalingValue(z.offset.y,o),left:_.scalingValue(z.offset.x,o)},children:a.jsx(Rt,{content:v.imageCaption})})},F))})}),a.jsx(pr,{onMove:v=>{E(v.index)},ref:s,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,autoplay:P.autoPlay!==null,...P.autoPlay!==null&&{interval:parseInt(P.autoPlay)*1e3},direction:I==="horiz"||w.type==="fade in"?"ltr":"ttb",pagination:!1,drag:P.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:w.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((v,F)=>a.jsx(dr,{children:a.jsx("div",{className:oe.sliderItem,children:a.jsx("div",{className:oe.imgWrapper,children:a.jsx("img",{className:he(oe.sliderImage,{[oe.contain]:v.image.objectFit==="contain",[oe.cover]:v.image.objectFit==="cover"}),src:v.image.url,alt:v.image.name??""})})})},F))},K),C.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(oe.arrow,{[oe.arrowVertical]:I==="vert",[oe.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:a.jsxs("button",{onClick:()=>{G("-1")},className:oe.arrowInner,style:{transform:`translate(${_.scalingValue(j,o)}, ${_.scalingValue(D*(I==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${I==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&a.jsx(Xe,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:he(oe.arrowImg,oe.mirror)}),!C.arrowsImgUrl&&a.jsx(bo,{color:C.color,className:he(oe.arrowIcon,oe.arrowImg,oe.mirror)})]})}),a.jsx("div",{className:he(oe.arrow,oe.nextArrow,{[oe.arrowVertical]:I==="vert",[oe.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:a.jsxs("button",{className:oe.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${_.scalingValue(j*(I==="horiz"?-1:1),o)}, ${_.scalingValue(D,o)}) scale(${e.controls.scale/100}) rotate(${I==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&a.jsx(Xe,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:oe.arrowImg}),!C.arrowsImgUrl&&a.jsx(bo,{color:C.color,className:he(oe.arrowIcon,oe.arrowImg)})]})})]}),P.triggersList.click&&a.jsx("div",{className:oe.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&a.jsx("div",{className:he(oe.pagination,{[oe.paginationInsideBottom]:R.position==="inside-1"&&I==="horiz",[oe.paginationInsideTop]:R.position==="inside-2"&&I==="horiz",[oe.paginationOutsideBottom]:R.position==="outside-1"&&I==="horiz",[oe.paginationOutsideTop]:R.position==="outside-2"&&I==="horiz",[oe.paginationInsideLeft]:R.position==="inside-1"&&I==="vert",[oe.paginationInsideRight]:R.position==="inside-2"&&I==="vert",[oe.paginationOutsideLeft]:R.position==="outside-1"&&I==="vert",[oe.paginationOutsideRight]:R.position==="outside-2"&&I==="vert",[oe.paginationVertical]:I==="vert"}),children:a.jsx("div",{className:oe.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${_.scalingValue(R.offset.x,o)}, ${_.scalingValue(R.offset.y,o)}) rotate(${I==="horiz"?"0deg":"90deg"})`},children:t.map((v,F)=>a.jsx("button",{onClick:()=>{r&&r.go(F)},className:he(oe.paginationItem),children:a.jsx("div",{className:he(oe.dot,{[oe.activeDot]:F===b}),style:{backgroundColor:F===b?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},F))})})]})})}function bo({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 Ia={element:ka,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:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Aa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",La="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",Ma="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:Aa,image:La,link:Fa,cursor:Ma};function xo(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,u=s/2,l=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function Cn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await Cn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Cn(e);s=i.height/i.width*r}else{const i=await Cn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Pa({settings:e,content:t,isEditor:n}){const[o,r]=h.useState(null),[s,i]=h.useState([]),[u,l]=h.useState(0),m=h.useRef(0),[c,T]=h.useState({x:0,y:0}),[S,g]=h.useState(1),[p,d]=h.useState("none"),x=h.useRef({x:0,y:0}),[y,b]=h.useState(!1),{sizeType:E,imageWidth:K,randomRangeImageWidth:k}=e.imageSize,{revealPosition:I,visible:w}=e.position,{cursorType:C,target:R,defaultCursorScale:z,defaultCursor:P,hoverCursorScale:H,hoverCursor:j}=e.cursor;h.useEffect(()=>{if(!o)return;const v=(M,$)=>{const N=o.getBoundingClientRect(),J=M-N.left,ce=$-N.top;if(T({x:J,y:ce}),C==="system"){d("none"),g(1);return}const re=J,ge=ce,W=document.elementFromPoint(N.left+re,N.top+ge);if(W&&W.closest("a")){d("none"),g(1);return}const V=xo(re,ge,s)||R==="area"?{img:j??"none",scale:H}:{img:P??"none",scale:z};d(V.img),g(V.scale)},F=M=>{M.stopPropagation(),x.current={x:M.clientX,y:M.clientY},v(M.clientX,M.clientY)},A=()=>{y&&v(x.current.x,x.current.y)};return o.addEventListener("mousemove",F),window.addEventListener("scroll",A,!0),()=>{o.removeEventListener("mousemove",F),window.removeEventListener("scroll",A,!0)}},[o,y,c,C,R,j,P,H,z,s]),h.useEffect(()=>{y||(d("none"),g(0))},[y]);const D=async(v,F,A,M={})=>{const{width:$,height:N,finalWidth:J}=await Ra(v.image.url,E,K,k);let ce=0,re=0;I==="same"?(ce=F/2,re=A/2):(ce=M.x??Math.random()*F,re=M.y??Math.random()*A);const ge=Math.min(Math.max(ce,$/2),F-$/2),W=Math.min(Math.max(re,N/2),A-N/2);return{id:m.current++,url:v.image.url,link:v.link,name:v.image.name,x:ge,y:W,width:J}};h.useEffect(()=>{if(!o||t.length===0)return;const v=o.getBoundingClientRect(),F=v.width,A=v.height,M=[];(async()=>{const N=t[0],J=await D(N,F,A);M.push(J),i(M),l(1)})()},[E,K,k,I,o]),h.useEffect(()=>{w==="last One"&&i(v=>v.length>0?[v[v.length-1]]:[])},[w]);const G=async v=>{if(!o)return;const F=o.getBoundingClientRect(),A=v.clientX-F.left,M=v.clientY-F.top;if(R==="image"&&!xo(A,M,s))return;let $=0,N=0;I==="on Click"?($=A,N=M):I==="same"?($=F.width/2,N=F.height/2):($=Math.random()*F.width,N=Math.random()*F.height);const J=t[u],ce=await D(J,F.width,F.height,{x:$,y:N});i(re=>w==="all"?[...re,ce]:[ce]),l(re=>re>=t.length-1?0:re+1)};return a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(v=>a.jsx("div",{className:ut.wrapper,style:{top:`${v.y}px`,left:`${v.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:v.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:R==="area"&&v.link?a.jsx("a",{href:v.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)}):a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)},v.id)),y&&a.jsx("div",{className:ut.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Wa={element:Pa,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:""}]}}}},Na="LightBox-module__hidden___9s-9x",Ha="LightBox-module__heroImage___sTxNF",ja="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",Oa="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Ba="LightBox-module__imgWrapper___LuFUp",Da="LightBox-module__contain___8-yaS",qa="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",Ka="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Za="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Qa="LightBox-module__arrowIcon___3VaFf",es="LightBox-module__arrowImg___pNV88",ts="LightBox-module__mirror___pjeXc",ns="LightBox-module__thumbsWrapper___GB-nU",os="LightBox-module__thumbsContainerVertical___wttk5",rs="LightBox-module__thumbsContainer___osSma",is="LightBox-module__thumbsAlignStart___MO6tY",as="LightBox-module__thumbsAlignCenter___Q4sUx",ss="LightBox-module__thumbsAlignEnd___p4y9R",ls="LightBox-module__thumbItem___HvnF3",cs="LightBox-module__closeButton___g2khP",us="LightBox-module__fadeIn___0m5GW",ps="LightBox-module__slideInLeft___gPYwC",ds="LightBox-module__slideInRight___S-pPp",ms="LightBox-module__slideInTop___DFdAj",gs="LightBox-module__slideInBottom___m27kZ",fs="LightBox-module__fadeOut___55qBR",hs="LightBox-module__slideOutLeft___NvU7P",ys="LightBox-module__slideOutRight___SK7eC",vs="LightBox-module__slideOutTop___Vgg0z",bs="LightBox-module__slideOutBottom___nJ0Ef",xs="LightBox-module__scaleSlide___vZriG",U={hidden:Na,heroImage:Ha,background:ja,editor:Va,contentStyle:Oa,imageStyle:za,imgWrapper:Ba,contain:Da,cover:qa,caption:Ua,captionTextInner:Ka,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Za,arrowInner:Ja,arrowIcon:Qa,arrowImg:es,mirror:ts,thumbsWrapper:ns,thumbsContainerVertical:os,thumbsContainer:rs,thumbsAlignStart:is,thumbsAlignCenter:as,thumbsAlignEnd:ss,thumbItem:ls,closeButton:cs,fadeIn:us,slideInLeft:ps,slideInRight:ds,slideInTop:ms,slideInBottom:gs,fadeOut:fs,slideOutLeft:hs,slideOutRight:ys,slideOutTop:vs,slideOutBottom:bs,scaleSlide:xs},Ut=(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% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:o.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,o};function 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 So(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,u=o/r,l=s/i;let m,c;l>u?(m=o,c=o/l):(c=r,m=r*l);const T=t.left+n.left,S=t.top+n.top,g=(o-m)/2+T,p=(r-c)/2+S;return{x:g,y:p,width:m,height:c}}function wo(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 Co(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Ss(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 ws=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,u]=h.useState(!1),{url:l}=e.thumbnailBlock.cover;return h.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:l,alt:"Cover",className:U.heroImage,onClick:()=>u(!0)}),a.jsx(Cs,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},Cs=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:u})=>{var L;const[l,m]=h.useState(0),[c,T]=h.useState(0),[S,g]=h.useState(!1),[p,d]=h.useState(!1),[x,y]=h.useState({}),b=h.useRef(null),E=h.useRef(null),K=h.useRef(null),k=h.useRef(!1),I=h.useRef(null),w=h.useRef(null),C=h.useRef(null),R=h.useRef(null),z=h.useRef(!1),P=h.useRef(null),[H,j]=h.useState(!1),{appear:D,triggers:G,slider:v,thumbnail:F,controls:A,area:M,caption:$,layout:N}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ce,backdropDisappearClass:re,disappearClass:ge}=Ss(D.type,D.direction),W=(u==null?void 0:u.itemId)??null;h.useEffect(()=>{const f=()=>{setTimeout(()=>{var Y,ee;(ee=(Y=b.current)==null?void 0:Y.splide)==null||ee.refresh()},16)},O=()=>{T(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",O),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",O)}},[]),h.useEffect(()=>{if(!e||!F.isActive){j(!1);return}const f=P.current;if(!f)return;const O=()=>{v.direction==="horiz"?j(f.scrollWidth>f.clientWidth):j(f.scrollHeight>f.clientHeight)};O();const Y=new ResizeObserver(O);return Y.observe(f),()=>Y.disconnect()},[e,F.isActive,n.length,x,v.direction]);const V=h.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,O=Co(M.color);f&&!i&&O>.9&&(document.body.style.backgroundColor=""),g(!0),k.current=!0;const Y=ee=>{ee.target===I.current&&ee.animationName&&(I.current&&w.current&&I.current.removeEventListener("animationend",w.current),w.current=null,k.current&&(k.current=!1,t()),g(!1))};I.current&&(w.current=Y,I.current.addEventListener("animationend",Y))},[t,M.color,i]),Q=(f,O,Y)=>{var ee,ue;if(f){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&l===n.length-1?V():(ee=b.current)==null||ee.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const le=f.getBoundingClientRect(),ae=O-le.left,fe=Y-le.top,B=le.width,Z=le.height;let X;v.direction==="horiz"?X=ae<B/2?"-1":"+1":X=fe<Z/2?"-1":"+1",(ue=b.current)==null||ue.go(X)}}},te=f=>{if(z.current){z.current=!1;return}const O=n[l],Y=(O==null?void 0:O.image.objectFit)==="cover";let ee,ue;if("changedTouches"in f&&f.changedTouches.length>0)ee=f.changedTouches[0].clientX,ue=f.changedTouches[0].clientY;else if("clientX"in f)ee=f.clientX,ue=f.clientY;else return;let le;if(Y&&K.current){const ae=wo(K.current);le=ee>=ae.left&&ee<=ae.right&&ue>=ae.top&&ue<=ae.bottom}else{const ae=K.current?So(K.current):null;if(!ae){f.target===f.currentTarget&&V();return}le=ee>=ae.x&&ee<=ae.x+ae.width&&ue>=ae.y&&ue<=ae.y+ae.height}le?Q(K.current,ee,ue):V()},se=f=>{const O=f.target;(O.classList.contains(U.thumbsWrapper)||O.classList.contains(U.thumbsContainer))&&te(f)};h.useEffect(()=>{if(!e)return;const f=O=>{var Y,ee;if(O.key==="Escape"){V();return}if(O.key==="ArrowRight"){m(ue=>(ue+1)%Math.max(n.length,1)),(Y=b.current)==null||Y.go("+1");return}O.key==="ArrowLeft"&&(m(ue=>(ue-1+Math.max(n.length,1))%Math.max(n.length,1)),(ee=b.current)==null||ee.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,V,n.length]),h.useEffect(()=>{if(e){if(m(0),T(O=>O+1),k.current=!1,g(!1),d(!1),y({}),!W)return;const f=new CustomEvent("page-overlay",{detail:{itemId:W}});window.dispatchEvent(f)}return()=>{I.current&&w.current&&(I.current.removeEventListener("animationend",w.current),w.current=null),d(!1)}},[e,W]),h.useEffect(()=>{E.current!==null&&E.current!==v.type&&T(f=>f+1),E.current=v.type},[v.type]),h.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,O=window.matchMedia("(max-width: 768px)").matches,Y=Co(M.color);document.body.style.overflow="hidden",d(!1);const ee=le=>{le.target===I.current&&!k.current&&le.animationName&&(O&&!i&&Y>.9&&(document.body.style.backgroundColor=M.color),d(!0),I.current&&C.current&&I.current.removeEventListener("animationend",C.current),C.current=null)};I.current&&(C.current=ee,I.current.addEventListener("animationend",ee));const ue=le=>{const ae=le.target;ae&&(ae.closest(`.${U.thumbsWrapper}`)||ae.closest(`.${U.thumbsContainer}`))||v.type!=="slide"&&le.preventDefault()};return document.addEventListener("touchmove",ue,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",ue),I.current&&C.current&&(I.current.removeEventListener("animationend",C.current),C.current=null),d(!1)}},[e,i,M.color,v.type]),h.useEffect(()=>{if(!e)return;const f=O=>{var ee,ue;if(k.current){O.stopPropagation();return}if(z.current){z.current=!1;return}const Y=O.target;if(!(Y&&(Y.closest(`.${U.thumbsContainer}`)||Y.closest(`.${U.thumbItem}`)||Y.closest(`.${U.arrow}`)||Y.closest(`.${U.closeButton}`)||Y.closest(`.${U.caption}`)))){if(v.type==="slide"&&G.type==="drag"&&((ue=(ee=b.current)==null?void 0:ee.splide)!=null&&ue.root)){const le=b.current.splide.root;if(Y&&(le.contains(Y)||le===Y))return}if(O.touches.length===0&&O.changedTouches.length>0){const le=n[l],ae=(le==null?void 0:le.image.objectFit)==="cover",fe=O.changedTouches[0];let B;if(ae&&K.current){const Z=wo(K.current);B=fe.clientX>=Z.left&&fe.clientX<=Z.right&&fe.clientY>=Z.top&&fe.clientY<=Z.bottom}else{const Z=K.current?So(K.current):null;if(!Z)return;B=fe.clientX>=Z.x&&fe.clientX<=Z.x+Z.width&&fe.clientY>=Z.y&&fe.clientY<=Z.y+Z.height}if(!B){O.stopPropagation(),k.current=!0;const Z=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),V()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,V,l,n]);const q=(v.type==="scale"||v.type==="fade")&&v.direction==="vert"&&G.type==="drag";h.useEffect(()=>{var X,pe;if(!e||!q||!((pe=(X=b.current)==null?void 0:X.splide)!=null&&pe.root))return;const f=b.current.splide.root,O=30,Y=(ne,me)=>{if(R.current){const we=Math.abs(ne-R.current.x),Ce=Math.abs(me-R.current.y);(we>0||Ce>0)&&(z.current=!0)}},ee=ne=>{R.current&&(ne.preventDefault(),Y(ne.clientX,ne.clientY))},ue=ne=>{R.current&&ne.touches.length>0&&(ne.preventDefault(),Y(ne.touches[0].clientX,ne.touches[0].clientY))},le=(ne,me)=>{if(!R.current||!b.current){R.current=null;return}const we=Math.abs(ne-R.current.x),Ce=Math.abs(me-R.current.y);Ce>O&&Ce>we&&b.current.go(me<R.current.y?"+1":"-1"),R.current=null},ae=ne=>{R.current&&le(ne.clientX,ne.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",ee)},fe=ne=>{if(R.current){if(ne.changedTouches.length>0){const me=ne.changedTouches[0];le(me.clientX,me.clientY)}document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),document.removeEventListener("touchmove",ue)}},B=ne=>{R.current={x:ne.clientX,y:ne.clientY},z.current=!1,document.addEventListener("pointermove",ee,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},Z=ne=>{ne.touches.length>0&&(R.current={x:ne.touches[0].clientX,y:ne.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",ue,{passive:!1}),document.addEventListener("touchend",fe),document.addEventListener("touchcancel",fe))};return f.addEventListener("pointerdown",B),f.addEventListener("touchstart",Z),()=>{f.removeEventListener("pointerdown",B),f.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",ue),document.removeEventListener("touchend",fe),document.removeEventListener("touchcancel",fe),R.current=null,z.current=!1}},[e,q,c]);const ie={backgroundColor:M.color,backdropFilter:`blur(${M.blur}px)`,animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:br.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:I,className:he(U.background,S?re:ce,{[U.editor]:i},{[U.hidden]:!e}),style:{...ie,...p&&!i&&!S?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?I:null,className:he(U.contentStyle,S?ge:J,{[U.editor]:i},{[U.hidden]:!e}),style:{animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(pr,{onMove:f=>m(f.index),ref:b,className:U.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:G.type==="drag"&&!q,perPage:1,width:"100%",height:"100%",type:v.type==="fade"||v.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":v.duration},children:n.map((f,O)=>{const Y=Ut(N.position,N.offset,i),ee=`${_.scalingValue(N.padding.top,i)} ${_.scalingValue(N.padding.right,i)} ${_.scalingValue(N.padding.bottom,i)} ${_.scalingValue(N.padding.left,i)}`,ue=v.type==="scale"?(()=>{const{transform:le,...ae}=Y;return{...ae,position:"absolute",padding:ee,boxSizing:"border-box","--position-transform":le||"none"}})():{...Y,position:"absolute",padding:ee,boxSizing:"border-box"};return a.jsx(dr,{children:a.jsx("div",{className:U.imgWrapper,onClick:te,children:a.jsx("img",{ref:O===l?K:null,className:he(U.imageStyle,{[U.contain]:f.image.objectFit==="contain",[U.cover]:f.image.objectFit==="cover",[U.scaleSlide]:v.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...ue,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},O)})},c),A.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(U.arrow,{[U.arrowVertical]:v.direction==="vert"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${_.scalingValue(A.offset.x,i)}, ${_.scalingValue(A.offset.y*(v.direction==="horiz"?1:-1),i)}) scale(${A.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=b.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[A.arrowsImgUrl&&a.jsx(Xe,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:he(U.arrowImg,U.mirror)}),!A.arrowsImgUrl&&a.jsx($o,{color:A.color,className:he(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:he(U.arrow,U.nextArrow,{[U.arrowVertical]:v.direction==="vert"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${_.scalingValue(A.offset.x*(v.direction==="horiz"?-1:1),i)}, ${_.scalingValue(A.offset.y,i)}) scale(${A.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=b.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[A.arrowsImgUrl&&a.jsx(Xe,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:U.arrowImg}),!A.arrowsImgUrl&&a.jsx($o,{color:A.color,className:he(U.arrowIcon,U.arrowImg)})]})})]}),M.closeIconUrl&&(()=>{const f=Ut(M.closeIconAlign,M.closeIconOffset,i),O=`scale(${M.closeIconScale})`,Y=f.transform?`${f.transform} ${O}`:O;return a.jsx("button",{className:U.closeButton,style:{...f,transform:Y},onClick:V,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:M.closeIconUrl,fill:M.closeIconColor??"#000000",hoverFill:M.closeIconHover??"#cccccc"})})})(),$&&$.isActive&&o.imageCaption&&((L=n[l])==null?void 0:L.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:O,letterSpacing:Y,textAlign:ee,wordSpacing:ue,fontSizeLineHeight:le,textAppearance:ae,color:fe}=o.imageCaption;return a.jsx("div",{className:U.caption,style:{...Ut($.alignment,$.offset,i),fontFamily:yn(O.fontFamily),fontWeight:O.fontWeight,fontStyle:O.fontStyle,width:f.sizing==="auto"?"max-content":_.scalingValue(f.width,i),letterSpacing:_.scalingValue(Y,i),wordSpacing:_.scalingValue(ue,i),textAlign:ee,fontSize:_.scalingValue(le.fontSize,i),lineHeight:_.scalingValue(le.lineHeight,i),textTransform:ae.textTransform??"none",textDecoration:ae.textDecoration??"none",fontVariant:ae.fontVariant??"normal",color:fe},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":$.linkColor,"--link-hover-color":$.linkHoverColor},children:a.jsx(Rt,{content:n[l].imageCaption})})})})(),F.isActive&&(()=>{const[f,O]=F.position.split("-"),Y=v.direction==="horiz"?`${f}-left`:F.position,ee=Ut(Y,F.offset,i),ue=()=>{if(v.direction==="horiz"){if(O==="left")return"flex-start";if(O==="center")return"center";if(O==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:U.thumbsWrapper,onClick:le=>se(le),style:{position:i?"absolute":"fixed",...ee,...v.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(U.thumbsContainer,{[U.thumbsContainerVertical]:v.direction==="vert",[U.thumbsAlignStart]:F.align==="start",[U.thumbsAlignCenter]:F.align==="center",[U.thumbsAlignEnd]:F.align==="end"}),style:{gap:_.scalingValue(F.grid.gap,i),justifyContent:H?"flex-start":ue()},children:n.map((le,ae)=>{const fe=ae===l,B=x[ae],X=F.grid.size*(fe?F.activeState.scale:1),pe=()=>{if(F.fit!=="fit")return{};if(!B)return v.direction==="horiz"?{height:_.scalingValue(X,i)}:{width:_.scalingValue(X,i)};const ne=B.width/B.height;if(v.direction==="horiz"){const me=X,we=me*ne;return{width:_.scalingValue(we,i),height:_.scalingValue(me,i)}}else{const me=X,we=me/ne;return{width:_.scalingValue(me,i),height:_.scalingValue(we,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...v.direction==="horiz"&&F.fit!=="fit"?{height:_.scalingValue(X,i)}:{},...v.direction==="vert"&&F.fit!=="fit"?{width:_.scalingValue(X,i)}:{},...F.fit==="cover"?{width:_.scalingValue(X,i),height:_.scalingValue(X,i)}:{},...pe(),transition:fe?"all 0.25s ease-out":"none",opacity:fe?F.activeState.opacity/100:F.opacity/100,"--thumb-hover":F.activeState.opacity/100},onClick:ne=>{var me;ne.stopPropagation(),m(ae),(me=b.current)==null||me.go(ae)},onMouseEnter:()=>{var ne;F.triggers==="hov"&&((ne=b.current)==null||ne.go(ae))},children:a.jsx("img",{src:le.image.url,alt:le.image.name??"",onLoad:ne=>{const me=ne.currentTarget;me.naturalWidth&&me.naturalHeight&&y(we=>({...we,[ae]:{width:me.naturalWidth,height:me.naturalHeight}}))},style:{objectFit:F.fit==="cover"?"cover":"contain",...F.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...F.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${le.image.name}-${ae}`)})})})})()]})]}),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 $s={element:ws,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 Kt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ts(e){return`
6
+ */const xa="RichTextRenderer-module__link___BWeZ2",Sa={link:xa},Ca=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ca(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Pe(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?k.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}}const Rt=({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:wa(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 wa(e){return{...e.fontFamily&&{fontFamily:yn(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 $a="SvgImage-module__svg___q3xE-",Ta="SvgImage-module__img___VsTm-",bo={svg:$a,img:Ta},Ea=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},_a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=g.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return g.useEffect(()=>{if(typeof window<"u"&&window.CSS){const p=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(p)}},[]),!Ea(e)||!s?a.jsx("img",{src:e,alt:"",className:he(bo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(bo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},ka={"top-left":ne.topLeftAlignment,"top-center":ne.topCenterAlignment,"top-right":ne.topRightAlignment,"middle-left":ne.middleLeftAlignment,"middle-center":ne.middleCenterAlignment,"middle-right":ne.middleRightAlignment,"bottom-left":ne.bottomLeftAlignment,"bottom-center":ne.bottomCenterAlignment,"bottom-right":ne.bottomRightAlignment};function Ia({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=g.useState(null),{widthSettings:i,fontSettings:p,letterSpacing:c,textAlign:d,wordSpacing:u,fontSizeLineHeight:E,textAppearance:y,color:h}=n.imageCaption,[l,m]=g.useState(void 0),[S,v]=g.useState(null),[x,I]=g.useState(0),[G,j]=g.useState(0),{direction:$,transition:C,controls:w,pagination:R,imageCaption:z,triggers:P}=e,O=g.useRef(C.type),{x:H,y:q}=e.controls.offset,X=b=>{r&&r.go(b)};return g.useEffect(()=>{if(!S)return;const b=new ResizeObserver(L=>{if(!r)return;const[A]=L;m({width:Math.round(A.contentRect.width),height:Math.round(A.contentRect.height)})});return b.observe(S),()=>b.unobserve(S)},[S]),g.useEffect(()=>{!r||O.current===C.type||(j(b=>b+1),O.current=C.type)},[C.type]),a.jsx("div",{className:he(ne.wrapper,{[ne.editor]:o}),ref:v,children:a.jsxs("div",{className:ne.sliderInner,style:{width:l?l.width:"100%",height:l?l.height:"100%",backgroundColor:C.backgroundColor&&C.type==="fade in"?C.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(ne.captionBlock),children:a.jsx("div",{className:ne.captionTextWrapper,children:t.map((b,L)=>a.jsx("div",{className:he(ne.captionText,ka[z.alignment],{[ne.withPointerEvents]:L===x&&o,[ne.active]:L===x}),style:{fontFamily:yn(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:i.sizing==="auto"?"max-content":k.scalingValue(i.width,o),letterSpacing:k.scalingValue(c,o),wordSpacing:k.scalingValue(u,o),textAlign:d,fontSize:k.scalingValue(E.fontSize,o),lineHeight:k.scalingValue(E.lineHeight,o),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:h,transitionDuration:C.duration?`${Math.round(parseInt(C.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ne.captionTextInner,style:{"--link-hover-color":z.linkHoverColor,"--link-color":z.linkColor,position:"relative",top:k.scalingValue(z.offset.y,o),left:k.scalingValue(z.offset.x,o)},children:a.jsx(Rt,{content:b.imageCaption})})},L))})}),a.jsx(dr,{onMove:b=>{I(b.index)},ref:s,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,autoplay:P.autoPlay!==null,...P.autoPlay!==null&&{interval:parseInt(P.autoPlay)*1e3},direction:$==="horiz"||C.type==="fade in"?"ltr":"ttb",pagination:!1,drag:P.triggersList.drag,perPage:1,width:l?l.width:"100%",height:l?l.height:"100%",type:C.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,L)=>a.jsx(mr,{children:a.jsx("div",{className:ne.sliderItem,children:a.jsx("div",{className:ne.imgWrapper,children:a.jsx("img",{className:he(ne.sliderImage,{[ne.contain]:b.image.objectFit==="contain",[ne.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},L))},G),w.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(ne.arrow,{[ne.arrowVertical]:$==="vert",[ne.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{onClick:()=>{X("-1")},className:ne.arrowInner,style:{transform:`translate(${k.scalingValue(H,o)}, ${k.scalingValue(q*($==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(Xe,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:he(ne.arrowImg,ne.mirror)}),!w.arrowsImgUrl&&a.jsx(xo,{color:w.color,className:he(ne.arrowIcon,ne.arrowImg,ne.mirror)})]})}),a.jsx("div",{className:he(ne.arrow,ne.nextArrow,{[ne.arrowVertical]:$==="vert",[ne.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{className:ne.arrowInner,onClick:()=>X("+1"),style:{transform:`translate(${k.scalingValue(H*($==="horiz"?-1:1),o)}, ${k.scalingValue(q,o)}) scale(${e.controls.scale/100}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(Xe,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:ne.arrowImg}),!w.arrowsImgUrl&&a.jsx(xo,{color:w.color,className:he(ne.arrowIcon,ne.arrowImg)})]})})]}),P.triggersList.click&&a.jsx("div",{className:ne.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&a.jsx("div",{className:he(ne.pagination,{[ne.paginationInsideBottom]:R.position==="inside-1"&&$==="horiz",[ne.paginationInsideTop]:R.position==="inside-2"&&$==="horiz",[ne.paginationOutsideBottom]:R.position==="outside-1"&&$==="horiz",[ne.paginationOutsideTop]:R.position==="outside-2"&&$==="horiz",[ne.paginationInsideLeft]:R.position==="inside-1"&&$==="vert",[ne.paginationInsideRight]:R.position==="inside-2"&&$==="vert",[ne.paginationOutsideLeft]:R.position==="outside-1"&&$==="vert",[ne.paginationOutsideRight]:R.position==="outside-2"&&$==="vert",[ne.paginationVertical]:$==="vert"}),children:a.jsx("div",{className:ne.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${k.scalingValue(R.offset.x,o)}, ${k.scalingValue(R.offset.y,o)}) rotate(${$==="horiz"?"0deg":"90deg"})`},children:t.map((b,L)=>a.jsx("button",{onClick:()=>{r&&r.go(L)},className:he(ne.paginationItem),children:a.jsx("div",{className:he(ne.dot,{[ne.activeDot]:L===x}),style:{backgroundColor:L===x?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},L))})})]})})}function xo({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 Aa={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:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",Ma="ImageRevealSlider-module__link___N-iLG",Ra="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:La,image:Fa,link:Ma,cursor:Ra};function So(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,p=s/2,c=i/2;if(e>=o.x-p&&e<=o.x+p&&t>=o.y-c&&t<=o.y+c)return!0}return!1}function wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Wa({settings:e,content:t,isEditor:n}){const[o,r]=g.useState(null),[s,i]=g.useState([]),[p,c]=g.useState(0),d=g.useRef(0),[u,E]=g.useState({x:0,y:0}),[y,h]=g.useState(1),[l,m]=g.useState("none"),S=g.useRef({x:0,y:0}),[v,x]=g.useState(!1),{sizeType:I,imageWidth:G,randomRangeImageWidth:j}=e.imageSize,{revealPosition:$,visible:C}=e.position,{cursorType:w,target:R,defaultCursorScale:z,defaultCursor:P,hoverCursorScale:O,hoverCursor:H}=e.cursor;g.useEffect(()=>{if(!o)return;const b=(F,T)=>{const W=o.getBoundingClientRect(),J=F-W.left,le=T-W.top;if(E({x:J,y:le}),w==="system"){m("none"),h(1);return}const oe=J,me=le,N=document.elementFromPoint(W.left+oe,W.top+me);if(N&&N.closest("a")){m("none"),h(1);return}const ie=So(oe,me,s)||R==="area"?{img:H??"none",scale:O}:{img:P??"none",scale:z};m(ie.img),h(ie.scale)},L=F=>{F.stopPropagation(),S.current={x:F.clientX,y:F.clientY},b(F.clientX,F.clientY)},A=()=>{v&&b(S.current.x,S.current.y)};return o.addEventListener("mousemove",L),window.addEventListener("scroll",A,!0),()=>{o.removeEventListener("mousemove",L),window.removeEventListener("scroll",A,!0)}},[o,v,u,w,R,H,P,O,z,s]),g.useEffect(()=>{v||(m("none"),h(0))},[v]);const q=async(b,L,A,F={})=>{const{width:T,height:W,finalWidth:J}=await Pa(b.image.url,I,G,j);let le=0,oe=0;$==="same"?(le=L/2,oe=A/2):(le=F.x??Math.random()*L,oe=F.y??Math.random()*A);const me=Math.min(Math.max(le,T/2),L-T/2),N=Math.min(Math.max(oe,W/2),A-W/2);return{id:d.current++,url:b.image.url,link:b.link,name:b.image.name,x:me,y:N,width:J}};g.useEffect(()=>{if(!o||t.length===0)return;const b=o.getBoundingClientRect(),L=b.width,A=b.height,F=[];(async()=>{const W=t[0],J=await q(W,L,A);F.push(J),i(F),c(1)})()},[I,G,j,$,o]),g.useEffect(()=>{C==="last One"&&i(b=>b.length>0?[b[b.length-1]]:[])},[C]);const X=async b=>{if(!o)return;const L=o.getBoundingClientRect(),A=b.clientX-L.left,F=b.clientY-L.top;if(R==="image"&&!So(A,F,s))return;let T=0,W=0;$==="on Click"?(T=A,W=F):$==="same"?(T=L.width/2,W=L.height/2):(T=Math.random()*L.width,W=Math.random()*L.height);const J=t[p],le=await q(J,L.width,L.height,{x:T,y:W});i(oe=>C==="all"?[...oe,le]:[le]),c(oe=>oe>=t.length-1?0:oe+1)};return a.jsxs("div",{ref:r,onClick:X,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:ut.imageRevealSlider,style:{cursor:l==="none"?"default":"none"},children:[s.map(b=>a.jsx("div",{className:ut.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:l==="none"?"default":"none"},children:R==="area"&&b.link?a.jsx("a",{href:b.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:b.url,alt:b.name,className:ut.image},b.id)}):a.jsx("img",{src:b.url,alt:b.name,className:ut.image},b.id)},b.id)),v&&a.jsx("div",{className:ut.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${l}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Na={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:""}]}}}},Ha="LightBox-module__hidden___9s-9x",ja="LightBox-module__heroImage___sTxNF",Oa="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",za="LightBox-module__contentStyle___Bgnsq",Ba="LightBox-module__imageStyle___tLIlB",Da="LightBox-module__imgWrapper___LuFUp",qa="LightBox-module__contain___8-yaS",Ua="LightBox-module__cover___hNvOG",Ga="LightBox-module__caption___b6L2I",Ka="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Za="LightBox-module__arrowVertical___Zfz81",Qa="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",es="LightBox-module__arrowIcon___3VaFf",ts="LightBox-module__arrowImg___pNV88",ns="LightBox-module__mirror___pjeXc",os="LightBox-module__thumbsWrapper___GB-nU",rs="LightBox-module__thumbsContainerVertical___wttk5",is="LightBox-module__thumbsContainer___osSma",as="LightBox-module__thumbsAlignStart___MO6tY",ss="LightBox-module__thumbsAlignCenter___Q4sUx",ls="LightBox-module__thumbsAlignEnd___p4y9R",cs="LightBox-module__thumbItem___HvnF3",us="LightBox-module__closeButton___g2khP",ps="LightBox-module__fadeIn___0m5GW",ds="LightBox-module__slideInLeft___gPYwC",ms="LightBox-module__slideInRight___S-pPp",gs="LightBox-module__slideInTop___DFdAj",fs="LightBox-module__slideInBottom___m27kZ",hs="LightBox-module__fadeOut___55qBR",ys="LightBox-module__slideOutLeft___NvU7P",vs="LightBox-module__slideOutRight___SK7eC",bs="LightBox-module__slideOutTop___Vgg0z",xs="LightBox-module__slideOutBottom___nJ0Ef",Ss="LightBox-module__scaleSlide___vZriG",U={hidden:Ha,heroImage:ja,background:Oa,editor:Va,contentStyle:za,imageStyle:Ba,imgWrapper:Da,contain:qa,cover:Ua,caption:Ga,captionTextInner:Ka,lightboxSplide:Ya,arrow:Xa,arrowVertical:Za,nextArrow:Qa,arrowInner:Ja,arrowIcon:es,arrowImg:ts,mirror:ns,thumbsWrapper:os,thumbsContainerVertical:rs,thumbsContainer:is,thumbsAlignStart:as,thumbsAlignCenter:ss,thumbsAlignEnd:ls,thumbItem:cs,closeButton:us,fadeIn:ps,slideInLeft:ds,slideInRight:ms,slideInTop:gs,slideInBottom:fs,fadeOut:hs,slideOutLeft:ys,slideOutRight:vs,slideOutTop:bs,slideOutBottom:xs,scaleSlide:Ss},Ut=(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% + ${k.scalingValue(t.x,n)}), calc(-50% + ${k.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${k.scalingValue(t.x,n)}, calc(-50% + ${k.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), ${k.scalingValue(t.y,n)})`:o.transform=`translate(${k.scalingValue(t.x,n)}, ${k.scalingValue(t.y,n)})`,o};function gr(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 Co(e){const t=e.getBoundingClientRect(),n=gr(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,p=o/r,c=s/i;let d,u;c>p?(d=o,u=o/c):(u=r,d=r*c);const E=t.left+n.left,y=t.top+n.top,h=(o-d)/2+E,l=(r-u)/2+y;return{x:h,y:l,width:d,height:u}}function wo(e){const t=e.getBoundingClientRect(),n=gr(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 Cs(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 ws=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,p]=g.useState(!1),{url:c}=e.thumbnailBlock.cover;return g.useEffect(()=>{r==="close"&&p(!1),r==="open"&&p(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:c,alt:"Cover",className:U.heroImage,onClick:()=>p(!0)}),a.jsx($s,{isOpen:i,onClose:()=>p(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},$s=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:p})=>{var _;const[c,d]=g.useState(0),[u,E]=g.useState(0),[y,h]=g.useState(!1),[l,m]=g.useState(!1),[S,v]=g.useState({}),x=g.useRef(null),I=g.useRef(null),G=g.useRef(null),j=g.useRef(!1),$=g.useRef(null),C=g.useRef(null),w=g.useRef(null),R=g.useRef(null),z=g.useRef(!1),P=g.useRef(null),[O,H]=g.useState(!1),{appear:q,triggers:X,slider:b,thumbnail:L,controls:A,area:F,caption:T,layout:W}=r.lightboxBlock,{appearClass:J,backdropAppearClass:le,backdropDisappearClass:oe,disappearClass:me}=Cs(q.type,q.direction),N=(p==null?void 0:p.itemId)??null;g.useEffect(()=>{const f=()=>{setTimeout(()=>{var B,K;(K=(B=x.current)==null?void 0:B.splide)==null||K.refresh()},16)},V=()=>{E(B=>B+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",V),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",V)}},[]),g.useEffect(()=>{if(!e||!L.isActive){H(!1);return}const f=P.current;if(!f)return;const V=()=>{b.direction==="horiz"?H(f.scrollWidth>f.clientWidth):H(f.scrollHeight>f.clientHeight)};V();const B=new ResizeObserver(V);return B.observe(f),()=>B.disconnect()},[e,L.isActive,n.length,S,b.direction]);const ie=g.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,V=$o(F.color);f&&!i&&V>.9&&(document.body.style.backgroundColor=""),h(!0),j.current=!0;const B=K=>{K.target===$.current&&K.animationName&&($.current&&C.current&&$.current.removeEventListener("animationend",C.current),C.current=null,j.current&&(j.current=!1,t()),h(!1))};$.current&&(C.current=B,$.current.addEventListener("animationend",B))},[t,F.color,i]),fe=(f,V,B)=>{var K,re;if(f){if(X.type==="click"&&X.switch==="image")X.repeat==="close"&&c===n.length-1?ie():(K=x.current)==null||K.go("+1");else if(X.type==="click"&&X.switch==="50/50"){const se=f.getBoundingClientRect(),ae=V-se.left,pe=B-se.top,D=se.width,Q=se.height;let Z;b.direction==="horiz"?Z=ae<D/2?"-1":"+1":Z=pe<Q/2?"-1":"+1",(re=x.current)==null||re.go(Z)}}},ge=f=>{if(z.current){z.current=!1;return}const V=n[c],B=(V==null?void 0:V.image.objectFit)==="cover";let K,re;if("changedTouches"in f&&f.changedTouches.length>0)K=f.changedTouches[0].clientX,re=f.changedTouches[0].clientY;else if("clientX"in f)K=f.clientX,re=f.clientY;else return;let se;if(B&&G.current){const ae=wo(G.current);se=K>=ae.left&&K<=ae.right&&re>=ae.top&&re<=ae.bottom}else{const ae=G.current?Co(G.current):null;if(!ae){f.target===f.currentTarget&&ie();return}se=K>=ae.x&&K<=ae.x+ae.width&&re>=ae.y&&re<=ae.y+ae.height}se?fe(G.current,K,re):ie()},Y=f=>{const V=f.target;(V.classList.contains(U.thumbsWrapper)||V.classList.contains(U.thumbsContainer))&&ge(f)};g.useEffect(()=>{if(!e)return;const f=V=>{var B,K;if(V.key==="Escape"){ie();return}if(V.key==="ArrowRight"){d(re=>(re+1)%Math.max(n.length,1)),(B=x.current)==null||B.go("+1");return}V.key==="ArrowLeft"&&(d(re=>(re-1+Math.max(n.length,1))%Math.max(n.length,1)),(K=x.current)==null||K.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,ie,n.length]),g.useEffect(()=>{if(e){if(d(0),E(V=>V+1),j.current=!1,h(!1),m(!1),v({}),!N)return;const f=new CustomEvent("page-overlay",{detail:{itemId:N}});window.dispatchEvent(f)}return()=>{$.current&&C.current&&($.current.removeEventListener("animationend",C.current),C.current=null),m(!1)}},[e,N]),g.useEffect(()=>{I.current!==null&&I.current!==b.type&&E(f=>f+1),I.current=b.type},[b.type]),g.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,V=window.matchMedia("(max-width: 768px)").matches,B=$o(F.color);document.body.style.overflow="hidden",m(!1);const K=se=>{se.target===$.current&&!j.current&&se.animationName&&(V&&!i&&B>.9&&(document.body.style.backgroundColor=F.color),m(!0),$.current&&w.current&&$.current.removeEventListener("animationend",w.current),w.current=null)};$.current&&(w.current=K,$.current.addEventListener("animationend",K));const re=se=>{const ae=se.target;ae&&(ae.closest(`.${U.thumbsWrapper}`)||ae.closest(`.${U.thumbsContainer}`))||b.type!=="slide"&&se.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",re),$.current&&w.current&&($.current.removeEventListener("animationend",w.current),w.current=null),m(!1)}},[e,i,F.color,b.type]),g.useEffect(()=>{if(!e)return;const f=V=>{var K,re;if(j.current){V.stopPropagation();return}if(z.current){z.current=!1;return}const B=V.target;if(!(B&&(B.closest(`.${U.thumbsContainer}`)||B.closest(`.${U.thumbItem}`)||B.closest(`.${U.arrow}`)||B.closest(`.${U.closeButton}`)||B.closest(`.${U.caption}`)))){if(b.type==="slide"&&X.type==="drag"&&((re=(K=x.current)==null?void 0:K.splide)!=null&&re.root)){const se=x.current.splide.root;if(B&&(se.contains(B)||se===B))return}if(V.touches.length===0&&V.changedTouches.length>0){const se=n[c],ae=(se==null?void 0:se.image.objectFit)==="cover",pe=V.changedTouches[0];let D;if(ae&&G.current){const Q=wo(G.current);D=pe.clientX>=Q.left&&pe.clientX<=Q.right&&pe.clientY>=Q.top&&pe.clientY<=Q.bottom}else{const Q=G.current?Co(G.current):null;if(!Q)return;D=pe.clientX>=Q.x&&pe.clientX<=Q.x+Q.width&&pe.clientY>=Q.y&&pe.clientY<=Q.y+Q.height}if(!D){V.stopPropagation(),j.current=!0;const Q=Z=>{Z.stopPropagation(),Z.preventDefault(),document.removeEventListener("click",Q,!0)};document.addEventListener("click",Q,!0),ie()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,ie,c,n]);const M=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&X.type==="drag";g.useEffect(()=>{var Z,ce;if(!e||!M||!((ce=(Z=x.current)==null?void 0:Z.splide)!=null&&ce.root))return;const f=x.current.splide.root,V=30,B=(te,de)=>{if(R.current){const Ce=Math.abs(te-R.current.x),we=Math.abs(de-R.current.y);(Ce>0||we>0)&&(z.current=!0)}},K=te=>{R.current&&(te.preventDefault(),B(te.clientX,te.clientY))},re=te=>{R.current&&te.touches.length>0&&(te.preventDefault(),B(te.touches[0].clientX,te.touches[0].clientY))},se=(te,de)=>{if(!R.current||!x.current){R.current=null;return}const Ce=Math.abs(te-R.current.x),we=Math.abs(de-R.current.y);we>V&&we>Ce&&x.current.go(de<R.current.y?"+1":"-1"),R.current=null},ae=te=>{R.current&&se(te.clientX,te.clientY),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("pointermove",K)},pe=te=>{if(R.current){if(te.changedTouches.length>0){const de=te.changedTouches[0];se(de.clientX,de.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",re)}},D=te=>{R.current={x:te.clientX,y:te.clientY},z.current=!1,document.addEventListener("pointermove",K,{passive:!1}),document.addEventListener("pointerup",ae),document.addEventListener("pointercancel",ae)},Q=te=>{te.touches.length>0&&(R.current={x:te.touches[0].clientX,y:te.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return f.addEventListener("pointerdown",D),f.addEventListener("touchstart",Q),()=>{f.removeEventListener("pointerdown",D),f.removeEventListener("touchstart",Q),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",ae),document.removeEventListener("pointercancel",ae),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),R.current=null,z.current=!1}},[e,M,u]);const ee={backgroundColor:F.color,backdropFilter:`blur(${F.blur}px)`,animationDuration:`${parseInt(q.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:$,className:he(U.background,y?oe:le,{[U.editor]:i},{[U.hidden]:!e}),style:{...ee,...l&&!i&&!y?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?$:null,className:he(U.contentStyle,y?me:J,{[U.editor]:i},{[U.hidden]:!e}),style:{animationDuration:`${parseInt(q.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(dr,{onMove:f=>d(f.index),ref:x,className:U.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:X.type==="drag"&&!M,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:X.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map((f,V)=>{const B=Ut(W.position,W.offset,i),K=`${k.scalingValue(W.padding.top,i)} ${k.scalingValue(W.padding.right,i)} ${k.scalingValue(W.padding.bottom,i)} ${k.scalingValue(W.padding.left,i)}`,re=b.type==="scale"?(()=>{const{transform:se,...ae}=B;return{...ae,position:"absolute",padding:K,boxSizing:"border-box","--position-transform":se||"none"}})():{...B,position:"absolute",padding:K,boxSizing:"border-box"};return a.jsx(mr,{children:a.jsx("div",{className:U.imgWrapper,onClick:ge,children:a.jsx("img",{ref:V===c?G:null,className:he(U.imageStyle,{[U.contain]:f.image.objectFit==="contain",[U.cover]:f.image.objectFit==="cover",[U.scaleSlide]:b.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...re,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},V)})},u),A.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(U.arrow,{[U.arrowVertical]:b.direction==="vert"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${k.scalingValue(A.offset.x,i)}, ${k.scalingValue(A.offset.y*(b.direction==="horiz"?1:-1),i)}) scale(${A.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[A.arrowsImgUrl&&a.jsx(Xe,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:he(U.arrowImg,U.mirror)}),!A.arrowsImgUrl&&a.jsx(To,{color:A.color,className:he(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:he(U.arrow,U.nextArrow,{[U.arrowVertical]:b.direction==="vert"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${k.scalingValue(A.offset.x*(b.direction==="horiz"?-1:1),i)}, ${k.scalingValue(A.offset.y,i)}) scale(${A.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=x.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[A.arrowsImgUrl&&a.jsx(Xe,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:U.arrowImg}),!A.arrowsImgUrl&&a.jsx(To,{color:A.color,className:he(U.arrowIcon,U.arrowImg)})]})})]}),F.closeIconUrl&&(()=>{const f=Ut(F.closeIconAlign,F.closeIconOffset,i),V=`scale(${F.closeIconScale})`,B=f.transform?`${f.transform} ${V}`:V;return a.jsx("button",{className:U.closeButton,style:{...f,transform:B},onClick:ie,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:F.closeIconUrl,fill:F.closeIconColor??"#000000",hoverFill:F.closeIconHover??"#cccccc"})})})(),T&&T.isActive&&o.imageCaption&&((_=n[c])==null?void 0:_.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:V,letterSpacing:B,textAlign:K,wordSpacing:re,fontSizeLineHeight:se,textAppearance:ae,color:pe}=o.imageCaption;return a.jsx("div",{className:U.caption,style:{...Ut(T.alignment,T.offset,i),fontFamily:yn(V.fontFamily),fontWeight:V.fontWeight,fontStyle:V.fontStyle,width:f.sizing==="auto"?"max-content":k.scalingValue(f.width,i),letterSpacing:k.scalingValue(B,i),wordSpacing:k.scalingValue(re,i),textAlign:K,fontSize:k.scalingValue(se.fontSize,i),lineHeight:k.scalingValue(se.lineHeight,i),textTransform:ae.textTransform??"none",textDecoration:ae.textDecoration??"none",fontVariant:ae.fontVariant??"normal",color:pe},onClick:D=>D.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":T.linkColor,"--link-hover-color":T.linkHoverColor},children:a.jsx(Rt,{content:n[c].imageCaption})})})})(),L.isActive&&(()=>{const[f,V]=L.position.split("-"),B=b.direction==="horiz"?`${f}-left`:L.position,K=Ut(B,L.offset,i),re=()=>{if(b.direction==="horiz"){if(V==="left")return"flex-start";if(V==="center")return"center";if(V==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:P,className:U.thumbsWrapper,onClick:se=>Y(se),style:{position:i?"absolute":"fixed",...K,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(U.thumbsContainer,{[U.thumbsContainerVertical]:b.direction==="vert",[U.thumbsAlignStart]:L.align==="start",[U.thumbsAlignCenter]:L.align==="center",[U.thumbsAlignEnd]:L.align==="end"}),style:{gap:k.scalingValue(L.grid.gap,i),justifyContent:O?"flex-start":re()},children:n.map((se,ae)=>{const pe=ae===c,D=S[ae],Z=L.grid.size*(pe?L.activeState.scale:1),ce=()=>{if(L.fit!=="fit")return{};if(!D)return b.direction==="horiz"?{height:k.scalingValue(Z,i)}:{width:k.scalingValue(Z,i)};const te=D.width/D.height;if(b.direction==="horiz"){const de=Z,Ce=de*te;return{width:k.scalingValue(Ce,i),height:k.scalingValue(de,i)}}else{const de=Z,Ce=de/te;return{width:k.scalingValue(de,i),height:k.scalingValue(Ce,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...b.direction==="horiz"&&L.fit!=="fit"?{height:k.scalingValue(Z,i)}:{},...b.direction==="vert"&&L.fit!=="fit"?{width:k.scalingValue(Z,i)}:{},...L.fit==="cover"?{width:k.scalingValue(Z,i),height:k.scalingValue(Z,i)}:{},...ce(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?L.activeState.opacity/100:L.opacity/100,"--thumb-hover":L.activeState.opacity/100},onClick:te=>{var de;te.stopPropagation(),d(ae),(de=x.current)==null||de.go(ae)},onMouseEnter:()=>{var te;L.triggers==="hov"&&((te=x.current)==null||te.go(ae))},children:a.jsx("img",{src:se.image.url,alt:se.image.name??"",onLoad:te=>{const de=te.currentTarget;de.naturalWidth&&de.naturalHeight&&v(Ce=>({...Ce,[ae]:{width:de.naturalWidth,height:de.naturalHeight}}))},style:{objectFit:L.fit==="cover"?"cover":"contain",...L.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...L.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${se.image.name}-${ae}`)})})})})()]})]}),document.getElementById(s))};function To({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 Ts={element:ws,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 Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Es(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Kt(48)};
11
+ min-height: ${Gt(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${Kt(4)};
35
+ gap: ${Gt(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${Kt(8)};
131
+ margin-top: ${Gt(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${Kt(8)};
135
+ margin-top: ${Gt(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function _s({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=_.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:u=[],buttonLabel:l,gap:m,fieldsGap:c,buttonCorners:T,buttonStroke:S,buttonPadding:g,isButtonFullWidth:p,inputCorners:d,inputStroke:x,inputPadding:y,inputColor:b,inputTextColor:E,inputBorderColor:K,placeholderColor:k,buttonColor:I,buttonTextColor:w,buttonBorderColor:C,labelTextColor:R,successColor:z,errorColor:P,fontFamily:H,inputFontSettings:j,inputFontSize:D,inputLineHeight:G,inputLetterSpacing:v,inputWordSpacing:F,inputTextAppearance:A,buttonFontSettings:M,buttonFontSize:$,buttonLineHeight:N,buttonLetterSpacing:J,buttonWordSpacing:ce,buttonTextAppearance:re,labelFontSettings:ge,labelFontSize:W,labelLineHeight:V,labelLetterSpacing:Q,labelWordSpacing:te,labelTextAppearance:se,statusFontSettings:q,statusFontSize:ie,statusLineHeight:L,statusLetterSpacing:f,statusWordSpacing:O,statusTextAppearance:Y,successMessage:ee,errorMessage:ue,stateOverrides:le}=e,ae=s==="B",fe=u.slice(0,Math.min(i,u.length)),B={fontSettings:{fontFamily:H,fontWeight:(j==null?void 0:j.fontWeight)??400,fontStyle:(j==null?void 0:j.fontStyle)??"normal"},fontSize:D??.01,lineHeight:G,letterSpacing:v??0,wordSpacing:F??0,textAppearance:A,color:E},Z=ht(Pe(B,t)),X=_.scalingValue(x??0,t),pe=_.scalingValue((G??D??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(s==="C"?x??0:(x??0)*2),t),ne={...Z,borderStyle:"solid",borderRadius:s==="C"?0:_.scalingValue(d??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:X,borderLeftWidth:0}:{borderWidth:X},paddingTop:_.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:_.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:_.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:_.scalingValue((y==null?void 0:y.left)??0,t),height:pe,minHeight:pe},me={fontSettings:{fontFamily:H,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:$??.01,lineHeight:N,letterSpacing:J??0,wordSpacing:ce??0,textAppearance:re,color:w},we=ht(Pe(me,t)),Ce=_.scalingValue(S??0,t),lt={fontSettings:{fontFamily:H,fontWeight:(ge==null?void 0:ge.fontWeight)??400,fontStyle:(ge==null?void 0:ge.fontStyle)??"normal"},fontSize:W??.01,lineHeight:V,letterSpacing:Q??0,wordSpacing:te??0,textAppearance:se,color:R},Ge=Pe(lt,t),xe={fontSettings:{fontFamily:H,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:L,letterSpacing:f??0,wordSpacing:O??0,textAppearance:Y,color:z},Re=ht(Pe(xe,t)),nt=_.buildColorVars(r,{inputColor:b,inputTextColor:E,inputBorderColor:K,placeholderColor:k!=null&&k.trim()?k:"#cccccc",buttonColor:I,buttonTextColor:w,buttonBorderColor:C,labelTextColor:R,successColor:z,errorColor:P},Es,ks,le),[$e,je]=h.useState(()=>Object.fromEntries(fe.map(ye=>[ye.name,""]))),[eo,Ct]=h.useState("idle"),[gr,Bt]=h.useState(null),vn=o==="success"?"success":o==="error"?"error":eo,fr=o==="error"?ue:gr,Dt=o==="filled",$t=h.useMemo(()=>{if(!Dt)return $e;let ye=null;for(const Ve of fe)($e[Ve.name]??"").trim().length>0||(ye=ye??{...$e},ye[Ve.name]="Filled");return ye??$e},[$e,Dt,fe]),hr=vn==="error"?_.getFormFieldValidationError(fe,$t):null,yr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),to=n==null?void 0:n.submitUrl,no=(ye,Ve)=>{je(Oe=>({...Oe,[ye]:Ve}))},vr=async ye=>{ye.preventDefault();const Ve=Object.fromEntries(fe.map(Ae=>{var ct;return[Ae.name,((ct=$e[Ae.name])==null?void 0:ct.trim())??""]}).filter(([,Ae])=>Ae));if(!to){Ct("error"),Bt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const Oe=_.getFormFieldValidationError(fe,$e);if(Oe){Ct("error"),Bt(Oe);return}Ct("submitting"),Bt(null);try{const Ae=await fetch(to,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Ae.ok){const ct=await Ae.text();throw new Error(ct||`Request failed: ${Ae.status}`)}Ct("success"),je(Object.fromEntries(fe.map(ct=>[ct.name,""])))}catch(Ae){Ct("error"),Bt(Ae instanceof Error?Ae.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${yr}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ts(r)}}),a.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:_.scalingValue(m??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:_.scalingValue(c??0,t)},children:fe.map((ye,Ve)=>a.jsxs("div",{className:`${r}-field-group${ae?` ${r}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${r}-field-label`,style:Ge?{...Ge,lineHeight:Ge.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Oe=>no(ye.name,Oe.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:ne,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Oe=>no(ye.name,Oe.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:ne,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Ve))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(T??0,t),borderWidth:Ce,paddingTop:_.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:_.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:_.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:_.scalingValue((g==null?void 0:g.left)??0,t),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:eo==="submitting"?"...":l})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Re},children:ee}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Re},role:"alert",children:hr??fr??ue})]})}const Es={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"},ks=["hover","focus","filled","success","error"],Is=`import React, { useMemo, useState } from 'react';
142
+ `}function _s({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=k.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:p=[],buttonLabel:c,gap:d,fieldsGap:u,buttonCorners:E,buttonStroke:y,buttonPadding:h,isButtonFullWidth:l,inputCorners:m,inputStroke:S,inputPadding:v,inputColor:x,inputTextColor:I,inputBorderColor:G,placeholderColor:j,buttonColor:$,buttonTextColor:C,buttonBorderColor:w,labelTextColor:R,successColor:z,errorColor:P,fontFamily:O,inputFontSettings:H,inputFontSize:q,inputLineHeight:X,inputLetterSpacing:b,inputWordSpacing:L,inputTextAppearance:A,buttonFontSettings:F,buttonFontSize:T,buttonLineHeight:W,buttonLetterSpacing:J,buttonWordSpacing:le,buttonTextAppearance:oe,labelFontSettings:me,labelFontSize:N,labelLineHeight:ie,labelLetterSpacing:fe,labelWordSpacing:ge,labelTextAppearance:Y,statusFontSettings:M,statusFontSize:ee,statusLineHeight:_,statusLetterSpacing:f,statusWordSpacing:V,statusTextAppearance:B,successMessage:K,errorMessage:re,stateOverrides:se}=e,ae=s==="B",pe=p.slice(0,Math.min(i,p.length)),D={fontSettings:{fontFamily:O,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:q??.01,lineHeight:X,letterSpacing:b??0,wordSpacing:L??0,textAppearance:A,color:I},Q=ht(Pe(D,t)),Z=k.scalingValue(S??0,t),ce=k.scalingValue((X??q??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?S??0:(S??0)*2),t),te={...Q,borderStyle:"solid",borderRadius:s==="C"?0:k.scalingValue(m??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Z,borderLeftWidth:0}:{borderWidth:Z},paddingTop:k.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:k.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:k.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:k.scalingValue((v==null?void 0:v.left)??0,t),height:ce,minHeight:ce},de={fontSettings:{fontFamily:O,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:T??.01,lineHeight:W,letterSpacing:J??0,wordSpacing:le??0,textAppearance:oe,color:C},Ce=ht(Pe(de,t)),we=k.scalingValue(y??0,t),lt={fontSettings:{fontFamily:O,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:N??.01,lineHeight:ie,letterSpacing:fe??0,wordSpacing:ge??0,textAppearance:Y,color:R},Ke=Pe(lt,t),xe={fontSettings:{fontFamily:O,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:ee??.01,lineHeight:_,letterSpacing:f??0,wordSpacing:V??0,textAppearance:B,color:z},Re=ht(Pe(xe,t)),nt=k.buildColorVars(r,{inputColor:x,inputTextColor:I,inputBorderColor:G,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:$,buttonTextColor:C,buttonBorderColor:w,labelTextColor:R,successColor:z,errorColor:P},ks,Is,se),[$e,je]=g.useState(()=>Object.fromEntries(pe.map(ye=>[ye.name,""]))),[to,wt]=g.useState("idle"),[fr,Bt]=g.useState(null),vn=o==="success"?"success":o==="error"?"error":to,hr=o==="error"?re:fr,Dt=o==="filled",$t=g.useMemo(()=>{if(!Dt)return $e;let ye=null;for(const Oe of pe)($e[Oe.name]??"").trim().length>0||(ye=ye??{...$e},ye[Oe.name]="Filled");return ye??$e},[$e,Dt,pe]),yr=vn==="error"?k.getFormFieldValidationError(pe,$t):null,vr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),no=n==null?void 0:n.submitUrl,oo=(ye,Oe)=>{je(Ve=>({...Ve,[ye]:Oe}))},br=async ye=>{ye.preventDefault();const Oe=Object.fromEntries(pe.map(Ae=>{var ct;return[Ae.name,((ct=$e[Ae.name])==null?void 0:ct.trim())??""]}).filter(([,Ae])=>Ae));if(!no){wt("error"),Bt("No integrations were found for this form.");return}if(Object.keys(Oe).length===0)return;const Ve=k.getFormFieldValidationError(pe,$e);if(Ve){wt("error"),Bt(Ve);return}wt("submitting"),Bt(null);try{const Ae=await fetch(no,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Oe)});if(!Ae.ok){const ct=await Ae.text();throw new Error(ct||`Request failed: ${Ae.status}`)}wt("success"),je(Object.fromEntries(pe.map(ct=>[ct.name,""])))}catch(Ae){wt("error"),Bt(Ae instanceof Error?Ae.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${vr}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Es(r)}}),a.jsxs("form",{onSubmit:br,className:`${r}-form`,style:{gap:k.scalingValue(d??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:k.scalingValue(u??0,t)},children:pe.map((ye,Oe)=>a.jsxs("div",{className:`${r}-field-group${ae?` ${r}-labeled`:""}`,children:[ae&&a.jsx("span",{className:`${r}-field-label`,style:Ke?{...Ke,lineHeight:Ke.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Ve=>oo(ye.name,Ve.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:te,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Ve=>oo(ye.name,Ve.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:te,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Oe))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:k.scalingValue(E??0,t),borderWidth:we,paddingTop:k.scalingValue((h==null?void 0:h.top)??0,t),paddingRight:k.scalingValue((h==null?void 0:h.right)??0,t),paddingBottom:k.scalingValue((h==null?void 0:h.bottom)??0,t),paddingLeft:k.scalingValue((h==null?void 0:h.left)??0,t),...Ce,...l?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:l?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:to==="submitting"?"...":c})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Re},children:K}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Re},role:"alert",children:yr??hr??re})]})}const ks={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"},Is=["hover","focus","filled","success","error"],As=`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,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
740
740
  };
741
741
 
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
743
- `,As=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Gt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ls=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fs={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:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Gt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Gt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Gt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Gt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:As,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{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:[...Ls],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"]},Ms={element:_s,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:Fs,sourceCode:Is};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rs(e){return`
743
+ `,Ls=[{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"}}}},Fs=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ms={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:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...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:Ls,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{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:[...Fs],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"]},Rs={element:_s,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:Ms,sourceCode:As};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ps(e){return`
744
744
  .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -931,7 +931,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
931
931
  font-size: ${Yt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Ps=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=_.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:l=1,fontFamily:m,inputFontSettings:c,inputFontSize:T,inputLineHeight:S,inputLetterSpacing:g,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:x,buttonFontSize:y,buttonLineHeight:b,buttonLetterSpacing:E,buttonWordSpacing:K,buttonTextAppearance:k,statusFontSettings:I,statusFontSize:w,statusLineHeight:C,statusLetterSpacing:R,statusWordSpacing:z,statusTextAppearance:P,iconMaxWidth:H,minHeight:j,corners:D,stroke:G,stateOverrides:v,inputPadding:F,buttonPadding:A,successMessage:M="Thanks for subscribing!",errorMessage:$="Please, fill all required fields."}=e,N=s.slice(0,Math.min(l,s.length)),[J,ce]=h.useState(()=>Object.fromEntries(N.map(xe=>[xe.name,""]))),[re,ge]=h.useState("idle"),[W,V]=h.useState(null),Q=o==="success"?"success":o==="error"?"error":re,te=o==="error"?$:W,se=o==="filled",q=h.useMemo(()=>{if(!se)return J;let xe=null;for(const Re of N)(J[Re.name]??"").trim().length>0||(xe=xe??{...J},xe[Re.name]="Filled");return xe??J},[se,J,N]),ie=Q==="error"?_.getFormFieldValidationError(N,q):null,L=o&&o!=="default"?`${r}-state-${o}`:"",f=N.some(xe=>(q[xe.name]??"").trim().length>0),O=L!==`${r}-state-filled`&&f?`${r}-state-filled`:"",Y=`${L} ${O}`.trim(),ee=n==null?void 0:n.submitUrl,ue=u??"",le=(i==null?void 0:i.icon)??"",ae=(i==null?void 0:i.mode)==="On",fe=ue||"Submit",B={fontSettings:{fontFamily:m,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:T??.01,lineHeight:S,letterSpacing:g??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},Z={fontSettings:{fontFamily:m,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:y??.01,lineHeight:b,letterSpacing:E??0,wordSpacing:K??0,textAppearance:k,color:e.buttonTextColor??"#ffffff"},X={fontSettings:{fontFamily:m,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:w??.01,lineHeight:C,letterSpacing:R??0,wordSpacing:z??0,textAppearance:P,color:e.successColor??"#22c55e"},pe=ht(Pe(B,t)),ne=ht(Pe(Z,t)),me=ht(Pe(X,t)),we=_.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(B==null?void 0:B.color)??"#111111",buttonTextColor:e.buttonTextColor??(Z==null?void 0:Z.color)??"#ffffff"},Ws,Ns,v),Ce={borderRadius:_.scalingValue(D,t),borderWidth:_.scalingValue(G,t),borderStyle:"solid"},lt={borderLeftWidth:_.scalingValue(G,t)},Ge=async xe=>{xe.preventDefault();const Re=Object.fromEntries(N.map($e=>{var je;return[$e.name,((je=J[$e.name])==null?void 0:je.trim())??""]}).filter(([,$e])=>$e));if(!ee){ge("error"),V("No integrations were found for this form.");return}if(Object.keys(Re).length===0)return;const nt=_.getFormFieldValidationError(N,J);if(nt){ge("error"),V(nt);return}ge("submitting"),V(null);try{const $e=await fetch(ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Re)});if(!$e.ok){const je=await $e.text();throw new Error(je||`Request failed: ${$e.status}`)}ge("success"),ce(Object.fromEntries(N.map(je=>[je.name,""])))}catch($e){ge("error"),V($e instanceof Error?$e.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Y}`.trim(),style:we,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rs(r)}}),a.jsxs("form",{onSubmit:Ge,className:`${r}-form`,style:{...Ce,height:_.scalingValue(j,t),minHeight:_.scalingValue(j,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.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:Re=>ce(nt=>({...nt,[xe.name]:Re.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...pe,paddingRight:_.scalingValue(F.right,t),paddingLeft:_.scalingValue(F.left,t),paddingTop:_.scalingValue(F.top,t),paddingBottom:_.scalingValue(F.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":fe,style:{...ne,...lt,paddingRight:_.scalingValue(A.right,t),paddingLeft:_.scalingValue(A.left,t),paddingTop:_.scalingValue(A.top,t),paddingBottom:_.scalingValue(A.bottom,t)},children:re==="submitting"?"...":ae?le&&a.jsx(Xe,{url:le,className:`${r}-submitBtnIcon`,style:{maxWidth:_.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ue})})]}),Q==="success"&&a.jsx("p",{className:`${r}-success`,style:{...me},children:M}),Q==="error"&&a.jsx("p",{className:`${r}-error`,style:{...me},role:"alert",children:ie??te??$})]})},Ws={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"},Ns=["hover","focus","filled","success","error"],Hs=`import React, { useMemo, useState } from 'react';
934
+ `}const Ws=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=k.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:p,fieldsToShow:c=1,fontFamily:d,inputFontSettings:u,inputFontSize:E,inputLineHeight:y,inputLetterSpacing:h,inputWordSpacing:l,inputTextAppearance:m,buttonFontSettings:S,buttonFontSize:v,buttonLineHeight:x,buttonLetterSpacing:I,buttonWordSpacing:G,buttonTextAppearance:j,statusFontSettings:$,statusFontSize:C,statusLineHeight:w,statusLetterSpacing:R,statusWordSpacing:z,statusTextAppearance:P,iconMaxWidth:O,minHeight:H,corners:q,stroke:X,stateOverrides:b,inputPadding:L,buttonPadding:A,successMessage:F="Thanks for subscribing!",errorMessage:T="Please, fill all required fields."}=e,W=s.slice(0,Math.min(c,s.length)),[J,le]=g.useState(()=>Object.fromEntries(W.map(xe=>[xe.name,""]))),[oe,me]=g.useState("idle"),[N,ie]=g.useState(null),fe=o==="success"?"success":o==="error"?"error":oe,ge=o==="error"?T:N,Y=o==="filled",M=g.useMemo(()=>{if(!Y)return J;let xe=null;for(const Re of W)(J[Re.name]??"").trim().length>0||(xe=xe??{...J},xe[Re.name]="Filled");return xe??J},[Y,J,W]),ee=fe==="error"?k.getFormFieldValidationError(W,M):null,_=o&&o!=="default"?`${r}-state-${o}`:"",f=W.some(xe=>(M[xe.name]??"").trim().length>0),V=_!==`${r}-state-filled`&&f?`${r}-state-filled`:"",B=`${_} ${V}`.trim(),K=n==null?void 0:n.submitUrl,re=p??"",se=(i==null?void 0:i.icon)??"",ae=(i==null?void 0:i.mode)==="On",pe=re||"Submit",D={fontSettings:{fontFamily:d,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:E??.01,lineHeight:y,letterSpacing:h??0,wordSpacing:l??0,textAppearance:m,color:e.inputTextColor??"#111111"},Q={fontSettings:{fontFamily:d,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:x,letterSpacing:I??0,wordSpacing:G??0,textAppearance:j,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:d,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:C??.01,lineHeight:w,letterSpacing:R??0,wordSpacing:z??0,textAppearance:P,color:e.successColor??"#22c55e"},ce=ht(Pe(D,t)),te=ht(Pe(Q,t)),de=ht(Pe(Z,t)),Ce=k.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(D==null?void 0:D.color)??"#111111",buttonTextColor:e.buttonTextColor??(Q==null?void 0:Q.color)??"#ffffff"},Ns,Hs,b),we={borderRadius:k.scalingValue(q,t),borderWidth:k.scalingValue(X,t),borderStyle:"solid"},lt={borderLeftWidth:k.scalingValue(X,t)},Ke=async xe=>{xe.preventDefault();const Re=Object.fromEntries(W.map($e=>{var je;return[$e.name,((je=J[$e.name])==null?void 0:je.trim())??""]}).filter(([,$e])=>$e));if(!K){me("error"),ie("No integrations were found for this form.");return}if(Object.keys(Re).length===0)return;const nt=k.getFormFieldValidationError(W,J);if(nt){me("error"),ie(nt);return}me("submitting"),ie(null);try{const $e=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Re)});if(!$e.ok){const je=await $e.text();throw new Error(je||`Request failed: ${$e.status}`)}me("success"),le(Object.fromEntries(W.map(je=>[je.name,""])))}catch($e){me("error"),ie($e instanceof Error?$e.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${B}`.trim(),style:Ce,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ps(r)}}),a.jsxs("form",{onSubmit:Ke,className:`${r}-form`,style:{...we,height:k.scalingValue(H,t),minHeight:k.scalingValue(H,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:W.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:M[xe.name]??"",onChange:Re=>le(nt=>({...nt,[xe.name]:Re.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...ce,paddingRight:k.scalingValue(L.right,t),paddingLeft:k.scalingValue(L.left,t),paddingTop:k.scalingValue(L.top,t),paddingBottom:k.scalingValue(L.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":pe,style:{...te,...lt,paddingRight:k.scalingValue(A.right,t),paddingLeft:k.scalingValue(A.left,t),paddingTop:k.scalingValue(A.top,t),paddingBottom:k.scalingValue(A.bottom,t)},children:oe==="submitting"?"...":ae?se&&a.jsx(Xe,{url:se,className:`${r}-submitBtnIcon`,style:{maxWidth:k.scalingValue(O??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):re})})]}),fe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...de},children:F}),fe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...de},role:"alert",children:ee??ge??T})]})},Ns={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"},Hs=["hover","focus","filled","success","error"],js=`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
- `,js="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>'),Vs=[{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"}}}},Os=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],zs={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 All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$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:Vs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:js},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","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:[...Os],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"]},Bs={element:Ps,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:zs,sourceCode:Hs};function To(e){return`
1506
+ `,Os="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>'),Vs=[{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"}}}},zs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Bs={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 All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$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:Vs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Os},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","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:[...zs],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"]},Ds={element:Ws,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:Bs,sourceCode:js};function Eo(e){return`
1507
1507
  .${e}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
@@ -1589,6 +1589,18 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1589
1589
  z-index: 2;
1590
1590
  width: 100%;
1591
1591
  }
1592
+
1593
+ .${e}-marquee-link {
1594
+ display: flex;
1595
+ flex-direction: column;
1596
+ justify-content: center;
1597
+ align-items: center;
1598
+ width: 100%;
1599
+ height: 100%;
1600
+ text-decoration: none;
1601
+ color: inherit;
1602
+ }
1603
+
1592
1604
  .${e}-control::before {
1593
1605
  content: "";
1594
1606
  position: absolute;
@@ -1603,25 +1615,22 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1603
1615
  .${e}-image-hover-brightness img {
1604
1616
  transition: filter 0.3s ease;
1605
1617
  }
1606
- .${e}-image-hover-brightness:hover img,
1607
- .${e}-image-hover-brightness-active img {
1618
+ .${e}-image-hover-brightness:hover img {
1608
1619
  filter: brightness(1.25);
1609
1620
  }
1610
1621
  .${e}-image-hover-grayscale img {
1611
1622
  transition: filter 0.3s ease;
1612
1623
  }
1613
- .${e}-image-hover-grayscale:hover img,
1614
- .${e}-image-hover-grayscale-active img {
1624
+ .${e}-image-hover-grayscale:hover img {
1615
1625
  filter: grayscale(100%);
1616
1626
  }
1617
1627
  .${e}-image-hover-saturate img {
1618
1628
  transition: filter 0.3s ease;
1619
1629
  }
1620
- .${e}-image-hover-saturate:hover img,
1621
- .${e}-image-hover-saturate-active img {
1630
+ .${e}-image-hover-saturate:hover img {
1622
1631
  filter: saturate(2);
1623
1632
  }
1624
- `}const Ds=30,qs=3,Us=e=>Array.from({length:qs},()=>e).flat(),Ks=(e,t)=>`${e}-${t}`,Gs=(e,t)=>{const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return o.right>n.left&&o.left<n.right},Ys=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(o=>Gs(o,e))},Xs=({item:e,prefix:t,imageFit:n,imageMaxWidth:o,imageMaxHeight:r,imageHoverClass:s,isEditor:i,isFirstSet:u,scaled:l,onFirstSetImageDone:m})=>{var S,g,p;const c=h.useRef(null);h.useLayoutEffect(()=>{if(!u)return;const d=c.current;d!=null&&d.complete&&(m==null||m())},[u,(S=e.image)==null?void 0:S.url,m]);const T=((g=e.image)==null?void 0:g.url)&&a.jsx("img",{ref:c,src:e.image.url,alt:((p=e.image)==null?void 0:p.name)??"",style:{pointerEvents:"auto",objectFit:n,...n==="contain"?{width:"auto",maxWidth:"100%",maxHeight:"100%",height:"auto"}:{width:"100%",height:"100%"}},onLoad:u?m:void 0,onError:u?m:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...n==="contain"?{maxWidth:l(o)}:{width:l(o)}},children:a.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",width:"100%",height:l(r),overflow:"hidden",flexShrink:0},children:T&&(e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center",alignSelf:"flex-start",...n==="cover"?{width:"100%",height:"100%"}:{height:"auto",width:"auto",maxWidth:"100%",maxHeight:"100%"},textDecoration:"none",color:"inherit"},children:T}):T)})})},Zs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=_.useScopedStyles(),{speed:s,direction:i,pauseOnHover:u,gap:l,imageMaxWidth:m,imageMaxHeight:c,imageFit:T}=e,S=e.hoverEffect==="off"?void 0:`${r}-image-hover-${e.hoverEffect}`,g=!o,p=Math.max(0,s)*Ds,d=V=>_.scalingValue(V,n??!1),x=h.useRef(null),y=h.useRef(null),b=h.useRef(null),[E,K]=h.useState(0),[k,I]=h.useState(0),[w,C]=h.useState(0),R=g&&u==="on",[z,P]=h.useState(!1),H=e.hoverRandomize==="on",[j,D]=h.useState({}),G=h.useRef(j);G.current=j;const v=h.useRef(null),F=h.useRef(0),A=h.useRef(null),M=h.useMemo(()=>(t??[]).map(V=>{var Q;return((Q=V.image)==null?void 0:Q.url)??""}).join("\0"),[t]),$=h.useMemo(()=>{const V=t??[];return!g||V.length===0?V:Us(V)},[t,g]),N=h.useMemo(()=>$.filter(V=>{var Q;return!!((Q=V.image)!=null&&Q.url)}).length,[$]),J=h.useMemo(()=>!g||(t==null?void 0:t.length)===0?1:k<=0||E<=0?2:Math.max(2,Math.ceil(E/k)+1),[g,t==null?void 0:t.length,k,E,T]);h.useLayoutEffect(()=>{F.current=0,D({})},[M]),h.useEffect(()=>{if(!H)return;const V=x.current;if(!V)return;const Q=ie=>{D(L=>{let f=null;for(const O of ie)O in L&&(Ys(V,O)||(f||(f={...L}),delete f[O]));return f??L})},te=new IntersectionObserver(ie=>{const L=new Set;for(const f of ie){const O=f.target.dataset.marqueeItemIndex,Y=O!==void 0?Number(O):NaN;Number.isNaN(Y)||L.add(Y)}L.size>0&&Q(L)},{root:V,threshold:0});Object.keys(j).forEach(ie=>{const L=Number(ie);V.querySelectorAll(`[data-marquee-item-index="${L}"]`).forEach(f=>te.observe(f))});let se=0;const q=()=>{const ie=Object.keys(G.current);ie.length!==0&&(Q(ie.map(Number)),se=requestAnimationFrame(q))};return Object.keys(G.current).length>0&&(se=requestAnimationFrame(q)),()=>{cancelAnimationFrame(se),te.disconnect()}},[H,j]),h.useLayoutEffect(()=>{if(!g)return;const V=x.current,Q=b.current;if(!V||!Q)return;let te=0;const se=()=>{const L=V.getBoundingClientRect().width,f=Q.getBoundingClientRect().width,O=v.current,Y=typeof O=="number"&&Math.abs(O-f)<=.25;if(v.current=f,K(L),typeof f=="number"&&f>0&&k<=0){I(f);return}Y&&f!==k?I(f):!Y&&k<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(se))},q=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(se)};A.current=q,q();const ie=new ResizeObserver(q);return ie.observe(V),ie.observe(Q),()=>{A.current=null,cancelAnimationFrame(te),ie.disconnect()}},[g,k]),h.useLayoutEffect(()=>{const V=y.current;if(!g||!V)return;const Q=k>0?k:0,te=Q>0&&p>0?Q/p*1e3:0,se=`${Math.max(0,te)/1e3}s`;V.style.setProperty("--marquee-distance",`${Q}px`),V.style.setProperty("--marquee-duration",se)},[g,p,k]),h.useLayoutEffect(()=>{if(!g){C(0);return}if(k<=0){C(0);return}const V=y.current;if(!V)return;const Q=()=>{const se=V.getBoundingClientRect().height;C(se>0?se:0)};Q();const te=new ResizeObserver(Q);return te.observe(V),()=>{te.disconnect()}},[g,J,$,n,l,m,c,k,T]);const ce=()=>{R&&P(!0)},re=()=>{R&&P(!1)},ge=()=>{var V;F.current=Math.min(N,F.current+1),(V=A.current)==null||V.call(A)},W=(V,Q,te,se)=>{const q=Ks(Q,te),ie=H?j[te]??V:V,L=H?()=>{const f=j[te]??V,O=(t??[]).filter(ee=>ee!==f);if(O.length===0)return;const Y=O[Math.floor(Math.random()*O.length)];D(ee=>({...ee,[te]:Y}))}:void 0;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-card-key":q,"data-marquee-item-index":te,"data-marquee-copy-index":Q,onMouseEnter:L,children:[a.jsx(Xs,{item:ie,prefix:r,imageFit:T,imageMaxWidth:m,imageMaxHeight:c,imageHoverClass:S,isEditor:n,isFirstSet:se,scaled:d,onFirstSetImageDone:ge}),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${d(l)})`,width:d(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},q)};return g&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:x,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:k>0&&w>0?{height:w}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{ref:y,className:`${r}-marquee-track`,"data-direction":i,onMouseEnter:ce,onMouseLeave:re,style:{...k<=0?{animationName:"none"}:{},...R?{"--marquee-play-state":z?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:J},(V,Q)=>a.jsx("div",{ref:Q===0?b:void 0,className:he(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:d(l),paddingRight:d(l)},"aria-hidden":Q>0,children:$.map((te,se)=>W(te,Q,se,Q===0))},`set-${Q}`))},"marquee-track")]}):a.jsxs("div",{ref:x,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{className:he(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:d(l),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((V,Q)=>W(V,0,Q))},"marquee-static")]})},Js=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1633
+ `}const qs=30,Tn=2,Us=2,Gs=(e,t)=>Array.from({length:t},()=>e).flat(),Ks=(e,t)=>{const n=t.getBoundingClientRect(),o=e.getBoundingClientRect();return o.right>n.left&&o.left<n.right},Ys=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(o=>Ks(o,e))},Xs=({item:e,prefix:t,imageFit:n,imageMaxWidth:o,imageMaxHeight:r,imageHoverClass:s,isEditor:i,isFirstSet:p,scaled:c,onFirstSetImageDone:d})=>{var y,h,l;const u=g.useRef(null);g.useLayoutEffect(()=>{if(!p)return;const m=u.current;m!=null&&m.complete&&(d==null||d())},[p,(y=e.image)==null?void 0:y.url,d]);const E=((h=e.image)==null?void 0:h.url)&&a.jsx("img",{ref:u,src:e.image.url,alt:((l=e.image)==null?void 0:l.name)??"",style:{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:n},onLoad:p?d:void 0,onError:p?d:void 0});return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",width:c(o)},children:a.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:c(r),overflow:"hidden",flexShrink:0},children:E&&(e.link?a.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:`${t}-marquee-link`,children:E}):E)})})},Zs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=k.useScopedStyles(),{speed:s,direction:i,pauseOnHover:p,gap:c,imageMaxWidth:d,imageMaxHeight:u,imageFit:E,hoverEffect:y}=e,h=y==="off"||y==="randomize"?void 0:`${r}-image-hover-${y}`,l=!o,m=Math.max(0,s)*qs,S=Y=>k.scalingValue(Y,n??!1),v=g.useRef(null),x=g.useRef(null),I=g.useRef(null),[G,j]=g.useState(0),[$,C]=g.useState(0),[w,R]=g.useState(0),z=l&&p==="on",[P,O]=g.useState(!1),[H,q]=g.useState({}),X=g.useRef(H);X.current=H;const b=g.useRef(null),L=g.useRef(0),A=g.useRef(null),F=g.useMemo(()=>(t??[]).map(Y=>{var M;return((M=Y.image)==null?void 0:M.url)??""}).join("\0"),[t]),[T,W]=g.useState(Tn),J=g.useMemo(()=>{const Y=t??[];return!l||Y.length===0?Y:Gs(Y,T)},[t,l,T]),le=g.useMemo(()=>J.filter(Y=>{var M;return!!((M=Y.image)!=null&&M.url)}).length,[J]),oe=g.useMemo(()=>!l||((t==null?void 0:t.length)??0)===0?1:Us,[l,t==null?void 0:t.length]);g.useLayoutEffect(()=>{L.current=0,q({}),b.current=null,W(Tn),C(0),j(0)},[F]),g.useEffect(()=>{if(y!=="randomize")return;const Y=v.current;if(!Y)return;const M=V=>{q(B=>{let K=null;for(const re of V)re in B&&(Ys(Y,re)||(K||(K={...B}),delete K[re]));return K??B})},ee=new IntersectionObserver(V=>{const B=new Set;for(const K of V){const re=K.target.dataset.marqueeItemIndex,se=re!==void 0?Number(re):NaN;Number.isNaN(se)||B.add(se)}B.size>0&&M(B)},{root:Y,threshold:0});Object.keys(H).forEach(V=>{const B=Number(V);Y.querySelectorAll(`[data-marquee-item-index="${B}"]`).forEach(K=>ee.observe(K))});let _=0;const f=()=>{const V=Object.keys(X.current);V.length!==0&&(M(V.map(Number)),_=requestAnimationFrame(f))};return Object.keys(X.current).length>0&&(_=requestAnimationFrame(f)),()=>{cancelAnimationFrame(_),ee.disconnect()}},[y,H]),g.useLayoutEffect(()=>{if(!l)return;const Y=v.current,M=I.current;if(!Y||!M)return;let ee=0;const _=()=>{const B=Y.getBoundingClientRect().width,K=M.getBoundingClientRect().width,re=b.current,se=typeof re=="number"&&Math.abs(re-K)<=.25;if(b.current=K,j(B),K>0&&T>0){const ae=K/T;if(ae>0&&B>0){const pe=Math.max(Tn,Math.ceil(B/ae)+1);if(pe!==T){W(pe);return}}}if(K>0&&$<=0){C(K);return}se&&K!==$?C(K):!se&&$<=0&&(cancelAnimationFrame(ee),ee=requestAnimationFrame(_))},f=()=>{cancelAnimationFrame(ee),ee=requestAnimationFrame(_)};A.current=f,f();const V=new ResizeObserver(f);return V.observe(Y),V.observe(M),()=>{A.current=null,cancelAnimationFrame(ee),V.disconnect()}},[l,$,F,T]),g.useLayoutEffect(()=>{const Y=x.current;if(!l||!Y)return;const M=$>0?$:0,ee=M>0&&m>0?M/m*1e3:0,_=`${Math.max(0,ee)/1e3}s`;Y.style.setProperty("--marquee-distance",`${M}px`),Y.style.setProperty("--marquee-duration",_)},[l,m,$]),g.useLayoutEffect(()=>{if(!l){R(0);return}if($<=0){R(0);return}const Y=x.current;if(!Y)return;const M=()=>{const _=Y.getBoundingClientRect().height;R(_>0?_:0)};M();const ee=new ResizeObserver(M);return ee.observe(Y),()=>ee.disconnect()},[l,oe,J,n,c,d,u,$,E,H]);const me=()=>{z&&O(!0)},N=()=>{z&&O(!1)},ie=g.useCallback(()=>{var Y;L.current=Math.min(le,L.current+1),(Y=A.current)==null||Y.call(A)},[le]),fe=g.useCallback((Y,M)=>{q(ee=>{const _=ee[Y]??M,f=(t??[]).filter(B=>B!==_);if(f.length===0)return ee;const V=f[Math.floor(Math.random()*f.length)];return{...ee,[Y]:V}})},[t]),ge=(Y,M,ee,_)=>{const f=y==="randomize"?H[ee]??Y:Y,V=y==="randomize"?()=>fe(ee,Y):void 0;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ee,onMouseEnter:V,children:[a.jsx(Xs,{item:f,prefix:r,imageFit:E,imageMaxWidth:d,imageMaxHeight:u,imageHoverClass:h,isEditor:n,isFirstSet:_,scaled:S,onFirstSetImageDone:ie}),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${S(c)})`,width:S(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${M}-${ee}`)};return l&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:v,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:$>0&&w>0?{height:w}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),a.jsx("div",{ref:x,className:`${r}-marquee-track`,"data-direction":i,onMouseEnter:me,onMouseLeave:N,style:{...z?{"--marquee-play-state":P?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:oe},(Y,M)=>a.jsx("div",{ref:M===0?I:void 0,className:he(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:S(c),paddingRight:S(c)},"aria-hidden":M>0,children:J.map((ee,_)=>ge(ee,M,_,M===0))},`set-${M}`))},"marquee-track")]}):a.jsxs("div",{ref:v,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),a.jsx("div",{className:he(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:S(c),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((Y,M)=>ge(Y,0,M))},"marquee-static")]})},Qs=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1625
1634
  import cn from 'classnames';
1626
1635
  import { CommonComponentProps } from '../props';
1627
1636
  import { scalingValue } from '../utils/scalingValue';
@@ -1714,6 +1723,18 @@ function getCSS(P: string): string {
1714
1723
  z-index: 2;
1715
1724
  width: 100%;
1716
1725
  }
1726
+
1727
+ .\${P}-marquee-link {
1728
+ display: flex;
1729
+ flex-direction: column;
1730
+ justify-content: center;
1731
+ align-items: center;
1732
+ width: 100%;
1733
+ height: 100%;
1734
+ text-decoration: none;
1735
+ color: inherit;
1736
+ }
1737
+
1717
1738
  .\${P}-control::before {
1718
1739
  content: "";
1719
1740
  position: absolute;
@@ -1728,34 +1749,30 @@ function getCSS(P: string): string {
1728
1749
  .\${P}-image-hover-brightness img {
1729
1750
  transition: filter 0.3s ease;
1730
1751
  }
1731
- .\${P}-image-hover-brightness:hover img,
1732
- .\${P}-image-hover-brightness-active img {
1752
+ .\${P}-image-hover-brightness:hover img {
1733
1753
  filter: brightness(1.25);
1734
1754
  }
1735
1755
  .\${P}-image-hover-grayscale img {
1736
1756
  transition: filter 0.3s ease;
1737
1757
  }
1738
- .\${P}-image-hover-grayscale:hover img,
1739
- .\${P}-image-hover-grayscale-active img {
1758
+ .\${P}-image-hover-grayscale:hover img {
1740
1759
  filter: grayscale(100%);
1741
1760
  }
1742
1761
  .\${P}-image-hover-saturate img {
1743
1762
  transition: filter 0.3s ease;
1744
1763
  }
1745
- .\${P}-image-hover-saturate:hover img,
1746
- .\${P}-image-hover-saturate-active img {
1764
+ .\${P}-image-hover-saturate:hover img {
1747
1765
  filter: saturate(2);
1748
1766
  }
1749
1767
  \`;
1750
1768
  }
1751
1769
 
1752
1770
  const PX_PER_SEC_PER_SPEED_UNIT = 30;
1753
- const TRACK_CONTENT_SEQUENCE_REPEAT = 3;
1771
+ const MIN_CONTENT_SEQUENCE_REPEAT = 2;
1772
+ const OUTER_SET_COPIES = 2;
1754
1773
 
1755
- const expandTrackContent = (items: MarqueeItem[]) =>
1756
- Array.from({ length: TRACK_CONTENT_SEQUENCE_REPEAT }, () => items).flat();
1757
-
1758
- const getMarqueeCardKey = (copyIndex: number, itemIndex: number) => \`\${copyIndex}-\${itemIndex}\`;
1774
+ const expandSetContent = (items: MarqueeItem[], repeat: number) =>
1775
+ Array.from({ length: repeat }, () => items).flat();
1759
1776
 
1760
1777
  const isCardInMarqueeView = (card: Element, wrapper: Element): boolean => {
1761
1778
  const wrapperRect = wrapper.getBoundingClientRect();
@@ -1810,10 +1827,10 @@ const MarqueeItemCard = ({
1810
1827
  alt={item.image?.name ?? ''}
1811
1828
  style={{
1812
1829
  pointerEvents: 'auto',
1830
+ display: 'block',
1831
+ width: '100%',
1832
+ height: '100%',
1813
1833
  objectFit: imageFit,
1814
- ...(imageFit === 'contain'
1815
- ? { width: 'auto', maxWidth: '100%', maxHeight: '100%', height: 'auto' }
1816
- : { width: '100%', height: '100%' }),
1817
1834
  }}
1818
1835
  onLoad={isFirstSet ? onFirstSetImageDone : undefined}
1819
1836
  onError={isFirstSet ? onFirstSetImageDone : undefined}
@@ -1826,7 +1843,7 @@ const MarqueeItemCard = ({
1826
1843
  display: 'flex',
1827
1844
  flexDirection: 'column',
1828
1845
  alignItems: 'start',
1829
- ...(imageFit === 'contain' ? { maxWidth: scaled(imageMaxWidth) } : { width: scaled(imageMaxWidth) }),
1846
+ width: scaled(imageMaxWidth),
1830
1847
  }}
1831
1848
  >
1832
1849
  <div
@@ -1834,7 +1851,7 @@ const MarqueeItemCard = ({
1834
1851
  style={{
1835
1852
  display: 'flex',
1836
1853
  flexDirection: 'column',
1837
- justifyContent: 'flex-start',
1854
+ justifyContent: 'center',
1838
1855
  alignItems: 'center',
1839
1856
  width: '100%',
1840
1857
  height: scaled(imageMaxHeight),
@@ -1848,18 +1865,7 @@ const MarqueeItemCard = ({
1848
1865
  href={item.link}
1849
1866
  target='_blank'
1850
1867
  rel='noopener noreferrer'
1851
- style={{
1852
- display: 'flex',
1853
- flexDirection: 'column',
1854
- justifyContent: 'flex-start',
1855
- alignItems: 'center',
1856
- alignSelf: 'flex-start',
1857
- ...(imageFit === 'cover'
1858
- ? { width: '100%', height: '100%' }
1859
- : { height: 'auto', width: 'auto', maxWidth: '100%', maxHeight: '100%' }),
1860
- textDecoration: 'none',
1861
- color: 'inherit',
1862
- }}
1868
+ className={\`\${P}-marquee-link\`}
1863
1869
  >
1864
1870
  {imageNode}
1865
1871
  </a>
@@ -1873,8 +1879,11 @@ const MarqueeItemCard = ({
1873
1879
 
1874
1880
  export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeProps) => {
1875
1881
  const { prefix: P } = useScopedStyles();
1876
- const { speed, direction, pauseOnHover, gap, imageMaxWidth, imageMaxHeight, imageFit } = settings;
1877
- const imageHoverClass = settings.hoverEffect === 'off' ? undefined : \`\${P}-image-hover-\${settings.hoverEffect}\`;
1882
+ const { speed, direction, pauseOnHover, gap, imageMaxWidth, imageMaxHeight, imageFit, hoverEffect } = settings;
1883
+ const imageHoverClass =
1884
+ hoverEffect === 'off' || hoverEffect === 'randomize'
1885
+ ? undefined
1886
+ : \`\${P}-image-hover-\${hoverEffect}\`;
1878
1887
  const autoplayEnabled = !isPreviewMode;
1879
1888
  const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
1880
1889
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
@@ -1886,36 +1895,42 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1886
1895
  const [trackHeight, setTrackHeight] = useState(0);
1887
1896
  const hoverPauseEnabled = autoplayEnabled && pauseOnHover === 'on';
1888
1897
  const [isHovering, setIsHovering] = useState(false);
1889
- const hoverRandomizeEnabled = settings.hoverRandomize === 'on';
1890
1898
  const [swappedSlots, setSwappedSlots] = useState<Record<number, MarqueeItem>>({});
1891
1899
  const swappedSlotsRef = useRef(swappedSlots);
1892
1900
  swappedSlotsRef.current = swappedSlots;
1893
1901
  const stableCandidateRef = useRef<number | null>(null);
1894
1902
  const loadedFirstSetImagesRef = useRef(0);
1895
1903
  const scheduleRemeasureRef = useRef<(() => void) | null>(null);
1896
- const contentImageUrlsKey = useMemo(() => (content ?? []).map((i) => i.image?.url ?? '').join('\\0'),[content]);
1897
- const trackContent = useMemo(() => {
1904
+ const contentImageUrlsKey = useMemo(
1905
+ () => (content ?? []).map((i) => i.image?.url ?? '').join('\\0'),
1906
+ [content],
1907
+ );
1908
+ const [contentSequenceRepeat, setContentSequenceRepeat] = useState(MIN_CONTENT_SEQUENCE_REPEAT);
1909
+ const setContent = useMemo(() => {
1898
1910
  const items = content ?? [];
1899
1911
  if (!autoplayEnabled || items.length === 0) return items;
1900
- return expandTrackContent(items);
1901
- }, [content, autoplayEnabled]);
1912
+ return expandSetContent(items, contentSequenceRepeat);
1913
+ }, [content, autoplayEnabled, contentSequenceRepeat]);
1902
1914
  const firstSetImageUrlCount = useMemo(
1903
- () => trackContent.filter((i) => Boolean(i.image?.url)).length,
1904
- [trackContent],
1915
+ () => setContent.filter((i) => Boolean(i.image?.url)).length,
1916
+ [setContent],
1905
1917
  );
1906
1918
  const copies = useMemo(() => {
1907
- if (!autoplayEnabled || content?.length === 0) return 1;
1908
- if (setWidth <= 0 || containerWidth <= 0) return 2;
1909
- return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1910
- }, [autoplayEnabled, content?.length, setWidth, containerWidth, imageFit]);
1919
+ if (!autoplayEnabled || (content?.length ?? 0) === 0) return 1;
1920
+ return OUTER_SET_COPIES;
1921
+ }, [autoplayEnabled, content?.length]);
1911
1922
 
1912
1923
  useLayoutEffect(() => {
1913
1924
  loadedFirstSetImagesRef.current = 0;
1914
1925
  setSwappedSlots({});
1926
+ stableCandidateRef.current = null;
1927
+ setContentSequenceRepeat(MIN_CONTENT_SEQUENCE_REPEAT);
1928
+ setSetWidth(0);
1929
+ setContainerWidth(0);
1915
1930
  }, [contentImageUrlsKey]);
1916
1931
 
1917
1932
  useEffect(() => {
1918
- if (!hoverRandomizeEnabled) return;
1933
+ if (hoverEffect !== 'randomize') return;
1919
1934
  const wrapper = wrapperRef.current;
1920
1935
  if (!wrapper) return;
1921
1936
 
@@ -1967,7 +1982,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1967
1982
  cancelAnimationFrame(raf);
1968
1983
  observer.disconnect();
1969
1984
  };
1970
- }, [hoverRandomizeEnabled, swappedSlots]);
1985
+ }, [hoverEffect, swappedSlots]);
1971
1986
 
1972
1987
  useLayoutEffect(() => {
1973
1988
  if (!autoplayEnabled) return;
@@ -1979,10 +1994,25 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1979
1994
  const nextContainerWidth = wrapper.getBoundingClientRect().width;
1980
1995
  const nextRawSetWidth = set.getBoundingClientRect().width;
1981
1996
  const prevCandidate = stableCandidateRef.current;
1982
- const isStableNow = typeof prevCandidate === 'number' && Math.abs(prevCandidate - nextRawSetWidth) <= 0.25;
1997
+ const isStableNow =
1998
+ typeof prevCandidate === 'number' &&
1999
+ Math.abs(prevCandidate - nextRawSetWidth) <= 0.25;
1983
2000
  stableCandidateRef.current = nextRawSetWidth;
1984
2001
  setContainerWidth(nextContainerWidth);
1985
- if (typeof nextRawSetWidth === 'number' && nextRawSetWidth > 0 && setWidth <= 0) {
2002
+ if (nextRawSetWidth > 0 && contentSequenceRepeat > 0) {
2003
+ const singleCycleWidth = nextRawSetWidth / contentSequenceRepeat;
2004
+ if (singleCycleWidth > 0 && nextContainerWidth > 0) {
2005
+ const targetRepeat = Math.max(
2006
+ MIN_CONTENT_SEQUENCE_REPEAT,
2007
+ Math.ceil(nextContainerWidth / singleCycleWidth) + 1,
2008
+ );
2009
+ if (targetRepeat !== contentSequenceRepeat) {
2010
+ setContentSequenceRepeat(targetRepeat);
2011
+ return;
2012
+ }
2013
+ }
2014
+ }
2015
+ if (nextRawSetWidth > 0 && setWidth <= 0) {
1986
2016
  setSetWidth(nextRawSetWidth);
1987
2017
  return;
1988
2018
  }
@@ -2007,7 +2037,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2007
2037
  cancelAnimationFrame(raf);
2008
2038
  ro.disconnect();
2009
2039
  };
2010
- }, [autoplayEnabled, setWidth]);
2040
+ }, [autoplayEnabled, setWidth, contentImageUrlsKey, contentSequenceRepeat]);
2011
2041
 
2012
2042
  useLayoutEffect(() => {
2013
2043
  const track = trackRef.current;
@@ -2037,10 +2067,8 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2037
2067
  measure();
2038
2068
  const ro = new ResizeObserver(measure);
2039
2069
  ro.observe(track);
2040
- return () => {
2041
- ro.disconnect();
2042
- };
2043
- }, [autoplayEnabled, copies, trackContent, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth, imageFit]);
2070
+ return () => ro.disconnect();
2071
+ }, [autoplayEnabled, copies, setContent, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth, imageFit, swappedSlots]);
2044
2072
 
2045
2073
  const onTrackEnter = () => {
2046
2074
  if (!hoverPauseEnabled) return;
@@ -2051,33 +2079,44 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2051
2079
  setIsHovering(false);
2052
2080
  };
2053
2081
 
2054
- const onFirstSetImageDone = () => {
2082
+ const onFirstSetImageDone = useCallback(() => {
2055
2083
  loadedFirstSetImagesRef.current = Math.min(
2056
2084
  firstSetImageUrlCount,
2057
2085
  loadedFirstSetImagesRef.current + 1,
2058
2086
  );
2059
2087
  scheduleRemeasureRef.current?.();
2060
- };
2088
+ }, [firstSetImageUrlCount]);
2089
+
2090
+ const handleRandomizeEnter = useCallback(
2091
+ (slotIndex: number, item: MarqueeItem) => {
2092
+ setSwappedSlots((prev) => {
2093
+ const current = prev[slotIndex] ?? item;
2094
+ const candidates = (content ?? []).filter((c) => c !== current);
2095
+ if (candidates.length === 0) return prev;
2096
+ const next = candidates[Math.floor(Math.random() * candidates.length)];
2097
+ return { ...prev, [slotIndex]: next };
2098
+ });
2099
+ },
2100
+ [content],
2101
+ );
2102
+
2103
+ const renderCardWrapper = (
2104
+ item: MarqueeItem,
2105
+ copyIndex: number,
2106
+ slotIndex: number,
2107
+ isFirstSet?: boolean,
2108
+ ) => {
2109
+ const displayItem = hoverEffect === 'randomize' ? (swappedSlots[slotIndex] ?? item) : item;
2110
+ const onCardEnter =
2111
+ hoverEffect === 'randomize'
2112
+ ? () => handleRandomizeEnter(slotIndex, item)
2113
+ : undefined;
2061
2114
 
2062
- const renderCardWrapper = (item: MarqueeItem, copyIndex: number, itemIndex: number, isFirstSet?: boolean) => {
2063
- const cardKey = getMarqueeCardKey(copyIndex, itemIndex);
2064
- const displayItem = hoverRandomizeEnabled ? (swappedSlots[itemIndex] ?? item) : item;
2065
- const onCardEnter = hoverRandomizeEnabled
2066
- ? () => {
2067
- const current = swappedSlots[itemIndex] ?? item;
2068
- const candidates = (content ?? []).filter((c) => c !== current);
2069
- if (candidates.length === 0) return;
2070
- const next = candidates[Math.floor(Math.random() * candidates.length)];
2071
- setSwappedSlots((prev) => ({ ...prev, [itemIndex]: next }));
2072
- }
2073
- : undefined;
2074
2115
  return (
2075
2116
  <div
2076
- key={cardKey}
2117
+ key={\`\${copyIndex}-\${slotIndex}\`}
2077
2118
  className={\`\${P}-marquee-card\`}
2078
- data-marquee-card-key={cardKey}
2079
- data-marquee-item-index={itemIndex}
2080
- data-marquee-copy-index={copyIndex}
2119
+ data-marquee-item-index={slotIndex}
2081
2120
  onMouseEnter={onCardEnter}
2082
2121
  >
2083
2122
  <MarqueeItemCard
@@ -2128,7 +2167,6 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2128
2167
  onMouseEnter={onTrackEnter}
2129
2168
  onMouseLeave={onTrackLeave}
2130
2169
  style={{
2131
- ...(setWidth <= 0 ? { animationName: 'none' } : {}),
2132
2170
  ...(hoverPauseEnabled
2133
2171
  ? ({ '--marquee-play-state': isHovering ? 'paused' : 'running' } as React.CSSProperties)
2134
2172
  : ({ '--marquee-play-state': 'running' } as React.CSSProperties)),
@@ -2145,8 +2183,8 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2145
2183
  }}
2146
2184
  aria-hidden={copyIndex > 0}
2147
2185
  >
2148
- {trackContent.map((item: MarqueeItem, index: number) =>
2149
- renderCardWrapper(item, copyIndex, index, copyIndex === 0)
2186
+ {setContent.map((marqueeItem, slotIndex) =>
2187
+ renderCardWrapper(marqueeItem, copyIndex, slotIndex, copyIndex === 0),
2150
2188
  )}
2151
2189
  </div>
2152
2190
  ))}
@@ -2164,8 +2202,8 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2164
2202
  style={{ gap: scaled(gap), transform: 'none' }}
2165
2203
  aria-label="Marquee"
2166
2204
  >
2167
- {content?.map((item: MarqueeItem, index: number) =>
2168
- renderCardWrapper(item, 0, index)
2205
+ {content?.map((marqueeItem, itemIndex) =>
2206
+ renderCardWrapper(marqueeItem, 0, itemIndex),
2169
2207
  )}
2170
2208
  </div>
2171
2209
  </div>
@@ -2184,8 +2222,7 @@ export type MarqueeSettings = {
2184
2222
  speed: number;
2185
2223
  direction: 'left' | 'right';
2186
2224
  pauseOnHover: 'on' | 'off';
2187
- hoverEffect: 'off' | 'brightness' | 'grayscale' | 'saturate';
2188
- hoverRandomize: 'on' | 'off';
2225
+ hoverEffect: 'off' | 'brightness' | 'grayscale' | 'saturate' | 'randomize';
2189
2226
  gap: number;
2190
2227
  imageMaxWidth: number;
2191
2228
  imageMaxHeight: number;
@@ -2198,7 +2235,7 @@ type MarqueeProps = {
2198
2235
  isEditor?: boolean;
2199
2236
  isPreviewMode?: boolean;
2200
2237
  } & CommonComponentProps;
2201
- `,Qs={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"switch-toggle",enum:["off","brightness","grayscale","saturate"]}},hoverRandomize:{type:"string",scope:"common",title:"Randomize",display:{type:"switch-toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"range-control"}},imageFit:{type:"string",scope:"common",title:"Image cover",enum:["cover","contain"],display:{type:"switch-toggle-2",enum:["cover","contain"]}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:"contain"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit",value:"contain"},then:{name:"properties.hoverRandomize.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"group",title:"Hover Settings",items:[{type:"row",title:"",items:["pauseOnHover","hoverEffect"]},{type:"row",title:"",items:["hoverRandomize"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},el={element:Zs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Qs,sourceCode:Js,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function _o(e){return`
2238
+ `,Js={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"switch-toggle",enum:["off","brightness","grayscale","saturate","randomize"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"range-control"}},imageFit:{type:"string",scope:"common",title:"Image cover",enum:["cover","contain"],display:{type:"switch-toggle-2",enum:["cover","contain"]}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:"contain"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit",value:"contain"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","saturate"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"group",title:"Hover Settings",items:[{type:"row",title:"",items:["pauseOnHover","hoverEffect"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},el={element:Zs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Js,sourceCode:Qs,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function _o(e){return`
2202
2239
  .${e}-marquee-wrapper {
2203
2240
  overflow: hidden;
2204
2241
  width: 100%;
@@ -2285,7 +2322,7 @@ type MarqueeProps = {
2285
2322
  pointer-events: auto;
2286
2323
  z-index: 10;
2287
2324
  }
2288
- `}const tl=30,nl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=_.useScopedStyles(),{autoplay:s,align:i,speed:u,direction:l,pauseOnHover:m,gap:c,cardWidth:T,corners:S,stroke:g,strokeColor:p,bgColor:d,padding:x,logoMarginTop:y,logoWidth:b,logoHeight:E,captionMarginTop:K}=e,k=s==="on"&&!o,I=k,w=Math.max(0,u)*tl,C=B=>_.scalingValue(B,n??!1),R=h.useRef(null),z=h.useRef(null),P=h.useRef(null),[H,j]=h.useState(0),[D,G]=h.useState(0),[v,F]=h.useState(0),A=I&&m==="on",[M,$]=h.useState(!1),N=h.useRef(null),[J,ce]=h.useState(0),[re,ge]=h.useState(0),W=h.useRef(null),V=B=>{var X,pe,ne,me,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${B}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${B}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${B}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((ne=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:ne.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${B}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${B}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${B}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${B}LineHeight`])??.01,color:(e==null?void 0:e[`${B}Color`])??"#000000"}},Q=V("text"),te=V("caption"),se=h.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(B=>{var Z,X;return(((Z=B.text)==null?void 0:Z.length)??0)>0||(((X=B.caption)==null?void 0:X.length)??0)>0}),[t]),q=h.useMemo(()=>!k||(t==null?void 0:t.length)===0?1:D<=0||H<=0?2:Math.max(2,Math.ceil(H/D)+1),[k,t==null?void 0:t.length,D,H]);h.useLayoutEffect(()=>{if(!k)return;const B=R.current,Z=P.current;if(!B||!Z)return;let X=0;const pe=()=>{const we=B.getBoundingClientRect().width,Ce=Z.getBoundingClientRect().width,lt=W.current,Ge=typeof lt=="number"&&Math.abs(lt-Ce)<=.25;if(W.current=Ce,j(we),typeof Ce=="number"&&Ce>0&&D<=0){G(Ce);return}Ge&&Ce!==D?G(Ce):!Ge&&D<=0&&(cancelAnimationFrame(X),X=requestAnimationFrame(pe))},ne=()=>{cancelAnimationFrame(X),X=requestAnimationFrame(pe)};ne();const me=new ResizeObserver(ne);return me.observe(B),me.observe(Z),()=>{cancelAnimationFrame(X),me.disconnect()}},[k,D]),h.useLayoutEffect(()=>{const B=z.current;if(!k||!B||!I)return;const Z=D>0?D:0,X=Z>0&&w>0?Z/w*1e3:0,pe=`${Math.max(0,X)/1e3}s`;B.style.setProperty("--marquee-distance",`${Z}px`),B.style.setProperty("--marquee-duration",pe)},[k,I,w,D]),h.useLayoutEffect(()=>{if(!k){F(0);return}const B=P.current,Z=z.current;if(!B||!Z)return;const X=()=>{let ne=0;for(let me=0;me<B.children.length;me++){const Ce=B.children[me].firstElementChild;Ce&&(ne=Math.max(ne,Ce.offsetHeight))}ne<=0&&(ne=Z.offsetHeight),F(ne>0?ne:0)};X();const pe=new ResizeObserver(X);return pe.observe(B),pe.observe(Z),()=>{pe.disconnect()}},[k,q,t,n,c,T,x,g,S,b,E,J,re]);const ie=()=>{A&&$(!0)},L=()=>{A&&$(!1)},f=h.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),O=h.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Y=h.useCallback((B,Z,X,pe)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[a.jsx("div",{"data-controls":pe==null?void 0:pe.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:C((pe==null?void 0:pe.marginTop)??0)}}),a.jsx("div",{...pe!=null&&pe.dataMeasureKind?{"data-testimonial-measure":pe.dataMeasureKind}:{},style:{...Pe(B,n),textAlign:O,pointerEvents:"auto",...typeof(pe==null?void 0:pe.minHeightPx)=="number"&&pe.minHeightPx>0?{minHeight:pe.minHeightPx}:{}},children:a.jsx(Rt,{content:Z})})]},X),[f,O,n]),ee=h.useCallback((B,Z,X)=>{var pe,ne,me;return a.jsxs("div",{style:{padding:`${C(x.top)} ${C(x.right)} ${C(x.bottom)} ${C(x.left)}`,width:C(T+g*2),height:"100%",borderRadius:C(S),border:`${C(g)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:d}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:f,textAlign:O},children:[B.text&&Y(Q,B.text,"text",X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(X==null?void 0:X.textMinHeightPx)=="number"&&X.textMinHeightPx>0?{minHeightPx:X.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:C(y)}}),a.jsx("div",{style:{width:C(b),height:C(E)},children:((pe=B.logo)==null?void 0:pe.url)&&a.jsx("img",{src:B.logo.url,alt:((ne=B.logo)==null?void 0:ne.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((me=B.logo)==null?void 0:me.objectFit)||"contain"}})})]}),B.caption&&Y(te,B.caption,"caption",{controlsName:"captionMarginTop",marginTop:K,...X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(X==null?void 0:X.captionMinHeightPx)=="number"&&X.captionMinHeightPx>0?{minHeightPx:X.captionMinHeightPx}:{}})]})]},Z)},[d,K,te,T,S,E,y,b,f,O,x.bottom,x.left,x.right,x.top,Y,g,p,Q,n]),ue=h.useCallback(B=>{ce(B.maxTextPx),ge(B.maxCaptionPx)},[]);h.useLayoutEffect(()=>{if(!se){ue({maxTextPx:0,maxCaptionPx:0});return}const B=N.current;if(!B)return;const Z=()=>{_.readTestimonialTextMeasure(B,ue)};Z();const X=new ResizeObserver(Z);return X.observe(B),()=>{X.disconnect()}},[se,ue,t,ee]);const le=se?{textMinHeightPx:J,captionMinHeightPx:re}:void 0,ae=se?a.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((B,Z)=>ee(B,`measure-${Z}`,{dataMeasureAttrs:!0}))}):null,fe=(B,Z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[ee(B,`card-${Z}`,le),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(c)})`,width:C(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},Z);return k&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:R,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...v>0?{height:v}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),ae,a.jsx("div",{ref:z,className:`${r}-marquee-track`,"data-direction":l,onMouseEnter:ie,onMouseLeave:L,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...A?{"--marquee-play-state":M?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:q},(B,Z)=>a.jsx("div",{ref:Z===0?P:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(c),paddingRight:C(c)},"aria-hidden":Z>0,children:t==null?void 0:t.map((X,pe)=>fe(X,`${Z}-${pe}`))},`set-${Z}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),ae,a.jsx("div",{style:{gap:C(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((B,Z)=>fe(B,Z))})]})},ol=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2325
+ `}const tl=30,nl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=k.useScopedStyles(),{autoplay:s,align:i,speed:p,direction:c,pauseOnHover:d,gap:u,cardWidth:E,corners:y,stroke:h,strokeColor:l,bgColor:m,padding:S,logoMarginTop:v,logoWidth:x,logoHeight:I,captionMarginTop:G}=e,j=s==="on"&&!o,$=j,C=Math.max(0,p)*tl,w=D=>k.scalingValue(D,n??!1),R=g.useRef(null),z=g.useRef(null),P=g.useRef(null),[O,H]=g.useState(0),[q,X]=g.useState(0),[b,L]=g.useState(0),A=$&&d==="on",[F,T]=g.useState(!1),W=g.useRef(null),[J,le]=g.useState(0),[oe,me]=g.useState(0),N=g.useRef(null),ie=D=>{var Z,ce,te,de,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${D}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((ce=e==null?void 0:e[`${D}FontSettings`])==null?void 0:ce.fontStyle)??"normal"},textAppearance:{textTransform:((te=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:te.textTransform)??"none",textDecoration:((de=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:de.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${D}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${D}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${D}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${D}LineHeight`])??.01,color:(e==null?void 0:e[`${D}Color`])??"#000000"}},fe=ie("text"),ge=ie("caption"),Y=g.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(D=>{var Q,Z;return(((Q=D.text)==null?void 0:Q.length)??0)>0||(((Z=D.caption)==null?void 0:Z.length)??0)>0}),[t]),M=g.useMemo(()=>!j||(t==null?void 0:t.length)===0?1:q<=0||O<=0?2:Math.max(2,Math.ceil(O/q)+1),[j,t==null?void 0:t.length,q,O]);g.useLayoutEffect(()=>{if(!j)return;const D=R.current,Q=P.current;if(!D||!Q)return;let Z=0;const ce=()=>{const Ce=D.getBoundingClientRect().width,we=Q.getBoundingClientRect().width,lt=N.current,Ke=typeof lt=="number"&&Math.abs(lt-we)<=.25;if(N.current=we,H(Ce),typeof we=="number"&&we>0&&q<=0){X(we);return}Ke&&we!==q?X(we):!Ke&&q<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(ce))},te=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(ce)};te();const de=new ResizeObserver(te);return de.observe(D),de.observe(Q),()=>{cancelAnimationFrame(Z),de.disconnect()}},[j,q]),g.useLayoutEffect(()=>{const D=z.current;if(!j||!D||!$)return;const Q=q>0?q:0,Z=Q>0&&C>0?Q/C*1e3:0,ce=`${Math.max(0,Z)/1e3}s`;D.style.setProperty("--marquee-distance",`${Q}px`),D.style.setProperty("--marquee-duration",ce)},[j,$,C,q]),g.useLayoutEffect(()=>{if(!j){L(0);return}const D=P.current,Q=z.current;if(!D||!Q)return;const Z=()=>{let te=0;for(let de=0;de<D.children.length;de++){const we=D.children[de].firstElementChild;we&&(te=Math.max(te,we.offsetHeight))}te<=0&&(te=Q.offsetHeight),L(te>0?te:0)};Z();const ce=new ResizeObserver(Z);return ce.observe(D),ce.observe(Q),()=>{ce.disconnect()}},[j,M,t,n,u,E,S,h,y,x,I,J,oe]);const ee=()=>{A&&T(!0)},_=()=>{A&&T(!1)},f=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),V=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),B=g.useCallback((D,Q,Z,ce)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[a.jsx("div",{"data-controls":ce==null?void 0:ce.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:w((ce==null?void 0:ce.marginTop)??0)}}),a.jsx("div",{...ce!=null&&ce.dataMeasureKind?{"data-testimonial-measure":ce.dataMeasureKind}:{},style:{...Pe(D,n),textAlign:V,pointerEvents:"auto",...typeof(ce==null?void 0:ce.minHeightPx)=="number"&&ce.minHeightPx>0?{minHeight:ce.minHeightPx}:{}},children:a.jsx(Rt,{content:Q})})]},Z),[f,V,n]),K=g.useCallback((D,Q,Z)=>{var ce,te,de;return a.jsxs("div",{style:{padding:`${w(S.top)} ${w(S.right)} ${w(S.bottom)} ${w(S.left)}`,width:w(E+h*2),height:"100%",borderRadius:w(y),border:`${w(h)} solid ${l}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:m}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:f,textAlign:V},children:[D.text&&B(fe,D.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:f,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:w(v)}}),a.jsx("div",{style:{width:w(x),height:w(I)},children:((ce=D.logo)==null?void 0:ce.url)&&a.jsx("img",{src:D.logo.url,alt:((te=D.logo)==null?void 0:te.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((de=D.logo)==null?void 0:de.objectFit)||"contain"}})})]}),D.caption&&B(ge,D.caption,"caption",{controlsName:"captionMarginTop",marginTop:G,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},Q)},[m,G,ge,E,y,I,v,x,f,V,S.bottom,S.left,S.right,S.top,B,h,l,fe,n]),re=g.useCallback(D=>{le(D.maxTextPx),me(D.maxCaptionPx)},[]);g.useLayoutEffect(()=>{if(!Y){re({maxTextPx:0,maxCaptionPx:0});return}const D=W.current;if(!D)return;const Q=()=>{k.readTestimonialTextMeasure(D,re)};Q();const Z=new ResizeObserver(Q);return Z.observe(D),()=>{Z.disconnect()}},[Y,re,t,K]);const se=Y?{textMinHeightPx:J,captionMinHeightPx:oe}:void 0,ae=Y?a.jsx("div",{ref:W,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((D,Q)=>K(D,`measure-${Q}`,{dataMeasureAttrs:!0}))}):null,pe=(D,Q)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[K(D,`card-${Q}`,se),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${w(u)})`,width:w(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},Q);return j&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:R,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...b>0?{height:b}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),ae,a.jsx("div",{ref:z,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:ee,onMouseLeave:_,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...A?{"--marquee-play-state":F?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:M},(D,Q)=>a.jsx("div",{ref:Q===0?P:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:w(u),paddingRight:w(u)},"aria-hidden":Q>0,children:t==null?void 0:t.map((Z,ce)=>pe(Z,`${Q}-${ce}`))},`set-${Q}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),ae,a.jsx("div",{style:{gap:w(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((D,Q)=>pe(D,Q))})]})},ol=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2289
2326
  import cn from 'classnames';
2290
2327
  import { CommonComponentProps } from '../props';
2291
2328
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2891,7 +2928,7 @@ type TestimonialsSettings = {
2891
2928
  logoHeight: number;
2892
2929
  captionMarginTop: number;
2893
2930
  };
2894
- `,Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},rl={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 Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Eo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Eo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["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:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},il={element:nl,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:"100%",height:320},schema:rl,sourceCode:ol,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function al(e){return`
2931
+ `,ko={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},rl={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 Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["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:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},il={element:nl,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:"100%",height:320},schema:rl,sourceCode:ol,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function al(e){return`
2895
2932
  .${e}-container {
2896
2933
  position: relative;
2897
2934
  overflow-x: clip;
@@ -3015,7 +3052,7 @@ type TestimonialsSettings = {
3015
3052
  width: 100%;
3016
3053
  height: 100%;
3017
3054
  }
3018
- `}const sl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=_.useScopedStyles(),s=t||[],{autoplay:i,delay:u,align:l,width:m,imageMarginTop:c,textMarginTop:T,captionMarginTop:S,imageWidth:g,imageHeight:p,controlsWidth:d,controlsColor:x,controlsHoverColor:y}=e,b=i==="on"&&!o,[E,K]=h.useState(0),[k,I]=h.useState(null),[w,C]=h.useState(!1),R=h.useRef(null),z=h.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),P=h.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);h.useEffect(()=>{K(0),I(null),C(!1)},[s.length]);const H=s[E],j=k===null?null:s[k],D=q=>{var L,f,O,Y,ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${q}FontFamily`])??"Arial",fontWeight:((L=e==null?void 0:e[`${q}FontSettings`])==null?void 0:L.fontWeight)??400,fontStyle:((f=e==null?void 0:e[`${q}FontSettings`])==null?void 0:f.fontStyle)??"normal"},textAppearance:{textTransform:((O=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:O.textTransform)??"none",textDecoration:((Y=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:Y.textDecoration)??"none",fontVariant:((ee=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${q}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${q}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${q}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${q}WordSpacing`])??0,color:(e==null?void 0:e[`${q}Color`])??"#000000"}},G=D("text"),v=D("caption"),F=s.length>1&&s.some(q=>{var ie,L;return(((ie=q.text)==null?void 0:ie.length)??0)>0||(((L=q.caption)==null?void 0:L.length)??0)>0}),A=h.useRef(null),[M,$]=h.useState(0),[N,J]=h.useState(0),ce=e.controls??{mode:"Off",icon:null},re=s.length>1,ge=h.useCallback((q,ie)=>!re||ie===q?q:(R.current&&window.clearTimeout(R.current),I(q),C(!0),R.current=window.setTimeout(()=>{I(null),C(!1),R.current=null},300),ie),[re]),W=h.useCallback(()=>{re&&K(q=>ge(q,(q-1+s.length)%s.length))},[re,ge,s.length]),V=h.useCallback(()=>{re&&K(q=>ge(q,(q+1)%s.length))},[re,ge,s.length]);h.useEffect(()=>{if(!b||!re)return;const q=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),ie=window.setInterval(()=>{K(L=>ge(L,(L+1)%s.length))},q);return()=>{window.clearInterval(ie)}},[b,re,ge,s.length,u]),h.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const Q=(q,ie)=>{var Y,ee,ue,le;const L=ie==null?void 0:ie.textMinHeightPx,f=ie==null?void 0:ie.captionMinHeightPx,O=ie==null?void 0:ie.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[q.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:_.scalingValue(T??0,n??!1)}}),a.jsx("div",{...O&&{"data-testimonial-measure":"text"},style:{...Pe(G,n),...L&&L>0?{minHeight:L}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Rt,{content:q.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:_.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:_.scalingValue(g??0,n??!1),height:_.scalingValue(p??0,n??!1)},children:((Y=q.image)==null?void 0:Y.url)&&a.jsx("img",{src:(ee=q.image)==null?void 0:ee.url,alt:((ue=q.image)==null?void 0:ue.name)??"",className:`${r}-icon`,style:{objectFit:((le=q.image)==null?void 0:le.objectFit)||"contain"}})})]}),q.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:_.scalingValue(S??0,n??!1)}}),a.jsx("div",{...O?{"data-testimonial-measure":"caption"}:{},style:{...Pe(v,n),...f&&f>0?{minHeight:f}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Rt,{content:q.caption})})]})]})},te=h.useCallback(q=>{$(q.maxTextPx),J(q.maxCaptionPx)},[]);if(h.useLayoutEffect(()=>{if(!F){te({maxTextPx:0,maxCaptionPx:0});return}const q=A.current;if(!q)return;const ie=()=>{_.readTestimonialTextMeasure(q,te)};ie();const L=new ResizeObserver(ie);return L.observe(q),()=>{L.disconnect()}},[F,te,t]),!H)return a.jsx(a.Fragment,{});const se=F?{textMinHeightPx:M,captionMinHeightPx:N}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:al(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:_.scalingValue(m??0,n??!1),alignItems:z},children:[F&&a.jsx("div",{ref:A,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((q,ie)=>a.jsx("div",{style:{width:"100%"},children:Q(q,{dataMeasureAttrs:!0})},ie))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[j&&w&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:Q(j,se)}),a.jsx("div",{className:he(`${r}-fade-item-current`,w?`${r}-fade-in`:void 0),children:Q(H,se)})]})]}),ce.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:_.scalingValue(d??.02,n??!1),height:_.scalingValue(d??.02,n??!1),"--arrow-hover-color":y},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:W,disabled:!re,"aria-label":"Previous testimonial",children:ce.icon&&a.jsx(Xe,{url:ce.icon,fill:x,hoverFill:y,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:_.scalingValue(d??.02,n??!1),height:_.scalingValue(d??.02,n??!1),"--arrow-hover-color":y},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:V,disabled:!re,"aria-label":"Next testimonial",children:ce.icon&&a.jsx(Xe,{url:ce.icon,fill:x,hoverFill:y,className:`${r}-arrow-img`})})})]})]})})},ll=`import cn from 'classnames';
3055
+ `}const sl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=k.useScopedStyles(),s=t||[],{autoplay:i,delay:p,align:c,width:d,imageMarginTop:u,textMarginTop:E,captionMarginTop:y,imageWidth:h,imageHeight:l,controlsWidth:m,controlsColor:S,controlsHoverColor:v}=e,x=i==="on"&&!o,[I,G]=g.useState(0),[j,$]=g.useState(null),[C,w]=g.useState(!1),R=g.useRef(null),z=g.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),P=g.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);g.useEffect(()=>{G(0),$(null),w(!1)},[s.length]);const O=s[I],H=j===null?null:s[j],q=M=>{var _,f,V,B,K;return{fontSettings:{fontFamily:(e==null?void 0:e[`${M}FontFamily`])??"Arial",fontWeight:((_=e==null?void 0:e[`${M}FontSettings`])==null?void 0:_.fontWeight)??400,fontStyle:((f=e==null?void 0:e[`${M}FontSettings`])==null?void 0:f.fontStyle)??"normal"},textAppearance:{textTransform:((V=e==null?void 0:e[`${M}TextAppearance`])==null?void 0:V.textTransform)??"none",textDecoration:((B=e==null?void 0:e[`${M}TextAppearance`])==null?void 0:B.textDecoration)??"none",fontVariant:((K=e==null?void 0:e[`${M}TextAppearance`])==null?void 0:K.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${M}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${M}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${M}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${M}WordSpacing`])??0,color:(e==null?void 0:e[`${M}Color`])??"#000000"}},X=q("text"),b=q("caption"),L=s.length>1&&s.some(M=>{var ee,_;return(((ee=M.text)==null?void 0:ee.length)??0)>0||(((_=M.caption)==null?void 0:_.length)??0)>0}),A=g.useRef(null),[F,T]=g.useState(0),[W,J]=g.useState(0),le=e.controls??{mode:"Off",icon:null},oe=s.length>1,me=g.useCallback((M,ee)=>!oe||ee===M?M:(R.current&&window.clearTimeout(R.current),$(M),w(!0),R.current=window.setTimeout(()=>{$(null),w(!1),R.current=null},300),ee),[oe]),N=g.useCallback(()=>{oe&&G(M=>me(M,(M-1+s.length)%s.length))},[oe,me,s.length]),ie=g.useCallback(()=>{oe&&G(M=>me(M,(M+1)%s.length))},[oe,me,s.length]);g.useEffect(()=>{if(!x||!oe)return;const M=Math.max(300,Number.isFinite(p*1e3)?p*1e3:0),ee=window.setInterval(()=>{G(_=>me(_,(_+1)%s.length))},M);return()=>{window.clearInterval(ee)}},[x,oe,me,s.length,p]),g.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const fe=(M,ee)=>{var B,K,re,se;const _=ee==null?void 0:ee.textMinHeightPx,f=ee==null?void 0:ee.captionMinHeightPx,V=ee==null?void 0:ee.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[M.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:k.scalingValue(E??0,n??!1)}}),a.jsx("div",{...V&&{"data-testimonial-measure":"text"},style:{...Pe(X,n),..._&&_>0?{minHeight:_}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Rt,{content:M.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:k.scalingValue(u??0,n??!1)}}),a.jsx("div",{style:{width:k.scalingValue(h??0,n??!1),height:k.scalingValue(l??0,n??!1)},children:((B=M.image)==null?void 0:B.url)&&a.jsx("img",{src:(K=M.image)==null?void 0:K.url,alt:((re=M.image)==null?void 0:re.name)??"",className:`${r}-icon`,style:{objectFit:((se=M.image)==null?void 0:se.objectFit)||"contain"}})})]}),M.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:k.scalingValue(y??0,n??!1)}}),a.jsx("div",{...V?{"data-testimonial-measure":"caption"}:{},style:{...Pe(b,n),...f&&f>0?{minHeight:f}:{},textAlign:P,pointerEvents:"auto"},children:a.jsx(Rt,{content:M.caption})})]})]})},ge=g.useCallback(M=>{T(M.maxTextPx),J(M.maxCaptionPx)},[]);if(g.useLayoutEffect(()=>{if(!L){ge({maxTextPx:0,maxCaptionPx:0});return}const M=A.current;if(!M)return;const ee=()=>{k.readTestimonialTextMeasure(M,ge)};ee();const _=new ResizeObserver(ee);return _.observe(M),()=>{_.disconnect()}},[L,ge,t]),!O)return a.jsx(a.Fragment,{});const Y=L?{textMinHeightPx:F,captionMinHeightPx:W}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:al(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:k.scalingValue(d??0,n??!1),alignItems:z},children:[L&&a.jsx("div",{ref:A,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((M,ee)=>a.jsx("div",{style:{width:"100%"},children:fe(M,{dataMeasureAttrs:!0})},ee))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[H&&C&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:fe(H,Y)}),a.jsx("div",{className:he(`${r}-fade-item-current`,C?`${r}-fade-in`:void 0),children:fe(O,Y)})]})]}),le.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:k.scalingValue(m??.02,n??!1),height:k.scalingValue(m??.02,n??!1),"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:N,disabled:!oe,"aria-label":"Previous testimonial",children:le.icon&&a.jsx(Xe,{url:le.icon,fill:S,hoverFill:v,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:k.scalingValue(m??.02,n??!1),height:k.scalingValue(m??.02,n??!1),"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ie,disabled:!oe,"aria-label":"Next testimonial",children:le.icon&&a.jsx(Xe,{url:le.icon,fill:S,hoverFill:v,className:`${r}-arrow-img`})})})]})]})})},ll=`import cn from 'classnames';
3019
3056
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3020
3057
  import { CommonComponentProps } from '../props';
3021
3058
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3507,4 +3544,4 @@ type TestimonialsSettings = {
3507
3544
  icon?: string | null;
3508
3545
  };
3509
3546
  };
3510
- `,cl="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),ko={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ul={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:cl},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},pl={element:sl,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:ul,sourceCode:ll,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},dl=[Ia,Wa,$s,Ms,Bs,el,il,pl];exports.components=dl;exports.isSchemaV1=xr;
3547
+ `,cl="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Io={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ul={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Io.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:cl},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},pl={element:sl,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:ul,sourceCode:ll,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},dl=[Aa,Na,Ts,Rs,Ds,el,il,pl];exports.components=dl;exports.isSchemaV1=Sr;