@cntrl-site/components 1.0.10 → 1.0.11-alpha.1

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 s=require("react/jsx-runtime"),w=require("react"),ye=require("classnames"),$=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),vr=require("react-dom");function br(e){return e.type==="object"&&e.version===1}const xr="ControlSlider-module__wrapper___sHEkd",Sr="ControlSlider-module__hoverArrow___A-dOH",Cr="ControlSlider-module__sliderItem___QQSkR",wr="ControlSlider-module__sliderImage___9hRl-",$r="ControlSlider-module__arrow___05ghY",Tr="ControlSlider-module__arrowVertical___tBfVN",_r="ControlSlider-module__nextArrow___-30Yc",Er="ControlSlider-module__arrowInner___aEra3",Ar="ControlSlider-module__arrowIcon___S4ztF",kr="ControlSlider-module__arrowImg___2dwJW",Lr="ControlSlider-module__mirror___brd6U",Ir="ControlSlider-module__pagination___bicLF",Fr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Mr="ControlSlider-module__paginationItem___nTRbk",Rr="ControlSlider-module__dot___p1Qun",Wr="ControlSlider-module__activeDot___LHFaj",Nr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Hr="ControlSlider-module__paginationOutsideBottom___14w8D",jr="ControlSlider-module__paginationOutsideTop___SCLqB",zr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",Br="ControlSlider-module__paginationOutsideLeft___lahaw",Dr="ControlSlider-module__paginationOutsideRight___EtuQa",qr="ControlSlider-module__imgWrapper___UjEgB",Ur="ControlSlider-module__captionBlock___dJ6-j",Gr="ControlSlider-module__captionTextWrapper___HFlpf",Yr="ControlSlider-module__captionText___uGBVc",Xr="ControlSlider-module__active___WZK4G",Kr="ControlSlider-module__withPointerEvents___t-18M",Zr="ControlSlider-module__topLeftAlignment___zjnGM",Jr="ControlSlider-module__topCenterAlignment___gD1xW",Qr="ControlSlider-module__topRightAlignment___NMapS",ei="ControlSlider-module__middleLeftAlignment___OnUrY",ti="ControlSlider-module__middleCenterAlignment___Tdkl0",ni="ControlSlider-module__middleRightAlignment___wEbfX",oi="ControlSlider-module__bottomLeftAlignment___cTP2-",ri="ControlSlider-module__bottomCenterAlignment___c54fB",ii="ControlSlider-module__bottomRightAlignment___kEwrz",ai="ControlSlider-module__clickOverlay___DZA28",si="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",J={wrapper:xr,hoverArrow:Sr,sliderItem:Cr,sliderImage:wr,arrow:$r,arrowVertical:Tr,nextArrow:_r,arrowInner:Er,arrowIcon:Ar,arrowImg:kr,mirror:Lr,pagination:Ir,paginationInner:Fr,paginationVertical:Pr,paginationItem:Mr,dot:Rr,activeDot:Wr,paginationInsideBottom:Nr,paginationInsideTop:Vr,paginationOutsideBottom:Hr,paginationOutsideTop:jr,paginationInsideLeft:zr,paginationInsideRight:Or,paginationOutsideLeft:Br,paginationOutsideRight:Dr,imgWrapper:qr,captionBlock:Ur,captionTextWrapper:Gr,captionText:Yr,active:Xr,withPointerEvents:Kr,topLeftAlignment:Zr,topCenterAlignment:Jr,topRightAlignment:Qr,middleLeftAlignment:ei,middleCenterAlignment:ti,middleRightAlignment:ni,bottomLeftAlignment:oi,bottomCenterAlignment:ri,bottomRightAlignment:ii,clickOverlay:ai,contain:si,cover:li};function ci(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 ui(e,t,n){return t&&ci(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,pi=2,yt=3,xt=4,Rt=5,Kt=6,en=7,di={CREATED:mt,MOUNTED:pi,IDLE:yt,MOVING:xt,SCROLLING:Rt,DRAGGING:Kt,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 Ao=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Rn(e)&&an("object",e)}var Mn=Array.isArray,ko=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Rn(e){return e===null}function Lo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return Mn(e)?e:[e]}function ke(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&&ke(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){Be(e,Ze(t)?t.split(" "):t,!0)}function Vt(e,t){ke(t,e.appendChild.bind(e))}function Nn(e,t){ke(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function At(e,t){return Lo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Io(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return At(o,t)}):n}function Ht(e,t){return t?Io(e,t)[0]:e.firstElementChild}var kt=Object.keys;function rt(e,t,n){return e&&(n?kt(e).reverse():kt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Lt(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Xe(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Mn(n)?e[o]=n.slice():Et(n)?e[o]=Xe({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function io(e,t){ke(t||kt(e),function(n){delete e[n]})}function Ne(e,t){ke(e,function(n){ke(t,function(o){n&&n.removeAttribute(o)})})}function le(e,t,n){Et(t)?rt(t,function(o,r){le(e,r,o)}):ke(e,function(o){Rn(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):le(o,t)),n&&Vt(n,o),o}function Ie(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function Fo(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){ke(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return Ht(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Mo(e,t){return e&&e.querySelector(t)}function Vn(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 jt="splide",Hn="data-"+jt;function Tt(e,t){if(!e)throw new Error("["+jt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Ro(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),a=tn(t,n);return o?r<e&&e<a:r<=e&&e<=a}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 An(e,t){return ke(t,function(n){e=e.replace("%s",""+n)}),e}function jn(e){return e<10?"0"+e:""+e}var so={};function mi(e){return""+e+jn(so[e]=(so[e]||0)+1)}function Wo(){var e=[];function t(i,u,c,m){r(i,u,function(l,A,S){var g="addEventListener"in l,p=g?l.removeEventListener.bind(l,A,c,m):l.removeListener.bind(l,c);g?l.addEventListener(A,c,m):l.addListener(c),e.push([l,A,S,c,p])})}function n(i,u,c){r(i,u,function(m,l,A){e=e.filter(function(S){return S[0]===m&&S[1]===l&&S[2]===A&&(!c||S[3]===c)?(S[4](),!1):!0})})}function o(i,u,c){var m,l=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:l,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,l,!1,c)),i.dispatchEvent(m),m}function r(i,u,c){ke(i,function(m){m&&ke(u,function(l){l.split(" ").forEach(function(A){var S=A.split(".");c(m,S[0],S[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var et="mounted",kn="ready",Ge="move",St="moved",zn="click",No="active",Vo="inactive",Ho="visible",jo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",zo="drag",Oo="dragging",Bo="dragged",ln="scroll",st="scrolled",gi="overflow",On="destroy",Do="arrows:mounted",qo="arrows:updated",Uo="pagination:mounted",Go="pagination:updated",Bn="navigation:mounted",Dn="autoplay:play",Yo="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Xo="sk",Ko="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Wo();function o(a,i){n.bind(t,Nt(a).join(" "),function(u){i.apply(i,Mn(u.detail)?u.detail:[])})}function r(a){n.dispatch(t,a,Qe(arguments,1))}return e&&e.event.on(On,n.destroy),Lt(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,a,i=0,u,c=!0,m=0;function l(){if(!c){if(i=e?Je((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++m>=o))return S();u=ro(l)}}function A(h){h||p(),a=r()-(h?i*e:0),c=!1,u=ro(l)}function S(){c=!0}function g(){a=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,c=!0}function d(h){e=h}function x(){return c}return{start:A,rewind:g,pause:S,cancel:p,set:d,isPaused:x}}function fi(e){var t=e;function n(r){t=r}function o(r){return Wn(Nt(r),t)}return{set:n,is:o}}function hi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function yi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Wo(),u=[];function c(){var p=n.mediaQuery==="min";kt(r).sort(function(d,x){return p?+d-+x:+x-+d}).forEach(function(d){l(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),l(a,oo),A()}function m(p){p&&i.destroy()}function l(p,d){var x=matchMedia(d);i.bind(x,"change",A),u.push([p,x])}function A(){var p=o.is(en),d=n.direction,x=u.reduce(function(h,y){return Xe(h,y[1].matches?y[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?Xe(n,a):io(n,kt(a)))}function g(p,d,x){Xe(n,p),d&&Xe(Object.getPrototypeOf(n),p),(x||!o.is(mt))&&e.emit(Te,n)}return{setup:c,destroy:m,reduce:S,set:g}}var un="Arrow",pn=un+"Left",dn=un+"Right",Zo=un+"Up",Jo=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,dn],ArrowRight:[Jo,pn]};function vi(e,t,n){function o(a,i,u){u=u||n.direction;var c=u===lo&&!i?1:u===mn?0:-1;return bn[a]&&bn[a][c]||a.replace(/width|left|right/i,function(m,l){var A=bn[m.toLowerCase()][c]||m;return l>0?A.charAt(0).toUpperCase()+A.slice(1):A})}function r(a){return a*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",bi="disabled",Pe="aria-",zt=Pe+"controls",Qo=Pe+"current",co=Pe+"selected",Ae=Pe+"label",Gn=Pe+"labelledby",er=Pe+"hidden",Yn=Pe+"orientation",Pt=Pe+"roledescription",uo=Pe+"live",po=Pe+"busy",mo=Pe+"atomic",Xn=[qe,ft,bi,zt,Qo,Ae,Gn,er,Yn,Pt],Ve=jt+"__",tt="is-",xn=jt,go=Ve+"track",xi=Ve+"list",gn=Ve+"slide",tr=gn+"--clone",Si=gn+"__container",Kn=Ve+"arrows",fn=Ve+"arrow",nr=fn+"--prev",or=fn+"--next",hn=Ve+"pagination",rr=hn+"__page",Ci=Ve+"progress",wi=Ci+"__bar",$i=Ve+"toggle",Ti=Ve+"spinner",_i=Ve+"sr",Ei=tt+"initialized",at=tt+"active",ir=tt+"prev",ar=tt+"next",Ln=tt+"visible",In=tt+"loading",sr=tt+"focus-in",lr=tt+"overflow",Ai=[at,Ln,ir,ar,In,sr,lr],ki={slide:gn,clone:tr,arrows:Kn,arrow:fn,prev:nr,next:or,pagination:hn,page:rr,spinner:Ti};function Li(e,t){if(ko(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!At(n,t);)n=n.parentElement;return n}var Ii=5,fo=200,cr="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Fi(e,t,n){var o=be(e),r=o.on,a=o.bind,i=e.root,u=n.i18n,c={},m=[],l=[],A=[],S,g,p;function d(){_(),D(),y()}function x(){r(Se,h),r(Se,d),r(Te,y),a(document,cr+" keydown",function(b){p=b.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Be(i,sr,!!p)})}function h(b){var C=Xn.concat("style");Ue(m),De(i,l),De(S,A),Ne([S,g],C),Ne(i,b?C:["style",Pt])}function y(){De(i,l),De(S,A),l=E(xn),A=E(go),We(i,l),We(S,A),le(i,Ae,n.label),le(i,Gn,n.labelledby)}function _(){S=W("."+go),g=Ht(S,"."+xi),Tt(S&&g,"A track/list element is missing."),Zt(m,Io(g,"."+gn+":not(."+tr+")")),rt({arrows:Kn,pagination:hn,prev:nr,next:or,bar:wi,toggle:$i},function(b,C){c[C]=W("."+b)}),Lt(c,{root:i,track:S,list:g,slides:m})}function D(){var b=i.id||mi(jt),C=n.role;i.id=b,S.id=S.id||b+"-track",g.id=g.id||b+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&C&&le(i,qe,C),le(i,Pt,u.carousel),le(g,qe,"presentation")}function W(b){var C=Mo(i,b);return C&&Li(C,"."+xn)===i?C:void 0}function E(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===xn&&at]}return Lt(c,{setup:d,mount:x,destroy:h})}var bt="slide",Ct="loop",Ot="fade";function Pi(e,t,n,o){var r=be(e),a=r.on,i=r.emit,u=r.bind,c=e.Components,m=e.root,l=e.options,A=l.isNavigation,S=l.updateOnMove,g=l.i18n,p=l.pagination,d=l.slideFocus,x=c.Direction.resolve,h=Fe(o,"style"),y=Fe(o,Ae),_=n>-1,D=Ht(o,"."+Si),W;function E(){_||(o.id=m.id+"-slide"+jn(t+1),le(o,qe,p?"tabpanel":"group"),le(o,Pt,g.slide),le(o,Ae,y||An(g.slideLabel,[t+1,e.length]))),b()}function b(){u(o,"click",ve(i,zn,k)),u(o,"keydown",ve(i,Xo,k)),a([St,Ko,st],M),a(Bn,F),S&&a(Ge,j)}function C(){W=!0,r.destroy(),De(o,Ai),Ne(o,Xn),le(o,"style",h),le(o,Ae,y||"")}function F(){var L=e.splides.map(function(T){var R=T.splide.Components.Slides.getAt(t);return R?R.slide.id:""}).join(" ");le(o,Ae,An(g.slideX,(_?n:t)+1)),le(o,zt,L),le(o,qe,d?"button":""),d&&Ne(o,Pt)}function j(){W||M()}function M(){if(!W){var L=e.index;N(),H(),Be(o,ir,t===L-1),Be(o,ar,t===L+1)}}function N(){var L=U();L!==ao(o,at)&&(Be(o,at,L),le(o,Qo,A&&L||""),i(L?No:Vo,k))}function H(){var L=f(),T=!L&&(!U()||_);if(e.state.is([xt,Rt])||le(o,er,T||""),le(Vn(o,l.focusableNodes||""),ft,T?-1:""),d&&le(o,ft,T?-1:0),L!==ao(o,Ln)&&(Be(o,Ln,L),i(L?Ho:jo,k)),!L&&document.activeElement===o){var R=c.Slides.getAt(e.index);R&&Fo(R.slide)}}function B(L,T,R){Ie(R&&D||o,L,T)}function U(){var L=e.index;return L===t||l.cloneStatus&&L===n}function f(){if(e.is(Ot))return U();var L=Ee(c.Elements.track),T=Ee(o),R=x("left",!0),Z=x("right",!0);return nn(L[R])<=Ft(T[R])&&nn(T[Z])<=Ft(L[Z])}function I(L,T){var R=_e(L-t);return!_&&(l.rewind||e.is(Ct))&&(R=Je(R,e.length-R)),R<=T}var k={index:t,slideIndex:n,slide:o,container:D,isClone:_,mount:E,destroy:C,update:M,style:B,isWithin:I};return k}function Mi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=o.bind,u=t.Elements,c=u.slides,m=u.list,l=[];function A(){S(),r(Se,g),r(Se,S)}function S(){c.forEach(function(M,N){d(M,N,-1)})}function g(){W(function(M){M.destroy()}),Ue(l)}function p(){W(function(M){M.update()})}function d(M,N,H){var B=Pi(e,N,H,M);B.mount(),l.push(B),l.sort(function(U,f){return U.index-f.index})}function x(M){return M?E(function(N){return!N.isClone}):l}function h(M){var N=t.Controller,H=N.toIndex(M),B=N.hasFocus()?1:n.perPage;return E(function(U){return Jt(U.index,H,H+B-1)})}function y(M){return E(M)[0]}function _(M,N){ke(M,function(H){if(Ze(H)&&(H=Po(H)),Lo(H)){var B=c[N];B?Nn(H,B):Vt(m,H),We(H,n.classes.slide),C(H,ve(a,vt))}}),a(Se)}function D(M){it(E(M).map(function(N){return N.slide})),a(Se)}function W(M,N){x(N).forEach(M)}function E(M){return l.filter(ko(M)?M:function(N){return Ze(M)?At(N.slide,M):Wn(Nt(M),N.index)})}function b(M,N,H){W(function(B){B.style(M,N,H)})}function C(M,N){var H=Vn(M,"img"),B=H.length;B?H.forEach(function(U){i(U,"load error",function(){--B||N()})}):N()}function F(M){return M?c.length:l.length}function j(){return l.length>n.perPage}return{mount:A,destroy:g,update:p,register:d,get:x,getIn:h,getAt:y,add:_,remove:D,forEach:W,filter:E,style:b,getLength:F,isEnough:j}}function Ri(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,l=m.root,A=m.track,S=m.list,g=u.getAt,p=u.style,d,x,h;function y(){_(),a(window,"resize load",hi(ve(i,vt))),r([Te,Se],_),r(vt,D)}function _(){d=n.direction===mn,Ie(l,"maxWidth",ot(n.width)),Ie(A,c("paddingLeft"),W(!1)),Ie(A,c("paddingRight"),W(!0)),D(!0)}function D(k){var L=Ee(l);(k||x.width!==L.width||x.height!==L.height)&&(Ie(A,"height",E()),p(c("marginRight"),ot(n.gap)),p("width",C()),p("height",F(),!0),x=L,i(sn),h!==(h=I())&&(Be(l,lr,h),i(gi,h)))}function W(k){var L=n.padding,T=c(k?"right":"left");return L&&ot(L[T]||(Et(L)?0:L))||"0px"}function E(){var k="";return d&&(k=b(),Tt(k,"height or heightRatio is missing."),k="calc("+k+" - "+W(!1)+" - "+W(!0)+")"),k}function b(){return ot(n.height||Ee(S).width*n.heightRatio)}function C(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":j())}function F(){return ot(n.fixedHeight)||(d?n.autoHeight?null:j():b())}function j(){var k=ot(n.gap);return"calc((100%"+(k&&" + "+k)+")/"+(n.perPage||1)+(k&&" - "+k)+")"}function M(){return Ee(S)[c("width")]}function N(k,L){var T=g(k||0);return T?Ee(T.slide)[c("width")]+(L?0:U()):0}function H(k,L){var T=g(k);if(T){var R=Ee(T.slide)[c("right")],Z=Ee(S)[c("left")];return _e(R-Z)+(L?0:U())}return 0}function B(k){return H(e.length-1)-H(0)+N(0,k)}function U(){var k=g(0);return k&&parseFloat(Ie(k.slide,c("marginRight")))||0}function f(k){return parseFloat(Ie(A,c("padding"+(k?"Right":"Left"))))||0}function I(){return e.is(Ot)||B(!0)>M()}return{mount:y,resize:D,listSize:M,slideSize:N,sliderSize:B,totalSize:H,getPadding:f,isOverflow:I}}var Wi=2;function Ni(e,t,n){var o=be(e),r=o.on,a=t.Elements,i=t.Slides,u=t.Direction.resolve,c=[],m;function l(){r(Se,A),r([Te,vt],g),(m=x())&&(p(m),t.Layout.resize(!0))}function A(){S(),l()}function S(){it(c),Ue(c),o.destroy()}function g(){var h=x();m!==h&&(m<h||!h)&&o.emit(Se)}function p(h){var y=i.get().slice(),_=y.length;if(_){for(;y.length<h;)Zt(y,y);Zt(y.slice(-h),y.slice(0,h)).forEach(function(D,W){var E=W<h,b=d(D.slide,W);E?Nn(b,y[0].slide):Vt(a.list,b),Zt(c,b),i.register(b,W-h+(E?0:_),D.index)})}}function d(h,y){var _=h.cloneNode(!0);return We(_,n.classes.clone),_.id=e.root.id+"-clone"+jn(y+1),_}function x(){var h=n.clones;if(!e.is(Ct))h=0;else if(Wt(h)){var y=n[u("fixedWidth")]&&t.Layout.slideSize(0),_=y&&Ft(Ee(a.track)[u("width")]/y);h=_||n[u("autoWidth")]&&e.length||n.perPage*Wi}return h}return{mount:l,destroy:S}}function Vi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,l=u.totalSize,A=u.listSize,S=u.sliderSize,g=t.Direction,p=g.resolve,d=g.orient,x=t.Elements,h=x.list,y=x.track,_;function D(){_=t.Transition,r([et,sn,Te,Se],W)}function W(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function E(T,R,Z,ae){T!==R&&k(T>Z)&&(M(),C(j(B(),T>Z),!0)),i(xt),a(Ge,R,Z,T),_.start(R,function(){i(yt),a(St,R,Z,T),ae&&ae()})}function b(T){C(H(T,!0))}function C(T,R){if(!e.is(Ot)){var Z=R?T:F(T);Ie(h,"transform","translate"+p("X")+"("+Z+"px)"),T!==Z&&a(Ko)}}function F(T){if(e.is(Ct)){var R=N(T),Z=R>t.Controller.getEnd(),ae=R<0;(ae||Z)&&(T=j(T,Z))}return T}function j(T,R){var Z=T-I(R),ae=S();return T-=d(ae*(Ft(_e(Z)/ae)||1))*(R?1:-1),T}function M(){C(B(),!0),_.cancel()}function N(T){for(var R=t.Slides.get(),Z=0,ae=1/0,te=0;te<R.length;te++){var ce=R[te].index,P=_e(H(ce,!0)-T);if(P<=ae)ae=P,Z=ce;else break}return Z}function H(T,R){var Z=d(l(T-1)-f(T));return R?U(Z):Z}function B(){var T=p("left");return Ee(h)[T]-Ee(y)[T]+d(m(!1))}function U(T){return n.trimSpace&&e.is(bt)&&(T=pt(T,0,d(S(!0)-A()))),T}function f(T){var R=n.focus;return R==="center"?(A()-c(T,!0))/2:+R*c(T)||0}function I(T){return H(T?t.Controller.getEnd():0,!!n.trimSpace)}function k(T){var R=d(j(B(),T));return T?R>=0:R<=h[p("scrollWidth")]-Ee(y)[p("width")]}function L(T,R){R=Wt(R)?B():R;var Z=T!==!0&&d(R)<d(I(!1)),ae=T!==!1&&d(R)>d(I(!0));return Z||ae}return{mount:D,move:E,jump:b,translate:C,shift:j,cancel:M,toIndex:N,toPosition:H,getPosition:B,getLimit:I,exceededLimit:L,reposition:W}}function Hi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=t.Move,u=i.getPosition,c=i.getLimit,m=i.toPosition,l=t.Slides,A=l.isEnough,S=l.getLength,g=n.omitEnd,p=e.is(Ct),d=e.is(bt),x=ve(B,!1),h=ve(B,!0),y=n.start||0,_,D=y,W,E,b;function C(){F(),r([Te,Se,on],F),r(sn,j)}function F(){W=S(!0),E=n.perMove,b=n.perPage,_=k();var P=pt(y,0,g?_:W-1);P!==y&&(y=P,i.reposition())}function j(){_!==k()&&a(on)}function M(P,ee,fe){if(!ce()){var de=H(P),ge=I(de);ge>-1&&(ee||ge!==y)&&(Z(ge),i.move(de,ge,D,fe))}}function N(P,ee,fe,de){t.Scroll.scroll(P,ee,fe,function(){var ge=I(i.toIndex(u()));Z(g?Je(ge,_):ge),de&&de()})}function H(P){var ee=y;if(Ze(P)){var fe=P.match(/([+\-<>])(\d+)?/)||[],de=fe[1],ge=fe[2];de==="+"||de==="-"?ee=U(y+ +(""+de+(+ge||1)),y):de===">"?ee=ge?L(+ge):x(!0):de==="<"&&(ee=h(!0))}else ee=p?P:pt(P,0,_);return ee}function B(P,ee){var fe=E||(te()?1:b),de=U(y+fe*(P?-1:1),y,!(E||te()));return de===-1&&d&&!Ro(u(),c(!P),1)?P?0:_:ee?de:I(de)}function U(P,ee,fe){if(A()||te()){var de=f(P);de!==P&&(ee=P,P=de,fe=!1),P<0||P>_?!E&&(Jt(0,P,ee,!0)||Jt(_,ee,P,!0))?P=L(T(P)):p?P=fe?P<0?-(W%b||b):W:P:n.rewind?P=P<0?_:0:P=-1:fe&&P!==ee&&(P=L(T(ee)+(P<ee?-1:1)))}else P=-1;return P}function f(P){if(d&&n.trimSpace==="move"&&P!==y)for(var ee=u();ee===m(P,!0)&&Jt(P,0,e.length-1,!n.rewind);)P<y?--P:++P;return P}function I(P){return p?(P+W)%W||0:P}function k(){for(var P=W-(te()||p&&E?1:b);g&&P-- >0;)if(m(W-1,!0)!==m(P,!0)){P++;break}return pt(P,0,W-1)}function L(P){return pt(te()?P:b*P,0,_)}function T(P){return te()?Je(P,_):nn((P>=_?W-1:P)/b)}function R(P){var ee=i.toIndex(P);return d?pt(ee,0,_):ee}function Z(P){P!==y&&(D=y,y=P)}function ae(P){return P?D:y}function te(){return!Wt(n.focus)||n.isNavigation}function ce(){return e.state.is([xt,Rt])&&!!n.waitForTransition}return{mount:C,go:M,scroll:N,getNext:x,getPrev:h,getAdjacent:B,getEnd:k,setIndex:Z,getIndex:ae,toIndex:L,toPage:T,toDest:R,hasFocus:te,isBusy:ce}}var ji="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 Oi(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.emit,u=n.classes,c=n.i18n,m=t.Elements,l=t.Controller,A=m.arrows,S=m.track,g=A,p=m.prev,d=m.next,x,h,y={};function _(){W(),r(Te,D)}function D(){E(),_()}function W(){var N=n.arrows;N&&!(p&&d)&&F(),p&&d&&(Lt(y,{prev:p,next:d}),It(g,N?"":"none"),We(g,h=Kn+"--"+n.direction),N&&(b(),M(),le([p,d],zt,S.id),i(Do,p,d)))}function E(){o.destroy(),De(g,h),x?(it(A?[p,d]:g),p=d=null):Ne([p,d],Xn)}function b(){r([et,St,Se,st,on],M),a(d,"click",ve(C,">")),a(p,"click",ve(C,"<"))}function C(N){l.go(N,!0)}function F(){g=A||gt("div",u.arrows),p=j(!0),d=j(!1),x=!0,Vt(g,[p,d]),!A&&Nn(g,S)}function j(N){var H='<button class="'+u.arrow+" "+(N?u.prev:u.next)+'" type="button"><svg xmlns="'+ji+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||zi)+'" />';return Po(H)}function M(){if(p&&d){var N=e.index,H=l.getPrev(),B=l.getNext(),U=H>-1&&N<H?c.last:c.prev,f=B>-1&&N>B?c.first:c.next;p.disabled=H<0,d.disabled=B<0,le(p,Ae,U),le(d,Ae,f),i(qo,p,d,H,B)}}return{arrows:y,mount:_,destroy:E,update:M}}var Bi=Hn+"-interval";function Di(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),b),c=u.isPaused,m=t.Elements,l=t.Elements,A=l.root,S=l.toggle,g=n.autoplay,p,d,x=g==="pause";function h(){g&&(y(),S&&le(S,zt,m.track.id),x||_(),E())}function y(){n.pauseOnHover&&a(A,"mouseenter mouseleave",function(F){p=F.type==="mouseenter",W()}),n.pauseOnFocus&&a(A,"focusin focusout",function(F){d=F.type==="focusin",W()}),S&&a(S,"click",function(){x?_():D(!0)}),r([Ge,ln,Se],u.rewind),r(Ge,C)}function _(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=x=!1,E(),i(Dn))}function D(F){F===void 0&&(F=!0),x=!!F,E(),c()||(u.pause(),i(qn))}function W(){x||(p||d?D(!1):_())}function E(){S&&(Be(S,at,!x),le(S,Ae,n.i18n[x?"play":"pause"]))}function b(F){var j=m.bar;j&&Ie(j,"width",F*100+"%"),i(Yo,F)}function C(F){var j=t.Slides.getAt(F);u.set(j&&+Fe(j.slide,Bi)||n.interval)}return{mount:h,destroy:u.cancel,play:_,pause:D,isPaused:c}}function qi(e,t,n){var o=be(e),r=o.on;function a(){n.cover&&(r(Un,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(c){t.Slides.forEach(function(m){var l=Ht(m.container||m.slide,"img");l&&l.src&&u(c,l,m)})}function u(c,m,l){l.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),It(m,c?"none":"")}return{mount:a,destroy:ve(i,!1)}}var Ui=10,Gi=600,Yi=.6,Xi=1.5,Ki=800;function Zi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,l=u.exceededLimit,A=u.translate,S=e.is(bt),g,p,d=1;function x(){r(Ge,D),r([Te,Se],W)}function h(b,C,F,j,M){var N=c();if(D(),F&&(!S||!l())){var H=t.Layout.sliderSize(),B=En(b)*H*nn(_e(b)/H)||0;b=u.toPosition(t.Controller.toDest(b%H))+B}var U=Ro(N,b,1);d=1,C=U?0:C||tn(_e(b-N)/Xi,Ki),p=j,g=cn(C,y,ve(_,N,b,M),1),i(Rt),a(ln),g.start()}function y(){i(yt),p&&p(),a(st)}function _(b,C,F,j){var M=c(),N=b+(C-b)*E(j),H=(N-M)*d;A(M+H),S&&!F&&l()&&(d*=Yi,_e(H)<Ui&&h(m(l(!0)),Gi,!1,p,!0))}function D(){g&&g.cancel()}function W(){g&&!g.isPaused()&&(D(),y())}function E(b){var C=n.easingFunc;return C?C(b):1-Math.pow(1-b,4)}return{mount:x,destroy:D,scroll:h,cancel:W}}var dt={passive:!1,capture:!0};function Ji(e,t,n){var o=be(e),r=o.on,a=o.emit,i=o.bind,u=o.unbind,c=e.state,m=t.Move,l=t.Scroll,A=t.Controller,S=t.Elements.track,g=t.Media.reduce,p=t.Direction,d=p.resolve,x=p.orient,h=m.getPosition,y=m.exceededLimit,_,D,W,E,b,C=!1,F,j,M;function N(){i(S,Sn,Tn,dt),i(S,Cn,Tn,dt),i(S,cr,B,dt),i(S,"click",I,{capture:!0}),i(S,"dragstart",Oe),r([et,Te],H)}function H(){var V=n.drag;me(!V),E=V==="free"}function B(V){if(F=!1,!j){var v=ge(V);de(V.target)&&(v||!V.button)&&(A.isBusy()?Oe(V,!0):(M=v?S:window,b=c.is([xt,Rt]),W=null,i(M,Sn,U,dt),i(M,Cn,f,dt),m.cancel(),l.cancel(),k(V)))}}function U(V){if(c.is(Kt)||(c.set(Kt),a(zo)),V.cancelable)if(b){m.translate(_+fe(te(V)));var v=ce(V)>fo,q=C!==(C=y());(v||q)&&k(V),F=!0,a(Oo),Oe(V)}else R(V)&&(b=T(V),Oe(V))}function f(V){c.is(Kt)&&(c.set(yt),a(Bo)),b&&(L(V),Oe(V)),u(M,Sn,U),u(M,Cn,f),b=!1}function I(V){!j&&F&&Oe(V,!0)}function k(V){W=D,D=V,_=h()}function L(V){var v=Z(V),q=ae(v),K=n.rewind&&n.rewindByDrag;g(!1),E?A.scroll(q,0,n.snap):e.is(Ot)?A.go(x(En(v))<0?K?"<":"-":K?">":"+"):e.is(bt)&&C&&K?A.go(y(!0)?">":"<"):A.go(A.toDest(q),!0),g(!0)}function T(V){var v=n.dragMinThreshold,q=Et(v),K=q&&v.mouse||0,Q=(q?v.touch:+v)||10;return _e(te(V))>(ge(V)?Q:K)}function R(V){return _e(te(V))>_e(te(V,!0))}function Z(V){if(e.is(Ct)||!C){var v=ce(V);if(v&&v<fo)return te(V)/v}return 0}function ae(V){return h()+En(V)*Je(_e(V)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(V,v){return ee(V,v)-ee(P(V),v)}function ce(V){return _n(V)-_n(P(V))}function P(V){return D===V&&W||D}function ee(V,v){return(ge(V)?V.changedTouches[0]:V)["page"+d(v?"Y":"X")]}function fe(V){return V/(C&&e.is(bt)?Ii:1)}function de(V){var v=n.noDrag;return!At(V,"."+rr+", ."+fn)&&(!v||!At(V,v))}function ge(V){return typeof TouchEvent<"u"&&V instanceof TouchEvent}function G(){return b}function me(V){j=V}return{mount:N,disable:me,isDragging:G}}var Qi={Spacebar:" ",Right:dn,Left:pn,Up:Zo,Down:Jo};function Zn(e){return e=Ze(e)?e:e.key,Qi[e]||e}var ho="keydown";function ea(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.unbind,u=e.root,c=t.Direction.resolve,m,l;function A(){S(),r(Te,g),r(Te,S),r(Ge,d)}function S(){var h=n.keyboard;h&&(m=h==="global"?window:u,a(m,ho,x))}function g(){i(m,ho)}function p(h){l=h}function d(){var h=l;l=!0,Ao(function(){l=h})}function x(h){if(!l){var y=Zn(h);y===c(pn)?e.go("<"):y===c(dn)&&e.go(">")}}return{mount:A,destroy:g,disable:p}}var _t=Hn+"-lazy",Qt=_t+"-srcset",ta="["+_t+"], ["+Qt+"]";function na(e,t,n){var o=be(e),r=o.on,a=o.off,i=o.bind,u=o.emit,c=n.lazyLoad==="sequential",m=[St,st],l=[];function A(){n.lazyLoad&&(S(),r(Se,S))}function S(){Ue(l),g(),c?h():(a(m),r(m,p),p())}function g(){t.Slides.forEach(function(y){Vn(y.slide,ta).forEach(function(_){var D=Fe(_,_t),W=Fe(_,Qt);if(D!==_.src||W!==_.srcset){var E=n.classes.spinner,b=_.parentElement,C=Ht(b,"."+E)||gt("span",E,b);l.push([_,y,C]),_.src||It(_,"none")}})})}function p(){l=l.filter(function(y){var _=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,_)?d(y):!0}),l.length||a(m)}function d(y){var _=y[0];We(y[1].slide,In),i(_,"load error",ve(x,y)),le(_,"src",Fe(_,_t)),le(_,"srcset",Fe(_,Qt)),Ne(_,_t),Ne(_,Qt)}function x(y,_){var D=y[0],W=y[1];De(W.slide,In),_.type!=="error"&&(it(y[2]),It(D,""),u(Un,D,W),u(vt)),c&&h()}function h(){l.length&&d(l.shift())}return{mount:A,destroy:ve(Ue,l),check:p}}function oa(e,t,n){var o=be(e),r=o.on,a=o.emit,i=o.bind,u=t.Slides,c=t.Elements,m=t.Controller,l=m.hasFocus,A=m.getIndex,S=m.go,g=t.Direction.resolve,p=c.pagination,d=[],x,h;function y(){_(),r([Te,Se,on],y);var j=n.pagination;p&&It(p,j?"":"none"),j&&(r([Ge,ln,st],F),D(),F(),a(Uo,{list:x,items:d},C(e.index)))}function _(){x&&(it(p?Qe(x.children):x),De(x,h),Ue(d),x=null),o.destroy()}function D(){var j=e.length,M=n.classes,N=n.i18n,H=n.perPage,B=l()?m.getEnd()+1:Ft(j/H);x=p||gt("ul",M.pagination,c.track.parentElement),We(x,h=hn+"--"+b()),le(x,qe,"tablist"),le(x,Ae,N.select),le(x,Yn,b()===mn?"vertical":"");for(var U=0;U<B;U++){var f=gt("li",null,x),I=gt("button",{class:M.page,type:"button"},f),k=u.getIn(U).map(function(T){return T.slide.id}),L=!l()&&H>1?N.pageX:N.slideX;i(I,"click",ve(W,U)),n.paginationKeyboard&&i(I,"keydown",ve(E,U)),le(f,qe,"presentation"),le(I,qe,"tab"),le(I,zt,k.join(" ")),le(I,Ae,An(L,U+1)),le(I,ft,-1),d.push({li:f,button:I,page:U})}}function W(j){S(">"+j,!0)}function E(j,M){var N=d.length,H=Zn(M),B=b(),U=-1;H===g(dn,!1,B)?U=++j%N:H===g(pn,!1,B)?U=(--j+N)%N:H==="Home"?U=0:H==="End"&&(U=N-1);var f=d[U];f&&(Fo(f.button),S(">"+U),Oe(M,!0))}function b(){return n.paginationDirection||n.direction}function C(j){return d[m.toPage(j)]}function F(){var j=C(A(!0)),M=C(A());if(j){var N=j.button;De(N,at),Ne(N,co),le(N,ft,-1)}if(M){var H=M.button;We(H,at),le(H,co,!0),le(H,ft,"")}a(Go,{list:x,items:d},j,M)}return{items:d,mount:y,destroy:_,getAt:C,update:F}}var ra=[" ","Enter"];function ia(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&l()}function u(){a.forEach(function(p){p.destroy()}),Ue(a)}function c(){u(),i()}function m(p,d){var x=be(p);x.on(Ge,function(h,y,_){d.go(d.is(Ct)?_:h)}),a.push(x)}function l(){var p=be(e),d=p.on;d(zn,S),d(Xo,g),d([et,Te],A),a.push(p),p.emit(Bn,e.splides)}function A(){le(t.Elements.list,Yn,n.direction===mn?"vertical":"")}function S(p){e.go(p.index)}function g(p,d){Wn(ra,Zn(d))&&(S(p),Oe(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:c}}function aa(e,t,n){var o=be(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(m){if(m.cancelable){var l=m.deltaY,A=l<0,S=_n(m),g=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(l)>g&&S-a>p&&(e.go(A?"<":">"),a=S),c(A)&&Oe(m)}}function c(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var sa=90;function la(e,t,n){var o=be(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",_i),c=cn(sa,ve(l,!1));function m(){i&&(S(!t.Autoplay.isPaused()),le(a,mo,!0),u.textContent="…",r(Dn,ve(S,!0)),r(qn,ve(S,!1)),r([St,st],ve(l,!0)))}function l(g){le(a,po,g),g?(Vt(a,u),c.start()):(it(u),c.cancel())}function A(){Ne(a,[uo,mo,po]),it(u)}function S(g){i&&le(a,uo,g?"off":"polite")}return{mount:m,disable:S,destroy:A}}var ca=Object.freeze({__proto__:null,Media:yi,Direction:vi,Elements:Fi,Slides:Mi,Layout:Ri,Clones:Ni,Move:Vi,Controller:Hi,Arrows:Oi,Autoplay:Di,Cover:qi,Scroll:Zi,Drag:Ji,Keyboard:ea,LazyLoad:na,Pagination:oa,Sync:ia,Wheel:aa,Live:la}),ua={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},pa={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:ki,i18n:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function da(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],a)}function a(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(c)}return{mount:r,start:i,cancel:Tn}}function ma(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,u=ve(Ie,i,"transition"),c;function m(){be(e).bind(i,"transitionend",function(g){g.target===i&&c&&(A(),c())})}function l(g,p){var d=o.toPosition(g,!0),x=o.getPosition(),h=S(g);_e(d-x)>=1&&h>=1?n.useScroll?a.scroll(d,h,!1,p):(u("transform "+h+"ms "+n.easing),o.translate(d,!0),c=p):(o.jump(g),p())}function A(){u(""),a.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:l,cancel:A}}var ga=(function(){function e(n,o){this.event=be(),this.Components={},this.state=fi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Mo(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Xe({label:Fe(r,Ae)||"",labelledby:Fe(r,Gn)||""},pa,e.defaults,o||{});try{Xe(o,JSON.parse(Fe(r,Hn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Xe({},o))}var t=e.prototype;return t.mount=function(o,r){var a=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(Ot)?da:ma),this._E=o||this._E;var c=Lt({},ca,this._E,{Transition:this._T});return rt(c,function(m,l){var A=m(a,u,a._o);u[l]=A,A.setup&&A.setup()}),rt(u,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,Ei),i.set(yt),this.emit(kn),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,a=this.state;return a.is(mt)?be(this).on(kn,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(On),r.destroy(),o&&Ue(this.splides),a.set(en)),this},ui(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=ga;Jn.defaults={};Jn.STATES=di;var yo=[[et,"onMounted"],[kn,"onReady"],[Ge,"onMove"],[St,"onMoved"],[zn,"onClick"],[No,"onActive"],[Vo,"onInactive"],[Ho,"onVisible"],[jo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[zo,"onDrag"],[Oo,"onDragging"],[Bo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[On,"onDestroy"],[Do,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Uo,"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 fa(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ha(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 Pn(e,t){const n=e;return ha(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Pn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var ya=({children:e,className:t,...n})=>w.createElement("div",{className:Qn("splide__track",t),...n},w.createElement("ul",{className:"splide__list"},e)),ur=class extends w.Component{constructor(){super(...arguments),this.splideRef=w.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=Pn({},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=Pn({},e));const t=this.getSlides();fa(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 w.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(a=>a[1])])},n?w.createElement(ya,null,o):o)}},pr=({children:e,className:t,...n})=>w.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"),v=require("react"),ye=require("classnames"),C=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),jo=require("react-dom");function Ii(e){return e.type==="object"&&e.version===1}const Ai="ControlSlider-module__wrapper___sHEkd",Fi="ControlSlider-module__hoverArrow___A-dOH",ki="ControlSlider-module__sliderItem___QQSkR",Wi="ControlSlider-module__sliderImage___9hRl-",Ri="ControlSlider-module__arrow___05ghY",Mi="ControlSlider-module__arrowVertical___tBfVN",Pi="ControlSlider-module__nextArrow___-30Yc",Hi="ControlSlider-module__arrowInner___aEra3",Ni="ControlSlider-module__arrowIcon___S4ztF",Oi="ControlSlider-module__arrowImg___2dwJW",zi="ControlSlider-module__mirror___brd6U",ji="ControlSlider-module__pagination___bicLF",Vi="ControlSlider-module__paginationInner___bT-P-",Bi="ControlSlider-module__paginationVertical___zYqKw",Di="ControlSlider-module__paginationItem___nTRbk",Gi="ControlSlider-module__dot___p1Qun",Ui="ControlSlider-module__activeDot___LHFaj",qi="ControlSlider-module__paginationInsideBottom___R3FWn",Ki="ControlSlider-module__paginationInsideTop___V-qb-",Yi="ControlSlider-module__paginationOutsideBottom___14w8D",Xi="ControlSlider-module__paginationOutsideTop___SCLqB",Zi="ControlSlider-module__paginationInsideLeft___yOBRZ",Ji="ControlSlider-module__paginationInsideRight___Rtt3o",Qi="ControlSlider-module__paginationOutsideLeft___lahaw",er="ControlSlider-module__paginationOutsideRight___EtuQa",tr="ControlSlider-module__imgWrapper___UjEgB",nr="ControlSlider-module__captionBlock___dJ6-j",or="ControlSlider-module__captionTextWrapper___HFlpf",ir="ControlSlider-module__captionText___uGBVc",rr="ControlSlider-module__active___WZK4G",ar="ControlSlider-module__withPointerEvents___t-18M",lr="ControlSlider-module__topLeftAlignment___zjnGM",sr="ControlSlider-module__topCenterAlignment___gD1xW",cr="ControlSlider-module__topRightAlignment___NMapS",pr="ControlSlider-module__middleLeftAlignment___OnUrY",ur="ControlSlider-module__middleCenterAlignment___Tdkl0",dr="ControlSlider-module__middleRightAlignment___wEbfX",mr="ControlSlider-module__bottomLeftAlignment___cTP2-",gr="ControlSlider-module__bottomCenterAlignment___c54fB",hr="ControlSlider-module__bottomRightAlignment___kEwrz",fr="ControlSlider-module__clickOverlay___DZA28",yr="ControlSlider-module__contain___pLyq7",vr="ControlSlider-module__cover___KdDat",Q={wrapper:Ai,hoverArrow:Fi,sliderItem:ki,sliderImage:Wi,arrow:Ri,arrowVertical:Mi,nextArrow:Pi,arrowInner:Hi,arrowIcon:Ni,arrowImg:Oi,mirror:zi,pagination:ji,paginationInner:Vi,paginationVertical:Bi,paginationItem:Di,dot:Gi,activeDot:Ui,paginationInsideBottom:qi,paginationInsideTop:Ki,paginationOutsideBottom:Yi,paginationOutsideTop:Xi,paginationInsideLeft:Zi,paginationInsideRight:Ji,paginationOutsideLeft:Qi,paginationOutsideRight:er,imgWrapper:tr,captionBlock:nr,captionTextWrapper:or,captionText:ir,active:rr,withPointerEvents:ar,topLeftAlignment:lr,topCenterAlignment:sr,topRightAlignment:cr,middleLeftAlignment:pr,middleCenterAlignment:ur,middleRightAlignment:dr,bottomLeftAlignment:mr,bottomCenterAlignment:gr,bottomRightAlignment:hr,clickOverlay:fr,contain:yr,cover:vr};function br(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 xr(e,t,n){return t&&br(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var mo="(prefers-reduced-motion: reduce)",wt=1,Sr=2,Lt=3,At=4,Dt=5,on=6,sn=7,Cr={CREATED:wt,MOUNTED:Sr,IDLE:Lt,MOVING:At,SCROLLING:Dt,DRAGGING:on,DESTROYED:sn};function et(e){e.length=0}function ct(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(ct(arguments,1)))}var Vo=setTimeout,kn=function(){};function go(e){return requestAnimationFrame(e)}function mn(e,t){return typeof t===e}function Pt(e){return!Bn(e)&&mn("object",e)}var Vn=Array.isArray,Bo=ve(mn,"function"),lt=ve(mn,"string"),Gt=ve(mn,"undefined");function Bn(e){return e===null}function Do(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ut(e){return Vn(e)?e:[e]}function Me(e,t){Ut(e).forEach(t)}function Dn(e,t){return e.indexOf(t)>-1}function rn(e,t){return e.push.apply(e,Ut(t)),e}function Xe(e,t,n){e&&Me(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function Be(e,t){Xe(e,lt(t)?t.split(" "):t,!0)}function qt(e,t){Me(t,e.appendChild.bind(e))}function Gn(e,t){Me(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Ht(e,t){return Do(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Go(e,t){var n=e?ct(e.children):[];return t?n.filter(function(o){return Ht(o,t)}):n}function Kt(e,t){return t?Go(e,t)[0]:e.firstElementChild}var Nt=Object.keys;function ht(e,t,n){return e&&(n?Nt(e).reverse():Nt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Ot(e){return ct(arguments,1).forEach(function(t){ht(t,function(n,o){e[o]=t[o]})}),e}function rt(e){return ct(arguments,1).forEach(function(t){ht(t,function(n,o){Vn(n)?e[o]=n.slice():Pt(n)?e[o]=rt({},Pt(e[o])?e[o]:{},n):e[o]=n})}),e}function ho(e,t){Me(t||Nt(e),function(n){delete e[n]})}function De(e,t){Me(e,function(n){Me(t,function(o){n&&n.removeAttribute(o)})})}function ce(e,t,n){Pt(t)?ht(t,function(o,i){ce(e,i,o)}):Me(e,function(o){Bn(n)||n===""?De(o,t):o.setAttribute(t,String(n))})}function Tt(e,t,n){var o=document.createElement(e);return t&&(lt(t)?Be(o,t):ce(o,t)),n&&qt(n,o),o}function Ne(e,t,n){if(Gt(n))return getComputedStyle(e)[t];Bn(n)||(e.style[t]=""+n)}function zt(e,t){Ne(e,"display",t)}function Uo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Oe(e,t){return e.getAttribute(t)}function fo(e,t){return e&&e.classList.contains(t)}function We(e){return e.getBoundingClientRect()}function ft(e){Me(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function qo(e){return Kt(new DOMParser().parseFromString(e,"text/html").body)}function Ye(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ko(e,t){return e&&e.querySelector(t)}function Un(e,t){return t?ct(e.querySelectorAll(t)):[]}function Ze(e,t){Xe(e,t,!1)}function Wn(e){return e.timeStamp}function mt(e){return lt(e)?e:e?e+"px":""}var Yt="splide",qn="data-"+Yt;function Rt(e,t){if(!e)throw new Error("["+Yt+"] "+(t||""))}var st=Math.min,cn=Math.max,pn=Math.floor,jt=Math.ceil,Ee=Math.abs;function Yo(e,t,n){return Ee(e-t)<n}function an(e,t,n,o){var i=st(t,n),l=cn(t,n);return o?i<e&&e<l:i<=e&&e<=l}function Ct(e,t,n){var o=st(t,n),i=cn(t,n);return st(cn(o,e),i)}function Rn(e){return+(e>0)-+(e<0)}function Mn(e,t){return Me(t,function(n){e=e.replace("%s",""+n)}),e}function Kn(e){return e<10?"0"+e:""+e}var yo={};function $r(e){return""+e+Kn(yo[e]=(yo[e]||0)+1)}function Xo(){var e=[];function t(r,s,p,d){i(r,s,function(c,L,S){var h="addEventListener"in c,u=h?c.removeEventListener.bind(c,L,p,d):c.removeListener.bind(c,p);h?c.addEventListener(L,p,d):c.addListener(p),e.push([c,L,S,p,u])})}function n(r,s,p){i(r,s,function(d,c,L){e=e.filter(function(S){return S[0]===d&&S[1]===c&&S[2]===L&&(!p||S[3]===p)?(S[4](),!1):!0})})}function o(r,s,p){var d,c=!0;return typeof CustomEvent=="function"?d=new CustomEvent(s,{bubbles:c,detail:p}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(s,c,!1,p)),r.dispatchEvent(d),d}function i(r,s,p){Me(r,function(d){d&&Me(s,function(c){c.split(" ").forEach(function(L){var S=L.split(".");p(d,S[0],S[1])})})})}function l(){e.forEach(function(r){r[4]()}),et(e)}return{bind:t,unbind:n,dispatch:o,destroy:l}}var pt="mounted",Pn="ready",tt="move",Ft="moved",Yn="click",Zo="active",Jo="inactive",Qo="visible",ei="hidden",we="refresh",_e="updated",Et="resize",gn="resized",ti="drag",ni="dragging",oi="dragged",hn="scroll",vt="scrolled",wr="overflow",Xn="destroy",ii="arrows:mounted",ri="arrows:updated",ai="pagination:mounted",li="pagination:updated",Zn="navigation:mounted",Jn="autoplay:play",si="autoplay:playing",Qn="autoplay:pause",eo="lazyload:loaded",ci="sk",pi="sh",un="ei";function Se(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Xo();function o(l,r){n.bind(t,Ut(l).join(" "),function(s){r.apply(r,Vn(s.detail)?s.detail:[])})}function i(l){n.dispatch(t,l,ct(arguments,1))}return e&&e.event.on(Xn,n.destroy),Ot(n,{bus:t,on:o,off:ve(n.unbind,t),emit:i})}function fn(e,t,n,o){var i=Date.now,l,r=0,s,p=!0,d=0;function c(){if(!p){if(r=e?st((i()-l)/e,1):1,n&&n(r),r>=1&&(t(),l=i(),o&&++d>=o))return S();s=go(c)}}function L(y){y||u(),l=i()-(y?r*e:0),p=!1,s=go(c)}function S(){p=!0}function h(){l=i(),r=0,n&&n(r)}function u(){s&&cancelAnimationFrame(s),r=0,s=0,p=!0}function m(y){e=y}function w(){return p}return{start:L,rewind:h,pause:S,cancel:u,set:m,isPaused:w}}function Tr(e){var t=e;function n(i){t=i}function o(i){return Dn(Ut(i),t)}return{set:n,is:o}}function _r(e,t){var n=fn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Lr(e,t,n){var o=e.state,i=n.breakpoints||{},l=n.reducedMotion||{},r=Xo(),s=[];function p(){var u=n.mediaQuery==="min";Nt(i).sort(function(m,w){return u?+m-+w:+w-+m}).forEach(function(m){c(i[m],"("+(u?"min":"max")+"-width:"+m+"px)")}),c(l,mo),L()}function d(u){u&&r.destroy()}function c(u,m){var w=matchMedia(m);r.bind(w,"change",L),s.push([u,w])}function L(){var u=o.is(sn),m=n.direction,w=s.reduce(function(y,x){return rt(y,x[1].matches?x[0]:{})},{});ho(n),h(w),n.destroy?e.destroy(n.destroy==="completely"):u?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function S(u){matchMedia(mo).matches&&(u?rt(n,l):ho(n,Nt(l)))}function h(u,m,w){rt(n,u),m&&rt(Object.getPrototypeOf(n),u),(w||!o.is(wt))&&e.emit(_e,n)}return{setup:p,destroy:d,reduce:S,set:h}}var yn="Arrow",vn=yn+"Left",bn=yn+"Right",ui=yn+"Up",di=yn+"Down",vo="rtl",xn="ttb",Tn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[ui,bn],ArrowRight:[di,vn]};function Er(e,t,n){function o(l,r,s){s=s||n.direction;var p=s===vo&&!r?1:s===xn?0:-1;return Tn[l]&&Tn[l][p]||l.replace(/width|left|right/i,function(d,c){var L=Tn[d.toLowerCase()][p]||d;return c>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function i(l){return l*(n.direction===vo?1:-1)}return{resolve:o,orient:i}}var Je="role",_t="tabindex",Ir="disabled",ze="aria-",Xt=ze+"controls",mi=ze+"current",bo=ze+"selected",Re=ze+"label",to=ze+"labelledby",gi=ze+"hidden",no=ze+"orientation",Vt=ze+"roledescription",xo=ze+"live",So=ze+"busy",Co=ze+"atomic",oo=[Je,_t,Ir,Xt,mi,Re,to,gi,no,Vt],Ge=Yt+"__",ut="is-",_n=Yt,$o=Ge+"track",Ar=Ge+"list",Sn=Ge+"slide",hi=Sn+"--clone",Fr=Sn+"__container",io=Ge+"arrows",Cn=Ge+"arrow",fi=Cn+"--prev",yi=Cn+"--next",$n=Ge+"pagination",vi=$n+"__page",kr=Ge+"progress",Wr=kr+"__bar",Rr=Ge+"toggle",Mr=Ge+"spinner",Pr=Ge+"sr",Hr=ut+"initialized",yt=ut+"active",bi=ut+"prev",xi=ut+"next",Hn=ut+"visible",Nn=ut+"loading",Si=ut+"focus-in",Ci=ut+"overflow",Nr=[yt,Hn,bi,xi,Nn,Si,Ci],Or={slide:Sn,clone:hi,arrows:io,arrow:Cn,prev:fi,next:yi,pagination:$n,page:vi,spinner:Mr};function zr(e,t){if(Bo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ht(n,t);)n=n.parentElement;return n}var jr=5,wo=200,$i="touchstart mousedown",Ln="touchmove mousemove",En="touchend touchcancel mouseup click";function Vr(e,t,n){var o=Se(e),i=o.on,l=o.bind,r=e.root,s=n.i18n,p={},d=[],c=[],L=[],S,h,u;function m(){_(),V(),x()}function w(){i(we,y),i(we,m),i(_e,x),l(document,$i+" keydown",function(g){u=g.type==="keydown"},{capture:!0}),l(r,"focusin",function(){Xe(r,Si,!!u)})}function y(g){var f=oo.concat("style");et(d),Ze(r,c),Ze(S,L),De([S,h],f),De(r,g?f:["style",Vt])}function x(){Ze(r,c),Ze(S,L),c=T(_n),L=T($o),Be(r,c),Be(S,L),ce(r,Re,n.label),ce(r,to,n.labelledby)}function _(){S=k("."+$o),h=Kt(S,"."+Ar),Rt(S&&h,"A track/list element is missing."),rn(d,Go(h,"."+Sn+":not(."+hi+")")),ht({arrows:io,pagination:$n,prev:fi,next:yi,bar:Wr,toggle:Rr},function(g,f){p[f]=k("."+g)}),Ot(p,{root:r,track:S,list:h,slides:d})}function V(){var g=r.id||$r(Yt),f=n.role;r.id=g,S.id=S.id||g+"-track",h.id=h.id||g+"-list",!Oe(r,Je)&&r.tagName!=="SECTION"&&f&&ce(r,Je,f),ce(r,Vt,s.carousel),ce(h,Je,"presentation")}function k(g){var f=Ko(r,g);return f&&zr(f,"."+_n)===r?f:void 0}function T(g){return[g+"--"+n.type,g+"--"+n.direction,n.drag&&g+"--draggable",n.isNavigation&&g+"--nav",g===_n&&yt]}return Ot(p,{setup:m,mount:w,destroy:y})}var It="slide",kt="loop",Zt="fade";function Br(e,t,n,o){var i=Se(e),l=i.on,r=i.emit,s=i.bind,p=e.Components,d=e.root,c=e.options,L=c.isNavigation,S=c.updateOnMove,h=c.i18n,u=c.pagination,m=c.slideFocus,w=p.Direction.resolve,y=Oe(o,"style"),x=Oe(o,Re),_=n>-1,V=Kt(o,"."+Fr),k;function T(){_||(o.id=d.id+"-slide"+Kn(t+1),ce(o,Je,u?"tabpanel":"group"),ce(o,Vt,h.slide),ce(o,Re,x||Mn(h.slideLabel,[t+1,e.length]))),g()}function g(){s(o,"click",ve(r,Yn,F)),s(o,"keydown",ve(r,ci,F)),l([Ft,pi,vt],A),l(Zn,E),S&&l(tt,z)}function f(){k=!0,i.destroy(),Ze(o,Nr),De(o,oo),ce(o,"style",y),ce(o,Re,x||"")}function E(){var W=e.splides.map(function(I){var H=I.splide.Components.Slides.getAt(t);return H?H.slide.id:""}).join(" ");ce(o,Re,Mn(h.slideX,(_?n:t)+1)),ce(o,Xt,W),ce(o,Je,m?"button":""),m&&De(o,Vt)}function z(){k||A()}function A(){if(!k){var W=e.index;N(),O(),Xe(o,bi,t===W-1),Xe(o,xi,t===W+1)}}function N(){var W=G();W!==fo(o,yt)&&(Xe(o,yt,W),ce(o,mi,L&&W||""),r(W?Zo:Jo,F))}function O(){var W=b(),I=!W&&(!G()||_);if(e.state.is([At,Dt])||ce(o,gi,I||""),ce(Un(o,c.focusableNodes||""),_t,I?-1:""),m&&ce(o,_t,I?-1:0),W!==fo(o,Hn)&&(Xe(o,Hn,W),r(W?Qo:ei,F)),!W&&document.activeElement===o){var H=p.Slides.getAt(e.index);H&&Uo(H.slide)}}function B(W,I,H){Ne(H&&V||o,W,I)}function G(){var W=e.index;return W===t||c.cloneStatus&&W===n}function b(){if(e.is(Zt))return G();var W=We(p.Elements.track),I=We(o),H=w("left",!0),Z=w("right",!0);return pn(W[H])<=jt(I[H])&&pn(I[Z])<=jt(W[Z])}function R(W,I){var H=Ee(W-t);return!_&&(c.rewind||e.is(kt))&&(H=st(H,e.length-H)),H<=I}var F={index:t,slideIndex:n,slide:o,container:V,isClone:_,mount:T,destroy:f,update:A,style:B,isWithin:R};return F}function Dr(e,t,n){var o=Se(e),i=o.on,l=o.emit,r=o.bind,s=t.Elements,p=s.slides,d=s.list,c=[];function L(){S(),i(we,h),i(we,S)}function S(){p.forEach(function(A,N){m(A,N,-1)})}function h(){k(function(A){A.destroy()}),et(c)}function u(){k(function(A){A.update()})}function m(A,N,O){var B=Br(e,N,O,A);B.mount(),c.push(B),c.sort(function(G,b){return G.index-b.index})}function w(A){return A?T(function(N){return!N.isClone}):c}function y(A){var N=t.Controller,O=N.toIndex(A),B=N.hasFocus()?1:n.perPage;return T(function(G){return an(G.index,O,O+B-1)})}function x(A){return T(A)[0]}function _(A,N){Me(A,function(O){if(lt(O)&&(O=qo(O)),Do(O)){var B=p[N];B?Gn(O,B):qt(d,O),Be(O,n.classes.slide),f(O,ve(l,Et))}}),l(we)}function V(A){ft(T(A).map(function(N){return N.slide})),l(we)}function k(A,N){w(N).forEach(A)}function T(A){return c.filter(Bo(A)?A:function(N){return lt(A)?Ht(N.slide,A):Dn(Ut(A),N.index)})}function g(A,N,O){k(function(B){B.style(A,N,O)})}function f(A,N){var O=Un(A,"img"),B=O.length;B?O.forEach(function(G){r(G,"load error",function(){--B||N()})}):N()}function E(A){return A?p.length:c.length}function z(){return c.length>n.perPage}return{mount:L,destroy:h,update:u,register:m,get:w,getIn:y,getAt:x,add:_,remove:V,forEach:k,filter:T,style:g,getLength:E,isEnough:z}}function Gr(e,t,n){var o=Se(e),i=o.on,l=o.bind,r=o.emit,s=t.Slides,p=t.Direction.resolve,d=t.Elements,c=d.root,L=d.track,S=d.list,h=s.getAt,u=s.style,m,w,y;function x(){_(),l(window,"resize load",_r(ve(r,Et))),i([_e,we],_),i(Et,V)}function _(){m=n.direction===xn,Ne(c,"maxWidth",mt(n.width)),Ne(L,p("paddingLeft"),k(!1)),Ne(L,p("paddingRight"),k(!0)),V(!0)}function V(F){var W=We(c);(F||w.width!==W.width||w.height!==W.height)&&(Ne(L,"height",T()),u(p("marginRight"),mt(n.gap)),u("width",f()),u("height",E(),!0),w=W,r(gn),y!==(y=R())&&(Xe(c,Ci,y),r(wr,y)))}function k(F){var W=n.padding,I=p(F?"right":"left");return W&&mt(W[I]||(Pt(W)?0:W))||"0px"}function T(){var F="";return m&&(F=g(),Rt(F,"height or heightRatio is missing."),F="calc("+F+" - "+k(!1)+" - "+k(!0)+")"),F}function g(){return mt(n.height||We(S).width*n.heightRatio)}function f(){return n.autoWidth?null:mt(n.fixedWidth)||(m?"":z())}function E(){return mt(n.fixedHeight)||(m?n.autoHeight?null:z():g())}function z(){var F=mt(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function A(){return We(S)[p("width")]}function N(F,W){var I=h(F||0);return I?We(I.slide)[p("width")]+(W?0:G()):0}function O(F,W){var I=h(F);if(I){var H=We(I.slide)[p("right")],Z=We(S)[p("left")];return Ee(H-Z)+(W?0:G())}return 0}function B(F){return O(e.length-1)-O(0)+N(0,F)}function G(){var F=h(0);return F&&parseFloat(Ne(F.slide,p("marginRight")))||0}function b(F){return parseFloat(Ne(L,p("padding"+(F?"Right":"Left"))))||0}function R(){return e.is(Zt)||B(!0)>A()}return{mount:x,resize:V,listSize:A,slideSize:N,sliderSize:B,totalSize:O,getPadding:b,isOverflow:R}}var Ur=2;function qr(e,t,n){var o=Se(e),i=o.on,l=t.Elements,r=t.Slides,s=t.Direction.resolve,p=[],d;function c(){i(we,L),i([_e,Et],h),(d=w())&&(u(d),t.Layout.resize(!0))}function L(){S(),c()}function S(){ft(p),et(p),o.destroy()}function h(){var y=w();d!==y&&(d<y||!y)&&o.emit(we)}function u(y){var x=r.get().slice(),_=x.length;if(_){for(;x.length<y;)rn(x,x);rn(x.slice(-y),x.slice(0,y)).forEach(function(V,k){var T=k<y,g=m(V.slide,k);T?Gn(g,x[0].slide):qt(l.list,g),rn(p,g),r.register(g,k-y+(T?0:_),V.index)})}}function m(y,x){var _=y.cloneNode(!0);return Be(_,n.classes.clone),_.id=e.root.id+"-clone"+Kn(x+1),_}function w(){var y=n.clones;if(!e.is(kt))y=0;else if(Gt(y)){var x=n[s("fixedWidth")]&&t.Layout.slideSize(0),_=x&&jt(We(l.track)[s("width")]/x);y=_||n[s("autoWidth")]&&e.length||n.perPage*Ur}return y}return{mount:c,destroy:S}}function Kr(e,t,n){var o=Se(e),i=o.on,l=o.emit,r=e.state.set,s=t.Layout,p=s.slideSize,d=s.getPadding,c=s.totalSize,L=s.listSize,S=s.sliderSize,h=t.Direction,u=h.resolve,m=h.orient,w=t.Elements,y=w.list,x=w.track,_;function V(){_=t.Transition,i([pt,gn,_e,we],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),g(e.index),t.Slides.update())}function T(I,H,Z,le){I!==H&&F(I>Z)&&(A(),f(z(B(),I>Z),!0)),r(At),l(tt,H,Z,I),_.start(H,function(){r(Lt),l(Ft,H,Z,I),le&&le()})}function g(I){f(O(I,!0))}function f(I,H){if(!e.is(Zt)){var Z=H?I:E(I);Ne(y,"transform","translate"+u("X")+"("+Z+"px)"),I!==Z&&l(pi)}}function E(I){if(e.is(kt)){var H=N(I),Z=H>t.Controller.getEnd(),le=H<0;(le||Z)&&(I=z(I,Z))}return I}function z(I,H){var Z=I-R(H),le=S();return I-=m(le*(jt(Ee(Z)/le)||1))*(H?1:-1),I}function A(){f(B(),!0),_.cancel()}function N(I){for(var H=t.Slides.get(),Z=0,le=1/0,te=0;te<H.length;te++){var pe=H[te].index,P=Ee(O(pe,!0)-I);if(P<=le)le=P,Z=pe;else break}return Z}function O(I,H){var Z=m(c(I-1)-b(I));return H?G(Z):Z}function B(){var I=u("left");return We(y)[I]-We(x)[I]+m(d(!1))}function G(I){return n.trimSpace&&e.is(It)&&(I=Ct(I,0,m(S(!0)-L()))),I}function b(I){var H=n.focus;return H==="center"?(L()-p(I,!0))/2:+H*p(I)||0}function R(I){return O(I?t.Controller.getEnd():0,!!n.trimSpace)}function F(I){var H=m(z(B(),I));return I?H>=0:H<=y[u("scrollWidth")]-We(x)[u("width")]}function W(I,H){H=Gt(H)?B():H;var Z=I!==!0&&m(H)<m(R(!1)),le=I!==!1&&m(H)>m(R(!0));return Z||le}return{mount:V,move:T,jump:g,translate:f,shift:z,cancel:A,toIndex:N,toPosition:O,getPosition:B,getLimit:R,exceededLimit:W,reposition:k}}function Yr(e,t,n){var o=Se(e),i=o.on,l=o.emit,r=t.Move,s=r.getPosition,p=r.getLimit,d=r.toPosition,c=t.Slides,L=c.isEnough,S=c.getLength,h=n.omitEnd,u=e.is(kt),m=e.is(It),w=ve(B,!1),y=ve(B,!0),x=n.start||0,_,V=x,k,T,g;function f(){E(),i([_e,we,un],E),i(gn,z)}function E(){k=S(!0),T=n.perMove,g=n.perPage,_=F();var P=Ct(x,0,h?_:k-1);P!==x&&(x=P,r.reposition())}function z(){_!==F()&&l(un)}function A(P,ee,he){if(!pe()){var me=O(P),ge=R(me);ge>-1&&(ee||ge!==x)&&(Z(ge),r.move(me,ge,V,he))}}function N(P,ee,he,me){t.Scroll.scroll(P,ee,he,function(){var ge=R(r.toIndex(s()));Z(h?st(ge,_):ge),me&&me()})}function O(P){var ee=x;if(lt(P)){var he=P.match(/([+\-<>])(\d+)?/)||[],me=he[1],ge=he[2];me==="+"||me==="-"?ee=G(x+ +(""+me+(+ge||1)),x):me===">"?ee=ge?W(+ge):w(!0):me==="<"&&(ee=y(!0))}else ee=u?P:Ct(P,0,_);return ee}function B(P,ee){var he=T||(te()?1:g),me=G(x+he*(P?-1:1),x,!(T||te()));return me===-1&&m&&!Yo(s(),p(!P),1)?P?0:_:ee?me:R(me)}function G(P,ee,he){if(L()||te()){var me=b(P);me!==P&&(ee=P,P=me,he=!1),P<0||P>_?!T&&(an(0,P,ee,!0)||an(_,ee,P,!0))?P=W(I(P)):u?P=he?P<0?-(k%g||g):k:P:n.rewind?P=P<0?_:0:P=-1:he&&P!==ee&&(P=W(I(ee)+(P<ee?-1:1)))}else P=-1;return P}function b(P){if(m&&n.trimSpace==="move"&&P!==x)for(var ee=s();ee===d(P,!0)&&an(P,0,e.length-1,!n.rewind);)P<x?--P:++P;return P}function R(P){return u?(P+k)%k||0:P}function F(){for(var P=k-(te()||u&&T?1:g);h&&P-- >0;)if(d(k-1,!0)!==d(P,!0)){P++;break}return Ct(P,0,k-1)}function W(P){return Ct(te()?P:g*P,0,_)}function I(P){return te()?st(P,_):pn((P>=_?k-1:P)/g)}function H(P){var ee=r.toIndex(P);return m?Ct(ee,0,_):ee}function Z(P){P!==x&&(V=x,x=P)}function le(P){return P?V:x}function te(){return!Gt(n.focus)||n.isNavigation}function pe(){return e.state.is([At,Dt])&&!!n.waitForTransition}return{mount:f,go:A,scroll:N,getNext:w,getPrev:y,getAdjacent:B,getEnd:F,setIndex:Z,getIndex:le,toIndex:W,toPage:I,toDest:H,hasFocus:te,isBusy:pe}}var Xr="http://www.w3.org/2000/svg",Zr="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",Jt=40;function Jr(e,t,n){var o=Se(e),i=o.on,l=o.bind,r=o.emit,s=n.classes,p=n.i18n,d=t.Elements,c=t.Controller,L=d.arrows,S=d.track,h=L,u=d.prev,m=d.next,w,y,x={};function _(){k(),i(_e,V)}function V(){T(),_()}function k(){var N=n.arrows;N&&!(u&&m)&&E(),u&&m&&(Ot(x,{prev:u,next:m}),zt(h,N?"":"none"),Be(h,y=io+"--"+n.direction),N&&(g(),A(),ce([u,m],Xt,S.id),r(ii,u,m)))}function T(){o.destroy(),Ze(h,y),w?(ft(L?[u,m]:h),u=m=null):De([u,m],oo)}function g(){i([pt,Ft,we,vt,un],A),l(m,"click",ve(f,">")),l(u,"click",ve(f,"<"))}function f(N){c.go(N,!0)}function E(){h=L||Tt("div",s.arrows),u=z(!0),m=z(!1),w=!0,qt(h,[u,m]),!L&&Gn(h,S)}function z(N){var O='<button class="'+s.arrow+" "+(N?s.prev:s.next)+'" type="button"><svg xmlns="'+Xr+'" viewBox="0 0 '+Jt+" "+Jt+'" width="'+Jt+'" height="'+Jt+'" focusable="false"><path d="'+(n.arrowPath||Zr)+'" />';return qo(O)}function A(){if(u&&m){var N=e.index,O=c.getPrev(),B=c.getNext(),G=O>-1&&N<O?p.last:p.prev,b=B>-1&&N>B?p.first:p.next;u.disabled=O<0,m.disabled=B<0,ce(u,Re,G),ce(m,Re,b),r(ri,u,m,O,B)}}return{arrows:x,mount:_,destroy:T,update:A}}var Qr=qn+"-interval";function ea(e,t,n){var o=Se(e),i=o.on,l=o.bind,r=o.emit,s=fn(n.interval,e.go.bind(e,">"),g),p=s.isPaused,d=t.Elements,c=t.Elements,L=c.root,S=c.toggle,h=n.autoplay,u,m,w=h==="pause";function y(){h&&(x(),S&&ce(S,Xt,d.track.id),w||_(),T())}function x(){n.pauseOnHover&&l(L,"mouseenter mouseleave",function(E){u=E.type==="mouseenter",k()}),n.pauseOnFocus&&l(L,"focusin focusout",function(E){m=E.type==="focusin",k()}),S&&l(S,"click",function(){w?_():V(!0)}),i([tt,hn,we],s.rewind),i(tt,f)}function _(){p()&&t.Slides.isEnough()&&(s.start(!n.resetProgress),m=u=w=!1,T(),r(Jn))}function V(E){E===void 0&&(E=!0),w=!!E,T(),p()||(s.pause(),r(Qn))}function k(){w||(u||m?V(!1):_())}function T(){S&&(Xe(S,yt,!w),ce(S,Re,n.i18n[w?"play":"pause"]))}function g(E){var z=d.bar;z&&Ne(z,"width",E*100+"%"),r(si,E)}function f(E){var z=t.Slides.getAt(E);s.set(z&&+Oe(z.slide,Qr)||n.interval)}return{mount:y,destroy:s.cancel,play:_,pause:V,isPaused:p}}function ta(e,t,n){var o=Se(e),i=o.on;function l(){n.cover&&(i(eo,ve(s,!0)),i([pt,_e,we],ve(r,!0)))}function r(p){t.Slides.forEach(function(d){var c=Kt(d.container||d.slide,"img");c&&c.src&&s(p,c,d)})}function s(p,d,c){c.style("background",p?'center/cover no-repeat url("'+d.src+'")':"",!0),zt(d,p?"none":"")}return{mount:l,destroy:ve(r,!1)}}var na=10,oa=600,ia=.6,ra=1.5,aa=800;function la(e,t,n){var o=Se(e),i=o.on,l=o.emit,r=e.state.set,s=t.Move,p=s.getPosition,d=s.getLimit,c=s.exceededLimit,L=s.translate,S=e.is(It),h,u,m=1;function w(){i(tt,V),i([_e,we],k)}function y(g,f,E,z,A){var N=p();if(V(),E&&(!S||!c())){var O=t.Layout.sliderSize(),B=Rn(g)*O*pn(Ee(g)/O)||0;g=s.toPosition(t.Controller.toDest(g%O))+B}var G=Yo(N,g,1);m=1,f=G?0:f||cn(Ee(g-N)/ra,aa),u=z,h=fn(f,x,ve(_,N,g,A),1),r(Dt),l(hn),h.start()}function x(){r(Lt),u&&u(),l(vt)}function _(g,f,E,z){var A=p(),N=g+(f-g)*T(z),O=(N-A)*m;L(A+O),S&&!E&&c()&&(m*=ia,Ee(O)<na&&y(d(c(!0)),oa,!1,u,!0))}function V(){h&&h.cancel()}function k(){h&&!h.isPaused()&&(V(),x())}function T(g){var f=n.easingFunc;return f?f(g):1-Math.pow(1-g,4)}return{mount:w,destroy:V,scroll:y,cancel:k}}var $t={passive:!1,capture:!0};function sa(e,t,n){var o=Se(e),i=o.on,l=o.emit,r=o.bind,s=o.unbind,p=e.state,d=t.Move,c=t.Scroll,L=t.Controller,S=t.Elements.track,h=t.Media.reduce,u=t.Direction,m=u.resolve,w=u.orient,y=d.getPosition,x=d.exceededLimit,_,V,k,T,g,f=!1,E,z,A;function N(){r(S,Ln,kn,$t),r(S,En,kn,$t),r(S,$i,B,$t),r(S,"click",R,{capture:!0}),r(S,"dragstart",Ye),i([pt,_e],O)}function O(){var M=n.drag;ie(!M),T=M==="free"}function B(M){if(E=!1,!z){var $=ge(M);me(M.target)&&($||!M.button)&&(L.isBusy()?Ye(M,!0):(A=$?S:window,g=p.is([At,Dt]),k=null,r(A,Ln,G,$t),r(A,En,b,$t),d.cancel(),c.cancel(),F(M)))}}function G(M){if(p.is(on)||(p.set(on),l(ti)),M.cancelable)if(g){d.translate(_+he(te(M)));var $=pe(M)>wo,j=f!==(f=x());($||j)&&F(M),E=!0,l(ni),Ye(M)}else H(M)&&(g=I(M),Ye(M))}function b(M){p.is(on)&&(p.set(Lt),l(oi)),g&&(W(M),Ye(M)),s(A,Ln,G),s(A,En,b),g=!1}function R(M){!z&&E&&Ye(M,!0)}function F(M){k=V,V=M,_=y()}function W(M){var $=Z(M),j=le($),Y=n.rewind&&n.rewindByDrag;h(!1),T?L.scroll(j,0,n.snap):e.is(Zt)?L.go(w(Rn($))<0?Y?"<":"-":Y?">":"+"):e.is(It)&&f&&Y?L.go(x(!0)?">":"<"):L.go(L.toDest(j),!0),h(!0)}function I(M){var $=n.dragMinThreshold,j=Pt($),Y=j&&$.mouse||0,J=(j?$.touch:+$)||10;return Ee(te(M))>(ge(M)?J:Y)}function H(M){return Ee(te(M))>Ee(te(M,!0))}function Z(M){if(e.is(kt)||!f){var $=pe(M);if($&&$<wo)return te(M)/$}return 0}function le(M){return y()+Rn(M)*st(Ee(M)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(M,$){return ee(M,$)-ee(P(M),$)}function pe(M){return Wn(M)-Wn(P(M))}function P(M){return V===M&&k||V}function ee(M,$){return(ge(M)?M.changedTouches[0]:M)["page"+m($?"Y":"X")]}function he(M){return M/(f&&e.is(It)?jr:1)}function me(M){var $=n.noDrag;return!Ht(M,"."+vi+", ."+Cn)&&(!$||!Ht(M,$))}function ge(M){return typeof TouchEvent<"u"&&M instanceof TouchEvent}function U(){return g}function ie(M){z=M}return{mount:N,disable:ie,isDragging:U}}var ca={Spacebar:" ",Right:bn,Left:vn,Up:ui,Down:di};function ro(e){return e=lt(e)?e:e.key,ca[e]||e}var To="keydown";function pa(e,t,n){var o=Se(e),i=o.on,l=o.bind,r=o.unbind,s=e.root,p=t.Direction.resolve,d,c;function L(){S(),i(_e,h),i(_e,S),i(tt,m)}function S(){var y=n.keyboard;y&&(d=y==="global"?window:s,l(d,To,w))}function h(){r(d,To)}function u(y){c=y}function m(){var y=c;c=!0,Vo(function(){c=y})}function w(y){if(!c){var x=ro(y);x===p(vn)?e.go("<"):x===p(bn)&&e.go(">")}}return{mount:L,destroy:h,disable:u}}var Mt=qn+"-lazy",ln=Mt+"-srcset",ua="["+Mt+"], ["+ln+"]";function da(e,t,n){var o=Se(e),i=o.on,l=o.off,r=o.bind,s=o.emit,p=n.lazyLoad==="sequential",d=[Ft,vt],c=[];function L(){n.lazyLoad&&(S(),i(we,S))}function S(){et(c),h(),p?y():(l(d),i(d,u),u())}function h(){t.Slides.forEach(function(x){Un(x.slide,ua).forEach(function(_){var V=Oe(_,Mt),k=Oe(_,ln);if(V!==_.src||k!==_.srcset){var T=n.classes.spinner,g=_.parentElement,f=Kt(g,"."+T)||Tt("span",T,g);c.push([_,x,f]),_.src||zt(_,"none")}})})}function u(){c=c.filter(function(x){var _=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,_)?m(x):!0}),c.length||l(d)}function m(x){var _=x[0];Be(x[1].slide,Nn),r(_,"load error",ve(w,x)),ce(_,"src",Oe(_,Mt)),ce(_,"srcset",Oe(_,ln)),De(_,Mt),De(_,ln)}function w(x,_){var V=x[0],k=x[1];Ze(k.slide,Nn),_.type!=="error"&&(ft(x[2]),zt(V,""),s(eo,V,k),s(Et)),p&&y()}function y(){c.length&&m(c.shift())}return{mount:L,destroy:ve(et,c),check:u}}function ma(e,t,n){var o=Se(e),i=o.on,l=o.emit,r=o.bind,s=t.Slides,p=t.Elements,d=t.Controller,c=d.hasFocus,L=d.getIndex,S=d.go,h=t.Direction.resolve,u=p.pagination,m=[],w,y;function x(){_(),i([_e,we,un],x);var z=n.pagination;u&&zt(u,z?"":"none"),z&&(i([tt,hn,vt],E),V(),E(),l(ai,{list:w,items:m},f(e.index)))}function _(){w&&(ft(u?ct(w.children):w),Ze(w,y),et(m),w=null),o.destroy()}function V(){var z=e.length,A=n.classes,N=n.i18n,O=n.perPage,B=c()?d.getEnd()+1:jt(z/O);w=u||Tt("ul",A.pagination,p.track.parentElement),Be(w,y=$n+"--"+g()),ce(w,Je,"tablist"),ce(w,Re,N.select),ce(w,no,g()===xn?"vertical":"");for(var G=0;G<B;G++){var b=Tt("li",null,w),R=Tt("button",{class:A.page,type:"button"},b),F=s.getIn(G).map(function(I){return I.slide.id}),W=!c()&&O>1?N.pageX:N.slideX;r(R,"click",ve(k,G)),n.paginationKeyboard&&r(R,"keydown",ve(T,G)),ce(b,Je,"presentation"),ce(R,Je,"tab"),ce(R,Xt,F.join(" ")),ce(R,Re,Mn(W,G+1)),ce(R,_t,-1),m.push({li:b,button:R,page:G})}}function k(z){S(">"+z,!0)}function T(z,A){var N=m.length,O=ro(A),B=g(),G=-1;O===h(bn,!1,B)?G=++z%N:O===h(vn,!1,B)?G=(--z+N)%N:O==="Home"?G=0:O==="End"&&(G=N-1);var b=m[G];b&&(Uo(b.button),S(">"+G),Ye(A,!0))}function g(){return n.paginationDirection||n.direction}function f(z){return m[d.toPage(z)]}function E(){var z=f(L(!0)),A=f(L());if(z){var N=z.button;Ze(N,yt),De(N,bo),ce(N,_t,-1)}if(A){var O=A.button;Be(O,yt),ce(O,bo,!0),ce(O,_t,"")}l(li,{list:w,items:m},z,A)}return{items:m,mount:x,destroy:_,getAt:f,update:E}}var ga=[" ","Enter"];function ha(e,t,n){var o=n.isNavigation,i=n.slideFocus,l=[];function r(){e.splides.forEach(function(u){u.isParent||(d(e,u.splide),d(u.splide,e))}),o&&c()}function s(){l.forEach(function(u){u.destroy()}),et(l)}function p(){s(),r()}function d(u,m){var w=Se(u);w.on(tt,function(y,x,_){m.go(m.is(kt)?_:y)}),l.push(w)}function c(){var u=Se(e),m=u.on;m(Yn,S),m(ci,h),m([pt,_e],L),l.push(u),u.emit(Zn,e.splides)}function L(){ce(t.Elements.list,no,n.direction===xn?"vertical":"")}function S(u){e.go(u.index)}function h(u,m){Dn(ga,ro(m))&&(S(u),Ye(m))}return{setup:ve(t.Media.set,{slideFocus:Gt(i)?o:i},!0),mount:r,destroy:s,remount:p}}function fa(e,t,n){var o=Se(e),i=o.bind,l=0;function r(){n.wheel&&i(t.Elements.track,"wheel",s,$t)}function s(d){if(d.cancelable){var c=d.deltaY,L=c<0,S=Wn(d),h=n.wheelMinThreshold||0,u=n.wheelSleep||0;Ee(c)>h&&S-l>u&&(e.go(L?"<":">"),l=S),p(L)&&Ye(d)}}function p(d){return!n.releaseWheel||e.state.is(At)||t.Controller.getAdjacent(d)!==-1}return{mount:r}}var ya=90;function va(e,t,n){var o=Se(e),i=o.on,l=t.Elements.track,r=n.live&&!n.isNavigation,s=Tt("span",Pr),p=fn(ya,ve(c,!1));function d(){r&&(S(!t.Autoplay.isPaused()),ce(l,Co,!0),s.textContent="…",i(Jn,ve(S,!0)),i(Qn,ve(S,!1)),i([Ft,vt],ve(c,!0)))}function c(h){ce(l,So,h),h?(qt(l,s),p.start()):(ft(s),p.cancel())}function L(){De(l,[xo,Co,So]),ft(s)}function S(h){r&&ce(l,xo,h?"off":"polite")}return{mount:d,disable:S,destroy:L}}var ba=Object.freeze({__proto__:null,Media:Lr,Direction:Er,Elements:Vr,Slides:Dr,Layout:Gr,Clones:qr,Move:Kr,Controller:Yr,Arrows:Jr,Autoplay:ea,Cover:ta,Scroll:la,Drag:sa,Keyboard:pa,LazyLoad:da,Pagination:ma,Sync:ha,Wheel:fa,Live:va}),xa={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"},Sa={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:Or,i18n:xa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ca(e,t,n){var o=t.Slides;function i(){Se(e).on([pt,we],l)}function l(){o.forEach(function(s){s.style("transform","translateX(-"+100*s.index+"%)")})}function r(s,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Vo(p)}return{mount:i,start:r,cancel:kn}}function $a(e,t,n){var o=t.Move,i=t.Controller,l=t.Scroll,r=t.Elements.list,s=ve(Ne,r,"transition"),p;function d(){Se(e).bind(r,"transitionend",function(h){h.target===r&&p&&(L(),p())})}function c(h,u){var m=o.toPosition(h,!0),w=o.getPosition(),y=S(h);Ee(m-w)>=1&&y>=1?n.useScroll?l.scroll(m,y,!1,u):(s("transform "+y+"ms "+n.easing),o.translate(m,!0),p=u):(o.jump(h),u())}function L(){s(""),l.cancel()}function S(h){var u=n.rewindSpeed;if(e.is(It)&&u){var m=i.getIndex(!0),w=i.getEnd();if(m===0&&h>=w||m>=w&&h===0)return u}return n.speed}return{mount:d,start:c,cancel:L}}var wa=(function(){function e(n,o){this.event=Se(),this.Components={},this.state=Tr(wt),this.splides=[],this._o={},this._E={};var i=lt(n)?Ko(document,n):n;Rt(i,i+" is invalid."),this.root=i,o=rt({label:Oe(i,Re)||"",labelledby:Oe(i,to)||""},Sa,e.defaults,o||{});try{rt(o,JSON.parse(Oe(i,qn)))}catch{Rt(!1,"Invalid JSON")}this._o=Object.create(rt({},o))}var t=e.prototype;return t.mount=function(o,i){var l=this,r=this.state,s=this.Components;Rt(r.is([wt,sn]),"Already mounted!"),r.set(wt),this._C=s,this._T=i||this._T||(this.is(Zt)?Ca:$a),this._E=o||this._E;var p=Ot({},ba,this._E,{Transition:this._T});return ht(p,function(d,c){var L=d(l,s,l._o);s[c]=L,L.setup&&L.setup()}),ht(s,function(d){d.mount&&d.mount()}),this.emit(pt),Be(this.root,Hr),r.set(Lt),this.emit(Pn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(Lt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,i){return this.event.on(o,i),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var i;return(i=this.event).emit.apply(i,[o].concat(ct(arguments,1))),this},t.add=function(o,i){return this._C.Slides.add(o,i),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(we),this},t.destroy=function(o){o===void 0&&(o=!0);var i=this.event,l=this.state;return l.is(wt)?Se(this).on(Pn,this.destroy.bind(this,o)):(ht(this._C,function(r){r.destroy&&r.destroy(o)},!0),i.emit(Xn),i.destroy(),o&&et(this.splides),l.set(sn)),this},xr(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})(),ao=wa;ao.defaults={};ao.STATES=Cr;var _o=[[pt,"onMounted"],[Pn,"onReady"],[tt,"onMove"],[Ft,"onMoved"],[Yn,"onClick"],[Zo,"onActive"],[Jo,"onInactive"],[Qo,"onVisible"],[ei,"onHidden"],[we,"onRefresh"],[_e,"onUpdated"],[Et,"onResize"],[gn,"onResized"],[ti,"onDrag"],[ni,"onDragging"],[oi,"onDragged"],[hn,"onScroll"],[vt,"onScrolled"],[Xn,"onDestroy"],[ii,"onArrowsMounted"],[ri,"onArrowsUpdated"],[ai,"onPaginationMounted"],[li,"onPaginationUpdated"],[Zn,"onNavigationMounted"],[Jn,"onAutoplayPlay"],[si,"onAutoplayPlaying"],[Qn,"onAutoplayPause"],[eo,"onLazyLoadLoaded"]];function lo(...e){return e.filter(Boolean).join(" ")}function dn(e){return e!==null&&typeof e=="object"}function On(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!On(n,t[o]));if(dn(e)&&dn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!On(e[i],t[i]))}return e===t}function Ta(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function _a(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const i=n[o];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function zn(e,t){const n=e;return _a(t,(o,i)=>{Array.isArray(o)?n[i]=o.slice():dn(o)?n[i]=zn(dn(n[i])?n[i]:{},o):n[i]=o}),n}var La=({children:e,className:t,...n})=>v.createElement("div",{className:lo("splide__track",t),...n},v.createElement("ul",{className:"splide__list"},e)),so=class extends v.Component{constructor(){super(...arguments),this.splideRef=v.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new ao(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=zn({},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&&!On(this.options,e)&&(this.splide.options=e,this.options=zn({},e));const t=this.getSlides();Ta(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){_o.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...i)=>{o(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...i}=this.props;return v.createElement(t,{className:lo("splide",e),ref:this.splideRef,...this.omit(i,["options",..._o.map(l=>l[1])])},n?v.createElement(La,null,o):o)}},co=({children:e,className:t,...n})=>v.createElement("li",{className:lo("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 va="RichTextRenderer-module__link___BWeZ2",ba={link:va},xa=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=>xa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Re(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 Mt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?s.jsx("a",{className:ba.link,href:o.value,target:o.target,children:t(o.children)},r):s.jsx("span",{style:Sa(o),children:o.text},r));return s.jsx(s.Fragment,{children:e.map((n,o)=>{const r=n.children;return s.jsx("div",{children:t(r)},o)})})};function Sa(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-",wa="SvgImage-module__img___VsTm-",vo={svg:Ca,img:wa},$a=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ta=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ke=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=w.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return w.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!$a(e)||!a?s.jsx("img",{src:e,alt:"",className:ye(vo.img,o),style:r}):s.jsx("span",{"data-supports-mask":a,className:ye(vo.svg,o),style:{"--svg":Ta(e),"--fill":t,"--hover-fill":n,...r??{}}})},_a={"top-left":J.topLeftAlignment,"top-center":J.topCenterAlignment,"top-right":J.topRightAlignment,"middle-left":J.middleLeftAlignment,"middle-center":J.middleCenterAlignment,"middle-right":J.middleRightAlignment,"bottom-left":J.bottomLeftAlignment,"bottom-center":J.bottomCenterAlignment,"bottom-right":J.bottomRightAlignment};function Ea({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=w.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:l,fontSizeLineHeight:A,textAppearance:S,color:g}=n.imageCaption,[p,d]=w.useState(void 0),[x,h]=w.useState(null),[y,_]=w.useState(0),[D,W]=w.useState(0),{direction:E,transition:b,controls:C,pagination:F,imageCaption:j,triggers:M}=e,N=w.useRef(b.type),{x:H,y:B}=e.controls.offset,U=f=>{r&&r.go(f)};return w.useEffect(()=>{if(!x)return;const f=new ResizeObserver(I=>{if(!r)return;const[k]=I;d({width:Math.round(k.contentRect.width),height:Math.round(k.contentRect.height)})});return f.observe(x),()=>f.unobserve(x)},[x]),w.useEffect(()=>{!r||N.current===b.type||(W(f=>f+1),N.current=b.type)},[b.type]),s.jsx("div",{className:ye(J.wrapper,{[J.editor]:o}),ref:h,children:s.jsxs("div",{className:J.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&s.jsx("div",{className:ye(J.captionBlock),children:s.jsx("div",{className:J.captionTextWrapper,children:t.map((f,I)=>s.jsx("div",{className:ye(J.captionText,_a[j.alignment],{[J.withPointerEvents]:I===y&&o,[J.active]:I===y}),style:{fontFamily:yn(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":$.scalingValue(i.width,o),letterSpacing:$.scalingValue(c,o),wordSpacing:$.scalingValue(l,o),textAlign:m,fontSize:$.scalingValue(A.fontSize,o),lineHeight:$.scalingValue(A.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:g,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:s.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-hover-color":j.linkHoverColor,"--link-color":j.linkColor,position:"relative",top:$.scalingValue(j.offset.y,o),left:$.scalingValue(j.offset.x,o)},children:s.jsx(Mt,{content:f.imageCaption})})},I))})}),s.jsx(ur,{onMove:f=>{_(f.index)},ref:a,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:E==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,I)=>s.jsx(pr,{children:s.jsx("div",{className:J.sliderItem,children:s.jsx("div",{className:J.imgWrapper,children:s.jsx("img",{className:ye(J.sliderImage,{[J.contain]:f.image.objectFit==="contain",[J.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},I))},D),C.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ye(J.arrow,{[J.arrowVertical]:E==="vert",[J.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{onClick:()=>{U("-1")},className:J.arrowInner,style:{transform:`translate(${$.scalingValue(H,o)}, ${$.scalingValue(B*(E==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&s.jsx(Ke,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:ye(J.arrowImg,J.mirror)}),!C.arrowsImgUrl&&s.jsx(bo,{color:C.color,className:ye(J.arrowIcon,J.arrowImg,J.mirror)})]})}),s.jsx("div",{className:ye(J.arrow,J.nextArrow,{[J.arrowVertical]:E==="vert",[J.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:J.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${$.scalingValue(H*(E==="horiz"?-1:1),o)}, ${$.scalingValue(B,o)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&s.jsx(Ke,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:J.arrowImg}),!C.arrowsImgUrl&&s.jsx(bo,{color:C.color,className:ye(J.arrowIcon,J.arrowImg)})]})})]}),M.triggersList.click&&s.jsx("div",{className:J.clickOverlay,onClick:()=>{r&&r.go("+1")}}),F.isActive&&s.jsx("div",{className:ye(J.pagination,{[J.paginationInsideBottom]:F.position==="inside-1"&&E==="horiz",[J.paginationInsideTop]:F.position==="inside-2"&&E==="horiz",[J.paginationOutsideBottom]:F.position==="outside-1"&&E==="horiz",[J.paginationOutsideTop]:F.position==="outside-2"&&E==="horiz",[J.paginationInsideLeft]:F.position==="inside-1"&&E==="vert",[J.paginationInsideRight]:F.position==="inside-2"&&E==="vert",[J.paginationOutsideLeft]:F.position==="outside-1"&&E==="vert",[J.paginationOutsideRight]:F.position==="outside-2"&&E==="vert",[J.paginationVertical]:E==="vert"}),children:s.jsx("div",{className:J.paginationInner,style:{backgroundColor:F.colors[2],transform:`scale(${F.scale/100}) translate(${$.scalingValue(F.offset.x,o)}, ${$.scalingValue(F.offset.y,o)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((f,I)=>s.jsx("button",{onClick:()=>{r&&r.go(I)},className:ye(J.paginationItem),children:s.jsx("div",{className:ye(J.dot,{[J.activeDot]:I===y}),style:{backgroundColor:I===y?F.colors[0]:F.colors[1],"--pagination-hover-color":F.hover}})},I))})})]})})}function bo({color:e,className:t}){return s.jsx("svg",{viewBox:"0 0 10 18",className:t,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Aa={element:Ea,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"]}},ka="ImageRevealSlider-module__imageRevealSlider___UE5Ob",La="ImageRevealSlider-module__image___Qjt-e",Ia="ImageRevealSlider-module__link___N-iLG",Fa="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:ka,image:La,link:Ia,cursor:Fa};function xo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,u=a/2,c=i/2;if(e>=o.x-u&&e<=o.x+u&&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,a;if(t==="custom"){r=n;const i=await wn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);a=i.height/i.width*r}else{const i=await wn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=w.useState(null),[a,i]=w.useState([]),[u,c]=w.useState(0),m=w.useRef(0),[l,A]=w.useState({x:0,y:0}),[S,g]=w.useState(1),[p,d]=w.useState("none"),x=w.useRef({x:0,y:0}),[h,y]=w.useState(!1),{sizeType:_,imageWidth:D,randomRangeImageWidth:W}=e.imageSize,{revealPosition:E,visible:b}=e.position,{cursorType:C,target:F,defaultCursorScale:j,defaultCursor:M,hoverCursorScale:N,hoverCursor:H}=e.cursor;w.useEffect(()=>{if(!o)return;const f=(L,T)=>{const R=o.getBoundingClientRect(),Z=L-R.left,ae=T-R.top;if(A({x:Z,y:ae}),C==="system"){d("none"),g(1);return}const te=Z,ce=ae,P=document.elementFromPoint(R.left+te,R.top+ce);if(P&&P.closest("a")){d("none"),g(1);return}const ee=xo(te,ce,a)||F==="area"?{img:H??"none",scale:N}:{img:M??"none",scale:j};d(ee.img),g(ee.scale)},I=L=>{L.stopPropagation(),x.current={x:L.clientX,y:L.clientY},f(L.clientX,L.clientY)},k=()=>{h&&f(x.current.x,x.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",k,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",k,!0)}},[o,h,l,C,F,H,M,N,j,a]),w.useEffect(()=>{h||(d("none"),g(0))},[h]);const B=async(f,I,k,L={})=>{const{width:T,height:R,finalWidth:Z}=await Pa(f.image.url,_,D,W);let ae=0,te=0;E==="same"?(ae=I/2,te=k/2):(ae=L.x??Math.random()*I,te=L.y??Math.random()*k);const ce=Math.min(Math.max(ae,T/2),I-T/2),P=Math.min(Math.max(te,R/2),k-R/2);return{id:m.current++,url:f.image.url,link:f.link,name:f.image.name,x:ce,y:P,width:Z}};w.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),I=f.width,k=f.height,L=[];(async()=>{const R=t[0],Z=await B(R,I,k);L.push(Z),i(L),c(1)})()},[_,D,W,E,o]),w.useEffect(()=>{b==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[b]);const U=async f=>{if(!o)return;const I=o.getBoundingClientRect(),k=f.clientX-I.left,L=f.clientY-I.top;if(F==="image"&&!xo(k,L,a))return;let T=0,R=0;E==="on Click"?(T=k,R=L):E==="same"?(T=I.width/2,R=I.height/2):(T=Math.random()*I.width,R=Math.random()*I.height);const Z=t[u],ae=await B(Z,I.width,I.height,{x:T,y:R});i(te=>b==="all"?[...te,ae]:[ae]),c(te=>te>=t.length-1?0:te+1)};return s.jsxs("div",{ref:r,onClick:U,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[a.map(f=>s.jsx("div",{className:ut.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:F==="area"&&f.link?s.jsx("a",{href:f.link,target:"_blank",className:ut.link,children:s.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)}):s.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)},f.id)),h&&s.jsx("div",{className:ut.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ra={element:Ma,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Wa="LightBox-module__hidden___9s-9x",Na="LightBox-module__heroImage___sTxNF",Va="LightBox-module__background___rm9ml",Ha="LightBox-module__editor___4ACaY",ja="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",qa="LightBox-module__caption___b6L2I",Ua="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Za="LightBox-module__arrowInner___p48sW",Ja="LightBox-module__arrowIcon___3VaFf",Qa="LightBox-module__arrowImg___pNV88",es="LightBox-module__mirror___pjeXc",ts="LightBox-module__thumbsWrapper___GB-nU",ns="LightBox-module__thumbsContainerVertical___wttk5",os="LightBox-module__thumbsContainer___osSma",rs="LightBox-module__thumbsAlignStart___MO6tY",is="LightBox-module__thumbsAlignCenter___Q4sUx",as="LightBox-module__thumbsAlignEnd___p4y9R",ss="LightBox-module__thumbItem___HvnF3",ls="LightBox-module__closeButton___g2khP",cs="LightBox-module__fadeIn___0m5GW",us="LightBox-module__slideInLeft___gPYwC",ps="LightBox-module__slideInRight___S-pPp",ds="LightBox-module__slideInTop___DFdAj",ms="LightBox-module__slideInBottom___m27kZ",gs="LightBox-module__fadeOut___55qBR",fs="LightBox-module__slideOutLeft___NvU7P",hs="LightBox-module__slideOutRight___SK7eC",ys="LightBox-module__slideOutTop___Vgg0z",vs="LightBox-module__slideOutBottom___nJ0Ef",bs="LightBox-module__scaleSlide___vZriG",O={hidden:Wa,heroImage:Na,background:Va,editor:Ha,contentStyle:ja,imageStyle:za,imgWrapper:Oa,contain:Ba,cover:Da,caption:qa,captionTextInner:Ua,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Za,arrowIcon:Ja,arrowImg:Qa,mirror:es,thumbsWrapper:ts,thumbsContainerVertical:ns,thumbsContainer:os,thumbsAlignStart:rs,thumbsAlignCenter:is,thumbsAlignEnd:as,thumbItem:ss,closeButton:ls,fadeIn:cs,slideInLeft:us,slideInRight:ps,slideInTop:ds,slideInBottom:ms,fadeOut:gs,slideOutLeft:fs,slideOutRight:hs,slideOutTop:ys,slideOutBottom:vs,scaleSlide:bs},Ut=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), calc(-50% + ${$.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${$.scalingValue(t.x,n)}, calc(-50% + ${$.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), ${$.scalingValue(t.y,n)})`:o.transform=`translate(${$.scalingValue(t.x,n)}, ${$.scalingValue(t.y,n)})`,o};function dr(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=dr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,u=o/r,c=a/i;let m,l;c>u?(m=o,l=o/c):(l=r,m=r*c);const A=t.left+n.left,S=t.top+n.top,g=(o-m)/2+A,p=(r-l)/2+S;return{x:g,y:p,width:m,height:l}}function Co(e){const t=e.getBoundingClientRect(),n=dr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function wo(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 xs(e,t){const n=(()=>{if(e==="fade in")return O.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return O.slideInLeft;case"right":return O.slideInRight;case"top":return O.slideInTop;case"bottom":return O.slideInBottom;default:return O.slideInRight}return O.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return O.fadeIn;if(e==="slide in")switch(t){case"left":return O.slideInLeft;case"right":return O.slideInRight;case"top":return O.slideInTop;case"bottom":return O.slideInBottom;default:return O.slideInRight}return O.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return O.fadeOut;if(e==="slide in")switch(t){case"left":return O.slideOutLeft;case"right":return O.slideOutRight;case"top":return O.slideOutTop;case"bottom":return O.slideOutBottom;default:return O.slideOutRight}return O.fadeOut})(),a=(()=>{if(e==="fade in")return O.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return O.slideOutLeft;case"right":return O.slideOutRight;case"top":return O.slideOutTop;case"bottom":return O.slideOutBottom;default:return O.slideOutRight}return O.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const Ss=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,u]=w.useState(!1),{url:c}=e.thumbnailBlock.cover;return w.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),s.jsxs(s.Fragment,{children:[s.jsx("img",{src:c,alt:"Cover",className:O.heroImage,onClick:()=>u(!0)}),s.jsx(Cs,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},Cs=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:u})=>{var V;const[c,m]=w.useState(0),[l,A]=w.useState(0),[S,g]=w.useState(!1),[p,d]=w.useState(!1),[x,h]=w.useState({}),y=w.useRef(null),_=w.useRef(null),D=w.useRef(null),W=w.useRef(!1),E=w.useRef(null),b=w.useRef(null),C=w.useRef(null),F=w.useRef(null),j=w.useRef(!1),M=w.useRef(null),[N,H]=w.useState(!1),{appear:B,triggers:U,slider:f,thumbnail:I,controls:k,area:L,caption:T,layout:R}=r.lightboxBlock,{appearClass:Z,backdropAppearClass:ae,backdropDisappearClass:te,disappearClass:ce}=xs(B.type,B.direction),P=(u==null?void 0:u.itemId)??null;w.useEffect(()=>{const v=()=>{setTimeout(()=>{var K,Q;(Q=(K=y.current)==null?void 0:K.splide)==null||Q.refresh()},16)},q=()=>{A(K=>K+1)};return window.addEventListener("ArticleEditor.Layout:change",v),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",v),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),w.useEffect(()=>{if(!e||!I.isActive){H(!1);return}const v=M.current;if(!v)return;const q=()=>{f.direction==="horiz"?H(v.scrollWidth>v.clientWidth):H(v.scrollHeight>v.clientHeight)};q();const K=new ResizeObserver(q);return K.observe(v),()=>K.disconnect()},[e,I.isActive,n.length,x,f.direction]);const ee=w.useCallback(()=>{const v=window.matchMedia("(max-width: 768px)").matches,q=wo(L.color);v&&!i&&q>.9&&(document.body.style.backgroundColor=""),g(!0),W.current=!0;const K=Q=>{Q.target===E.current&&Q.animationName&&(E.current&&b.current&&E.current.removeEventListener("animationend",b.current),b.current=null,W.current&&(W.current=!1,t()),g(!1))};E.current&&(b.current=K,E.current.addEventListener("animationend",K))},[t,L.color,i]),fe=(v,q,K)=>{var Q,ie;if(v){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&c===n.length-1?ee():(Q=y.current)==null||Q.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const re=v.getBoundingClientRect(),ne=q-re.left,ue=K-re.top,z=re.width,X=re.height;let Y;f.direction==="horiz"?Y=ne<z/2?"-1":"+1":Y=ue<X/2?"-1":"+1",(ie=y.current)==null||ie.go(Y)}}},de=v=>{if(j.current){j.current=!1;return}const q=n[c],K=(q==null?void 0:q.image.objectFit)==="cover";let Q,ie;if("changedTouches"in v&&v.changedTouches.length>0)Q=v.changedTouches[0].clientX,ie=v.changedTouches[0].clientY;else if("clientX"in v)Q=v.clientX,ie=v.clientY;else return;let re;if(K&&D.current){const ne=Co(D.current);re=Q>=ne.left&&Q<=ne.right&&ie>=ne.top&&ie<=ne.bottom}else{const ne=D.current?So(D.current):null;if(!ne){v.target===v.currentTarget&&ee();return}re=Q>=ne.x&&Q<=ne.x+ne.width&&ie>=ne.y&&ie<=ne.y+ne.height}re?fe(D.current,Q,ie):ee()},ge=v=>{const q=v.target;(q.classList.contains(O.thumbsWrapper)||q.classList.contains(O.thumbsContainer))&&de(v)};w.useEffect(()=>{if(!e)return;const v=q=>{var K,Q;if(q.key==="Escape"){ee();return}if(q.key==="ArrowRight"){m(ie=>(ie+1)%Math.max(n.length,1)),(K=y.current)==null||K.go("+1");return}q.key==="ArrowLeft"&&(m(ie=>(ie-1+Math.max(n.length,1))%Math.max(n.length,1)),(Q=y.current)==null||Q.go("-1"))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[e,ee,n.length]),w.useEffect(()=>{if(e){if(m(0),A(q=>q+1),W.current=!1,g(!1),d(!1),h({}),!P)return;const v=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(v)}return()=>{E.current&&b.current&&(E.current.removeEventListener("animationend",b.current),b.current=null),d(!1)}},[e,P]),w.useEffect(()=>{_.current!==null&&_.current!==f.type&&A(v=>v+1),_.current=f.type},[f.type]),w.useEffect(()=>{if(!e)return;const v=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,K=wo(L.color);document.body.style.overflow="hidden",d(!1);const Q=re=>{re.target===E.current&&!W.current&&re.animationName&&(q&&!i&&K>.9&&(document.body.style.backgroundColor=L.color),d(!0),E.current&&C.current&&E.current.removeEventListener("animationend",C.current),C.current=null)};E.current&&(C.current=Q,E.current.addEventListener("animationend",Q));const ie=re=>{const ne=re.target;ne&&(ne.closest(`.${O.thumbsWrapper}`)||ne.closest(`.${O.thumbsContainer}`))||f.type!=="slide"&&re.preventDefault()};return document.addEventListener("touchmove",ie,{passive:!1}),()=>{document.body.style.overflow=v,document.removeEventListener("touchmove",ie),E.current&&C.current&&(E.current.removeEventListener("animationend",C.current),C.current=null),d(!1)}},[e,i,L.color,f.type]),w.useEffect(()=>{if(!e)return;const v=q=>{var Q,ie;if(W.current){q.stopPropagation();return}if(j.current){j.current=!1;return}const K=q.target;if(!(K&&(K.closest(`.${O.thumbsContainer}`)||K.closest(`.${O.thumbItem}`)||K.closest(`.${O.arrow}`)||K.closest(`.${O.closeButton}`)||K.closest(`.${O.caption}`)))){if(f.type==="slide"&&U.type==="drag"&&((ie=(Q=y.current)==null?void 0:Q.splide)!=null&&ie.root)){const re=y.current.splide.root;if(K&&(re.contains(K)||re===K))return}if(q.touches.length===0&&q.changedTouches.length>0){const re=n[c],ne=(re==null?void 0:re.image.objectFit)==="cover",ue=q.changedTouches[0];let z;if(ne&&D.current){const X=Co(D.current);z=ue.clientX>=X.left&&ue.clientX<=X.right&&ue.clientY>=X.top&&ue.clientY<=X.bottom}else{const X=D.current?So(D.current):null;if(!X)return;z=ue.clientX>=X.x&&ue.clientX<=X.x+X.width&&ue.clientY>=X.y&&ue.clientY<=X.y+X.height}if(!z){q.stopPropagation(),W.current=!0;const X=Y=>{Y.stopPropagation(),Y.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),ee()}}}};return document.addEventListener("touchend",v,{passive:!0}),()=>{document.removeEventListener("touchend",v)}},[e,ee,c,n]);const G=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&U.type==="drag";w.useEffect(()=>{var Y,se;if(!e||!G||!((se=(Y=y.current)==null?void 0:Y.splide)!=null&&se.root))return;const v=y.current.splide.root,q=30,K=(oe,pe)=>{if(F.current){const we=Math.abs(oe-F.current.x),$e=Math.abs(pe-F.current.y);(we>0||$e>0)&&(j.current=!0)}},Q=oe=>{F.current&&(oe.preventDefault(),K(oe.clientX,oe.clientY))},ie=oe=>{F.current&&oe.touches.length>0&&(oe.preventDefault(),K(oe.touches[0].clientX,oe.touches[0].clientY))},re=(oe,pe)=>{if(!F.current||!y.current){F.current=null;return}const we=Math.abs(oe-F.current.x),$e=Math.abs(pe-F.current.y);$e>q&&$e>we&&y.current.go(pe<F.current.y?"+1":"-1"),F.current=null},ne=oe=>{F.current&&re(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",Q)},ue=oe=>{if(F.current){if(oe.changedTouches.length>0){const pe=oe.changedTouches[0];re(pe.clientX,pe.clientY)}document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),document.removeEventListener("touchmove",ie)}},z=oe=>{F.current={x:oe.clientX,y:oe.clientY},j.current=!1,document.addEventListener("pointermove",Q,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},X=oe=>{oe.touches.length>0&&(F.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},j.current=!1,document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue))};return v.addEventListener("pointerdown",z),v.addEventListener("touchstart",X),()=>{v.removeEventListener("pointerdown",z),v.removeEventListener("touchstart",X),document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),F.current=null,j.current=!1}},[e,G,l]);const me={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:vr.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:i?null:E,className:ye(O.background,S?te:ae,{[O.editor]:i},{[O.hidden]:!e}),style:{...me,...p&&!i&&!S?{position:"absolute"}:{}}}),s.jsxs("div",{ref:i?E:null,className:ye(O.contentStyle,S?ce:Z,{[O.editor]:i},{[O.hidden]:!e}),style:{animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[s.jsx(ur,{onMove:v=>m(v.index),ref:y,className:O.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!G,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((v,q)=>{const K=Ut(R.position,R.offset,i),Q=`${$.scalingValue(R.padding.top,i)} ${$.scalingValue(R.padding.right,i)} ${$.scalingValue(R.padding.bottom,i)} ${$.scalingValue(R.padding.left,i)}`,ie=f.type==="scale"?(()=>{const{transform:re,...ne}=K;return{...ne,position:"absolute",padding:Q,boxSizing:"border-box","--position-transform":re||"none"}})():{...K,position:"absolute",padding:Q,boxSizing:"border-box"};return s.jsx(pr,{children:s.jsx("div",{className:O.imgWrapper,onClick:de,children:s.jsx("img",{ref:q===c?D:null,className:ye(O.imageStyle,{[O.contain]:v.image.objectFit==="contain",[O.cover]:v.image.objectFit==="cover",[O.scaleSlide]:f.type==="scale"}),src:v.image.url,alt:v.image.name??"",style:{...ie,pointerEvents:v.image.objectFit==="contain"?"none":"auto"}})})},q)})},l),k.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:ye(O.arrow,{[O.arrowVertical]:f.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:s.jsxs("button",{className:O.arrowInner,style:{transform:`translate(${$.scalingValue(k.offset.x,i)}, ${$.scalingValue(k.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${k.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var v;return(v=y.current)==null?void 0:v.go("-1")},"aria-label":"Previous",children:[k.arrowsImgUrl&&s.jsx(Ke,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:ye(O.arrowImg,O.mirror)}),!k.arrowsImgUrl&&s.jsx($o,{color:k.color,className:ye(O.arrowIcon,O.arrowImg,O.mirror)})]})}),s.jsx("div",{className:ye(O.arrow,O.nextArrow,{[O.arrowVertical]:f.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:s.jsxs("button",{className:O.arrowInner,style:{transform:`translate(${$.scalingValue(k.offset.x*(f.direction==="horiz"?-1:1),i)}, ${$.scalingValue(k.offset.y,i)}) scale(${k.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var v;return(v=y.current)==null?void 0:v.go("+1")},"aria-label":"Next",children:[k.arrowsImgUrl&&s.jsx(Ke,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:O.arrowImg}),!k.arrowsImgUrl&&s.jsx($o,{color:k.color,className:ye(O.arrowIcon,O.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const v=Ut(L.closeIconAlign,L.closeIconOffset,i),q=`scale(${L.closeIconScale})`,K=v.transform?`${v.transform} ${q}`:q;return s.jsx("button",{className:O.closeButton,style:{...v,transform:K},onClick:ee,"aria-label":"Close lightbox",children:s.jsx(Ke,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),T&&T.isActive&&o.imageCaption&&((V=n[c])==null?void 0:V.imageCaption)&&(()=>{const{widthSettings:v,fontSettings:q,letterSpacing:K,textAlign:Q,wordSpacing:ie,fontSizeLineHeight:re,textAppearance:ne,color:ue}=o.imageCaption;return s.jsx("div",{className:O.caption,style:{...Ut(T.alignment,T.offset,i),fontFamily:yn(q.fontFamily),fontWeight:q.fontWeight,fontStyle:q.fontStyle,width:v.sizing==="auto"?"max-content":$.scalingValue(v.width,i),letterSpacing:$.scalingValue(K,i),wordSpacing:$.scalingValue(ie,i),textAlign:Q,fontSize:$.scalingValue(re.fontSize,i),lineHeight:$.scalingValue(re.lineHeight,i),textTransform:ne.textTransform??"none",textDecoration:ne.textDecoration??"none",fontVariant:ne.fontVariant??"normal",color:ue},onClick:z=>z.stopPropagation(),children:s.jsx("div",{"data-styles":"imageCaption",className:O.captionTextInner,style:{"--link-color":T.linkColor,"--link-hover-color":T.linkHoverColor},children:s.jsx(Mt,{content:n[c].imageCaption})})})})(),I.isActive&&(()=>{const[v,q]=I.position.split("-"),K=f.direction==="horiz"?`${v}-left`:I.position,Q=Ut(K,I.offset,i),ie=()=>{if(f.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(v==="top")return"flex-start";if(v==="middle")return"center";if(v==="bottom")return"flex-end"}return"flex-start"};return s.jsx("div",{ref:M,className:O.thumbsWrapper,onClick:re=>ge(re),style:{position:i?"absolute":"fixed",...Q,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:s.jsx("div",{className:ye(O.thumbsContainer,{[O.thumbsContainerVertical]:f.direction==="vert",[O.thumbsAlignStart]:I.align==="start",[O.thumbsAlignCenter]:I.align==="center",[O.thumbsAlignEnd]:I.align==="end"}),style:{gap:$.scalingValue(I.grid.gap,i),justifyContent:N?"flex-start":ie()},children:n.map((re,ne)=>{const ue=ne===c,z=x[ne],Y=I.grid.size*(ue?I.activeState.scale:1),se=()=>{if(I.fit!=="fit")return{};if(!z)return f.direction==="horiz"?{height:$.scalingValue(Y,i)}:{width:$.scalingValue(Y,i)};const oe=z.width/z.height;if(f.direction==="horiz"){const pe=Y,we=pe*oe;return{width:$.scalingValue(we,i),height:$.scalingValue(pe,i)}}else{const pe=Y,we=pe/oe;return{width:$.scalingValue(pe,i),height:$.scalingValue(we,i)}}};return s.jsx("button",{className:O.thumbItem,style:{...f.direction==="horiz"&&I.fit!=="fit"?{height:$.scalingValue(Y,i)}:{},...f.direction==="vert"&&I.fit!=="fit"?{width:$.scalingValue(Y,i)}:{},...I.fit==="cover"?{width:$.scalingValue(Y,i),height:$.scalingValue(Y,i)}:{},...se(),transition:ue?"all 0.25s ease-out":"none",opacity:ue?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:oe=>{var pe;oe.stopPropagation(),m(ne),(pe=y.current)==null||pe.go(ne)},onMouseEnter:()=>{var oe;I.triggers==="hov"&&((oe=y.current)==null||oe.go(ne))},children:s.jsx("img",{src:re.image.url,alt:re.image.name??"",onLoad:oe=>{const pe=oe.currentTarget;pe.naturalWidth&&pe.naturalHeight&&h(we=>({...we,[ne]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${re.image.name}-${ne}`)})})})})()]})]}),document.getElementById(a))};function $o({color:e,className:t}){return s.jsx("svg",{viewBox:"0 0 10 18",className:t,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const ws={element:Ss,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 $s(e){return`
6
+ */const Ea="RichTextRenderer-module__link___BWeZ2",Ia={link:Ea},Aa=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))},wn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Aa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Qe(e){const{color:t,...n}=e;return n}function Ie(e,t){var n,o,i;return{fontFamily:wn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:C.scalingValue(e.letterSpacing,t),wordSpacing:C.scalingValue(e.wordSpacing,t),fontSize:C.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?C.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:(i=e.textAppearance)==null?void 0:i.fontVariant,color:e.color}}const Bt=({content:e})=>{const t=n=>n.map((o,i)=>o.type==="link"?a.jsx("a",{className:Ia.link,href:o.value,target:o.target,children:t(o.children)},i):a.jsx("span",{style:Fa(o),children:o.text},i));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const i=n.children;return a.jsx("div",{children:t(i)},o)})})};function Fa(e){return{...e.fontFamily&&{fontFamily:wn(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 ka="SvgImage-module__svg___q3xE-",Wa="SvgImage-module__img___VsTm-",Lo={svg:ka,img:Wa},Ra=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ma=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,at=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:i})=>{const[l,r]=v.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return v.useEffect(()=>{if(typeof window<"u"&&window.CSS){const s=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');r(s)}},[]),!Ra(e)||!l?a.jsx("img",{src:e,alt:"",className:ye(Lo.img,o),style:i}):a.jsx("span",{"data-supports-mask":l,className:ye(Lo.svg,o),style:{"--svg":Ma(e),"--fill":t,"--hover-fill":n,...i??{}}})},Pa={"top-left":Q.topLeftAlignment,"top-center":Q.topCenterAlignment,"top-right":Q.topRightAlignment,"middle-left":Q.middleLeftAlignment,"middle-center":Q.middleCenterAlignment,"middle-right":Q.middleRightAlignment,"bottom-left":Q.bottomLeftAlignment,"bottom-center":Q.bottomCenterAlignment,"bottom-right":Q.bottomRightAlignment};function Ha({settings:e,content:t,styles:n,isEditor:o}){const[i,l]=v.useState(null),{widthSettings:r,fontSettings:s,letterSpacing:p,textAlign:d,wordSpacing:c,fontSizeLineHeight:L,textAppearance:S,color:h}=n.imageCaption,[u,m]=v.useState(void 0),[w,y]=v.useState(null),[x,_]=v.useState(0),[V,k]=v.useState(0),{direction:T,transition:g,controls:f,pagination:E,imageCaption:z,triggers:A}=e,N=v.useRef(g.type),{x:O,y:B}=e.controls.offset,G=b=>{i&&i.go(b)};return v.useEffect(()=>{if(!w)return;const b=new ResizeObserver(R=>{if(!i)return;const[F]=R;m({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return b.observe(w),()=>b.unobserve(w)},[w]),v.useEffect(()=>{!i||N.current===g.type||(k(b=>b+1),N.current=g.type)},[g.type]),a.jsx("div",{className:ye(Q.wrapper,{[Q.editor]:o}),ref:y,children:a.jsxs("div",{className:Q.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:g.backgroundColor&&g.type==="fade in"?g.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:ye(Q.captionBlock),children:a.jsx("div",{className:Q.captionTextWrapper,children:t.map((b,R)=>a.jsx("div",{className:ye(Q.captionText,Pa[z.alignment],{[Q.withPointerEvents]:R===x&&o,[Q.active]:R===x}),style:{fontFamily:wn(s.fontFamily),fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:r.sizing==="auto"?"max-content":C.scalingValue(r.width,o),letterSpacing:C.scalingValue(p,o),wordSpacing:C.scalingValue(c,o),textAlign:d,fontSize:C.scalingValue(L.fontSize,o),lineHeight:C.scalingValue(L.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:h,transitionDuration:g.duration?`${Math.round(parseInt(g.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:Q.captionTextInner,style:{"--link-hover-color":z.linkHoverColor,"--link-color":z.linkColor,position:"relative",top:C.scalingValue(z.offset.y,o),left:C.scalingValue(z.offset.x,o)},children:a.jsx(Bt,{content:b.imageCaption})})},R))})}),a.jsx(so,{onMove:b=>{_(b.index)},ref:l,options:{arrows:!1,speed:g.duration?parseInt(g.duration):500,autoplay:A.autoPlay!==null,...A.autoPlay!==null&&{interval:parseInt(A.autoPlay)*1e3},direction:T==="horiz"||g.type==="fade in"?"ltr":"ttb",pagination:!1,drag:A.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:g.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((b,R)=>a.jsx(co,{children:a.jsx("div",{className:Q.sliderItem,children:a.jsx("div",{className:Q.imgWrapper,children:a.jsx("img",{className:ye(Q.sliderImage,{[Q.contain]:b.image.objectFit==="contain",[Q.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},R))},V),f.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ye(Q.arrow,{[Q.arrowVertical]:T==="vert",[Q.hoverArrow]:f.show==="on hover"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:a.jsxs("button",{onClick:()=>{G("-1")},className:Q.arrowInner,style:{transform:`translate(${C.scalingValue(O,o)}, ${C.scalingValue(B*(T==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[f.arrowsImgUrl&&a.jsx(at,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:ye(Q.arrowImg,Q.mirror)}),!f.arrowsImgUrl&&a.jsx(Eo,{color:f.color,className:ye(Q.arrowIcon,Q.arrowImg,Q.mirror)})]})}),a.jsx("div",{className:ye(Q.arrow,Q.nextArrow,{[Q.arrowVertical]:T==="vert",[Q.hoverArrow]:f.show==="on hover"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:a.jsxs("button",{className:Q.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${C.scalingValue(O*(T==="horiz"?-1:1),o)}, ${C.scalingValue(B,o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[f.arrowsImgUrl&&a.jsx(at,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:Q.arrowImg}),!f.arrowsImgUrl&&a.jsx(Eo,{color:f.color,className:ye(Q.arrowIcon,Q.arrowImg)})]})})]}),A.triggersList.click&&a.jsx("div",{className:Q.clickOverlay,onClick:()=>{i&&i.go("+1")}}),E.isActive&&a.jsx("div",{className:ye(Q.pagination,{[Q.paginationInsideBottom]:E.position==="inside-1"&&T==="horiz",[Q.paginationInsideTop]:E.position==="inside-2"&&T==="horiz",[Q.paginationOutsideBottom]:E.position==="outside-1"&&T==="horiz",[Q.paginationOutsideTop]:E.position==="outside-2"&&T==="horiz",[Q.paginationInsideLeft]:E.position==="inside-1"&&T==="vert",[Q.paginationInsideRight]:E.position==="inside-2"&&T==="vert",[Q.paginationOutsideLeft]:E.position==="outside-1"&&T==="vert",[Q.paginationOutsideRight]:E.position==="outside-2"&&T==="vert",[Q.paginationVertical]:T==="vert"}),children:a.jsx("div",{className:Q.paginationInner,style:{backgroundColor:E.colors[2],transform:`scale(${E.scale/100}) translate(${C.scalingValue(E.offset.x,o)}, ${C.scalingValue(E.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((b,R)=>a.jsx("button",{onClick:()=>{i&&i.go(R)},className:ye(Q.paginationItem),children:a.jsx("div",{className:ye(Q.dot,{[Q.activeDot]:R===x}),style:{backgroundColor:R===x?E.colors[0]:E.colors[1],"--pagination-hover-color":E.hover}})},R))})})]})})}function Eo({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 Na={element:Ha,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"]}},Oa="ImageRevealSlider-module__imageRevealSlider___UE5Ob",za="ImageRevealSlider-module__image___Qjt-e",ja="ImageRevealSlider-module__link___N-iLG",Va="ImageRevealSlider-module__cursor___2U03d",St={imageRevealSlider:Oa,image:za,link:ja,cursor:Va};function Io(e,t,n){for(const o of n){const i=new Image;i.src=o.url;const l=o.width?Number.parseFloat(o.width):i.naturalWidth,r=i.naturalHeight/i.naturalWidth*l,s=l/2,p=r/2;if(e>=o.x-s&&e<=o.x+s&&t>=o.y-p&&t<=o.y+p)return!0}return!1}function In(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ba(e,t,n,o){let i,l;if(t==="custom"){i=n;const r=await In(e);l=r.height/r.width*i}else if(t==="random"){i=Math.random()*(o.max-o.min)+o.min;const r=await In(e);l=r.height/r.width*i}else{const r=await In(e);i=r.width,l=r.height}return{width:i,height:l,finalWidth:`${i}px`}}function Da({settings:e,content:t,isEditor:n}){const[o,i]=v.useState(null),[l,r]=v.useState([]),[s,p]=v.useState(0),d=v.useRef(0),[c,L]=v.useState({x:0,y:0}),[S,h]=v.useState(1),[u,m]=v.useState("none"),w=v.useRef({x:0,y:0}),[y,x]=v.useState(!1),{sizeType:_,imageWidth:V,randomRangeImageWidth:k}=e.imageSize,{revealPosition:T,visible:g}=e.position,{cursorType:f,target:E,defaultCursorScale:z,defaultCursor:A,hoverCursorScale:N,hoverCursor:O}=e.cursor;v.useEffect(()=>{if(!o)return;const b=(W,I)=>{const H=o.getBoundingClientRect(),Z=W-H.left,le=I-H.top;if(L({x:Z,y:le}),f==="system"){m("none"),h(1);return}const te=Z,pe=le,P=document.elementFromPoint(H.left+te,H.top+pe);if(P&&P.closest("a")){m("none"),h(1);return}const ee=Io(te,pe,l)||E==="area"?{img:O??"none",scale:N}:{img:A??"none",scale:z};m(ee.img),h(ee.scale)},R=W=>{W.stopPropagation(),w.current={x:W.clientX,y:W.clientY},b(W.clientX,W.clientY)},F=()=>{y&&b(w.current.x,w.current.y)};return o.addEventListener("mousemove",R),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",R),window.removeEventListener("scroll",F,!0)}},[o,y,c,f,E,O,A,N,z,l]),v.useEffect(()=>{y||(m("none"),h(0))},[y]);const B=async(b,R,F,W={})=>{const{width:I,height:H,finalWidth:Z}=await Ba(b.image.url,_,V,k);let le=0,te=0;T==="same"?(le=R/2,te=F/2):(le=W.x??Math.random()*R,te=W.y??Math.random()*F);const pe=Math.min(Math.max(le,I/2),R-I/2),P=Math.min(Math.max(te,H/2),F-H/2);return{id:d.current++,url:b.image.url,link:b.link,name:b.image.name,x:pe,y:P,width:Z}};v.useEffect(()=>{if(!o||t.length===0)return;const b=o.getBoundingClientRect(),R=b.width,F=b.height,W=[];(async()=>{const H=t[0],Z=await B(H,R,F);W.push(Z),r(W),p(1)})()},[_,V,k,T,o]),v.useEffect(()=>{g==="last One"&&r(b=>b.length>0?[b[b.length-1]]:[])},[g]);const G=async b=>{if(!o)return;const R=o.getBoundingClientRect(),F=b.clientX-R.left,W=b.clientY-R.top;if(E==="image"&&!Io(F,W,l))return;let I=0,H=0;T==="on Click"?(I=F,H=W):T==="same"?(I=R.width/2,H=R.height/2):(I=Math.random()*R.width,H=Math.random()*R.height);const Z=t[s],le=await B(Z,R.width,R.height,{x:I,y:H});r(te=>g==="all"?[...te,le]:[le]),p(te=>te>=t.length-1?0:te+1)};return a.jsxs("div",{ref:i,onClick:G,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:St.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[l.map(b=>a.jsx("div",{className:St.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:E==="area"&&b.link?a.jsx("a",{href:b.link,target:"_blank",className:St.link,children:a.jsx("img",{src:b.url,alt:b.name,className:St.image},b.id)}):a.jsx("img",{src:b.url,alt:b.name,className:St.image},b.id)},b.id)),y&&a.jsx("div",{className:St.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ga={element:Da,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:""}]}}}},Ua="LightBox-module__hidden___9s-9x",qa="LightBox-module__heroImage___sTxNF",Ka="LightBox-module__background___rm9ml",Ya="LightBox-module__editor___4ACaY",Xa="LightBox-module__contentStyle___Bgnsq",Za="LightBox-module__imageStyle___tLIlB",Ja="LightBox-module__imgWrapper___LuFUp",Qa="LightBox-module__contain___8-yaS",el="LightBox-module__cover___hNvOG",tl="LightBox-module__caption___b6L2I",nl="LightBox-module__captionTextInner___rCGNH",ol="LightBox-module__lightboxSplide___XFuWC",il="LightBox-module__arrow___iz38X",rl="LightBox-module__arrowVertical___Zfz81",al="LightBox-module__nextArrow___zkAQN",ll="LightBox-module__arrowInner___p48sW",sl="LightBox-module__arrowIcon___3VaFf",cl="LightBox-module__arrowImg___pNV88",pl="LightBox-module__mirror___pjeXc",ul="LightBox-module__thumbsWrapper___GB-nU",dl="LightBox-module__thumbsContainerVertical___wttk5",ml="LightBox-module__thumbsContainer___osSma",gl="LightBox-module__thumbsAlignStart___MO6tY",hl="LightBox-module__thumbsAlignCenter___Q4sUx",fl="LightBox-module__thumbsAlignEnd___p4y9R",yl="LightBox-module__thumbItem___HvnF3",vl="LightBox-module__closeButton___g2khP",bl="LightBox-module__fadeIn___0m5GW",xl="LightBox-module__slideInLeft___gPYwC",Sl="LightBox-module__slideInRight___S-pPp",Cl="LightBox-module__slideInTop___DFdAj",$l="LightBox-module__slideInBottom___m27kZ",wl="LightBox-module__fadeOut___55qBR",Tl="LightBox-module__slideOutLeft___NvU7P",_l="LightBox-module__slideOutRight___SK7eC",Ll="LightBox-module__slideOutTop___Vgg0z",El="LightBox-module__slideOutBottom___nJ0Ef",Il="LightBox-module__scaleSlide___vZriG",q={hidden:Ua,heroImage:qa,background:Ka,editor:Ya,contentStyle:Xa,imageStyle:Za,imgWrapper:Ja,contain:Qa,cover:el,caption:tl,captionTextInner:nl,lightboxSplide:ol,arrow:il,arrowVertical:rl,nextArrow:al,arrowInner:ll,arrowIcon:sl,arrowImg:cl,mirror:pl,thumbsWrapper:ul,thumbsContainerVertical:dl,thumbsContainer:ml,thumbsAlignStart:gl,thumbsAlignCenter:hl,thumbsAlignEnd:fl,thumbItem:yl,closeButton:vl,fadeIn:bl,slideInLeft:xl,slideInRight:Sl,slideInTop:Cl,slideInBottom:$l,fadeOut:wl,slideOutLeft:Tl,slideOutRight:_l,slideOutTop:Ll,slideOutBottom:El,scaleSlide:Il},Qt=(e,t,n)=>{const o={},[i,l]=e.split("-");return i==="top"?(o.top="0",o.bottom="auto"):i==="middle"?(o.top="50%",o.bottom="auto"):i==="bottom"&&(o.top="auto",o.bottom="0"),l==="left"?(o.left="0",o.right="auto"):l==="center"?(o.left="50%",o.right="auto"):l==="right"&&(o.left="auto",o.right="0"),i==="middle"&&l==="center"?o.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), calc(-50% + ${C.scalingValue(t.y,n)}))`:i==="middle"?o.transform=`translate(${C.scalingValue(t.x,n)}, calc(-50% + ${C.scalingValue(t.y,n)}))`:l==="center"?o.transform=`translate(calc(-50% + ${C.scalingValue(t.x,n)}), ${C.scalingValue(t.y,n)})`:o.transform=`translate(${C.scalingValue(t.x,n)}, ${C.scalingValue(t.y,n)})`,o};function wi(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 Ao(e){const t=e.getBoundingClientRect(),n=wi(e),o=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),l=e.naturalWidth,r=e.naturalHeight,s=o/i,p=l/r;let d,c;p>s?(d=o,c=o/p):(c=i,d=i*p);const L=t.left+n.left,S=t.top+n.top,h=(o-d)/2+L,u=(i-c)/2+S;return{x:h,y:u,width:d,height:c}}function Fo(e){const t=e.getBoundingClientRect(),n=wi(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function ko(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(i=>parseFloat(i.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 Al(e,t){const n=(()=>{if(e==="fade in")return q.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return q.fadeIn;if(e==="slide in")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return q.fadeOut;if(e==="slide in")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})(),l=(()=>{if(e==="fade in")return q.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:i,disappearClass:l}}const Fl=({settings:e,content:t,styles:n,portalId:o,activeEvent:i,isEditor:l})=>{const[r,s]=v.useState(!1),{url:p}=e.thumbnailBlock.cover;return v.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:p,alt:"Cover",className:q.heroImage,onClick:()=>s(!0)}),a.jsx(kl,{isOpen:r,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:l})]})},kl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:i,portalId:l,isEditor:r,metadata:s})=>{var M;const[p,d]=v.useState(0),[c,L]=v.useState(0),[S,h]=v.useState(!1),[u,m]=v.useState(!1),[w,y]=v.useState({}),x=v.useRef(null),_=v.useRef(null),V=v.useRef(null),k=v.useRef(!1),T=v.useRef(null),g=v.useRef(null),f=v.useRef(null),E=v.useRef(null),z=v.useRef(!1),A=v.useRef(null),[N,O]=v.useState(!1),{appear:B,triggers:G,slider:b,thumbnail:R,controls:F,area:W,caption:I,layout:H}=i.lightboxBlock,{appearClass:Z,backdropAppearClass:le,backdropDisappearClass:te,disappearClass:pe}=Al(B.type,B.direction),P=(s==null?void 0:s.itemId)??null;v.useEffect(()=>{const $=()=>{setTimeout(()=>{var Y,J;(J=(Y=x.current)==null?void 0:Y.splide)==null||J.refresh()},16)},j=()=>{L(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",$),window.addEventListener("ArticleEditor.ComponentContent:change",j),()=>{window.removeEventListener("ArticleEditor.Layout:change",$),window.removeEventListener("ArticleEditor.ComponentContent:change",j)}},[]),v.useEffect(()=>{if(!e||!R.isActive){O(!1);return}const $=A.current;if(!$)return;const j=()=>{b.direction==="horiz"?O($.scrollWidth>$.clientWidth):O($.scrollHeight>$.clientHeight)};j();const Y=new ResizeObserver(j);return Y.observe($),()=>Y.disconnect()},[e,R.isActive,n.length,w,b.direction]);const ee=v.useCallback(()=>{const $=window.matchMedia("(max-width: 768px)").matches,j=ko(W.color);$&&!r&&j>.9&&(document.body.style.backgroundColor=""),h(!0),k.current=!0;const Y=J=>{J.target===T.current&&J.animationName&&(T.current&&g.current&&T.current.removeEventListener("animationend",g.current),g.current=null,k.current&&(k.current=!1,t()),h(!1))};T.current&&(g.current=Y,T.current.addEventListener("animationend",Y))},[t,W.color,r]),he=($,j,Y)=>{var J,re;if($){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&p===n.length-1?ee():(J=x.current)==null||J.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const ae=$.getBoundingClientRect(),ne=j-ae.left,ue=Y-ae.top,D=ae.width,X=ae.height;let K;b.direction==="horiz"?K=ne<D/2?"-1":"+1":K=ue<X/2?"-1":"+1",(re=x.current)==null||re.go(K)}}},me=$=>{if(z.current){z.current=!1;return}const j=n[p],Y=(j==null?void 0:j.image.objectFit)==="cover";let J,re;if("changedTouches"in $&&$.changedTouches.length>0)J=$.changedTouches[0].clientX,re=$.changedTouches[0].clientY;else if("clientX"in $)J=$.clientX,re=$.clientY;else return;let ae;if(Y&&V.current){const ne=Fo(V.current);ae=J>=ne.left&&J<=ne.right&&re>=ne.top&&re<=ne.bottom}else{const ne=V.current?Ao(V.current):null;if(!ne){$.target===$.currentTarget&&ee();return}ae=J>=ne.x&&J<=ne.x+ne.width&&re>=ne.y&&re<=ne.y+ne.height}ae?he(V.current,J,re):ee()},ge=$=>{const j=$.target;(j.classList.contains(q.thumbsWrapper)||j.classList.contains(q.thumbsContainer))&&me($)};v.useEffect(()=>{if(!e)return;const $=j=>{var Y,J;if(j.key==="Escape"){ee();return}if(j.key==="ArrowRight"){d(re=>(re+1)%Math.max(n.length,1)),(Y=x.current)==null||Y.go("+1");return}j.key==="ArrowLeft"&&(d(re=>(re-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=x.current)==null||J.go("-1"))};return window.addEventListener("keydown",$),()=>{window.removeEventListener("keydown",$)}},[e,ee,n.length]),v.useEffect(()=>{if(e){if(d(0),L(j=>j+1),k.current=!1,h(!1),m(!1),y({}),!P)return;const $=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent($)}return()=>{T.current&&g.current&&(T.current.removeEventListener("animationend",g.current),g.current=null),m(!1)}},[e,P]),v.useEffect(()=>{_.current!==null&&_.current!==b.type&&L($=>$+1),_.current=b.type},[b.type]),v.useEffect(()=>{if(!e)return;const $=document.body.style.overflow,j=window.matchMedia("(max-width: 768px)").matches,Y=ko(W.color);document.body.style.overflow="hidden",m(!1);const J=ae=>{ae.target===T.current&&!k.current&&ae.animationName&&(j&&!r&&Y>.9&&(document.body.style.backgroundColor=W.color),m(!0),T.current&&f.current&&T.current.removeEventListener("animationend",f.current),f.current=null)};T.current&&(f.current=J,T.current.addEventListener("animationend",J));const re=ae=>{const ne=ae.target;ne&&(ne.closest(`.${q.thumbsWrapper}`)||ne.closest(`.${q.thumbsContainer}`))||b.type!=="slide"&&ae.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=$,document.removeEventListener("touchmove",re),T.current&&f.current&&(T.current.removeEventListener("animationend",f.current),f.current=null),m(!1)}},[e,r,W.color,b.type]),v.useEffect(()=>{if(!e)return;const $=j=>{var J,re;if(k.current){j.stopPropagation();return}if(z.current){z.current=!1;return}const Y=j.target;if(!(Y&&(Y.closest(`.${q.thumbsContainer}`)||Y.closest(`.${q.thumbItem}`)||Y.closest(`.${q.arrow}`)||Y.closest(`.${q.closeButton}`)||Y.closest(`.${q.caption}`)))){if(b.type==="slide"&&G.type==="drag"&&((re=(J=x.current)==null?void 0:J.splide)!=null&&re.root)){const ae=x.current.splide.root;if(Y&&(ae.contains(Y)||ae===Y))return}if(j.touches.length===0&&j.changedTouches.length>0){const ae=n[p],ne=(ae==null?void 0:ae.image.objectFit)==="cover",ue=j.changedTouches[0];let D;if(ne&&V.current){const X=Fo(V.current);D=ue.clientX>=X.left&&ue.clientX<=X.right&&ue.clientY>=X.top&&ue.clientY<=X.bottom}else{const X=V.current?Ao(V.current):null;if(!X)return;D=ue.clientX>=X.x&&ue.clientX<=X.x+X.width&&ue.clientY>=X.y&&ue.clientY<=X.y+X.height}if(!D){j.stopPropagation(),k.current=!0;const X=K=>{K.stopPropagation(),K.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),ee()}}}};return document.addEventListener("touchend",$,{passive:!0}),()=>{document.removeEventListener("touchend",$)}},[e,ee,p,n]);const U=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&G.type==="drag";v.useEffect(()=>{var K,se;if(!e||!U||!((se=(K=x.current)==null?void 0:K.splide)!=null&&se.root))return;const $=x.current.splide.root,j=30,Y=(oe,de)=>{if(E.current){const Ce=Math.abs(oe-E.current.x),Te=Math.abs(de-E.current.y);(Ce>0||Te>0)&&(z.current=!0)}},J=oe=>{E.current&&(oe.preventDefault(),Y(oe.clientX,oe.clientY))},re=oe=>{E.current&&oe.touches.length>0&&(oe.preventDefault(),Y(oe.touches[0].clientX,oe.touches[0].clientY))},ae=(oe,de)=>{if(!E.current||!x.current){E.current=null;return}const Ce=Math.abs(oe-E.current.x),Te=Math.abs(de-E.current.y);Te>j&&Te>Ce&&x.current.go(de<E.current.y?"+1":"-1"),E.current=null},ne=oe=>{E.current&&ae(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",J)},ue=oe=>{if(E.current){if(oe.changedTouches.length>0){const de=oe.changedTouches[0];ae(de.clientX,de.clientY)}document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),document.removeEventListener("touchmove",re)}},D=oe=>{E.current={x:oe.clientX,y:oe.clientY},z.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},X=oe=>{oe.touches.length>0&&(E.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue))};return $.addEventListener("pointerdown",D),$.addEventListener("touchstart",X),()=>{$.removeEventListener("pointerdown",D),$.removeEventListener("touchstart",X),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),E.current=null,z.current=!1}},[e,U,c]);const ie={backgroundColor:W.color,backdropFilter:`blur(${W.blur}px)`,animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:jo.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:r?null:T,className:ye(q.background,S?te:le,{[q.editor]:r},{[q.hidden]:!e}),style:{...ie,...u&&!r&&!S?{position:"absolute"}:{}}}),a.jsxs("div",{ref:r?T:null,className:ye(q.contentStyle,S?pe:Z,{[q.editor]:r},{[q.hidden]:!e}),style:{animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(so,{onMove:$=>d($.index),ref:x,className:q.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:G.type==="drag"&&!U,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:n.map(($,j)=>{const Y=Qt(H.position,H.offset,r),J=`${C.scalingValue(H.padding.top,r)} ${C.scalingValue(H.padding.right,r)} ${C.scalingValue(H.padding.bottom,r)} ${C.scalingValue(H.padding.left,r)}`,re=b.type==="scale"?(()=>{const{transform:ae,...ne}=Y;return{...ne,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ae||"none"}})():{...Y,position:"absolute",padding:J,boxSizing:"border-box"};return a.jsx(co,{children:a.jsx("div",{className:q.imgWrapper,onClick:me,children:a.jsx("img",{ref:j===p?V:null,className:ye(q.imageStyle,{[q.contain]:$.image.objectFit==="contain",[q.cover]:$.image.objectFit==="cover",[q.scaleSlide]:b.type==="scale"}),src:$.image.url,alt:$.image.name??"",style:{...re,pointerEvents:$.image.objectFit==="contain"?"none":"auto"}})})},j)})},c),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ye(q.arrow,{[q.arrowVertical]:b.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${C.scalingValue(F.offset.x,r)}, ${C.scalingValue(F.offset.y*(b.direction==="horiz"?1:-1),r)}) scale(${F.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var $;return($=x.current)==null?void 0:$.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&a.jsx(at,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:ye(q.arrowImg,q.mirror)}),!F.arrowsImgUrl&&a.jsx(Wo,{color:F.color,className:ye(q.arrowIcon,q.arrowImg,q.mirror)})]})}),a.jsx("div",{className:ye(q.arrow,q.nextArrow,{[q.arrowVertical]:b.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${C.scalingValue(F.offset.x*(b.direction==="horiz"?-1:1),r)}, ${C.scalingValue(F.offset.y,r)}) scale(${F.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var $;return($=x.current)==null?void 0:$.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&a.jsx(at,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:q.arrowImg}),!F.arrowsImgUrl&&a.jsx(Wo,{color:F.color,className:ye(q.arrowIcon,q.arrowImg)})]})})]}),W.closeIconUrl&&(()=>{const $=Qt(W.closeIconAlign,W.closeIconOffset,r),j=`scale(${W.closeIconScale})`,Y=$.transform?`${$.transform} ${j}`:j;return a.jsx("button",{className:q.closeButton,style:{...$,transform:Y},onClick:ee,"aria-label":"Close lightbox",children:a.jsx(at,{url:W.closeIconUrl,fill:W.closeIconColor??"#000000",hoverFill:W.closeIconHover??"#cccccc"})})})(),I&&I.isActive&&o.imageCaption&&((M=n[p])==null?void 0:M.imageCaption)&&(()=>{const{widthSettings:$,fontSettings:j,letterSpacing:Y,textAlign:J,wordSpacing:re,fontSizeLineHeight:ae,textAppearance:ne,color:ue}=o.imageCaption;return a.jsx("div",{className:q.caption,style:{...Qt(I.alignment,I.offset,r),fontFamily:wn(j.fontFamily),fontWeight:j.fontWeight,fontStyle:j.fontStyle,width:$.sizing==="auto"?"max-content":C.scalingValue($.width,r),letterSpacing:C.scalingValue(Y,r),wordSpacing:C.scalingValue(re,r),textAlign:J,fontSize:C.scalingValue(ae.fontSize,r),lineHeight:C.scalingValue(ae.lineHeight,r),textTransform:ne.textTransform??"none",textDecoration:ne.textDecoration??"none",fontVariant:ne.fontVariant??"normal",color:ue},onClick:D=>D.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:q.captionTextInner,style:{"--link-color":I.linkColor,"--link-hover-color":I.linkHoverColor},children:a.jsx(Bt,{content:n[p].imageCaption})})})})(),R.isActive&&(()=>{const[$,j]=R.position.split("-"),Y=b.direction==="horiz"?`${$}-left`:R.position,J=Qt(Y,R.offset,r),re=()=>{if(b.direction==="horiz"){if(j==="left")return"flex-start";if(j==="center")return"center";if(j==="right")return"flex-end"}else{if($==="top")return"flex-start";if($==="middle")return"center";if($==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:A,className:q.thumbsWrapper,onClick:ae=>ge(ae),style:{position:r?"absolute":"fixed",...J,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:ye(q.thumbsContainer,{[q.thumbsContainerVertical]:b.direction==="vert",[q.thumbsAlignStart]:R.align==="start",[q.thumbsAlignCenter]:R.align==="center",[q.thumbsAlignEnd]:R.align==="end"}),style:{gap:C.scalingValue(R.grid.gap,r),justifyContent:N?"flex-start":re()},children:n.map((ae,ne)=>{const ue=ne===p,D=w[ne],K=R.grid.size*(ue?R.activeState.scale:1),se=()=>{if(R.fit!=="fit")return{};if(!D)return b.direction==="horiz"?{height:C.scalingValue(K,r)}:{width:C.scalingValue(K,r)};const oe=D.width/D.height;if(b.direction==="horiz"){const de=K,Ce=de*oe;return{width:C.scalingValue(Ce,r),height:C.scalingValue(de,r)}}else{const de=K,Ce=de/oe;return{width:C.scalingValue(de,r),height:C.scalingValue(Ce,r)}}};return a.jsx("button",{className:q.thumbItem,style:{...b.direction==="horiz"&&R.fit!=="fit"?{height:C.scalingValue(K,r)}:{},...b.direction==="vert"&&R.fit!=="fit"?{width:C.scalingValue(K,r)}:{},...R.fit==="cover"?{width:C.scalingValue(K,r),height:C.scalingValue(K,r)}:{},...se(),transition:ue?"all 0.25s ease-out":"none",opacity:ue?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:oe=>{var de;oe.stopPropagation(),d(ne),(de=x.current)==null||de.go(ne)},onMouseEnter:()=>{var oe;R.triggers==="hov"&&((oe=x.current)==null||oe.go(ne))},children:a.jsx("img",{src:ae.image.url,alt:ae.image.name??"",onLoad:oe=>{const de=oe.currentTarget;de.naturalWidth&&de.naturalHeight&&y(Ce=>({...Ce,[ne]:{width:de.naturalWidth,height:de.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ae.image.name}-${ne}`)})})})})()]})]}),document.getElementById(l))};function Wo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Wl={element:Fl,id:"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 en(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rl(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Gt(48)};
11
+ min-height: ${en(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: ${Gt(4)};
35
+ gap: ${en(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: ${Gt(8)};
131
+ margin-top: ${en(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${Gt(8)};
135
+ margin-top: ${en(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 Ts({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=$.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:u=[],buttonLabel:c,gap:m,fieldsGap:l,buttonCorners:A,buttonStroke:S,buttonPadding:g,isButtonFullWidth:p,inputCorners:d,inputStroke:x,inputPadding:h,inputColor:y,inputTextColor:_,inputBorderColor:D,placeholderColor:W,buttonColor:E,buttonTextColor:b,buttonBorderColor:C,labelTextColor:F,successColor:j,errorColor:M,fontFamily:N,inputFontSettings:H,inputFontSize:B,inputLineHeight:U,inputLetterSpacing:f,inputWordSpacing:I,inputTextAppearance:k,buttonFontSettings:L,buttonFontSize:T,buttonLineHeight:R,buttonLetterSpacing:Z,buttonWordSpacing:ae,buttonTextAppearance:te,labelFontSettings:ce,labelFontSize:P,labelLineHeight:ee,labelLetterSpacing:fe,labelWordSpacing:de,labelTextAppearance:ge,statusFontSettings:G,statusFontSize:me,statusLineHeight:V,statusLetterSpacing:v,statusWordSpacing:q,statusTextAppearance:K,successMessage:Q,errorMessage:ie,stateOverrides:re}=e,ne=a==="B",ue=u.slice(0,Math.min(i,u.length)),z={fontSettings:{fontFamily:N,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:B??.01,lineHeight:U,letterSpacing:f??0,wordSpacing:I??0,textAppearance:k,color:_},X=ht(Re(z,t)),Y=$.scalingValue(x??0,t),se=$.scalingValue((U??B??.01)+((h==null?void 0:h.top)??0)+((h==null?void 0:h.bottom)??0)+(a==="C"?x??0:(x??0)*2),t),oe={...X,borderStyle:"solid",borderRadius:a==="C"?0:$.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Y,borderLeftWidth:0}:{borderWidth:Y},paddingTop:$.scalingValue((h==null?void 0:h.top)??0,t),paddingRight:$.scalingValue((h==null?void 0:h.right)??0,t),paddingBottom:$.scalingValue((h==null?void 0:h.bottom)??0,t),paddingLeft:$.scalingValue((h==null?void 0:h.left)??0,t),height:se,minHeight:se},pe={fontSettings:{fontFamily:N,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:T??.01,lineHeight:R,letterSpacing:Z??0,wordSpacing:ae??0,textAppearance:te,color:b},we=ht(Re(pe,t)),$e=$.scalingValue(S??0,t),lt={fontSettings:{fontFamily:N,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:P??.01,lineHeight:ee,letterSpacing:fe??0,wordSpacing:de??0,textAppearance:ge,color:F},Ye=Re(lt,t),xe={fontSettings:{fontFamily:N,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:me??.01,lineHeight:V,letterSpacing:v??0,wordSpacing:q??0,textAppearance:K,color:j},Me=ht(Re(xe,t)),nt=$.buildColorVars(r,{inputColor:y,inputTextColor:_,inputBorderColor:D,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:E,buttonTextColor:b,buttonBorderColor:C,labelTextColor:F,successColor:j,errorColor:M},_s,Es,re),[Ce,He]=w.useState(()=>Object.fromEntries(ue.map(he=>[he.name,""]))),[eo,wt]=w.useState("idle"),[mr,Bt]=w.useState(null),vn=o==="success"?"success":o==="error"?"error":eo,gr=o==="error"?ie:mr,Dt=o==="filled",$t=w.useMemo(()=>{if(!Dt)return Ce;let he=null;for(const je of ue)(Ce[je.name]??"").trim().length>0||(he=he??{...Ce},he[je.name]="Filled");return he??Ce},[Ce,Dt,ue]),fr=vn==="error"?$.getFormFieldValidationError(ue,$t):null,hr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),to=n==null?void 0:n.submitUrl,no=(he,je)=>{He(ze=>({...ze,[he]:je}))},yr=async he=>{he.preventDefault();const je=Object.fromEntries(ue.map(Le=>{var ct;return[Le.name,((ct=Ce[Le.name])==null?void 0:ct.trim())??""]}).filter(([,Le])=>Le));if(!to){wt("error"),Bt("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const ze=$.getFormFieldValidationError(ue,Ce);if(ze){wt("error"),Bt(ze);return}wt("submitting"),Bt(null);try{const Le=await fetch(to,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!Le.ok){const ct=await Le.text();throw new Error(ct||`Request failed: ${Le.status}`)}wt("success"),He(Object.fromEntries(ue.map(ct=>[ct.name,""])))}catch(Le){wt("error"),Bt(Le instanceof Error?Le.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${hr}`.trim(),style:nt,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:$s(r)}}),s.jsxs("form",{onSubmit:yr,className:`${r}-form`,style:{gap:$.scalingValue(m??0,t)},children:[s.jsx("div",{className:`${r}-fields`,style:{gap:$.scalingValue(l??0,t)},children:ue.map((he,je)=>s.jsxs("div",{className:`${r}-field-group${ne?` ${r}-labeled`:""}`,children:[ne&&s.jsx("span",{className:`${r}-field-label`,style:Ye?{...Ye,lineHeight:Ye.fontSize}:void 0,children:he.label||he.name}),he.type==="textarea"?s.jsx("textarea",{name:he.name,autoComplete:"off",value:$t[he.name]??"",onChange:ze=>no(he.name,ze.target.value),placeholder:he.placeholder,className:`${r}-input`,style:oe,rows:1,"data-filled":Dt||($t[he.name]??"").trim().length>0,"data-field-type":"textarea"}):s.jsx("input",{type:he.type==="phone"?"tel":he.type==="email"?"email":"text",name:he.name,autoComplete:"off",value:$t[he.name]??"",onChange:ze=>no(he.name,ze.target.value),placeholder:he.placeholder,required:he.isRequired??he.type==="email",className:`${r}-input`,style:oe,"data-filled":Dt||($t[he.name]??"").trim().length>0})]},je))}),s.jsx("div",{className:`${r}-overlay-anchor`,children:s.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:$.scalingValue(A??0,t),borderWidth:$e,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:s.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:eo==="submitting"?"...":c})})})]}),vn==="success"&&s.jsx("p",{className:`${r}-success`,style:{...Me},children:Q}),vn==="error"&&s.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:fr??gr??ie})]})}const _s={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"},Es=["hover","focus","filled","success","error"],As=`import React, { useMemo, useState } from 'react';
142
+ `}function Ml({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:i}=C.useScopedStyles(),{type:l="A",fieldsToShow:r=2,fields:s=[],buttonLabel:p,gap:d,fieldsGap:c,buttonCorners:L,buttonStroke:S,buttonPadding:h,isButtonFullWidth:u,inputCorners:m,inputStroke:w,inputPadding:y,inputColor:x,inputTextColor:_,inputBorderColor:V,placeholderColor:k,buttonColor:T,buttonTextColor:g,buttonBorderColor:f,labelTextColor:E,successColor:z,errorColor:A,fontFamily:N,inputFontSettings:O,inputFontSize:B,inputLineHeight:G,inputLetterSpacing:b,inputWordSpacing:R,inputTextAppearance:F,buttonFontSettings:W,buttonFontSize:I,buttonLineHeight:H,buttonLetterSpacing:Z,buttonWordSpacing:le,buttonTextAppearance:te,labelFontSettings:pe,labelFontSize:P,labelLineHeight:ee,labelLetterSpacing:he,labelWordSpacing:me,labelTextAppearance:ge,statusFontSettings:U,statusFontSize:ie,statusLineHeight:M,statusLetterSpacing:$,statusWordSpacing:j,statusTextAppearance:Y,successMessage:J,errorMessage:re,stateOverrides:ae}=e,ne=l==="B",ue=s.slice(0,Math.min(r,s.length)),D={fontSettings:{fontFamily:N,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:B??.01,lineHeight:G,letterSpacing:b??0,wordSpacing:R??0,textAppearance:F,color:_},X=Qe(Ie(D,t)),K=C.scalingValue(w??0,t),se=C.scalingValue((G??B??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(l==="C"?w??0:(w??0)*2),t),oe={...X,borderStyle:"solid",borderRadius:l==="C"?0:C.scalingValue(m??0,t),...l==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:K,borderLeftWidth:0}:{borderWidth:K},paddingTop:C.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:C.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:C.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:C.scalingValue((y==null?void 0:y.left)??0,t),height:se,minHeight:se},de={fontSettings:{fontFamily:N,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:I??.01,lineHeight:H,letterSpacing:Z??0,wordSpacing:le??0,textAppearance:te,color:g},Ce=Qe(Ie(de,t)),Te=C.scalingValue(S??0,t),Pe={fontSettings:{fontFamily:N,fontWeight:(pe==null?void 0:pe.fontWeight)??400,fontStyle:(pe==null?void 0:pe.fontStyle)??"normal"},fontSize:P??.01,lineHeight:ee,letterSpacing:he??0,wordSpacing:me??0,textAppearance:ge,color:E},je=Ie(Pe,t),be={fontSettings:{fontFamily:N,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:ie??.01,lineHeight:M,letterSpacing:$??0,wordSpacing:j??0,textAppearance:Y,color:z},Le=Qe(Ie(be,t)),Ue=C.buildColorVars(i,{inputColor:x,inputTextColor:_,inputBorderColor:V,placeholderColor:k!=null&&k.trim()?k:"#cccccc",buttonColor:T,buttonTextColor:g,buttonBorderColor:f,labelTextColor:E,successColor:z,errorColor:A},Pl,Hl,ae),[$e,Ae]=v.useState(()=>Object.fromEntries(ue.map(fe=>[fe.name,""]))),[xe,Fe]=v.useState("idle"),[nt,ke]=v.useState(null),Ve=o==="success"?"success":o==="error"?"error":xe,ot=o==="error"?re:nt,bt=o==="filled",dt=v.useMemo(()=>{if(!bt)return $e;let fe=null;for(const qe of ue)($e[qe.name]??"").trim().length>0||(fe=fe??{...$e},fe[qe.name]="Filled");return fe??$e},[$e,bt,ue]),_i=Ve==="error"?C.getFormFieldValidationError(ue,dt):null,Li=`${o&&o!=="default"?`${i}-state-${o}`:""}`.trim(),po=n==null?void 0:n.submitUrl,uo=(fe,qe)=>{Ae(Ke=>({...Ke,[fe]:qe}))},Ei=async fe=>{fe.preventDefault();const qe=Object.fromEntries(ue.map(He=>{var xt;return[He.name,((xt=$e[He.name])==null?void 0:xt.trim())??""]}).filter(([,He])=>He));if(!po){Fe("error"),ke("No integrations were found for this form.");return}if(Object.keys(qe).length===0)return;const Ke=C.getFormFieldValidationError(ue,$e);if(Ke){Fe("error"),ke(Ke);return}Fe("submitting"),ke(null);try{const He=await fetch(po,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qe)});if(!He.ok){const xt=await He.text();throw new Error(xt||`Request failed: ${He.status}`)}Fe("success"),Ae(Object.fromEntries(ue.map(xt=>[xt.name,""])))}catch(He){Fe("error"),ke(He instanceof Error?He.message:"Something went wrong")}};return a.jsxs("div",{className:`${i}-wrapper ${i}-type-${l} ${Li}`.trim(),style:Ue,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Rl(i)}}),a.jsxs("form",{onSubmit:Ei,className:`${i}-form`,style:{gap:C.scalingValue(d??0,t)},children:[a.jsx("div",{className:`${i}-fields`,style:{gap:C.scalingValue(c??0,t)},children:ue.map((fe,qe)=>a.jsxs("div",{className:`${i}-field-group${ne?` ${i}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${i}-field-label`,style:je?{...je,lineHeight:je.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?a.jsx("textarea",{name:fe.name,autoComplete:"off",value:dt[fe.name]??"",onChange:Ke=>uo(fe.name,Ke.target.value),placeholder:fe.placeholder,className:`${i}-input`,style:oe,rows:1,"data-filled":bt||(dt[fe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:dt[fe.name]??"",onChange:Ke=>uo(fe.name,Ke.target.value),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${i}-input`,style:oe,"data-filled":bt||(dt[fe.name]??"").trim().length>0})]},qe))}),a.jsx("div",{className:`${i}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${i}-button`,style:{borderStyle:"solid",borderRadius:C.scalingValue(L??0,t),borderWidth:Te,paddingTop:C.scalingValue((h==null?void 0:h.top)??0,t),paddingRight:C.scalingValue((h==null?void 0:h.right)??0,t),paddingBottom:C.scalingValue((h==null?void 0:h.bottom)??0,t),paddingLeft:C.scalingValue((h==null?void 0:h.left)??0,t),...Ce,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${i}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:xe==="submitting"?"...":p})})})]}),Ve==="success"&&a.jsx("p",{className:`${i}-success`,style:{...Le},children:J}),Ve==="error"&&a.jsx("p",{className:`${i}-error`,style:{...Le},role:"alert",children:_i??ot??re})]})}const Pl={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"},Hl=["hover","focus","filled","success","error"],Nl=`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
- `,ks=[{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"}],Yt={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"],Is={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Yt.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:{...Yt.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:{...Yt.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:{...Yt.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:ks,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"]},Fs={element:Ts,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:Is,sourceCode:As};function Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ps(e){return`
743
+ `,Ol=[{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"}],tn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],jl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...tn.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:{...tn.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:{...tn.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:{...tn.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:Ol,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","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["isButtonFullWidth"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...zl],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"]},Vl={element:Ml,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:jl,sourceCode:Nl};function nn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Bl(e){return`
744
744
  .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
922
922
  align-items: center;
923
923
  }
924
924
  .${e}-success {
925
- margin-top: ${Xt(8)};
926
- font-size: ${Xt(14)};
925
+ margin-top: ${nn(8)};
926
+ font-size: ${nn(14)};
927
927
  color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
929
  .${e}-error {
930
- margin-top: ${Xt(8)};
931
- font-size: ${Xt(14)};
930
+ margin-top: ${nn(8)};
931
+ font-size: ${nn(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Ms=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=$.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:c=1,fontFamily:m,inputFontSettings:l,inputFontSize:A,inputLineHeight:S,inputLetterSpacing:g,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:x,buttonFontSize:h,buttonLineHeight:y,buttonLetterSpacing:_,buttonWordSpacing:D,buttonTextAppearance:W,statusFontSettings:E,statusFontSize:b,statusLineHeight:C,statusLetterSpacing:F,statusWordSpacing:j,statusTextAppearance:M,iconMaxWidth:N,minHeight:H,corners:B,stroke:U,stateOverrides:f,inputPadding:I,buttonPadding:k,successMessage:L="Thanks for subscribing!",errorMessage:T="Please, fill all required fields."}=e,R=a.slice(0,Math.min(c,a.length)),[Z,ae]=w.useState(()=>Object.fromEntries(R.map(xe=>[xe.name,""]))),[te,ce]=w.useState("idle"),[P,ee]=w.useState(null),fe=o==="success"?"success":o==="error"?"error":te,de=o==="error"?T:P,ge=o==="filled",G=w.useMemo(()=>{if(!ge)return Z;let xe=null;for(const Me of R)(Z[Me.name]??"").trim().length>0||(xe=xe??{...Z},xe[Me.name]="Filled");return xe??Z},[ge,Z,R]),me=fe==="error"?$.getFormFieldValidationError(R,G):null,V=o&&o!=="default"?`${r}-state-${o}`:"",v=R.some(xe=>(G[xe.name]??"").trim().length>0),q=V!==`${r}-state-filled`&&v?`${r}-state-filled`:"",K=`${V} ${q}`.trim(),Q=n==null?void 0:n.submitUrl,ie=u??"",re=(i==null?void 0:i.icon)??"",ne=(i==null?void 0:i.mode)==="On",ue=ie||"Submit",z={fontSettings:{fontFamily:m,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:A??.01,lineHeight:S,letterSpacing:g??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:m,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:h??.01,lineHeight:y,letterSpacing:_??0,wordSpacing:D??0,textAppearance:W,color:e.buttonTextColor??"#ffffff"},Y={fontSettings:{fontFamily:m,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:b??.01,lineHeight:C,letterSpacing:F??0,wordSpacing:j??0,textAppearance:M,color:e.successColor??"#22c55e"},se=ht(Re(z,t)),oe=ht(Re(X,t)),pe=ht(Re(Y,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??(z==null?void 0:z.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},Rs,Ws,f),$e={borderRadius:$.scalingValue(B,t),borderWidth:$.scalingValue(U,t),borderStyle:"solid"},lt={borderLeftWidth:$.scalingValue(U,t)},Ye=async xe=>{xe.preventDefault();const Me=Object.fromEntries(R.map(Ce=>{var He;return[Ce.name,((He=Z[Ce.name])==null?void 0:He.trim())??""]}).filter(([,Ce])=>Ce));if(!Q){ce("error"),ee("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const nt=$.getFormFieldValidationError(R,Z);if(nt){ce("error"),ee(nt);return}ce("submitting"),ee(null);try{const Ce=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const He=await Ce.text();throw new Error(He||`Request failed: ${Ce.status}`)}ce("success"),ae(Object.fromEntries(R.map(He=>[He.name,""])))}catch(Ce){ce("error"),ee(Ce instanceof Error?Ce.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${K}`.trim(),style:we,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Ps(r)}}),s.jsxs("form",{onSubmit:Ye,className:`${r}-form`,style:{...$e,height:$.scalingValue(H,t),minHeight:$.scalingValue(H,t)},children:[s.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:R.map(xe=>s.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:G[xe.name]??"",onChange:Me=>ae(nt=>({...nt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...se,paddingRight:$.scalingValue(I.right,t),paddingLeft:$.scalingValue(I.left,t),paddingTop:$.scalingValue(I.top,t),paddingBottom:$.scalingValue(I.bottom,t)}},xe.name))}),s.jsx("div",{className:`${r}-overlayAnchor`,children:s.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ue,style:{...oe,...lt,paddingRight:$.scalingValue(k.right,t),paddingLeft:$.scalingValue(k.left,t),paddingTop:$.scalingValue(k.top,t),paddingBottom:$.scalingValue(k.bottom,t)},children:te==="submitting"?"...":ne?re&&s.jsx(Ke,{url:re,className:`${r}-submitBtnIcon`,style:{maxWidth:$.scalingValue(N??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ie})})]}),fe==="success"&&s.jsx("p",{className:`${r}-success`,style:{...pe},children:L}),fe==="error"&&s.jsx("p",{className:`${r}-error`,style:{...pe},role:"alert",children:me??de??T})]})},Rs={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"},Ws=["hover","focus","filled","success","error"],Ns=`import React, { useMemo, useState } from 'react';
934
+ `}const Dl=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:i}=C.useScopedStyles(),{fields:l=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:r,buttonLabel:s,fieldsToShow:p=1,fontFamily:d,inputFontSettings:c,inputFontSize:L,inputLineHeight:S,inputLetterSpacing:h,inputWordSpacing:u,inputTextAppearance:m,buttonFontSettings:w,buttonFontSize:y,buttonLineHeight:x,buttonLetterSpacing:_,buttonWordSpacing:V,buttonTextAppearance:k,statusFontSettings:T,statusFontSize:g,statusLineHeight:f,statusLetterSpacing:E,statusWordSpacing:z,statusTextAppearance:A,iconMaxWidth:N,minHeight:O,corners:B,stroke:G,stateOverrides:b,inputPadding:R,buttonPadding:F,successMessage:W="Thanks for subscribing!",errorMessage:I="Please, fill all required fields."}=e,H=l.slice(0,Math.min(p,l.length)),[Z,le]=v.useState(()=>Object.fromEntries(H.map(be=>[be.name,""]))),[te,pe]=v.useState("idle"),[P,ee]=v.useState(null),he=o==="success"?"success":o==="error"?"error":te,me=o==="error"?I:P,ge=o==="filled",U=v.useMemo(()=>{if(!ge)return Z;let be=null;for(const Le of H)(Z[Le.name]??"").trim().length>0||(be=be??{...Z},be[Le.name]="Filled");return be??Z},[ge,Z,H]),ie=he==="error"?C.getFormFieldValidationError(H,U):null,M=o&&o!=="default"?`${i}-state-${o}`:"",$=H.some(be=>(U[be.name]??"").trim().length>0),j=M!==`${i}-state-filled`&&$?`${i}-state-filled`:"",Y=`${M} ${j}`.trim(),J=n==null?void 0:n.submitUrl,re=s??"",ae=(r==null?void 0:r.icon)??"",ne=(r==null?void 0:r.mode)==="On",ue=re||"Submit",D={fontSettings:{fontFamily:d,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:L??.01,lineHeight:S,letterSpacing:h??0,wordSpacing:u??0,textAppearance:m,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:d,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:y??.01,lineHeight:x,letterSpacing:_??0,wordSpacing:V??0,textAppearance:k,color:e.buttonTextColor??"#ffffff"},K={fontSettings:{fontFamily:d,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:g??.01,lineHeight:f,letterSpacing:E??0,wordSpacing:z??0,textAppearance:A,color:e.successColor??"#22c55e"},se=Qe(Ie(D,t)),oe=Qe(Ie(X,t)),de=Qe(Ie(K,t)),Ce=C.buildColorVars(i,{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??(X==null?void 0:X.color)??"#ffffff"},Gl,Ul,b),Te={borderRadius:C.scalingValue(B,t),borderWidth:C.scalingValue(G,t),borderStyle:"solid"},Pe={borderLeftWidth:C.scalingValue(G,t)},je=async be=>{be.preventDefault();const Le=Object.fromEntries(H.map($e=>{var Ae;return[$e.name,((Ae=Z[$e.name])==null?void 0:Ae.trim())??""]}).filter(([,$e])=>$e));if(!J){pe("error"),ee("No integrations were found for this form.");return}if(Object.keys(Le).length===0)return;const Ue=C.getFormFieldValidationError(H,Z);if(Ue){pe("error"),ee(Ue);return}pe("submitting"),ee(null);try{const $e=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Le)});if(!$e.ok){const Ae=await $e.text();throw new Error(Ae||`Request failed: ${$e.status}`)}pe("success"),le(Object.fromEntries(H.map(Ae=>[Ae.name,""])))}catch($e){pe("error"),ee($e instanceof Error?$e.message:"Something went wrong")}};return a.jsxs("div",{className:`${i}-wrapper ${Y}`.trim(),style:Ce,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Bl(i)}}),a.jsxs("form",{onSubmit:je,className:`${i}-form`,style:{...Te,height:C.scalingValue(O,t),minHeight:C.scalingValue(O,t)},children:[a.jsx("div",{className:`${i}-inputWrap ${i}-overlayAnchor`,style:{flex:1,minWidth:0},children:H.map(be=>a.jsx("input",{type:be.type==="email"?"email":be.type==="phone"?"tel":"text",name:be.name,autoComplete:"off",value:U[be.name]??"",onChange:Le=>le(Ue=>({...Ue,[be.name]:Le.target.value})),placeholder:be.placeholder,required:be.isRequired??be.type==="email",className:`${i}-input`,style:{...se,paddingRight:C.scalingValue(R.right,t),paddingLeft:C.scalingValue(R.left,t),paddingTop:C.scalingValue(R.top,t),paddingBottom:C.scalingValue(R.bottom,t)}},be.name))}),a.jsx("div",{className:`${i}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${i}-submitBtn`,"aria-label":ue,style:{...oe,...Pe,paddingRight:C.scalingValue(F.right,t),paddingLeft:C.scalingValue(F.left,t),paddingTop:C.scalingValue(F.top,t),paddingBottom:C.scalingValue(F.bottom,t)},children:te==="submitting"?"...":ne?ae&&a.jsx(at,{url:ae,className:`${i}-submitBtnIcon`,style:{maxWidth:C.scalingValue(N??0,t)},fill:`var(--${i}-button-text-color)`,hoverFill:`var(--${i}-button-text-color)`}):re})})]}),he==="success"&&a.jsx("p",{className:`${i}-success`,style:{...de},children:W}),he==="error"&&a.jsx("p",{className:`${i}-error`,style:{...de},role:"alert",children:ie??me??I})]})},Gl={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"},Ul=["hover","focus","filled","success","error"],ql=`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
- `,Vs="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>'),Hs=[{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"}}}},js=["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",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Hs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Vs},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"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:[...js],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"]},Os={element:Ms,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:Ns};function To(e){return`
1506
+ `,Kl="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>'),Yl=[{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."}],An={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Xl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Zl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...An.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:{...An.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:{...An.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:Yl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Kl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Xl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Jl={element:Dl,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:Zl,sourceCode:ql};function Ro(e){return`
1507
1507
  .${e}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
@@ -1590,7 +1590,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1590
1590
  pointer-events: auto;
1591
1591
  z-index: 10;
1592
1592
  }
1593
- `}const Bs=30,Ds=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),{autoplay:a,align:i,speed:u,direction:c,pauseOnHover:m,gap:l,cardWidth:A,corners:S,stroke:g,strokeColor:p,bgColor:d,padding:x,logoMarginTop:h,logoWidth:y,logoHeight:_,captionMarginTop:D}=e,W=a==="on"&&!o,E=W,b=Math.max(0,u)*Bs,C=z=>$.scalingValue(z,n??!1),F=w.useRef(null),j=w.useRef(null),M=w.useRef(null),[N,H]=w.useState(0),[B,U]=w.useState(0),[f,I]=w.useState(0),k=E&&m==="on",[L,T]=w.useState(!1),R=w.useRef(null),[Z,ae]=w.useState(0),[te,ce]=w.useState(0),P=w.useRef(null),ee=z=>{var Y,se,oe,pe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${z}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${z}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${z}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${z}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${z}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${z}LineHeight`])??.01,color:(e==null?void 0:e[`${z}Color`])??"#000000"}},fe=ee("text"),de=ee("caption"),ge=w.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(z=>{var X,Y;return(((X=z.text)==null?void 0:X.length)??0)>0||(((Y=z.caption)==null?void 0:Y.length)??0)>0}),[t]),G=w.useMemo(()=>!W||(t==null?void 0:t.length)===0?1:B<=0||N<=0?2:Math.max(2,Math.ceil(N/B)+1),[W,t==null?void 0:t.length,B,N]);w.useLayoutEffect(()=>{if(!W)return;const z=F.current,X=M.current;if(!z||!X)return;let Y=0;const se=()=>{const we=z.getBoundingClientRect().width,$e=X.getBoundingClientRect().width,lt=P.current,Ye=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(P.current=$e,H(we),typeof $e=="number"&&$e>0&&B<=0){U($e);return}Ye&&$e!==B?U($e):!Ye&&B<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(se))},oe=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(se)};oe();const pe=new ResizeObserver(oe);return pe.observe(z),pe.observe(X),()=>{cancelAnimationFrame(Y),pe.disconnect()}},[W,B]),w.useLayoutEffect(()=>{const z=j.current;if(!W||!z||!E)return;const X=B>0?B:0,Y=X>0&&b>0?X/b*1e3:0,se=`${Math.max(0,Y)/1e3}s`;z.style.setProperty("--marquee-distance",`${X}px`),z.style.setProperty("--marquee-duration",se)},[W,E,b,B]),w.useLayoutEffect(()=>{if(!W){I(0);return}const z=j.current;if(!z)return;const X=()=>{const se=z.getBoundingClientRect().height;I(se>0?se:0)};X();const Y=new ResizeObserver(X);return Y.observe(z),()=>{Y.disconnect()}},[W,G,t,n,l,A,x,g,S,y,_]);const me=()=>{k&&T(!0)},V=()=>{k&&T(!1)},v=w.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),q=w.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),K=w.useCallback((z,X,Y,se)=>s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[s.jsx("div",{"data-controls":se==null?void 0:se.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:C((se==null?void 0:se.marginTop)??0)}}),s.jsx("div",{...se!=null&&se.dataMeasureKind?{"data-testimonial-measure":se.dataMeasureKind}:{},style:{...Re(z,n),textAlign:q,pointerEvents:"auto",...typeof(se==null?void 0:se.minHeightPx)=="number"&&se.minHeightPx>0?{minHeight:se.minHeightPx}:{}},children:s.jsx(Mt,{content:X})})]},Y),[v,q,n]),Q=w.useCallback((z,X,Y)=>{var se,oe,pe;return s.jsxs("div",{style:{padding:`${C(x.top)} ${C(x.right)} ${C(x.bottom)} ${C(x.left)}`,width:C(A+g*2),height:"100%",borderRadius:C(S),border:`${C(g)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[s.jsx("div",{className:`${r}-cover`,style:{background:d}}),s.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:v,textAlign:q},children:[z.text&&K(fe,z.text,"text",Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Y==null?void 0:Y.textMinHeightPx)=="number"&&Y.textMinHeightPx>0?{minHeightPx:Y.textMinHeightPx}:void 0),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[s.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:C(h)}}),s.jsx("div",{style:{width:C(y),height:C(_)},children:((se=z.logo)==null?void 0:se.url)&&s.jsx("img",{src:z.logo.url,alt:((oe=z.logo)==null?void 0:oe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=z.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),z.caption&&K(de,z.caption,"caption",{controlsName:"captionMarginTop",marginTop:D,...Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Y==null?void 0:Y.captionMinHeightPx)=="number"&&Y.captionMinHeightPx>0?{minHeightPx:Y.captionMinHeightPx}:{}})]})]},X)},[d,D,de,A,S,_,h,y,v,q,x.bottom,x.left,x.right,x.top,K,g,p,fe,n]),ie=w.useCallback(z=>{ae(z.maxTextPx),ce(z.maxCaptionPx)},[]);w.useLayoutEffect(()=>{if(!ge){ie({maxTextPx:0,maxCaptionPx:0});return}const z=R.current;if(!z)return;const X=()=>{$.readTestimonialTextMeasure(z,ie)};X();const Y=new ResizeObserver(X);return Y.observe(z),()=>{Y.disconnect()}},[ge,ie,t,Q]);const re=ge?{textMinHeightPx:Z,captionMinHeightPx:te}:void 0,ne=ge?s.jsx("div",{ref:R,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((z,X)=>Q(z,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,ue=(z,X)=>s.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Q(z,`card-${X}`,re),n&&s.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(l)})`,width:C(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);return W&&((t==null?void 0:t.length)??0)>0?s.jsxs("div",{ref:F,className:ye(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),ne,s.jsx("div",{ref:j,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:me,onMouseLeave:V,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...k?{"--marquee-play-state":L?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:G},(z,X)=>s.jsx("div",{ref:X===0?M:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(l),paddingRight:C(l)},"aria-hidden":X>0,children:t==null?void 0:t.map((Y,se)=>ue(Y,`${X}-${se}`))},`set-${X}`))})]}):s.jsxs("div",{className:`${r}-wrapper`,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),ne,s.jsx("div",{style:{gap:C(l),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((z,X)=>ue(z,X))})]})},qs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
1593
+ `}const Ql=30,es=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=C.useScopedStyles(),{autoplay:l,align:r,speed:s,direction:p,pauseOnHover:d,gap:c,cardWidth:L,corners:S,stroke:h,strokeColor:u,bgColor:m,padding:w,logoMarginTop:y,logoWidth:x,logoHeight:_,captionMarginTop:V}=e,k=l==="on"&&!o,T=k,g=Math.max(0,s)*Ql,f=D=>C.scalingValue(D,n??!1),E=v.useRef(null),z=v.useRef(null),A=v.useRef(null),[N,O]=v.useState(0),[B,G]=v.useState(0),[b,R]=v.useState(0),F=T&&d==="on",[W,I]=v.useState(!1),H=v.useRef(null),[Z,le]=v.useState(0),[te,pe]=v.useState(0),P=v.useRef(null),ee=D=>{var K,se,oe,de,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${D}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${D}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:oe.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"}},he=ee("text"),me=ee("caption"),ge=v.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(D=>{var X,K;return(((X=D.text)==null?void 0:X.length)??0)>0||(((K=D.caption)==null?void 0:K.length)??0)>0}),[t]),U=v.useMemo(()=>!k||(t==null?void 0:t.length)===0?1:B<=0||N<=0?2:Math.max(2,Math.ceil(N/B)+1),[k,t==null?void 0:t.length,B,N]);v.useLayoutEffect(()=>{if(!k)return;const D=E.current,X=A.current;if(!D||!X)return;let K=0;const se=()=>{const Ce=D.getBoundingClientRect().width,Te=X.getBoundingClientRect().width,Pe=P.current,je=typeof Pe=="number"&&Math.abs(Pe-Te)<=.25;if(P.current=Te,O(Ce),typeof Te=="number"&&Te>0&&B<=0){G(Te);return}je&&Te!==B?G(Te):!je&&B<=0&&(cancelAnimationFrame(K),K=requestAnimationFrame(se))},oe=()=>{cancelAnimationFrame(K),K=requestAnimationFrame(se)};oe();const de=new ResizeObserver(oe);return de.observe(D),de.observe(X),()=>{cancelAnimationFrame(K),de.disconnect()}},[k,B]),v.useLayoutEffect(()=>{const D=z.current;if(!k||!D||!T)return;const X=B>0?B:0,K=X>0&&g>0?X/g*1e3:0,se=`${Math.max(0,K)/1e3}s`;D.style.setProperty("--marquee-distance",`${X}px`),D.style.setProperty("--marquee-duration",se)},[k,T,g,B]),v.useLayoutEffect(()=>{if(!k){R(0);return}const D=z.current;if(!D)return;const X=()=>{const se=D.getBoundingClientRect().height;R(se>0?se:0)};X();const K=new ResizeObserver(X);return K.observe(D),()=>{K.disconnect()}},[k,U,t,n,c,L,w,h,S,x,_]);const ie=()=>{F&&I(!0)},M=()=>{F&&I(!1)},$=v.useMemo(()=>{switch(r){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[r]),j=v.useMemo(()=>{switch(r){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[r]),Y=v.useCallback((D,X,K,se)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":se==null?void 0:se.controlsName,"data-controls-axis":"y",className:`${i}-control`,style:{height:f((se==null?void 0:se.marginTop)??0)}}),a.jsx("div",{...se!=null&&se.dataMeasureKind?{"data-testimonial-measure":se.dataMeasureKind}:{},style:{...Ie(D,n),textAlign:j,pointerEvents:"auto",...typeof(se==null?void 0:se.minHeightPx)=="number"&&se.minHeightPx>0?{minHeight:se.minHeightPx}:{}},children:a.jsx(Bt,{content:X})})]},K),[$,j,n]),J=v.useCallback((D,X,K)=>{var se,oe,de;return a.jsxs("div",{style:{padding:`${f(w.top)} ${f(w.right)} ${f(w.bottom)} ${f(w.left)}`,width:f(L+h*2),height:"100%",borderRadius:f(S),border:`${f(h)} solid ${u}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${i}-cover`,style:{background:m}}),a.jsxs("div",{className:`${i}-elements-overlay`,style:{alignItems:$,textAlign:j},children:[D.text&&Y(he,D.text,"text",K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(K==null?void 0:K.textMinHeightPx)=="number"&&K.textMinHeightPx>0?{minHeightPx:K.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${i}-control`,style:{height:f(y)}}),a.jsx("div",{style:{width:f(x),height:f(_)},children:((se=D.logo)==null?void 0:se.url)&&a.jsx("img",{src:D.logo.url,alt:((oe=D.logo)==null?void 0:oe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((de=D.logo)==null?void 0:de.objectFit)||"contain"}})})]}),D.caption&&Y(me,D.caption,"caption",{controlsName:"captionMarginTop",marginTop:V,...K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(K==null?void 0:K.captionMinHeightPx)=="number"&&K.captionMinHeightPx>0?{minHeightPx:K.captionMinHeightPx}:{}})]})]},X)},[m,V,me,L,S,_,y,x,$,j,w.bottom,w.left,w.right,w.top,Y,h,u,he,n]),re=v.useCallback(D=>{le(D.maxTextPx),pe(D.maxCaptionPx)},[]);v.useLayoutEffect(()=>{if(!ge){re({maxTextPx:0,maxCaptionPx:0});return}const D=H.current;if(!D)return;const X=()=>{C.readTestimonialTextMeasure(D,re)};X();const K=new ResizeObserver(X);return K.observe(D),()=>{K.disconnect()}},[ge,re,t,J]);const ae=ge?{textMinHeightPx:Z,captionMinHeightPx:te}:void 0,ne=ge?a.jsx("div",{ref:H,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((D,X)=>J(D,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,ue=(D,X)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(D,`card-${X}`,ae),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(c)})`,width:f(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);return k&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:E,className:ye(`${i}-wrapper`,`${i}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...b>0?{height:b}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ro(i)}}),ne,a.jsx("div",{ref:z,className:`${i}-marquee-track`,"data-direction":p,onMouseEnter:ie,onMouseLeave:M,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...F?{"--marquee-play-state":W?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:U},(D,X)=>a.jsx("div",{ref:X===0?A:void 0,className:`${i}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(c),paddingRight:f(c)},"aria-hidden":X>0,children:t==null?void 0:t.map((K,se)=>ue(K,`${X}-${se}`))},`set-${X}`))})]}):a.jsxs("div",{className:`${i}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ro(i)}}),ne,a.jsx("div",{style:{gap:f(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((D,X)=>ue(D,X))})]})},ts=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
1594
1594
  import cn from 'classnames';
1595
1595
  import { CommonComponentProps } from '../props';
1596
1596
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2186,7 +2186,7 @@ type TestimonialsSettings = {
2186
2186
  logoHeight: number;
2187
2187
  captionMarginTop: number;
2188
2188
  };
2189
- `,_o={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Us={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{..._o.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{..._o.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},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"}]}]}]}},Gs={element:Ds,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:Us,sourceCode:qs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Ys(e){return`
2189
+ `,Mo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ns={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",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:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Mo.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:{...Mo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},os={element:es,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:"100%",height:320},schema:ns,sourceCode:ts,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function is(e){return`
2190
2190
  .${e}-container {
2191
2191
  position: relative;
2192
2192
  overflow-x: clip;
@@ -2310,7 +2310,7 @@ type TestimonialsSettings = {
2310
2310
  width: 100%;
2311
2311
  height: 100%;
2312
2312
  }
2313
- `}const Xs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),a=t||[],{autoplay:i,delay:u,align:c,width:m,imageMarginTop:l,textMarginTop:A,captionMarginTop:S,imageWidth:g,imageHeight:p,controlsWidth:d,controlsColor:x,controlsHoverColor:h}=e,y=i==="on"&&!o,[_,D]=w.useState(0),[W,E]=w.useState(null),[b,C]=w.useState(!1),F=w.useRef(null),j=w.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),M=w.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);w.useEffect(()=>{D(0),E(null),C(!1)},[a.length]);const N=a[_],H=W===null?null:a[W],B=G=>{var V,v,q,K,Q;return{fontSettings:{fontFamily:(e==null?void 0:e[`${G}FontFamily`])??"Arial",fontWeight:((V=e==null?void 0:e[`${G}FontSettings`])==null?void 0:V.fontWeight)??400,fontStyle:((v=e==null?void 0:e[`${G}FontSettings`])==null?void 0:v.fontStyle)??"normal"},textAppearance:{textTransform:((q=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:q.textTransform)??"none",textDecoration:((K=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:K.textDecoration)??"none",fontVariant:((Q=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:Q.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${G}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${G}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${G}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${G}WordSpacing`])??0,color:(e==null?void 0:e[`${G}Color`])??"#000000"}},U=B("text"),f=B("caption"),I=a.length>1&&a.some(G=>{var me,V;return(((me=G.text)==null?void 0:me.length)??0)>0||(((V=G.caption)==null?void 0:V.length)??0)>0}),k=w.useRef(null),[L,T]=w.useState(0),[R,Z]=w.useState(0),ae=e.controls??{mode:"Off",icon:null},te=a.length>1,ce=w.useCallback((G,me)=>!te||me===G?G:(F.current&&window.clearTimeout(F.current),E(G),C(!0),F.current=window.setTimeout(()=>{E(null),C(!1),F.current=null},300),me),[te]),P=w.useCallback(()=>{te&&D(G=>ce(G,(G-1+a.length)%a.length))},[te,ce,a.length]),ee=w.useCallback(()=>{te&&D(G=>ce(G,(G+1)%a.length))},[te,ce,a.length]);w.useEffect(()=>{if(!y||!te)return;const G=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),me=window.setInterval(()=>{D(V=>ce(V,(V+1)%a.length))},G);return()=>{window.clearInterval(me)}},[y,te,ce,a.length,u]),w.useEffect(()=>()=>{F.current&&window.clearTimeout(F.current)},[]);const fe=(G,me)=>{var K,Q,ie,re;const V=me==null?void 0:me.textMinHeightPx,v=me==null?void 0:me.captionMinHeightPx,q=me==null?void 0:me.dataMeasureAttrs;return s.jsxs(s.Fragment,{children:[G.text&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:j,width:"100%"},children:[s.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:$.scalingValue(A??0,n??!1)}}),s.jsx("div",{...q&&{"data-testimonial-measure":"text"},style:{...Re(U,n),...V&&V>0?{minHeight:V}:{},textAlign:M,pointerEvents:"auto"},children:s.jsx(Mt,{content:G.text})})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:j,width:"100%"},children:[s.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:$.scalingValue(l??0,n??!1)}}),s.jsx("div",{style:{width:$.scalingValue(g??0,n??!1),height:$.scalingValue(p??0,n??!1)},children:((K=G.image)==null?void 0:K.url)&&s.jsx("img",{src:(Q=G.image)==null?void 0:Q.url,alt:((ie=G.image)==null?void 0:ie.name)??"",className:`${r}-icon`,style:{objectFit:((re=G.image)==null?void 0:re.objectFit)||"contain"}})})]}),G.caption&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:j,width:"100%"},children:[s.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:$.scalingValue(S??0,n??!1)}}),s.jsx("div",{...q?{"data-testimonial-measure":"caption"}:{},style:{...Re(f,n),...v&&v>0?{minHeight:v}:{},textAlign:M,pointerEvents:"auto"},children:s.jsx(Mt,{content:G.caption})})]})]})},de=w.useCallback(G=>{T(G.maxTextPx),Z(G.maxCaptionPx)},[]);if(w.useLayoutEffect(()=>{if(!I){de({maxTextPx:0,maxCaptionPx:0});return}const G=k.current;if(!G)return;const me=()=>{$.readTestimonialTextMeasure(G,de)};me();const V=new ResizeObserver(me);return V.observe(G),()=>{V.disconnect()}},[I,de,t]),!N)return s.jsx(s.Fragment,{});const ge=I?{textMinHeightPx:L,captionMinHeightPx:R}:void 0;return s.jsx(s.Fragment,{children:s.jsxs("div",{className:`${r}-container`,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Ys(r)}}),s.jsxs("div",{className:`${r}-wrapper`,style:{width:$.scalingValue(m??0,n??!1),alignItems:j},children:[I&&s.jsx("div",{ref:k,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((G,me)=>s.jsx("div",{style:{width:"100%"},children:fe(G,{dataMeasureAttrs:!0})},me))}),s.jsxs("div",{className:`${r}-fade-stack`,children:[H&&b&&s.jsx("div",{className:ye(`${r}-fade-item-prev`,`${r}-fade-out`),children:fe(H,ge)}),s.jsx("div",{className:ye(`${r}-fade-item-current`,b?`${r}-fade-in`:void 0),children:fe(N,ge)})]})]}),ae.mode==="On"&&s.jsxs("div",{className:`${r}-controls`,children:[s.jsx("div",{className:`${r}-arrow`,style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":h},children:s.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:P,disabled:!te,"aria-label":"Previous testimonial",children:ae.icon&&s.jsx(Ke,{url:ae.icon,fill:x,hoverFill:h,className:ye(`${r}-arrow-img`,`${r}-mirror`)})})}),s.jsx("div",{className:ye(`${r}-arrow`,`${r}-next-arrow`),style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":h},children:s.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ee,disabled:!te,"aria-label":"Next testimonial",children:ae.icon&&s.jsx(Ke,{url:ae.icon,fill:x,hoverFill:h,className:`${r}-arrow-img`})})})]})]})})},Ks=`import cn from 'classnames';
2313
+ `}const rs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:i}=C.useScopedStyles(),l=t||[],{autoplay:r,delay:s,align:p,width:d,imageMarginTop:c,textMarginTop:L,captionMarginTop:S,imageWidth:h,imageHeight:u,controlsWidth:m,controlsColor:w,controlsHoverColor:y}=e,x=r==="on"&&!o,[_,V]=v.useState(0),[k,T]=v.useState(null),[g,f]=v.useState(!1),E=v.useRef(null),z=v.useMemo(()=>{switch(p){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[p]),A=v.useMemo(()=>{switch(p){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[p]);v.useEffect(()=>{V(0),T(null),f(!1)},[l.length]);const N=l[_],O=k===null?null:l[k],B=U=>{var M,$,j,Y,J;return{fontSettings:{fontFamily:(e==null?void 0:e[`${U}FontFamily`])??"Arial",fontWeight:((M=e==null?void 0:e[`${U}FontSettings`])==null?void 0:M.fontWeight)??400,fontStyle:(($=e==null?void 0:e[`${U}FontSettings`])==null?void 0:$.fontStyle)??"normal"},textAppearance:{textTransform:((j=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:j.textTransform)??"none",textDecoration:((Y=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:Y.textDecoration)??"none",fontVariant:((J=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:J.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${U}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${U}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${U}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${U}WordSpacing`])??0,color:(e==null?void 0:e[`${U}Color`])??"#000000"}},G=B("text"),b=B("caption"),R=l.length>1&&l.some(U=>{var ie,M;return(((ie=U.text)==null?void 0:ie.length)??0)>0||(((M=U.caption)==null?void 0:M.length)??0)>0}),F=v.useRef(null),[W,I]=v.useState(0),[H,Z]=v.useState(0),le=e.controls??{mode:"Off",icon:null},te=l.length>1,pe=v.useCallback((U,ie)=>!te||ie===U?U:(E.current&&window.clearTimeout(E.current),T(U),f(!0),E.current=window.setTimeout(()=>{T(null),f(!1),E.current=null},300),ie),[te]),P=v.useCallback(()=>{te&&V(U=>pe(U,(U-1+l.length)%l.length))},[te,pe,l.length]),ee=v.useCallback(()=>{te&&V(U=>pe(U,(U+1)%l.length))},[te,pe,l.length]);v.useEffect(()=>{if(!x||!te)return;const U=Math.max(300,Number.isFinite(s*1e3)?s*1e3:0),ie=window.setInterval(()=>{V(M=>pe(M,(M+1)%l.length))},U);return()=>{window.clearInterval(ie)}},[x,te,pe,l.length,s]),v.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const he=(U,ie)=>{var Y,J,re,ae;const M=ie==null?void 0:ie.textMinHeightPx,$=ie==null?void 0:ie.captionMinHeightPx,j=ie==null?void 0:ie.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[U.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${i}-control`,style:{height:C.scalingValue(L??0,n??!1)}}),a.jsx("div",{...j&&{"data-testimonial-measure":"text"},style:{...Ie(G,n),...M&&M>0?{minHeight:M}:{},textAlign:A,pointerEvents:"auto"},children:a.jsx(Bt,{content:U.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${i}-control`,style:{height:C.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:C.scalingValue(h??0,n??!1),height:C.scalingValue(u??0,n??!1)},children:((Y=U.image)==null?void 0:Y.url)&&a.jsx("img",{src:(J=U.image)==null?void 0:J.url,alt:((re=U.image)==null?void 0:re.name)??"",className:`${i}-icon`,style:{objectFit:((ae=U.image)==null?void 0:ae.objectFit)||"contain"}})})]}),U.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:z,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${i}-control`,style:{height:C.scalingValue(S??0,n??!1)}}),a.jsx("div",{...j?{"data-testimonial-measure":"caption"}:{},style:{...Ie(b,n),...$&&$>0?{minHeight:$}:{},textAlign:A,pointerEvents:"auto"},children:a.jsx(Bt,{content:U.caption})})]})]})},me=v.useCallback(U=>{I(U.maxTextPx),Z(U.maxCaptionPx)},[]);if(v.useLayoutEffect(()=>{if(!R){me({maxTextPx:0,maxCaptionPx:0});return}const U=F.current;if(!U)return;const ie=()=>{C.readTestimonialTextMeasure(U,me)};ie();const M=new ResizeObserver(ie);return M.observe(U),()=>{M.disconnect()}},[R,me,t]),!N)return a.jsx(a.Fragment,{});const ge=R?{textMinHeightPx:W,captionMinHeightPx:H}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${i}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:is(i)}}),a.jsxs("div",{className:`${i}-wrapper`,style:{width:C.scalingValue(d??0,n??!1),alignItems:z},children:[R&&a.jsx("div",{ref:F,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((U,ie)=>a.jsx("div",{style:{width:"100%"},children:he(U,{dataMeasureAttrs:!0})},ie))}),a.jsxs("div",{className:`${i}-fade-stack`,children:[O&&g&&a.jsx("div",{className:ye(`${i}-fade-item-prev`,`${i}-fade-out`),children:he(O,ge)}),a.jsx("div",{className:ye(`${i}-fade-item-current`,g?`${i}-fade-in`:void 0),children:he(N,ge)})]})]}),le.mode==="On"&&a.jsxs("div",{className:`${i}-controls`,children:[a.jsx("div",{className:`${i}-arrow`,style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":y},children:a.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:P,disabled:!te,"aria-label":"Previous testimonial",children:le.icon&&a.jsx(at,{url:le.icon,fill:w,hoverFill:y,className:ye(`${i}-arrow-img`,`${i}-mirror`)})})}),a.jsx("div",{className:ye(`${i}-arrow`,`${i}-next-arrow`),style:{width:C.scalingValue(m??.02,n??!1),height:C.scalingValue(m??.02,n??!1),"--arrow-hover-color":y},children:a.jsx("button",{type:"button",className:`${i}-arrow-inner`,onClick:ee,disabled:!te,"aria-label":"Next testimonial",children:le.icon&&a.jsx(at,{url:le.icon,fill:w,hoverFill:y,className:`${i}-arrow-img`})})})]})]})})},as=`import cn from 'classnames';
2314
2314
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2315
2315
  import { CommonComponentProps } from '../props';
2316
2316
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2802,4 +2802,1298 @@ type TestimonialsSettings = {
2802
2802
  icon?: string | null;
2803
2803
  };
2804
2804
  };
2805
- `,Zs="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>'),Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Js={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:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...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"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...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"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Zs},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:"Charter",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"}]}]}]}},Qs={element:Xs,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:Js,sourceCode:Ks,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},el=[Aa,Ra,ws,Fs,Os,Gs,Qs];exports.components=el;exports.isSchemaV1=br;
2805
+ `,ls="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>'),Po={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ss={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Po.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:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Po.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:"Text Color"}},defaults:{autoplay:"on",controls:{mode:"On",icon:ls},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:"Charter",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},cs={element:rs,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:ss,sourceCode:as,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ps(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function us(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ds(e){return`
2806
+ .${e}-wrapper {
2807
+ display: grid;
2808
+ align-items: start;
2809
+ min-height: ${us(48)};
2810
+ }
2811
+ .${e}-item {
2812
+ display: flex;
2813
+ flex-direction: column;
2814
+ justify-content: center;
2815
+ align-items: center;
2816
+ }
2817
+ .${e}-item-inner {
2818
+ display: flex;
2819
+ flex-direction: column;
2820
+ align-items: center;
2821
+ outline: 1px solid #ccc;
2822
+ }
2823
+ .${e}-item-inner-hidden {
2824
+ display: flex;
2825
+ flex-direction: column;
2826
+ align-items: center;
2827
+ }
2828
+ .${e}-item-image-wrapper {
2829
+ display: flex;
2830
+ justify-content: center;
2831
+ align-items: center;
2832
+ }
2833
+ .${e}-item-image-link {
2834
+ width: 100%;
2835
+ height: 100%;
2836
+ display: flex;
2837
+ flex-direction: column;
2838
+ align-items: center;
2839
+ }
2840
+ .${e}-item-image {
2841
+ width: 100%;
2842
+ height: 100%;
2843
+ display: block;
2844
+ }
2845
+ .${e}-item-slider,
2846
+ .${e}-item-slider .splide__track,
2847
+ .${e}-item-slider .splide__list,
2848
+ .${e}-item-slider .splide__slide {
2849
+ width: 100%;
2850
+ height: 100%;
2851
+ }
2852
+ .${e}-item-slider .splide__slide {
2853
+ display: flex;
2854
+ justify-content: center;
2855
+ align-items: center;
2856
+ }
2857
+ .${e}-item-title {
2858
+ white-space: normal;
2859
+ overflow-wrap: anywhere;
2860
+ word-break: break-word;
2861
+ text-align: center;
2862
+ margin-bottom: 0px;
2863
+ margin-top: 0px;
2864
+ color: var(--${e}-title-color);
2865
+ }
2866
+ .${e}-item-subtitle {
2867
+ white-space: normal;
2868
+ overflow-wrap: anywhere;
2869
+ word-break: break-word;
2870
+ text-align: center;
2871
+ margin-bottom: 0px;
2872
+ margin-top: 0px;
2873
+ color: var(--${e}-subtitle-color);
2874
+ }
2875
+
2876
+ .${e}-control {
2877
+ position: relative;
2878
+ z-index: 2;
2879
+ width: 100%;
2880
+ }
2881
+
2882
+ .${e}-control::before {
2883
+ content: "";
2884
+ position: absolute;
2885
+ top: 0;
2886
+ left: 0;
2887
+ width: 100%;
2888
+ height: 100%;
2889
+ min-height: 20px;
2890
+ pointer-events: auto;
2891
+ z-index: 10;
2892
+ }
2893
+ `}const it=500,gt="cubic-bezier(0.22, 1, 0.36, 1)";function ms({images:e,index:t,imageDisplay:n,originRect:o,reverseClose:i,onClose:l,onPrev:r,onNext:s}){const p=v.useRef(null),d=v.useRef(null),[c,L]=v.useState(null),[S,h]=v.useState(o?"opening":"open"),[u,m]=v.useState(!0),w=v.useRef(t),y=v.useCallback(()=>{const g=p.current,f=d.current;if(!g||!f)return;const E=g.getBoundingClientRect(),z=E.width,A=E.height,N=f.naturalWidth,O=f.naturalHeight;if(!z||!A||!N||!O)return;if(n==="Cover"){L({width:z,height:A,left:E.left,top:E.top});return}const B=N/O,G=z/A;if(B>G){const b=z/B;L({width:z,height:b,left:E.left,top:E.top+(A-b)/2})}else{const b=A*B;L({width:b,height:A,left:E.left+(z-b)/2,top:E.top})}},[n]);v.useEffect(()=>{y();const g=p.current;if(!g)return;const f=new ResizeObserver(()=>y());return f.observe(g),()=>f.disconnect()},[y,t]),v.useEffect(()=>{if(S!=="opening"||!c)return;const g={id:0};return g.id=requestAnimationFrame(()=>{g.id=requestAnimationFrame(()=>h("open"))}),()=>cancelAnimationFrame(g.id)},[S,c]),v.useEffect(()=>{if(S!=="closing")return;const g=setTimeout(()=>l(),it);return()=>clearTimeout(g)},[S,l]),v.useEffect(()=>{w.current!==t&&m(!1),w.current=t},[t]);const x=()=>{S!=="closing"&&h("closing")},_=S==="open",V=S==="closing",k=V&&i&&!!o,T=S==="opening"?o??c:k?o:c;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:x,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:_?1:0,transition:`opacity ${it}ms ${gt}`,pointerEvents:"none"}}),a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:p,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:_?1:0,transition:`opacity ${it}ms ${gt}`,fontFamily:ps()},children:e.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("p",{children:t+1}),a.jsx("p",{children:"/"}),a.jsx("p",{children:e.length})]})})]}),T&&a.jsx("img",{ref:d,src:e[t],onLoad:y,style:{position:"fixed",top:T.top,left:T.left,width:T.width,height:T.height,objectFit:n==="Cover"?"cover":"contain",opacity:V&&!k?0:1,transition:V&&!k?`opacity ${it}ms ${gt}`:k||u?`top ${it}ms ${gt}, left ${it}ms ${gt}, width ${it}ms ${gt}, height ${it}ms ${gt}`:"none",pointerEvents:"none",zIndex:9998}}),_&&c&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:c.top,left:c.left,width:c.width/2,height:c.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),r()}}),a.jsx("div",{style:{position:"fixed",top:c.top,left:c.left+c.width/2,width:c.width/2,height:c.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),s()}})]})]})}function gs({settings:e,content:t,isEditor:n,isPreviewMode:o,metadata:i,activeEvent:l,layoutId:r}){const{prefix:s}=C.useScopedStyles(),{type:p="A",gridLayout:d,textBoxWidth:c,verticalGap:L,entriesCount:S,lightbox:h,imageDisplay:u,slider:m,sliderTiming:w,direction:y,transition:x,titleMarginTop:_,subtitleMarginTop:V,titleColor:k,subtitleColor:T,titleFontFamily:g,titleFontSettings:f,titleFontSize:E,titleLineHeight:z,titleLetterSpacing:A,titleWordSpacing:N,titleTextAppearance:O,subtitleFontFamily:B,subtitleFontSettings:G,subtitleFontSize:b,subtitleLineHeight:R,subtitleLetterSpacing:F,subtitleWordSpacing:W,subtitleTextAppearance:I}=e,H={fontSettings:{fontFamily:g,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:E??.01,lineHeight:z,letterSpacing:A??0,wordSpacing:N??0,textAppearance:O,color:k},le={...Qe(Ie(H,n))},te={fontSettings:{fontFamily:B,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:b??.01,lineHeight:R,letterSpacing:F??0,wordSpacing:W??0,textAppearance:I,color:T},P={...Qe(Ie(te,n))},ee=C.buildColorVars(s,{titleColor:k,subtitleColor:T},hs,fs),me=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),ge=S===0?1/0:S,U=(t??[]).slice(0,ge),ie=d.entryWidth??.2,M=(u==null?void 0:u.display)==="Cover",$=(u==null?void 0:u.ratioValue)??"1:1",j=(u==null?void 0:u.reversed)??!1,[Y,J]=$.split(":").map(Number),re=j?J:Y,ae=j?Y:J,ne=`${re} / ${ae}`,ue=re>=ae,D={objectFit:M?"cover":"contain",...M&&{aspectRatio:ne,width:ue?"100%":"auto",height:ue?"auto":"100%"}},[X,K]=v.useState("ltr"),[se,oe]=v.useState(0),de=v.useRef(null);v.useEffect(()=>{const xe=de.current;if(!xe)return;const Fe=new ResizeObserver(nt=>{oe(Math.round(nt[0].contentRect.width))});return Fe.observe(xe),()=>Fe.disconnect()},[]);const[Ce,Te]=v.useState(!1),[Pe,je]=v.useState([]),[be,Le]=v.useState(0),[Ue,$e]=v.useState(null),Ae=(xe,Fe,nt)=>{if(h==="Off")return;const ke=xe.currentTarget.getBoundingClientRect();$e({top:ke.top,left:ke.left,width:ke.width,height:ke.height}),je(Fe),Le(nt),Te(!0)};return v.useEffect(()=>{if(!Ce||h!=="On"||typeof document>"u")return;const xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xe}},[Ce,h]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ds(s)}}),a.jsx("div",{style:ee,children:a.jsx("div",{ref:de,className:`${s}-wrapper ${s}-type-${p} ${me}`.trim(),style:{gridTemplateColumns:`repeat(${d.columnsCount}, minmax(0, 1fr))`,rowGap:C.scalingValue(L??0,n),columnGap:C.scalingValue(d.horizontalGap??0,n),width:C.scalingValue(d.wrapperWidth??0,n)},children:U.map((xe,Fe)=>{var nt,ke;return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:o?`${s}-item-inner`:`${s}-item-inner-hidden`,style:{width:(c??0)>100?`calc(${C.scalingValue(ie??0,n)} * (${c} / 100))`:C.scalingValue(ie??0,n)},children:a.jsxs("a",{href:(((nt=xe.link)==null?void 0:nt.length)??0)>0&&h==="Off"?xe.link:void 0,target:"_blank",className:`${s}-item-image-link`,children:[a.jsx("div",{className:`${s}-item-image-wrapper`,style:{width:C.scalingValue(ie??0,n),height:C.scalingValue(ie??0,n)},children:(((ke=xe.image)==null?void 0:ke.length)??0)===0?null:m==="Off"?a.jsx("img",{src:xe.image[0].url,alt:xe.image[0].name,className:`${s}-item-image`.trim(),style:D,onClick:Ve=>Ae(Ve,xe.image.map(ot=>ot.url),0)}):a.jsx(so,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:w*1e3,width:"100%",height:"100%",speed:500,type:x==="Fade"?"fade":"loop",rewind:x==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:x==="Fade"?"ltr":y!=="Random"?y==="Horizontal"?"ltr":"ttb":X},onMoved:Ve=>{if(y!=="Random"||x==="Fade")return;const ot=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";K(ot),setTimeout(()=>{Ve.refresh()},0)},children:xe.image.map((Ve,ot)=>a.jsx(co,{children:a.jsx("img",{src:Ve.url,alt:Ve.name,className:`${s}-item-image`.trim(),style:D,onClick:bt=>Ae(bt,xe.image.map(dt=>dt.url),ot)})},ot))},`${x}-${ie}-${y}-${w}-${se}-${r}`)}),a.jsx("div",{"data-controls":"titleMarginTop",className:`${s}-control`,style:{height:C.scalingValue(_??0,n),width:C.scalingValue(ie*c/100,n)}}),a.jsx("p",{className:`${s}-item-title`.trim(),style:{width:`calc(${C.scalingValue(ie??0,n)} * (${c} / 100))`,...le},children:xe.title}),p==="B"&&a.jsx("div",{"data-controls":"subtitleMarginTop",className:`${s}-control`,style:{height:C.scalingValue(V??0,n),width:C.scalingValue(ie*c/100,n)}}),p==="B"&&a.jsx("p",{className:`${s}-item-subtitle`.trim(),style:{width:`calc(${C.scalingValue(ie??0,n)} * (${c} / 100))`,...P},children:xe.subtitle})]})})},Fe)})})}),Ce&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&h==="On"&&jo.createPortal(a.jsx("div",{"data-selection":"none",children:a.jsx(ms,{images:Pe,index:be,imageDisplay:u.display,originRect:Ue,reverseClose:m==="Off",onClose:()=>Te(!1),onPrev:()=>Le(xe=>(xe-1+Pe.length)%Pe.length),onNext:()=>Le(xe=>(xe+1)%Pe.length)})}),document.body)]})}const hs={titleColor:"title-color",subtitleColor:"subtitle-color"},fs=["hover","focus","filled","success","error"],ys=`import { Splide, SplideSlide } from '@splidejs/react-splide';
2894
+ import '@splidejs/react-splide/css/core';
2895
+ import { CommonComponentProps } from '../props';
2896
+ import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
2897
+ import { useCallback, useEffect, useRef, useState } from 'react';
2898
+ import { createPortal } from 'react-dom';
2899
+ import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
2900
+ import { getFontBasedOnSystem } from '../utils/getMainFontBaseOnSystem';
2901
+
2902
+ function sv(px: number): string {
2903
+ return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
2904
+ }
2905
+
2906
+ function getCSS(P: string): string {
2907
+ return \`
2908
+ .\${P}-wrapper {
2909
+ display: grid;
2910
+ align-items: start;
2911
+ min-height: \${sv(48)};
2912
+ }
2913
+ .\${P}-item {
2914
+ display: flex;
2915
+ flex-direction: column;
2916
+ justify-content: center;
2917
+ align-items: center;
2918
+ }
2919
+ .\${P}-item-inner {
2920
+ display: flex;
2921
+ flex-direction: column;
2922
+ align-items: center;
2923
+ outline: 1px solid #ccc;
2924
+ }
2925
+ .\${P}-item-inner-hidden {
2926
+ display: flex;
2927
+ flex-direction: column;
2928
+ align-items: center;
2929
+ }
2930
+ .\${P}-item-image-wrapper {
2931
+ display: flex;
2932
+ justify-content: center;
2933
+ align-items: center;
2934
+ }
2935
+ .\${P}-item-image-link {
2936
+ width: 100%;
2937
+ height: 100%;
2938
+ display: flex;
2939
+ flex-direction: column;
2940
+ align-items: center;
2941
+ }
2942
+ .\${P}-item-image {
2943
+ width: 100%;
2944
+ height: 100%;
2945
+ display: block;
2946
+ }
2947
+ .\${P}-item-slider,
2948
+ .\${P}-item-slider .splide__track,
2949
+ .\${P}-item-slider .splide__list,
2950
+ .\${P}-item-slider .splide__slide {
2951
+ width: 100%;
2952
+ height: 100%;
2953
+ }
2954
+ .\${P}-item-slider .splide__slide {
2955
+ display: flex;
2956
+ justify-content: center;
2957
+ align-items: center;
2958
+ }
2959
+ .\${P}-item-title {
2960
+ white-space: normal;
2961
+ overflow-wrap: anywhere;
2962
+ word-break: break-word;
2963
+ text-align: center;
2964
+ margin-bottom: 0px;
2965
+ margin-top: 0px;
2966
+ color: var(--\${P}-title-color);
2967
+ }
2968
+ .\${P}-item-subtitle {
2969
+ white-space: normal;
2970
+ overflow-wrap: anywhere;
2971
+ word-break: break-word;
2972
+ text-align: center;
2973
+ margin-bottom: 0px;
2974
+ margin-top: 0px;
2975
+ color: var(--\${P}-subtitle-color);
2976
+ }
2977
+
2978
+ .\${P}-control {
2979
+ position: relative;
2980
+ z-index: 2;
2981
+ width: 100%;
2982
+ }
2983
+
2984
+ .\${P}-control::before {
2985
+ content: "";
2986
+ position: absolute;
2987
+ top: 0;
2988
+ left: 0;
2989
+ width: 100%;
2990
+ height: 100%;
2991
+ min-height: 20px;
2992
+ pointer-events: auto;
2993
+ z-index: 10;
2994
+ }
2995
+ \`;
2996
+ }
2997
+
2998
+ type GridProps = {
2999
+ layoutId?: string;
3000
+ settings: GridSettings;
3001
+ content?: any;
3002
+ isEditor?: boolean;
3003
+ isPreviewMode?: boolean;
3004
+ activeEvent: string | undefined;
3005
+ onUpdateSettings?: (settings: GridSettings) => void;
3006
+ } & CommonComponentProps;
3007
+
3008
+ type AnimRect = { top: number; left: number; width: number; height: number };
3009
+
3010
+ type LightboxProps = {
3011
+ images: string[];
3012
+ index: number;
3013
+ imageDisplay: 'Fit' | 'Cover';
3014
+ originRect: AnimRect | null;
3015
+ reverseClose: boolean;
3016
+ onClose: () => void;
3017
+ onPrev: () => void;
3018
+ onNext: () => void;
3019
+ };
3020
+
3021
+ const LIGHTBOX_ANIM_MS = 500;
3022
+ const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
3023
+
3024
+ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext }: LightboxProps) {
3025
+ const ghostRef = useRef<HTMLDivElement>(null);
3026
+ const imgRef = useRef<HTMLImageElement>(null);
3027
+ const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
3028
+ const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');
3029
+ const [transitionsEnabled, setTransitionsEnabled] = useState(true);
3030
+ const prevIndexRef = useRef(index);
3031
+
3032
+ const computeFinalRect = useCallback(() => {
3033
+ const ghost = ghostRef.current;
3034
+ const img = imgRef.current;
3035
+ if (!ghost || !img) return;
3036
+ const cb = ghost.getBoundingClientRect();
3037
+ const cw = cb.width;
3038
+ const ch = cb.height;
3039
+ const nw = img.naturalWidth;
3040
+ const nh = img.naturalHeight;
3041
+ if (!cw || !ch || !nw || !nh) return;
3042
+ if (imageDisplay === 'Cover') {
3043
+ setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });
3044
+ return;
3045
+ }
3046
+ const ir = nw / nh;
3047
+ const cr = cw / ch;
3048
+ if (ir > cr) {
3049
+ const dh = cw / ir;
3050
+ setFinalRect({ width: cw, height: dh, left: cb.left, top: cb.top + (ch - dh) / 2 });
3051
+ } else {
3052
+ const dw = ch * ir;
3053
+ setFinalRect({ width: dw, height: ch, left: cb.left + (cw - dw) / 2, top: cb.top });
3054
+ }
3055
+ }, [imageDisplay]);
3056
+
3057
+ useEffect(() => {
3058
+ computeFinalRect();
3059
+ const c = ghostRef.current;
3060
+ if (!c) return;
3061
+ const ro = new ResizeObserver(() => computeFinalRect());
3062
+ ro.observe(c);
3063
+ return () => ro.disconnect();
3064
+ }, [computeFinalRect, index]);
3065
+
3066
+ useEffect(() => {
3067
+ if (phase !== 'opening' || !finalRect) return;
3068
+ const handle = { id: 0 };
3069
+ handle.id = requestAnimationFrame(() => {
3070
+ handle.id = requestAnimationFrame(() => setPhase('open'));
3071
+ });
3072
+ return () => cancelAnimationFrame(handle.id);
3073
+ }, [phase, finalRect]);
3074
+
3075
+ useEffect(() => {
3076
+ if (phase !== 'closing') return;
3077
+ const t = setTimeout(() => onClose(), LIGHTBOX_ANIM_MS);
3078
+ return () => clearTimeout(t);
3079
+ }, [phase, onClose]);
3080
+
3081
+ useEffect(() => {
3082
+ if (prevIndexRef.current !== index) {
3083
+ setTransitionsEnabled(false);
3084
+ }
3085
+ prevIndexRef.current = index;
3086
+ }, [index]);
3087
+
3088
+ const handleClose = () => {
3089
+ if (phase === 'closing') return;
3090
+ setPhase('closing');
3091
+ };
3092
+
3093
+ const isOpen = phase === 'open';
3094
+ const isClosing = phase === 'closing';
3095
+ const reverseAnimateClose = isClosing && reverseClose && !!originRect;
3096
+ const animatedRect = phase === 'opening'
3097
+ ? (originRect ?? finalRect)
3098
+ : reverseAnimateClose
3099
+ ? originRect
3100
+ : finalRect;
3101
+
3102
+ return (
3103
+ <div
3104
+ style={{
3105
+ position: 'fixed',
3106
+ top: 0,
3107
+ left: 0,
3108
+ width: '100vw',
3109
+ height: '100vh',
3110
+ zIndex: 9997,
3111
+ }}
3112
+ onClick={handleClose}
3113
+ >
3114
+ <div
3115
+ style={{
3116
+ position: 'absolute',
3117
+ inset: 0,
3118
+ background: 'rgba(28,31,34,0.9)',
3119
+ opacity: isOpen ? 1 : 0,
3120
+ transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
3121
+ pointerEvents: 'none',
3122
+ }}
3123
+ />
3124
+ <div
3125
+ style={{
3126
+ position: 'relative',
3127
+ width: '100%',
3128
+ height: '100%',
3129
+ display: 'flex',
3130
+ flexDirection: 'column',
3131
+ alignItems: 'center',
3132
+ justifyContent: 'center',
3133
+ }}
3134
+ >
3135
+ <div style={{ height: '10%' }}></div>
3136
+ <div
3137
+ style={{
3138
+ width: '70%',
3139
+ height: '80%',
3140
+ display: 'flex',
3141
+ justifyContent: 'center',
3142
+ alignItems: 'center'
3143
+ }}>
3144
+ <div ref={ghostRef} style={{ width: '100%', height: '100%' }} />
3145
+ </div>
3146
+ <div
3147
+ style={{
3148
+ display: 'flex',
3149
+ flexDirection: 'row',
3150
+ justifyContent: 'center',
3151
+ alignItems: 'center',
3152
+ height: '10%',
3153
+ color: '#E6E6E6',
3154
+ letterSpacing: '-0.6px',
3155
+ lineHeight: '16px',
3156
+ opacity: isOpen ? 1 : 0,
3157
+ transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
3158
+ fontFamily: getFontBasedOnSystem(),
3159
+ }}
3160
+ >
3161
+ {images.length > 1 &&
3162
+ <>
3163
+ <p>{index + 1}</p>
3164
+ <p>/</p>
3165
+ <p>{images.length}</p>
3166
+ </>
3167
+ }
3168
+ </div>
3169
+ </div>
3170
+
3171
+ {animatedRect && (
3172
+ <img
3173
+ ref={imgRef}
3174
+ src={images[index]}
3175
+ onLoad={computeFinalRect}
3176
+ style={{
3177
+ position: 'fixed',
3178
+ top: animatedRect.top,
3179
+ left: animatedRect.left,
3180
+ width: animatedRect.width,
3181
+ height: animatedRect.height,
3182
+ objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain',
3183
+ opacity: isClosing && !reverseAnimateClose ? 0 : 1,
3184
+ transition: isClosing && !reverseAnimateClose
3185
+ ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
3186
+ : (reverseAnimateClose || transitionsEnabled)
3187
+ ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
3188
+ : 'none',
3189
+ pointerEvents: 'none',
3190
+ zIndex: 9998,
3191
+ }}
3192
+ />
3193
+ )}
3194
+
3195
+ {isOpen && finalRect && (
3196
+ <>
3197
+ <div
3198
+ style={{
3199
+ position: 'fixed',
3200
+ top: finalRect.top,
3201
+ left: finalRect.left,
3202
+ width: finalRect.width / 2,
3203
+ height: finalRect.height,
3204
+ cursor: 'w-resize',
3205
+ zIndex: 9999,
3206
+ }}
3207
+ onClick={(e) => {
3208
+ e.stopPropagation();
3209
+ onPrev();
3210
+ }}
3211
+ />
3212
+ <div
3213
+ style={{
3214
+ position: 'fixed',
3215
+ top: finalRect.top,
3216
+ left: finalRect.left + finalRect.width / 2,
3217
+ width: finalRect.width / 2,
3218
+ height: finalRect.height,
3219
+ cursor: 'e-resize',
3220
+ zIndex: 9999,
3221
+ }}
3222
+ onClick={(e) => {
3223
+ e.stopPropagation();
3224
+ onNext();
3225
+ }}
3226
+ />
3227
+ </>
3228
+ )}
3229
+ </div>
3230
+ );
3231
+ }
3232
+
3233
+ export function Grid({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: GridProps) {
3234
+ const { prefix: P } = useScopedStyles();
3235
+ const {
3236
+ type = 'A',
3237
+ gridLayout,
3238
+ textBoxWidth,
3239
+ verticalGap,
3240
+ entriesCount,
3241
+ lightbox,
3242
+ imageDisplay,
3243
+ slider,
3244
+ sliderTiming,
3245
+ direction,
3246
+ transition,
3247
+ titleMarginTop,
3248
+ subtitleMarginTop,
3249
+ titleColor,
3250
+ subtitleColor,
3251
+ titleFontFamily,
3252
+ titleFontSettings,
3253
+ titleFontSize,
3254
+ titleLineHeight,
3255
+ titleLetterSpacing,
3256
+ titleWordSpacing,
3257
+ titleTextAppearance,
3258
+ subtitleFontFamily,
3259
+ subtitleFontSettings,
3260
+ subtitleFontSize,
3261
+ subtitleLineHeight,
3262
+ subtitleLetterSpacing,
3263
+ subtitleWordSpacing,
3264
+ subtitleTextAppearance,
3265
+ } = settings;
3266
+
3267
+ const resolvedTitleTextStyle: TextStyles = {
3268
+ fontSettings: {
3269
+ fontFamily: titleFontFamily,
3270
+ fontWeight: titleFontSettings?.fontWeight ?? 400,
3271
+ fontStyle: titleFontSettings?.fontStyle ?? 'normal',
3272
+ },
3273
+ fontSize: titleFontSize ?? 0.01,
3274
+ lineHeight: titleLineHeight,
3275
+ letterSpacing: titleLetterSpacing ?? 0,
3276
+ wordSpacing: titleWordSpacing ?? 0,
3277
+ textAppearance: titleTextAppearance,
3278
+ color: titleColor,
3279
+ };
3280
+ const titleTypographyCss = omitTextColors(textStylesToCss(resolvedTitleTextStyle, isEditor));
3281
+ const titleFieldCss = {
3282
+ ...titleTypographyCss,
3283
+ } as React.CSSProperties;
3284
+
3285
+ const resolvedSubtitleTextStyle: TextStyles = {
3286
+ fontSettings: {
3287
+ fontFamily: subtitleFontFamily,
3288
+ fontWeight: subtitleFontSettings?.fontWeight ?? 400,
3289
+ fontStyle: subtitleFontSettings?.fontStyle ?? 'normal',
3290
+ },
3291
+ fontSize: subtitleFontSize ?? 0.01,
3292
+ lineHeight: subtitleLineHeight,
3293
+ letterSpacing: subtitleLetterSpacing ?? 0,
3294
+ wordSpacing: subtitleWordSpacing ?? 0,
3295
+ textAppearance: subtitleTextAppearance,
3296
+ color: subtitleColor,
3297
+ };
3298
+ const subtitleTypographyCss = omitTextColors(textStylesToCss(resolvedSubtitleTextStyle, isEditor));
3299
+ const subtitleFieldCss = {
3300
+ ...subtitleTypographyCss,
3301
+ } as React.CSSProperties;
3302
+
3303
+ const colorVars = buildColorVars(P, {
3304
+ titleColor,
3305
+ subtitleColor,
3306
+ }, COLOR_VAR_MAP, STATE_KEYS);
3307
+
3308
+ const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
3309
+ const wrapperStateClasses = \`\${stateClass}\`.trim();
3310
+
3311
+ const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;
3312
+
3313
+ const cropContent = (content ?? []).slice(0, resEntriesCount);
3314
+
3315
+ const size = gridLayout.entryWidth ?? 0.2;
3316
+
3317
+ const isCover = imageDisplay?.display === 'Cover';
3318
+ const ratioValue = imageDisplay?.ratioValue ?? '1:1';
3319
+ const ratioReversed = imageDisplay?.reversed ?? false;
3320
+ const [rW, rH] = ratioValue.split(':').map(Number);
3321
+ const effW = ratioReversed ? rH : rW;
3322
+ const effH = ratioReversed ? rW : rH;
3323
+ const aspectRatio = \`\${effW} / \${effH}\`;
3324
+ const isLandscape = effW >= effH;
3325
+
3326
+ const imageStyle: React.CSSProperties = {
3327
+ objectFit: isCover ? 'cover' : 'contain',
3328
+ ...(isCover && {
3329
+ aspectRatio,
3330
+ width: isLandscape ? '100%' : 'auto',
3331
+ height: isLandscape ? 'auto' : '100%',
3332
+ }),
3333
+ };
3334
+
3335
+ const [dir, setDir] = useState('ltr');
3336
+ const [containerWidth, setContainerWidth] = useState(0);
3337
+ const containerRef = useRef<HTMLDivElement>(null);
3338
+
3339
+ useEffect(() => {
3340
+ const el = containerRef.current;
3341
+ if (!el) return;
3342
+ const ro = new ResizeObserver((entries) => {
3343
+ setContainerWidth(Math.round(entries[0].contentRect.width));
3344
+ });
3345
+ ro.observe(el);
3346
+ return () => ro.disconnect();
3347
+ }, []);
3348
+
3349
+ const [lightboxOpen, setLightboxOpen] = useState(false);
3350
+ const [lightboxImages, setLightboxImages] = useState<string[]>([]);
3351
+ const [lightboxIndex, setLightboxIndex] = useState(0);
3352
+ const [lightboxOriginRect, setLightboxOriginRect] = useState<AnimRect | null>(null);
3353
+
3354
+ const openLightbox = (e: React.MouseEvent<HTMLImageElement>, urls: string[], idx: number) => {
3355
+ if (lightbox === 'Off') return;
3356
+ const r = e.currentTarget.getBoundingClientRect();
3357
+ setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });
3358
+ setLightboxImages(urls);
3359
+ setLightboxIndex(idx);
3360
+ setLightboxOpen(true);
3361
+ };
3362
+
3363
+ useEffect(() => {
3364
+ if (!lightboxOpen || lightbox !== 'On') return;
3365
+ if (typeof document === 'undefined') return;
3366
+ const prevOverflow = document.body.style.overflow;
3367
+ document.body.style.overflow = 'hidden';
3368
+ return () => {
3369
+ document.body.style.overflow = prevOverflow;
3370
+ };
3371
+ }, [lightboxOpen, lightbox]);
3372
+
3373
+ return (
3374
+ <>
3375
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
3376
+ <div style={colorVars}>
3377
+ <div
3378
+ ref={containerRef}
3379
+ className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()}
3380
+ style={{
3381
+ gridTemplateColumns: \`repeat(\${gridLayout.columnsCount}, minmax(0, 1fr))\`,
3382
+ rowGap: scalingValue(verticalGap ?? 0, isEditor),
3383
+ columnGap: scalingValue(gridLayout.horizontalGap ?? 0, isEditor),
3384
+ width: scalingValue(gridLayout.wrapperWidth ?? 0, isEditor)
3385
+ }}>
3386
+ {cropContent.map((item: any, index: number) => (
3387
+ <div
3388
+ key={index}
3389
+ className={\`\${P}-item\`.trim()}
3390
+ >
3391
+ <div
3392
+ className={isPreviewMode ? \`\${P}-item-inner\` : \`\${P}-item-inner-hidden\`}
3393
+ style={{ width: (textBoxWidth ?? 0) > 100 ? \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\` : scalingValue(size ?? 0, isEditor) }}
3394
+ >
3395
+ <a href={(item.link?.length ?? 0) > 0 && lightbox === 'Off' ? item.link : undefined} target='_blank' className={\`\${P}-item-image-link\`}>
3396
+ <div className={\`\${P}-item-image-wrapper\`} style={{ width: scalingValue(size ?? 0, isEditor), height: scalingValue(size ?? 0, isEditor) }}>
3397
+ {(item.image?.length ?? 0) === 0
3398
+ ? null
3399
+ : slider === 'Off'
3400
+ ?
3401
+ <img
3402
+ src={item.image[0].url}
3403
+ alt={item.image[0].name}
3404
+ className={\`\${P}-item-image\`.trim()}
3405
+ style={imageStyle}
3406
+ onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), 0)}
3407
+ />
3408
+ :
3409
+ <Splide
3410
+ key={\`\${transition}-\${size}-\${direction}-\${sliderTiming}-\${containerWidth}-\${layoutId}\`}
3411
+ className={\`\${P}-item-slider\`}
3412
+ options={{
3413
+ arrows: false,
3414
+ pagination: false,
3415
+ drag: false,
3416
+ perPage: 1,
3417
+ autoplay: true,
3418
+ interval: sliderTiming * 1000,
3419
+ width: '100%',
3420
+ height: '100%',
3421
+ speed: 500,
3422
+ type: transition === 'Fade' ? 'fade' : 'loop',
3423
+ rewind: transition === 'Fade',
3424
+ pauseOnHover: false,
3425
+ pauseOnFocus: false,
3426
+ direction: transition === 'Fade' ? 'ltr' : direction !== 'Random'
3427
+ ? direction === 'Horizontal'
3428
+ ? 'ltr'
3429
+ : 'ttb'
3430
+ : dir as 'ltr' | 'ttb' | 'rtl',
3431
+ }}
3432
+ onMoved={(splide) => {
3433
+ if (direction !== 'Random' || transition === 'Fade') return;
3434
+ const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : Math.random() > 0.5 ? 'btt' : 'ttb';
3435
+ setDir(next);
3436
+
3437
+ setTimeout(() => {
3438
+ splide.refresh();
3439
+ }, 0);
3440
+ }}
3441
+ >
3442
+ {item.image.map((img: { url: string; name?: string }, imgIndex: number) => (
3443
+ <SplideSlide key={imgIndex}>
3444
+ <img
3445
+ src={img.url}
3446
+ alt={img.name}
3447
+ className={\`\${P}-item-image\`.trim()}
3448
+ style={imageStyle}
3449
+ onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), imgIndex)}
3450
+ />
3451
+ </SplideSlide>
3452
+ ))}
3453
+ </Splide>
3454
+ }
3455
+ </div>
3456
+ <div
3457
+ data-controls="titleMarginTop"
3458
+ className={\`\${P}-control\`}
3459
+ style={{ height: scalingValue(titleMarginTop ?? 0, isEditor), width: scalingValue(size * textBoxWidth / 100, isEditor) }}
3460
+ />
3461
+ <p className={\`\${P}-item-title\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...titleFieldCss }}>
3462
+ {item.title}
3463
+ </p>
3464
+ {type === 'B' && <div
3465
+ data-controls="subtitleMarginTop"
3466
+ className={\`\${P}-control\`}
3467
+ style={{ height: scalingValue(subtitleMarginTop ?? 0, isEditor), width: scalingValue(size * textBoxWidth / 100, isEditor) }}
3468
+ />}
3469
+ {type === 'B' && <p className={\`\${P}-item-subtitle\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...subtitleFieldCss }}>
3470
+ {item.subtitle}
3471
+ </p>}
3472
+ </a>
3473
+ </div>
3474
+ </div>
3475
+ ))}
3476
+ </div>
3477
+ </div>
3478
+ {lightboxOpen && typeof document && document.getElementById("grid-component-lightbox-portal") && lightbox === 'On' &&
3479
+ createPortal(
3480
+ <div data-selection="none">
3481
+ <Lightbox
3482
+ images={lightboxImages}
3483
+ index={lightboxIndex}
3484
+ imageDisplay={imageDisplay.display}
3485
+ originRect={lightboxOriginRect}
3486
+ reverseClose={slider === 'Off'}
3487
+ onClose={() => setLightboxOpen(false)}
3488
+ onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}
3489
+ onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}
3490
+ />
3491
+ </div>,
3492
+ document.body
3493
+ )}
3494
+ </>
3495
+ );
3496
+ }
3497
+
3498
+ type GridLayoutConfig = {
3499
+ entryWidth: number;
3500
+ horizontalGap: number;
3501
+ wrapperWidth: number;
3502
+ columnsCount: number;
3503
+ lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
3504
+ };
3505
+
3506
+ type GridSettings = {
3507
+ type: 'A' | 'B';
3508
+ gridLayout: GridLayoutConfig;
3509
+ textBoxWidth: number;
3510
+ verticalGap: number;
3511
+ entriesCount: number;
3512
+ lightbox: 'On' | 'Off';
3513
+ imageDisplay: {
3514
+ display: 'Fit' | 'Cover';
3515
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
3516
+ reversed: boolean;
3517
+ };
3518
+ slider: 'On' | 'Off';
3519
+ sliderTiming: number;
3520
+ direction: 'Horizontal' | 'Vertical' | 'Random',
3521
+ transition: 'Fade' | 'Slide',
3522
+ titleMarginTop: number;
3523
+ subtitleMarginTop: number;
3524
+ titleColor: string;
3525
+ subtitleColor: string;
3526
+ titleFontFamily: string;
3527
+ titleFontSettings?: { fontWeight: number; fontStyle: string };
3528
+ titleFontSize?: number;
3529
+ titleLineHeight?: number;
3530
+ titleLetterSpacing?: number;
3531
+ titleWordSpacing?: number;
3532
+ titleTextAppearance?: TextStyles['textAppearance'];
3533
+ subtitleFontFamily: string;
3534
+ subtitleFontSettings?: { fontWeight: number; fontStyle: string };
3535
+ subtitleFontSize?: number;
3536
+ subtitleLineHeight?: number;
3537
+ subtitleLetterSpacing?: number;
3538
+ subtitleWordSpacing?: number;
3539
+ subtitleTextAppearance?: TextStyles['textAppearance'];
3540
+ };
3541
+
3542
+ type ColorKeys =
3543
+ | 'titleColor'
3544
+ | 'subtitleColor'
3545
+
3546
+ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
3547
+ titleColor: 'title-color',
3548
+ subtitleColor: 'subtitle-color',
3549
+ };
3550
+
3551
+ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
3552
+ `,Ho={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vs=["titleColor","subtitleColor"],bs={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]}},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",display:{type:"numeric-input",highlight:!0}},entryWidth:{type:"number",title:"Entry"},horizontalGap:{type:"number",title:"Gap"}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Ho.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Ho.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...vs],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},xs={element:gs,id:"grid",name:"Neptune",category:"grids",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:bs,sourceCode:ys};function Fn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ss(e){return`
3553
+ .${e}-wrapper {
3554
+ display: grid;
3555
+ align-items: start;
3556
+ min-height: ${Fn(48)};
3557
+ }
3558
+
3559
+ .${e}-list-item {
3560
+ display: flex;
3561
+ align-items: stretch;
3562
+ width: 100%;
3563
+ overflow: visible;
3564
+ position: relative;
3565
+ box-sizing: border-box;
3566
+ border-bottom-style: solid;
3567
+ border-bottom-color: var(--${e}-divider-color);
3568
+ user-select: none;
3569
+ background: var(--${e}-background-color);
3570
+ }
3571
+
3572
+ .${e}-list-item:first-child {
3573
+ border-top-style: solid;
3574
+ border-top-color: var(--${e}-divider-color);
3575
+ }
3576
+
3577
+ .${e}-list-col {
3578
+ flex-shrink: 0;
3579
+ overflow: visible;
3580
+ box-sizing: border-box;
3581
+ min-width: ${Fn(50)};
3582
+ position: relative;
3583
+ display: flex;
3584
+ align-items: center;
3585
+ }
3586
+
3587
+ .${e}-list-col-last {
3588
+ flex: 1 1 auto;
3589
+ min-width: ${Fn(50)};
3590
+ }
3591
+
3592
+ .${e}-list-col-title {
3593
+ color: var(--${e}-text-color);
3594
+ white-space: pre-wrap;
3595
+ overflow-wrap: anywhere;
3596
+ word-break: break-word;
3597
+ flex: 1;
3598
+ min-width: 0;
3599
+ width: 100%;
3600
+ }
3601
+
3602
+ .${e}-col-resize-handle {
3603
+ background: transparent;
3604
+ }
3605
+
3606
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item,
3607
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item {
3608
+ transition: background-color 250ms, border-color 250ms;
3609
+ }
3610
+
3611
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-col-title,
3612
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-col-title {
3613
+ transition: color 250ms;
3614
+ }
3615
+
3616
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item:hover,
3617
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-list-item {
3618
+ background: var(--${e}-background-hover-color);
3619
+ }
3620
+
3621
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item:hover,
3622
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item:has(+ .${e}-list-item:hover),
3623
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-list-item,
3624
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item:hover,
3625
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item:has(+ .${e}-list-item:hover),
3626
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item {
3627
+ border-bottom-color: var(--${e}-divider-hover-color);
3628
+ }
3629
+
3630
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item:hover:first-child,
3631
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-list-item:first-child,
3632
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item:hover:first-child,
3633
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item:first-child {
3634
+ border-top-color: var(--${e}-divider-hover-color);
3635
+ }
3636
+
3637
+ .${e}-wrapper.${e}-entry-hover-default .${e}-list-item:hover .${e}-list-col-title,
3638
+ .${e}-wrapper.${e}-entry-hover-default.${e}-state-hover .${e}-list-item .${e}-list-col-title,
3639
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item:hover .${e}-list-col-title,
3640
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item .${e}-list-col-title {
3641
+ color: var(--${e}-text-hover-color);
3642
+ }
3643
+
3644
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item::before {
3645
+ content: '';
3646
+ position: absolute;
3647
+ inset: 0;
3648
+ background: var(--${e}-background-hover-color);
3649
+ transform: scaleY(0);
3650
+ transform-origin: center center;
3651
+ transition: transform 250ms;
3652
+ z-index: 0;
3653
+ pointer-events: none;
3654
+ }
3655
+
3656
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-col {
3657
+ z-index: 1;
3658
+ }
3659
+
3660
+ .${e}-wrapper.${e}-entry-hover-blinds .${e}-list-item:hover::before,
3661
+ .${e}-wrapper.${e}-entry-hover-blinds.${e}-state-hover .${e}-list-item::before {
3662
+ transform: scaleY(1);
3663
+ }
3664
+ `}const No=["firstColumn","secondColumn","thirdColumn","fourthColumn","fifthColumn"],Oo=["firstColumnWidth","secondColumnWidth","thirdColumnWidth","fourthColumnWidth","fifthColumnWidth"],zo=.004,Ti=50,Cs=1440,jn=Ti/Cs;function $s(e,t,n){const o=t.reduce((i,l,r)=>r===e||r===t.length-1?i:i+l.width,0);return Math.max(jn,n-o-jn)}const Wt={firstColumnWidth:.02,secondColumnWidth:.02,thirdColumnWidth:.02,fourthColumnWidth:.02,fifthColumnWidth:.02};function ws({settings:e,content:t,isEditor:n,isPreviewMode:o,metadata:i,activeEvent:l,layoutId:r}){const{prefix:s}=C.useScopedStyles(),{columns:p,wrapperWidth:d,entriesCount:c,cellMinHeight:L,dividerWidth:S,cut:h,imageSize:u,imageOnHover:m,entryHoverEffect:w,firstColumnWidth:y,secondColumnWidth:x,thirdColumnWidth:_,fourthColumnWidth:V,fifthColumnWidth:k,textColor:T,textFontFamily:g,textFontSettings:f,textFontSize:E,textLineHeight:z,textLetterSpacing:A,textWordSpacing:N,textTextAppearance:O,backgroundColor:B,dividerColor:G,textHoverColor:b,backgroundHoverColor:R,dividerHoverColor:F}=e,W={fontSettings:{fontFamily:g,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:E??.01,lineHeight:z,letterSpacing:A??0,wordSpacing:N??0,textAppearance:O,color:T},H={...Qe(Ie(W,n))},Z=C.buildColorVars(s,{textColor:T,backgroundColor:B,dividerColor:G,textHoverColor:b,backgroundHoverColor:R,dividerHoverColor:F},Ts,_s),le=l&&l!=="default"?`${s}-state-${l}`:"",pe=`${w==="Default"?`${s}-entry-hover-default`:w==="Blinds"?`${s}-entry-hover-blinds`:""} ${le}`.trim(),P=v.useRef(null),ee={firstColumnWidth:y??Wt.firstColumnWidth,secondColumnWidth:x??Wt.secondColumnWidth,thirdColumnWidth:_??Wt.thirdColumnWidth,fourthColumnWidth:V??Wt.fourthColumnWidth,fifthColumnWidth:k??Wt.fifthColumnWidth},he=v.useMemo(()=>No.slice(0,p).map((U,ie)=>({key:U,widthKey:Oo[ie],width:ee[Oo[ie]]})),[p,y,x,_,V,k]),me=v.useMemo(()=>{const U=c===0?1/0:c;return(t??[]).slice(0,U).map((M,$)=>({id:$,cells:Object.fromEntries(No.map(j=>[j,M[j]??""]))}))},[t,c]),ge=U=>C.scalingValue(U,n??!1);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ss(s)}}),a.jsx("div",{style:Z,children:a.jsx("div",{ref:P,className:`${s}-wrapper ${pe}`.trim(),style:{width:C.scalingValue(d??0,n)},children:a.jsx("div",{style:{width:"100%"},children:me.map((U,ie)=>a.jsx("div",{className:`${s}-list-item`,style:{minHeight:ge(L??0),borderBottomWidth:C.scalingValue(S??0,n),...ie===0?{borderTopWidth:C.scalingValue(S??0,n)}:{}},children:he.map((M,$)=>{const j=$===he.length-1,J=$s($,he,d??1),re=Math.min(Math.max(M.width,jn),J);return a.jsxs("div",{className:`${s}-list-col${j?` ${s}-list-col-last`:""}`,style:j?void 0:{width:ge(re)},"data-test":M.width,children:[a.jsx("span",{className:`${s}-list-col-title`,style:H,children:U.cells[M.key]??null}),n&&!j&&a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-min":String(Ti),"data-controls-max-fraction":String(J),"data-controls-no-highlight":"",className:`${s}-col-resize-handle`,style:{position:"absolute",top:0,left:`calc(100% - ${ge(zo/2)})`,width:ge(zo),height:"100%",pointerEvents:"auto",zIndex:2}})]},M.key)})},U.id))})})})]})}const Ts={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},_s=["hover","focus","filled","success","error"],Ls=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3665
+ import '@splidejs/react-splide/css/core';
3666
+ import { CommonComponentProps } from '../props';
3667
+ import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
3668
+ import { useMemo, useRef } from 'react';
3669
+ import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
3670
+
3671
+ function sv(px: number): string {
3672
+ return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
3673
+ }
3674
+
3675
+ function getCSS(P: string): string {
3676
+ return \`
3677
+ .\${P}-wrapper {
3678
+ display: grid;
3679
+ align-items: start;
3680
+ min-height: \${sv(48)};
3681
+ }
3682
+
3683
+ .\${P}-list-item {
3684
+ display: flex;
3685
+ align-items: stretch;
3686
+ width: 100%;
3687
+ overflow: visible;
3688
+ position: relative;
3689
+ box-sizing: border-box;
3690
+ border-bottom-style: solid;
3691
+ border-bottom-color: var(--\${P}-divider-color);
3692
+ user-select: none;
3693
+ background: var(--\${P}-background-color);
3694
+ }
3695
+
3696
+ .\${P}-list-item:first-child {
3697
+ border-top-style: solid;
3698
+ border-top-color: var(--\${P}-divider-color);
3699
+ }
3700
+
3701
+ .\${P}-list-col {
3702
+ flex-shrink: 0;
3703
+ overflow: visible;
3704
+ box-sizing: border-box;
3705
+ min-width: \${sv(50)};
3706
+ position: relative;
3707
+ display: flex;
3708
+ align-items: center;
3709
+ }
3710
+
3711
+ .\${P}-list-col-last {
3712
+ flex: 1 1 auto;
3713
+ min-width: \${sv(50)};
3714
+ }
3715
+
3716
+ .\${P}-list-col-title {
3717
+ color: var(--\${P}-text-color);
3718
+ white-space: pre-wrap;
3719
+ overflow-wrap: anywhere;
3720
+ word-break: break-word;
3721
+ flex: 1;
3722
+ min-width: 0;
3723
+ width: 100%;
3724
+ }
3725
+
3726
+ .\${P}-col-resize-handle {
3727
+ background: transparent;
3728
+ }
3729
+
3730
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item,
3731
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item {
3732
+ transition: background-color 250ms, border-color 250ms;
3733
+ }
3734
+
3735
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-col-title,
3736
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-col-title {
3737
+ transition: color 250ms;
3738
+ }
3739
+
3740
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item:hover,
3741
+ .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item {
3742
+ background: var(--\${P}-background-hover-color);
3743
+ }
3744
+
3745
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item:hover,
3746
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item:has(+ .\${P}-list-item:hover),
3747
+ .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item,
3748
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item:hover,
3749
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item:has(+ .\${P}-list-item:hover),
3750
+ .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item {
3751
+ border-bottom-color: var(--\${P}-divider-hover-color);
3752
+ }
3753
+
3754
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item:hover:first-child,
3755
+ .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item:first-child,
3756
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item:hover:first-child,
3757
+ .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item:first-child {
3758
+ border-top-color: var(--\${P}-divider-hover-color);
3759
+ }
3760
+
3761
+ .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item:hover .\${P}-list-col-title,
3762
+ .\${P}-wrapper.\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item .\${P}-list-col-title,
3763
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item:hover .\${P}-list-col-title,
3764
+ .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item .\${P}-list-col-title {
3765
+ color: var(--\${P}-text-hover-color);
3766
+ }
3767
+
3768
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item::before {
3769
+ content: '';
3770
+ position: absolute;
3771
+ inset: 0;
3772
+ background: var(--\${P}-background-hover-color);
3773
+ transform: scaleY(0);
3774
+ transform-origin: center center;
3775
+ transition: transform 250ms;
3776
+ z-index: 0;
3777
+ pointer-events: none;
3778
+ }
3779
+
3780
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-col {
3781
+ z-index: 1;
3782
+ }
3783
+
3784
+ .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item:hover::before,
3785
+ .\${P}-wrapper.\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item::before {
3786
+ transform: scaleY(1);
3787
+ }
3788
+ \`;
3789
+ }
3790
+
3791
+ type ListItemColumn = {
3792
+ key: string;
3793
+ widthKey: ColumnWidthKey;
3794
+ width: number;
3795
+ };
3796
+
3797
+ const COLUMN_CONTENT_KEYS = [
3798
+ 'firstColumn',
3799
+ 'secondColumn',
3800
+ 'thirdColumn',
3801
+ 'fourthColumn',
3802
+ 'fifthColumn',
3803
+ ] as const;
3804
+
3805
+ const COLUMN_WIDTH_KEYS = [
3806
+ 'firstColumnWidth',
3807
+ 'secondColumnWidth',
3808
+ 'thirdColumnWidth',
3809
+ 'fourthColumnWidth',
3810
+ 'fifthColumnWidth',
3811
+ ] as const;
3812
+
3813
+ type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
3814
+ const COL_RESIZE_HANDLE_WIDTH = 0.004;
3815
+ const MIN_COLUMN_WIDTH_PX = 50;
3816
+ const ARTICLE_DESIGN_WIDTH = 1440;
3817
+ const MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH_PX / ARTICLE_DESIGN_WIDTH;
3818
+
3819
+ function getColumnMaxWidth(
3820
+ columnIndex: number,
3821
+ columns: ListItemColumn[],
3822
+ wrapperWidth: number,
3823
+ ): number {
3824
+ const otherFixedColumnsWidth = columns.reduce(
3825
+ (sum, column, index) => {
3826
+ if (index === columnIndex || index === columns.length - 1) return sum;
3827
+ return sum + column.width;
3828
+ },
3829
+ 0,
3830
+ );
3831
+ return Math.max(MIN_COLUMN_WIDTH, wrapperWidth - otherFixedColumnsWidth - MIN_COLUMN_WIDTH);
3832
+ }
3833
+
3834
+ const DEFAULT_COLUMN_WIDTHS: Record<ColumnWidthKey, number> = {
3835
+ firstColumnWidth: 0.02,
3836
+ secondColumnWidth: 0.02,
3837
+ thirdColumnWidth: 0.02,
3838
+ fourthColumnWidth: 0.02,
3839
+ fifthColumnWidth: 0.02,
3840
+ };
3841
+
3842
+ type ListContentItem = {
3843
+ firstColumn?: string;
3844
+ secondColumn?: string;
3845
+ thirdColumn?: string;
3846
+ fourthColumn?: string;
3847
+ fifthColumn?: string;
3848
+ image?: {
3849
+ objectFit?: 'cover' | 'contain';
3850
+ url: string;
3851
+ name: string;
3852
+ };
3853
+ link?: string;
3854
+ };
3855
+
3856
+ type ListItemRow = {
3857
+ id: string | number;
3858
+ cells: Record<string, React.ReactNode>;
3859
+ };
3860
+
3861
+ type ListProps = {
3862
+ layoutId?: string;
3863
+ settings: ListSettings;
3864
+ content?: ListContentItem[];
3865
+ isEditor?: boolean;
3866
+ isPreviewMode?: boolean;
3867
+ activeEvent: string | undefined;
3868
+ onUpdateSettings?: (settings: ListSettings) => void;
3869
+ } & CommonComponentProps;
3870
+
3871
+ export function List({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: ListProps) {
3872
+ const { prefix: P } = useScopedStyles();
3873
+ const {
3874
+ columns,
3875
+ wrapperWidth,
3876
+ entriesCount,
3877
+ cellMinHeight,
3878
+ dividerWidth,
3879
+ cut,
3880
+ imageSize,
3881
+ imageOnHover,
3882
+ entryHoverEffect,
3883
+ firstColumnWidth,
3884
+ secondColumnWidth,
3885
+ thirdColumnWidth,
3886
+ fourthColumnWidth,
3887
+ fifthColumnWidth,
3888
+ textColor,
3889
+ textFontFamily,
3890
+ textFontSettings,
3891
+ textFontSize,
3892
+ textLineHeight,
3893
+ textLetterSpacing,
3894
+ textWordSpacing,
3895
+ textTextAppearance,
3896
+ backgroundColor,
3897
+ dividerColor,
3898
+ textHoverColor,
3899
+ backgroundHoverColor,
3900
+ dividerHoverColor,
3901
+ } = settings;
3902
+
3903
+ const resolvedTextTextStyle: TextStyles = {
3904
+ fontSettings: {
3905
+ fontFamily: textFontFamily,
3906
+ fontWeight: textFontSettings?.fontWeight ?? 400,
3907
+ fontStyle: textFontSettings?.fontStyle ?? 'normal',
3908
+ },
3909
+ fontSize: textFontSize ?? 0.01,
3910
+ lineHeight: textLineHeight,
3911
+ letterSpacing: textLetterSpacing ?? 0,
3912
+ wordSpacing: textWordSpacing ?? 0,
3913
+ textAppearance: textTextAppearance,
3914
+ color: textColor,
3915
+ };
3916
+ const textTypographyCss = omitTextColors(textStylesToCss(resolvedTextTextStyle, isEditor));
3917
+ const textFieldCss = {
3918
+ ...textTypographyCss,
3919
+ } as React.CSSProperties;
3920
+
3921
+ const colorVars = buildColorVars(P, {
3922
+ textColor,
3923
+ backgroundColor,
3924
+ dividerColor,
3925
+ textHoverColor,
3926
+ backgroundHoverColor,
3927
+ dividerHoverColor
3928
+ }, COLOR_VAR_MAP, STATE_KEYS);
3929
+
3930
+ const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
3931
+ const entryHoverClass =
3932
+ entryHoverEffect === 'Default'
3933
+ ? \`\${P}-entry-hover-default\`
3934
+ : entryHoverEffect === 'Blinds'
3935
+ ? \`\${P}-entry-hover-blinds\`
3936
+ : '';
3937
+ const wrapperStateClasses = \`\${entryHoverClass} \${stateClass}\`.trim();
3938
+
3939
+ const containerRef = useRef<HTMLDivElement>(null);
3940
+
3941
+ const columnWidthByKey: Record<ColumnWidthKey, number> = {
3942
+ firstColumnWidth: firstColumnWidth ?? DEFAULT_COLUMN_WIDTHS.firstColumnWidth,
3943
+ secondColumnWidth: secondColumnWidth ?? DEFAULT_COLUMN_WIDTHS.secondColumnWidth,
3944
+ thirdColumnWidth: thirdColumnWidth ?? DEFAULT_COLUMN_WIDTHS.thirdColumnWidth,
3945
+ fourthColumnWidth: fourthColumnWidth ?? DEFAULT_COLUMN_WIDTHS.fourthColumnWidth,
3946
+ fifthColumnWidth: fifthColumnWidth ?? DEFAULT_COLUMN_WIDTHS.fifthColumnWidth,
3947
+ };
3948
+
3949
+ const listColumns: ListItemColumn[] = useMemo(
3950
+ () =>
3951
+ COLUMN_CONTENT_KEYS.slice(0, columns).map((key, index) => ({
3952
+ key,
3953
+ widthKey: COLUMN_WIDTH_KEYS[index],
3954
+ width: columnWidthByKey[COLUMN_WIDTH_KEYS[index]],
3955
+ })),
3956
+ [
3957
+ columns,
3958
+ firstColumnWidth,
3959
+ secondColumnWidth,
3960
+ thirdColumnWidth,
3961
+ fourthColumnWidth,
3962
+ fifthColumnWidth,
3963
+ ]
3964
+ );
3965
+
3966
+ const resolvedRows: ListItemRow[] = useMemo(() => {
3967
+ const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;
3968
+ const items = (content ?? []).slice(0, resEntriesCount);
3969
+
3970
+ return items.map((item, index) => ({
3971
+ id: index,
3972
+ cells: Object.fromEntries(
3973
+ COLUMN_CONTENT_KEYS.map((key) => [key, item[key] ?? ''])
3974
+ ),
3975
+ }));
3976
+ }, [content, entriesCount]);
3977
+
3978
+ const scaled = (v: number) => scalingValue(v, isEditor ?? false);
3979
+
3980
+ return (
3981
+ <>
3982
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
3983
+ <div style={colorVars}>
3984
+ <div
3985
+ ref={containerRef}
3986
+ className={\`\${P}-wrapper \${wrapperStateClasses}\`.trim()}
3987
+ style={{
3988
+ width: scalingValue(wrapperWidth ?? 0, isEditor)
3989
+ }}
3990
+ >
3991
+ <div style={{ width: '100%' }}>
3992
+ {resolvedRows.map((row, rowIdx) => (
3993
+ <div
3994
+ key={row.id}
3995
+ className={\`\${P}-list-item\`}
3996
+ style={{
3997
+ minHeight: scaled(cellMinHeight ?? 0),
3998
+ borderBottomWidth: scalingValue(dividerWidth ?? 0, isEditor),
3999
+ ...(rowIdx === 0 ? { borderTopWidth: scalingValue(dividerWidth ?? 0, isEditor) } : {}),
4000
+ }}
4001
+ >
4002
+ {listColumns.map((col, colIndex) => {
4003
+ const isLastColumn = colIndex === listColumns.length - 1;
4004
+ const resolvedWrapperWidth = wrapperWidth ?? 1;
4005
+ const maxColumnWidth = getColumnMaxWidth(colIndex, listColumns, resolvedWrapperWidth);
4006
+ const columnWidth = Math.min(Math.max(col.width, MIN_COLUMN_WIDTH), maxColumnWidth);
4007
+ return (
4008
+ <div
4009
+ key={col.key}
4010
+ className={\`\${P}-list-col\${isLastColumn ? \` \${P}-list-col-last\` : ''}\`}
4011
+ style={isLastColumn ? undefined : { width: scaled(columnWidth) }}
4012
+ data-test={col.width}
4013
+ >
4014
+ <span
4015
+ className={\`\${P}-list-col-title\`}
4016
+ style={textFieldCss}
4017
+ >
4018
+ {row.cells[col.key] ?? null}
4019
+ </span>
4020
+ {isEditor && !isLastColumn && (
4021
+ <div
4022
+ data-controls={col.widthKey}
4023
+ data-controls-axis="x"
4024
+ data-controls-min={String(MIN_COLUMN_WIDTH_PX)}
4025
+ data-controls-max-fraction={String(maxColumnWidth)}
4026
+ data-controls-no-highlight=""
4027
+ className={\`\${P}-col-resize-handle\`}
4028
+ style={{
4029
+ position: 'absolute',
4030
+ top: 0,
4031
+ left: \`calc(100% - \${scaled(COL_RESIZE_HANDLE_WIDTH / 2)})\`,
4032
+ width: scaled(COL_RESIZE_HANDLE_WIDTH),
4033
+ height: '100%',
4034
+ pointerEvents: 'auto',
4035
+ zIndex: 2,
4036
+ }}
4037
+ />
4038
+ )}
4039
+ </div>
4040
+ );
4041
+ })}
4042
+ </div>
4043
+ ))}
4044
+ </div>
4045
+ </div>
4046
+ </div>
4047
+ </>
4048
+ );
4049
+ }
4050
+
4051
+ type ListSettings = {
4052
+ columns: number;
4053
+ wrapperWidth: number;
4054
+ entriesCount: number;
4055
+ cellMinHeight: number;
4056
+ imageOnHover: 'On' | 'Off';
4057
+ imageSize?: { min: number; max: number };
4058
+ dividerWidth: number;
4059
+ cut: number;
4060
+ entryHoverEffect: 'None' | 'Default' | 'Blinds';
4061
+ firstColumnWidth: number;
4062
+ secondColumnWidth: number;
4063
+ thirdColumnWidth: number;
4064
+ fourthColumnWidth: number;
4065
+ fifthColumnWidth: number;
4066
+ textColor: string;
4067
+ textFontFamily: string;
4068
+ textFontSettings?: { fontWeight: number; fontStyle: string };
4069
+ textFontSize?: number;
4070
+ textLineHeight?: number;
4071
+ textLetterSpacing?: number;
4072
+ textWordSpacing?: number;
4073
+ textTextAppearance?: TextStyles['textAppearance'];
4074
+ backgroundColor: string;
4075
+ dividerColor: string;
4076
+ textHoverColor: string;
4077
+ backgroundHoverColor: string;
4078
+ dividerHoverColor: string;
4079
+ };
4080
+
4081
+ type ColorKeys =
4082
+ | 'textColor'
4083
+ | 'backgroundColor'
4084
+ | 'dividerColor'
4085
+ | 'textHoverColor'
4086
+ | 'backgroundHoverColor'
4087
+ | 'dividerHoverColor'
4088
+
4089
+ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
4090
+ textColor: 'text-color',
4091
+ backgroundColor: 'background-color',
4092
+ dividerColor: 'divider-color',
4093
+ textHoverColor: 'text-hover-color',
4094
+ backgroundHoverColor: 'background-hover-color',
4095
+ dividerHoverColor: 'divider-hover-color',
4096
+ };
4097
+
4098
+ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
4099
+ `,Es={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Is=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],As={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{firstColumn:{type:"string",label:"First column",placeholder:"Add Title...",display:{type:"text-input"}},secondColumn:{type:"string",label:"Second column",placeholder:"Add Title...",display:{type:"text-input"}},thirdColumn:{type:"string",label:"Third column",placeholder:"Add Title...",display:{type:"text-input"}},fourthColumn:{type:"string",label:"Fourth column",placeholder:"Add Title...",display:{type:"text-input"}},fifthColumn:{type:"string",label:"Fifth column",placeholder:"Add Title...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{firstColumn:"firstColumn",secondColumn:"secondColumn",thirdColumn:"thirdColumn",fourthColumn:"fourthColumn",fifthColumn:"fifthColumn",image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{firstColumn:"firstColumn 2",secondColumn:"secondColumn 2",thirdColumn:"thirdColumn 2",fourthColumn:"fourthColumn 2",fifthColumn:"fifthColumn 2",image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{firstColumn:"firstColumn 3",secondColumn:"secondColumn 3",thirdColumn:"thirdColumn 3",fourthColumn:"fourthColumn 3",fifthColumn:"fifthColumn 3",image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""}]}},settings:{sizing:"auto auto",properties:{columns:{type:"number",scope:"layout",title:"Columns",display:{type:"common-numeric-input"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},firstColumnWidth:{type:"number",scope:"layout",title:"First column width",min:0,max:100,display:{type:"range-control"}},secondColumnWidth:{type:"number",scope:"layout",title:"Second column width",min:0,max:100,display:{type:"range-control"}},thirdColumnWidth:{type:"number",scope:"layout",title:"Third column width",min:0,max:100,display:{type:"range-control"}},fourthColumnWidth:{type:"number",scope:"layout",title:"Fourth column width",min:0,max:100,display:{type:"range-control"}},fifthColumnWidth:{type:"number",scope:"layout",title:"Fifth column width",min:0,max:100,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text Color",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover Color",display:{type:"palette-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},textFontSettings:{...Es.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},backgroundColor:{type:"string",scope:"common",title:"Background Color",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Color",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"Background Hover Color",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover Color",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",textColor:"#767676",textHoverColor:"#767676",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},backgroundColor:"#FFFFFF",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF",dividerHoverColor:"#767676"},layoutDefaults:{m:{columns:5,wrapperWidth:1,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,firstColumnWidth:.2,secondColumnWidth:.2,thirdColumnWidth:.2,fourthColumnWidth:.2,fifthColumnWidth:.2,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},textFontSize:.043,textLineHeight:.043},d:{columns:5,wrapperWidth:1,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,firstColumnWidth:.2,secondColumnWidth:.2,thirdColumnWidth:.2,fourthColumnWidth:.2,fifthColumnWidth:.2,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},textFontSize:.01,textLineHeight:.01}},displayRules:[{if:{name:"entryHoverEffect",value:"None"},then:{name:"properties.direction.display.visible",value:!1}}],layout:["__componentName__","name","columns","wrapperWidth","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","cut","entryHoverEffect","firstColumnWidth","secondColumnWidth","thirdColumnWidth","fourthColumnWidth","fifthColumnWidth"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type","gridLayout",{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["columns"]},{type:"row",title:"",items:["wrapperWidth"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["entriesCount"]},{type:"row",title:"",items:["cellMinHeight"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["imageOnHover"]},{type:"row",title:"",items:["imageSize"]}]}]},{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["dividerWidth"]},{type:"row",title:"",items:["cut"]}]}]},{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["entryHoverEffect"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]}],paletteBookmark:{items:[...Is],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Fs={element:ws,id:"list",name:"Default List",category:"lists",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:As,sourceCode:Ls},ks=[Na,Ga,Wl,Vl,Jl,os,cs,xs,Fs];exports.components=ks;exports.isSchemaV1=Ii;