@cntrl-site/components 1.0.9-alpha.4 → 1.0.9-alpha.5

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,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("react"),he=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),xr=require("react-dom");function Sr(e){return e.type==="object"&&e.version===1}const Cr="ControlSlider-module__wrapper___sHEkd",wr="ControlSlider-module__hoverArrow___A-dOH",$r="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",Er="ControlSlider-module__arrowVertical___tBfVN",kr="ControlSlider-module__nextArrow___-30Yc",Ar="ControlSlider-module__arrowInner___aEra3",Ir="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",Rr="ControlSlider-module__pagination___bicLF",Mr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Hr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",jr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Br="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",zr="ControlSlider-module__paginationInsideLeft___yOBRZ",Dr="ControlSlider-module__paginationInsideRight___Rtt3o",qr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",Kr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Zr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Qr="ControlSlider-module__topLeftAlignment___zjnGM",ei="ControlSlider-module__topCenterAlignment___gD1xW",ti="ControlSlider-module__topRightAlignment___NMapS",ni="ControlSlider-module__middleLeftAlignment___OnUrY",oi="ControlSlider-module__middleCenterAlignment___Tdkl0",ri="ControlSlider-module__middleRightAlignment___wEbfX",ii="ControlSlider-module__bottomLeftAlignment___cTP2-",ai="ControlSlider-module__bottomCenterAlignment___c54fB",si="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",ci="ControlSlider-module__contain___pLyq7",ui="ControlSlider-module__cover___KdDat",ee={wrapper:Cr,hoverArrow:wr,sliderItem:$r,sliderImage:Tr,arrow:_r,arrowVertical:Er,nextArrow:kr,arrowInner:Ar,arrowIcon:Ir,arrowImg:Lr,mirror:Fr,pagination:Rr,paginationInner:Mr,paginationVertical:Pr,paginationItem:Wr,dot:Hr,activeDot:Nr,paginationInsideBottom:jr,paginationInsideTop:Vr,paginationOutsideBottom:Br,paginationOutsideTop:Or,paginationInsideLeft:zr,paginationInsideRight:Dr,paginationOutsideLeft:qr,paginationOutsideRight:Ur,imgWrapper:Gr,captionBlock:Kr,captionTextWrapper:Yr,captionText:Xr,active:Zr,withPointerEvents:Jr,topLeftAlignment:Qr,topCenterAlignment:ei,topRightAlignment:ti,middleLeftAlignment:ni,middleCenterAlignment:oi,middleRightAlignment:ri,bottomLeftAlignment:ii,bottomCenterAlignment:ai,bottomRightAlignment:si,clickOverlay:li,contain:ci,cover:ui};function pi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function di(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,mi=2,yt=3,xt=4,Pt=5,Xt=6,en=7,gi={CREATED:mt,MOUNTED:mi,IDLE:yt,MOVING:xt,SCROLLING:Pt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Io=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Pn(e)&&an("object",e)}var Mn=Array.isArray,Lo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Pn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Mn(e)?e:[e]}function Ae(e,t){Ht(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function ze(e,t,n){e&&Ae(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){ze(e,Ze(t)?t.split(" "):t,!0)}function Nt(e,t){Ae(t,e.appendChild.bind(e))}function Hn(e,t){Ae(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var At=Object.keys;function rt(e,t,n){return e&&(n?At(e).reverse():At(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function It(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Mn(n)?e[o]=n.slice():Et(n)?e[o]=Ye({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function io(e,t){Ae(t||At(e),function(n){delete e[n]})}function He(e,t){Ae(e,function(n){Ae(t,function(o){n&&n.removeAttribute(o)})})}function de(e,t,n){Et(t)?rt(t,function(o,r){de(e,r,o)}):Ae(e,function(o){Pn(n)||n===""?He(o,t):o.setAttribute(t,String(n))})}function gt(e,t,n){var o=document.createElement(e);return t&&(Ze(t)?We(o,t):de(o,t)),n&&Nt(n,o),o}function Le(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Pn(n)||(e.style[t]=""+n)}function Lt(e,t){Le(e,"display",t)}function Mo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function ao(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Ae(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){ze(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",jn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Ho(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function kn(e,t){return Ae(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var so={};function fi(e){return""+e+Vn(so[e]=(so[e]||0)+1)}function No(){var e=[];function t(i,p,l,m){r(i,p,function(c,T,w){var y="addEventListener"in c,u=y?c.removeEventListener.bind(c,T,l,m):c.removeListener.bind(c,l);y?c.addEventListener(T,l,m):c.addListener(l),e.push([c,T,w,l,u])})}function n(i,p,l){r(i,p,function(m,c,T){e=e.filter(function(w){return w[0]===m&&w[1]===c&&w[2]===T&&(!l||w[3]===l)?(w[4](),!1):!0})})}function o(i,p,l){var m,c=!0;return typeof CustomEvent=="function"?m=new CustomEvent(p,{bubbles:c,detail:l}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(p,c,!1,l)),i.dispatchEvent(m),m}function r(i,p,l){Ae(i,function(m){m&&Ae(p,function(c){c.split(" ").forEach(function(T){var w=T.split(".");l(m,w[0],w[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",Bn="click",jo="active",Vo="inactive",Bo="visible",Oo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",zo="drag",Do="dragging",qo="dragged",ln="scroll",st="scrolled",hi="overflow",On="destroy",Uo="arrows:mounted",Go="arrows:updated",Ko="pagination:mounted",Yo="pagination:updated",zn="navigation:mounted",Dn="autoplay:play",Xo="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Zo="sk",Jo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function o(s,i){n.bind(t,Ht(s).join(" "),function(p){i.apply(i,Mn(p.detail)?p.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(On,n.destroy),It(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,p,l=!0,m=0;function c(){if(!l){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++m>=o))return w();p=ro(c)}}function T(b){b||u(),s=r()-(b?i*e:0),l=!1,p=ro(c)}function w(){l=!0}function y(){s=r(),i=0,n&&n(i)}function u(){p&&cancelAnimationFrame(p),i=0,p=0,l=!0}function d(b){e=b}function C(){return l}return{start:T,rewind:y,pause:w,cancel:u,set:d,isPaused:C}}function yi(e){var t=e;function n(r){t=r}function o(r){return Wn(Ht(r),t)}return{set:n,is:o}}function vi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=No(),p=[];function l(){var u=n.mediaQuery==="min";At(r).sort(function(d,C){return u?+d-+C:+C-+d}).forEach(function(d){c(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),c(s,oo),T()}function m(u){u&&i.destroy()}function c(u,d){var C=matchMedia(d);i.bind(C,"change",T),p.push([u,C])}function T(){var u=o.is(en),d=n.direction,C=p.reduce(function(b,x){return Ye(b,x[1].matches?x[0]:{})},{});io(n),y(C),n.destroy?e.destroy(n.destroy==="completely"):u?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function w(u){matchMedia(oo).matches&&(u?Ye(n,s):io(n,At(s)))}function y(u,d,C){Ye(n,u),d&&Ye(Object.getPrototypeOf(n),u),(C||!o.is(mt))&&e.emit(Te,n)}return{setup:l,destroy:m,reduce:w,set:y}}var un="Arrow",pn=un+"Left",dn=un+"Right",Qo=un+"Up",er=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qo,dn],ArrowRight:[er,pn]};function xi(e,t,n){function o(s,i,p){p=p||n.direction;var l=p===lo&&!i?1:p===mn?0:-1;return bn[s]&&bn[s][l]||s.replace(/width|left|right/i,function(m,c){var T=bn[m.toLowerCase()][l]||m;return c>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function r(s){return s*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",Si="disabled",Re="aria-",Bt=Re+"controls",tr=Re+"current",co=Re+"selected",ke=Re+"label",Gn=Re+"labelledby",nr=Re+"hidden",Kn=Re+"orientation",Rt=Re+"roledescription",uo=Re+"live",po=Re+"busy",mo=Re+"atomic",Yn=[qe,ft,Si,Bt,tr,ke,Gn,nr,Kn,Rt],Ne=Vt+"__",tt="is-",xn=Vt,go=Ne+"track",Ci=Ne+"list",gn=Ne+"slide",or=gn+"--clone",wi=gn+"__container",Xn=Ne+"arrows",fn=Ne+"arrow",rr=fn+"--prev",ir=fn+"--next",hn=Ne+"pagination",ar=hn+"__page",$i=Ne+"progress",Ti=$i+"__bar",_i=Ne+"toggle",Ei=Ne+"spinner",ki=Ne+"sr",Ai=tt+"initialized",at=tt+"active",sr=tt+"prev",lr=tt+"next",In=tt+"visible",Ln=tt+"loading",cr=tt+"focus-in",ur=tt+"overflow",Ii=[at,In,sr,lr,Ln,cr,ur],Li={slide:gn,clone:or,arrows:Xn,arrow:fn,prev:rr,next:ir,pagination:hn,page:ar,spinner:Ei};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Ri=5,fo=200,pr="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Mi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,p=n.i18n,l={},m=[],c=[],T=[],w,y,u;function d(){A(),V(),x()}function C(){r(Se,b),r(Se,d),r(Te,x),s(document,pr+" keydown",function(S){u=S.type==="keydown"},{capture:!0}),s(i,"focusin",function(){ze(i,cr,!!u)})}function b(S){var $=Yn.concat("style");Ue(m),De(i,c),De(w,T),He([w,y],$),He(i,S?$:["style",Rt])}function x(){De(i,c),De(w,T),c=k(xn),T=k(go),We(i,c),We(w,T),de(i,ke,n.label),de(i,Gn,n.labelledby)}function A(){w=j("."+go),y=jt(w,"."+Ci),Tt(w&&y,"A track/list element is missing."),Zt(m,Ro(y,"."+gn+":not(."+or+")")),rt({arrows:Xn,pagination:hn,prev:rr,next:ir,bar:Ti,toggle:_i},function(S,$){l[$]=j("."+S)}),It(l,{root:i,track:w,list:y,slides:m})}function V(){var S=i.id||fi(Vt),$=n.role;i.id=S,w.id=w.id||S+"-track",y.id=y.id||S+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&$&&de(i,qe,$),de(i,Rt,p.carousel),de(y,qe,"presentation")}function j(S){var $=Wo(i,S);return $&&Fi($,"."+xn)===i?$:void 0}function k(S){return[S+"--"+n.type,S+"--"+n.direction,n.drag&&S+"--draggable",n.isNavigation&&S+"--nav",S===xn&&at]}return It(l,{setup:d,mount:C,destroy:b})}var bt="slide",Ct="loop",Ot="fade";function Pi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,p=r.bind,l=e.Components,m=e.root,c=e.options,T=c.isNavigation,w=c.updateOnMove,y=c.i18n,u=c.pagination,d=c.slideFocus,C=l.Direction.resolve,b=Fe(o,"style"),x=Fe(o,ke),A=n>-1,V=jt(o,"."+wi),j;function k(){A||(o.id=m.id+"-slide"+Vn(t+1),de(o,qe,u?"tabpanel":"group"),de(o,Rt,y.slide),de(o,ke,x||kn(y.slideLabel,[t+1,e.length]))),S()}function S(){p(o,"click",ve(i,Bn,R)),p(o,"keydown",ve(i,Zo,R)),s([St,Jo,st],W),s(zn,M),w&&s(Ge,B)}function $(){j=!0,r.destroy(),De(o,Ii),He(o,Yn),de(o,"style",b),de(o,ke,x||"")}function M(){var L=e.splides.map(function(_){var N=_.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");de(o,ke,kn(y.slideX,(A?n:t)+1)),de(o,Bt,L),de(o,qe,d?"button":""),d&&He(o,Rt)}function B(){j||W()}function W(){if(!j){var L=e.index;F(),H(),ze(o,sr,t===L-1),ze(o,lr,t===L+1)}}function F(){var L=G();L!==ao(o,at)&&(ze(o,at,L),de(o,tr,T&&L||""),i(L?jo:Vo,R))}function H(){var L=v(),_=!L&&(!G()||A);if(e.state.is([xt,Pt])||de(o,nr,_||""),de(Nn(o,c.focusableNodes||""),ft,_?-1:""),d&&de(o,ft,_?-1:0),L!==ao(o,In)&&(ze(o,In,L),i(L?Bo:Oo,R)),!L&&document.activeElement===o){var N=l.Slides.getAt(e.index);N&&Mo(N.slide)}}function z(L,_,N){Le(N&&V||o,L,_)}function G(){var L=e.index;return L===t||c.cloneStatus&&L===n}function v(){if(e.is(Ot))return G();var L=Ee(l.Elements.track),_=Ee(o),N=C("left",!0),J=C("right",!0);return nn(L[N])<=Ft(_[N])&&nn(_[J])<=Ft(L[J])}function I(L,_){var N=_e(L-t);return!A&&(c.rewind||e.is(Ct))&&(N=Je(N,e.length-N)),N<=_}var R={index:t,slideIndex:n,slide:o,container:V,isClone:A,mount:k,destroy:$,update:W,style:z,isWithin:I};return R}function Wi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=t.Elements,l=p.slides,m=p.list,c=[];function T(){w(),r(Se,y),r(Se,w)}function w(){l.forEach(function(W,F){d(W,F,-1)})}function y(){j(function(W){W.destroy()}),Ue(c)}function u(){j(function(W){W.update()})}function d(W,F,H){var z=Pi(e,F,H,W);z.mount(),c.push(z),c.sort(function(G,v){return G.index-v.index})}function C(W){return W?k(function(F){return!F.isClone}):c}function b(W){var F=t.Controller,H=F.toIndex(W),z=F.hasFocus()?1:n.perPage;return k(function(G){return Jt(G.index,H,H+z-1)})}function x(W){return k(W)[0]}function A(W,F){Ae(W,function(H){if(Ze(H)&&(H=Po(H)),Fo(H)){var z=l[F];z?Hn(H,z):Nt(m,H),We(H,n.classes.slide),$(H,ve(s,vt))}}),s(Se)}function V(W){it(k(W).map(function(F){return F.slide})),s(Se)}function j(W,F){C(F).forEach(W)}function k(W){return c.filter(Lo(W)?W:function(F){return Ze(W)?kt(F.slide,W):Wn(Ht(W),F.index)})}function S(W,F,H){j(function(z){z.style(W,F,H)})}function $(W,F){var H=Nn(W,"img"),z=H.length;z?H.forEach(function(G){i(G,"load error",function(){--z||F()})}):F()}function M(W){return W?l.length:c.length}function B(){return c.length>n.perPage}return{mount:T,destroy:y,update:u,register:d,get:C,getIn:b,getAt:x,add:A,remove:V,forEach:j,filter:k,style:S,getLength:M,isEnough:B}}function Hi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=t.Slides,l=t.Direction.resolve,m=t.Elements,c=m.root,T=m.track,w=m.list,y=p.getAt,u=p.style,d,C,b;function x(){A(),s(window,"resize load",vi(ve(i,vt))),r([Te,Se],A),r(vt,V)}function A(){d=n.direction===mn,Le(c,"maxWidth",ot(n.width)),Le(T,l("paddingLeft"),j(!1)),Le(T,l("paddingRight"),j(!0)),V(!0)}function V(R){var L=Ee(c);(R||C.width!==L.width||C.height!==L.height)&&(Le(T,"height",k()),u(l("marginRight"),ot(n.gap)),u("width",$()),u("height",M(),!0),C=L,i(sn),b!==(b=I())&&(ze(c,ur,b),i(hi,b)))}function j(R){var L=n.padding,_=l(R?"right":"left");return L&&ot(L[_]||(Et(L)?0:L))||"0px"}function k(){var R="";return d&&(R=S(),Tt(R,"height or heightRatio is missing."),R="calc("+R+" - "+j(!1)+" - "+j(!0)+")"),R}function S(){return ot(n.height||Ee(w).width*n.heightRatio)}function $(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":B())}function M(){return ot(n.fixedHeight)||(d?n.autoHeight?null:B():S())}function B(){var R=ot(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function W(){return Ee(w)[l("width")]}function F(R,L){var _=y(R||0);return _?Ee(_.slide)[l("width")]+(L?0:G()):0}function H(R,L){var _=y(R);if(_){var N=Ee(_.slide)[l("right")],J=Ee(w)[l("left")];return _e(N-J)+(L?0:G())}return 0}function z(R){return H(e.length-1)-H(0)+F(0,R)}function G(){var R=y(0);return R&&parseFloat(Le(R.slide,l("marginRight")))||0}function v(R){return parseFloat(Le(T,l("padding"+(R?"Right":"Left"))))||0}function I(){return e.is(Ot)||z(!0)>W()}return{mount:x,resize:V,listSize:W,slideSize:F,sliderSize:z,totalSize:H,getPadding:v,isOverflow:I}}var Ni=2;function ji(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,p=t.Direction.resolve,l=[],m;function c(){r(Se,T),r([Te,vt],y),(m=C())&&(u(m),t.Layout.resize(!0))}function T(){w(),c()}function w(){it(l),Ue(l),o.destroy()}function y(){var b=C();m!==b&&(m<b||!b)&&o.emit(Se)}function u(b){var x=i.get().slice(),A=x.length;if(A){for(;x.length<b;)Zt(x,x);Zt(x.slice(-b),x.slice(0,b)).forEach(function(V,j){var k=j<b,S=d(V.slide,j);k?Hn(S,x[0].slide):Nt(s.list,S),Zt(l,S),i.register(S,j-b+(k?0:A),V.index)})}}function d(b,x){var A=b.cloneNode(!0);return We(A,n.classes.clone),A.id=e.root.id+"-clone"+Vn(x+1),A}function C(){var b=n.clones;if(!e.is(Ct))b=0;else if(Wt(b)){var x=n[p("fixedWidth")]&&t.Layout.slideSize(0),A=x&&Ft(Ee(s.track)[p("width")]/x);b=A||n[p("autoWidth")]&&e.length||n.perPage*Ni}return b}return{mount:c,destroy:w}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,p=t.Layout,l=p.slideSize,m=p.getPadding,c=p.totalSize,T=p.listSize,w=p.sliderSize,y=t.Direction,u=y.resolve,d=y.orient,C=t.Elements,b=C.list,x=C.track,A;function V(){A=t.Transition,r([et,sn,Te,Se],j)}function j(){t.Controller.isBusy()||(t.Scroll.cancel(),S(e.index),t.Slides.update())}function k(_,N,J,ce){_!==N&&R(_>J)&&(W(),$(B(z(),_>J),!0)),i(xt),s(Ge,N,J,_),A.start(N,function(){i(yt),s(St,N,J,_),ce&&ce()})}function S(_){$(H(_,!0))}function $(_,N){if(!e.is(Ot)){var J=N?_:M(_);Le(b,"transform","translate"+u("X")+"("+J+"px)"),_!==J&&s(Jo)}}function M(_){if(e.is(Ct)){var N=F(_),J=N>t.Controller.getEnd(),ce=N<0;(ce||J)&&(_=B(_,J))}return _}function B(_,N){var J=_-I(N),ce=w();return _-=d(ce*(Ft(_e(J)/ce)||1))*(N?1:-1),_}function W(){$(z(),!0),A.cancel()}function F(_){for(var N=t.Slides.get(),J=0,ce=1/0,te=0;te<N.length;te++){var me=N[te].index,f=_e(H(me,!0)-_);if(f<=ce)ce=f,J=me;else break}return J}function H(_,N){var J=d(c(_-1)-v(_));return N?G(J):J}function z(){var _=u("left");return Ee(b)[_]-Ee(x)[_]+d(m(!1))}function G(_){return n.trimSpace&&e.is(bt)&&(_=pt(_,0,d(w(!0)-T()))),_}function v(_){var N=n.focus;return N==="center"?(T()-l(_,!0))/2:+N*l(_)||0}function I(_){return H(_?t.Controller.getEnd():0,!!n.trimSpace)}function R(_){var N=d(B(z(),_));return _?N>=0:N<=b[u("scrollWidth")]-Ee(x)[u("width")]}function L(_,N){N=Wt(N)?z():N;var J=_!==!0&&d(N)<d(I(!1)),ce=_!==!1&&d(N)>d(I(!0));return J||ce}return{mount:V,move:k,jump:S,translate:$,shift:B,cancel:W,toIndex:F,toPosition:H,getPosition:z,getLimit:I,exceededLimit:L,reposition:j}}function Bi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,p=i.getPosition,l=i.getLimit,m=i.toPosition,c=t.Slides,T=c.isEnough,w=c.getLength,y=n.omitEnd,u=e.is(Ct),d=e.is(bt),C=ve(z,!1),b=ve(z,!0),x=n.start||0,A,V=x,j,k,S;function $(){M(),r([Te,Se,on],M),r(sn,B)}function M(){j=w(!0),k=n.perMove,S=n.perPage,A=R();var f=pt(x,0,y?A:j-1);f!==x&&(x=f,i.reposition())}function B(){A!==R()&&s(on)}function W(f,O,oe){if(!me()){var ne=H(f),ue=I(ne);ue>-1&&(O||ue!==x)&&(J(ue),i.move(ne,ue,V,oe))}}function F(f,O,oe,ne){t.Scroll.scroll(f,O,oe,function(){var ue=I(i.toIndex(p()));J(y?Je(ue,A):ue),ne&&ne()})}function H(f){var O=x;if(Ze(f)){var oe=f.match(/([+\-<>])(\d+)?/)||[],ne=oe[1],ue=oe[2];ne==="+"||ne==="-"?O=G(x+ +(""+ne+(+ue||1)),x):ne===">"?O=ue?L(+ue):C(!0):ne==="<"&&(O=b(!0))}else O=u?f:pt(f,0,A);return O}function z(f,O){var oe=k||(te()?1:S),ne=G(x+oe*(f?-1:1),x,!(k||te()));return ne===-1&&d&&!Ho(p(),l(!f),1)?f?0:A:O?ne:I(ne)}function G(f,O,oe){if(T()||te()){var ne=v(f);ne!==f&&(O=f,f=ne,oe=!1),f<0||f>A?!k&&(Jt(0,f,O,!0)||Jt(A,O,f,!0))?f=L(_(f)):u?f=oe?f<0?-(j%S||S):j:f:n.rewind?f=f<0?A:0:f=-1:oe&&f!==O&&(f=L(_(O)+(f<O?-1:1)))}else f=-1;return f}function v(f){if(d&&n.trimSpace==="move"&&f!==x)for(var O=p();O===m(f,!0)&&Jt(f,0,e.length-1,!n.rewind);)f<x?--f:++f;return f}function I(f){return u?(f+j)%j||0:f}function R(){for(var f=j-(te()||u&&k?1:S);y&&f-- >0;)if(m(j-1,!0)!==m(f,!0)){f++;break}return pt(f,0,j-1)}function L(f){return pt(te()?f:S*f,0,A)}function _(f){return te()?Je(f,A):nn((f>=A?j-1:f)/S)}function N(f){var O=i.toIndex(f);return d?pt(O,0,A):O}function J(f){f!==x&&(V=x,x=f)}function ce(f){return f?V:x}function te(){return!Wt(n.focus)||n.isNavigation}function me(){return e.state.is([xt,Pt])&&!!n.waitForTransition}return{mount:$,go:W,scroll:F,getNext:C,getPrev:b,getAdjacent:z,getEnd:R,setIndex:J,getIndex:ce,toIndex:L,toPage:_,toDest:N,hasFocus:te,isBusy:me}}var Oi="http://www.w3.org/2000/svg",zi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",qt=40;function Di(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=n.classes,l=n.i18n,m=t.Elements,c=t.Controller,T=m.arrows,w=m.track,y=T,u=m.prev,d=m.next,C,b,x={};function A(){j(),r(Te,V)}function V(){k(),A()}function j(){var F=n.arrows;F&&!(u&&d)&&M(),u&&d&&(It(x,{prev:u,next:d}),Lt(y,F?"":"none"),We(y,b=Xn+"--"+n.direction),F&&(S(),W(),de([u,d],Bt,w.id),i(Uo,u,d)))}function k(){o.destroy(),De(y,b),C?(it(T?[u,d]:y),u=d=null):He([u,d],Yn)}function S(){r([et,St,Se,st,on],W),s(d,"click",ve($,">")),s(u,"click",ve($,"<"))}function $(F){c.go(F,!0)}function M(){y=T||gt("div",p.arrows),u=B(!0),d=B(!1),C=!0,Nt(y,[u,d]),!T&&Hn(y,w)}function B(F){var H='<button class="'+p.arrow+" "+(F?p.prev:p.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||zi)+'" />';return Po(H)}function W(){if(u&&d){var F=e.index,H=c.getPrev(),z=c.getNext(),G=H>-1&&F<H?l.last:l.prev,v=z>-1&&F>z?l.first:l.next;u.disabled=H<0,d.disabled=z<0,de(u,ke,G),de(d,ke,v),i(Go,u,d,H,z)}}return{arrows:x,mount:A,destroy:k,update:W}}var qi=jn+"-interval";function Ui(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=cn(n.interval,e.go.bind(e,">"),S),l=p.isPaused,m=t.Elements,c=t.Elements,T=c.root,w=c.toggle,y=n.autoplay,u,d,C=y==="pause";function b(){y&&(x(),w&&de(w,Bt,m.track.id),C||A(),k())}function x(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(M){u=M.type==="mouseenter",j()}),n.pauseOnFocus&&s(T,"focusin focusout",function(M){d=M.type==="focusin",j()}),w&&s(w,"click",function(){C?A():V(!0)}),r([Ge,ln,Se],p.rewind),r(Ge,$)}function A(){l()&&t.Slides.isEnough()&&(p.start(!n.resetProgress),d=u=C=!1,k(),i(Dn))}function V(M){M===void 0&&(M=!0),C=!!M,k(),l()||(p.pause(),i(qn))}function j(){C||(u||d?V(!1):A())}function k(){w&&(ze(w,at,!C),de(w,ke,n.i18n[C?"play":"pause"]))}function S(M){var B=m.bar;B&&Le(B,"width",M*100+"%"),i(Xo,M)}function $(M){var B=t.Slides.getAt(M);p.set(B&&+Fe(B.slide,qi)||n.interval)}return{mount:b,destroy:p.cancel,play:A,pause:V,isPaused:l}}function Gi(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Un,ve(p,!0)),r([et,Te,Se],ve(i,!0)))}function i(l){t.Slides.forEach(function(m){var c=jt(m.container||m.slide,"img");c&&c.src&&p(l,c,m)})}function p(l,m,c){c.style("background",l?'center/cover no-repeat url("'+m.src+'")':"",!0),Lt(m,l?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Ki=10,Yi=600,Xi=.6,Zi=1.5,Ji=800;function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,p=t.Move,l=p.getPosition,m=p.getLimit,c=p.exceededLimit,T=p.translate,w=e.is(bt),y,u,d=1;function C(){r(Ge,V),r([Te,Se],j)}function b(S,$,M,B,W){var F=l();if(V(),M&&(!w||!c())){var H=t.Layout.sliderSize(),z=En(S)*H*nn(_e(S)/H)||0;S=p.toPosition(t.Controller.toDest(S%H))+z}var G=Ho(F,S,1);d=1,$=G?0:$||tn(_e(S-F)/Zi,Ji),u=B,y=cn($,x,ve(A,F,S,W),1),i(Pt),s(ln),y.start()}function x(){i(yt),u&&u(),s(st)}function A(S,$,M,B){var W=l(),F=S+($-S)*k(B),H=(F-W)*d;T(W+H),w&&!M&&c()&&(d*=Xi,_e(H)<Ki&&b(m(c(!0)),Yi,!1,u,!0))}function V(){y&&y.cancel()}function j(){y&&!y.isPaused()&&(V(),x())}function k(S){var $=n.easingFunc;return $?$(S):1-Math.pow(1-S,4)}return{mount:C,destroy:V,scroll:b,cancel:j}}var dt={passive:!1,capture:!0};function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=o.unbind,l=e.state,m=t.Move,c=t.Scroll,T=t.Controller,w=t.Elements.track,y=t.Media.reduce,u=t.Direction,d=u.resolve,C=u.orient,b=m.getPosition,x=m.exceededLimit,A,V,j,k,S,$=!1,M,B,W;function F(){i(w,Sn,Tn,dt),i(w,Cn,Tn,dt),i(w,pr,z,dt),i(w,"click",I,{capture:!0}),i(w,"dragstart",Oe),r([et,Te],H)}function H(){var P=n.drag;se(!P),k=P==="free"}function z(P){if(M=!1,!B){var h=ue(P);ne(P.target)&&(h||!P.button)&&(T.isBusy()?Oe(P,!0):(W=h?w:window,S=l.is([xt,Pt]),j=null,i(W,Sn,G,dt),i(W,Cn,v,dt),m.cancel(),c.cancel(),R(P)))}}function G(P){if(l.is(Xt)||(l.set(Xt),s(zo)),P.cancelable)if(S){m.translate(A+oe(te(P)));var h=me(P)>fo,D=$!==($=x());(h||D)&&R(P),M=!0,s(Do),Oe(P)}else N(P)&&(S=_(P),Oe(P))}function v(P){l.is(Xt)&&(l.set(yt),s(qo)),S&&(L(P),Oe(P)),p(W,Sn,G),p(W,Cn,v),S=!1}function I(P){!B&&M&&Oe(P,!0)}function R(P){j=V,V=P,A=b()}function L(P){var h=J(P),D=ce(h),Y=n.rewind&&n.rewindByDrag;y(!1),k?T.scroll(D,0,n.snap):e.is(Ot)?T.go(C(En(h))<0?Y?"<":"-":Y?">":"+"):e.is(bt)&&$&&Y?T.go(x(!0)?">":"<"):T.go(T.toDest(D),!0),y(!0)}function _(P){var h=n.dragMinThreshold,D=Et(h),Y=D&&h.mouse||0,Q=(D?h.touch:+h)||10;return _e(te(P))>(ue(P)?Q:Y)}function N(P){return _e(te(P))>_e(te(P,!0))}function J(P){if(e.is(Ct)||!$){var h=me(P);if(h&&h<fo)return te(P)/h}return 0}function ce(P){return b()+En(P)*Je(_e(P)*(n.flickPower||600),k?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(P,h){return O(P,h)-O(f(P),h)}function me(P){return _n(P)-_n(f(P))}function f(P){return V===P&&j||V}function O(P,h){return(ue(P)?P.changedTouches[0]:P)["page"+d(h?"Y":"X")]}function oe(P){return P/($&&e.is(bt)?Ri:1)}function ne(P){var h=n.noDrag;return!kt(P,"."+ar+", ."+fn)&&(!h||!kt(P,h))}function ue(P){return typeof TouchEvent<"u"&&P instanceof TouchEvent}function q(){return S}function se(P){B=P}return{mount:F,disable:se,isDragging:q}}var ta={Spacebar:" ",Right:dn,Left:pn,Up:Qo,Down:er};function Zn(e){return e=Ze(e)?e:e.key,ta[e]||e}var ho="keydown";function na(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,p=e.root,l=t.Direction.resolve,m,c;function T(){w(),r(Te,y),r(Te,w),r(Ge,d)}function w(){var b=n.keyboard;b&&(m=b==="global"?window:p,s(m,ho,C))}function y(){i(m,ho)}function u(b){c=b}function d(){var b=c;c=!0,Io(function(){c=b})}function C(b){if(!c){var x=Zn(b);x===l(pn)?e.go("<"):x===l(dn)&&e.go(">")}}return{mount:T,destroy:y,disable:u}}var _t=jn+"-lazy",Qt=_t+"-srcset",oa="["+_t+"], ["+Qt+"]";function ra(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,p=o.emit,l=n.lazyLoad==="sequential",m=[St,st],c=[];function T(){n.lazyLoad&&(w(),r(Se,w))}function w(){Ue(c),y(),l?b():(s(m),r(m,u),u())}function y(){t.Slides.forEach(function(x){Nn(x.slide,oa).forEach(function(A){var V=Fe(A,_t),j=Fe(A,Qt);if(V!==A.src||j!==A.srcset){var k=n.classes.spinner,S=A.parentElement,$=jt(S,"."+k)||gt("span",k,S);c.push([A,x,$]),A.src||Lt(A,"none")}})})}function u(){c=c.filter(function(x){var A=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,A)?d(x):!0}),c.length||s(m)}function d(x){var A=x[0];We(x[1].slide,Ln),i(A,"load error",ve(C,x)),de(A,"src",Fe(A,_t)),de(A,"srcset",Fe(A,Qt)),He(A,_t),He(A,Qt)}function C(x,A){var V=x[0],j=x[1];De(j.slide,Ln),A.type!=="error"&&(it(x[2]),Lt(V,""),p(Un,V,j),p(vt)),l&&b()}function b(){c.length&&d(c.shift())}return{mount:T,destroy:ve(Ue,c),check:u}}function ia(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=t.Slides,l=t.Elements,m=t.Controller,c=m.hasFocus,T=m.getIndex,w=m.go,y=t.Direction.resolve,u=l.pagination,d=[],C,b;function x(){A(),r([Te,Se,on],x);var B=n.pagination;u&&Lt(u,B?"":"none"),B&&(r([Ge,ln,st],M),V(),M(),s(Ko,{list:C,items:d},$(e.index)))}function A(){C&&(it(u?Qe(C.children):C),De(C,b),Ue(d),C=null),o.destroy()}function V(){var B=e.length,W=n.classes,F=n.i18n,H=n.perPage,z=c()?m.getEnd()+1:Ft(B/H);C=u||gt("ul",W.pagination,l.track.parentElement),We(C,b=hn+"--"+S()),de(C,qe,"tablist"),de(C,ke,F.select),de(C,Kn,S()===mn?"vertical":"");for(var G=0;G<z;G++){var v=gt("li",null,C),I=gt("button",{class:W.page,type:"button"},v),R=p.getIn(G).map(function(_){return _.slide.id}),L=!c()&&H>1?F.pageX:F.slideX;i(I,"click",ve(j,G)),n.paginationKeyboard&&i(I,"keydown",ve(k,G)),de(v,qe,"presentation"),de(I,qe,"tab"),de(I,Bt,R.join(" ")),de(I,ke,kn(L,G+1)),de(I,ft,-1),d.push({li:v,button:I,page:G})}}function j(B){w(">"+B,!0)}function k(B,W){var F=d.length,H=Zn(W),z=S(),G=-1;H===y(dn,!1,z)?G=++B%F:H===y(pn,!1,z)?G=(--B+F)%F:H==="Home"?G=0:H==="End"&&(G=F-1);var v=d[G];v&&(Mo(v.button),w(">"+G),Oe(W,!0))}function S(){return n.paginationDirection||n.direction}function $(B){return d[m.toPage(B)]}function M(){var B=$(T(!0)),W=$(T());if(B){var F=B.button;De(F,at),He(F,co),de(F,ft,-1)}if(W){var H=W.button;We(H,at),de(H,co,!0),de(H,ft,"")}s(Yo,{list:C,items:d},B,W)}return{items:d,mount:x,destroy:A,getAt:$,update:M}}var aa=[" ","Enter"];function sa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(u){u.isParent||(m(e,u.splide),m(u.splide,e))}),o&&c()}function p(){s.forEach(function(u){u.destroy()}),Ue(s)}function l(){p(),i()}function m(u,d){var C=be(u);C.on(Ge,function(b,x,A){d.go(d.is(Ct)?A:b)}),s.push(C)}function c(){var u=be(e),d=u.on;d(Bn,w),d(Zo,y),d([et,Te],T),s.push(u),u.emit(zn,e.splides)}function T(){de(t.Elements.list,Kn,n.direction===mn?"vertical":"")}function w(u){e.go(u.index)}function y(u,d){Wn(aa,Zn(d))&&(w(u),Oe(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:p,remount:l}}function la(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",p,dt)}function p(m){if(m.cancelable){var c=m.deltaY,T=c<0,w=_n(m),y=n.wheelMinThreshold||0,u=n.wheelSleep||0;_e(c)>y&&w-s>u&&(e.go(T?"<":">"),s=w),l(T)&&Oe(m)}}function l(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var ca=90;function ua(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,p=gt("span",ki),l=cn(ca,ve(c,!1));function m(){i&&(w(!t.Autoplay.isPaused()),de(s,mo,!0),p.textContent="…",r(Dn,ve(w,!0)),r(qn,ve(w,!1)),r([St,st],ve(c,!0)))}function c(y){de(s,po,y),y?(Nt(s,p),l.start()):(it(p),l.cancel())}function T(){He(s,[uo,mo,po]),it(p)}function w(y){i&&de(s,uo,y?"off":"polite")}return{mount:m,disable:w,destroy:T}}var pa=Object.freeze({__proto__:null,Media:bi,Direction:xi,Elements:Mi,Slides:Wi,Layout:Hi,Clones:ji,Move:Vi,Controller:Bi,Arrows:Di,Autoplay:Ui,Cover:Gi,Scroll:Qi,Drag:ea,Keyboard:na,LazyLoad:ra,Pagination:ia,Sync:sa,Wheel:la,Live:ua}),da={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ma={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Li,i18n:da,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(p){p.style("transform","translateX(-"+100*p.index+"%)")})}function i(p,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),Io(l)}return{mount:r,start:i,cancel:Tn}}function fa(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,p=ve(Le,i,"transition"),l;function m(){be(e).bind(i,"transitionend",function(y){y.target===i&&l&&(T(),l())})}function c(y,u){var d=o.toPosition(y,!0),C=o.getPosition(),b=w(y);_e(d-C)>=1&&b>=1?n.useScroll?s.scroll(d,b,!1,u):(p("transform "+b+"ms "+n.easing),o.translate(d,!0),l=u):(o.jump(y),u())}function T(){p(""),s.cancel()}function w(y){var u=n.rewindSpeed;if(e.is(bt)&&u){var d=r.getIndex(!0),C=r.getEnd();if(d===0&&y>=C||d>=C&&y===0)return u}return n.speed}return{mount:m,start:c,cancel:T}}var ha=(function(){function e(n,o){this.event=be(),this.Components={},this.state=yi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Wo(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ye({label:Fe(r,ke)||"",labelledby:Fe(r,Gn)||""},ma,e.defaults,o||{});try{Ye(o,JSON.parse(Fe(r,jn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,p=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=p,this._T=r||this._T||(this.is(Ot)?ga:fa),this._E=o||this._E;var l=It({},pa,this._E,{Transition:this._T});return rt(l,function(m,c){var T=m(s,p,s._o);p[c]=T,T.setup&&T.setup()}),rt(p,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,Ai),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Qe(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(An,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),s.set(en)),this},di(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Jn=ha;Jn.defaults={};Jn.STATES=gi;var yo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[Bn,"onClick"],[jo,"onActive"],[Vo,"onInactive"],[Bo,"onVisible"],[Oo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[zo,"onDrag"],[Do,"onDragging"],[qo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[On,"onDestroy"],[Uo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Ko,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Dn,"onAutoplayPlay"],[Xo,"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 ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function va(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Rn(e,t){const n=e;return va(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Rn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var ba=({children:e,className:t,...n})=>g.createElement("div",{className:Qn("splide__track",t),...n},g.createElement("ul",{className:"splide__list"},e)),dr=class extends g.Component{constructor(){super(...arguments),this.splideRef=g.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Rn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Fn(this.options,e)&&(this.splide.options=e,this.options=Rn({},e));const t=this.getSlides();ya(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){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 g.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(s=>s[1])])},n?g.createElement(ba,null,o):o)}},mr=({children:e,className:t,...n})=>g.createElement("li",{className:Qn("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("react"),he=require("classnames"),_=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),xr=require("react-dom");function Sr(e){return e.type==="object"&&e.version===1}const Cr="ControlSlider-module__wrapper___sHEkd",wr="ControlSlider-module__hoverArrow___A-dOH",$r="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",Er="ControlSlider-module__arrowVertical___tBfVN",kr="ControlSlider-module__nextArrow___-30Yc",Ar="ControlSlider-module__arrowInner___aEra3",Ir="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",Rr="ControlSlider-module__pagination___bicLF",Mr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Hr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",jr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Br="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",zr="ControlSlider-module__paginationInsideLeft___yOBRZ",Dr="ControlSlider-module__paginationInsideRight___Rtt3o",qr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",Kr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Zr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Qr="ControlSlider-module__topLeftAlignment___zjnGM",ei="ControlSlider-module__topCenterAlignment___gD1xW",ti="ControlSlider-module__topRightAlignment___NMapS",ni="ControlSlider-module__middleLeftAlignment___OnUrY",oi="ControlSlider-module__middleCenterAlignment___Tdkl0",ri="ControlSlider-module__middleRightAlignment___wEbfX",ii="ControlSlider-module__bottomLeftAlignment___cTP2-",ai="ControlSlider-module__bottomCenterAlignment___c54fB",si="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",ci="ControlSlider-module__contain___pLyq7",ui="ControlSlider-module__cover___KdDat",te={wrapper:Cr,hoverArrow:wr,sliderItem:$r,sliderImage:Tr,arrow:_r,arrowVertical:Er,nextArrow:kr,arrowInner:Ar,arrowIcon:Ir,arrowImg:Lr,mirror:Fr,pagination:Rr,paginationInner:Mr,paginationVertical:Pr,paginationItem:Wr,dot:Hr,activeDot:Nr,paginationInsideBottom:jr,paginationInsideTop:Vr,paginationOutsideBottom:Br,paginationOutsideTop:Or,paginationInsideLeft:zr,paginationInsideRight:Dr,paginationOutsideLeft:qr,paginationOutsideRight:Ur,imgWrapper:Gr,captionBlock:Kr,captionTextWrapper:Yr,captionText:Xr,active:Zr,withPointerEvents:Jr,topLeftAlignment:Qr,topCenterAlignment:ei,topRightAlignment:ti,middleLeftAlignment:ni,middleCenterAlignment:oi,middleRightAlignment:ri,bottomLeftAlignment:ii,bottomCenterAlignment:ai,bottomRightAlignment:si,clickOverlay:li,contain:ci,cover:ui};function pi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function di(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,mi=2,yt=3,xt=4,Pt=5,Xt=6,en=7,gi={CREATED:mt,MOUNTED:mi,IDLE:yt,MOVING:xt,SCROLLING:Pt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Io=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Pn(e)&&an("object",e)}var Mn=Array.isArray,Lo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Pn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Mn(e)?e:[e]}function Ae(e,t){Ht(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function ze(e,t,n){e&&Ae(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){ze(e,Ze(t)?t.split(" "):t,!0)}function Nt(e,t){Ae(t,e.appendChild.bind(e))}function Hn(e,t){Ae(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var At=Object.keys;function rt(e,t,n){return e&&(n?At(e).reverse():At(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function It(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Mn(n)?e[o]=n.slice():Et(n)?e[o]=Ye({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function io(e,t){Ae(t||At(e),function(n){delete e[n]})}function He(e,t){Ae(e,function(n){Ae(t,function(o){n&&n.removeAttribute(o)})})}function de(e,t,n){Et(t)?rt(t,function(o,r){de(e,r,o)}):Ae(e,function(o){Pn(n)||n===""?He(o,t):o.setAttribute(t,String(n))})}function gt(e,t,n){var o=document.createElement(e);return t&&(Ze(t)?We(o,t):de(o,t)),n&&Nt(n,o),o}function Le(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Pn(n)||(e.style[t]=""+n)}function Lt(e,t){Le(e,"display",t)}function Mo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function ao(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Ae(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){ze(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",jn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Ho(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function kn(e,t){return Ae(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var so={};function fi(e){return""+e+Vn(so[e]=(so[e]||0)+1)}function No(){var e=[];function t(i,u,l,m){r(i,u,function(c,T,v){var h="addEventListener"in c,p=h?c.removeEventListener.bind(c,T,l,m):c.removeListener.bind(c,l);h?c.addEventListener(T,l,m):c.addListener(l),e.push([c,T,v,l,p])})}function n(i,u,l){r(i,u,function(m,c,T){e=e.filter(function(v){return v[0]===m&&v[1]===c&&v[2]===T&&(!l||v[3]===l)?(v[4](),!1):!0})})}function o(i,u,l){var m,c=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:c,detail:l}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,c,!1,l)),i.dispatchEvent(m),m}function r(i,u,l){Ae(i,function(m){m&&Ae(u,function(c){c.split(" ").forEach(function(T){var v=T.split(".");l(m,v[0],v[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",Bn="click",jo="active",Vo="inactive",Bo="visible",Oo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",zo="drag",Do="dragging",qo="dragged",ln="scroll",st="scrolled",hi="overflow",On="destroy",Uo="arrows:mounted",Go="arrows:updated",Ko="pagination:mounted",Yo="pagination:updated",zn="navigation:mounted",Dn="autoplay:play",Xo="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Zo="sk",Jo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function o(s,i){n.bind(t,Ht(s).join(" "),function(u){i.apply(i,Mn(u.detail)?u.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(On,n.destroy),It(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,u,l=!0,m=0;function c(){if(!l){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++m>=o))return v();u=ro(c)}}function T(b){b||p(),s=r()-(b?i*e:0),l=!1,u=ro(c)}function v(){l=!0}function h(){s=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,l=!0}function d(b){e=b}function C(){return l}return{start:T,rewind:h,pause:v,cancel:p,set:d,isPaused:C}}function yi(e){var t=e;function n(r){t=r}function o(r){return Wn(Ht(r),t)}return{set:n,is:o}}function vi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=No(),u=[];function l(){var p=n.mediaQuery==="min";At(r).sort(function(d,C){return p?+d-+C:+C-+d}).forEach(function(d){c(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),c(s,oo),T()}function m(p){p&&i.destroy()}function c(p,d){var C=matchMedia(d);i.bind(C,"change",T),u.push([p,C])}function T(){var p=o.is(en),d=n.direction,C=u.reduce(function(b,x){return Ye(b,x[1].matches?x[0]:{})},{});io(n),h(C),n.destroy?e.destroy(n.destroy==="completely"):p?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function v(p){matchMedia(oo).matches&&(p?Ye(n,s):io(n,At(s)))}function h(p,d,C){Ye(n,p),d&&Ye(Object.getPrototypeOf(n),p),(C||!o.is(mt))&&e.emit(Te,n)}return{setup:l,destroy:m,reduce:v,set:h}}var un="Arrow",pn=un+"Left",dn=un+"Right",Qo=un+"Up",er=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qo,dn],ArrowRight:[er,pn]};function xi(e,t,n){function o(s,i,u){u=u||n.direction;var l=u===lo&&!i?1:u===mn?0:-1;return bn[s]&&bn[s][l]||s.replace(/width|left|right/i,function(m,c){var T=bn[m.toLowerCase()][l]||m;return c>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function r(s){return s*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",Si="disabled",Re="aria-",Bt=Re+"controls",tr=Re+"current",co=Re+"selected",ke=Re+"label",Gn=Re+"labelledby",nr=Re+"hidden",Kn=Re+"orientation",Rt=Re+"roledescription",uo=Re+"live",po=Re+"busy",mo=Re+"atomic",Yn=[qe,ft,Si,Bt,tr,ke,Gn,nr,Kn,Rt],Ne=Vt+"__",tt="is-",xn=Vt,go=Ne+"track",Ci=Ne+"list",gn=Ne+"slide",or=gn+"--clone",wi=gn+"__container",Xn=Ne+"arrows",fn=Ne+"arrow",rr=fn+"--prev",ir=fn+"--next",hn=Ne+"pagination",ar=hn+"__page",$i=Ne+"progress",Ti=$i+"__bar",_i=Ne+"toggle",Ei=Ne+"spinner",ki=Ne+"sr",Ai=tt+"initialized",at=tt+"active",sr=tt+"prev",lr=tt+"next",In=tt+"visible",Ln=tt+"loading",cr=tt+"focus-in",ur=tt+"overflow",Ii=[at,In,sr,lr,Ln,cr,ur],Li={slide:gn,clone:or,arrows:Xn,arrow:fn,prev:rr,next:ir,pagination:hn,page:ar,spinner:Ei};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Ri=5,fo=200,pr="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Mi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,u=n.i18n,l={},m=[],c=[],T=[],v,h,p;function d(){E(),U(),x()}function C(){r(Se,b),r(Se,d),r(Te,x),s(document,pr+" keydown",function(S){p=S.type==="keydown"},{capture:!0}),s(i,"focusin",function(){ze(i,cr,!!p)})}function b(S){var w=Yn.concat("style");Ue(m),De(i,c),De(v,T),He([v,h],w),He(i,S?w:["style",Rt])}function x(){De(i,c),De(v,T),c=A(xn),T=A(go),We(i,c),We(v,T),de(i,ke,n.label),de(i,Gn,n.labelledby)}function E(){v=k("."+go),h=jt(v,"."+Ci),Tt(v&&h,"A track/list element is missing."),Zt(m,Ro(h,"."+gn+":not(."+or+")")),rt({arrows:Xn,pagination:hn,prev:rr,next:ir,bar:Ti,toggle:_i},function(S,w){l[w]=k("."+S)}),It(l,{root:i,track:v,list:h,slides:m})}function U(){var S=i.id||fi(Vt),w=n.role;i.id=S,v.id=v.id||S+"-track",h.id=h.id||S+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&w&&de(i,qe,w),de(i,Rt,u.carousel),de(h,qe,"presentation")}function k(S){var w=Wo(i,S);return w&&Fi(w,"."+xn)===i?w:void 0}function A(S){return[S+"--"+n.type,S+"--"+n.direction,n.drag&&S+"--draggable",n.isNavigation&&S+"--nav",S===xn&&at]}return It(l,{setup:d,mount:C,destroy:b})}var bt="slide",Ct="loop",Ot="fade";function Pi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,u=r.bind,l=e.Components,m=e.root,c=e.options,T=c.isNavigation,v=c.updateOnMove,h=c.i18n,p=c.pagination,d=c.slideFocus,C=l.Direction.resolve,b=Fe(o,"style"),x=Fe(o,ke),E=n>-1,U=jt(o,"."+wi),k;function A(){E||(o.id=m.id+"-slide"+Vn(t+1),de(o,qe,p?"tabpanel":"group"),de(o,Rt,h.slide),de(o,ke,x||kn(h.slideLabel,[t+1,e.length]))),S()}function S(){u(o,"click",ve(i,Bn,I)),u(o,"keydown",ve(i,Zo,I)),s([St,Jo,st],H),s(zn,R),v&&s(Ge,V)}function w(){k=!0,r.destroy(),De(o,Ii),He(o,Yn),de(o,"style",b),de(o,ke,x||"")}function R(){var P=e.splides.map(function($){var N=$.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");de(o,ke,kn(h.slideX,(E?n:t)+1)),de(o,Bt,P),de(o,qe,d?"button":""),d&&He(o,Rt)}function V(){k||H()}function H(){if(!k){var P=e.index;j(),M(),ze(o,sr,t===P-1),ze(o,lr,t===P+1)}}function j(){var P=K();P!==ao(o,at)&&(ze(o,at,P),de(o,tr,T&&P||""),i(P?jo:Vo,I))}function M(){var P=f(),$=!P&&(!K()||E);if(e.state.is([xt,Pt])||de(o,nr,$||""),de(Nn(o,c.focusableNodes||""),ft,$?-1:""),d&&de(o,ft,$?-1:0),P!==ao(o,In)&&(ze(o,In,P),i(P?Bo:Oo,I)),!P&&document.activeElement===o){var N=l.Slides.getAt(e.index);N&&Mo(N.slide)}}function z(P,$,N){Le(N&&U||o,P,$)}function K(){var P=e.index;return P===t||c.cloneStatus&&P===n}function f(){if(e.is(Ot))return K();var P=Ee(l.Elements.track),$=Ee(o),N=C("left",!0),ee=C("right",!0);return nn(P[N])<=Ft($[N])&&nn($[ee])<=Ft(P[ee])}function L(P,$){var N=_e(P-t);return!E&&(c.rewind||e.is(Ct))&&(N=Je(N,e.length-N)),N<=$}var I={index:t,slideIndex:n,slide:o,container:U,isClone:E,mount:A,destroy:w,update:H,style:z,isWithin:L};return I}function Wi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Elements,l=u.slides,m=u.list,c=[];function T(){v(),r(Se,h),r(Se,v)}function v(){l.forEach(function(H,j){d(H,j,-1)})}function h(){k(function(H){H.destroy()}),Ue(c)}function p(){k(function(H){H.update()})}function d(H,j,M){var z=Pi(e,j,M,H);z.mount(),c.push(z),c.sort(function(K,f){return K.index-f.index})}function C(H){return H?A(function(j){return!j.isClone}):c}function b(H){var j=t.Controller,M=j.toIndex(H),z=j.hasFocus()?1:n.perPage;return A(function(K){return Jt(K.index,M,M+z-1)})}function x(H){return A(H)[0]}function E(H,j){Ae(H,function(M){if(Ze(M)&&(M=Po(M)),Fo(M)){var z=l[j];z?Hn(M,z):Nt(m,M),We(M,n.classes.slide),w(M,ve(s,vt))}}),s(Se)}function U(H){it(A(H).map(function(j){return j.slide})),s(Se)}function k(H,j){C(j).forEach(H)}function A(H){return c.filter(Lo(H)?H:function(j){return Ze(H)?kt(j.slide,H):Wn(Ht(H),j.index)})}function S(H,j,M){k(function(z){z.style(H,j,M)})}function w(H,j){var M=Nn(H,"img"),z=M.length;z?M.forEach(function(K){i(K,"load error",function(){--z||j()})}):j()}function R(H){return H?l.length:c.length}function V(){return c.length>n.perPage}return{mount:T,destroy:h,update:p,register:d,get:C,getIn:b,getAt:x,add:E,remove:U,forEach:k,filter:A,style:S,getLength:R,isEnough:V}}function Hi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=t.Slides,l=t.Direction.resolve,m=t.Elements,c=m.root,T=m.track,v=m.list,h=u.getAt,p=u.style,d,C,b;function x(){E(),s(window,"resize load",vi(ve(i,vt))),r([Te,Se],E),r(vt,U)}function E(){d=n.direction===mn,Le(c,"maxWidth",ot(n.width)),Le(T,l("paddingLeft"),k(!1)),Le(T,l("paddingRight"),k(!0)),U(!0)}function U(I){var P=Ee(c);(I||C.width!==P.width||C.height!==P.height)&&(Le(T,"height",A()),p(l("marginRight"),ot(n.gap)),p("width",w()),p("height",R(),!0),C=P,i(sn),b!==(b=L())&&(ze(c,ur,b),i(hi,b)))}function k(I){var P=n.padding,$=l(I?"right":"left");return P&&ot(P[$]||(Et(P)?0:P))||"0px"}function A(){var I="";return d&&(I=S(),Tt(I,"height or heightRatio is missing."),I="calc("+I+" - "+k(!1)+" - "+k(!0)+")"),I}function S(){return ot(n.height||Ee(v).width*n.heightRatio)}function w(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":V())}function R(){return ot(n.fixedHeight)||(d?n.autoHeight?null:V():S())}function V(){var I=ot(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function H(){return Ee(v)[l("width")]}function j(I,P){var $=h(I||0);return $?Ee($.slide)[l("width")]+(P?0:K()):0}function M(I,P){var $=h(I);if($){var N=Ee($.slide)[l("right")],ee=Ee(v)[l("left")];return _e(N-ee)+(P?0:K())}return 0}function z(I){return M(e.length-1)-M(0)+j(0,I)}function K(){var I=h(0);return I&&parseFloat(Le(I.slide,l("marginRight")))||0}function f(I){return parseFloat(Le(T,l("padding"+(I?"Right":"Left"))))||0}function L(){return e.is(Ot)||z(!0)>H()}return{mount:x,resize:U,listSize:H,slideSize:j,sliderSize:z,totalSize:M,getPadding:f,isOverflow:L}}var Ni=2;function ji(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,u=t.Direction.resolve,l=[],m;function c(){r(Se,T),r([Te,vt],h),(m=C())&&(p(m),t.Layout.resize(!0))}function T(){v(),c()}function v(){it(l),Ue(l),o.destroy()}function h(){var b=C();m!==b&&(m<b||!b)&&o.emit(Se)}function p(b){var x=i.get().slice(),E=x.length;if(E){for(;x.length<b;)Zt(x,x);Zt(x.slice(-b),x.slice(0,b)).forEach(function(U,k){var A=k<b,S=d(U.slide,k);A?Hn(S,x[0].slide):Nt(s.list,S),Zt(l,S),i.register(S,k-b+(A?0:E),U.index)})}}function d(b,x){var E=b.cloneNode(!0);return We(E,n.classes.clone),E.id=e.root.id+"-clone"+Vn(x+1),E}function C(){var b=n.clones;if(!e.is(Ct))b=0;else if(Wt(b)){var x=n[u("fixedWidth")]&&t.Layout.slideSize(0),E=x&&Ft(Ee(s.track)[u("width")]/x);b=E||n[u("autoWidth")]&&e.length||n.perPage*Ni}return b}return{mount:c,destroy:v}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Layout,l=u.slideSize,m=u.getPadding,c=u.totalSize,T=u.listSize,v=u.sliderSize,h=t.Direction,p=h.resolve,d=h.orient,C=t.Elements,b=C.list,x=C.track,E;function U(){E=t.Transition,r([et,sn,Te,Se],k)}function k(){t.Controller.isBusy()||(t.Scroll.cancel(),S(e.index),t.Slides.update())}function A($,N,ee,ue){$!==N&&I($>ee)&&(H(),w(V(z(),$>ee),!0)),i(xt),s(Ge,N,ee,$),E.start(N,function(){i(yt),s(St,N,ee,$),ue&&ue()})}function S($){w(M($,!0))}function w($,N){if(!e.is(Ot)){var ee=N?$:R($);Le(b,"transform","translate"+p("X")+"("+ee+"px)"),$!==ee&&s(Jo)}}function R($){if(e.is(Ct)){var N=j($),ee=N>t.Controller.getEnd(),ue=N<0;(ue||ee)&&($=V($,ee))}return $}function V($,N){var ee=$-L(N),ue=v();return $-=d(ue*(Ft(_e(ee)/ue)||1))*(N?1:-1),$}function H(){w(z(),!0),E.cancel()}function j($){for(var N=t.Slides.get(),ee=0,ue=1/0,oe=0;oe<N.length;oe++){var me=N[oe].index,W=_e(M(me,!0)-$);if(W<=ue)ue=W,ee=me;else break}return ee}function M($,N){var ee=d(c($-1)-f($));return N?K(ee):ee}function z(){var $=p("left");return Ee(b)[$]-Ee(x)[$]+d(m(!1))}function K($){return n.trimSpace&&e.is(bt)&&($=pt($,0,d(v(!0)-T()))),$}function f($){var N=n.focus;return N==="center"?(T()-l($,!0))/2:+N*l($)||0}function L($){return M($?t.Controller.getEnd():0,!!n.trimSpace)}function I($){var N=d(V(z(),$));return $?N>=0:N<=b[p("scrollWidth")]-Ee(x)[p("width")]}function P($,N){N=Wt(N)?z():N;var ee=$!==!0&&d(N)<d(L(!1)),ue=$!==!1&&d(N)>d(L(!0));return ee||ue}return{mount:U,move:A,jump:S,translate:w,shift:V,cancel:H,toIndex:j,toPosition:M,getPosition:z,getLimit:L,exceededLimit:P,reposition:k}}function Bi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,u=i.getPosition,l=i.getLimit,m=i.toPosition,c=t.Slides,T=c.isEnough,v=c.getLength,h=n.omitEnd,p=e.is(Ct),d=e.is(bt),C=ve(z,!1),b=ve(z,!0),x=n.start||0,E,U=x,k,A,S;function w(){R(),r([Te,Se,on],R),r(sn,V)}function R(){k=v(!0),A=n.perMove,S=n.perPage,E=I();var W=pt(x,0,h?E:k-1);W!==x&&(x=W,i.reposition())}function V(){E!==I()&&s(on)}function H(W,B,Q){if(!me()){var ne=M(W),se=L(ne);se>-1&&(B||se!==x)&&(ee(se),i.move(ne,se,U,Q))}}function j(W,B,Q,ne){t.Scroll.scroll(W,B,Q,function(){var se=L(i.toIndex(u()));ee(h?Je(se,E):se),ne&&ne()})}function M(W){var B=x;if(Ze(W)){var Q=W.match(/([+\-<>])(\d+)?/)||[],ne=Q[1],se=Q[2];ne==="+"||ne==="-"?B=K(x+ +(""+ne+(+se||1)),x):ne===">"?B=se?P(+se):C(!0):ne==="<"&&(B=b(!0))}else B=p?W:pt(W,0,E);return B}function z(W,B){var Q=A||(oe()?1:S),ne=K(x+Q*(W?-1:1),x,!(A||oe()));return ne===-1&&d&&!Ho(u(),l(!W),1)?W?0:E:B?ne:L(ne)}function K(W,B,Q){if(T()||oe()){var ne=f(W);ne!==W&&(B=W,W=ne,Q=!1),W<0||W>E?!A&&(Jt(0,W,B,!0)||Jt(E,B,W,!0))?W=P($(W)):p?W=Q?W<0?-(k%S||S):k:W:n.rewind?W=W<0?E:0:W=-1:Q&&W!==B&&(W=P($(B)+(W<B?-1:1)))}else W=-1;return W}function f(W){if(d&&n.trimSpace==="move"&&W!==x)for(var B=u();B===m(W,!0)&&Jt(W,0,e.length-1,!n.rewind);)W<x?--W:++W;return W}function L(W){return p?(W+k)%k||0:W}function I(){for(var W=k-(oe()||p&&A?1:S);h&&W-- >0;)if(m(k-1,!0)!==m(W,!0)){W++;break}return pt(W,0,k-1)}function P(W){return pt(oe()?W:S*W,0,E)}function $(W){return oe()?Je(W,E):nn((W>=E?k-1:W)/S)}function N(W){var B=i.toIndex(W);return d?pt(B,0,E):B}function ee(W){W!==x&&(U=x,x=W)}function ue(W){return W?U:x}function oe(){return!Wt(n.focus)||n.isNavigation}function me(){return e.state.is([xt,Pt])&&!!n.waitForTransition}return{mount:w,go:H,scroll:j,getNext:C,getPrev:b,getAdjacent:z,getEnd:I,setIndex:ee,getIndex:ue,toIndex:P,toPage:$,toDest:N,hasFocus:oe,isBusy:me}}var Oi="http://www.w3.org/2000/svg",zi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",qt=40;function Di(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=n.classes,l=n.i18n,m=t.Elements,c=t.Controller,T=m.arrows,v=m.track,h=T,p=m.prev,d=m.next,C,b,x={};function E(){k(),r(Te,U)}function U(){A(),E()}function k(){var j=n.arrows;j&&!(p&&d)&&R(),p&&d&&(It(x,{prev:p,next:d}),Lt(h,j?"":"none"),We(h,b=Xn+"--"+n.direction),j&&(S(),H(),de([p,d],Bt,v.id),i(Uo,p,d)))}function A(){o.destroy(),De(h,b),C?(it(T?[p,d]:h),p=d=null):He([p,d],Yn)}function S(){r([et,St,Se,st,on],H),s(d,"click",ve(w,">")),s(p,"click",ve(w,"<"))}function w(j){c.go(j,!0)}function R(){h=T||gt("div",u.arrows),p=V(!0),d=V(!1),C=!0,Nt(h,[p,d]),!T&&Hn(h,v)}function V(j){var M='<button class="'+u.arrow+" "+(j?u.prev:u.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||zi)+'" />';return Po(M)}function H(){if(p&&d){var j=e.index,M=c.getPrev(),z=c.getNext(),K=M>-1&&j<M?l.last:l.prev,f=z>-1&&j>z?l.first:l.next;p.disabled=M<0,d.disabled=z<0,de(p,ke,K),de(d,ke,f),i(Go,p,d,M,z)}}return{arrows:x,mount:E,destroy:A,update:H}}var qi=jn+"-interval";function Ui(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),S),l=u.isPaused,m=t.Elements,c=t.Elements,T=c.root,v=c.toggle,h=n.autoplay,p,d,C=h==="pause";function b(){h&&(x(),v&&de(v,Bt,m.track.id),C||E(),A())}function x(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(R){p=R.type==="mouseenter",k()}),n.pauseOnFocus&&s(T,"focusin focusout",function(R){d=R.type==="focusin",k()}),v&&s(v,"click",function(){C?E():U(!0)}),r([Ge,ln,Se],u.rewind),r(Ge,w)}function E(){l()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=C=!1,A(),i(Dn))}function U(R){R===void 0&&(R=!0),C=!!R,A(),l()||(u.pause(),i(qn))}function k(){C||(p||d?U(!1):E())}function A(){v&&(ze(v,at,!C),de(v,ke,n.i18n[C?"play":"pause"]))}function S(R){var V=m.bar;V&&Le(V,"width",R*100+"%"),i(Xo,R)}function w(R){var V=t.Slides.getAt(R);u.set(V&&+Fe(V.slide,qi)||n.interval)}return{mount:b,destroy:u.cancel,play:E,pause:U,isPaused:l}}function Gi(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Un,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(l){t.Slides.forEach(function(m){var c=jt(m.container||m.slide,"img");c&&c.src&&u(l,c,m)})}function u(l,m,c){c.style("background",l?'center/cover no-repeat url("'+m.src+'")':"",!0),Lt(m,l?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Ki=10,Yi=600,Xi=.6,Zi=1.5,Ji=800;function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Move,l=u.getPosition,m=u.getLimit,c=u.exceededLimit,T=u.translate,v=e.is(bt),h,p,d=1;function C(){r(Ge,U),r([Te,Se],k)}function b(S,w,R,V,H){var j=l();if(U(),R&&(!v||!c())){var M=t.Layout.sliderSize(),z=En(S)*M*nn(_e(S)/M)||0;S=u.toPosition(t.Controller.toDest(S%M))+z}var K=Ho(j,S,1);d=1,w=K?0:w||tn(_e(S-j)/Zi,Ji),p=V,h=cn(w,x,ve(E,j,S,H),1),i(Pt),s(ln),h.start()}function x(){i(yt),p&&p(),s(st)}function E(S,w,R,V){var H=l(),j=S+(w-S)*A(V),M=(j-H)*d;T(H+M),v&&!R&&c()&&(d*=Xi,_e(M)<Ki&&b(m(c(!0)),Yi,!1,p,!0))}function U(){h&&h.cancel()}function k(){h&&!h.isPaused()&&(U(),x())}function A(S){var w=n.easingFunc;return w?w(S):1-Math.pow(1-S,4)}return{mount:C,destroy:U,scroll:b,cancel:k}}var dt={passive:!1,capture:!0};function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=o.unbind,l=e.state,m=t.Move,c=t.Scroll,T=t.Controller,v=t.Elements.track,h=t.Media.reduce,p=t.Direction,d=p.resolve,C=p.orient,b=m.getPosition,x=m.exceededLimit,E,U,k,A,S,w=!1,R,V,H;function j(){i(v,Sn,Tn,dt),i(v,Cn,Tn,dt),i(v,pr,z,dt),i(v,"click",L,{capture:!0}),i(v,"dragstart",Oe),r([et,Te],M)}function M(){var F=n.drag;ce(!F),A=F==="free"}function z(F){if(R=!1,!V){var y=se(F);ne(F.target)&&(y||!F.button)&&(T.isBusy()?Oe(F,!0):(H=y?v:window,S=l.is([xt,Pt]),k=null,i(H,Sn,K,dt),i(H,Cn,f,dt),m.cancel(),c.cancel(),I(F)))}}function K(F){if(l.is(Xt)||(l.set(Xt),s(zo)),F.cancelable)if(S){m.translate(E+Q(oe(F)));var y=me(F)>fo,O=w!==(w=x());(y||O)&&I(F),R=!0,s(Do),Oe(F)}else N(F)&&(S=$(F),Oe(F))}function f(F){l.is(Xt)&&(l.set(yt),s(qo)),S&&(P(F),Oe(F)),u(H,Sn,K),u(H,Cn,f),S=!1}function L(F){!V&&R&&Oe(F,!0)}function I(F){k=U,U=F,E=b()}function P(F){var y=ee(F),O=ue(y),Y=n.rewind&&n.rewindByDrag;h(!1),A?T.scroll(O,0,n.snap):e.is(Ot)?T.go(C(En(y))<0?Y?"<":"-":Y?">":"+"):e.is(bt)&&w&&Y?T.go(x(!0)?">":"<"):T.go(T.toDest(O),!0),h(!0)}function $(F){var y=n.dragMinThreshold,O=Et(y),Y=O&&y.mouse||0,J=(O?y.touch:+y)||10;return _e(oe(F))>(se(F)?J:Y)}function N(F){return _e(oe(F))>_e(oe(F,!0))}function ee(F){if(e.is(Ct)||!w){var y=me(F);if(y&&y<fo)return oe(F)/y}return 0}function ue(F){return b()+En(F)*Je(_e(F)*(n.flickPower||600),A?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function oe(F,y){return B(F,y)-B(W(F),y)}function me(F){return _n(F)-_n(W(F))}function W(F){return U===F&&k||U}function B(F,y){return(se(F)?F.changedTouches[0]:F)["page"+d(y?"Y":"X")]}function Q(F){return F/(w&&e.is(bt)?Ri:1)}function ne(F){var y=n.noDrag;return!kt(F,"."+ar+", ."+fn)&&(!y||!kt(F,y))}function se(F){return typeof TouchEvent<"u"&&F instanceof TouchEvent}function D(){return S}function ce(F){V=F}return{mount:j,disable:ce,isDragging:D}}var ta={Spacebar:" ",Right:dn,Left:pn,Up:Qo,Down:er};function Zn(e){return e=Ze(e)?e:e.key,ta[e]||e}var ho="keydown";function na(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,u=e.root,l=t.Direction.resolve,m,c;function T(){v(),r(Te,h),r(Te,v),r(Ge,d)}function v(){var b=n.keyboard;b&&(m=b==="global"?window:u,s(m,ho,C))}function h(){i(m,ho)}function p(b){c=b}function d(){var b=c;c=!0,Io(function(){c=b})}function C(b){if(!c){var x=Zn(b);x===l(pn)?e.go("<"):x===l(dn)&&e.go(">")}}return{mount:T,destroy:h,disable:p}}var _t=jn+"-lazy",Qt=_t+"-srcset",oa="["+_t+"], ["+Qt+"]";function ra(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,u=o.emit,l=n.lazyLoad==="sequential",m=[St,st],c=[];function T(){n.lazyLoad&&(v(),r(Se,v))}function v(){Ue(c),h(),l?b():(s(m),r(m,p),p())}function h(){t.Slides.forEach(function(x){Nn(x.slide,oa).forEach(function(E){var U=Fe(E,_t),k=Fe(E,Qt);if(U!==E.src||k!==E.srcset){var A=n.classes.spinner,S=E.parentElement,w=jt(S,"."+A)||gt("span",A,S);c.push([E,x,w]),E.src||Lt(E,"none")}})})}function p(){c=c.filter(function(x){var E=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,E)?d(x):!0}),c.length||s(m)}function d(x){var E=x[0];We(x[1].slide,Ln),i(E,"load error",ve(C,x)),de(E,"src",Fe(E,_t)),de(E,"srcset",Fe(E,Qt)),He(E,_t),He(E,Qt)}function C(x,E){var U=x[0],k=x[1];De(k.slide,Ln),E.type!=="error"&&(it(x[2]),Lt(U,""),u(Un,U,k),u(vt)),l&&b()}function b(){c.length&&d(c.shift())}return{mount:T,destroy:ve(Ue,c),check:p}}function ia(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Slides,l=t.Elements,m=t.Controller,c=m.hasFocus,T=m.getIndex,v=m.go,h=t.Direction.resolve,p=l.pagination,d=[],C,b;function x(){E(),r([Te,Se,on],x);var V=n.pagination;p&&Lt(p,V?"":"none"),V&&(r([Ge,ln,st],R),U(),R(),s(Ko,{list:C,items:d},w(e.index)))}function E(){C&&(it(p?Qe(C.children):C),De(C,b),Ue(d),C=null),o.destroy()}function U(){var V=e.length,H=n.classes,j=n.i18n,M=n.perPage,z=c()?m.getEnd()+1:Ft(V/M);C=p||gt("ul",H.pagination,l.track.parentElement),We(C,b=hn+"--"+S()),de(C,qe,"tablist"),de(C,ke,j.select),de(C,Kn,S()===mn?"vertical":"");for(var K=0;K<z;K++){var f=gt("li",null,C),L=gt("button",{class:H.page,type:"button"},f),I=u.getIn(K).map(function($){return $.slide.id}),P=!c()&&M>1?j.pageX:j.slideX;i(L,"click",ve(k,K)),n.paginationKeyboard&&i(L,"keydown",ve(A,K)),de(f,qe,"presentation"),de(L,qe,"tab"),de(L,Bt,I.join(" ")),de(L,ke,kn(P,K+1)),de(L,ft,-1),d.push({li:f,button:L,page:K})}}function k(V){v(">"+V,!0)}function A(V,H){var j=d.length,M=Zn(H),z=S(),K=-1;M===h(dn,!1,z)?K=++V%j:M===h(pn,!1,z)?K=(--V+j)%j:M==="Home"?K=0:M==="End"&&(K=j-1);var f=d[K];f&&(Mo(f.button),v(">"+K),Oe(H,!0))}function S(){return n.paginationDirection||n.direction}function w(V){return d[m.toPage(V)]}function R(){var V=w(T(!0)),H=w(T());if(V){var j=V.button;De(j,at),He(j,co),de(j,ft,-1)}if(H){var M=H.button;We(M,at),de(M,co,!0),de(M,ft,"")}s(Yo,{list:C,items:d},V,H)}return{items:d,mount:x,destroy:E,getAt:w,update:R}}var aa=[" ","Enter"];function sa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&c()}function u(){s.forEach(function(p){p.destroy()}),Ue(s)}function l(){u(),i()}function m(p,d){var C=be(p);C.on(Ge,function(b,x,E){d.go(d.is(Ct)?E:b)}),s.push(C)}function c(){var p=be(e),d=p.on;d(Bn,v),d(Zo,h),d([et,Te],T),s.push(p),p.emit(zn,e.splides)}function T(){de(t.Elements.list,Kn,n.direction===mn?"vertical":"")}function v(p){e.go(p.index)}function h(p,d){Wn(aa,Zn(d))&&(v(p),Oe(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:l}}function la(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(m){if(m.cancelable){var c=m.deltaY,T=c<0,v=_n(m),h=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(c)>h&&v-s>p&&(e.go(T?"<":">"),s=v),l(T)&&Oe(m)}}function l(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var ca=90;function ua(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",ki),l=cn(ca,ve(c,!1));function m(){i&&(v(!t.Autoplay.isPaused()),de(s,mo,!0),u.textContent="…",r(Dn,ve(v,!0)),r(qn,ve(v,!1)),r([St,st],ve(c,!0)))}function c(h){de(s,po,h),h?(Nt(s,u),l.start()):(it(u),l.cancel())}function T(){He(s,[uo,mo,po]),it(u)}function v(h){i&&de(s,uo,h?"off":"polite")}return{mount:m,disable:v,destroy:T}}var pa=Object.freeze({__proto__:null,Media:bi,Direction:xi,Elements:Mi,Slides:Wi,Layout:Hi,Clones:ji,Move:Vi,Controller:Bi,Arrows:Di,Autoplay:Ui,Cover:Gi,Scroll:Qi,Drag:ea,Keyboard:na,LazyLoad:ra,Pagination:ia,Sync:sa,Wheel:la,Live:ua}),da={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ma={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Li,i18n:da,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),Io(l)}return{mount:r,start:i,cancel:Tn}}function fa(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,u=ve(Le,i,"transition"),l;function m(){be(e).bind(i,"transitionend",function(h){h.target===i&&l&&(T(),l())})}function c(h,p){var d=o.toPosition(h,!0),C=o.getPosition(),b=v(h);_e(d-C)>=1&&b>=1?n.useScroll?s.scroll(d,b,!1,p):(u("transform "+b+"ms "+n.easing),o.translate(d,!0),l=p):(o.jump(h),p())}function T(){u(""),s.cancel()}function v(h){var p=n.rewindSpeed;if(e.is(bt)&&p){var d=r.getIndex(!0),C=r.getEnd();if(d===0&&h>=C||d>=C&&h===0)return p}return n.speed}return{mount:m,start:c,cancel:T}}var ha=(function(){function e(n,o){this.event=be(),this.Components={},this.state=yi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Wo(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ye({label:Fe(r,ke)||"",labelledby:Fe(r,Gn)||""},ma,e.defaults,o||{});try{Ye(o,JSON.parse(Fe(r,jn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,u=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=u,this._T=r||this._T||(this.is(Ot)?ga:fa),this._E=o||this._E;var l=It({},pa,this._E,{Transition:this._T});return rt(l,function(m,c){var T=m(s,u,s._o);u[c]=T,T.setup&&T.setup()}),rt(u,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,Ai),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Qe(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(An,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),s.set(en)),this},di(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Jn=ha;Jn.defaults={};Jn.STATES=gi;var yo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[Bn,"onClick"],[jo,"onActive"],[Vo,"onInactive"],[Bo,"onVisible"],[Oo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[zo,"onDrag"],[Do,"onDragging"],[qo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[On,"onDestroy"],[Uo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Ko,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Dn,"onAutoplayPlay"],[Xo,"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 ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function va(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Rn(e,t){const n=e;return va(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Rn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var ba=({children:e,className:t,...n})=>g.createElement("div",{className:Qn("splide__track",t),...n},g.createElement("ul",{className:"splide__list"},e)),dr=class extends g.Component{constructor(){super(...arguments),this.splideRef=g.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Rn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Fn(this.options,e)&&(this.splide.options=e,this.options=Rn({},e));const t=this.getSlides();ya(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){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 g.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(s=>s[1])])},n?g.createElement(ba,null,o):o)}},mr=({children:e,className:t,...n})=>g.createElement("li",{className:Qn("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 xa="RichTextRenderer-module__link___BWeZ2",Sa={link:xa},Ca=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ca(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Pe(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?E.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"?a.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:wa(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function wa(e){return{...e.fontFamily&&{fontFamily:yn(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const $a="SvgImage-module__svg___q3xE-",Ta="SvgImage-module__img___VsTm-",vo={svg:$a,img:Ta},_a=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ea=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=g.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return g.useEffect(()=>{if(typeof window<"u"&&window.CSS){const p=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(p)}},[]),!_a(e)||!s?a.jsx("img",{src:e,alt:"",className:he(vo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(vo.svg,o),style:{"--svg":Ea(e),"--fill":t,"--hover-fill":n,...r??{}}})},ka={"top-left":ee.topLeftAlignment,"top-center":ee.topCenterAlignment,"top-right":ee.topRightAlignment,"middle-left":ee.middleLeftAlignment,"middle-center":ee.middleCenterAlignment,"middle-right":ee.middleRightAlignment,"bottom-left":ee.bottomLeftAlignment,"bottom-center":ee.bottomCenterAlignment,"bottom-right":ee.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=g.useState(null),{widthSettings:i,fontSettings:p,letterSpacing:l,textAlign:m,wordSpacing:c,fontSizeLineHeight:T,textAppearance:w,color:y}=n.imageCaption,[u,d]=g.useState(void 0),[C,b]=g.useState(null),[x,A]=g.useState(0),[V,j]=g.useState(0),{direction:k,transition:S,controls:$,pagination:M,imageCaption:B,triggers:W}=e,F=g.useRef(S.type),{x:H,y:z}=e.controls.offset,G=v=>{r&&r.go(v)};return g.useEffect(()=>{if(!C)return;const v=new ResizeObserver(I=>{if(!r)return;const[R]=I;d({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return v.observe(C),()=>v.unobserve(C)},[C]),g.useEffect(()=>{!r||F.current===S.type||(j(v=>v+1),F.current=S.type)},[S.type]),a.jsx("div",{className:he(ee.wrapper,{[ee.editor]:o}),ref:b,children:a.jsxs("div",{className:ee.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:S.backgroundColor&&S.type==="fade in"?S.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(ee.captionBlock),children:a.jsx("div",{className:ee.captionTextWrapper,children:t.map((v,I)=>a.jsx("div",{className:he(ee.captionText,ka[B.alignment],{[ee.withPointerEvents]:I===x&&o,[ee.active]:I===x}),style:{fontFamily:yn(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,o),letterSpacing:E.scalingValue(l,o),wordSpacing:E.scalingValue(c,o),textAlign:m,fontSize:E.scalingValue(T.fontSize,o),lineHeight:E.scalingValue(T.lineHeight,o),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:y,transitionDuration:S.duration?`${Math.round(parseInt(S.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ee.captionTextInner,style:{"--link-hover-color":B.linkHoverColor,"--link-color":B.linkColor,position:"relative",top:E.scalingValue(B.offset.y,o),left:E.scalingValue(B.offset.x,o)},children:a.jsx(Mt,{content:v.imageCaption})})},I))})}),a.jsx(dr,{onMove:v=>{A(v.index)},ref:s,options:{arrows:!1,speed:S.duration?parseInt(S.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:k==="horiz"||S.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:S.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((v,I)=>a.jsx(mr,{children:a.jsx("div",{className:ee.sliderItem,children:a.jsx("div",{className:ee.imgWrapper,children:a.jsx("img",{className:he(ee.sliderImage,{[ee.contain]:v.image.objectFit==="contain",[ee.cover]:v.image.objectFit==="cover"}),src:v.image.url,alt:v.image.name??""})})})},I))},V),$.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(ee.arrow,{[ee.arrowVertical]:k==="vert",[ee.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{onClick:()=>{G("-1")},className:ee.arrowInner,style:{transform:`translate(${E.scalingValue(H,o)}, ${E.scalingValue(z*(k==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(Xe,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:he(ee.arrowImg,ee.mirror)}),!$.arrowsImgUrl&&a.jsx(bo,{color:$.color,className:he(ee.arrowIcon,ee.arrowImg,ee.mirror)})]})}),a.jsx("div",{className:he(ee.arrow,ee.nextArrow,{[ee.arrowVertical]:k==="vert",[ee.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{className:ee.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${E.scalingValue(H*(k==="horiz"?-1:1),o)}, ${E.scalingValue(z,o)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(Xe,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:ee.arrowImg}),!$.arrowsImgUrl&&a.jsx(bo,{color:$.color,className:he(ee.arrowIcon,ee.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:ee.clickOverlay,onClick:()=>{r&&r.go("+1")}}),M.isActive&&a.jsx("div",{className:he(ee.pagination,{[ee.paginationInsideBottom]:M.position==="inside-1"&&k==="horiz",[ee.paginationInsideTop]:M.position==="inside-2"&&k==="horiz",[ee.paginationOutsideBottom]:M.position==="outside-1"&&k==="horiz",[ee.paginationOutsideTop]:M.position==="outside-2"&&k==="horiz",[ee.paginationInsideLeft]:M.position==="inside-1"&&k==="vert",[ee.paginationInsideRight]:M.position==="inside-2"&&k==="vert",[ee.paginationOutsideLeft]:M.position==="outside-1"&&k==="vert",[ee.paginationOutsideRight]:M.position==="outside-2"&&k==="vert",[ee.paginationVertical]:k==="vert"}),children:a.jsx("div",{className:ee.paginationInner,style:{backgroundColor:M.colors[2],transform:`scale(${M.scale/100}) translate(${E.scalingValue(M.offset.x,o)}, ${E.scalingValue(M.offset.y,o)}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:t.map((v,I)=>a.jsx("button",{onClick:()=>{r&&r.go(I)},className:he(ee.paginationItem),children:a.jsx("div",{className:he(ee.dot,{[ee.activeDot]:I===x}),style:{backgroundColor:I===x?M.colors[0]:M.colors[1],"--pagination-hover-color":M.hover}})},I))})})]})})}function bo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ia={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",Ra="ImageRevealSlider-module__link___N-iLG",Ma="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:La,image:Fa,link:Ra,cursor:Ma};function xo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,p=s/2,l=i/2;if(e>=o.x-p&&e<=o.x+p&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Wa({settings:e,content:t,isEditor:n}){const[o,r]=g.useState(null),[s,i]=g.useState([]),[p,l]=g.useState(0),m=g.useRef(0),[c,T]=g.useState({x:0,y:0}),[w,y]=g.useState(1),[u,d]=g.useState("none"),C=g.useRef({x:0,y:0}),[b,x]=g.useState(!1),{sizeType:A,imageWidth:V,randomRangeImageWidth:j}=e.imageSize,{revealPosition:k,visible:S}=e.position,{cursorType:$,target:M,defaultCursorScale:B,defaultCursor:W,hoverCursorScale:F,hoverCursor:H}=e.cursor;g.useEffect(()=>{if(!o)return;const v=(L,_)=>{const N=o.getBoundingClientRect(),J=L-N.left,ce=_-N.top;if(T({x:J,y:ce}),$==="system"){d("none"),y(1);return}const te=J,me=ce,f=document.elementFromPoint(N.left+te,N.top+me);if(f&&f.closest("a")){d("none"),y(1);return}const O=xo(te,me,s)||M==="area"?{img:H??"none",scale:F}:{img:W??"none",scale:B};d(O.img),y(O.scale)},I=L=>{L.stopPropagation(),C.current={x:L.clientX,y:L.clientY},v(L.clientX,L.clientY)},R=()=>{b&&v(C.current.x,C.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",R,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",R,!0)}},[o,b,c,$,M,H,W,F,B,s]),g.useEffect(()=>{b||(d("none"),y(0))},[b]);const z=async(v,I,R,L={})=>{const{width:_,height:N,finalWidth:J}=await Pa(v.image.url,A,V,j);let ce=0,te=0;k==="same"?(ce=I/2,te=R/2):(ce=L.x??Math.random()*I,te=L.y??Math.random()*R);const me=Math.min(Math.max(ce,_/2),I-_/2),f=Math.min(Math.max(te,N/2),R-N/2);return{id:m.current++,url:v.image.url,link:v.link,name:v.image.name,x:me,y:f,width:J}};g.useEffect(()=>{if(!o||t.length===0)return;const v=o.getBoundingClientRect(),I=v.width,R=v.height,L=[];(async()=>{const N=t[0],J=await z(N,I,R);L.push(J),i(L),l(1)})()},[A,V,j,k,o]),g.useEffect(()=>{S==="last One"&&i(v=>v.length>0?[v[v.length-1]]:[])},[S]);const G=async v=>{if(!o)return;const I=o.getBoundingClientRect(),R=v.clientX-I.left,L=v.clientY-I.top;if(M==="image"&&!xo(R,L,s))return;let _=0,N=0;k==="on Click"?(_=R,N=L):k==="same"?(_=I.width/2,N=I.height/2):(_=Math.random()*I.width,N=Math.random()*I.height);const J=t[p],ce=await z(J,I.width,I.height,{x:_,y:N});i(te=>S==="all"?[...te,ce]:[ce]),l(te=>te>=t.length-1?0:te+1)};return a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:ut.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[s.map(v=>a.jsx("div",{className:ut.wrapper,style:{top:`${v.y}px`,left:`${v.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:v.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:M==="area"&&v.link?a.jsx("a",{href:v.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)}):a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)},v.id)),b&&a.jsx("div",{className:ut.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ha={element:Wa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Na="LightBox-module__hidden___9s-9x",ja="LightBox-module__heroImage___sTxNF",Va="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",Oa="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Da="LightBox-module__imgWrapper___LuFUp",qa="LightBox-module__contain___8-yaS",Ua="LightBox-module__cover___hNvOG",Ga="LightBox-module__caption___b6L2I",Ka="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Za="LightBox-module__arrowVertical___Zfz81",Ja="LightBox-module__nextArrow___zkAQN",Qa="LightBox-module__arrowInner___p48sW",es="LightBox-module__arrowIcon___3VaFf",ts="LightBox-module__arrowImg___pNV88",ns="LightBox-module__mirror___pjeXc",os="LightBox-module__thumbsWrapper___GB-nU",rs="LightBox-module__thumbsContainerVertical___wttk5",is="LightBox-module__thumbsContainer___osSma",as="LightBox-module__thumbsAlignStart___MO6tY",ss="LightBox-module__thumbsAlignCenter___Q4sUx",ls="LightBox-module__thumbsAlignEnd___p4y9R",cs="LightBox-module__thumbItem___HvnF3",us="LightBox-module__closeButton___g2khP",ps="LightBox-module__fadeIn___0m5GW",ds="LightBox-module__slideInLeft___gPYwC",ms="LightBox-module__slideInRight___S-pPp",gs="LightBox-module__slideInTop___DFdAj",fs="LightBox-module__slideInBottom___m27kZ",hs="LightBox-module__fadeOut___55qBR",ys="LightBox-module__slideOutLeft___NvU7P",vs="LightBox-module__slideOutRight___SK7eC",bs="LightBox-module__slideOutTop___Vgg0z",xs="LightBox-module__slideOutBottom___nJ0Ef",Ss="LightBox-module__scaleSlide___vZriG",K={hidden:Na,heroImage:ja,background:Va,editor:Ba,contentStyle:Oa,imageStyle:za,imgWrapper:Da,contain:qa,cover:Ua,caption:Ga,captionTextInner:Ka,lightboxSplide:Ya,arrow:Xa,arrowVertical:Za,nextArrow:Ja,arrowInner:Qa,arrowIcon:es,arrowImg:ts,mirror:ns,thumbsWrapper:os,thumbsContainerVertical:rs,thumbsContainer:is,thumbsAlignStart:as,thumbsAlignCenter:ss,thumbsAlignEnd:ls,thumbItem:cs,closeButton:us,fadeIn:ps,slideInLeft:ds,slideInRight:ms,slideInTop:gs,slideInBottom:fs,fadeOut:hs,slideOutLeft:ys,slideOutRight:vs,slideOutTop:bs,slideOutBottom:xs,scaleSlide:Ss},Ut=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:o.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,o};function gr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function So(e){const t=e.getBoundingClientRect(),n=gr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,p=o/r,l=s/i;let m,c;l>p?(m=o,c=o/l):(c=r,m=r*l);const T=t.left+n.left,w=t.top+n.top,y=(o-m)/2+T,u=(r-c)/2+w;return{x:y,y:u,width:m,height:c}}function Co(e){const t=e.getBoundingClientRect(),n=gr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function 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 Cs(e,t){const n=(()=>{if(e==="fade in")return K.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return K.slideInLeft;case"right":return K.slideInRight;case"top":return K.slideInTop;case"bottom":return K.slideInBottom;default:return K.slideInRight}return K.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return K.fadeIn;if(e==="slide in")switch(t){case"left":return K.slideInLeft;case"right":return K.slideInRight;case"top":return K.slideInTop;case"bottom":return K.slideInBottom;default:return K.slideInRight}return K.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return K.fadeOut;if(e==="slide in")switch(t){case"left":return K.slideOutLeft;case"right":return K.slideOutRight;case"top":return K.slideOutTop;case"bottom":return K.slideOutBottom;default:return K.slideOutRight}return K.fadeOut})(),s=(()=>{if(e==="fade in")return K.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return K.slideOutLeft;case"right":return K.slideOutRight;case"top":return K.slideOutTop;case"bottom":return K.slideOutBottom;default:return K.slideOutRight}return K.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const ws=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,p]=g.useState(!1),{url:l}=e.thumbnailBlock.cover;return g.useEffect(()=>{r==="close"&&p(!1),r==="open"&&p(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:l,alt:"Cover",className:K.heroImage,onClick:()=>p(!0)}),a.jsx($s,{isOpen:i,onClose:()=>p(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},$s=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:p})=>{var P;const[l,m]=g.useState(0),[c,T]=g.useState(0),[w,y]=g.useState(!1),[u,d]=g.useState(!1),[C,b]=g.useState({}),x=g.useRef(null),A=g.useRef(null),V=g.useRef(null),j=g.useRef(!1),k=g.useRef(null),S=g.useRef(null),$=g.useRef(null),M=g.useRef(null),B=g.useRef(!1),W=g.useRef(null),[F,H]=g.useState(!1),{appear:z,triggers:G,slider:v,thumbnail:I,controls:R,area:L,caption:_,layout:N}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ce,backdropDisappearClass:te,disappearClass:me}=Cs(z.type,z.direction),f=(p==null?void 0:p.itemId)??null;g.useEffect(()=>{const h=()=>{setTimeout(()=>{var Y,Q;(Q=(Y=x.current)==null?void 0:Y.splide)==null||Q.refresh()},16)},D=()=>{T(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),g.useEffect(()=>{if(!e||!I.isActive){H(!1);return}const h=W.current;if(!h)return;const D=()=>{v.direction==="horiz"?H(h.scrollWidth>h.clientWidth):H(h.scrollHeight>h.clientHeight)};D();const Y=new ResizeObserver(D);return Y.observe(h),()=>Y.disconnect()},[e,I.isActive,n.length,C,v.direction]);const O=g.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,D=wo(L.color);h&&!i&&D>.9&&(document.body.style.backgroundColor=""),y(!0),j.current=!0;const Y=Q=>{Q.target===k.current&&Q.animationName&&(k.current&&S.current&&k.current.removeEventListener("animationend",S.current),S.current=null,j.current&&(j.current=!1,t()),y(!1))};k.current&&(S.current=Y,k.current.addEventListener("animationend",Y))},[t,L.color,i]),oe=(h,D,Y)=>{var Q,le;if(h){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&l===n.length-1?O():(Q=x.current)==null||Q.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const ae=h.getBoundingClientRect(),re=D-ae.left,ge=Y-ae.top,U=ae.width,Z=ae.height;let X;v.direction==="horiz"?X=re<U/2?"-1":"+1":X=ge<Z/2?"-1":"+1",(le=x.current)==null||le.go(X)}}},ne=h=>{if(B.current){B.current=!1;return}const D=n[l],Y=(D==null?void 0:D.image.objectFit)==="cover";let Q,le;if("changedTouches"in h&&h.changedTouches.length>0)Q=h.changedTouches[0].clientX,le=h.changedTouches[0].clientY;else if("clientX"in h)Q=h.clientX,le=h.clientY;else return;let ae;if(Y&&V.current){const re=Co(V.current);ae=Q>=re.left&&Q<=re.right&&le>=re.top&&le<=re.bottom}else{const re=V.current?So(V.current):null;if(!re){h.target===h.currentTarget&&O();return}ae=Q>=re.x&&Q<=re.x+re.width&&le>=re.y&&le<=re.y+re.height}ae?oe(V.current,Q,le):O()},ue=h=>{const D=h.target;(D.classList.contains(K.thumbsWrapper)||D.classList.contains(K.thumbsContainer))&&ne(h)};g.useEffect(()=>{if(!e)return;const h=D=>{var Y,Q;if(D.key==="Escape"){O();return}if(D.key==="ArrowRight"){m(le=>(le+1)%Math.max(n.length,1)),(Y=x.current)==null||Y.go("+1");return}D.key==="ArrowLeft"&&(m(le=>(le-1+Math.max(n.length,1))%Math.max(n.length,1)),(Q=x.current)==null||Q.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,O,n.length]),g.useEffect(()=>{if(e){if(m(0),T(D=>D+1),j.current=!1,y(!1),d(!1),b({}),!f)return;const h=new CustomEvent("page-overlay",{detail:{itemId:f}});window.dispatchEvent(h)}return()=>{k.current&&S.current&&(k.current.removeEventListener("animationend",S.current),S.current=null),d(!1)}},[e,f]),g.useEffect(()=>{A.current!==null&&A.current!==v.type&&T(h=>h+1),A.current=v.type},[v.type]),g.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,Y=wo(L.color);document.body.style.overflow="hidden",d(!1);const Q=ae=>{ae.target===k.current&&!j.current&&ae.animationName&&(D&&!i&&Y>.9&&(document.body.style.backgroundColor=L.color),d(!0),k.current&&$.current&&k.current.removeEventListener("animationend",$.current),$.current=null)};k.current&&($.current=Q,k.current.addEventListener("animationend",Q));const le=ae=>{const re=ae.target;re&&(re.closest(`.${K.thumbsWrapper}`)||re.closest(`.${K.thumbsContainer}`))||v.type!=="slide"&&ae.preventDefault()};return document.addEventListener("touchmove",le,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",le),k.current&&$.current&&(k.current.removeEventListener("animationend",$.current),$.current=null),d(!1)}},[e,i,L.color,v.type]),g.useEffect(()=>{if(!e)return;const h=D=>{var Q,le;if(j.current){D.stopPropagation();return}if(B.current){B.current=!1;return}const Y=D.target;if(!(Y&&(Y.closest(`.${K.thumbsContainer}`)||Y.closest(`.${K.thumbItem}`)))){if(v.type==="slide"&&G.type==="drag"&&((le=(Q=x.current)==null?void 0:Q.splide)!=null&&le.root)){const ae=x.current.splide.root;if(Y&&(ae.contains(Y)||ae===Y))return}if(D.touches.length===0&&D.changedTouches.length>0){const ae=n[l],re=(ae==null?void 0:ae.image.objectFit)==="cover",ge=D.changedTouches[0];let U;if(re&&V.current){const Z=Co(V.current);U=ge.clientX>=Z.left&&ge.clientX<=Z.right&&ge.clientY>=Z.top&&ge.clientY<=Z.bottom}else{const Z=V.current?So(V.current):null;if(!Z)return;U=ge.clientX>=Z.x&&ge.clientX<=Z.x+Z.width&&ge.clientY>=Z.y&&ge.clientY<=Z.y+Z.height}if(!U){D.stopPropagation(),j.current=!0;const Z=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),O()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,O,l,n]);const q=(v.type==="scale"||v.type==="fade")&&v.direction==="vert"&&G.type==="drag";g.useEffect(()=>{var X,pe;if(!e||!q||!((pe=(X=x.current)==null?void 0:X.splide)!=null&&pe.root))return;const h=x.current.splide.root,D=30,Y=(ie,fe)=>{if(M.current){const we=Math.abs(ie-M.current.x),$e=Math.abs(fe-M.current.y);(we>0||$e>0)&&(B.current=!0)}},Q=ie=>{M.current&&(ie.preventDefault(),Y(ie.clientX,ie.clientY))},le=ie=>{M.current&&ie.touches.length>0&&(ie.preventDefault(),Y(ie.touches[0].clientX,ie.touches[0].clientY))},ae=(ie,fe)=>{if(!M.current||!x.current){M.current=null;return}const we=Math.abs(ie-M.current.x),$e=Math.abs(fe-M.current.y);$e>D&&$e>we&&x.current.go(fe<M.current.y?"+1":"-1"),M.current=null},re=ie=>{M.current&&ae(ie.clientX,ie.clientY),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("pointermove",Q)},ge=ie=>{if(M.current){if(ie.changedTouches.length>0){const fe=ie.changedTouches[0];ae(fe.clientX,fe.clientY)}document.removeEventListener("touchend",ge),document.removeEventListener("touchcancel",ge),document.removeEventListener("touchmove",le)}},U=ie=>{M.current={x:ie.clientX,y:ie.clientY},B.current=!1,document.addEventListener("pointermove",Q,{passive:!1}),document.addEventListener("pointerup",re),document.addEventListener("pointercancel",re)},Z=ie=>{ie.touches.length>0&&(M.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},B.current=!1,document.addEventListener("touchmove",le,{passive:!1}),document.addEventListener("touchend",ge),document.addEventListener("touchcancel",ge))};return h.addEventListener("pointerdown",U),h.addEventListener("touchstart",Z),()=>{h.removeEventListener("pointerdown",U),h.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("touchmove",le),document.removeEventListener("touchend",ge),document.removeEventListener("touchcancel",ge),M.current=null,B.current=!1}},[e,q,c]);const se={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:xr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:k,className:he(K.background,w?te:ce,{[K.editor]:i},{[K.hidden]:!e}),style:{...se,...u&&!i&&!w?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?k:null,className:he(K.contentStyle,w?me:J,{[K.editor]:i},{[K.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(dr,{onMove:h=>m(h.index),ref:x,className:K.lightboxSplide,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,direction:v.direction==="horiz"||v.type==="fade"||v.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!q,perPage:1,width:"100%",height:"100%",type:v.type==="fade"||v.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":v.duration},children:n.map((h,D)=>{const Y=Ut(N.position,N.offset,i),Q=`${E.scalingValue(N.padding.top,i)} ${E.scalingValue(N.padding.right,i)} ${E.scalingValue(N.padding.bottom,i)} ${E.scalingValue(N.padding.left,i)}`,le=v.type==="scale"?(()=>{const{transform:ae,...re}=Y;return{...re,position:"absolute",padding:Q,boxSizing:"border-box","--position-transform":ae||"none"}})():{...Y,position:"absolute",padding:Q,boxSizing:"border-box"};return a.jsx(mr,{children:a.jsx("div",{className:K.imgWrapper,onClick:ne,children:a.jsx("img",{ref:D===l?V:null,className:he(K.imageStyle,{[K.contain]:h.image.objectFit==="contain",[K.cover]:h.image.objectFit==="cover",[K.scaleSlide]:v.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...le,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},D)})},c),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(K.arrow,{[K.arrowVertical]:v.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:K.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x,i)}, ${E.scalingValue(R.offset.y*(v.direction==="horiz"?1:-1),i)}) scale(${R.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=x.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&a.jsx(Xe,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:he(K.arrowImg,K.mirror)}),!R.arrowsImgUrl&&a.jsx($o,{color:R.color,className:he(K.arrowIcon,K.arrowImg,K.mirror)})]})}),a.jsx("div",{className:he(K.arrow,K.nextArrow,{[K.arrowVertical]:v.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:K.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x*(v.direction==="horiz"?-1:1),i)}, ${E.scalingValue(R.offset.y,i)}) scale(${R.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=x.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&a.jsx(Xe,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:K.arrowImg}),!R.arrowsImgUrl&&a.jsx($o,{color:R.color,className:he(K.arrowIcon,K.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const h=Ut(L.closeIconAlign,L.closeIconOffset,i),D=`scale(${L.closeIconScale})`,Y=h.transform?`${h.transform} ${D}`:D;return a.jsx("button",{className:K.closeButton,style:{...h,transform:Y},onClick:O,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&o.imageCaption&&((P=n[l])==null?void 0:P.imageCaption)&&(()=>{const{widthSettings:h,fontSettings:D,letterSpacing:Y,textAlign:Q,wordSpacing:le,fontSizeLineHeight:ae,textAppearance:re,color:ge}=o.imageCaption;return a.jsx("div",{className:K.caption,style:{...Ut(_.alignment,_.offset,i),fontFamily:yn(D.fontFamily),fontWeight:D.fontWeight,fontStyle:D.fontStyle,width:h.sizing==="auto"?"max-content":E.scalingValue(h.width,i),letterSpacing:E.scalingValue(Y,i),wordSpacing:E.scalingValue(le,i),textAlign:Q,fontSize:E.scalingValue(ae.fontSize,i),lineHeight:E.scalingValue(ae.lineHeight,i),textTransform:re.textTransform??"none",textDecoration:re.textDecoration??"none",fontVariant:re.fontVariant??"normal",color:ge},onClick:U=>U.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:K.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:a.jsx(Mt,{content:n[l].imageCaption})})})})(),I.isActive&&(()=>{const[h,D]=I.position.split("-"),Y=v.direction==="horiz"?`${h}-left`:I.position,Q=Ut(Y,I.offset,i),le=()=>{if(v.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:K.thumbsWrapper,onClick:ae=>ue(ae),style:{position:i?"absolute":"fixed",...Q,...v.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(K.thumbsContainer,{[K.thumbsContainerVertical]:v.direction==="vert",[K.thumbsAlignStart]:I.align==="start",[K.thumbsAlignCenter]:I.align==="center",[K.thumbsAlignEnd]:I.align==="end"}),style:{gap:E.scalingValue(I.grid.gap,i),justifyContent:F?"flex-start":le()},children:n.map((ae,re)=>{const ge=re===l,U=C[re],X=I.grid.size*(ge?I.activeState.scale:1),pe=()=>{if(I.fit!=="fit")return{};if(!U)return v.direction==="horiz"?{height:E.scalingValue(X,i)}:{width:E.scalingValue(X,i)};const ie=U.width/U.height;if(v.direction==="horiz"){const fe=X,we=fe*ie;return{width:E.scalingValue(we,i),height:E.scalingValue(fe,i)}}else{const fe=X,we=fe/ie;return{width:E.scalingValue(fe,i),height:E.scalingValue(we,i)}}};return a.jsx("button",{className:K.thumbItem,style:{...v.direction==="horiz"&&I.fit!=="fit"?{height:E.scalingValue(X,i)}:{},...v.direction==="vert"&&I.fit!=="fit"?{width:E.scalingValue(X,i)}:{},...I.fit==="cover"?{width:E.scalingValue(X,i),height:E.scalingValue(X,i)}:{},...pe(),transition:ge?"all 0.25s ease-out":"none",opacity:ge?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:ie=>{var fe;ie.stopPropagation(),m(re),(fe=x.current)==null||fe.go(re)},onMouseEnter:()=>{var ie;I.triggers==="hov"&&((ie=x.current)==null||ie.go(re))},children:a.jsx("img",{src:ae.image.url,alt:ae.image.name??"",onLoad:ie=>{const fe=ie.currentTarget;fe.naturalWidth&&fe.naturalHeight&&b(we=>({...we,[re]:{width:fe.naturalWidth,height:fe.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ae.image.name}-${re}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ts={element:ws,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _s(e){return`
6
+ */const xa="RichTextRenderer-module__link___BWeZ2",Sa={link:xa},Ca=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ca(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Pe(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.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"?a.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:wa(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function wa(e){return{...e.fontFamily&&{fontFamily:yn(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const $a="SvgImage-module__svg___q3xE-",Ta="SvgImage-module__img___VsTm-",vo={svg:$a,img:Ta},_a=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ea=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=g.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return g.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!_a(e)||!s?a.jsx("img",{src:e,alt:"",className:he(vo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(vo.svg,o),style:{"--svg":Ea(e),"--fill":t,"--hover-fill":n,...r??{}}})},ka={"top-left":te.topLeftAlignment,"top-center":te.topCenterAlignment,"top-right":te.topRightAlignment,"middle-left":te.middleLeftAlignment,"middle-center":te.middleCenterAlignment,"middle-right":te.middleRightAlignment,"bottom-left":te.bottomLeftAlignment,"bottom-center":te.bottomCenterAlignment,"bottom-right":te.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=g.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:l,textAlign:m,wordSpacing:c,fontSizeLineHeight:T,textAppearance:v,color:h}=n.imageCaption,[p,d]=g.useState(void 0),[C,b]=g.useState(null),[x,E]=g.useState(0),[U,k]=g.useState(0),{direction:A,transition:S,controls:w,pagination:R,imageCaption:V,triggers:H}=e,j=g.useRef(S.type),{x:M,y:z}=e.controls.offset,K=f=>{r&&r.go(f)};return g.useEffect(()=>{if(!C)return;const f=new ResizeObserver(L=>{if(!r)return;const[I]=L;d({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return f.observe(C),()=>f.unobserve(C)},[C]),g.useEffect(()=>{!r||j.current===S.type||(k(f=>f+1),j.current=S.type)},[S.type]),a.jsx("div",{className:he(te.wrapper,{[te.editor]:o}),ref:b,children:a.jsxs("div",{className:te.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:S.backgroundColor&&S.type==="fade in"?S.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(te.captionBlock),children:a.jsx("div",{className:te.captionTextWrapper,children:t.map((f,L)=>a.jsx("div",{className:he(te.captionText,ka[V.alignment],{[te.withPointerEvents]:L===x&&o,[te.active]:L===x}),style:{fontFamily:yn(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":_.scalingValue(i.width,o),letterSpacing:_.scalingValue(l,o),wordSpacing:_.scalingValue(c,o),textAlign:m,fontSize:_.scalingValue(T.fontSize,o),lineHeight:_.scalingValue(T.lineHeight,o),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:h,transitionDuration:S.duration?`${Math.round(parseInt(S.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:te.captionTextInner,style:{"--link-hover-color":V.linkHoverColor,"--link-color":V.linkColor,position:"relative",top:_.scalingValue(V.offset.y,o),left:_.scalingValue(V.offset.x,o)},children:a.jsx(Mt,{content:f.imageCaption})})},L))})}),a.jsx(dr,{onMove:f=>{E(f.index)},ref:s,options:{arrows:!1,speed:S.duration?parseInt(S.duration):500,autoplay:H.autoPlay!==null,...H.autoPlay!==null&&{interval:parseInt(H.autoPlay)*1e3},direction:A==="horiz"||S.type==="fade in"?"ltr":"ttb",pagination:!1,drag:H.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:S.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,L)=>a.jsx(mr,{children:a.jsx("div",{className:te.sliderItem,children:a.jsx("div",{className:te.imgWrapper,children:a.jsx("img",{className:he(te.sliderImage,{[te.contain]:f.image.objectFit==="contain",[te.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},L))},U),w.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(te.arrow,{[te.arrowVertical]:A==="vert",[te.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{onClick:()=>{K("-1")},className:te.arrowInner,style:{transform:`translate(${_.scalingValue(M,o)}, ${_.scalingValue(z*(A==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(Xe,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:he(te.arrowImg,te.mirror)}),!w.arrowsImgUrl&&a.jsx(bo,{color:w.color,className:he(te.arrowIcon,te.arrowImg,te.mirror)})]})}),a.jsx("div",{className:he(te.arrow,te.nextArrow,{[te.arrowVertical]:A==="vert",[te.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{className:te.arrowInner,onClick:()=>K("+1"),style:{transform:`translate(${_.scalingValue(M*(A==="horiz"?-1:1),o)}, ${_.scalingValue(z,o)}) scale(${e.controls.scale/100}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(Xe,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:te.arrowImg}),!w.arrowsImgUrl&&a.jsx(bo,{color:w.color,className:he(te.arrowIcon,te.arrowImg)})]})})]}),H.triggersList.click&&a.jsx("div",{className:te.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&a.jsx("div",{className:he(te.pagination,{[te.paginationInsideBottom]:R.position==="inside-1"&&A==="horiz",[te.paginationInsideTop]:R.position==="inside-2"&&A==="horiz",[te.paginationOutsideBottom]:R.position==="outside-1"&&A==="horiz",[te.paginationOutsideTop]:R.position==="outside-2"&&A==="horiz",[te.paginationInsideLeft]:R.position==="inside-1"&&A==="vert",[te.paginationInsideRight]:R.position==="inside-2"&&A==="vert",[te.paginationOutsideLeft]:R.position==="outside-1"&&A==="vert",[te.paginationOutsideRight]:R.position==="outside-2"&&A==="vert",[te.paginationVertical]:A==="vert"}),children:a.jsx("div",{className:te.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${_.scalingValue(R.offset.x,o)}, ${_.scalingValue(R.offset.y,o)}) rotate(${A==="horiz"?"0deg":"90deg"})`},children:t.map((f,L)=>a.jsx("button",{onClick:()=>{r&&r.go(L)},className:he(te.paginationItem),children:a.jsx("div",{className:he(te.dot,{[te.activeDot]:L===x}),style:{backgroundColor:L===x?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},L))})})]})})}function bo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ia={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",Ra="ImageRevealSlider-module__link___N-iLG",Ma="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:La,image:Fa,link:Ra,cursor:Ma};function xo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,u=s/2,l=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Wa({settings:e,content:t,isEditor:n}){const[o,r]=g.useState(null),[s,i]=g.useState([]),[u,l]=g.useState(0),m=g.useRef(0),[c,T]=g.useState({x:0,y:0}),[v,h]=g.useState(1),[p,d]=g.useState("none"),C=g.useRef({x:0,y:0}),[b,x]=g.useState(!1),{sizeType:E,imageWidth:U,randomRangeImageWidth:k}=e.imageSize,{revealPosition:A,visible:S}=e.position,{cursorType:w,target:R,defaultCursorScale:V,defaultCursor:H,hoverCursorScale:j,hoverCursor:M}=e.cursor;g.useEffect(()=>{if(!o)return;const f=(P,$)=>{const N=o.getBoundingClientRect(),ee=P-N.left,ue=$-N.top;if(T({x:ee,y:ue}),w==="system"){d("none"),h(1);return}const oe=ee,me=ue,W=document.elementFromPoint(N.left+oe,N.top+me);if(W&&W.closest("a")){d("none"),h(1);return}const B=xo(oe,me,s)||R==="area"?{img:M??"none",scale:j}:{img:H??"none",scale:V};d(B.img),h(B.scale)},L=P=>{P.stopPropagation(),C.current={x:P.clientX,y:P.clientY},f(P.clientX,P.clientY)},I=()=>{b&&f(C.current.x,C.current.y)};return o.addEventListener("mousemove",L),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",L),window.removeEventListener("scroll",I,!0)}},[o,b,c,w,R,M,H,j,V,s]),g.useEffect(()=>{b||(d("none"),h(0))},[b]);const z=async(f,L,I,P={})=>{const{width:$,height:N,finalWidth:ee}=await Pa(f.image.url,E,U,k);let ue=0,oe=0;A==="same"?(ue=L/2,oe=I/2):(ue=P.x??Math.random()*L,oe=P.y??Math.random()*I);const me=Math.min(Math.max(ue,$/2),L-$/2),W=Math.min(Math.max(oe,N/2),I-N/2);return{id:m.current++,url:f.image.url,link:f.link,name:f.image.name,x:me,y:W,width:ee}};g.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),L=f.width,I=f.height,P=[];(async()=>{const N=t[0],ee=await z(N,L,I);P.push(ee),i(P),l(1)})()},[E,U,k,A,o]),g.useEffect(()=>{S==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[S]);const K=async f=>{if(!o)return;const L=o.getBoundingClientRect(),I=f.clientX-L.left,P=f.clientY-L.top;if(R==="image"&&!xo(I,P,s))return;let $=0,N=0;A==="on Click"?($=I,N=P):A==="same"?($=L.width/2,N=L.height/2):($=Math.random()*L.width,N=Math.random()*L.height);const ee=t[u],ue=await z(ee,L.width,L.height,{x:$,y:N});i(oe=>S==="all"?[...oe,ue]:[ue]),l(oe=>oe>=t.length-1?0:oe+1)};return a.jsxs("div",{ref:r,onClick:K,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(f=>a.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:R==="area"&&f.link?a.jsx("a",{href:f.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)}):a.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)},f.id)),b&&a.jsx("div",{className:ut.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ha={element:Wa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Na="LightBox-module__hidden___9s-9x",ja="LightBox-module__heroImage___sTxNF",Va="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",Oa="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Da="LightBox-module__imgWrapper___LuFUp",qa="LightBox-module__contain___8-yaS",Ua="LightBox-module__cover___hNvOG",Ga="LightBox-module__caption___b6L2I",Ka="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Za="LightBox-module__arrowVertical___Zfz81",Ja="LightBox-module__nextArrow___zkAQN",Qa="LightBox-module__arrowInner___p48sW",es="LightBox-module__arrowIcon___3VaFf",ts="LightBox-module__arrowImg___pNV88",ns="LightBox-module__mirror___pjeXc",os="LightBox-module__thumbsWrapper___GB-nU",rs="LightBox-module__thumbsContainerVertical___wttk5",is="LightBox-module__thumbsContainer___osSma",as="LightBox-module__thumbsAlignStart___MO6tY",ss="LightBox-module__thumbsAlignCenter___Q4sUx",ls="LightBox-module__thumbsAlignEnd___p4y9R",cs="LightBox-module__thumbItem___HvnF3",us="LightBox-module__closeButton___g2khP",ps="LightBox-module__fadeIn___0m5GW",ds="LightBox-module__slideInLeft___gPYwC",ms="LightBox-module__slideInRight___S-pPp",gs="LightBox-module__slideInTop___DFdAj",fs="LightBox-module__slideInBottom___m27kZ",hs="LightBox-module__fadeOut___55qBR",ys="LightBox-module__slideOutLeft___NvU7P",vs="LightBox-module__slideOutRight___SK7eC",bs="LightBox-module__slideOutTop___Vgg0z",xs="LightBox-module__slideOutBottom___nJ0Ef",Ss="LightBox-module__scaleSlide___vZriG",G={hidden:Na,heroImage:ja,background:Va,editor:Ba,contentStyle:Oa,imageStyle:za,imgWrapper:Da,contain:qa,cover:Ua,caption:Ga,captionTextInner:Ka,lightboxSplide:Ya,arrow:Xa,arrowVertical:Za,nextArrow:Ja,arrowInner:Qa,arrowIcon:es,arrowImg:ts,mirror:ns,thumbsWrapper:os,thumbsContainerVertical:rs,thumbsContainer:is,thumbsAlignStart:as,thumbsAlignCenter:ss,thumbsAlignEnd:ls,thumbItem:cs,closeButton:us,fadeIn:ps,slideInLeft:ds,slideInRight:ms,slideInTop:gs,slideInBottom:fs,fadeOut:hs,slideOutLeft:ys,slideOutRight:vs,slideOutTop:bs,slideOutBottom:xs,scaleSlide:Ss},Ut=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:o.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,o};function gr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function So(e){const t=e.getBoundingClientRect(),n=gr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,u=o/r,l=s/i;let m,c;l>u?(m=o,c=o/l):(c=r,m=r*l);const T=t.left+n.left,v=t.top+n.top,h=(o-m)/2+T,p=(r-c)/2+v;return{x:h,y:p,width:m,height:c}}function Co(e){const t=e.getBoundingClientRect(),n=gr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function 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 Cs(e,t){const n=(()=>{if(e==="fade in")return G.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return G.slideInLeft;case"right":return G.slideInRight;case"top":return G.slideInTop;case"bottom":return G.slideInBottom;default:return G.slideInRight}return G.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return G.fadeIn;if(e==="slide in")switch(t){case"left":return G.slideInLeft;case"right":return G.slideInRight;case"top":return G.slideInTop;case"bottom":return G.slideInBottom;default:return G.slideInRight}return G.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return G.fadeOut;if(e==="slide in")switch(t){case"left":return G.slideOutLeft;case"right":return G.slideOutRight;case"top":return G.slideOutTop;case"bottom":return G.slideOutBottom;default:return G.slideOutRight}return G.fadeOut})(),s=(()=>{if(e==="fade in")return G.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return G.slideOutLeft;case"right":return G.slideOutRight;case"top":return G.slideOutTop;case"bottom":return G.slideOutBottom;default:return G.slideOutRight}return G.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const ws=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,u]=g.useState(!1),{url:l}=e.thumbnailBlock.cover;return g.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:l,alt:"Cover",className:G.heroImage,onClick:()=>u(!0)}),a.jsx($s,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},$s=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:u})=>{var F;const[l,m]=g.useState(0),[c,T]=g.useState(0),[v,h]=g.useState(!1),[p,d]=g.useState(!1),[C,b]=g.useState({}),x=g.useRef(null),E=g.useRef(null),U=g.useRef(null),k=g.useRef(!1),A=g.useRef(null),S=g.useRef(null),w=g.useRef(null),R=g.useRef(null),V=g.useRef(!1),H=g.useRef(null),[j,M]=g.useState(!1),{appear:z,triggers:K,slider:f,thumbnail:L,controls:I,area:P,caption:$,layout:N}=r.lightboxBlock,{appearClass:ee,backdropAppearClass:ue,backdropDisappearClass:oe,disappearClass:me}=Cs(z.type,z.direction),W=(u==null?void 0:u.itemId)??null;g.useEffect(()=>{const y=()=>{setTimeout(()=>{var Y,J;(J=(Y=x.current)==null?void 0:Y.splide)==null||J.refresh()},16)},O=()=>{T(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",y),window.addEventListener("ArticleEditor.ComponentContent:change",O),()=>{window.removeEventListener("ArticleEditor.Layout:change",y),window.removeEventListener("ArticleEditor.ComponentContent:change",O)}},[]),g.useEffect(()=>{if(!e||!L.isActive){M(!1);return}const y=H.current;if(!y)return;const O=()=>{f.direction==="horiz"?M(y.scrollWidth>y.clientWidth):M(y.scrollHeight>y.clientHeight)};O();const Y=new ResizeObserver(O);return Y.observe(y),()=>Y.disconnect()},[e,L.isActive,n.length,C,f.direction]);const B=g.useCallback(()=>{const y=window.matchMedia("(max-width: 768px)").matches,O=wo(P.color);y&&!i&&O>.9&&(document.body.style.backgroundColor=""),h(!0),k.current=!0;const Y=J=>{J.target===A.current&&J.animationName&&(A.current&&S.current&&A.current.removeEventListener("animationend",S.current),S.current=null,k.current&&(k.current=!1,t()),h(!1))};A.current&&(S.current=Y,A.current.addEventListener("animationend",Y))},[t,P.color,i]),Q=(y,O,Y)=>{var J,le;if(y){if(K.type==="click"&&K.switch==="image")K.repeat==="close"&&l===n.length-1?B():(J=x.current)==null||J.go("+1");else if(K.type==="click"&&K.switch==="50/50"){const ae=y.getBoundingClientRect(),re=O-ae.left,ge=Y-ae.top,q=ae.width,Z=ae.height;let X;f.direction==="horiz"?X=re<q/2?"-1":"+1":X=ge<Z/2?"-1":"+1",(le=x.current)==null||le.go(X)}}},ne=y=>{if(V.current){V.current=!1;return}const O=n[l],Y=(O==null?void 0:O.image.objectFit)==="cover";let J,le;if("changedTouches"in y&&y.changedTouches.length>0)J=y.changedTouches[0].clientX,le=y.changedTouches[0].clientY;else if("clientX"in y)J=y.clientX,le=y.clientY;else return;let ae;if(Y&&U.current){const re=Co(U.current);ae=J>=re.left&&J<=re.right&&le>=re.top&&le<=re.bottom}else{const re=U.current?So(U.current):null;if(!re){y.target===y.currentTarget&&B();return}ae=J>=re.x&&J<=re.x+re.width&&le>=re.y&&le<=re.y+re.height}ae?Q(U.current,J,le):B()},se=y=>{const O=y.target;(O.classList.contains(G.thumbsWrapper)||O.classList.contains(G.thumbsContainer))&&ne(y)};g.useEffect(()=>{if(!e)return;const y=O=>{var Y,J;if(O.key==="Escape"){B();return}if(O.key==="ArrowRight"){m(le=>(le+1)%Math.max(n.length,1)),(Y=x.current)==null||Y.go("+1");return}O.key==="ArrowLeft"&&(m(le=>(le-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=x.current)==null||J.go("-1"))};return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y)}},[e,B,n.length]),g.useEffect(()=>{if(e){if(m(0),T(O=>O+1),k.current=!1,h(!1),d(!1),b({}),!W)return;const y=new CustomEvent("page-overlay",{detail:{itemId:W}});window.dispatchEvent(y)}return()=>{A.current&&S.current&&(A.current.removeEventListener("animationend",S.current),S.current=null),d(!1)}},[e,W]),g.useEffect(()=>{E.current!==null&&E.current!==f.type&&T(y=>y+1),E.current=f.type},[f.type]),g.useEffect(()=>{if(!e)return;const y=document.body.style.overflow,O=window.matchMedia("(max-width: 768px)").matches,Y=wo(P.color);document.body.style.overflow="hidden",d(!1);const J=ae=>{ae.target===A.current&&!k.current&&ae.animationName&&(O&&!i&&Y>.9&&(document.body.style.backgroundColor=P.color),d(!0),A.current&&w.current&&A.current.removeEventListener("animationend",w.current),w.current=null)};A.current&&(w.current=J,A.current.addEventListener("animationend",J));const le=ae=>{const re=ae.target;re&&(re.closest(`.${G.thumbsWrapper}`)||re.closest(`.${G.thumbsContainer}`))||f.type!=="slide"&&ae.preventDefault()};return document.addEventListener("touchmove",le,{passive:!1}),()=>{document.body.style.overflow=y,document.removeEventListener("touchmove",le),A.current&&w.current&&(A.current.removeEventListener("animationend",w.current),w.current=null),d(!1)}},[e,i,P.color,f.type]),g.useEffect(()=>{if(!e)return;const y=O=>{var J,le;if(k.current){O.stopPropagation();return}if(V.current){V.current=!1;return}const Y=O.target;if(!(Y&&(Y.closest(`.${G.thumbsContainer}`)||Y.closest(`.${G.thumbItem}`)))){if(f.type==="slide"&&K.type==="drag"&&((le=(J=x.current)==null?void 0:J.splide)!=null&&le.root)){const ae=x.current.splide.root;if(Y&&(ae.contains(Y)||ae===Y))return}if(O.touches.length===0&&O.changedTouches.length>0){const ae=n[l],re=(ae==null?void 0:ae.image.objectFit)==="cover",ge=O.changedTouches[0];let q;if(re&&U.current){const Z=Co(U.current);q=ge.clientX>=Z.left&&ge.clientX<=Z.right&&ge.clientY>=Z.top&&ge.clientY<=Z.bottom}else{const Z=U.current?So(U.current):null;if(!Z)return;q=ge.clientX>=Z.x&&ge.clientX<=Z.x+Z.width&&ge.clientY>=Z.y&&ge.clientY<=Z.y+Z.height}if(!q){O.stopPropagation(),k.current=!0;const Z=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),B()}}}};return document.addEventListener("touchend",y,{passive:!0}),()=>{document.removeEventListener("touchend",y)}},[e,B,l,n]);const D=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&K.type==="drag";g.useEffect(()=>{var X,pe;if(!e||!D||!((pe=(X=x.current)==null?void 0:X.splide)!=null&&pe.root))return;const y=x.current.splide.root,O=30,Y=(ie,fe)=>{if(R.current){const we=Math.abs(ie-R.current.x),$e=Math.abs(fe-R.current.y);(we>0||$e>0)&&(V.current=!0)}},J=ie=>{R.current&&(ie.preventDefault(),Y(ie.clientX,ie.clientY))},le=ie=>{R.current&&ie.touches.length>0&&(ie.preventDefault(),Y(ie.touches[0].clientX,ie.touches[0].clientY))},ae=(ie,fe)=>{if(!R.current||!x.current){R.current=null;return}const we=Math.abs(ie-R.current.x),$e=Math.abs(fe-R.current.y);$e>O&&$e>we&&x.current.go(fe<R.current.y?"+1":"-1"),R.current=null},re=ie=>{R.current&&ae(ie.clientX,ie.clientY),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("pointermove",J)},ge=ie=>{if(R.current){if(ie.changedTouches.length>0){const fe=ie.changedTouches[0];ae(fe.clientX,fe.clientY)}document.removeEventListener("touchend",ge),document.removeEventListener("touchcancel",ge),document.removeEventListener("touchmove",le)}},q=ie=>{R.current={x:ie.clientX,y:ie.clientY},V.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",re),document.addEventListener("pointercancel",re)},Z=ie=>{ie.touches.length>0&&(R.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},V.current=!1,document.addEventListener("touchmove",le,{passive:!1}),document.addEventListener("touchend",ge),document.addEventListener("touchcancel",ge))};return y.addEventListener("pointerdown",q),y.addEventListener("touchstart",Z),()=>{y.removeEventListener("pointerdown",q),y.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("touchmove",le),document.removeEventListener("touchend",ge),document.removeEventListener("touchcancel",ge),R.current=null,V.current=!1}},[e,D,c]);const ce={backgroundColor:P.color,backdropFilter:`blur(${P.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:xr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:A,className:he(G.background,v?oe:ue,{[G.editor]:i},{[G.hidden]:!e}),style:{...ce,...p&&!i&&!v?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?A:null,className:he(G.contentStyle,v?me:ee,{[G.editor]:i},{[G.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(dr,{onMove:y=>m(y.index),ref:x,className:G.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:K.type==="drag"&&!D,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:K.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((y,O)=>{const Y=Ut(N.position,N.offset,i),J=`${_.scalingValue(N.padding.top,i)} ${_.scalingValue(N.padding.right,i)} ${_.scalingValue(N.padding.bottom,i)} ${_.scalingValue(N.padding.left,i)}`,le=f.type==="scale"?(()=>{const{transform:ae,...re}=Y;return{...re,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ae||"none"}})():{...Y,position:"absolute",padding:J,boxSizing:"border-box"};return a.jsx(mr,{children:a.jsx("div",{className:G.imgWrapper,onClick:ne,children:a.jsx("img",{ref:O===l?U:null,className:he(G.imageStyle,{[G.contain]:y.image.objectFit==="contain",[G.cover]:y.image.objectFit==="cover",[G.scaleSlide]:f.type==="scale"}),src:y.image.url,alt:y.image.name??"",style:{...le,pointerEvents:y.image.objectFit==="contain"?"none":"auto"}})})},O)})},c),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(G.arrow,{[G.arrowVertical]:f.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:G.arrowInner,style:{transform:`translate(${_.scalingValue(I.offset.x,i)}, ${_.scalingValue(I.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var y;return(y=x.current)==null?void 0:y.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:he(G.arrowImg,G.mirror)}),!I.arrowsImgUrl&&a.jsx($o,{color:I.color,className:he(G.arrowIcon,G.arrowImg,G.mirror)})]})}),a.jsx("div",{className:he(G.arrow,G.nextArrow,{[G.arrowVertical]:f.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:G.arrowInner,style:{transform:`translate(${_.scalingValue(I.offset.x*(f.direction==="horiz"?-1:1),i)}, ${_.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var y;return(y=x.current)==null?void 0:y.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:G.arrowImg}),!I.arrowsImgUrl&&a.jsx($o,{color:I.color,className:he(G.arrowIcon,G.arrowImg)})]})})]}),P.closeIconUrl&&(()=>{const y=Ut(P.closeIconAlign,P.closeIconOffset,i),O=`scale(${P.closeIconScale})`,Y=y.transform?`${y.transform} ${O}`:O;return a.jsx("button",{className:G.closeButton,style:{...y,transform:Y},onClick:B,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:P.closeIconUrl,fill:P.closeIconColor??"#000000",hoverFill:P.closeIconHover??"#cccccc"})})})(),$&&$.isActive&&o.imageCaption&&((F=n[l])==null?void 0:F.imageCaption)&&(()=>{const{widthSettings:y,fontSettings:O,letterSpacing:Y,textAlign:J,wordSpacing:le,fontSizeLineHeight:ae,textAppearance:re,color:ge}=o.imageCaption;return a.jsx("div",{className:G.caption,style:{...Ut($.alignment,$.offset,i),fontFamily:yn(O.fontFamily),fontWeight:O.fontWeight,fontStyle:O.fontStyle,width:y.sizing==="auto"?"max-content":_.scalingValue(y.width,i),letterSpacing:_.scalingValue(Y,i),wordSpacing:_.scalingValue(le,i),textAlign:J,fontSize:_.scalingValue(ae.fontSize,i),lineHeight:_.scalingValue(ae.lineHeight,i),textTransform:re.textTransform??"none",textDecoration:re.textDecoration??"none",fontVariant:re.fontVariant??"normal",color:ge},onClick:q=>q.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:G.captionTextInner,style:{"--link-color":$.linkColor,"--link-hover-color":$.linkHoverColor},children:a.jsx(Mt,{content:n[l].imageCaption})})})})(),L.isActive&&(()=>{const[y,O]=L.position.split("-"),Y=f.direction==="horiz"?`${y}-left`:L.position,J=Ut(Y,L.offset,i),le=()=>{if(f.direction==="horiz"){if(O==="left")return"flex-start";if(O==="center")return"center";if(O==="right")return"flex-end"}else{if(y==="top")return"flex-start";if(y==="middle")return"center";if(y==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:H,className:G.thumbsWrapper,onClick:ae=>se(ae),style:{position:i?"absolute":"fixed",...J,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(G.thumbsContainer,{[G.thumbsContainerVertical]:f.direction==="vert",[G.thumbsAlignStart]:L.align==="start",[G.thumbsAlignCenter]:L.align==="center",[G.thumbsAlignEnd]:L.align==="end"}),style:{gap:_.scalingValue(L.grid.gap,i),justifyContent:j?"flex-start":le()},children:n.map((ae,re)=>{const ge=re===l,q=C[re],X=L.grid.size*(ge?L.activeState.scale:1),pe=()=>{if(L.fit!=="fit")return{};if(!q)return f.direction==="horiz"?{height:_.scalingValue(X,i)}:{width:_.scalingValue(X,i)};const ie=q.width/q.height;if(f.direction==="horiz"){const fe=X,we=fe*ie;return{width:_.scalingValue(we,i),height:_.scalingValue(fe,i)}}else{const fe=X,we=fe/ie;return{width:_.scalingValue(fe,i),height:_.scalingValue(we,i)}}};return a.jsx("button",{className:G.thumbItem,style:{...f.direction==="horiz"&&L.fit!=="fit"?{height:_.scalingValue(X,i)}:{},...f.direction==="vert"&&L.fit!=="fit"?{width:_.scalingValue(X,i)}:{},...L.fit==="cover"?{width:_.scalingValue(X,i),height:_.scalingValue(X,i)}:{},...pe(),transition:ge?"all 0.25s ease-out":"none",opacity:ge?L.activeState.opacity/100:L.opacity/100,"--thumb-hover":L.activeState.opacity/100},onClick:ie=>{var fe;ie.stopPropagation(),m(re),(fe=x.current)==null||fe.go(re)},onMouseEnter:()=>{var ie;L.triggers==="hov"&&((ie=x.current)==null||ie.go(re))},children:a.jsx("img",{src:ae.image.url,alt:ae.image.name??"",onLoad:ie=>{const fe=ie.currentTarget;fe.naturalWidth&&fe.naturalHeight&&b(we=>({...we,[re]:{width:fe.naturalWidth,height:fe.naturalHeight}}))},style:{objectFit:L.fit==="cover"?"cover":"contain",...L.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...L.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ae.image.name}-${re}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ts={element:ws,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _s(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function Es({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=E.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:p=[],buttonLabel:l,gap:m,fieldsGap:c,buttonCorners:T,buttonStroke:w,buttonPadding:y,isButtonFullWidth:u,inputCorners:d,inputStroke:C,inputPadding:b,inputColor:x,inputTextColor:A,inputBorderColor:V,placeholderColor:j,buttonColor:k,buttonTextColor:S,buttonBorderColor:$,labelTextColor:M,successColor:B,errorColor:W,fontFamily:F,inputFontSettings:H,inputFontSize:z,inputLineHeight:G,inputLetterSpacing:v,inputWordSpacing:I,inputTextAppearance:R,buttonFontSettings:L,buttonFontSize:_,buttonLineHeight:N,buttonLetterSpacing:J,buttonWordSpacing:ce,buttonTextAppearance:te,labelFontSettings:me,labelFontSize:f,labelLineHeight:O,labelLetterSpacing:oe,labelWordSpacing:ne,labelTextAppearance:ue,statusFontSettings:q,statusFontSize:se,statusLineHeight:P,statusLetterSpacing:h,statusWordSpacing:D,statusTextAppearance:Y,successMessage:Q,errorMessage:le,stateOverrides:ae}=e,re=s==="B",ge=p.slice(0,Math.min(i,p.length)),U={fontSettings:{fontFamily:F,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:z??.01,lineHeight:G,letterSpacing:v??0,wordSpacing:I??0,textAppearance:R,color:A},Z=ht(Pe(U,t)),X=E.scalingValue(C??0,t),pe=E.scalingValue((G??z??.01)+((b==null?void 0:b.top)??0)+((b==null?void 0:b.bottom)??0)+(s==="C"?C??0:(C??0)*2),t),ie={...Z,borderStyle:"solid",borderRadius:s==="C"?0:E.scalingValue(d??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:X,borderLeftWidth:0}:{borderWidth:X},paddingTop:E.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:E.scalingValue((b==null?void 0:b.left)??0,t),height:pe,minHeight:pe},fe={fontSettings:{fontFamily:F,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:_??.01,lineHeight:N,letterSpacing:J??0,wordSpacing:ce??0,textAppearance:te,color:S},we=ht(Pe(fe,t)),$e=E.scalingValue(w??0,t),lt={fontSettings:{fontFamily:F,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:f??.01,lineHeight:O,letterSpacing:oe??0,wordSpacing:ne??0,textAppearance:ue,color:M},Ke=Pe(lt,t),xe={fontSettings:{fontFamily:F,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:se??.01,lineHeight:P,letterSpacing:h??0,wordSpacing:D??0,textAppearance:Y,color:B},Me=ht(Pe(xe,t)),nt=E.buildColorVars(r,{inputColor:x,inputTextColor:A,inputBorderColor:V,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:k,buttonTextColor:S,buttonBorderColor:$,labelTextColor:M,successColor:B,errorColor:W},ks,As,ae),[Ce,je]=g.useState(()=>Object.fromEntries(ge.map(ye=>[ye.name,""]))),[eo,wt]=g.useState("idle"),[fr,zt]=g.useState(null),vn=o==="success"?"success":o==="error"?"error":eo,hr=o==="error"?le:fr,Dt=o==="filled",$t=g.useMemo(()=>{if(!Dt)return Ce;let ye=null;for(const Ve of ge)(Ce[Ve.name]??"").trim().length>0||(ye=ye??{...Ce},ye[Ve.name]="Filled");return ye??Ce},[Ce,Dt,ge]),yr=vn==="error"?E.getFormFieldValidationError(ge,$t):null,vr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),to=n==null?void 0:n.submitUrl,no=(ye,Ve)=>{je(Be=>({...Be,[ye]:Ve}))},br=async ye=>{ye.preventDefault();const Ve=Object.fromEntries(ge.map(Ie=>{var ct;return[Ie.name,((ct=Ce[Ie.name])==null?void 0:ct.trim())??""]}).filter(([,Ie])=>Ie));if(!to){wt("error"),zt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const Be=E.getFormFieldValidationError(ge,Ce);if(Be){wt("error"),zt(Be);return}wt("submitting"),zt(null);try{const Ie=await fetch(to,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Ie.ok){const ct=await Ie.text();throw new Error(ct||`Request failed: ${Ie.status}`)}wt("success"),je(Object.fromEntries(ge.map(ct=>[ct.name,""])))}catch(Ie){wt("error"),zt(Ie instanceof Error?Ie.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${vr}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_s(r)}}),a.jsxs("form",{onSubmit:br,className:`${r}-form`,style:{gap:E.scalingValue(m??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:E.scalingValue(c??0,t)},children:ge.map((ye,Ve)=>a.jsxs("div",{className:`${r}-field-group${re?` ${r}-labeled`:""}`,children:[re&&a.jsx("span",{className:`${r}-field-label`,style:Ke?{...Ke,lineHeight:Ke.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:ie,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:ie,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Ve))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(T??0,t),borderWidth:$e,paddingTop:E.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:E.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:E.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:E.scalingValue((y==null?void 0:y.left)??0,t),...we,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:eo==="submitting"?"...":l})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Me},children:Q}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:yr??hr??le})]})}const ks={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},As=["hover","focus","filled","success","error"],Is=`import React, { useMemo, useState } from 'react';
142
+ `}function Es({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=_.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:u=[],buttonLabel:l,gap:m,fieldsGap:c,buttonCorners:T,buttonStroke:v,buttonPadding:h,isButtonFullWidth:p,inputCorners:d,inputStroke:C,inputPadding:b,inputColor:x,inputTextColor:E,inputBorderColor:U,placeholderColor:k,buttonColor:A,buttonTextColor:S,buttonBorderColor:w,labelTextColor:R,successColor:V,errorColor:H,fontFamily:j,inputFontSettings:M,inputFontSize:z,inputLineHeight:K,inputLetterSpacing:f,inputWordSpacing:L,inputTextAppearance:I,buttonFontSettings:P,buttonFontSize:$,buttonLineHeight:N,buttonLetterSpacing:ee,buttonWordSpacing:ue,buttonTextAppearance:oe,labelFontSettings:me,labelFontSize:W,labelLineHeight:B,labelLetterSpacing:Q,labelWordSpacing:ne,labelTextAppearance:se,statusFontSettings:D,statusFontSize:ce,statusLineHeight:F,statusLetterSpacing:y,statusWordSpacing:O,statusTextAppearance:Y,successMessage:J,errorMessage:le,stateOverrides:ae}=e,re=s==="B",ge=u.slice(0,Math.min(i,u.length)),q={fontSettings:{fontFamily:j,fontWeight:(M==null?void 0:M.fontWeight)??400,fontStyle:(M==null?void 0:M.fontStyle)??"normal"},fontSize:z??.01,lineHeight:K,letterSpacing:f??0,wordSpacing:L??0,textAppearance:I,color:E},Z=ht(Pe(q,t)),X=_.scalingValue(C??0,t),pe=_.scalingValue((K??z??.01)+((b==null?void 0:b.top)??0)+((b==null?void 0:b.bottom)??0)+(s==="C"?C??0:(C??0)*2),t),ie={...Z,borderStyle:"solid",borderRadius:s==="C"?0:_.scalingValue(d??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:X,borderLeftWidth:0}:{borderWidth:X},paddingTop:_.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:_.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:_.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:_.scalingValue((b==null?void 0:b.left)??0,t),height:pe,minHeight:pe},fe={fontSettings:{fontFamily:j,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:$??.01,lineHeight:N,letterSpacing:ee??0,wordSpacing:ue??0,textAppearance:oe,color:S},we=ht(Pe(fe,t)),$e=_.scalingValue(v??0,t),lt={fontSettings:{fontFamily:j,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:W??.01,lineHeight:B,letterSpacing:Q??0,wordSpacing:ne??0,textAppearance:se,color:R},Ke=Pe(lt,t),xe={fontSettings:{fontFamily:j,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:ce??.01,lineHeight:F,letterSpacing:y??0,wordSpacing:O??0,textAppearance:Y,color:V},Me=ht(Pe(xe,t)),nt=_.buildColorVars(r,{inputColor:x,inputTextColor:E,inputBorderColor:U,placeholderColor:k!=null&&k.trim()?k:"#cccccc",buttonColor:A,buttonTextColor:S,buttonBorderColor:w,labelTextColor:R,successColor:V,errorColor:H},ks,As,ae),[Ce,je]=g.useState(()=>Object.fromEntries(ge.map(ye=>[ye.name,""]))),[eo,wt]=g.useState("idle"),[fr,zt]=g.useState(null),vn=o==="success"?"success":o==="error"?"error":eo,hr=o==="error"?le:fr,Dt=o==="filled",$t=g.useMemo(()=>{if(!Dt)return Ce;let ye=null;for(const Ve of ge)(Ce[Ve.name]??"").trim().length>0||(ye=ye??{...Ce},ye[Ve.name]="Filled");return ye??Ce},[Ce,Dt,ge]),yr=vn==="error"?_.getFormFieldValidationError(ge,$t):null,vr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),to=n==null?void 0:n.submitUrl,no=(ye,Ve)=>{je(Be=>({...Be,[ye]:Ve}))},br=async ye=>{ye.preventDefault();const Ve=Object.fromEntries(ge.map(Ie=>{var ct;return[Ie.name,((ct=Ce[Ie.name])==null?void 0:ct.trim())??""]}).filter(([,Ie])=>Ie));if(!to){wt("error"),zt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const Be=_.getFormFieldValidationError(ge,Ce);if(Be){wt("error"),zt(Be);return}wt("submitting"),zt(null);try{const Ie=await fetch(to,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Ie.ok){const ct=await Ie.text();throw new Error(ct||`Request failed: ${Ie.status}`)}wt("success"),je(Object.fromEntries(ge.map(ct=>[ct.name,""])))}catch(Ie){wt("error"),zt(Ie instanceof Error?Ie.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${vr}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_s(r)}}),a.jsxs("form",{onSubmit:br,className:`${r}-form`,style:{gap:_.scalingValue(m??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:_.scalingValue(c??0,t)},children:ge.map((ye,Ve)=>a.jsxs("div",{className:`${r}-field-group${re?` ${r}-labeled`:""}`,children:[re&&a.jsx("span",{className:`${r}-field-label`,style:Ke?{...Ke,lineHeight:Ke.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:ie,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:ie,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Ve))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:_.scalingValue(T??0,t),borderWidth:$e,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),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:eo==="submitting"?"...":l})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Me},children:J}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:yr??hr??le})]})}const ks={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},As=["hover","focus","filled","success","error"],Is=`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';
@@ -931,7 +931,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
931
931
  font-size: ${Yt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Ws=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=E.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:p,fieldsToShow:l=1,fontFamily:m,inputFontSettings:c,inputFontSize:T,inputLineHeight:w,inputLetterSpacing:y,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:C,buttonFontSize:b,buttonLineHeight:x,buttonLetterSpacing:A,buttonWordSpacing:V,buttonTextAppearance:j,statusFontSettings:k,statusFontSize:S,statusLineHeight:$,statusLetterSpacing:M,statusWordSpacing:B,statusTextAppearance:W,iconMaxWidth:F,minHeight:H,corners:z,stroke:G,stateOverrides:v,inputPadding:I,buttonPadding:R,successMessage:L="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=e,N=s.slice(0,Math.min(l,s.length)),[J,ce]=g.useState(()=>Object.fromEntries(N.map(xe=>[xe.name,""]))),[te,me]=g.useState("idle"),[f,O]=g.useState(null),oe=o==="success"?"success":o==="error"?"error":te,ne=o==="error"?_:f,ue=o==="filled",q=g.useMemo(()=>{if(!ue)return J;let xe=null;for(const Me of N)(J[Me.name]??"").trim().length>0||(xe=xe??{...J},xe[Me.name]="Filled");return xe??J},[ue,J,N]),se=oe==="error"?E.getFormFieldValidationError(N,q):null,P=o&&o!=="default"?`${r}-state-${o}`:"",h=N.some(xe=>(q[xe.name]??"").trim().length>0),D=P!==`${r}-state-filled`&&h?`${r}-state-filled`:"",Y=`${P} ${D}`.trim(),Q=n==null?void 0:n.submitUrl,le=p??"",ae=(i==null?void 0:i.icon)??"",re=(i==null?void 0:i.mode)==="On",ge=le||"Submit",U={fontSettings:{fontFamily:m,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:T??.01,lineHeight:w,letterSpacing:y??0,wordSpacing:u??0,textAppearance:d,color:e.inputTextColor??"#111111"},Z={fontSettings:{fontFamily:m,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:x,letterSpacing:A??0,wordSpacing:V??0,textAppearance:j,color:e.buttonTextColor??"#ffffff"},X={fontSettings:{fontFamily:m,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:S??.01,lineHeight:$,letterSpacing:M??0,wordSpacing:B??0,textAppearance:W,color:e.successColor??"#22c55e"},pe=ht(Pe(U,t)),ie=ht(Pe(Z,t)),fe=ht(Pe(X,t)),we=E.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(U==null?void 0:U.color)??"#111111",buttonTextColor:e.buttonTextColor??(Z==null?void 0:Z.color)??"#ffffff"},Hs,Ns,v),$e={borderRadius:E.scalingValue(z,t),borderWidth:E.scalingValue(G,t),borderStyle:"solid"},lt={borderLeftWidth:E.scalingValue(G,t)},Ke=async xe=>{xe.preventDefault();const Me=Object.fromEntries(N.map(Ce=>{var je;return[Ce.name,((je=J[Ce.name])==null?void 0:je.trim())??""]}).filter(([,Ce])=>Ce));if(!Q){me("error"),O("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const nt=E.getFormFieldValidationError(N,J);if(nt){me("error"),O(nt);return}me("submitting"),O(null);try{const Ce=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const je=await Ce.text();throw new Error(je||`Request failed: ${Ce.status}`)}me("success"),ce(Object.fromEntries(N.map(je=>[je.name,""])))}catch(Ce){me("error"),O(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Y}`.trim(),style:we,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ps(r)}}),a.jsxs("form",{onSubmit:Ke,className:`${r}-form`,style:{...$e,height:E.scalingValue(H,t),minHeight:E.scalingValue(H,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:q[xe.name]??"",onChange:Me=>ce(nt=>({...nt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...pe,paddingRight:E.scalingValue(I.right,t),paddingLeft:E.scalingValue(I.left,t),paddingTop:E.scalingValue(I.top,t),paddingBottom:E.scalingValue(I.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ge,style:{...ie,...lt,paddingRight:E.scalingValue(R.right,t),paddingLeft:E.scalingValue(R.left,t),paddingTop:E.scalingValue(R.top,t),paddingBottom:E.scalingValue(R.bottom,t)},children:te==="submitting"?"...":re?ae&&a.jsx(Xe,{url:ae,className:`${r}-submitBtnIcon`,style:{maxWidth:E.scalingValue(F??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):le})})]}),oe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...fe},children:L}),oe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...fe},role:"alert",children:se??ne??_})]})},Hs={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Ns=["hover","focus","filled","success","error"],js=`import React, { useMemo, useState } from 'react';
934
+ `}const Ws=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=_.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:l=1,fontFamily:m,inputFontSettings:c,inputFontSize:T,inputLineHeight:v,inputLetterSpacing:h,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:C,buttonFontSize:b,buttonLineHeight:x,buttonLetterSpacing:E,buttonWordSpacing:U,buttonTextAppearance:k,statusFontSettings:A,statusFontSize:S,statusLineHeight:w,statusLetterSpacing:R,statusWordSpacing:V,statusTextAppearance:H,iconMaxWidth:j,minHeight:M,corners:z,stroke:K,stateOverrides:f,inputPadding:L,buttonPadding:I,successMessage:P="Thanks for subscribing!",errorMessage:$="Please, fill all required fields."}=e,N=s.slice(0,Math.min(l,s.length)),[ee,ue]=g.useState(()=>Object.fromEntries(N.map(xe=>[xe.name,""]))),[oe,me]=g.useState("idle"),[W,B]=g.useState(null),Q=o==="success"?"success":o==="error"?"error":oe,ne=o==="error"?$:W,se=o==="filled",D=g.useMemo(()=>{if(!se)return ee;let xe=null;for(const Me of N)(ee[Me.name]??"").trim().length>0||(xe=xe??{...ee},xe[Me.name]="Filled");return xe??ee},[se,ee,N]),ce=Q==="error"?_.getFormFieldValidationError(N,D):null,F=o&&o!=="default"?`${r}-state-${o}`:"",y=N.some(xe=>(D[xe.name]??"").trim().length>0),O=F!==`${r}-state-filled`&&y?`${r}-state-filled`:"",Y=`${F} ${O}`.trim(),J=n==null?void 0:n.submitUrl,le=u??"",ae=(i==null?void 0:i.icon)??"",re=(i==null?void 0:i.mode)==="On",ge=le||"Submit",q={fontSettings:{fontFamily:m,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:T??.01,lineHeight:v,letterSpacing:h??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},Z={fontSettings:{fontFamily:m,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:x,letterSpacing:E??0,wordSpacing:U??0,textAppearance:k,color:e.buttonTextColor??"#ffffff"},X={fontSettings:{fontFamily:m,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:S??.01,lineHeight:w,letterSpacing:R??0,wordSpacing:V??0,textAppearance:H,color:e.successColor??"#22c55e"},pe=ht(Pe(q,t)),ie=ht(Pe(Z,t)),fe=ht(Pe(X,t)),we=_.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(q==null?void 0:q.color)??"#111111",buttonTextColor:e.buttonTextColor??(Z==null?void 0:Z.color)??"#ffffff"},Hs,Ns,f),$e={borderRadius:_.scalingValue(z,t),borderWidth:_.scalingValue(K,t),borderStyle:"solid"},lt={borderLeftWidth:_.scalingValue(K,t)},Ke=async xe=>{xe.preventDefault();const Me=Object.fromEntries(N.map(Ce=>{var je;return[Ce.name,((je=ee[Ce.name])==null?void 0:je.trim())??""]}).filter(([,Ce])=>Ce));if(!J){me("error"),B("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const nt=_.getFormFieldValidationError(N,ee);if(nt){me("error"),B(nt);return}me("submitting"),B(null);try{const Ce=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const je=await Ce.text();throw new Error(je||`Request failed: ${Ce.status}`)}me("success"),ue(Object.fromEntries(N.map(je=>[je.name,""])))}catch(Ce){me("error"),B(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Y}`.trim(),style:we,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ps(r)}}),a.jsxs("form",{onSubmit:Ke,className:`${r}-form`,style:{...$e,height:_.scalingValue(M,t),minHeight:_.scalingValue(M,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:D[xe.name]??"",onChange:Me=>ue(nt=>({...nt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...pe,paddingRight:_.scalingValue(L.right,t),paddingLeft:_.scalingValue(L.left,t),paddingTop:_.scalingValue(L.top,t),paddingBottom:_.scalingValue(L.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ge,style:{...ie,...lt,paddingRight:_.scalingValue(I.right,t),paddingLeft:_.scalingValue(I.left,t),paddingTop:_.scalingValue(I.top,t),paddingBottom:_.scalingValue(I.bottom,t)},children:oe==="submitting"?"...":re?ae&&a.jsx(Xe,{url:ae,className:`${r}-submitBtnIcon`,style:{maxWidth:_.scalingValue(j??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):le})})]}),Q==="success"&&a.jsx("p",{className:`${r}-success`,style:{...fe},children:P}),Q==="error"&&a.jsx("p",{className:`${r}-error`,style:{...fe},role:"alert",children:ce??ne??$})]})},Hs={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Ns=["hover","focus","filled","success","error"],js=`import React, { useMemo, useState } from 'react';
935
935
  import { CommonComponentProps } from '../props';
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1569,7 +1569,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1569
1569
  pointer-events: auto;
1570
1570
  z-index: 10;
1571
1571
  }
1572
- `}const qs=30,Us=12,_o=180,Gs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),{speed:s,direction:i,pauseOnHover:p,gap:l,imageMaxWidth:m,imageMaxHeight:c}=e,T=!o,w=T,y=Math.max(0,s)*qs,u=f=>E.scalingValue(f,n??!1),d=g.useRef(null),C=g.useRef(null),b=g.useRef(null),[x,A]=g.useState(0),[V,j]=g.useState(0),[k,S]=g.useState(0),$=w&&p==="on",[M,B]=g.useState(!1),W=g.useRef(!1),F=g.useRef(0),H=g.useRef(0),z=g.useRef({w:-1,n:0}),G=g.useRef(0),v=g.useRef(0),I=g.useRef(null),R=g.useMemo(()=>(t??[]).map(f=>{var O;return((O=f.image)==null?void 0:O.url)??""}).join("\0"),[t]),L=g.useMemo(()=>(t??[]).filter(f=>{var O;return!!((O=f.image)!=null&&O.url)}).length,[t]),_=g.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:V<=0||x<=0?2:Math.max(2,Math.ceil(x/V)+1),[T,t==null?void 0:t.length,V,x]);g.useLayoutEffect(()=>{v.current=0},[R]),g.useLayoutEffect(()=>{if(!T)return;const f=d.current,O=b.current;if(!f||!O)return;let oe=0;const ne=()=>{const se=f.getBoundingClientRect().width,P=O.getBoundingClientRect().width;P>0&&(H.current=P);const h=O.offsetWidth>0?O.offsetWidth:Math.max(0,Math.round(P));z.current.w!==h?z.current={w:h,n:1}:z.current.n+=1;const D=z.current.n>=Us,Y=L===0||v.current>=L;A(se);const Q=typeof h=="number"&&h>0&&V<=0,le=typeof h=="number"&&h>0&&V>0&&h!==V;if(Q){if(G.current+=1,Y&&(D||G.current>_o)){G.current=0,j(h);return}cancelAnimationFrame(oe),oe=requestAnimationFrame(ne);return}if(le){if(G.current+=1,Y&&(D||G.current>_o)){G.current=0,j(h);return}cancelAnimationFrame(oe),oe=requestAnimationFrame(ne);return}G.current=0},ue=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(ne)};I.current=ue,ue();const q=new ResizeObserver(ue);return q.observe(f),q.observe(O),()=>{I.current=null,cancelAnimationFrame(oe),q.disconnect()}},[T,L,V]),g.useEffect(()=>{W.current=M},[M]),g.useLayoutEffect(()=>{if(!T||!w)return;const f=C.current,O=b.current;if(!f||!O||V<=0||y<=0)return;if(H.current<=0){const se=O.getBoundingClientRect().width;se>0&&(H.current=se)}const oe=H.current>0?H.current:V;i==="right"&&F.current>=0?F.current=-oe:i==="left"&&F.current>0&&(F.current=0);let ne=0,ue=0;const q=se=>{ue===0&&(ue=se);const P=Math.min(100,se-ue)/1e3;if(ue=se,!($&&W.current)){const D=y*P;F.current+=i==="left"?-D:D;const Y=H.current>0?H.current:V;Y>0&&(i==="left"&&F.current<=-Y?F.current+=Y:i==="right"&&F.current>=0&&(F.current-=Y)),f.style.transform=`translate3d(${F.current}px, 0, 0)`}ne=requestAnimationFrame(q)};return f.style.transform=`translate3d(${F.current}px, 0, 0)`,ne=requestAnimationFrame(q),()=>{cancelAnimationFrame(ne)}},[T,w,y,i,V,$]),g.useLayoutEffect(()=>{if(!T){S(0);return}if(V<=0){S(0);return}const f=C.current;if(!f)return;const O=()=>{const ne=f.getBoundingClientRect().height;S(ne>0?ne:0)};O();const oe=new ResizeObserver(O);return oe.observe(f),()=>{oe.disconnect()}},[T,_,t,n,l,m,c,V]);const N=()=>{$&&B(!0)},J=()=>{$&&B(!1)},ce=()=>{var f;v.current=Math.min(L,v.current+1),(f=I.current)==null||f.call(I)},te=(f,O,oe)=>{var ue,q,se,P;const ne=((ue=f==null?void 0:f.image)==null?void 0:ue.objectFit)==="contain";return a.jsx("div",{style:{...ne?{maxWidth:u(m)}:{width:u(m)},height:u(c)},children:((q=f.image)==null?void 0:q.url)&&a.jsx("img",{src:f.image.url,alt:((se=f.image)==null?void 0:se.name)??"",style:{pointerEvents:"auto",height:"100%",...ne?{width:"auto",maxWidth:"100%"}:{width:"100%"},objectFit:((P=f.image)==null?void 0:P.objectFit)||"contain"},onLoad:oe?ce:void 0,onError:oe?ce:void 0})},O)},me=(f,O,oe)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[te(f,`card-${O}`,oe),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${u(l)})`,width:u(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},O);return T&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:d,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:{overflow:"hidden",width:"100%",...V>0&&k>0?{height:k}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{ref:C,className:`${r}-marquee-track`,"data-direction":i,onMouseEnter:N,onMouseLeave:J,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px"},children:Array.from({length:_},(f,O)=>a.jsx("div",{ref:O===0?b:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:u(l),paddingRight:u(l)},"aria-hidden":O>0,children:t==null?void 0:t.map((oe,ne)=>me(oe,`${O}-${ne}`,O===0))},`set-${O}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{style:{gap:u(l),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Marquee",children:t==null?void 0:t.map((f,O)=>me(f,O))})]})},Ks=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1572
+ `}const qs=30,Us=12,_o=180,Gs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=_.useScopedStyles(),{speed:s,direction:i,pauseOnHover:u,gap:l,imageMaxWidth:m,imageMaxHeight:c}=e,T=e.imageFit==="cover"?"cover":"contain",v=!o,h=v,p=Math.max(0,s)*qs,d=B=>_.scalingValue(B,n??!1),C=g.useRef(null),b=g.useRef(null),x=g.useRef(null),[E,U]=g.useState(0),[k,A]=g.useState(0),[S,w]=g.useState(0),R=h&&u==="on",[V,H]=g.useState(!1),j=g.useRef(!1),M=g.useRef(0),z=g.useRef(0),K=g.useRef({w:-1,n:0}),f=g.useRef(0),L=g.useRef(0),I=g.useRef(null),P=g.useMemo(()=>(t??[]).map(B=>{var Q;return((Q=B.image)==null?void 0:Q.url)??""}).join("\0"),[t]),$=g.useMemo(()=>(t??[]).filter(B=>{var Q;return!!((Q=B.image)!=null&&Q.url)}).length,[t]),N=g.useMemo(()=>!v||(t==null?void 0:t.length)===0?1:k<=0||E<=0?2:Math.max(2,Math.ceil(E/k)+1),[v,t==null?void 0:t.length,k,E,T]);g.useLayoutEffect(()=>{L.current=0},[P]),g.useLayoutEffect(()=>{if(!v)return;const B=C.current,Q=x.current;if(!B||!Q)return;let ne=0;const se=()=>{const F=B.getBoundingClientRect().width,y=Q.getBoundingClientRect().width;y>0&&(z.current=y);const O=Q.offsetWidth>0?Q.offsetWidth:Math.max(0,Math.round(y));K.current.w!==O?K.current={w:O,n:1}:K.current.n+=1;const Y=K.current.n>=Us,J=$===0||L.current>=$;U(F);const le=typeof O=="number"&&O>0&&k<=0,ae=typeof O=="number"&&O>0&&k>0&&O!==k;if(le){if(f.current+=1,J&&(Y||f.current>_o)){f.current=0,A(O);return}cancelAnimationFrame(ne),ne=requestAnimationFrame(se);return}if(ae){if(f.current+=1,J&&(Y||f.current>_o)){f.current=0,A(O);return}cancelAnimationFrame(ne),ne=requestAnimationFrame(se);return}f.current=0},D=()=>{cancelAnimationFrame(ne),ne=requestAnimationFrame(se)};I.current=D,D();const ce=new ResizeObserver(D);return ce.observe(B),ce.observe(Q),()=>{I.current=null,cancelAnimationFrame(ne),ce.disconnect()}},[v,$,k,T]),g.useEffect(()=>{j.current=V},[V]),g.useLayoutEffect(()=>{if(!v||!h)return;const B=b.current,Q=x.current;if(!B||!Q||k<=0||p<=0)return;if(z.current<=0){const F=Q.getBoundingClientRect().width;F>0&&(z.current=F)}const ne=z.current>0?z.current:k;i==="right"&&M.current>=0?M.current=-ne:i==="left"&&M.current>0&&(M.current=0);let se=0,D=0;const ce=F=>{D===0&&(D=F);const y=Math.min(100,F-D)/1e3;if(D=F,!(R&&j.current)){const Y=p*y;M.current+=i==="left"?-Y:Y;const J=z.current>0?z.current:k;J>0&&(i==="left"&&M.current<=-J?M.current+=J:i==="right"&&M.current>=0&&(M.current-=J)),B.style.transform=`translate3d(${M.current}px, 0, 0)`}se=requestAnimationFrame(ce)};return B.style.transform=`translate3d(${M.current}px, 0, 0)`,se=requestAnimationFrame(ce),()=>{cancelAnimationFrame(se)}},[v,h,p,i,k,R]),g.useLayoutEffect(()=>{if(!v){w(0);return}if(k<=0){w(0);return}const B=b.current;if(!B)return;const Q=()=>{const se=B.getBoundingClientRect().height;w(se>0?se:0)};Q();const ne=new ResizeObserver(Q);return ne.observe(B),()=>{ne.disconnect()}},[v,N,t,n,l,m,c,k,T]);const ee=()=>{R&&H(!0)},ue=()=>{R&&H(!1)},oe=()=>{var B;L.current=Math.min($,L.current+1),(B=I.current)==null||B.call(I)},me=(B,Q,ne)=>{var ce,F,y;const se=(ce=B.link)==null?void 0:ce.trim(),D=((F=B.image)==null?void 0:F.url)&&a.jsx("img",{src:B.image.url,alt:((y=B.image)==null?void 0:y.name)??"",style:{pointerEvents:"auto",height:"100%",...T==="contain"?{width:"auto",maxWidth:"100%"}:{width:"100%"},objectFit:T},onLoad:ne?oe:void 0,onError:ne?oe:void 0});return a.jsx("div",{style:{...T==="contain"?{maxWidth:d(m)}:{width:d(m)},height:d(c),overflow:"hidden"},children:D&&(se?a.jsx("a",{href:se,target:"_blank",rel:"noopener noreferrer",style:{display:"block",height:"100%",...T==="cover"?{width:"100%"}:{},textDecoration:"none",color:"inherit"},children:D}):D)},Q)},W=(B,Q,ne)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[me(B,`card-${Q}`,ne),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${d(l)})`,width:d(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},Q);return v&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:C,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:{overflow:"hidden",width:"100%",...k>0&&S>0?{height:S}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{ref:b,className:`${r}-marquee-track`,"data-direction":i,onMouseEnter:ee,onMouseLeave:ue,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px"},children:Array.from({length:N},(B,Q)=>a.jsx("div",{ref:Q===0?x:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:d(l),paddingRight:d(l)},"aria-hidden":Q>0,children:t==null?void 0:t.map((ne,se)=>W(ne,`${Q}-${se}`,Q===0))},`set-${Q}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{style:{gap:d(l),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Marquee",children:t==null?void 0:t.map((B,Q)=>W(B,Q))})]})},Ks=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1573
1573
  import cn from 'classnames';
1574
1574
  import { CommonComponentProps } from '../props';
1575
1575
  import { scalingValue } from '../utils/scalingValue';
@@ -1659,6 +1659,8 @@ const SET_WIDTH_RAF_FALLBACK = 180;
1659
1659
  export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeProps) => {
1660
1660
  const { prefix: P } = useScopedStyles();
1661
1661
  const { speed, direction, pauseOnHover, gap, imageMaxWidth, imageMaxHeight } = settings;
1662
+ const imageFit: 'cover' | 'contain' =
1663
+ settings.imageFit === 'cover' ? 'cover' : 'contain';
1662
1664
  const autoplayEnabled = !isPreviewMode;
1663
1665
  const isAnimating = autoplayEnabled;
1664
1666
  const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
@@ -1690,7 +1692,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1690
1692
  if (!autoplayEnabled || content?.length === 0) return 1;
1691
1693
  if (setWidth <= 0 || containerWidth <= 0) return 2;
1692
1694
  return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1693
- }, [autoplayEnabled, content?.length, setWidth, containerWidth]);
1695
+ }, [autoplayEnabled, content?.length, setWidth, containerWidth, imageFit]);
1694
1696
 
1695
1697
  useLayoutEffect(() => {
1696
1698
  loadedFirstSetImagesRef.current = 0;
@@ -1769,7 +1771,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1769
1771
  cancelAnimationFrame(raf);
1770
1772
  ro.disconnect();
1771
1773
  };
1772
- }, [autoplayEnabled, firstSetImageUrlCount, setWidth]);
1774
+ }, [autoplayEnabled, firstSetImageUrlCount, setWidth, imageFit]);
1773
1775
 
1774
1776
  useEffect(() => {
1775
1777
  isHoveringRef.current = isHovering;
@@ -1847,7 +1849,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1847
1849
  return () => {
1848
1850
  ro.disconnect();
1849
1851
  };
1850
- }, [autoplayEnabled, copies, content, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth]);
1852
+ }, [autoplayEnabled, copies, content, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth, imageFit]);
1851
1853
 
1852
1854
  const onTrackEnter = () => {
1853
1855
  if (!hoverPauseEnabled) return;
@@ -1867,31 +1869,53 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1867
1869
  };
1868
1870
 
1869
1871
  const renderCard = (item: MarqueeItem, key: string | number, isFirstSet?: boolean) => {
1870
- const isContain = item?.image?.objectFit === 'contain';
1872
+ const linkHref = item.link?.trim();
1873
+ const imageNode =
1874
+ item.image?.url &&
1875
+ (
1876
+ <img
1877
+ src={item.image.url}
1878
+ alt={item.image?.name ?? ''}
1879
+ style={{
1880
+ pointerEvents: 'auto',
1881
+ height: '100%',
1882
+ ...(imageFit === 'contain'
1883
+ ? { width: 'auto', maxWidth: '100%' }
1884
+ : { width: '100%' }),
1885
+ objectFit: imageFit,
1886
+ }}
1887
+ onLoad={isFirstSet ? onFirstSetImageDone : undefined}
1888
+ onError={isFirstSet ? onFirstSetImageDone : undefined}
1889
+ />
1890
+ );
1871
1891
  return (
1872
1892
  <div
1873
1893
  key={key}
1874
1894
  style={{
1875
- ...(isContain ? { maxWidth: scaled(imageMaxWidth) } : { width: scaled(imageMaxWidth) }),
1895
+ ...(imageFit === 'contain' ? { maxWidth: scaled(imageMaxWidth) } : { width: scaled(imageMaxWidth) }),
1876
1896
  height: scaled(imageMaxHeight),
1897
+ overflow: 'hidden',
1877
1898
  }}
1878
1899
  >
1879
- {item.image?.url && (
1880
- <img
1881
- src={item.image.url}
1882
- alt={item.image?.name ?? ''}
1883
- style={{
1884
- pointerEvents: 'auto',
1885
- height: '100%',
1886
- ...(isContain
1887
- ? { width: 'auto', maxWidth: '100%' }
1888
- : { width: '100%' }),
1889
- objectFit: item.image?.objectFit || 'contain',
1890
- }}
1891
- onLoad={isFirstSet ? onFirstSetImageDone : undefined}
1892
- onError={isFirstSet ? onFirstSetImageDone : undefined}
1893
- />
1894
- )}
1900
+ {imageNode &&
1901
+ (linkHref ? (
1902
+ <a
1903
+ href={linkHref}
1904
+ target='_blank'
1905
+ rel='noopener noreferrer'
1906
+ style={{
1907
+ display: 'block',
1908
+ height: '100%',
1909
+ ...(imageFit === 'cover' ? { width: '100%' } : {}),
1910
+ textDecoration: 'none',
1911
+ color: 'inherit',
1912
+ }}
1913
+ >
1914
+ {imageNode}
1915
+ </a>
1916
+ ) : (
1917
+ imageNode
1918
+ ))}
1895
1919
  </div>
1896
1920
  );
1897
1921
  };
@@ -2009,8 +2033,8 @@ export type MarqueeItem = {
2009
2033
  image?: {
2010
2034
  url?: string;
2011
2035
  name?: string;
2012
- objectFit?: 'cover' | 'contain';
2013
2036
  };
2037
+ link?: string;
2014
2038
  };
2015
2039
 
2016
2040
  export type MarqueeSettings = {
@@ -2020,8 +2044,10 @@ export type MarqueeSettings = {
2020
2044
  gap: number;
2021
2045
  imageMaxWidth: number;
2022
2046
  imageMaxHeight: number;
2047
+ /** \`contain\` is shown as "Fit" in the editor; same as CSS \`object-fit: contain\`. Legacy stored value \`fit\` is treated as \`contain\`. */
2048
+ imageFit?: 'cover' | 'contain' | 'fit';
2023
2049
  };
2024
- `,Ys={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"range-control"}}},defaults:{direction:"left",pauseOnHover:"off"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[],layout:["__componentName__","speed","direction","pauseOnHover","gap","imageMaxWidth","imageMaxHeight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["imageMaxWidth","speed"]},{type:"row",items:["imageMaxHeight","pauseOnHover"]},{type:"row",items:["direction"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""}}]}},Xs={element:Gs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Ys,sourceCode:Ks,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Eo(e){return`
2050
+ `,Ys={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"range-control"}},imageFit:{type:"string",scope:"common",title:"Image cover",enum:["cover","contain"],display:{type:"switch-toggle-2",enum:["cover","contain"]}}},defaults:{direction:"left",pauseOnHover:"off",imageFit:"contain"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[],layout:["__componentName__","speed","direction","pauseOnHover","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["imageMaxWidth","speed"]},{type:"row",items:["imageMaxHeight","pauseOnHover"]},{type:"row",items:["direction","imageFit"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""},link:""}]}},Xs={element:Gs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Ys,sourceCode:Ks,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Eo(e){return`
2025
2051
  .${e}-marquee-wrapper {
2026
2052
  overflow: hidden;
2027
2053
  width: 100%;
@@ -2108,7 +2134,7 @@ export type MarqueeSettings = {
2108
2134
  pointer-events: auto;
2109
2135
  z-index: 10;
2110
2136
  }
2111
- `}const Zs=30,Js=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),{autoplay:s,align:i,speed:p,direction:l,pauseOnHover:m,gap:c,cardWidth:T,corners:w,stroke:y,strokeColor:u,bgColor:d,padding:C,logoMarginTop:b,logoWidth:x,logoHeight:A,captionMarginTop:V}=e,j=s==="on"&&!o,k=j,S=Math.max(0,p)*Zs,$=U=>E.scalingValue(U,n??!1),M=g.useRef(null),B=g.useRef(null),W=g.useRef(null),[F,H]=g.useState(0),[z,G]=g.useState(0),[v,I]=g.useState(0),R=k&&m==="on",[L,_]=g.useState(!1),N=g.useRef(null),[J,ce]=g.useState(0),[te,me]=g.useState(0),f=g.useRef(null),O=U=>{var X,pe,ie,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${U}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${U}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${U}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${U}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${U}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${U}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${U}LineHeight`])??.01,color:(e==null?void 0:e[`${U}Color`])??"#000000"}},oe=O("text"),ne=O("caption"),ue=g.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(U=>{var Z,X;return(((Z=U.text)==null?void 0:Z.length)??0)>0||(((X=U.caption)==null?void 0:X.length)??0)>0}),[t]),q=g.useMemo(()=>!j||(t==null?void 0:t.length)===0?1:z<=0||F<=0?2:Math.max(2,Math.ceil(F/z)+1),[j,t==null?void 0:t.length,z,F]);g.useLayoutEffect(()=>{if(!j)return;const U=M.current,Z=W.current;if(!U||!Z)return;let X=0;const pe=()=>{const we=U.getBoundingClientRect().width,$e=Z.getBoundingClientRect().width,lt=f.current,Ke=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(f.current=$e,H(we),typeof $e=="number"&&$e>0&&z<=0){G($e);return}Ke&&$e!==z?G($e):!Ke&&z<=0&&(cancelAnimationFrame(X),X=requestAnimationFrame(pe))},ie=()=>{cancelAnimationFrame(X),X=requestAnimationFrame(pe)};ie();const fe=new ResizeObserver(ie);return fe.observe(U),fe.observe(Z),()=>{cancelAnimationFrame(X),fe.disconnect()}},[j,z]),g.useLayoutEffect(()=>{const U=B.current;if(!j||!U||!k)return;const Z=z>0?z:0,X=Z>0&&S>0?Z/S*1e3:0,pe=`${Math.max(0,X)/1e3}s`;U.style.setProperty("--marquee-distance",`${Z}px`),U.style.setProperty("--marquee-duration",pe)},[j,k,S,z]),g.useLayoutEffect(()=>{if(!j){I(0);return}const U=B.current;if(!U)return;const Z=()=>{const pe=U.getBoundingClientRect().height;I(pe>0?pe:0)};Z();const X=new ResizeObserver(Z);return X.observe(U),()=>{X.disconnect()}},[j,q,t,n,c,T,C,y,w,x,A]);const se=()=>{R&&_(!0)},P=()=>{R&&_(!1)},h=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),D=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Y=g.useCallback((U,Z,X,pe)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[a.jsx("div",{"data-controls":pe==null?void 0:pe.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:$((pe==null?void 0:pe.marginTop)??0)}}),a.jsx("div",{...pe!=null&&pe.dataMeasureKind?{"data-testimonial-measure":pe.dataMeasureKind}:{},style:{...Pe(U,n),textAlign:D,pointerEvents:"auto",...typeof(pe==null?void 0:pe.minHeightPx)=="number"&&pe.minHeightPx>0?{minHeight:pe.minHeightPx}:{}},children:a.jsx(Mt,{content:Z})})]},X),[h,D,n]),Q=g.useCallback((U,Z,X)=>{var pe,ie,fe;return a.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(T+y*2),height:"100%",borderRadius:$(w),border:`${$(y)} solid ${u}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:d}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:h,textAlign:D},children:[U.text&&Y(oe,U.text,"text",X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(X==null?void 0:X.textMinHeightPx)=="number"&&X.textMinHeightPx>0?{minHeightPx:X.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:$(b)}}),a.jsx("div",{style:{width:$(x),height:$(A)},children:((pe=U.logo)==null?void 0:pe.url)&&a.jsx("img",{src:U.logo.url,alt:((ie=U.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((fe=U.logo)==null?void 0:fe.objectFit)||"contain"}})})]}),U.caption&&Y(ne,U.caption,"caption",{controlsName:"captionMarginTop",marginTop:V,...X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(X==null?void 0:X.captionMinHeightPx)=="number"&&X.captionMinHeightPx>0?{minHeightPx:X.captionMinHeightPx}:{}})]})]},Z)},[d,V,ne,T,w,A,b,x,h,D,C.bottom,C.left,C.right,C.top,Y,y,u,oe,n]),le=g.useCallback(U=>{ce(U.maxTextPx),me(U.maxCaptionPx)},[]);g.useLayoutEffect(()=>{if(!ue){le({maxTextPx:0,maxCaptionPx:0});return}const U=N.current;if(!U)return;const Z=()=>{E.readTestimonialTextMeasure(U,le)};Z();const X=new ResizeObserver(Z);return X.observe(U),()=>{X.disconnect()}},[ue,le,t,Q]);const ae=ue?{textMinHeightPx:J,captionMinHeightPx:te}:void 0,re=ue?a.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((U,Z)=>Q(U,`measure-${Z}`,{dataMeasureAttrs:!0}))}):null,ge=(U,Z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Q(U,`card-${Z}`,ae),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(c)})`,width:$(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},Z);return j&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:M,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...v>0?{height:v}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),re,a.jsx("div",{ref:B,className:`${r}-marquee-track`,"data-direction":l,onMouseEnter:se,onMouseLeave:P,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...R?{"--marquee-play-state":L?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:q},(U,Z)=>a.jsx("div",{ref:Z===0?W:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(c),paddingRight:$(c)},"aria-hidden":Z>0,children:t==null?void 0:t.map((X,pe)=>ge(X,`${Z}-${pe}`))},`set-${Z}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),re,a.jsx("div",{style:{gap:$(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((U,Z)=>ge(U,Z))})]})},Qs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2137
+ `}const Zs=30,Js=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=_.useScopedStyles(),{autoplay:s,align:i,speed:u,direction:l,pauseOnHover:m,gap:c,cardWidth:T,corners:v,stroke:h,strokeColor:p,bgColor:d,padding:C,logoMarginTop:b,logoWidth:x,logoHeight:E,captionMarginTop:U}=e,k=s==="on"&&!o,A=k,S=Math.max(0,u)*Zs,w=q=>_.scalingValue(q,n??!1),R=g.useRef(null),V=g.useRef(null),H=g.useRef(null),[j,M]=g.useState(0),[z,K]=g.useState(0),[f,L]=g.useState(0),I=A&&m==="on",[P,$]=g.useState(!1),N=g.useRef(null),[ee,ue]=g.useState(0),[oe,me]=g.useState(0),W=g.useRef(null),B=q=>{var X,pe,ie,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${q}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${q}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${q}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${q}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${q}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${q}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${q}LineHeight`])??.01,color:(e==null?void 0:e[`${q}Color`])??"#000000"}},Q=B("text"),ne=B("caption"),se=g.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(q=>{var Z,X;return(((Z=q.text)==null?void 0:Z.length)??0)>0||(((X=q.caption)==null?void 0:X.length)??0)>0}),[t]),D=g.useMemo(()=>!k||(t==null?void 0:t.length)===0?1:z<=0||j<=0?2:Math.max(2,Math.ceil(j/z)+1),[k,t==null?void 0:t.length,z,j]);g.useLayoutEffect(()=>{if(!k)return;const q=R.current,Z=H.current;if(!q||!Z)return;let X=0;const pe=()=>{const we=q.getBoundingClientRect().width,$e=Z.getBoundingClientRect().width,lt=W.current,Ke=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(W.current=$e,M(we),typeof $e=="number"&&$e>0&&z<=0){K($e);return}Ke&&$e!==z?K($e):!Ke&&z<=0&&(cancelAnimationFrame(X),X=requestAnimationFrame(pe))},ie=()=>{cancelAnimationFrame(X),X=requestAnimationFrame(pe)};ie();const fe=new ResizeObserver(ie);return fe.observe(q),fe.observe(Z),()=>{cancelAnimationFrame(X),fe.disconnect()}},[k,z]),g.useLayoutEffect(()=>{const q=V.current;if(!k||!q||!A)return;const Z=z>0?z:0,X=Z>0&&S>0?Z/S*1e3:0,pe=`${Math.max(0,X)/1e3}s`;q.style.setProperty("--marquee-distance",`${Z}px`),q.style.setProperty("--marquee-duration",pe)},[k,A,S,z]),g.useLayoutEffect(()=>{if(!k){L(0);return}const q=V.current;if(!q)return;const Z=()=>{const pe=q.getBoundingClientRect().height;L(pe>0?pe:0)};Z();const X=new ResizeObserver(Z);return X.observe(q),()=>{X.disconnect()}},[k,D,t,n,c,T,C,h,v,x,E]);const ce=()=>{I&&$(!0)},F=()=>{I&&$(!1)},y=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),O=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Y=g.useCallback((q,Z,X,pe)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[a.jsx("div",{"data-controls":pe==null?void 0:pe.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:w((pe==null?void 0:pe.marginTop)??0)}}),a.jsx("div",{...pe!=null&&pe.dataMeasureKind?{"data-testimonial-measure":pe.dataMeasureKind}:{},style:{...Pe(q,n),textAlign:O,pointerEvents:"auto",...typeof(pe==null?void 0:pe.minHeightPx)=="number"&&pe.minHeightPx>0?{minHeight:pe.minHeightPx}:{}},children:a.jsx(Mt,{content:Z})})]},X),[y,O,n]),J=g.useCallback((q,Z,X)=>{var pe,ie,fe;return a.jsxs("div",{style:{padding:`${w(C.top)} ${w(C.right)} ${w(C.bottom)} ${w(C.left)}`,width:w(T+h*2),height:"100%",borderRadius:w(v),border:`${w(h)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:d}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:y,textAlign:O},children:[q.text&&Y(Q,q.text,"text",X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(X==null?void 0:X.textMinHeightPx)=="number"&&X.textMinHeightPx>0?{minHeightPx:X.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:y,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:w(b)}}),a.jsx("div",{style:{width:w(x),height:w(E)},children:((pe=q.logo)==null?void 0:pe.url)&&a.jsx("img",{src:q.logo.url,alt:((ie=q.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((fe=q.logo)==null?void 0:fe.objectFit)||"contain"}})})]}),q.caption&&Y(ne,q.caption,"caption",{controlsName:"captionMarginTop",marginTop:U,...X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(X==null?void 0:X.captionMinHeightPx)=="number"&&X.captionMinHeightPx>0?{minHeightPx:X.captionMinHeightPx}:{}})]})]},Z)},[d,U,ne,T,v,E,b,x,y,O,C.bottom,C.left,C.right,C.top,Y,h,p,Q,n]),le=g.useCallback(q=>{ue(q.maxTextPx),me(q.maxCaptionPx)},[]);g.useLayoutEffect(()=>{if(!se){le({maxTextPx:0,maxCaptionPx:0});return}const q=N.current;if(!q)return;const Z=()=>{_.readTestimonialTextMeasure(q,le)};Z();const X=new ResizeObserver(Z);return X.observe(q),()=>{X.disconnect()}},[se,le,t,J]);const ae=se?{textMinHeightPx:ee,captionMinHeightPx:oe}:void 0,re=se?a.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((q,Z)=>J(q,`measure-${Z}`,{dataMeasureAttrs:!0}))}):null,ge=(q,Z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[J(q,`card-${Z}`,ae),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${w(c)})`,width:w(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},Z);return k&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:R,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),re,a.jsx("div",{ref:V,className:`${r}-marquee-track`,"data-direction":l,onMouseEnter:ce,onMouseLeave:F,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...I?{"--marquee-play-state":P?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:D},(q,Z)=>a.jsx("div",{ref:Z===0?H:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:w(c),paddingRight:w(c)},"aria-hidden":Z>0,children:t==null?void 0:t.map((X,pe)=>ge(X,`${Z}-${pe}`))},`set-${Z}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),re,a.jsx("div",{style:{gap:w(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((q,Z)=>ge(q,Z))})]})},Qs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2112
2138
  import cn from 'classnames';
2113
2139
  import { CommonComponentProps } from '../props';
2114
2140
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2828,7 +2854,7 @@ type TestimonialsSettings = {
2828
2854
  width: 100%;
2829
2855
  height: 100%;
2830
2856
  }
2831
- `}const ol=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),s=t||[],{autoplay:i,delay:p,align:l,width:m,imageMarginTop:c,textMarginTop:T,captionMarginTop:w,imageWidth:y,imageHeight:u,controlsWidth:d,controlsColor:C,controlsHoverColor:b}=e,x=i==="on"&&!o,[A,V]=g.useState(0),[j,k]=g.useState(null),[S,$]=g.useState(!1),M=g.useRef(null),B=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),W=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);g.useEffect(()=>{V(0),k(null),$(!1)},[s.length]);const F=s[A],H=j===null?null:s[j],z=q=>{var P,h,D,Y,Q;return{fontSettings:{fontFamily:(e==null?void 0:e[`${q}FontFamily`])??"Arial",fontWeight:((P=e==null?void 0:e[`${q}FontSettings`])==null?void 0:P.fontWeight)??400,fontStyle:((h=e==null?void 0:e[`${q}FontSettings`])==null?void 0:h.fontStyle)??"normal"},textAppearance:{textTransform:((D=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:D.textTransform)??"none",textDecoration:((Y=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:Y.textDecoration)??"none",fontVariant:((Q=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:Q.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${q}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${q}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${q}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${q}WordSpacing`])??0,color:(e==null?void 0:e[`${q}Color`])??"#000000"}},G=z("text"),v=z("caption"),I=s.length>1&&s.some(q=>{var se,P;return(((se=q.text)==null?void 0:se.length)??0)>0||(((P=q.caption)==null?void 0:P.length)??0)>0}),R=g.useRef(null),[L,_]=g.useState(0),[N,J]=g.useState(0),ce=e.controls??{mode:"Off",icon:null},te=s.length>1,me=g.useCallback((q,se)=>!te||se===q?q:(M.current&&window.clearTimeout(M.current),k(q),$(!0),M.current=window.setTimeout(()=>{k(null),$(!1),M.current=null},300),se),[te]),f=g.useCallback(()=>{te&&V(q=>me(q,(q-1+s.length)%s.length))},[te,me,s.length]),O=g.useCallback(()=>{te&&V(q=>me(q,(q+1)%s.length))},[te,me,s.length]);g.useEffect(()=>{if(!x||!te)return;const q=Math.max(300,Number.isFinite(p*1e3)?p*1e3:0),se=window.setInterval(()=>{V(P=>me(P,(P+1)%s.length))},q);return()=>{window.clearInterval(se)}},[x,te,me,s.length,p]),g.useEffect(()=>()=>{M.current&&window.clearTimeout(M.current)},[]);const oe=(q,se)=>{var Y,Q,le,ae;const P=se==null?void 0:se.textMinHeightPx,h=se==null?void 0:se.captionMinHeightPx,D=se==null?void 0:se.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[q.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:E.scalingValue(T??0,n??!1)}}),a.jsx("div",{...D&&{"data-testimonial-measure":"text"},style:{...Pe(G,n),...P&&P>0?{minHeight:P}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(Mt,{content:q.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:E.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:E.scalingValue(y??0,n??!1),height:E.scalingValue(u??0,n??!1)},children:((Y=q.image)==null?void 0:Y.url)&&a.jsx("img",{src:(Q=q.image)==null?void 0:Q.url,alt:((le=q.image)==null?void 0:le.name)??"",className:`${r}-icon`,style:{objectFit:((ae=q.image)==null?void 0:ae.objectFit)||"contain"}})})]}),q.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:E.scalingValue(w??0,n??!1)}}),a.jsx("div",{...D?{"data-testimonial-measure":"caption"}:{},style:{...Pe(v,n),...h&&h>0?{minHeight:h}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(Mt,{content:q.caption})})]})]})},ne=g.useCallback(q=>{_(q.maxTextPx),J(q.maxCaptionPx)},[]);if(g.useLayoutEffect(()=>{if(!I){ne({maxTextPx:0,maxCaptionPx:0});return}const q=R.current;if(!q)return;const se=()=>{E.readTestimonialTextMeasure(q,ne)};se();const P=new ResizeObserver(se);return P.observe(q),()=>{P.disconnect()}},[I,ne,t]),!F)return a.jsx(a.Fragment,{});const ue=I?{textMinHeightPx:L,captionMinHeightPx:N}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:nl(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:E.scalingValue(m??0,n??!1),alignItems:B},children:[I&&a.jsx("div",{ref:R,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((q,se)=>a.jsx("div",{style:{width:"100%"},children:oe(q,{dataMeasureAttrs:!0})},se))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[H&&S&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:oe(H,ue)}),a.jsx("div",{className:he(`${r}-fade-item-current`,S?`${r}-fade-in`:void 0),children:oe(F,ue)})]})]}),ce.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:E.scalingValue(d??.02,n??!1),height:E.scalingValue(d??.02,n??!1),"--arrow-hover-color":b},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:f,disabled:!te,"aria-label":"Previous testimonial",children:ce.icon&&a.jsx(Xe,{url:ce.icon,fill:C,hoverFill:b,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:E.scalingValue(d??.02,n??!1),height:E.scalingValue(d??.02,n??!1),"--arrow-hover-color":b},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:O,disabled:!te,"aria-label":"Next testimonial",children:ce.icon&&a.jsx(Xe,{url:ce.icon,fill:C,hoverFill:b,className:`${r}-arrow-img`})})})]})]})})},rl=`import cn from 'classnames';
2857
+ `}const ol=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=_.useScopedStyles(),s=t||[],{autoplay:i,delay:u,align:l,width:m,imageMarginTop:c,textMarginTop:T,captionMarginTop:v,imageWidth:h,imageHeight:p,controlsWidth:d,controlsColor:C,controlsHoverColor:b}=e,x=i==="on"&&!o,[E,U]=g.useState(0),[k,A]=g.useState(null),[S,w]=g.useState(!1),R=g.useRef(null),V=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),H=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);g.useEffect(()=>{U(0),A(null),w(!1)},[s.length]);const j=s[E],M=k===null?null:s[k],z=D=>{var F,y,O,Y,J;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((F=e==null?void 0:e[`${D}FontSettings`])==null?void 0:F.fontWeight)??400,fontStyle:((y=e==null?void 0:e[`${D}FontSettings`])==null?void 0:y.fontStyle)??"normal"},textAppearance:{textTransform:((O=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:O.textTransform)??"none",textDecoration:((Y=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:Y.textDecoration)??"none",fontVariant:((J=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:J.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${D}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${D}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${D}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${D}WordSpacing`])??0,color:(e==null?void 0:e[`${D}Color`])??"#000000"}},K=z("text"),f=z("caption"),L=s.length>1&&s.some(D=>{var ce,F;return(((ce=D.text)==null?void 0:ce.length)??0)>0||(((F=D.caption)==null?void 0:F.length)??0)>0}),I=g.useRef(null),[P,$]=g.useState(0),[N,ee]=g.useState(0),ue=e.controls??{mode:"Off",icon:null},oe=s.length>1,me=g.useCallback((D,ce)=>!oe||ce===D?D:(R.current&&window.clearTimeout(R.current),A(D),w(!0),R.current=window.setTimeout(()=>{A(null),w(!1),R.current=null},300),ce),[oe]),W=g.useCallback(()=>{oe&&U(D=>me(D,(D-1+s.length)%s.length))},[oe,me,s.length]),B=g.useCallback(()=>{oe&&U(D=>me(D,(D+1)%s.length))},[oe,me,s.length]);g.useEffect(()=>{if(!x||!oe)return;const D=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),ce=window.setInterval(()=>{U(F=>me(F,(F+1)%s.length))},D);return()=>{window.clearInterval(ce)}},[x,oe,me,s.length,u]),g.useEffect(()=>()=>{R.current&&window.clearTimeout(R.current)},[]);const Q=(D,ce)=>{var Y,J,le,ae;const F=ce==null?void 0:ce.textMinHeightPx,y=ce==null?void 0:ce.captionMinHeightPx,O=ce==null?void 0:ce.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[D.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:_.scalingValue(T??0,n??!1)}}),a.jsx("div",{...O&&{"data-testimonial-measure":"text"},style:{...Pe(K,n),...F&&F>0?{minHeight:F}:{},textAlign:H,pointerEvents:"auto"},children:a.jsx(Mt,{content:D.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:_.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:_.scalingValue(h??0,n??!1),height:_.scalingValue(p??0,n??!1)},children:((Y=D.image)==null?void 0:Y.url)&&a.jsx("img",{src:(J=D.image)==null?void 0:J.url,alt:((le=D.image)==null?void 0:le.name)??"",className:`${r}-icon`,style:{objectFit:((ae=D.image)==null?void 0:ae.objectFit)||"contain"}})})]}),D.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:_.scalingValue(v??0,n??!1)}}),a.jsx("div",{...O?{"data-testimonial-measure":"caption"}:{},style:{...Pe(f,n),...y&&y>0?{minHeight:y}:{},textAlign:H,pointerEvents:"auto"},children:a.jsx(Mt,{content:D.caption})})]})]})},ne=g.useCallback(D=>{$(D.maxTextPx),ee(D.maxCaptionPx)},[]);if(g.useLayoutEffect(()=>{if(!L){ne({maxTextPx:0,maxCaptionPx:0});return}const D=I.current;if(!D)return;const ce=()=>{_.readTestimonialTextMeasure(D,ne)};ce();const F=new ResizeObserver(ce);return F.observe(D),()=>{F.disconnect()}},[L,ne,t]),!j)return a.jsx(a.Fragment,{});const se=L?{textMinHeightPx:P,captionMinHeightPx:N}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:nl(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:_.scalingValue(m??0,n??!1),alignItems:V},children:[L&&a.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((D,ce)=>a.jsx("div",{style:{width:"100%"},children:Q(D,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[M&&S&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:Q(M,se)}),a.jsx("div",{className:he(`${r}-fade-item-current`,S?`${r}-fade-in`:void 0),children:Q(j,se)})]})]}),ue.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:_.scalingValue(d??.02,n??!1),height:_.scalingValue(d??.02,n??!1),"--arrow-hover-color":b},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:W,disabled:!oe,"aria-label":"Previous testimonial",children:ue.icon&&a.jsx(Xe,{url:ue.icon,fill:C,hoverFill:b,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:_.scalingValue(d??.02,n??!1),height:_.scalingValue(d??.02,n??!1),"--arrow-hover-color":b},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:B,disabled:!oe,"aria-label":"Next testimonial",children:ue.icon&&a.jsx(Xe,{url:ue.icon,fill:C,hoverFill:b,className:`${r}-arrow-img`})})})]})]})})},rl=`import cn from 'classnames';
2832
2858
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2833
2859
  import { CommonComponentProps } from '../props';
2834
2860
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';