@cntrl-site/components 1.0.12-alpha.10 → 1.0.12-alpha.12

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 l=require("react/jsx-runtime"),p=require("react"),$e=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Qo=require("react-dom");function Zi(e){return e.type==="object"&&e.version===1}const Ji="ControlSlider-module__wrapper___sHEkd",Qi="ControlSlider-module__hoverArrow___A-dOH",ea="ControlSlider-module__sliderItem___QQSkR",ta="ControlSlider-module__sliderImage___9hRl-",na="ControlSlider-module__arrow___05ghY",ra="ControlSlider-module__arrowVertical___tBfVN",oa="ControlSlider-module__nextArrow___-30Yc",ia="ControlSlider-module__arrowInner___aEra3",aa="ControlSlider-module__arrowIcon___S4ztF",sa="ControlSlider-module__arrowImg___2dwJW",la="ControlSlider-module__mirror___brd6U",ca="ControlSlider-module__pagination___bicLF",da="ControlSlider-module__paginationInner___bT-P-",ua="ControlSlider-module__paginationVertical___zYqKw",pa="ControlSlider-module__paginationItem___nTRbk",ma="ControlSlider-module__dot___p1Qun",ga="ControlSlider-module__activeDot___LHFaj",ha="ControlSlider-module__paginationInsideBottom___R3FWn",fa="ControlSlider-module__paginationInsideTop___V-qb-",ya="ControlSlider-module__paginationOutsideBottom___14w8D",va="ControlSlider-module__paginationOutsideTop___SCLqB",ba="ControlSlider-module__paginationInsideLeft___yOBRZ",xa="ControlSlider-module__paginationInsideRight___Rtt3o",Ca="ControlSlider-module__paginationOutsideLeft___lahaw",Sa="ControlSlider-module__paginationOutsideRight___EtuQa",wa="ControlSlider-module__imgWrapper___UjEgB",$a="ControlSlider-module__captionBlock___dJ6-j",Ta="ControlSlider-module__captionTextWrapper___HFlpf",La="ControlSlider-module__captionText___uGBVc",Ea="ControlSlider-module__active___WZK4G",Pa="ControlSlider-module__withPointerEvents___t-18M",_a="ControlSlider-module__topLeftAlignment___zjnGM",Aa="ControlSlider-module__topCenterAlignment___gD1xW",Ra="ControlSlider-module__topRightAlignment___NMapS",Wa="ControlSlider-module__middleLeftAlignment___OnUrY",Ia="ControlSlider-module__middleCenterAlignment___Tdkl0",ka="ControlSlider-module__middleRightAlignment___wEbfX",Fa="ControlSlider-module__bottomLeftAlignment___cTP2-",Ma="ControlSlider-module__bottomCenterAlignment___c54fB",Ha="ControlSlider-module__bottomRightAlignment___kEwrz",Na="ControlSlider-module__clickOverlay___DZA28",Ba="ControlSlider-module__contain___pLyq7",Oa="ControlSlider-module__cover___KdDat",ae={wrapper:Ji,hoverArrow:Qi,sliderItem:ea,sliderImage:ta,arrow:na,arrowVertical:ra,nextArrow:oa,arrowInner:ia,arrowIcon:aa,arrowImg:sa,mirror:la,pagination:ca,paginationInner:da,paginationVertical:ua,paginationItem:pa,dot:ma,activeDot:ga,paginationInsideBottom:ha,paginationInsideTop:fa,paginationOutsideBottom:ya,paginationOutsideTop:va,paginationInsideLeft:ba,paginationInsideRight:xa,paginationOutsideLeft:Ca,paginationOutsideRight:Sa,imgWrapper:wa,captionBlock:$a,captionTextWrapper:Ta,captionText:La,active:Ea,withPointerEvents:Pa,topLeftAlignment:_a,topCenterAlignment:Aa,topRightAlignment:Ra,middleLeftAlignment:Wa,middleCenterAlignment:Ia,middleRightAlignment:ka,bottomLeftAlignment:Fa,bottomCenterAlignment:Ma,bottomRightAlignment:Ha,clickOverlay:Na,contain:Ba,cover:Oa};function Va(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Da(e,t,n){return t&&Va(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var fo="(prefers-reduced-motion: reduce)",Qt=1,ja=2,nn=3,cn=4,En=5,qn=6,Qn=7,za={CREATED:Qt,MOUNTED:ja,IDLE:nn,MOVING:cn,SCROLLING:En,DRAGGING:qn,DESTROYED:Qn};function bt(e){e.length=0}function At(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(At(arguments,1)))}var ei=setTimeout,Ar=function(){};function yo(e){return requestAnimationFrame(e)}function ir(e,t){return typeof t===e}function fn(e){return!Vr(e)&&ir("object",e)}var Or=Array.isArray,ti=Ae(ir,"function"),Et=Ae(ir,"string"),Pn=Ae(ir,"undefined");function Vr(e){return e===null}function ni(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function _n(e){return Or(e)?e:[e]}function tt(e,t){_n(e).forEach(t)}function Dr(e,t){return e.indexOf(t)>-1}function Un(e,t){return e.push.apply(e,_n(t)),e}function ht(e,t,n){e&&tt(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function lt(e,t){ht(e,Et(t)?t.split(" "):t,!0)}function An(e,t){tt(t,e.appendChild.bind(e))}function jr(e,t){tt(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function yn(e,t){return ni(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ri(e,t){var n=e?At(e.children):[];return t?n.filter(function(r){return yn(r,t)}):n}function Rn(e,t){return t?ri(e,t)[0]:e.firstElementChild}var vn=Object.keys;function Vt(e,t,n){return e&&(n?vn(e).reverse():vn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function bn(e){return At(arguments,1).forEach(function(t){Vt(t,function(n,r){e[r]=t[r]})}),e}function Tt(e){return At(arguments,1).forEach(function(t){Vt(t,function(n,r){Or(n)?e[r]=n.slice():fn(n)?e[r]=Tt({},fn(e[r])?e[r]:{},n):e[r]=n})}),e}function vo(e,t){tt(t||vn(e),function(n){delete e[n]})}function ct(e,t){tt(e,function(n){tt(t,function(r){n&&n.removeAttribute(r)})})}function me(e,t,n){fn(t)?Vt(t,function(r,o){me(e,o,r)}):tt(e,function(r){Vr(n)||n===""?ct(r,t):r.setAttribute(t,String(n))})}function en(e,t,n){var r=document.createElement(e);return t&&(Et(t)?lt(r,t):me(r,t)),n&&An(n,r),r}function rt(e,t,n){if(Pn(n))return getComputedStyle(e)[t];Vr(n)||(e.style[t]=""+n)}function xn(e,t){rt(e,"display",t)}function oi(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function ot(e,t){return e.getAttribute(t)}function bo(e,t){return e&&e.classList.contains(t)}function Je(e){return e.getBoundingClientRect()}function Dt(e){tt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ii(e){return Rn(new DOMParser().parseFromString(e,"text/html").body)}function gt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ai(e,t){return e&&e.querySelector(t)}function zr(e,t){return t?At(e.querySelectorAll(t)):[]}function ft(e,t){ht(e,t,!1)}function Rr(e){return e.timeStamp}function Ht(e){return Et(e)?e:e?e+"px":""}var Wn="splide",Kr="data-"+Wn;function gn(e,t){if(!e)throw new Error("["+Wn+"] "+(t||""))}var Pt=Math.min,er=Math.max,tr=Math.floor,Cn=Math.ceil,Ue=Math.abs;function si(e,t,n){return Ue(e-t)<n}function Gn(e,t,n,r){var o=Pt(t,n),a=er(t,n);return r?o<e&&e<a:o<=e&&e<=a}function Xt(e,t,n){var r=Pt(t,n),o=er(t,n);return Pt(er(r,e),o)}function Wr(e){return+(e>0)-+(e<0)}function Ir(e,t){return tt(t,function(n){e=e.replace("%s",""+n)}),e}function qr(e){return e<10?"0"+e:""+e}var xo={};function Ka(e){return""+e+qr(xo[e]=(xo[e]||0)+1)}function li(){var e=[];function t(i,c,s,d){o(i,c,function(u,P,y){var x="addEventListener"in u,h=x?u.removeEventListener.bind(u,P,s,d):u.removeListener.bind(u,s);x?u.addEventListener(P,s,d):u.addListener(s),e.push([u,P,y,s,h])})}function n(i,c,s){o(i,c,function(d,u,P){e=e.filter(function(y){return y[0]===d&&y[1]===u&&y[2]===P&&(!s||y[3]===s)?(y[4](),!1):!0})})}function r(i,c,s){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:u,detail:s}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,u,!1,s)),i.dispatchEvent(d),d}function o(i,c,s){tt(i,function(d){d&&tt(c,function(u){u.split(" ").forEach(function(P){var y=P.split(".");s(d,y[0],y[1])})})})}function a(){e.forEach(function(i){i[4]()}),bt(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var Rt="mounted",kr="ready",xt="move",dn="moved",Ur="click",ci="active",di="inactive",ui="visible",pi="hidden",Ne="refresh",Ke="updated",rn="resize",ar="resized",mi="drag",gi="dragging",hi="dragged",sr="scroll",zt="scrolled",qa="overflow",Gr="destroy",fi="arrows:mounted",yi="arrows:updated",vi="pagination:mounted",bi="pagination:updated",Yr="navigation:mounted",Xr="autoplay:play",xi="autoplay:playing",Zr="autoplay:pause",Jr="lazyload:loaded",Ci="sk",Si="sh",nr="ei";function ke(e){var t=e?e.event.bus:document.createDocumentFragment(),n=li();function r(a,i){n.bind(t,_n(a).join(" "),function(c){i.apply(i,Or(c.detail)?c.detail:[])})}function o(a){n.dispatch(t,a,At(arguments,1))}return e&&e.event.on(Gr,n.destroy),bn(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:o})}function lr(e,t,n,r){var o=Date.now,a,i=0,c,s=!0,d=0;function u(){if(!s){if(i=e?Pt((o()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=o(),r&&++d>=r))return y();c=yo(u)}}function P(v){v||h(),a=o()-(v?i*e:0),s=!1,c=yo(u)}function y(){s=!0}function x(){a=o(),i=0,n&&n(i)}function h(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function b(v){e=v}function L(){return s}return{start:P,rewind:x,pause:y,cancel:h,set:b,isPaused:L}}function Ua(e){var t=e;function n(o){t=o}function r(o){return Dr(_n(o),t)}return{set:n,is:r}}function Ga(e,t){var n=lr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Ya(e,t,n){var r=e.state,o=n.breakpoints||{},a=n.reducedMotion||{},i=li(),c=[];function s(){var h=n.mediaQuery==="min";vn(o).sort(function(b,L){return h?+b-+L:+L-+b}).forEach(function(b){u(o[b],"("+(h?"min":"max")+"-width:"+b+"px)")}),u(a,fo),P()}function d(h){h&&i.destroy()}function u(h,b){var L=matchMedia(b);i.bind(L,"change",P),c.push([h,L])}function P(){var h=r.is(Qn),b=n.direction,L=c.reduce(function(v,S){return Tt(v,S[1].matches?S[0]:{})},{});vo(n),x(L),n.destroy?e.destroy(n.destroy==="completely"):h?(d(!0),e.mount()):b!==n.direction&&e.refresh()}function y(h){matchMedia(fo).matches&&(h?Tt(n,a):vo(n,vn(a)))}function x(h,b,L){Tt(n,h),b&&Tt(Object.getPrototypeOf(n),h),(L||!r.is(Qt))&&e.emit(Ke,n)}return{setup:s,destroy:d,reduce:y,set:x}}var cr="Arrow",dr=cr+"Left",ur=cr+"Right",wi=cr+"Up",$i=cr+"Down",Co="rtl",pr="ttb",br={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[wi,ur],ArrowRight:[$i,dr]};function Xa(e,t,n){function r(a,i,c){c=c||n.direction;var s=c===Co&&!i?1:c===pr?0:-1;return br[a]&&br[a][s]||a.replace(/width|left|right/i,function(d,u){var P=br[d.toLowerCase()][s]||d;return u>0?P.charAt(0).toUpperCase()+P.slice(1):P})}function o(a){return a*(n.direction===Co?1:-1)}return{resolve:r,orient:o}}var yt="role",tn="tabindex",Za="disabled",it="aria-",In=it+"controls",Ti=it+"current",So=it+"selected",Qe=it+"label",Qr=it+"labelledby",Li=it+"hidden",eo=it+"orientation",Sn=it+"roledescription",wo=it+"live",$o=it+"busy",To=it+"atomic",to=[yt,tn,Za,In,Ti,Qe,Qr,Li,eo,Sn],dt=Wn+"__",Wt="is-",xr=Wn,Lo=dt+"track",Ja=dt+"list",mr=dt+"slide",Ei=mr+"--clone",Qa=mr+"__container",no=dt+"arrows",gr=dt+"arrow",Pi=gr+"--prev",_i=gr+"--next",hr=dt+"pagination",Ai=hr+"__page",es=dt+"progress",ts=es+"__bar",ns=dt+"toggle",rs=dt+"spinner",os=dt+"sr",is=Wt+"initialized",jt=Wt+"active",Ri=Wt+"prev",Wi=Wt+"next",Fr=Wt+"visible",Mr=Wt+"loading",Ii=Wt+"focus-in",ki=Wt+"overflow",as=[jt,Fr,Ri,Wi,Mr,Ii,ki],ss={slide:mr,clone:Ei,arrows:no,arrow:gr,prev:Pi,next:_i,pagination:hr,page:Ai,spinner:rs};function ls(e,t){if(ti(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!yn(n,t);)n=n.parentElement;return n}var cs=5,Eo=200,Fi="touchstart mousedown",Cr="touchmove mousemove",Sr="touchend touchcancel mouseup click";function ds(e,t,n){var r=ke(e),o=r.on,a=r.bind,i=e.root,c=n.i18n,s={},d=[],u=[],P=[],y,x,h;function b(){f(),B(),S()}function L(){o(Ne,v),o(Ne,b),o(Ke,S),a(document,Fi+" keydown",function($){h=$.type==="keydown"},{capture:!0}),a(i,"focusin",function(){ht(i,Ii,!!h)})}function v($){var A=to.concat("style");bt(d),ft(i,u),ft(y,P),ct([y,x],A),ct(i,$?A:["style",Sn])}function S(){ft(i,u),ft(y,P),u=_(xr),P=_(Lo),lt(i,u),lt(y,P),me(i,Qe,n.label),me(i,Qr,n.labelledby)}function f(){y=N("."+Lo),x=Rn(y,"."+Ja),gn(y&&x,"A track/list element is missing."),Un(d,ri(x,"."+mr+":not(."+Ei+")")),Vt({arrows:no,pagination:hr,prev:Pi,next:_i,bar:ts,toggle:ns},function($,A){s[A]=N("."+$)}),bn(s,{root:i,track:y,list:x,slides:d})}function B(){var $=i.id||Ka(Wn),A=n.role;i.id=$,y.id=y.id||$+"-track",x.id=x.id||$+"-list",!ot(i,yt)&&i.tagName!=="SECTION"&&A&&me(i,yt,A),me(i,Sn,c.carousel),me(x,yt,"presentation")}function N($){var A=ai(i,$);return A&&ls(A,"."+xr)===i?A:void 0}function _($){return[$+"--"+n.type,$+"--"+n.direction,n.drag&&$+"--draggable",n.isNavigation&&$+"--nav",$===xr&&jt]}return bn(s,{setup:b,mount:L,destroy:v})}var on="slide",un="loop",kn="fade";function us(e,t,n,r){var o=ke(e),a=o.on,i=o.emit,c=o.bind,s=e.Components,d=e.root,u=e.options,P=u.isNavigation,y=u.updateOnMove,x=u.i18n,h=u.pagination,b=u.slideFocus,L=s.Direction.resolve,v=ot(r,"style"),S=ot(r,Qe),f=n>-1,B=Rn(r,"."+Qa),N;function _(){f||(r.id=d.id+"-slide"+qr(t+1),me(r,yt,h?"tabpanel":"group"),me(r,Sn,x.slide),me(r,Qe,S||Ir(x.slideLabel,[t+1,e.length]))),$()}function $(){c(r,"click",Ae(i,Ur,R)),c(r,"keydown",Ae(i,Ci,R)),a([dn,Si,zt],C),a(Yr,T),y&&a(xt,D)}function A(){N=!0,o.destroy(),ft(r,as),ct(r,to),me(r,"style",v),me(r,Qe,S||"")}function T(){var H=e.splides.map(function(I){var k=I.splide.Components.Slides.getAt(t);return k?k.slide.id:""}).join(" ");me(r,Qe,Ir(x.slideX,(f?n:t)+1)),me(r,In,H),me(r,yt,b?"button":""),b&&ct(r,Sn)}function D(){N||C()}function C(){if(!N){var H=e.index;O(),V(),ht(r,Ri,t===H-1),ht(r,Wi,t===H+1)}}function O(){var H=U();H!==bo(r,jt)&&(ht(r,jt,H),me(r,Ti,P&&H||""),i(H?ci:di,R))}function V(){var H=w(),I=!H&&(!U()||f);if(e.state.is([cn,En])||me(r,Li,I||""),me(zr(r,u.focusableNodes||""),tn,I?-1:""),b&&me(r,tn,I?-1:0),H!==bo(r,Fr)&&(ht(r,Fr,H),i(H?ui:pi,R)),!H&&document.activeElement===r){var k=s.Slides.getAt(e.index);k&&oi(k.slide)}}function J(H,I,k){rt(k&&B||r,H,I)}function U(){var H=e.index;return H===t||u.cloneStatus&&H===n}function w(){if(e.is(kn))return U();var H=Je(s.Elements.track),I=Je(r),k=L("left",!0),te=L("right",!0);return tr(H[k])<=Cn(I[k])&&tr(I[te])<=Cn(H[te])}function M(H,I){var k=Ue(H-t);return!f&&(u.rewind||e.is(un))&&(k=Pt(k,e.length-k)),k<=I}var R={index:t,slideIndex:n,slide:r,container:B,isClone:f,mount:_,destroy:A,update:C,style:J,isWithin:M};return R}function ps(e,t,n){var r=ke(e),o=r.on,a=r.emit,i=r.bind,c=t.Elements,s=c.slides,d=c.list,u=[];function P(){y(),o(Ne,x),o(Ne,y)}function y(){s.forEach(function(C,O){b(C,O,-1)})}function x(){N(function(C){C.destroy()}),bt(u)}function h(){N(function(C){C.update()})}function b(C,O,V){var J=us(e,O,V,C);J.mount(),u.push(J),u.sort(function(U,w){return U.index-w.index})}function L(C){return C?_(function(O){return!O.isClone}):u}function v(C){var O=t.Controller,V=O.toIndex(C),J=O.hasFocus()?1:n.perPage;return _(function(U){return Gn(U.index,V,V+J-1)})}function S(C){return _(C)[0]}function f(C,O){tt(C,function(V){if(Et(V)&&(V=ii(V)),ni(V)){var J=s[O];J?jr(V,J):An(d,V),lt(V,n.classes.slide),A(V,Ae(a,rn))}}),a(Ne)}function B(C){Dt(_(C).map(function(O){return O.slide})),a(Ne)}function N(C,O){L(O).forEach(C)}function _(C){return u.filter(ti(C)?C:function(O){return Et(C)?yn(O.slide,C):Dr(_n(C),O.index)})}function $(C,O,V){N(function(J){J.style(C,O,V)})}function A(C,O){var V=zr(C,"img"),J=V.length;J?V.forEach(function(U){i(U,"load error",function(){--J||O()})}):O()}function T(C){return C?s.length:u.length}function D(){return u.length>n.perPage}return{mount:P,destroy:x,update:h,register:b,get:L,getIn:v,getAt:S,add:f,remove:B,forEach:N,filter:_,style:$,getLength:T,isEnough:D}}function ms(e,t,n){var r=ke(e),o=r.on,a=r.bind,i=r.emit,c=t.Slides,s=t.Direction.resolve,d=t.Elements,u=d.root,P=d.track,y=d.list,x=c.getAt,h=c.style,b,L,v;function S(){f(),a(window,"resize load",Ga(Ae(i,rn))),o([Ke,Ne],f),o(rn,B)}function f(){b=n.direction===pr,rt(u,"maxWidth",Ht(n.width)),rt(P,s("paddingLeft"),N(!1)),rt(P,s("paddingRight"),N(!0)),B(!0)}function B(R){var H=Je(u);(R||L.width!==H.width||L.height!==H.height)&&(rt(P,"height",_()),h(s("marginRight"),Ht(n.gap)),h("width",A()),h("height",T(),!0),L=H,i(ar),v!==(v=M())&&(ht(u,ki,v),i(qa,v)))}function N(R){var H=n.padding,I=s(R?"right":"left");return H&&Ht(H[I]||(fn(H)?0:H))||"0px"}function _(){var R="";return b&&(R=$(),gn(R,"height or heightRatio is missing."),R="calc("+R+" - "+N(!1)+" - "+N(!0)+")"),R}function $(){return Ht(n.height||Je(y).width*n.heightRatio)}function A(){return n.autoWidth?null:Ht(n.fixedWidth)||(b?"":D())}function T(){return Ht(n.fixedHeight)||(b?n.autoHeight?null:D():$())}function D(){var R=Ht(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function C(){return Je(y)[s("width")]}function O(R,H){var I=x(R||0);return I?Je(I.slide)[s("width")]+(H?0:U()):0}function V(R,H){var I=x(R);if(I){var k=Je(I.slide)[s("right")],te=Je(y)[s("left")];return Ue(k-te)+(H?0:U())}return 0}function J(R){return V(e.length-1)-V(0)+O(0,R)}function U(){var R=x(0);return R&&parseFloat(rt(R.slide,s("marginRight")))||0}function w(R){return parseFloat(rt(P,s("padding"+(R?"Right":"Left"))))||0}function M(){return e.is(kn)||J(!0)>C()}return{mount:S,resize:B,listSize:C,slideSize:O,sliderSize:J,totalSize:V,getPadding:w,isOverflow:M}}var gs=2;function hs(e,t,n){var r=ke(e),o=r.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,s=[],d;function u(){o(Ne,P),o([Ke,rn],x),(d=L())&&(h(d),t.Layout.resize(!0))}function P(){y(),u()}function y(){Dt(s),bt(s),r.destroy()}function x(){var v=L();d!==v&&(d<v||!v)&&r.emit(Ne)}function h(v){var S=i.get().slice(),f=S.length;if(f){for(;S.length<v;)Un(S,S);Un(S.slice(-v),S.slice(0,v)).forEach(function(B,N){var _=N<v,$=b(B.slide,N);_?jr($,S[0].slide):An(a.list,$),Un(s,$),i.register($,N-v+(_?0:f),B.index)})}}function b(v,S){var f=v.cloneNode(!0);return lt(f,n.classes.clone),f.id=e.root.id+"-clone"+qr(S+1),f}function L(){var v=n.clones;if(!e.is(un))v=0;else if(Pn(v)){var S=n[c("fixedWidth")]&&t.Layout.slideSize(0),f=S&&Cn(Je(a.track)[c("width")]/S);v=f||n[c("autoWidth")]&&e.length||n.perPage*gs}return v}return{mount:u,destroy:y}}function fs(e,t,n){var r=ke(e),o=r.on,a=r.emit,i=e.state.set,c=t.Layout,s=c.slideSize,d=c.getPadding,u=c.totalSize,P=c.listSize,y=c.sliderSize,x=t.Direction,h=x.resolve,b=x.orient,L=t.Elements,v=L.list,S=L.track,f;function B(){f=t.Transition,o([Rt,ar,Ke,Ne],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),$(e.index),t.Slides.update())}function _(I,k,te,oe){I!==k&&R(I>te)&&(C(),A(D(J(),I>te),!0)),i(cn),a(xt,k,te,I),f.start(k,function(){i(nn),a(dn,k,te,I),oe&&oe()})}function $(I){A(V(I,!0))}function A(I,k){if(!e.is(kn)){var te=k?I:T(I);rt(v,"transform","translate"+h("X")+"("+te+"px)"),I!==te&&a(Si)}}function T(I){if(e.is(un)){var k=O(I),te=k>t.Controller.getEnd(),oe=k<0;(oe||te)&&(I=D(I,te))}return I}function D(I,k){var te=I-M(k),oe=y();return I-=b(oe*(Cn(Ue(te)/oe)||1))*(k?1:-1),I}function C(){A(J(),!0),f.cancel()}function O(I){for(var k=t.Slides.get(),te=0,oe=1/0,ce=0;ce<k.length;ce++){var q=k[ce].index,F=Ue(V(q,!0)-I);if(F<=oe)oe=F,te=q;else break}return te}function V(I,k){var te=b(u(I-1)-w(I));return k?U(te):te}function J(){var I=h("left");return Je(v)[I]-Je(S)[I]+b(d(!1))}function U(I){return n.trimSpace&&e.is(on)&&(I=Xt(I,0,b(y(!0)-P()))),I}function w(I){var k=n.focus;return k==="center"?(P()-s(I,!0))/2:+k*s(I)||0}function M(I){return V(I?t.Controller.getEnd():0,!!n.trimSpace)}function R(I){var k=b(D(J(),I));return I?k>=0:k<=v[h("scrollWidth")]-Je(S)[h("width")]}function H(I,k){k=Pn(k)?J():k;var te=I!==!0&&b(k)<b(M(!1)),oe=I!==!1&&b(k)>b(M(!0));return te||oe}return{mount:B,move:_,jump:$,translate:A,shift:D,cancel:C,toIndex:O,toPosition:V,getPosition:J,getLimit:M,exceededLimit:H,reposition:N}}function ys(e,t,n){var r=ke(e),o=r.on,a=r.emit,i=t.Move,c=i.getPosition,s=i.getLimit,d=i.toPosition,u=t.Slides,P=u.isEnough,y=u.getLength,x=n.omitEnd,h=e.is(un),b=e.is(on),L=Ae(J,!1),v=Ae(J,!0),S=n.start||0,f,B=S,N,_,$;function A(){T(),o([Ke,Ne,nr],T),o(ar,D)}function T(){N=y(!0),_=n.perMove,$=n.perPage,f=R();var F=Xt(S,0,x?f:N-1);F!==S&&(S=F,i.reposition())}function D(){f!==R()&&a(nr)}function C(F,ne,xe){if(!q()){var ge=V(F),he=M(ge);he>-1&&(ne||he!==S)&&(te(he),i.move(ge,he,B,xe))}}function O(F,ne,xe,ge){t.Scroll.scroll(F,ne,xe,function(){var he=M(i.toIndex(c()));te(x?Pt(he,f):he),ge&&ge()})}function V(F){var ne=S;if(Et(F)){var xe=F.match(/([+\-<>])(\d+)?/)||[],ge=xe[1],he=xe[2];ge==="+"||ge==="-"?ne=U(S+ +(""+ge+(+he||1)),S):ge===">"?ne=he?H(+he):L(!0):ge==="<"&&(ne=v(!0))}else ne=h?F:Xt(F,0,f);return ne}function J(F,ne){var xe=_||(ce()?1:$),ge=U(S+xe*(F?-1:1),S,!(_||ce()));return ge===-1&&b&&!si(c(),s(!F),1)?F?0:f:ne?ge:M(ge)}function U(F,ne,xe){if(P()||ce()){var ge=w(F);ge!==F&&(ne=F,F=ge,xe=!1),F<0||F>f?!_&&(Gn(0,F,ne,!0)||Gn(f,ne,F,!0))?F=H(I(F)):h?F=xe?F<0?-(N%$||$):N:F:n.rewind?F=F<0?f:0:F=-1:xe&&F!==ne&&(F=H(I(ne)+(F<ne?-1:1)))}else F=-1;return F}function w(F){if(b&&n.trimSpace==="move"&&F!==S)for(var ne=c();ne===d(F,!0)&&Gn(F,0,e.length-1,!n.rewind);)F<S?--F:++F;return F}function M(F){return h?(F+N)%N||0:F}function R(){for(var F=N-(ce()||h&&_?1:$);x&&F-- >0;)if(d(N-1,!0)!==d(F,!0)){F++;break}return Xt(F,0,N-1)}function H(F){return Xt(ce()?F:$*F,0,f)}function I(F){return ce()?Pt(F,f):tr((F>=f?N-1:F)/$)}function k(F){var ne=i.toIndex(F);return b?Xt(ne,0,f):ne}function te(F){F!==S&&(B=S,S=F)}function oe(F){return F?B:S}function ce(){return!Pn(n.focus)||n.isNavigation}function q(){return e.state.is([cn,En])&&!!n.waitForTransition}return{mount:A,go:C,scroll:O,getNext:L,getPrev:v,getAdjacent:J,getEnd:R,setIndex:te,getIndex:oe,toIndex:H,toPage:I,toDest:k,hasFocus:ce,isBusy:q}}var vs="http://www.w3.org/2000/svg",bs="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",Bn=40;function xs(e,t,n){var r=ke(e),o=r.on,a=r.bind,i=r.emit,c=n.classes,s=n.i18n,d=t.Elements,u=t.Controller,P=d.arrows,y=d.track,x=P,h=d.prev,b=d.next,L,v,S={};function f(){N(),o(Ke,B)}function B(){_(),f()}function N(){var O=n.arrows;O&&!(h&&b)&&T(),h&&b&&(bn(S,{prev:h,next:b}),xn(x,O?"":"none"),lt(x,v=no+"--"+n.direction),O&&($(),C(),me([h,b],In,y.id),i(fi,h,b)))}function _(){r.destroy(),ft(x,v),L?(Dt(P?[h,b]:x),h=b=null):ct([h,b],to)}function $(){o([Rt,dn,Ne,zt,nr],C),a(b,"click",Ae(A,">")),a(h,"click",Ae(A,"<"))}function A(O){u.go(O,!0)}function T(){x=P||en("div",c.arrows),h=D(!0),b=D(!1),L=!0,An(x,[h,b]),!P&&jr(x,y)}function D(O){var V='<button class="'+c.arrow+" "+(O?c.prev:c.next)+'" type="button"><svg xmlns="'+vs+'" viewBox="0 0 '+Bn+" "+Bn+'" width="'+Bn+'" height="'+Bn+'" focusable="false"><path d="'+(n.arrowPath||bs)+'" />';return ii(V)}function C(){if(h&&b){var O=e.index,V=u.getPrev(),J=u.getNext(),U=V>-1&&O<V?s.last:s.prev,w=J>-1&&O>J?s.first:s.next;h.disabled=V<0,b.disabled=J<0,me(h,Qe,U),me(b,Qe,w),i(yi,h,b,V,J)}}return{arrows:S,mount:f,destroy:_,update:C}}var Cs=Kr+"-interval";function Ss(e,t,n){var r=ke(e),o=r.on,a=r.bind,i=r.emit,c=lr(n.interval,e.go.bind(e,">"),$),s=c.isPaused,d=t.Elements,u=t.Elements,P=u.root,y=u.toggle,x=n.autoplay,h,b,L=x==="pause";function v(){x&&(S(),y&&me(y,In,d.track.id),L||f(),_())}function S(){n.pauseOnHover&&a(P,"mouseenter mouseleave",function(T){h=T.type==="mouseenter",N()}),n.pauseOnFocus&&a(P,"focusin focusout",function(T){b=T.type==="focusin",N()}),y&&a(y,"click",function(){L?f():B(!0)}),o([xt,sr,Ne],c.rewind),o(xt,A)}function f(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),b=h=L=!1,_(),i(Xr))}function B(T){T===void 0&&(T=!0),L=!!T,_(),s()||(c.pause(),i(Zr))}function N(){L||(h||b?B(!1):f())}function _(){y&&(ht(y,jt,!L),me(y,Qe,n.i18n[L?"play":"pause"]))}function $(T){var D=d.bar;D&&rt(D,"width",T*100+"%"),i(xi,T)}function A(T){var D=t.Slides.getAt(T);c.set(D&&+ot(D.slide,Cs)||n.interval)}return{mount:v,destroy:c.cancel,play:f,pause:B,isPaused:s}}function ws(e,t,n){var r=ke(e),o=r.on;function a(){n.cover&&(o(Jr,Ae(c,!0)),o([Rt,Ke,Ne],Ae(i,!0)))}function i(s){t.Slides.forEach(function(d){var u=Rn(d.container||d.slide,"img");u&&u.src&&c(s,u,d)})}function c(s,d,u){u.style("background",s?'center/cover no-repeat url("'+d.src+'")':"",!0),xn(d,s?"none":"")}return{mount:a,destroy:Ae(i,!1)}}var $s=10,Ts=600,Ls=.6,Es=1.5,Ps=800;function _s(e,t,n){var r=ke(e),o=r.on,a=r.emit,i=e.state.set,c=t.Move,s=c.getPosition,d=c.getLimit,u=c.exceededLimit,P=c.translate,y=e.is(on),x,h,b=1;function L(){o(xt,B),o([Ke,Ne],N)}function v($,A,T,D,C){var O=s();if(B(),T&&(!y||!u())){var V=t.Layout.sliderSize(),J=Wr($)*V*tr(Ue($)/V)||0;$=c.toPosition(t.Controller.toDest($%V))+J}var U=si(O,$,1);b=1,A=U?0:A||er(Ue($-O)/Es,Ps),h=D,x=lr(A,S,Ae(f,O,$,C),1),i(En),a(sr),x.start()}function S(){i(nn),h&&h(),a(zt)}function f($,A,T,D){var C=s(),O=$+(A-$)*_(D),V=(O-C)*b;P(C+V),y&&!T&&u()&&(b*=Ls,Ue(V)<$s&&v(d(u(!0)),Ts,!1,h,!0))}function B(){x&&x.cancel()}function N(){x&&!x.isPaused()&&(B(),S())}function _($){var A=n.easingFunc;return A?A($):1-Math.pow(1-$,4)}return{mount:L,destroy:B,scroll:v,cancel:N}}var Zt={passive:!1,capture:!0};function As(e,t,n){var r=ke(e),o=r.on,a=r.emit,i=r.bind,c=r.unbind,s=e.state,d=t.Move,u=t.Scroll,P=t.Controller,y=t.Elements.track,x=t.Media.reduce,h=t.Direction,b=h.resolve,L=h.orient,v=d.getPosition,S=d.exceededLimit,f,B,N,_,$,A=!1,T,D,C;function O(){i(y,Cr,Ar,Zt),i(y,Sr,Ar,Zt),i(y,Fi,J,Zt),i(y,"click",M,{capture:!0}),i(y,"dragstart",gt),o([Rt,Ke],V)}function V(){var m=n.drag;He(!m),_=m==="free"}function J(m){if(T=!1,!D){var g=he(m);ge(m.target)&&(g||!m.button)&&(P.isBusy()?gt(m,!0):(C=g?y:window,$=s.is([cn,En]),N=null,i(C,Cr,U,Zt),i(C,Sr,w,Zt),d.cancel(),u.cancel(),R(m)))}}function U(m){if(s.is(qn)||(s.set(qn),a(mi)),m.cancelable)if($){d.translate(f+xe(ce(m)));var g=q(m)>Eo,W=A!==(A=S());(g||W)&&R(m),T=!0,a(gi),gt(m)}else k(m)&&($=I(m),gt(m))}function w(m){s.is(qn)&&(s.set(nn),a(hi)),$&&(H(m),gt(m)),c(C,Cr,U),c(C,Sr,w),$=!1}function M(m){!D&&T&&gt(m,!0)}function R(m){N=B,B=m,f=v()}function H(m){var g=te(m),W=oe(g),K=n.rewind&&n.rewindByDrag;x(!1),_?P.scroll(W,0,n.snap):e.is(kn)?P.go(L(Wr(g))<0?K?"<":"-":K?">":"+"):e.is(on)&&A&&K?P.go(S(!0)?">":"<"):P.go(P.toDest(W),!0),x(!0)}function I(m){var g=n.dragMinThreshold,W=fn(g),K=W&&g.mouse||0,Z=(W?g.touch:+g)||10;return Ue(ce(m))>(he(m)?Z:K)}function k(m){return Ue(ce(m))>Ue(ce(m,!0))}function te(m){if(e.is(un)||!A){var g=q(m);if(g&&g<Eo)return ce(m)/g}return 0}function oe(m){return v()+Wr(m)*Pt(Ue(m)*(n.flickPower||600),_?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ce(m,g){return ne(m,g)-ne(F(m),g)}function q(m){return Rr(m)-Rr(F(m))}function F(m){return B===m&&N||B}function ne(m,g){return(he(m)?m.changedTouches[0]:m)["page"+b(g?"Y":"X")]}function xe(m){return m/(A&&e.is(on)?cs:1)}function ge(m){var g=n.noDrag;return!yn(m,"."+Ai+", ."+gr)&&(!g||!yn(m,g))}function he(m){return typeof TouchEvent<"u"&&m instanceof TouchEvent}function Le(){return $}function He(m){D=m}return{mount:O,disable:He,isDragging:Le}}var Rs={Spacebar:" ",Right:ur,Left:dr,Up:wi,Down:$i};function ro(e){return e=Et(e)?e:e.key,Rs[e]||e}var Po="keydown";function Ws(e,t,n){var r=ke(e),o=r.on,a=r.bind,i=r.unbind,c=e.root,s=t.Direction.resolve,d,u;function P(){y(),o(Ke,x),o(Ke,y),o(xt,b)}function y(){var v=n.keyboard;v&&(d=v==="global"?window:c,a(d,Po,L))}function x(){i(d,Po)}function h(v){u=v}function b(){var v=u;u=!0,ei(function(){u=v})}function L(v){if(!u){var S=ro(v);S===s(dr)?e.go("<"):S===s(ur)&&e.go(">")}}return{mount:P,destroy:x,disable:h}}var hn=Kr+"-lazy",Yn=hn+"-srcset",Is="["+hn+"], ["+Yn+"]";function ks(e,t,n){var r=ke(e),o=r.on,a=r.off,i=r.bind,c=r.emit,s=n.lazyLoad==="sequential",d=[dn,zt],u=[];function P(){n.lazyLoad&&(y(),o(Ne,y))}function y(){bt(u),x(),s?v():(a(d),o(d,h),h())}function x(){t.Slides.forEach(function(S){zr(S.slide,Is).forEach(function(f){var B=ot(f,hn),N=ot(f,Yn);if(B!==f.src||N!==f.srcset){var _=n.classes.spinner,$=f.parentElement,A=Rn($,"."+_)||en("span",_,$);u.push([f,S,A]),f.src||xn(f,"none")}})})}function h(){u=u.filter(function(S){var f=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,f)?b(S):!0}),u.length||a(d)}function b(S){var f=S[0];lt(S[1].slide,Mr),i(f,"load error",Ae(L,S)),me(f,"src",ot(f,hn)),me(f,"srcset",ot(f,Yn)),ct(f,hn),ct(f,Yn)}function L(S,f){var B=S[0],N=S[1];ft(N.slide,Mr),f.type!=="error"&&(Dt(S[2]),xn(B,""),c(Jr,B,N),c(rn)),s&&v()}function v(){u.length&&b(u.shift())}return{mount:P,destroy:Ae(bt,u),check:h}}function Fs(e,t,n){var r=ke(e),o=r.on,a=r.emit,i=r.bind,c=t.Slides,s=t.Elements,d=t.Controller,u=d.hasFocus,P=d.getIndex,y=d.go,x=t.Direction.resolve,h=s.pagination,b=[],L,v;function S(){f(),o([Ke,Ne,nr],S);var D=n.pagination;h&&xn(h,D?"":"none"),D&&(o([xt,sr,zt],T),B(),T(),a(vi,{list:L,items:b},A(e.index)))}function f(){L&&(Dt(h?At(L.children):L),ft(L,v),bt(b),L=null),r.destroy()}function B(){var D=e.length,C=n.classes,O=n.i18n,V=n.perPage,J=u()?d.getEnd()+1:Cn(D/V);L=h||en("ul",C.pagination,s.track.parentElement),lt(L,v=hr+"--"+$()),me(L,yt,"tablist"),me(L,Qe,O.select),me(L,eo,$()===pr?"vertical":"");for(var U=0;U<J;U++){var w=en("li",null,L),M=en("button",{class:C.page,type:"button"},w),R=c.getIn(U).map(function(I){return I.slide.id}),H=!u()&&V>1?O.pageX:O.slideX;i(M,"click",Ae(N,U)),n.paginationKeyboard&&i(M,"keydown",Ae(_,U)),me(w,yt,"presentation"),me(M,yt,"tab"),me(M,In,R.join(" ")),me(M,Qe,Ir(H,U+1)),me(M,tn,-1),b.push({li:w,button:M,page:U})}}function N(D){y(">"+D,!0)}function _(D,C){var O=b.length,V=ro(C),J=$(),U=-1;V===x(ur,!1,J)?U=++D%O:V===x(dr,!1,J)?U=(--D+O)%O:V==="Home"?U=0:V==="End"&&(U=O-1);var w=b[U];w&&(oi(w.button),y(">"+U),gt(C,!0))}function $(){return n.paginationDirection||n.direction}function A(D){return b[d.toPage(D)]}function T(){var D=A(P(!0)),C=A(P());if(D){var O=D.button;ft(O,jt),ct(O,So),me(O,tn,-1)}if(C){var V=C.button;lt(V,jt),me(V,So,!0),me(V,tn,"")}a(bi,{list:L,items:b},D,C)}return{items:b,mount:S,destroy:f,getAt:A,update:T}}var Ms=[" ","Enter"];function Hs(e,t,n){var r=n.isNavigation,o=n.slideFocus,a=[];function i(){e.splides.forEach(function(h){h.isParent||(d(e,h.splide),d(h.splide,e))}),r&&u()}function c(){a.forEach(function(h){h.destroy()}),bt(a)}function s(){c(),i()}function d(h,b){var L=ke(h);L.on(xt,function(v,S,f){b.go(b.is(un)?f:v)}),a.push(L)}function u(){var h=ke(e),b=h.on;b(Ur,y),b(Ci,x),b([Rt,Ke],P),a.push(h),h.emit(Yr,e.splides)}function P(){me(t.Elements.list,eo,n.direction===pr?"vertical":"")}function y(h){e.go(h.index)}function x(h,b){Dr(Ms,ro(b))&&(y(h),gt(b))}return{setup:Ae(t.Media.set,{slideFocus:Pn(o)?r:o},!0),mount:i,destroy:c,remount:s}}function Ns(e,t,n){var r=ke(e),o=r.bind,a=0;function i(){n.wheel&&o(t.Elements.track,"wheel",c,Zt)}function c(d){if(d.cancelable){var u=d.deltaY,P=u<0,y=Rr(d),x=n.wheelMinThreshold||0,h=n.wheelSleep||0;Ue(u)>x&&y-a>h&&(e.go(P?"<":">"),a=y),s(P)&&gt(d)}}function s(d){return!n.releaseWheel||e.state.is(cn)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var Bs=90;function Os(e,t,n){var r=ke(e),o=r.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=en("span",os),s=lr(Bs,Ae(u,!1));function d(){i&&(y(!t.Autoplay.isPaused()),me(a,To,!0),c.textContent="…",o(Xr,Ae(y,!0)),o(Zr,Ae(y,!1)),o([dn,zt],Ae(u,!0)))}function u(x){me(a,$o,x),x?(An(a,c),s.start()):(Dt(c),s.cancel())}function P(){ct(a,[wo,To,$o]),Dt(c)}function y(x){i&&me(a,wo,x?"off":"polite")}return{mount:d,disable:y,destroy:P}}var Vs=Object.freeze({__proto__:null,Media:Ya,Direction:Xa,Elements:ds,Slides:ps,Layout:ms,Clones:hs,Move:fs,Controller:ys,Arrows:xs,Autoplay:Ss,Cover:ws,Scroll:_s,Drag:As,Keyboard:Ws,LazyLoad:ks,Pagination:Fs,Sync:Hs,Wheel:Ns,Live:Os}),Ds={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"},js={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:ss,i18n:Ds,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function zs(e,t,n){var r=t.Slides;function o(){ke(e).on([Rt,Ne],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),ei(s)}return{mount:o,start:i,cancel:Ar}}function Ks(e,t,n){var r=t.Move,o=t.Controller,a=t.Scroll,i=t.Elements.list,c=Ae(rt,i,"transition"),s;function d(){ke(e).bind(i,"transitionend",function(x){x.target===i&&s&&(P(),s())})}function u(x,h){var b=r.toPosition(x,!0),L=r.getPosition(),v=y(x);Ue(b-L)>=1&&v>=1?n.useScroll?a.scroll(b,v,!1,h):(c("transform "+v+"ms "+n.easing),r.translate(b,!0),s=h):(r.jump(x),h())}function P(){c(""),a.cancel()}function y(x){var h=n.rewindSpeed;if(e.is(on)&&h){var b=o.getIndex(!0),L=o.getEnd();if(b===0&&x>=L||b>=L&&x===0)return h}return n.speed}return{mount:d,start:u,cancel:P}}var qs=(function(){function e(n,r){this.event=ke(),this.Components={},this.state=Ua(Qt),this.splides=[],this._o={},this._E={};var o=Et(n)?ai(document,n):n;gn(o,o+" is invalid."),this.root=o,r=Tt({label:ot(o,Qe)||"",labelledby:ot(o,Qr)||""},js,e.defaults,r||{});try{Tt(r,JSON.parse(ot(o,Kr)))}catch{gn(!1,"Invalid JSON")}this._o=Object.create(Tt({},r))}var t=e.prototype;return t.mount=function(r,o){var a=this,i=this.state,c=this.Components;gn(i.is([Qt,Qn]),"Already mounted!"),i.set(Qt),this._C=c,this._T=o||this._T||(this.is(kn)?zs:Ks),this._E=r||this._E;var s=bn({},Vs,this._E,{Transition:this._T});return Vt(s,function(d,u){var P=d(a,c,a._o);c[u]=P,P.setup&&P.setup()}),Vt(c,function(d){d.mount&&d.mount()}),this.emit(Rt),lt(this.root,is),i.set(nn),this.emit(kr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(nn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(At(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Ne),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,a=this.state;return a.is(Qt)?ke(this).on(kr,this.destroy.bind(this,r)):(Vt(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(Gr),o.destroy(),r&&bt(this.splides),a.set(Qn)),this},Da(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),oo=qs;oo.defaults={};oo.STATES=za;var _o=[[Rt,"onMounted"],[kr,"onReady"],[xt,"onMove"],[dn,"onMoved"],[Ur,"onClick"],[ci,"onActive"],[di,"onInactive"],[ui,"onVisible"],[pi,"onHidden"],[Ne,"onRefresh"],[Ke,"onUpdated"],[rn,"onResize"],[ar,"onResized"],[mi,"onDrag"],[gi,"onDragging"],[hi,"onDragged"],[sr,"onScroll"],[zt,"onScrolled"],[Gr,"onDestroy"],[fi,"onArrowsMounted"],[yi,"onArrowsUpdated"],[vi,"onPaginationMounted"],[bi,"onPaginationUpdated"],[Yr,"onNavigationMounted"],[Xr,"onAutoplayPlay"],[xi,"onAutoplayPlaying"],[Zr,"onAutoplayPause"],[Jr,"onLazyLoadLoaded"]];function io(...e){return e.filter(Boolean).join(" ")}function rr(e){return e!==null&&typeof e=="object"}function Hr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Hr(n,t[r]));if(rr(e)&&rr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Hr(e[o],t[o]))}return e===t}function Us(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Gs(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function Nr(e,t){const n=e;return Gs(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():rr(r)?n[o]=Nr(rr(n[o])?n[o]:{},r):n[o]=r}),n}var Ys=({children:e,className:t,...n})=>p.createElement("div",{className:io("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),ao=class extends p.Component{constructor(){super(...arguments),this.splideRef=p.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new oo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Nr({},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&&!Hr(this.options,e)&&(this.splide.options=e,this.options=Nr({},e));const t=this.getSlides();Us(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){_o.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}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:r,...o}=this.props;return p.createElement(t,{className:io("splide",e),ref:this.splideRef,...this.omit(o,["options",..._o.map(a=>a[1])])},n?p.createElement(Ys,null,r):r)}},so=({children:e,className:t,...n})=>p.createElement("li",{className:io("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),p=require("react"),Te=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),ei=require("react-dom");function Ji(e){return e.type==="object"&&e.version===1}const Qi="ControlSlider-module__wrapper___sHEkd",ea="ControlSlider-module__hoverArrow___A-dOH",ta="ControlSlider-module__sliderItem___QQSkR",na="ControlSlider-module__sliderImage___9hRl-",ra="ControlSlider-module__arrow___05ghY",oa="ControlSlider-module__arrowVertical___tBfVN",ia="ControlSlider-module__nextArrow___-30Yc",aa="ControlSlider-module__arrowInner___aEra3",sa="ControlSlider-module__arrowIcon___S4ztF",la="ControlSlider-module__arrowImg___2dwJW",ca="ControlSlider-module__mirror___brd6U",da="ControlSlider-module__pagination___bicLF",ua="ControlSlider-module__paginationInner___bT-P-",pa="ControlSlider-module__paginationVertical___zYqKw",ma="ControlSlider-module__paginationItem___nTRbk",ga="ControlSlider-module__dot___p1Qun",ha="ControlSlider-module__activeDot___LHFaj",fa="ControlSlider-module__paginationInsideBottom___R3FWn",ya="ControlSlider-module__paginationInsideTop___V-qb-",va="ControlSlider-module__paginationOutsideBottom___14w8D",ba="ControlSlider-module__paginationOutsideTop___SCLqB",xa="ControlSlider-module__paginationInsideLeft___yOBRZ",Ca="ControlSlider-module__paginationInsideRight___Rtt3o",Sa="ControlSlider-module__paginationOutsideLeft___lahaw",wa="ControlSlider-module__paginationOutsideRight___EtuQa",$a="ControlSlider-module__imgWrapper___UjEgB",Ta="ControlSlider-module__captionBlock___dJ6-j",La="ControlSlider-module__captionTextWrapper___HFlpf",Ea="ControlSlider-module__captionText___uGBVc",Pa="ControlSlider-module__active___WZK4G",_a="ControlSlider-module__withPointerEvents___t-18M",Aa="ControlSlider-module__topLeftAlignment___zjnGM",Ra="ControlSlider-module__topCenterAlignment___gD1xW",Wa="ControlSlider-module__topRightAlignment___NMapS",Ia="ControlSlider-module__middleLeftAlignment___OnUrY",ka="ControlSlider-module__middleCenterAlignment___Tdkl0",Fa="ControlSlider-module__middleRightAlignment___wEbfX",Ma="ControlSlider-module__bottomLeftAlignment___cTP2-",Na="ControlSlider-module__bottomCenterAlignment___c54fB",Ha="ControlSlider-module__bottomRightAlignment___kEwrz",Ba="ControlSlider-module__clickOverlay___DZA28",Oa="ControlSlider-module__contain___pLyq7",Va="ControlSlider-module__cover___KdDat",ae={wrapper:Qi,hoverArrow:ea,sliderItem:ta,sliderImage:na,arrow:ra,arrowVertical:oa,nextArrow:ia,arrowInner:aa,arrowIcon:sa,arrowImg:la,mirror:ca,pagination:da,paginationInner:ua,paginationVertical:pa,paginationItem:ma,dot:ga,activeDot:ha,paginationInsideBottom:fa,paginationInsideTop:ya,paginationOutsideBottom:va,paginationOutsideTop:ba,paginationInsideLeft:xa,paginationInsideRight:Ca,paginationOutsideLeft:Sa,paginationOutsideRight:wa,imgWrapper:$a,captionBlock:Ta,captionTextWrapper:La,captionText:Ea,active:Pa,withPointerEvents:_a,topLeftAlignment:Aa,topCenterAlignment:Ra,topRightAlignment:Wa,middleLeftAlignment:Ia,middleCenterAlignment:ka,middleRightAlignment:Fa,bottomLeftAlignment:Ma,bottomCenterAlignment:Na,bottomRightAlignment:Ha,clickOverlay:Ba,contain:Oa,cover:Va};function Da(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ja(e,t,n){return t&&Da(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var yo="(prefers-reduced-motion: reduce)",Jt=1,za=2,tn=3,ln=4,En=5,qn=6,Qn=7,Ka={CREATED:Jt,MOUNTED:za,IDLE:tn,MOVING:ln,SCROLLING:En,DRAGGING:qn,DESTROYED:Qn};function wt(e){e.length=0}function kt(e,t,n){return Array.prototype.slice.call(e,t,n)}function Ae(e){return e.bind.apply(e,[null].concat(kt(arguments,1)))}var ti=setTimeout,Ar=function(){};function vo(e){return requestAnimationFrame(e)}function ir(e,t){return typeof t===e}function fn(e){return!Vr(e)&&ir("object",e)}var Or=Array.isArray,ni=Ae(ir,"function"),Rt=Ae(ir,"string"),Pn=Ae(ir,"undefined");function Vr(e){return e===null}function ri(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function _n(e){return Or(e)?e:[e]}function it(e,t){_n(e).forEach(t)}function Dr(e,t){return e.indexOf(t)>-1}function Un(e,t){return e.push.apply(e,_n(t)),e}function bt(e,t,n){e&&it(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function gt(e,t){bt(e,Rt(t)?t.split(" "):t,!0)}function An(e,t){it(t,e.appendChild.bind(e))}function jr(e,t){it(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function yn(e,t){return ri(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function oi(e,t){var n=e?kt(e.children):[];return t?n.filter(function(r){return yn(r,t)}):n}function Rn(e,t){return t?oi(e,t)[0]:e.firstElementChild}var vn=Object.keys;function Dt(e,t,n){return e&&(n?vn(e).reverse():vn(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function bn(e){return kt(arguments,1).forEach(function(t){Dt(t,function(n,r){e[r]=t[r]})}),e}function _t(e){return kt(arguments,1).forEach(function(t){Dt(t,function(n,r){Or(n)?e[r]=n.slice():fn(n)?e[r]=_t({},fn(e[r])?e[r]:{},n):e[r]=n})}),e}function bo(e,t){it(t||vn(e),function(n){delete e[n]})}function ht(e,t){it(e,function(n){it(t,function(r){n&&n.removeAttribute(r)})})}function ge(e,t,n){fn(t)?Dt(t,function(r,i){ge(e,i,r)}):it(e,function(r){Vr(n)||n===""?ht(r,t):r.setAttribute(t,String(n))})}function Qt(e,t,n){var r=document.createElement(e);return t&&(Rt(t)?gt(r,t):ge(r,t)),n&&An(n,r),r}function st(e,t,n){if(Pn(n))return getComputedStyle(e)[t];Vr(n)||(e.style[t]=""+n)}function xn(e,t){st(e,"display",t)}function ii(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function lt(e,t){return e.getAttribute(t)}function xo(e,t){return e&&e.classList.contains(t)}function nt(e){return e.getBoundingClientRect()}function jt(e){it(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ai(e){return Rn(new DOMParser().parseFromString(e,"text/html").body)}function vt(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function si(e,t){return e&&e.querySelector(t)}function zr(e,t){return t?kt(e.querySelectorAll(t)):[]}function xt(e,t){bt(e,t,!1)}function Rr(e){return e.timeStamp}function Ht(e){return Rt(e)?e:e?e+"px":""}var Wn="splide",Kr="data-"+Wn;function gn(e,t){if(!e)throw new Error("["+Wn+"] "+(t||""))}var Wt=Math.min,er=Math.max,tr=Math.floor,Cn=Math.ceil,Ue=Math.abs;function li(e,t,n){return Ue(e-t)<n}function Gn(e,t,n,r){var i=Wt(t,n),a=er(t,n);return r?i<e&&e<a:i<=e&&e<=a}function Yt(e,t,n){var r=Wt(t,n),i=er(t,n);return Wt(er(r,e),i)}function Wr(e){return+(e>0)-+(e<0)}function Ir(e,t){return it(t,function(n){e=e.replace("%s",""+n)}),e}function qr(e){return e<10?"0"+e:""+e}var Co={};function qa(e){return""+e+qr(Co[e]=(Co[e]||0)+1)}function ci(){var e=[];function t(o,c,s,d){i(o,c,function(u,P,v){var x="addEventListener"in u,h=x?u.removeEventListener.bind(u,P,s,d):u.removeListener.bind(u,s);x?u.addEventListener(P,s,d):u.addListener(s),e.push([u,P,v,s,h])})}function n(o,c,s){i(o,c,function(d,u,P){e=e.filter(function(v){return v[0]===d&&v[1]===u&&v[2]===P&&(!s||v[3]===s)?(v[4](),!1):!0})})}function r(o,c,s){var d,u=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:u,detail:s}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,u,!1,s)),o.dispatchEvent(d),d}function i(o,c,s){it(o,function(d){d&&it(c,function(u){u.split(" ").forEach(function(P){var v=P.split(".");s(d,v[0],v[1])})})})}function a(){e.forEach(function(o){o[4]()}),wt(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var Ft="mounted",kr="ready",$t="move",cn="moved",Ur="click",di="active",ui="inactive",pi="visible",mi="hidden",Oe="refresh",Ke="updated",nn="resize",ar="resized",gi="drag",hi="dragging",fi="dragged",sr="scroll",Kt="scrolled",Ua="overflow",Gr="destroy",yi="arrows:mounted",vi="arrows:updated",bi="pagination:mounted",xi="pagination:updated",Yr="navigation:mounted",Xr="autoplay:play",Ci="autoplay:playing",Zr="autoplay:pause",Jr="lazyload:loaded",Si="sk",wi="sh",nr="ei";function Fe(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ci();function r(a,o){n.bind(t,_n(a).join(" "),function(c){o.apply(o,Or(c.detail)?c.detail:[])})}function i(a){n.dispatch(t,a,kt(arguments,1))}return e&&e.event.on(Gr,n.destroy),bn(n,{bus:t,on:r,off:Ae(n.unbind,t),emit:i})}function lr(e,t,n,r){var i=Date.now,a,o=0,c,s=!0,d=0;function u(){if(!s){if(o=e?Wt((i()-a)/e,1):1,n&&n(o),o>=1&&(t(),a=i(),r&&++d>=r))return v();c=vo(u)}}function P(L){L||h(),a=i()-(L?o*e:0),s=!1,c=vo(u)}function v(){s=!0}function x(){a=i(),o=0,n&&n(o)}function h(){c&&cancelAnimationFrame(c),o=0,c=0,s=!0}function g(L){e=L}function T(){return s}return{start:P,rewind:x,pause:v,cancel:h,set:g,isPaused:T}}function Ga(e){var t=e;function n(i){t=i}function r(i){return Dr(_n(i),t)}return{set:n,is:r}}function Ya(e,t){var n=lr(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Xa(e,t,n){var r=e.state,i=n.breakpoints||{},a=n.reducedMotion||{},o=ci(),c=[];function s(){var h=n.mediaQuery==="min";vn(i).sort(function(g,T){return h?+g-+T:+T-+g}).forEach(function(g){u(i[g],"("+(h?"min":"max")+"-width:"+g+"px)")}),u(a,yo),P()}function d(h){h&&o.destroy()}function u(h,g){var T=matchMedia(g);o.bind(T,"change",P),c.push([h,T])}function P(){var h=r.is(Qn),g=n.direction,T=c.reduce(function(L,b){return _t(L,b[1].matches?b[0]:{})},{});bo(n),x(T),n.destroy?e.destroy(n.destroy==="completely"):h?(d(!0),e.mount()):g!==n.direction&&e.refresh()}function v(h){matchMedia(yo).matches&&(h?_t(n,a):bo(n,vn(a)))}function x(h,g,T){_t(n,h),g&&_t(Object.getPrototypeOf(n),h),(T||!r.is(Jt))&&e.emit(Ke,n)}return{setup:s,destroy:d,reduce:v,set:x}}var cr="Arrow",dr=cr+"Left",ur=cr+"Right",$i=cr+"Up",Ti=cr+"Down",So="rtl",pr="ttb",br={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[$i,ur],ArrowRight:[Ti,dr]};function Za(e,t,n){function r(a,o,c){c=c||n.direction;var s=c===So&&!o?1:c===pr?0:-1;return br[a]&&br[a][s]||a.replace(/width|left|right/i,function(d,u){var P=br[d.toLowerCase()][s]||d;return u>0?P.charAt(0).toUpperCase()+P.slice(1):P})}function i(a){return a*(n.direction===So?1:-1)}return{resolve:r,orient:i}}var Ct="role",en="tabindex",Ja="disabled",ct="aria-",In=ct+"controls",Li=ct+"current",wo=ct+"selected",rt=ct+"label",Qr=ct+"labelledby",Ei=ct+"hidden",eo=ct+"orientation",Sn=ct+"roledescription",$o=ct+"live",To=ct+"busy",Lo=ct+"atomic",to=[Ct,en,Ja,In,Li,rt,Qr,Ei,eo,Sn],ft=Wn+"__",Mt="is-",xr=Wn,Eo=ft+"track",Qa=ft+"list",mr=ft+"slide",Pi=mr+"--clone",es=mr+"__container",no=ft+"arrows",gr=ft+"arrow",_i=gr+"--prev",Ai=gr+"--next",hr=ft+"pagination",Ri=hr+"__page",ts=ft+"progress",ns=ts+"__bar",rs=ft+"toggle",os=ft+"spinner",is=ft+"sr",as=Mt+"initialized",zt=Mt+"active",Wi=Mt+"prev",Ii=Mt+"next",Fr=Mt+"visible",Mr=Mt+"loading",ki=Mt+"focus-in",Fi=Mt+"overflow",ss=[zt,Fr,Wi,Ii,Mr,ki,Fi],ls={slide:mr,clone:Pi,arrows:no,arrow:gr,prev:_i,next:Ai,pagination:hr,page:Ri,spinner:os};function cs(e,t){if(ni(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!yn(n,t);)n=n.parentElement;return n}var ds=5,Po=200,Mi="touchstart mousedown",Cr="touchmove mousemove",Sr="touchend touchcancel mouseup click";function us(e,t,n){var r=Fe(e),i=r.on,a=r.bind,o=e.root,c=n.i18n,s={},d=[],u=[],P=[],v,x,h;function g(){m(),H(),b()}function T(){i(Oe,L),i(Oe,g),i(Ke,b),a(document,Mi+" keydown",function(C){h=C.type==="keydown"},{capture:!0}),a(o,"focusin",function(){bt(o,ki,!!h)})}function L(C){var W=to.concat("style");wt(d),xt(o,u),xt(v,P),ht([v,x],W),ht(o,C?W:["style",Sn])}function b(){xt(o,u),xt(v,P),u=_(xr),P=_(Eo),gt(o,u),gt(v,P),ge(o,rt,n.label),ge(o,Qr,n.labelledby)}function m(){v=F("."+Eo),x=Rn(v,"."+Qa),gn(v&&x,"A track/list element is missing."),Un(d,oi(x,"."+mr+":not(."+Pi+")")),Dt({arrows:no,pagination:hr,prev:_i,next:Ai,bar:ns,toggle:rs},function(C,W){s[W]=F("."+C)}),bn(s,{root:o,track:v,list:x,slides:d})}function H(){var C=o.id||qa(Wn),W=n.role;o.id=C,v.id=v.id||C+"-track",x.id=x.id||C+"-list",!lt(o,Ct)&&o.tagName!=="SECTION"&&W&&ge(o,Ct,W),ge(o,Sn,c.carousel),ge(x,Ct,"presentation")}function F(C){var W=si(o,C);return W&&cs(W,"."+xr)===o?W:void 0}function _(C){return[C+"--"+n.type,C+"--"+n.direction,n.drag&&C+"--draggable",n.isNavigation&&C+"--nav",C===xr&&zt]}return bn(s,{setup:g,mount:T,destroy:L})}var rn="slide",dn="loop",kn="fade";function ps(e,t,n,r){var i=Fe(e),a=i.on,o=i.emit,c=i.bind,s=e.Components,d=e.root,u=e.options,P=u.isNavigation,v=u.updateOnMove,x=u.i18n,h=u.pagination,g=u.slideFocus,T=s.Direction.resolve,L=lt(r,"style"),b=lt(r,rt),m=n>-1,H=Rn(r,"."+es),F;function _(){m||(r.id=d.id+"-slide"+qr(t+1),ge(r,Ct,h?"tabpanel":"group"),ge(r,Sn,x.slide),ge(r,rt,b||Ir(x.slideLabel,[t+1,e.length]))),C()}function C(){c(r,"click",Ae(o,Ur,R)),c(r,"keydown",Ae(o,Si,R)),a([cn,wi,Kt],S),a(Yr,w),v&&a($t,O)}function W(){F=!0,i.destroy(),xt(r,ss),ht(r,to),ge(r,"style",L),ge(r,rt,b||"")}function w(){var B=e.splides.map(function(I){var A=I.splide.Components.Slides.getAt(t);return A?A.slide.id:""}).join(" ");ge(r,rt,Ir(x.slideX,(m?n:t)+1)),ge(r,In,B),ge(r,Ct,g?"button":""),g&&ht(r,Sn)}function O(){F||S()}function S(){if(!F){var B=e.index;V(),D(),bt(r,Wi,t===B-1),bt(r,Ii,t===B+1)}}function V(){var B=U();B!==xo(r,zt)&&(bt(r,zt,B),ge(r,Li,P&&B||""),o(B?di:ui,R))}function D(){var B=$(),I=!B&&(!U()||m);if(e.state.is([ln,En])||ge(r,Ei,I||""),ge(zr(r,u.focusableNodes||""),en,I?-1:""),g&&ge(r,en,I?-1:0),B!==xo(r,Fr)&&(bt(r,Fr,B),o(B?pi:mi,R)),!B&&document.activeElement===r){var A=s.Slides.getAt(e.index);A&&ii(A.slide)}}function Z(B,I,A){st(A&&H||r,B,I)}function U(){var B=e.index;return B===t||u.cloneStatus&&B===n}function $(){if(e.is(kn))return U();var B=nt(s.Elements.track),I=nt(r),A=T("left",!0),Q=T("right",!0);return tr(B[A])<=Cn(I[A])&&tr(I[Q])<=Cn(B[Q])}function k(B,I){var A=Ue(B-t);return!m&&(u.rewind||e.is(dn))&&(A=Wt(A,e.length-A)),A<=I}var R={index:t,slideIndex:n,slide:r,container:H,isClone:m,mount:_,destroy:W,update:S,style:Z,isWithin:k};return R}function ms(e,t,n){var r=Fe(e),i=r.on,a=r.emit,o=r.bind,c=t.Elements,s=c.slides,d=c.list,u=[];function P(){v(),i(Oe,x),i(Oe,v)}function v(){s.forEach(function(S,V){g(S,V,-1)})}function x(){F(function(S){S.destroy()}),wt(u)}function h(){F(function(S){S.update()})}function g(S,V,D){var Z=ps(e,V,D,S);Z.mount(),u.push(Z),u.sort(function(U,$){return U.index-$.index})}function T(S){return S?_(function(V){return!V.isClone}):u}function L(S){var V=t.Controller,D=V.toIndex(S),Z=V.hasFocus()?1:n.perPage;return _(function(U){return Gn(U.index,D,D+Z-1)})}function b(S){return _(S)[0]}function m(S,V){it(S,function(D){if(Rt(D)&&(D=ai(D)),ri(D)){var Z=s[V];Z?jr(D,Z):An(d,D),gt(D,n.classes.slide),W(D,Ae(a,nn))}}),a(Oe)}function H(S){jt(_(S).map(function(V){return V.slide})),a(Oe)}function F(S,V){T(V).forEach(S)}function _(S){return u.filter(ni(S)?S:function(V){return Rt(S)?yn(V.slide,S):Dr(_n(S),V.index)})}function C(S,V,D){F(function(Z){Z.style(S,V,D)})}function W(S,V){var D=zr(S,"img"),Z=D.length;Z?D.forEach(function(U){o(U,"load error",function(){--Z||V()})}):V()}function w(S){return S?s.length:u.length}function O(){return u.length>n.perPage}return{mount:P,destroy:x,update:h,register:g,get:T,getIn:L,getAt:b,add:m,remove:H,forEach:F,filter:_,style:C,getLength:w,isEnough:O}}function gs(e,t,n){var r=Fe(e),i=r.on,a=r.bind,o=r.emit,c=t.Slides,s=t.Direction.resolve,d=t.Elements,u=d.root,P=d.track,v=d.list,x=c.getAt,h=c.style,g,T,L;function b(){m(),a(window,"resize load",Ya(Ae(o,nn))),i([Ke,Oe],m),i(nn,H)}function m(){g=n.direction===pr,st(u,"maxWidth",Ht(n.width)),st(P,s("paddingLeft"),F(!1)),st(P,s("paddingRight"),F(!0)),H(!0)}function H(R){var B=nt(u);(R||T.width!==B.width||T.height!==B.height)&&(st(P,"height",_()),h(s("marginRight"),Ht(n.gap)),h("width",W()),h("height",w(),!0),T=B,o(ar),L!==(L=k())&&(bt(u,Fi,L),o(Ua,L)))}function F(R){var B=n.padding,I=s(R?"right":"left");return B&&Ht(B[I]||(fn(B)?0:B))||"0px"}function _(){var R="";return g&&(R=C(),gn(R,"height or heightRatio is missing."),R="calc("+R+" - "+F(!1)+" - "+F(!0)+")"),R}function C(){return Ht(n.height||nt(v).width*n.heightRatio)}function W(){return n.autoWidth?null:Ht(n.fixedWidth)||(g?"":O())}function w(){return Ht(n.fixedHeight)||(g?n.autoHeight?null:O():C())}function O(){var R=Ht(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function S(){return nt(v)[s("width")]}function V(R,B){var I=x(R||0);return I?nt(I.slide)[s("width")]+(B?0:U()):0}function D(R,B){var I=x(R);if(I){var A=nt(I.slide)[s("right")],Q=nt(v)[s("left")];return Ue(A-Q)+(B?0:U())}return 0}function Z(R){return D(e.length-1)-D(0)+V(0,R)}function U(){var R=x(0);return R&&parseFloat(st(R.slide,s("marginRight")))||0}function $(R){return parseFloat(st(P,s("padding"+(R?"Right":"Left"))))||0}function k(){return e.is(kn)||Z(!0)>S()}return{mount:b,resize:H,listSize:S,slideSize:V,sliderSize:Z,totalSize:D,getPadding:$,isOverflow:k}}var hs=2;function fs(e,t,n){var r=Fe(e),i=r.on,a=t.Elements,o=t.Slides,c=t.Direction.resolve,s=[],d;function u(){i(Oe,P),i([Ke,nn],x),(d=T())&&(h(d),t.Layout.resize(!0))}function P(){v(),u()}function v(){jt(s),wt(s),r.destroy()}function x(){var L=T();d!==L&&(d<L||!L)&&r.emit(Oe)}function h(L){var b=o.get().slice(),m=b.length;if(m){for(;b.length<L;)Un(b,b);Un(b.slice(-L),b.slice(0,L)).forEach(function(H,F){var _=F<L,C=g(H.slide,F);_?jr(C,b[0].slide):An(a.list,C),Un(s,C),o.register(C,F-L+(_?0:m),H.index)})}}function g(L,b){var m=L.cloneNode(!0);return gt(m,n.classes.clone),m.id=e.root.id+"-clone"+qr(b+1),m}function T(){var L=n.clones;if(!e.is(dn))L=0;else if(Pn(L)){var b=n[c("fixedWidth")]&&t.Layout.slideSize(0),m=b&&Cn(nt(a.track)[c("width")]/b);L=m||n[c("autoWidth")]&&e.length||n.perPage*hs}return L}return{mount:u,destroy:v}}function ys(e,t,n){var r=Fe(e),i=r.on,a=r.emit,o=e.state.set,c=t.Layout,s=c.slideSize,d=c.getPadding,u=c.totalSize,P=c.listSize,v=c.sliderSize,x=t.Direction,h=x.resolve,g=x.orient,T=t.Elements,L=T.list,b=T.track,m;function H(){m=t.Transition,i([Ft,ar,Ke,Oe],F)}function F(){t.Controller.isBusy()||(t.Scroll.cancel(),C(e.index),t.Slides.update())}function _(I,A,Q,oe){I!==A&&R(I>Q)&&(S(),W(O(Z(),I>Q),!0)),o(ln),a($t,A,Q,I),m.start(A,function(){o(tn),a(cn,A,Q,I),oe&&oe()})}function C(I){W(D(I,!0))}function W(I,A){if(!e.is(kn)){var Q=A?I:w(I);st(L,"transform","translate"+h("X")+"("+Q+"px)"),I!==Q&&a(wi)}}function w(I){if(e.is(dn)){var A=V(I),Q=A>t.Controller.getEnd(),oe=A<0;(oe||Q)&&(I=O(I,Q))}return I}function O(I,A){var Q=I-k(A),oe=v();return I-=g(oe*(Cn(Ue(Q)/oe)||1))*(A?1:-1),I}function S(){W(Z(),!0),m.cancel()}function V(I){for(var A=t.Slides.get(),Q=0,oe=1/0,ie=0;ie<A.length;ie++){var z=A[ie].index,M=Ue(D(z,!0)-I);if(M<=oe)oe=M,Q=z;else break}return Q}function D(I,A){var Q=g(u(I-1)-$(I));return A?U(Q):Q}function Z(){var I=h("left");return nt(L)[I]-nt(b)[I]+g(d(!1))}function U(I){return n.trimSpace&&e.is(rn)&&(I=Yt(I,0,g(v(!0)-P()))),I}function $(I){var A=n.focus;return A==="center"?(P()-s(I,!0))/2:+A*s(I)||0}function k(I){return D(I?t.Controller.getEnd():0,!!n.trimSpace)}function R(I){var A=g(O(Z(),I));return I?A>=0:A<=L[h("scrollWidth")]-nt(b)[h("width")]}function B(I,A){A=Pn(A)?Z():A;var Q=I!==!0&&g(A)<g(k(!1)),oe=I!==!1&&g(A)>g(k(!0));return Q||oe}return{mount:H,move:_,jump:C,translate:W,shift:O,cancel:S,toIndex:V,toPosition:D,getPosition:Z,getLimit:k,exceededLimit:B,reposition:F}}function vs(e,t,n){var r=Fe(e),i=r.on,a=r.emit,o=t.Move,c=o.getPosition,s=o.getLimit,d=o.toPosition,u=t.Slides,P=u.isEnough,v=u.getLength,x=n.omitEnd,h=e.is(dn),g=e.is(rn),T=Ae(Z,!1),L=Ae(Z,!0),b=n.start||0,m,H=b,F,_,C;function W(){w(),i([Ke,Oe,nr],w),i(ar,O)}function w(){F=v(!0),_=n.perMove,C=n.perPage,m=R();var M=Yt(b,0,x?m:F-1);M!==b&&(b=M,o.reposition())}function O(){m!==R()&&a(nr)}function S(M,re,Ce){if(!z()){var ue=D(M),he=k(ue);he>-1&&(re||he!==b)&&(Q(he),o.move(ue,he,H,Ce))}}function V(M,re,Ce,ue){t.Scroll.scroll(M,re,Ce,function(){var he=k(o.toIndex(c()));Q(x?Wt(he,m):he),ue&&ue()})}function D(M){var re=b;if(Rt(M)){var Ce=M.match(/([+\-<>])(\d+)?/)||[],ue=Ce[1],he=Ce[2];ue==="+"||ue==="-"?re=U(b+ +(""+ue+(+he||1)),b):ue===">"?re=he?B(+he):T(!0):ue==="<"&&(re=L(!0))}else re=h?M:Yt(M,0,m);return re}function Z(M,re){var Ce=_||(ie()?1:C),ue=U(b+Ce*(M?-1:1),b,!(_||ie()));return ue===-1&&g&&!li(c(),s(!M),1)?M?0:m:re?ue:k(ue)}function U(M,re,Ce){if(P()||ie()){var ue=$(M);ue!==M&&(re=M,M=ue,Ce=!1),M<0||M>m?!_&&(Gn(0,M,re,!0)||Gn(m,re,M,!0))?M=B(I(M)):h?M=Ce?M<0?-(F%C||C):F:M:n.rewind?M=M<0?m:0:M=-1:Ce&&M!==re&&(M=B(I(re)+(M<re?-1:1)))}else M=-1;return M}function $(M){if(g&&n.trimSpace==="move"&&M!==b)for(var re=c();re===d(M,!0)&&Gn(M,0,e.length-1,!n.rewind);)M<b?--M:++M;return M}function k(M){return h?(M+F)%F||0:M}function R(){for(var M=F-(ie()||h&&_?1:C);x&&M-- >0;)if(d(F-1,!0)!==d(M,!0)){M++;break}return Yt(M,0,F-1)}function B(M){return Yt(ie()?M:C*M,0,m)}function I(M){return ie()?Wt(M,m):tr((M>=m?F-1:M)/C)}function A(M){var re=o.toIndex(M);return g?Yt(re,0,m):re}function Q(M){M!==b&&(H=b,b=M)}function oe(M){return M?H:b}function ie(){return!Pn(n.focus)||n.isNavigation}function z(){return e.state.is([ln,En])&&!!n.waitForTransition}return{mount:W,go:S,scroll:V,getNext:T,getPrev:L,getAdjacent:Z,getEnd:R,setIndex:Q,getIndex:oe,toIndex:B,toPage:I,toDest:A,hasFocus:ie,isBusy:z}}var bs="http://www.w3.org/2000/svg",xs="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",Bn=40;function Cs(e,t,n){var r=Fe(e),i=r.on,a=r.bind,o=r.emit,c=n.classes,s=n.i18n,d=t.Elements,u=t.Controller,P=d.arrows,v=d.track,x=P,h=d.prev,g=d.next,T,L,b={};function m(){F(),i(Ke,H)}function H(){_(),m()}function F(){var V=n.arrows;V&&!(h&&g)&&w(),h&&g&&(bn(b,{prev:h,next:g}),xn(x,V?"":"none"),gt(x,L=no+"--"+n.direction),V&&(C(),S(),ge([h,g],In,v.id),o(yi,h,g)))}function _(){r.destroy(),xt(x,L),T?(jt(P?[h,g]:x),h=g=null):ht([h,g],to)}function C(){i([Ft,cn,Oe,Kt,nr],S),a(g,"click",Ae(W,">")),a(h,"click",Ae(W,"<"))}function W(V){u.go(V,!0)}function w(){x=P||Qt("div",c.arrows),h=O(!0),g=O(!1),T=!0,An(x,[h,g]),!P&&jr(x,v)}function O(V){var D='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+bs+'" viewBox="0 0 '+Bn+" "+Bn+'" width="'+Bn+'" height="'+Bn+'" focusable="false"><path d="'+(n.arrowPath||xs)+'" />';return ai(D)}function S(){if(h&&g){var V=e.index,D=u.getPrev(),Z=u.getNext(),U=D>-1&&V<D?s.last:s.prev,$=Z>-1&&V>Z?s.first:s.next;h.disabled=D<0,g.disabled=Z<0,ge(h,rt,U),ge(g,rt,$),o(vi,h,g,D,Z)}}return{arrows:b,mount:m,destroy:_,update:S}}var Ss=Kr+"-interval";function ws(e,t,n){var r=Fe(e),i=r.on,a=r.bind,o=r.emit,c=lr(n.interval,e.go.bind(e,">"),C),s=c.isPaused,d=t.Elements,u=t.Elements,P=u.root,v=u.toggle,x=n.autoplay,h,g,T=x==="pause";function L(){x&&(b(),v&&ge(v,In,d.track.id),T||m(),_())}function b(){n.pauseOnHover&&a(P,"mouseenter mouseleave",function(w){h=w.type==="mouseenter",F()}),n.pauseOnFocus&&a(P,"focusin focusout",function(w){g=w.type==="focusin",F()}),v&&a(v,"click",function(){T?m():H(!0)}),i([$t,sr,Oe],c.rewind),i($t,W)}function m(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),g=h=T=!1,_(),o(Xr))}function H(w){w===void 0&&(w=!0),T=!!w,_(),s()||(c.pause(),o(Zr))}function F(){T||(h||g?H(!1):m())}function _(){v&&(bt(v,zt,!T),ge(v,rt,n.i18n[T?"play":"pause"]))}function C(w){var O=d.bar;O&&st(O,"width",w*100+"%"),o(Ci,w)}function W(w){var O=t.Slides.getAt(w);c.set(O&&+lt(O.slide,Ss)||n.interval)}return{mount:L,destroy:c.cancel,play:m,pause:H,isPaused:s}}function $s(e,t,n){var r=Fe(e),i=r.on;function a(){n.cover&&(i(Jr,Ae(c,!0)),i([Ft,Ke,Oe],Ae(o,!0)))}function o(s){t.Slides.forEach(function(d){var u=Rn(d.container||d.slide,"img");u&&u.src&&c(s,u,d)})}function c(s,d,u){u.style("background",s?'center/cover no-repeat url("'+d.src+'")':"",!0),xn(d,s?"none":"")}return{mount:a,destroy:Ae(o,!1)}}var Ts=10,Ls=600,Es=.6,Ps=1.5,_s=800;function As(e,t,n){var r=Fe(e),i=r.on,a=r.emit,o=e.state.set,c=t.Move,s=c.getPosition,d=c.getLimit,u=c.exceededLimit,P=c.translate,v=e.is(rn),x,h,g=1;function T(){i($t,H),i([Ke,Oe],F)}function L(C,W,w,O,S){var V=s();if(H(),w&&(!v||!u())){var D=t.Layout.sliderSize(),Z=Wr(C)*D*tr(Ue(C)/D)||0;C=c.toPosition(t.Controller.toDest(C%D))+Z}var U=li(V,C,1);g=1,W=U?0:W||er(Ue(C-V)/Ps,_s),h=O,x=lr(W,b,Ae(m,V,C,S),1),o(En),a(sr),x.start()}function b(){o(tn),h&&h(),a(Kt)}function m(C,W,w,O){var S=s(),V=C+(W-C)*_(O),D=(V-S)*g;P(S+D),v&&!w&&u()&&(g*=Es,Ue(D)<Ts&&L(d(u(!0)),Ls,!1,h,!0))}function H(){x&&x.cancel()}function F(){x&&!x.isPaused()&&(H(),b())}function _(C){var W=n.easingFunc;return W?W(C):1-Math.pow(1-C,4)}return{mount:T,destroy:H,scroll:L,cancel:F}}var Xt={passive:!1,capture:!0};function Rs(e,t,n){var r=Fe(e),i=r.on,a=r.emit,o=r.bind,c=r.unbind,s=e.state,d=t.Move,u=t.Scroll,P=t.Controller,v=t.Elements.track,x=t.Media.reduce,h=t.Direction,g=h.resolve,T=h.orient,L=d.getPosition,b=d.exceededLimit,m,H,F,_,C,W=!1,w,O,S;function V(){o(v,Cr,Ar,Xt),o(v,Sr,Ar,Xt),o(v,Mi,Z,Xt),o(v,"click",k,{capture:!0}),o(v,"dragstart",vt),i([Ft,Ke],D)}function D(){var y=n.drag;ne(!y),_=y==="free"}function Z(y){if(w=!1,!O){var f=he(y);ue(y.target)&&(f||!y.button)&&(P.isBusy()?vt(y,!0):(S=f?v:window,C=s.is([ln,En]),F=null,o(S,Cr,U,Xt),o(S,Sr,$,Xt),d.cancel(),u.cancel(),R(y)))}}function U(y){if(s.is(qn)||(s.set(qn),a(gi)),y.cancelable)if(C){d.translate(m+Ce(ie(y)));var f=z(y)>Po,N=W!==(W=b());(f||N)&&R(y),w=!0,a(hi),vt(y)}else A(y)&&(C=I(y),vt(y))}function $(y){s.is(qn)&&(s.set(tn),a(fi)),C&&(B(y),vt(y)),c(S,Cr,U),c(S,Sr,$),C=!1}function k(y){!O&&w&&vt(y,!0)}function R(y){F=H,H=y,m=L()}function B(y){var f=Q(y),N=oe(f),q=n.rewind&&n.rewindByDrag;x(!1),_?P.scroll(N,0,n.snap):e.is(kn)?P.go(T(Wr(f))<0?q?"<":"-":q?">":"+"):e.is(rn)&&W&&q?P.go(b(!0)?">":"<"):P.go(P.toDest(N),!0),x(!0)}function I(y){var f=n.dragMinThreshold,N=fn(f),q=N&&f.mouse||0,G=(N?f.touch:+f)||10;return Ue(ie(y))>(he(y)?G:q)}function A(y){return Ue(ie(y))>Ue(ie(y,!0))}function Q(y){if(e.is(dn)||!W){var f=z(y);if(f&&f<Po)return ie(y)/f}return 0}function oe(y){return L()+Wr(y)*Wt(Ue(y)*(n.flickPower||600),_?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ie(y,f){return re(y,f)-re(M(y),f)}function z(y){return Rr(y)-Rr(M(y))}function M(y){return H===y&&F||H}function re(y,f){return(he(y)?y.changedTouches[0]:y)["page"+g(f?"Y":"X")]}function Ce(y){return y/(W&&e.is(rn)?ds:1)}function ue(y){var f=n.noDrag;return!yn(y,"."+Ri+", ."+gr)&&(!f||!yn(y,f))}function he(y){return typeof TouchEvent<"u"&&y instanceof TouchEvent}function Re(){return C}function ne(y){O=y}return{mount:V,disable:ne,isDragging:Re}}var Ws={Spacebar:" ",Right:ur,Left:dr,Up:$i,Down:Ti};function ro(e){return e=Rt(e)?e:e.key,Ws[e]||e}var _o="keydown";function Is(e,t,n){var r=Fe(e),i=r.on,a=r.bind,o=r.unbind,c=e.root,s=t.Direction.resolve,d,u;function P(){v(),i(Ke,x),i(Ke,v),i($t,g)}function v(){var L=n.keyboard;L&&(d=L==="global"?window:c,a(d,_o,T))}function x(){o(d,_o)}function h(L){u=L}function g(){var L=u;u=!0,ti(function(){u=L})}function T(L){if(!u){var b=ro(L);b===s(dr)?e.go("<"):b===s(ur)&&e.go(">")}}return{mount:P,destroy:x,disable:h}}var hn=Kr+"-lazy",Yn=hn+"-srcset",ks="["+hn+"], ["+Yn+"]";function Fs(e,t,n){var r=Fe(e),i=r.on,a=r.off,o=r.bind,c=r.emit,s=n.lazyLoad==="sequential",d=[cn,Kt],u=[];function P(){n.lazyLoad&&(v(),i(Oe,v))}function v(){wt(u),x(),s?L():(a(d),i(d,h),h())}function x(){t.Slides.forEach(function(b){zr(b.slide,ks).forEach(function(m){var H=lt(m,hn),F=lt(m,Yn);if(H!==m.src||F!==m.srcset){var _=n.classes.spinner,C=m.parentElement,W=Rn(C,"."+_)||Qt("span",_,C);u.push([m,b,W]),m.src||xn(m,"none")}})})}function h(){u=u.filter(function(b){var m=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,m)?g(b):!0}),u.length||a(d)}function g(b){var m=b[0];gt(b[1].slide,Mr),o(m,"load error",Ae(T,b)),ge(m,"src",lt(m,hn)),ge(m,"srcset",lt(m,Yn)),ht(m,hn),ht(m,Yn)}function T(b,m){var H=b[0],F=b[1];xt(F.slide,Mr),m.type!=="error"&&(jt(b[2]),xn(H,""),c(Jr,H,F),c(nn)),s&&L()}function L(){u.length&&g(u.shift())}return{mount:P,destroy:Ae(wt,u),check:h}}function Ms(e,t,n){var r=Fe(e),i=r.on,a=r.emit,o=r.bind,c=t.Slides,s=t.Elements,d=t.Controller,u=d.hasFocus,P=d.getIndex,v=d.go,x=t.Direction.resolve,h=s.pagination,g=[],T,L;function b(){m(),i([Ke,Oe,nr],b);var O=n.pagination;h&&xn(h,O?"":"none"),O&&(i([$t,sr,Kt],w),H(),w(),a(bi,{list:T,items:g},W(e.index)))}function m(){T&&(jt(h?kt(T.children):T),xt(T,L),wt(g),T=null),r.destroy()}function H(){var O=e.length,S=n.classes,V=n.i18n,D=n.perPage,Z=u()?d.getEnd()+1:Cn(O/D);T=h||Qt("ul",S.pagination,s.track.parentElement),gt(T,L=hr+"--"+C()),ge(T,Ct,"tablist"),ge(T,rt,V.select),ge(T,eo,C()===pr?"vertical":"");for(var U=0;U<Z;U++){var $=Qt("li",null,T),k=Qt("button",{class:S.page,type:"button"},$),R=c.getIn(U).map(function(I){return I.slide.id}),B=!u()&&D>1?V.pageX:V.slideX;o(k,"click",Ae(F,U)),n.paginationKeyboard&&o(k,"keydown",Ae(_,U)),ge($,Ct,"presentation"),ge(k,Ct,"tab"),ge(k,In,R.join(" ")),ge(k,rt,Ir(B,U+1)),ge(k,en,-1),g.push({li:$,button:k,page:U})}}function F(O){v(">"+O,!0)}function _(O,S){var V=g.length,D=ro(S),Z=C(),U=-1;D===x(ur,!1,Z)?U=++O%V:D===x(dr,!1,Z)?U=(--O+V)%V:D==="Home"?U=0:D==="End"&&(U=V-1);var $=g[U];$&&(ii($.button),v(">"+U),vt(S,!0))}function C(){return n.paginationDirection||n.direction}function W(O){return g[d.toPage(O)]}function w(){var O=W(P(!0)),S=W(P());if(O){var V=O.button;xt(V,zt),ht(V,wo),ge(V,en,-1)}if(S){var D=S.button;gt(D,zt),ge(D,wo,!0),ge(D,en,"")}a(xi,{list:T,items:g},O,S)}return{items:g,mount:b,destroy:m,getAt:W,update:w}}var Ns=[" ","Enter"];function Hs(e,t,n){var r=n.isNavigation,i=n.slideFocus,a=[];function o(){e.splides.forEach(function(h){h.isParent||(d(e,h.splide),d(h.splide,e))}),r&&u()}function c(){a.forEach(function(h){h.destroy()}),wt(a)}function s(){c(),o()}function d(h,g){var T=Fe(h);T.on($t,function(L,b,m){g.go(g.is(dn)?m:L)}),a.push(T)}function u(){var h=Fe(e),g=h.on;g(Ur,v),g(Si,x),g([Ft,Ke],P),a.push(h),h.emit(Yr,e.splides)}function P(){ge(t.Elements.list,eo,n.direction===pr?"vertical":"")}function v(h){e.go(h.index)}function x(h,g){Dr(Ns,ro(g))&&(v(h),vt(g))}return{setup:Ae(t.Media.set,{slideFocus:Pn(i)?r:i},!0),mount:o,destroy:c,remount:s}}function Bs(e,t,n){var r=Fe(e),i=r.bind,a=0;function o(){n.wheel&&i(t.Elements.track,"wheel",c,Xt)}function c(d){if(d.cancelable){var u=d.deltaY,P=u<0,v=Rr(d),x=n.wheelMinThreshold||0,h=n.wheelSleep||0;Ue(u)>x&&v-a>h&&(e.go(P?"<":">"),a=v),s(P)&&vt(d)}}function s(d){return!n.releaseWheel||e.state.is(ln)||t.Controller.getAdjacent(d)!==-1}return{mount:o}}var Os=90;function Vs(e,t,n){var r=Fe(e),i=r.on,a=t.Elements.track,o=n.live&&!n.isNavigation,c=Qt("span",is),s=lr(Os,Ae(u,!1));function d(){o&&(v(!t.Autoplay.isPaused()),ge(a,Lo,!0),c.textContent="…",i(Xr,Ae(v,!0)),i(Zr,Ae(v,!1)),i([cn,Kt],Ae(u,!0)))}function u(x){ge(a,To,x),x?(An(a,c),s.start()):(jt(c),s.cancel())}function P(){ht(a,[$o,Lo,To]),jt(c)}function v(x){o&&ge(a,$o,x?"off":"polite")}return{mount:d,disable:v,destroy:P}}var Ds=Object.freeze({__proto__:null,Media:Xa,Direction:Za,Elements:us,Slides:ms,Layout:gs,Clones:fs,Move:ys,Controller:vs,Arrows:Cs,Autoplay:ws,Cover:$s,Scroll:As,Drag:Rs,Keyboard:Is,LazyLoad:Fs,Pagination:Ms,Sync:Hs,Wheel:Bs,Live:Vs}),js={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"},zs={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:ls,i18n:js,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Ks(e,t,n){var r=t.Slides;function i(){Fe(e).on([Ft,Oe],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function o(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),ti(s)}return{mount:i,start:o,cancel:Ar}}function qs(e,t,n){var r=t.Move,i=t.Controller,a=t.Scroll,o=t.Elements.list,c=Ae(st,o,"transition"),s;function d(){Fe(e).bind(o,"transitionend",function(x){x.target===o&&s&&(P(),s())})}function u(x,h){var g=r.toPosition(x,!0),T=r.getPosition(),L=v(x);Ue(g-T)>=1&&L>=1?n.useScroll?a.scroll(g,L,!1,h):(c("transform "+L+"ms "+n.easing),r.translate(g,!0),s=h):(r.jump(x),h())}function P(){c(""),a.cancel()}function v(x){var h=n.rewindSpeed;if(e.is(rn)&&h){var g=i.getIndex(!0),T=i.getEnd();if(g===0&&x>=T||g>=T&&x===0)return h}return n.speed}return{mount:d,start:u,cancel:P}}var Us=(function(){function e(n,r){this.event=Fe(),this.Components={},this.state=Ga(Jt),this.splides=[],this._o={},this._E={};var i=Rt(n)?si(document,n):n;gn(i,i+" is invalid."),this.root=i,r=_t({label:lt(i,rt)||"",labelledby:lt(i,Qr)||""},zs,e.defaults,r||{});try{_t(r,JSON.parse(lt(i,Kr)))}catch{gn(!1,"Invalid JSON")}this._o=Object.create(_t({},r))}var t=e.prototype;return t.mount=function(r,i){var a=this,o=this.state,c=this.Components;gn(o.is([Jt,Qn]),"Already mounted!"),o.set(Jt),this._C=c,this._T=i||this._T||(this.is(kn)?Ks:qs),this._E=r||this._E;var s=bn({},Ds,this._E,{Transition:this._T});return Dt(s,function(d,u){var P=d(a,c,a._o);c[u]=P,P.setup&&P.setup()}),Dt(c,function(d){d.mount&&d.mount()}),this.emit(Ft),gt(this.root,as),o.set(tn),this.emit(kr),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(tn)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,i){return this.event.on(r,i),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var i;return(i=this.event).emit.apply(i,[r].concat(kt(arguments,1))),this},t.add=function(r,i){return this._C.Slides.add(r,i),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(Oe),this},t.destroy=function(r){r===void 0&&(r=!0);var i=this.event,a=this.state;return a.is(Jt)?Fe(this).on(kr,this.destroy.bind(this,r)):(Dt(this._C,function(o){o.destroy&&o.destroy(r)},!0),i.emit(Gr),i.destroy(),r&&wt(this.splides),a.set(Qn)),this},ja(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),oo=Us;oo.defaults={};oo.STATES=Ka;var Ao=[[Ft,"onMounted"],[kr,"onReady"],[$t,"onMove"],[cn,"onMoved"],[Ur,"onClick"],[di,"onActive"],[ui,"onInactive"],[pi,"onVisible"],[mi,"onHidden"],[Oe,"onRefresh"],[Ke,"onUpdated"],[nn,"onResize"],[ar,"onResized"],[gi,"onDrag"],[hi,"onDragging"],[fi,"onDragged"],[sr,"onScroll"],[Kt,"onScrolled"],[Gr,"onDestroy"],[yi,"onArrowsMounted"],[vi,"onArrowsUpdated"],[bi,"onPaginationMounted"],[xi,"onPaginationUpdated"],[Yr,"onNavigationMounted"],[Xr,"onAutoplayPlay"],[Ci,"onAutoplayPlaying"],[Zr,"onAutoplayPause"],[Jr,"onLazyLoadLoaded"]];function io(...e){return e.filter(Boolean).join(" ")}function rr(e){return e!==null&&typeof e=="object"}function Nr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Nr(n,t[r]));if(rr(e)&&rr(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(i=>!Object.prototype.hasOwnProperty.call(t,i)||!Nr(e[i],t[i]))}return e===t}function Gs(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function Ys(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const i=n[r];if(i!=="__proto__"&&t(e[i],i)===!1)break}}return e}function Hr(e,t){const n=e;return Ys(t,(r,i)=>{Array.isArray(r)?n[i]=r.slice():rr(r)?n[i]=Hr(rr(n[i])?n[i]:{},r):n[i]=r}),n}var Xs=({children:e,className:t,...n})=>p.createElement("div",{className:io("splide__track",t),...n},p.createElement("ul",{className:"splide__list"},e)),ao=class extends p.Component{constructor(){super(...arguments),this.splideRef=p.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new oo(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Hr({},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&&!Nr(this.options,e)&&(this.splide.options=e,this.options=Hr({},e));const t=this.getSlides();Gs(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){Ao.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...i)=>{r(e,...i)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...i}=this.props;return p.createElement(t,{className:io("splide",e),ref:this.splideRef,...this.omit(i,["options",...Ao.map(a=>a[1])])},n?p.createElement(Xs,null,r):r)}},so=({children:e,className:t,...n})=>p.createElement("li",{className:io("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 Xs="RichTextRenderer-module__link___BWeZ2",Zs={link:Xs},Js=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},fr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Js(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function st(e){const{color:t,...n}=e;return n}function Ge(e,t){var o,a,i;const{fontSize:n,lineHeight:r}=e;return{fontFamily:fr(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(n,t),lineHeight:r!==void 0?E.scalingValue(r,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(i=e.textAppearance)==null?void 0:i.fontVariant,textAlign:e.textAlign,color:e.color}}const wn=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?l.jsx("a",{className:Zs.link,href:r.value,target:r.target,children:t(r.children)},o):l.jsx("span",{style:Qs(r),children:r.text},o));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const o=n.children;return l.jsx("div",{children:t(o)},r)})})};function Qs(e){return{...e.fontFamily&&{fontFamily:fr(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 el="SvgImage-module__svg___q3xE-",tl="SvgImage-module__img___VsTm-",Ao={svg:el,img:tl},nl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},rl=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Lt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[a,i]=p.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return p.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!nl(e)||!a?l.jsx("img",{src:e,alt:"",className:$e(Ao.img,r),style:o}):l.jsx("span",{"data-supports-mask":a,className:$e(Ao.svg,r),style:{"--svg":rl(e),"--fill":t,"--hover-fill":n,...o??{}}})},ol={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function il({settings:e,content:t,styles:n,isEditor:r}){const[o,a]=p.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:d,wordSpacing:u,fontSizeLineHeight:P,textAppearance:y,color:x}=n.imageCaption,[h,b]=p.useState(void 0),[L,v]=p.useState(null),[S,f]=p.useState(0),[B,N]=p.useState(0),{direction:_,transition:$,controls:A,pagination:T,imageCaption:D,triggers:C}=e,O=p.useRef($.type),{x:V,y:J}=e.controls.offset,U=w=>{o&&o.go(w)};return p.useEffect(()=>{if(!L)return;const w=new ResizeObserver(M=>{if(!o)return;const[R]=M;b({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return w.observe(L),()=>w.unobserve(L)},[L]),p.useEffect(()=>{!o||O.current===$.type||(N(w=>w+1),O.current=$.type)},[$.type]),l.jsx("div",{className:$e(ae.wrapper,{[ae.editor]:r}),ref:v,children:l.jsxs("div",{className:ae.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:$.backgroundColor&&$.type==="fade in"?$.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:$e(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map((w,M)=>l.jsx("div",{className:$e(ae.captionText,ol[D.alignment],{[ae.withPointerEvents]:M===S&&r,[ae.active]:M===S}),style:{fontFamily:fr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,r),letterSpacing:E.scalingValue(s,r),wordSpacing:E.scalingValue(u,r),textAlign:d,fontSize:E.scalingValue(P.fontSize,r),lineHeight:E.scalingValue(P.lineHeight,r),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:x,transitionDuration:$.duration?`${Math.round(parseInt($.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":D.linkHoverColor,"--link-color":D.linkColor,position:"relative",top:E.scalingValue(D.offset.y,r),left:E.scalingValue(D.offset.x,r)},children:l.jsx(wn,{content:w.imageCaption})})},M))})}),l.jsx(ao,{onMove:w=>{f(w.index)},ref:a,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,autoplay:C.autoPlay!==null,...C.autoPlay!==null&&{interval:parseInt(C.autoPlay)*1e3},direction:_==="horiz"||$.type==="fade in"?"ltr":"ttb",pagination:!1,drag:C.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:$.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((w,M)=>l.jsx(so,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:$e(ae.sliderImage,{[ae.contain]:w.image.objectFit==="contain",[ae.cover]:w.image.objectFit==="cover"}),src:w.image.url,alt:w.image.name??""})})})},M))},B),A.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:$e(ae.arrow,{[ae.arrowVertical]:_==="vert",[ae.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{onClick:()=>{U("-1")},className:ae.arrowInner,style:{transform:`translate(${E.scalingValue(V,r)}, ${E.scalingValue(J*(_==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Lt,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:$e(ae.arrowImg,ae.mirror)}),!A.arrowsImgUrl&&l.jsx(Ro,{color:A.color,className:$e(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:$e(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:_==="vert",[ae.hoverArrow]:A.show==="on hover"}),style:{color:A.color,"--arrow-hover-color":A.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${E.scalingValue(V*(_==="horiz"?-1:1),r)}, ${E.scalingValue(J,r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[A.arrowsImgUrl&&l.jsx(Lt,{url:A.arrowsImgUrl,fill:A.color,hoverFill:A.hover,className:ae.arrowImg}),!A.arrowsImgUrl&&l.jsx(Ro,{color:A.color,className:$e(ae.arrowIcon,ae.arrowImg)})]})})]}),C.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{o&&o.go("+1")}}),T.isActive&&l.jsx("div",{className:$e(ae.pagination,{[ae.paginationInsideBottom]:T.position==="inside-1"&&_==="horiz",[ae.paginationInsideTop]:T.position==="inside-2"&&_==="horiz",[ae.paginationOutsideBottom]:T.position==="outside-1"&&_==="horiz",[ae.paginationOutsideTop]:T.position==="outside-2"&&_==="horiz",[ae.paginationInsideLeft]:T.position==="inside-1"&&_==="vert",[ae.paginationInsideRight]:T.position==="inside-2"&&_==="vert",[ae.paginationOutsideLeft]:T.position==="outside-1"&&_==="vert",[ae.paginationOutsideRight]:T.position==="outside-2"&&_==="vert",[ae.paginationVertical]:_==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:T.colors[2],transform:`scale(${T.scale/100}) translate(${E.scalingValue(T.offset.x,r)}, ${E.scalingValue(T.offset.y,r)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:t.map((w,M)=>l.jsx("button",{onClick:()=>{o&&o.go(M)},className:$e(ae.paginationItem),children:l.jsx("div",{className:$e(ae.dot,{[ae.activeDot]:M===S}),style:{backgroundColor:M===S?T.colors[0]:T.colors[1],"--pagination-hover-color":T.hover}})},M))})})]})})}function Ro({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const al={element:il,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},sl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",ll="ImageRevealSlider-module__image___Qjt-e",cl="ImageRevealSlider-module__link___N-iLG",dl="ImageRevealSlider-module__cursor___2U03d",Yt={imageRevealSlider:sl,image:ll,link:cl,cursor:dl};function Wo(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const a=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*a,c=a/2,s=i/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function ul(e,t,n,r){let o,a;if(t==="custom"){o=n;const i=await wr(e);a=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await wr(e);a=i.height/i.width*o}else{const i=await wr(e);o=i.width,a=i.height}return{width:o,height:a,finalWidth:`${o}px`}}function pl({settings:e,content:t,isEditor:n}){const[r,o]=p.useState(null),[a,i]=p.useState([]),[c,s]=p.useState(0),d=p.useRef(0),[u,P]=p.useState({x:0,y:0}),[y,x]=p.useState(1),[h,b]=p.useState("none"),L=p.useRef({x:0,y:0}),[v,S]=p.useState(!1),{sizeType:f,imageWidth:B,randomRangeImageWidth:N}=e.imageSize,{revealPosition:_,visible:$}=e.position,{cursorType:A,target:T,defaultCursorScale:D,defaultCursor:C,hoverCursorScale:O,hoverCursor:V}=e.cursor;p.useEffect(()=>{if(!r)return;const w=(H,I)=>{const k=r.getBoundingClientRect(),te=H-k.left,oe=I-k.top;if(P({x:te,y:oe}),A==="system"){b("none"),x(1);return}const ce=te,q=oe,F=document.elementFromPoint(k.left+ce,k.top+q);if(F&&F.closest("a")){b("none"),x(1);return}const ne=Wo(ce,q,a)||T==="area"?{img:V??"none",scale:O}:{img:C??"none",scale:D};b(ne.img),x(ne.scale)},M=H=>{H.stopPropagation(),L.current={x:H.clientX,y:H.clientY},w(H.clientX,H.clientY)},R=()=>{v&&w(L.current.x,L.current.y)};return r.addEventListener("mousemove",M),window.addEventListener("scroll",R,!0),()=>{r.removeEventListener("mousemove",M),window.removeEventListener("scroll",R,!0)}},[r,v,u,A,T,V,C,O,D,a]),p.useEffect(()=>{v||(b("none"),x(0))},[v]);const J=async(w,M,R,H={})=>{const{width:I,height:k,finalWidth:te}=await ul(w.image.url,f,B,N);let oe=0,ce=0;_==="same"?(oe=M/2,ce=R/2):(oe=H.x??Math.random()*M,ce=H.y??Math.random()*R);const q=Math.min(Math.max(oe,I/2),M-I/2),F=Math.min(Math.max(ce,k/2),R-k/2);return{id:d.current++,url:w.image.url,link:w.link,name:w.image.name,x:q,y:F,width:te}};p.useEffect(()=>{if(!r||t.length===0)return;const w=r.getBoundingClientRect(),M=w.width,R=w.height,H=[];(async()=>{const k=t[0],te=await J(k,M,R);H.push(te),i(H),s(1)})()},[f,B,N,_,r]),p.useEffect(()=>{$==="last One"&&i(w=>w.length>0?[w[w.length-1]]:[])},[$]);const U=async w=>{if(!r)return;const M=r.getBoundingClientRect(),R=w.clientX-M.left,H=w.clientY-M.top;if(T==="image"&&!Wo(R,H,a))return;let I=0,k=0;_==="on Click"?(I=R,k=H):_==="same"?(I=M.width/2,k=M.height/2):(I=Math.random()*M.width,k=Math.random()*M.height);const te=t[c],oe=await J(te,M.width,M.height,{x:I,y:k});i(ce=>$==="all"?[...ce,oe]:[oe]),s(ce=>ce>=t.length-1?0:ce+1)};return l.jsxs("div",{ref:o,onClick:U,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:Yt.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[a.map(w=>l.jsx("div",{className:Yt.wrapper,style:{top:`${w.y}px`,left:`${w.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:w.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:T==="area"&&w.link?l.jsx("a",{href:w.link,target:"_blank",className:Yt.link,children:l.jsx("img",{src:w.url,alt:w.name,className:Yt.image},w.id)}):l.jsx("img",{src:w.url,alt:w.name,className:Yt.image},w.id)},w.id)),v&&l.jsx("div",{className:Yt.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ml={element:pl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{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:""}]}}}},gl="LightBox-module__hidden___9s-9x",hl="LightBox-module__heroImage___sTxNF",fl="LightBox-module__background___rm9ml",yl="LightBox-module__editor___4ACaY",vl="LightBox-module__contentStyle___Bgnsq",bl="LightBox-module__imageStyle___tLIlB",xl="LightBox-module__imgWrapper___LuFUp",Cl="LightBox-module__contain___8-yaS",Sl="LightBox-module__cover___hNvOG",wl="LightBox-module__caption___b6L2I",$l="LightBox-module__captionTextInner___rCGNH",Tl="LightBox-module__lightboxSplide___XFuWC",Ll="LightBox-module__arrow___iz38X",El="LightBox-module__arrowVertical___Zfz81",Pl="LightBox-module__nextArrow___zkAQN",_l="LightBox-module__arrowInner___p48sW",Al="LightBox-module__arrowIcon___3VaFf",Rl="LightBox-module__arrowImg___pNV88",Wl="LightBox-module__mirror___pjeXc",Il="LightBox-module__thumbsWrapper___GB-nU",kl="LightBox-module__thumbsContainerVertical___wttk5",Fl="LightBox-module__thumbsContainer___osSma",Ml="LightBox-module__thumbsAlignStart___MO6tY",Hl="LightBox-module__thumbsAlignCenter___Q4sUx",Nl="LightBox-module__thumbsAlignEnd___p4y9R",Bl="LightBox-module__thumbItem___HvnF3",Ol="LightBox-module__closeButton___g2khP",Vl="LightBox-module__fadeIn___0m5GW",Dl="LightBox-module__slideInLeft___gPYwC",jl="LightBox-module__slideInRight___S-pPp",zl="LightBox-module__slideInTop___DFdAj",Kl="LightBox-module__slideInBottom___m27kZ",ql="LightBox-module__fadeOut___55qBR",Ul="LightBox-module__slideOutLeft___NvU7P",Gl="LightBox-module__slideOutRight___SK7eC",Yl="LightBox-module__slideOutTop___Vgg0z",Xl="LightBox-module__slideOutBottom___nJ0Ef",Zl="LightBox-module__scaleSlide___vZriG",X={hidden:gl,heroImage:hl,background:fl,editor:yl,contentStyle:vl,imageStyle:bl,imgWrapper:xl,contain:Cl,cover:Sl,caption:wl,captionTextInner:$l,lightboxSplide:Tl,arrow:Ll,arrowVertical:El,nextArrow:Pl,arrowInner:_l,arrowIcon:Al,arrowImg:Rl,mirror:Wl,thumbsWrapper:Il,thumbsContainerVertical:kl,thumbsContainer:Fl,thumbsAlignStart:Ml,thumbsAlignCenter:Hl,thumbsAlignEnd:Nl,thumbItem:Bl,closeButton:Ol,fadeIn:Vl,slideInLeft:Dl,slideInRight:jl,slideInTop:zl,slideInBottom:Kl,fadeOut:ql,slideOutLeft:Ul,slideOutRight:Gl,slideOutTop:Yl,slideOutBottom:Xl,scaleSlide:Zl},On=(e,t,n)=>{const r={},[o,a]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),o==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:r.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,r};function Mi(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 Io(e){const t=e.getBoundingClientRect(),n=Mi(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,c=r/o,s=a/i;let d,u;s>c?(d=r,u=r/s):(u=o,d=o*s);const P=t.left+n.left,y=t.top+n.top,x=(r-d)/2+P,h=(o-u)/2+y;return{x,y:h,width:d,height:u}}function ko(e){const t=e.getBoundingClientRect(),n=Mi(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Fo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Jl(e,t){const n=(()=>{if(e==="fade in")return X.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return X.fadeIn;if(e==="slide in")switch(t){case"left":return X.slideInLeft;case"right":return X.slideInRight;case"top":return X.slideInTop;case"bottom":return X.slideInBottom;default:return X.slideInRight}return X.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return X.fadeOut;if(e==="slide in")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})(),a=(()=>{if(e==="fade in")return X.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return X.slideOutLeft;case"right":return X.slideOutRight;case"top":return X.slideOutTop;case"bottom":return X.slideOutBottom;default:return X.slideOutRight}return X.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:a}}const Ql=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:a,isPreviewMode:i})=>{const[c,s]=p.useState(!1),{url:d}=e.thumbnailBlock.cover;return p.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:X.heroImage,onClick:()=>s(!0)}),l.jsx(ec,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},ec=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:a,isEditor:i,metadata:c})=>{var m;const[s,d]=p.useState(0),[u,P]=p.useState(0),[y,x]=p.useState(!1),[h,b]=p.useState(!1),[L,v]=p.useState({}),S=p.useRef(null),f=p.useRef(null),B=p.useRef(null),N=p.useRef(!1),_=p.useRef(null),$=p.useRef(null),A=p.useRef(null),T=p.useRef(null),D=p.useRef(!1),C=p.useRef(null),[O,V]=p.useState(!1),{appear:J,triggers:U,slider:w,thumbnail:M,controls:R,area:H,caption:I,layout:k}=o.lightboxBlock,{appearClass:te,backdropAppearClass:oe,backdropDisappearClass:ce,disappearClass:q}=Jl(J.type,J.direction),F=(c==null?void 0:c.itemId)??null;p.useEffect(()=>{const g=()=>{setTimeout(()=>{var K,Z;(Z=(K=S.current)==null?void 0:K.splide)==null||Z.refresh()},16)},W=()=>{P(K=>K+1)};return window.addEventListener("ArticleEditor.Layout:change",g),window.addEventListener("ArticleEditor.ComponentContent:change",W),()=>{window.removeEventListener("ArticleEditor.Layout:change",g),window.removeEventListener("ArticleEditor.ComponentContent:change",W)}},[]),p.useEffect(()=>{if(!e||!M.isActive){V(!1);return}const g=C.current;if(!g)return;const W=()=>{w.direction==="horiz"?V(g.scrollWidth>g.clientWidth):V(g.scrollHeight>g.clientHeight)};W();const K=new ResizeObserver(W);return K.observe(g),()=>K.disconnect()},[e,M.isActive,n.length,L,w.direction]);const ne=p.useCallback(()=>{const g=window.matchMedia("(max-width: 768px)").matches,W=Fo(H.color);g&&!i&&W>.9&&(document.body.style.backgroundColor=""),x(!0),N.current=!0;const K=Z=>{Z.target===_.current&&Z.animationName&&(_.current&&$.current&&_.current.removeEventListener("animationend",$.current),$.current=null,N.current&&(N.current=!1,t()),x(!1))};_.current&&($.current=K,_.current.addEventListener("animationend",K))},[t,H.color,i]),xe=(g,W,K)=>{var Z,ee;if(g){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&s===n.length-1?ne():(Z=S.current)==null||Z.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const Q=g.getBoundingClientRect(),Y=W-Q.left,ie=K-Q.top,ve=Q.width,ue=Q.height;let be;w.direction==="horiz"?be=Y<ve/2?"-1":"+1":be=ie<ue/2?"-1":"+1",(ee=S.current)==null||ee.go(be)}}},ge=g=>{if(D.current){D.current=!1;return}const W=n[s],K=(W==null?void 0:W.image.objectFit)==="cover";let Z,ee;if("changedTouches"in g&&g.changedTouches.length>0)Z=g.changedTouches[0].clientX,ee=g.changedTouches[0].clientY;else if("clientX"in g)Z=g.clientX,ee=g.clientY;else return;let Q;if(K&&B.current){const Y=ko(B.current);Q=Z>=Y.left&&Z<=Y.right&&ee>=Y.top&&ee<=Y.bottom}else{const Y=B.current?Io(B.current):null;if(!Y){g.target===g.currentTarget&&ne();return}Q=Z>=Y.x&&Z<=Y.x+Y.width&&ee>=Y.y&&ee<=Y.y+Y.height}Q?xe(B.current,Z,ee):ne()},he=g=>{const W=g.target;(W.classList.contains(X.thumbsWrapper)||W.classList.contains(X.thumbsContainer))&&ge(g)};p.useEffect(()=>{if(!e)return;const g=W=>{var K,Z;if(W.key==="Escape"){ne();return}if(W.key==="ArrowRight"){d(ee=>(ee+1)%Math.max(n.length,1)),(K=S.current)==null||K.go("+1");return}W.key==="ArrowLeft"&&(d(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(Z=S.current)==null||Z.go("-1"))};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g)}},[e,ne,n.length]),p.useEffect(()=>{if(e){if(d(0),P(W=>W+1),N.current=!1,x(!1),b(!1),v({}),!F)return;const g=new CustomEvent("page-overlay",{detail:{itemId:F}});window.dispatchEvent(g)}return()=>{_.current&&$.current&&(_.current.removeEventListener("animationend",$.current),$.current=null),b(!1)}},[e,F]),p.useEffect(()=>{f.current!==null&&f.current!==w.type&&P(g=>g+1),f.current=w.type},[w.type]),p.useEffect(()=>{if(!e)return;const g=document.body.style.overflow,W=window.matchMedia("(max-width: 768px)").matches,K=Fo(H.color);document.body.style.overflow="hidden",b(!1);const Z=Q=>{Q.target===_.current&&!N.current&&Q.animationName&&(W&&!i&&K>.9&&(document.body.style.backgroundColor=H.color),b(!0),_.current&&A.current&&_.current.removeEventListener("animationend",A.current),A.current=null)};_.current&&(A.current=Z,_.current.addEventListener("animationend",Z));const ee=Q=>{const Y=Q.target;Y&&(Y.closest(`.${X.thumbsWrapper}`)||Y.closest(`.${X.thumbsContainer}`))||w.type!=="slide"&&Q.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=g,document.removeEventListener("touchmove",ee),_.current&&A.current&&(_.current.removeEventListener("animationend",A.current),A.current=null),b(!1)}},[e,i,H.color,w.type]),p.useEffect(()=>{if(!e)return;const g=W=>{var Z,ee;if(N.current){W.stopPropagation();return}if(D.current){D.current=!1;return}const K=W.target;if(!(K&&(K.closest(`.${X.thumbsContainer}`)||K.closest(`.${X.thumbItem}`)||K.closest(`.${X.arrow}`)||K.closest(`.${X.closeButton}`)||K.closest(`.${X.caption}`)))){if(w.type==="slide"&&U.type==="drag"&&((ee=(Z=S.current)==null?void 0:Z.splide)!=null&&ee.root)){const Q=S.current.splide.root;if(K&&(Q.contains(K)||Q===K))return}if(W.touches.length===0&&W.changedTouches.length>0){const Q=n[s],Y=(Q==null?void 0:Q.image.objectFit)==="cover",ie=W.changedTouches[0];let ve;if(Y&&B.current){const ue=ko(B.current);ve=ie.clientX>=ue.left&&ie.clientX<=ue.right&&ie.clientY>=ue.top&&ie.clientY<=ue.bottom}else{const ue=B.current?Io(B.current):null;if(!ue)return;ve=ie.clientX>=ue.x&&ie.clientX<=ue.x+ue.width&&ie.clientY>=ue.y&&ie.clientY<=ue.y+ue.height}if(!ve){W.stopPropagation(),N.current=!0;const ue=be=>{be.stopPropagation(),be.preventDefault(),document.removeEventListener("click",ue,!0)};document.addEventListener("click",ue,!0),ne()}}}};return document.addEventListener("touchend",g,{passive:!0}),()=>{document.removeEventListener("touchend",g)}},[e,ne,s,n]);const Le=(w.type==="scale"||w.type==="fade")&&w.direction==="vert"&&U.type==="drag";p.useEffect(()=>{var be,j;if(!e||!Le||!((j=(be=S.current)==null?void 0:be.splide)!=null&&j.root))return;const g=S.current.splide.root,W=30,K=(G,z)=>{if(T.current){const le=Math.abs(G-T.current.x),Se=Math.abs(z-T.current.y);(le>0||Se>0)&&(D.current=!0)}},Z=G=>{T.current&&(G.preventDefault(),K(G.clientX,G.clientY))},ee=G=>{T.current&&G.touches.length>0&&(G.preventDefault(),K(G.touches[0].clientX,G.touches[0].clientY))},Q=(G,z)=>{if(!T.current||!S.current){T.current=null;return}const le=Math.abs(G-T.current.x),Se=Math.abs(z-T.current.y);Se>W&&Se>le&&S.current.go(z<T.current.y?"+1":"-1"),T.current=null},Y=G=>{T.current&&Q(G.clientX,G.clientY),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("pointermove",Z)},ie=G=>{if(T.current){if(G.changedTouches.length>0){const z=G.changedTouches[0];Q(z.clientX,z.clientY)}document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),document.removeEventListener("touchmove",ee)}},ve=G=>{T.current={x:G.clientX,y:G.clientY},D.current=!1,document.addEventListener("pointermove",Z,{passive:!1}),document.addEventListener("pointerup",Y),document.addEventListener("pointercancel",Y)},ue=G=>{G.touches.length>0&&(T.current={x:G.touches[0].clientX,y:G.touches[0].clientY},D.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ie),document.addEventListener("touchcancel",ie))};return g.addEventListener("pointerdown",ve),g.addEventListener("touchstart",ue),()=>{g.removeEventListener("pointerdown",ve),g.removeEventListener("touchstart",ue),document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ie),document.removeEventListener("touchcancel",ie),T.current=null,D.current=!1}},[e,Le,u]);const He={backgroundColor:H.color,backdropFilter:`blur(${H.blur}px)`,animationDuration:`${parseInt(J.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:Qo.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:_,className:$e(X.background,y?ce:oe,{[X.editor]:i},{[X.hidden]:!e}),style:{...He,...h&&!i&&!y?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?_:null,className:$e(X.contentStyle,y?q:te,{[X.editor]:i},{[X.hidden]:!e}),style:{animationDuration:`${parseInt(J.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ao,{onMove:g=>d(g.index),ref:S,className:X.lightboxSplide,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,direction:w.direction==="horiz"||w.type==="fade"||w.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!Le,perPage:1,width:"100%",height:"100%",type:w.type==="fade"||w.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":w.duration},children:n.map((g,W)=>{const K=On(k.position,k.offset,i),Z=`${E.scalingValue(k.padding.top,i)} ${E.scalingValue(k.padding.right,i)} ${E.scalingValue(k.padding.bottom,i)} ${E.scalingValue(k.padding.left,i)}`,ee=w.type==="scale"?(()=>{const{transform:Q,...Y}=K;return{...Y,position:"absolute",padding:Z,boxSizing:"border-box","--position-transform":Q||"none"}})():{...K,position:"absolute",padding:Z,boxSizing:"border-box"};return l.jsx(so,{children:l.jsx("div",{className:X.imgWrapper,onClick:ge,children:l.jsx("img",{ref:W===s?B:null,className:$e(X.imageStyle,{[X.contain]:g.image.objectFit==="contain",[X.cover]:g.image.objectFit==="cover",[X.scaleSlide]:w.type==="scale"}),src:g.image.url,alt:g.image.name??"",style:{...ee,pointerEvents:g.image.objectFit==="contain"?"none":"auto"}})})},W)})},u),R.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:$e(X.arrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x,i)}, ${E.scalingValue(R.offset.y*(w.direction==="horiz"?1:-1),i)}) scale(${R.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=S.current)==null?void 0:g.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&l.jsx(Lt,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:$e(X.arrowImg,X.mirror)}),!R.arrowsImgUrl&&l.jsx(Mo,{color:R.color,className:$e(X.arrowIcon,X.arrowImg,X.mirror)})]})}),l.jsx("div",{className:$e(X.arrow,X.nextArrow,{[X.arrowVertical]:w.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:X.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x*(w.direction==="horiz"?-1:1),i)}, ${E.scalingValue(R.offset.y,i)}) scale(${R.scale}) rotate(${w.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var g;return(g=S.current)==null?void 0:g.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&l.jsx(Lt,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:X.arrowImg}),!R.arrowsImgUrl&&l.jsx(Mo,{color:R.color,className:$e(X.arrowIcon,X.arrowImg)})]})})]}),H.closeIconUrl&&(()=>{const g=On(H.closeIconAlign,H.closeIconOffset,i),W=`scale(${H.closeIconScale})`,K=g.transform?`${g.transform} ${W}`:W;return l.jsx("button",{className:X.closeButton,style:{...g,transform:K},onClick:ne,"aria-label":"Close lightbox",children:l.jsx(Lt,{url:H.closeIconUrl,fill:H.closeIconColor??"#000000",hoverFill:H.closeIconHover??"#cccccc"})})})(),I&&I.isActive&&r.imageCaption&&((m=n[s])==null?void 0:m.imageCaption)&&(()=>{const{widthSettings:g,fontSettings:W,letterSpacing:K,textAlign:Z,wordSpacing:ee,fontSizeLineHeight:Q,textAppearance:Y,color:ie}=r.imageCaption;return l.jsx("div",{className:X.caption,style:{...On(I.alignment,I.offset,i),fontFamily:fr(W.fontFamily),fontWeight:W.fontWeight,fontStyle:W.fontStyle,width:g.sizing==="auto"?"max-content":E.scalingValue(g.width,i),letterSpacing:E.scalingValue(K,i),wordSpacing:E.scalingValue(ee,i),textAlign:Z,fontSize:E.scalingValue(Q.fontSize,i),lineHeight:E.scalingValue(Q.lineHeight,i),textTransform:Y.textTransform??"none",textDecoration:Y.textDecoration??"none",fontVariant:Y.fontVariant??"normal",color:ie},onClick:ve=>ve.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:X.captionTextInner,style:{"--link-color":I.linkColor,"--link-hover-color":I.linkHoverColor},children:l.jsx(wn,{content:n[s].imageCaption})})})})(),M.isActive&&(()=>{const[g,W]=M.position.split("-"),K=w.direction==="horiz"?`${g}-left`:M.position,Z=On(K,M.offset,i),ee=()=>{if(w.direction==="horiz"){if(W==="left")return"flex-start";if(W==="center")return"center";if(W==="right")return"flex-end"}else{if(g==="top")return"flex-start";if(g==="middle")return"center";if(g==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:C,className:X.thumbsWrapper,onClick:Q=>he(Q),style:{position:i?"absolute":"fixed",...Z,...w.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:$e(X.thumbsContainer,{[X.thumbsContainerVertical]:w.direction==="vert",[X.thumbsAlignStart]:M.align==="start",[X.thumbsAlignCenter]:M.align==="center",[X.thumbsAlignEnd]:M.align==="end"}),style:{gap:E.scalingValue(M.grid.gap,i),justifyContent:O?"flex-start":ee()},children:n.map((Q,Y)=>{const ie=Y===s,ve=L[Y],be=M.grid.size*(ie?M.activeState.scale:1),j=()=>{if(M.fit!=="fit")return{};if(!ve)return w.direction==="horiz"?{height:E.scalingValue(be,i)}:{width:E.scalingValue(be,i)};const G=ve.width/ve.height;if(w.direction==="horiz"){const z=be,le=z*G;return{width:E.scalingValue(le,i),height:E.scalingValue(z,i)}}else{const z=be,le=z/G;return{width:E.scalingValue(z,i),height:E.scalingValue(le,i)}}};return l.jsx("button",{className:X.thumbItem,style:{...w.direction==="horiz"&&M.fit!=="fit"?{height:E.scalingValue(be,i)}:{},...w.direction==="vert"&&M.fit!=="fit"?{width:E.scalingValue(be,i)}:{},...M.fit==="cover"?{width:E.scalingValue(be,i),height:E.scalingValue(be,i)}:{},...j(),transition:ie?"all 0.25s ease-out":"none",opacity:ie?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:G=>{var z;G.stopPropagation(),d(Y),(z=S.current)==null||z.go(Y)},onMouseEnter:()=>{var G;M.triggers==="hov"&&((G=S.current)==null||G.go(Y))},children:l.jsx("img",{src:Q.image.url,alt:Q.image.name??"",onLoad:G=>{const z=G.currentTarget;z.naturalWidth&&z.naturalHeight&&v(le=>({...le,[Y]:{width:z.naturalWidth,height:z.naturalHeight}}))},style:{objectFit:M.fit==="cover"?"cover":"contain",...M.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...M.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Q.image.name}-${Y}`)})})})})()]})]}),document.getElementById(a))};function Mo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const tc={element:Ql,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},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 Vn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function nc(e){return`
6
+ */const Zs="RichTextRenderer-module__link___BWeZ2",Js={link:Zs},Qs=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},fr=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Qs(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function mt(e){const{color:t,...n}=e;return n}function Ge(e,t){var i,a,o;const{fontSize:n,lineHeight:r}=e;return{fontFamily:fr(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(n,t),lineHeight:r!==void 0?E.scalingValue(r,t):void 0,textTransform:(i=e.textAppearance)==null?void 0:i.textTransform,textDecoration:(a=e.textAppearance)==null?void 0:a.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,textAlign:e.textAlign,color:e.color}}const wn=({content:e})=>{const t=n=>n.map((r,i)=>r.type==="link"?l.jsx("a",{className:Js.link,href:r.value,target:r.target,children:t(r.children)},i):l.jsx("span",{style:el(r),children:r.text},i));return l.jsx(l.Fragment,{children:e.map((n,r)=>{const i=n.children;return l.jsx("div",{children:t(i)},r)})})};function el(e){return{...e.fontFamily&&{fontFamily:fr(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 tl="SvgImage-module__svg___q3xE-",nl="SvgImage-module__img___VsTm-",Ro={svg:tl,img:nl},rl=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},ol=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,At=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:i})=>{const[a,o]=p.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return p.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');o(c)}},[]),!rl(e)||!a?l.jsx("img",{src:e,alt:"",className:Te(Ro.img,r),style:i}):l.jsx("span",{"data-supports-mask":a,className:Te(Ro.svg,r),style:{"--svg":ol(e),"--fill":t,"--hover-fill":n,...i??{}}})},il={"top-left":ae.topLeftAlignment,"top-center":ae.topCenterAlignment,"top-right":ae.topRightAlignment,"middle-left":ae.middleLeftAlignment,"middle-center":ae.middleCenterAlignment,"middle-right":ae.middleRightAlignment,"bottom-left":ae.bottomLeftAlignment,"bottom-center":ae.bottomCenterAlignment,"bottom-right":ae.bottomRightAlignment};function al({settings:e,content:t,styles:n,isEditor:r}){const[i,a]=p.useState(null),{widthSettings:o,fontSettings:c,letterSpacing:s,textAlign:d,wordSpacing:u,fontSizeLineHeight:P,textAppearance:v,color:x}=n.imageCaption,[h,g]=p.useState(void 0),[T,L]=p.useState(null),[b,m]=p.useState(0),[H,F]=p.useState(0),{direction:_,transition:C,controls:W,pagination:w,imageCaption:O,triggers:S}=e,V=p.useRef(C.type),{x:D,y:Z}=e.controls.offset,U=$=>{i&&i.go($)};return p.useEffect(()=>{if(!T)return;const $=new ResizeObserver(k=>{if(!i)return;const[R]=k;g({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return $.observe(T),()=>$.unobserve(T)},[T]),p.useEffect(()=>{!i||V.current===C.type||(F($=>$+1),V.current=C.type)},[C.type]),l.jsx("div",{className:Te(ae.wrapper,{[ae.editor]:r}),ref:L,children:l.jsxs("div",{className:ae.sliderInner,style:{width:h?h.width:"100%",height:h?h.height:"100%",backgroundColor:C.backgroundColor&&C.type==="fade in"?C.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:Te(ae.captionBlock),children:l.jsx("div",{className:ae.captionTextWrapper,children:t.map(($,k)=>l.jsx("div",{className:Te(ae.captionText,il[O.alignment],{[ae.withPointerEvents]:k===b&&r,[ae.active]:k===b}),style:{fontFamily:fr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:o.sizing==="auto"?"max-content":E.scalingValue(o.width,r),letterSpacing:E.scalingValue(s,r),wordSpacing:E.scalingValue(u,r),textAlign:d,fontSize:E.scalingValue(P.fontSize,r),lineHeight:E.scalingValue(P.lineHeight,r),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:x,transitionDuration:C.duration?`${Math.round(parseInt(C.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:ae.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:E.scalingValue(O.offset.y,r),left:E.scalingValue(O.offset.x,r)},children:l.jsx(wn,{content:$.imageCaption})})},k))})}),l.jsx(ao,{onMove:$=>{m($.index)},ref:a,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,autoplay:S.autoPlay!==null,...S.autoPlay!==null&&{interval:parseInt(S.autoPlay)*1e3},direction:_==="horiz"||C.type==="fade in"?"ltr":"ttb",pagination:!1,drag:S.triggersList.drag,perPage:1,width:h?h.width:"100%",height:h?h.height:"100%",type:C.type==="fade in"?"fade":"loop",rewind:!0},children:t.map(($,k)=>l.jsx(so,{children:l.jsx("div",{className:ae.sliderItem,children:l.jsx("div",{className:ae.imgWrapper,children:l.jsx("img",{className:Te(ae.sliderImage,{[ae.contain]:$.image.objectFit==="contain",[ae.cover]:$.image.objectFit==="cover"}),src:$.image.url,alt:$.image.name??""})})})},k))},H),W.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Te(ae.arrow,{[ae.arrowVertical]:_==="vert",[ae.hoverArrow]:W.show==="on hover"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:l.jsxs("button",{onClick:()=>{U("-1")},className:ae.arrowInner,style:{transform:`translate(${E.scalingValue(D,r)}, ${E.scalingValue(Z*(_==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[W.arrowsImgUrl&&l.jsx(At,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:Te(ae.arrowImg,ae.mirror)}),!W.arrowsImgUrl&&l.jsx(Wo,{color:W.color,className:Te(ae.arrowIcon,ae.arrowImg,ae.mirror)})]})}),l.jsx("div",{className:Te(ae.arrow,ae.nextArrow,{[ae.arrowVertical]:_==="vert",[ae.hoverArrow]:W.show==="on hover"}),style:{color:W.color,"--arrow-hover-color":W.hover},children:l.jsxs("button",{className:ae.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${E.scalingValue(D*(_==="horiz"?-1:1),r)}, ${E.scalingValue(Z,r)}) scale(${e.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[W.arrowsImgUrl&&l.jsx(At,{url:W.arrowsImgUrl,fill:W.color,hoverFill:W.hover,className:ae.arrowImg}),!W.arrowsImgUrl&&l.jsx(Wo,{color:W.color,className:Te(ae.arrowIcon,ae.arrowImg)})]})})]}),S.triggersList.click&&l.jsx("div",{className:ae.clickOverlay,onClick:()=>{i&&i.go("+1")}}),w.isActive&&l.jsx("div",{className:Te(ae.pagination,{[ae.paginationInsideBottom]:w.position==="inside-1"&&_==="horiz",[ae.paginationInsideTop]:w.position==="inside-2"&&_==="horiz",[ae.paginationOutsideBottom]:w.position==="outside-1"&&_==="horiz",[ae.paginationOutsideTop]:w.position==="outside-2"&&_==="horiz",[ae.paginationInsideLeft]:w.position==="inside-1"&&_==="vert",[ae.paginationInsideRight]:w.position==="inside-2"&&_==="vert",[ae.paginationOutsideLeft]:w.position==="outside-1"&&_==="vert",[ae.paginationOutsideRight]:w.position==="outside-2"&&_==="vert",[ae.paginationVertical]:_==="vert"}),children:l.jsx("div",{className:ae.paginationInner,style:{backgroundColor:w.colors[2],transform:`scale(${w.scale/100}) translate(${E.scalingValue(w.offset.x,r)}, ${E.scalingValue(w.offset.y,r)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:t.map(($,k)=>l.jsx("button",{onClick:()=>{i&&i.go(k)},className:Te(ae.paginationItem),children:l.jsx("div",{className:Te(ae.dot,{[ae.activeDot]:k===b}),style:{backgroundColor:k===b?w.colors[0]:w.colors[1],"--pagination-hover-color":w.hover}})},k))})})]})})}function Wo({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const sl={element:al,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},ll="ImageRevealSlider-module__imageRevealSlider___UE5Ob",cl="ImageRevealSlider-module__image___Qjt-e",dl="ImageRevealSlider-module__link___N-iLG",ul="ImageRevealSlider-module__cursor___2U03d",Gt={imageRevealSlider:ll,image:cl,link:dl,cursor:ul};function Io(e,t,n){for(const r of n){const i=new Image;i.src=r.url;const a=r.width?Number.parseFloat(r.width):i.naturalWidth,o=i.naturalHeight/i.naturalWidth*a,c=a/2,s=o/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function wr(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function pl(e,t,n,r){let i,a;if(t==="custom"){i=n;const o=await wr(e);a=o.height/o.width*i}else if(t==="random"){i=Math.random()*(r.max-r.min)+r.min;const o=await wr(e);a=o.height/o.width*i}else{const o=await wr(e);i=o.width,a=o.height}return{width:i,height:a,finalWidth:`${i}px`}}function ml({settings:e,content:t,isEditor:n}){const[r,i]=p.useState(null),[a,o]=p.useState([]),[c,s]=p.useState(0),d=p.useRef(0),[u,P]=p.useState({x:0,y:0}),[v,x]=p.useState(1),[h,g]=p.useState("none"),T=p.useRef({x:0,y:0}),[L,b]=p.useState(!1),{sizeType:m,imageWidth:H,randomRangeImageWidth:F}=e.imageSize,{revealPosition:_,visible:C}=e.position,{cursorType:W,target:w,defaultCursorScale:O,defaultCursor:S,hoverCursorScale:V,hoverCursor:D}=e.cursor;p.useEffect(()=>{if(!r)return;const $=(B,I)=>{const A=r.getBoundingClientRect(),Q=B-A.left,oe=I-A.top;if(P({x:Q,y:oe}),W==="system"){g("none"),x(1);return}const ie=Q,z=oe,M=document.elementFromPoint(A.left+ie,A.top+z);if(M&&M.closest("a")){g("none"),x(1);return}const re=Io(ie,z,a)||w==="area"?{img:D??"none",scale:V}:{img:S??"none",scale:O};g(re.img),x(re.scale)},k=B=>{B.stopPropagation(),T.current={x:B.clientX,y:B.clientY},$(B.clientX,B.clientY)},R=()=>{L&&$(T.current.x,T.current.y)};return r.addEventListener("mousemove",k),window.addEventListener("scroll",R,!0),()=>{r.removeEventListener("mousemove",k),window.removeEventListener("scroll",R,!0)}},[r,L,u,W,w,D,S,V,O,a]),p.useEffect(()=>{L||(g("none"),x(0))},[L]);const Z=async($,k,R,B={})=>{const{width:I,height:A,finalWidth:Q}=await pl($.image.url,m,H,F);let oe=0,ie=0;_==="same"?(oe=k/2,ie=R/2):(oe=B.x??Math.random()*k,ie=B.y??Math.random()*R);const z=Math.min(Math.max(oe,I/2),k-I/2),M=Math.min(Math.max(ie,A/2),R-A/2);return{id:d.current++,url:$.image.url,link:$.link,name:$.image.name,x:z,y:M,width:Q}};p.useEffect(()=>{if(!r||t.length===0)return;const $=r.getBoundingClientRect(),k=$.width,R=$.height,B=[];(async()=>{const A=t[0],Q=await Z(A,k,R);B.push(Q),o(B),s(1)})()},[m,H,F,_,r]),p.useEffect(()=>{C==="last One"&&o($=>$.length>0?[$[$.length-1]]:[])},[C]);const U=async $=>{if(!r)return;const k=r.getBoundingClientRect(),R=$.clientX-k.left,B=$.clientY-k.top;if(w==="image"&&!Io(R,B,a))return;let I=0,A=0;_==="on Click"?(I=R,A=B):_==="same"?(I=k.width/2,A=k.height/2):(I=Math.random()*k.width,A=Math.random()*k.height);const Q=t[c],oe=await Z(Q,k.width,k.height,{x:I,y:A});o(ie=>C==="all"?[...ie,oe]:[oe]),s(ie=>ie>=t.length-1?0:ie+1)};return l.jsxs("div",{ref:i,onClick:U,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:Gt.imageRevealSlider,style:{cursor:h==="none"?"default":"none"},children:[a.map($=>l.jsx("div",{className:Gt.wrapper,style:{top:`${$.y}px`,left:`${$.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:$.width??"auto",height:"auto",cursor:h==="none"?"default":"none"},children:w==="area"&&$.link?l.jsx("a",{href:$.link,target:"_blank",className:Gt.link,children:l.jsx("img",{src:$.url,alt:$.name,className:Gt.image},$.id)}):l.jsx("img",{src:$.url,alt:$.name,className:Gt.image},$.id)},$.id)),L&&l.jsx("div",{className:Gt.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${h}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const gl={element:ml,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{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:""}]}}}},hl="LightBox-module__hidden___9s-9x",fl="LightBox-module__heroImage___sTxNF",yl="LightBox-module__background___rm9ml",vl="LightBox-module__editor___4ACaY",bl="LightBox-module__contentStyle___Bgnsq",xl="LightBox-module__imageStyle___tLIlB",Cl="LightBox-module__imgWrapper___LuFUp",Sl="LightBox-module__contain___8-yaS",wl="LightBox-module__cover___hNvOG",$l="LightBox-module__caption___b6L2I",Tl="LightBox-module__captionTextInner___rCGNH",Ll="LightBox-module__lightboxSplide___XFuWC",El="LightBox-module__arrow___iz38X",Pl="LightBox-module__arrowVertical___Zfz81",_l="LightBox-module__nextArrow___zkAQN",Al="LightBox-module__arrowInner___p48sW",Rl="LightBox-module__arrowIcon___3VaFf",Wl="LightBox-module__arrowImg___pNV88",Il="LightBox-module__mirror___pjeXc",kl="LightBox-module__thumbsWrapper___GB-nU",Fl="LightBox-module__thumbsContainerVertical___wttk5",Ml="LightBox-module__thumbsContainer___osSma",Nl="LightBox-module__thumbsAlignStart___MO6tY",Hl="LightBox-module__thumbsAlignCenter___Q4sUx",Bl="LightBox-module__thumbsAlignEnd___p4y9R",Ol="LightBox-module__thumbItem___HvnF3",Vl="LightBox-module__closeButton___g2khP",Dl="LightBox-module__fadeIn___0m5GW",jl="LightBox-module__slideInLeft___gPYwC",zl="LightBox-module__slideInRight___S-pPp",Kl="LightBox-module__slideInTop___DFdAj",ql="LightBox-module__slideInBottom___m27kZ",Ul="LightBox-module__fadeOut___55qBR",Gl="LightBox-module__slideOutLeft___NvU7P",Yl="LightBox-module__slideOutRight___SK7eC",Xl="LightBox-module__slideOutTop___Vgg0z",Zl="LightBox-module__slideOutBottom___nJ0Ef",Jl="LightBox-module__scaleSlide___vZriG",J={hidden:hl,heroImage:fl,background:yl,editor:vl,contentStyle:bl,imageStyle:xl,imgWrapper:Cl,contain:Sl,cover:wl,caption:$l,captionTextInner:Tl,lightboxSplide:Ll,arrow:El,arrowVertical:Pl,nextArrow:_l,arrowInner:Al,arrowIcon:Rl,arrowImg:Wl,mirror:Il,thumbsWrapper:kl,thumbsContainerVertical:Fl,thumbsContainer:Ml,thumbsAlignStart:Nl,thumbsAlignCenter:Hl,thumbsAlignEnd:Bl,thumbItem:Ol,closeButton:Vl,fadeIn:Dl,slideInLeft:jl,slideInRight:zl,slideInTop:Kl,slideInBottom:ql,fadeOut:Ul,slideOutLeft:Gl,slideOutRight:Yl,slideOutTop:Xl,slideOutBottom:Zl,scaleSlide:Jl},On=(e,t,n)=>{const r={},[i,a]=e.split("-");return i==="top"?(r.top="0",r.bottom="auto"):i==="middle"?(r.top="50%",r.bottom="auto"):i==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),i==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:i==="middle"?r.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:r.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,r};function Ni(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 ko(e){const t=e.getBoundingClientRect(),n=Ni(e),r=Math.max(0,t.width-n.left-n.right),i=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,o=e.naturalHeight,c=r/i,s=a/o;let d,u;s>c?(d=r,u=r/s):(u=i,d=i*s);const P=t.left+n.left,v=t.top+n.top,x=(r-d)/2+P,h=(i-u)/2+v;return{x,y:h,width:d,height:u}}function Fo(e){const t=e.getBoundingClientRect(),n=Ni(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Mo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(i=>parseFloat(i.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Ql(e,t){const n=(()=>{if(e==="fade in")return J.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return J.fadeIn;if(e==="slide in")switch(t){case"left":return J.slideInLeft;case"right":return J.slideInRight;case"top":return J.slideInTop;case"bottom":return J.slideInBottom;default:return J.slideInRight}return J.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return J.fadeOut;if(e==="slide in")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})(),a=(()=>{if(e==="fade in")return J.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return J.slideOutLeft;case"right":return J.slideOutRight;case"top":return J.slideOutTop;case"bottom":return J.slideOutBottom;default:return J.slideOutRight}return J.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:i,disappearClass:a}}const ec=({settings:e,content:t,styles:n,portalId:r,activeEvent:i,isEditor:a,isPreviewMode:o})=>{const[c,s]=p.useState(!1),{url:d}=e.thumbnailBlock.cover;return p.useEffect(()=>{i==="close"&&s(!1),i==="open"&&s(!0)},[i]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:d,alt:"Cover",className:J.heroImage,onClick:()=>s(!0)}),l.jsx(tc,{isOpen:c,onClose:()=>s(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},tc=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:i,portalId:a,isEditor:o,metadata:c})=>{var y;const[s,d]=p.useState(0),[u,P]=p.useState(0),[v,x]=p.useState(!1),[h,g]=p.useState(!1),[T,L]=p.useState({}),b=p.useRef(null),m=p.useRef(null),H=p.useRef(null),F=p.useRef(!1),_=p.useRef(null),C=p.useRef(null),W=p.useRef(null),w=p.useRef(null),O=p.useRef(!1),S=p.useRef(null),[V,D]=p.useState(!1),{appear:Z,triggers:U,slider:$,thumbnail:k,controls:R,area:B,caption:I,layout:A}=i.lightboxBlock,{appearClass:Q,backdropAppearClass:oe,backdropDisappearClass:ie,disappearClass:z}=Ql(Z.type,Z.direction),M=(c==null?void 0:c.itemId)??null;p.useEffect(()=>{const f=()=>{setTimeout(()=>{var q,G;(G=(q=b.current)==null?void 0:q.splide)==null||G.refresh()},16)},N=()=>{P(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",f),window.addEventListener("ArticleEditor.ComponentContent:change",N),()=>{window.removeEventListener("ArticleEditor.Layout:change",f),window.removeEventListener("ArticleEditor.ComponentContent:change",N)}},[]),p.useEffect(()=>{if(!e||!k.isActive){D(!1);return}const f=S.current;if(!f)return;const N=()=>{$.direction==="horiz"?D(f.scrollWidth>f.clientWidth):D(f.scrollHeight>f.clientHeight)};N();const q=new ResizeObserver(N);return q.observe(f),()=>q.disconnect()},[e,k.isActive,n.length,T,$.direction]);const re=p.useCallback(()=>{const f=window.matchMedia("(max-width: 768px)").matches,N=Mo(B.color);f&&!o&&N>.9&&(document.body.style.backgroundColor=""),x(!0),F.current=!0;const q=G=>{G.target===_.current&&G.animationName&&(_.current&&C.current&&_.current.removeEventListener("animationend",C.current),C.current=null,F.current&&(F.current=!1,t()),x(!1))};_.current&&(C.current=q,_.current.addEventListener("animationend",q))},[t,B.color,o]),Ce=(f,N,q)=>{var G,ee;if(f){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&s===n.length-1?re():(G=b.current)==null||G.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const te=f.getBoundingClientRect(),X=N-te.left,ce=q-te.top,ve=te.width,de=te.height;let xe;$.direction==="horiz"?xe=X<ve/2?"-1":"+1":xe=ce<de/2?"-1":"+1",(ee=b.current)==null||ee.go(xe)}}},ue=f=>{if(O.current){O.current=!1;return}const N=n[s],q=(N==null?void 0:N.image.objectFit)==="cover";let G,ee;if("changedTouches"in f&&f.changedTouches.length>0)G=f.changedTouches[0].clientX,ee=f.changedTouches[0].clientY;else if("clientX"in f)G=f.clientX,ee=f.clientY;else return;let te;if(q&&H.current){const X=Fo(H.current);te=G>=X.left&&G<=X.right&&ee>=X.top&&ee<=X.bottom}else{const X=H.current?ko(H.current):null;if(!X){f.target===f.currentTarget&&re();return}te=G>=X.x&&G<=X.x+X.width&&ee>=X.y&&ee<=X.y+X.height}te?Ce(H.current,G,ee):re()},he=f=>{const N=f.target;(N.classList.contains(J.thumbsWrapper)||N.classList.contains(J.thumbsContainer))&&ue(f)};p.useEffect(()=>{if(!e)return;const f=N=>{var q,G;if(N.key==="Escape"){re();return}if(N.key==="ArrowRight"){d(ee=>(ee+1)%Math.max(n.length,1)),(q=b.current)==null||q.go("+1");return}N.key==="ArrowLeft"&&(d(ee=>(ee-1+Math.max(n.length,1))%Math.max(n.length,1)),(G=b.current)==null||G.go("-1"))};return window.addEventListener("keydown",f),()=>{window.removeEventListener("keydown",f)}},[e,re,n.length]),p.useEffect(()=>{if(e){if(d(0),P(N=>N+1),F.current=!1,x(!1),g(!1),L({}),!M)return;const f=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(f)}return()=>{_.current&&C.current&&(_.current.removeEventListener("animationend",C.current),C.current=null),g(!1)}},[e,M]),p.useEffect(()=>{m.current!==null&&m.current!==$.type&&P(f=>f+1),m.current=$.type},[$.type]),p.useEffect(()=>{if(!e)return;const f=document.body.style.overflow,N=window.matchMedia("(max-width: 768px)").matches,q=Mo(B.color);document.body.style.overflow="hidden",g(!1);const G=te=>{te.target===_.current&&!F.current&&te.animationName&&(N&&!o&&q>.9&&(document.body.style.backgroundColor=B.color),g(!0),_.current&&W.current&&_.current.removeEventListener("animationend",W.current),W.current=null)};_.current&&(W.current=G,_.current.addEventListener("animationend",G));const ee=te=>{const X=te.target;X&&(X.closest(`.${J.thumbsWrapper}`)||X.closest(`.${J.thumbsContainer}`))||$.type!=="slide"&&te.preventDefault()};return document.addEventListener("touchmove",ee,{passive:!1}),()=>{document.body.style.overflow=f,document.removeEventListener("touchmove",ee),_.current&&W.current&&(_.current.removeEventListener("animationend",W.current),W.current=null),g(!1)}},[e,o,B.color,$.type]),p.useEffect(()=>{if(!e)return;const f=N=>{var G,ee;if(F.current){N.stopPropagation();return}if(O.current){O.current=!1;return}const q=N.target;if(!(q&&(q.closest(`.${J.thumbsContainer}`)||q.closest(`.${J.thumbItem}`)||q.closest(`.${J.arrow}`)||q.closest(`.${J.closeButton}`)||q.closest(`.${J.caption}`)))){if($.type==="slide"&&U.type==="drag"&&((ee=(G=b.current)==null?void 0:G.splide)!=null&&ee.root)){const te=b.current.splide.root;if(q&&(te.contains(q)||te===q))return}if(N.touches.length===0&&N.changedTouches.length>0){const te=n[s],X=(te==null?void 0:te.image.objectFit)==="cover",ce=N.changedTouches[0];let ve;if(X&&H.current){const de=Fo(H.current);ve=ce.clientX>=de.left&&ce.clientX<=de.right&&ce.clientY>=de.top&&ce.clientY<=de.bottom}else{const de=H.current?ko(H.current):null;if(!de)return;ve=ce.clientX>=de.x&&ce.clientX<=de.x+de.width&&ce.clientY>=de.y&&ce.clientY<=de.y+de.height}if(!ve){N.stopPropagation(),F.current=!0;const de=xe=>{xe.stopPropagation(),xe.preventDefault(),document.removeEventListener("click",de,!0)};document.addEventListener("click",de,!0),re()}}}};return document.addEventListener("touchend",f,{passive:!0}),()=>{document.removeEventListener("touchend",f)}},[e,re,s,n]);const Re=($.type==="scale"||$.type==="fade")&&$.direction==="vert"&&U.type==="drag";p.useEffect(()=>{var xe,K;if(!e||!Re||!((K=(xe=b.current)==null?void 0:xe.splide)!=null&&K.root))return;const f=b.current.splide.root,N=30,q=(Y,j)=>{if(w.current){const le=Math.abs(Y-w.current.x),we=Math.abs(j-w.current.y);(le>0||we>0)&&(O.current=!0)}},G=Y=>{w.current&&(Y.preventDefault(),q(Y.clientX,Y.clientY))},ee=Y=>{w.current&&Y.touches.length>0&&(Y.preventDefault(),q(Y.touches[0].clientX,Y.touches[0].clientY))},te=(Y,j)=>{if(!w.current||!b.current){w.current=null;return}const le=Math.abs(Y-w.current.x),we=Math.abs(j-w.current.y);we>N&&we>le&&b.current.go(j<w.current.y?"+1":"-1"),w.current=null},X=Y=>{w.current&&te(Y.clientX,Y.clientY),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("pointermove",G)},ce=Y=>{if(w.current){if(Y.changedTouches.length>0){const j=Y.changedTouches[0];te(j.clientX,j.clientY)}document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),document.removeEventListener("touchmove",ee)}},ve=Y=>{w.current={x:Y.clientX,y:Y.clientY},O.current=!1,document.addEventListener("pointermove",G,{passive:!1}),document.addEventListener("pointerup",X),document.addEventListener("pointercancel",X)},de=Y=>{Y.touches.length>0&&(w.current={x:Y.touches[0].clientX,y:Y.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",ee,{passive:!1}),document.addEventListener("touchend",ce),document.addEventListener("touchcancel",ce))};return f.addEventListener("pointerdown",ve),f.addEventListener("touchstart",de),()=>{f.removeEventListener("pointerdown",ve),f.removeEventListener("touchstart",de),document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",X),document.removeEventListener("pointercancel",X),document.removeEventListener("touchmove",ee),document.removeEventListener("touchend",ce),document.removeEventListener("touchcancel",ce),w.current=null,O.current=!1}},[e,Re,u]);const ne={backgroundColor:B.color,backdropFilter:`blur(${B.blur}px)`,animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:ei.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:o?null:_,className:Te(J.background,v?ie:oe,{[J.editor]:o},{[J.hidden]:!e}),style:{...ne,...h&&!o&&!v?{position:"absolute"}:{}}}),l.jsxs("div",{ref:o?_:null,className:Te(J.contentStyle,v?z:Q,{[J.editor]:o},{[J.hidden]:!e}),style:{animationDuration:`${parseInt(Z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ao,{onMove:f=>d(f.index),ref:b,className:J.lightboxSplide,options:{arrows:!1,speed:$.duration?parseInt($.duration):500,direction:$.direction==="horiz"||$.type==="fade"||$.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!Re,perPage:1,width:"100%",height:"100%",type:$.type==="fade"||$.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":$.duration},children:n.map((f,N)=>{const q=On(A.position,A.offset,o),G=`${E.scalingValue(A.padding.top,o)} ${E.scalingValue(A.padding.right,o)} ${E.scalingValue(A.padding.bottom,o)} ${E.scalingValue(A.padding.left,o)}`,ee=$.type==="scale"?(()=>{const{transform:te,...X}=q;return{...X,position:"absolute",padding:G,boxSizing:"border-box","--position-transform":te||"none"}})():{...q,position:"absolute",padding:G,boxSizing:"border-box"};return l.jsx(so,{children:l.jsx("div",{className:J.imgWrapper,onClick:ue,children:l.jsx("img",{ref:N===s?H:null,className:Te(J.imageStyle,{[J.contain]:f.image.objectFit==="contain",[J.cover]:f.image.objectFit==="cover",[J.scaleSlide]:$.type==="scale"}),src:f.image.url,alt:f.image.name??"",style:{...ee,pointerEvents:f.image.objectFit==="contain"?"none":"auto"}})})},N)})},u),R.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:Te(J.arrow,{[J.arrowVertical]:$.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x,o)}, ${E.scalingValue(R.offset.y*($.direction==="horiz"?1:-1),o)}) scale(${R.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=b.current)==null?void 0:f.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&l.jsx(At,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Te(J.arrowImg,J.mirror)}),!R.arrowsImgUrl&&l.jsx(No,{color:R.color,className:Te(J.arrowIcon,J.arrowImg,J.mirror)})]})}),l.jsx("div",{className:Te(J.arrow,J.nextArrow,{[J.arrowVertical]:$.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:J.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x*($.direction==="horiz"?-1:1),o)}, ${E.scalingValue(R.offset.y,o)}) scale(${R.scale}) rotate(${$.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var f;return(f=b.current)==null?void 0:f.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&l.jsx(At,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:J.arrowImg}),!R.arrowsImgUrl&&l.jsx(No,{color:R.color,className:Te(J.arrowIcon,J.arrowImg)})]})})]}),B.closeIconUrl&&(()=>{const f=On(B.closeIconAlign,B.closeIconOffset,o),N=`scale(${B.closeIconScale})`,q=f.transform?`${f.transform} ${N}`:N;return l.jsx("button",{className:J.closeButton,style:{...f,transform:q},onClick:re,"aria-label":"Close lightbox",children:l.jsx(At,{url:B.closeIconUrl,fill:B.closeIconColor??"#000000",hoverFill:B.closeIconHover??"#cccccc"})})})(),I&&I.isActive&&r.imageCaption&&((y=n[s])==null?void 0:y.imageCaption)&&(()=>{const{widthSettings:f,fontSettings:N,letterSpacing:q,textAlign:G,wordSpacing:ee,fontSizeLineHeight:te,textAppearance:X,color:ce}=r.imageCaption;return l.jsx("div",{className:J.caption,style:{...On(I.alignment,I.offset,o),fontFamily:fr(N.fontFamily),fontWeight:N.fontWeight,fontStyle:N.fontStyle,width:f.sizing==="auto"?"max-content":E.scalingValue(f.width,o),letterSpacing:E.scalingValue(q,o),wordSpacing:E.scalingValue(ee,o),textAlign:G,fontSize:E.scalingValue(te.fontSize,o),lineHeight:E.scalingValue(te.lineHeight,o),textTransform:X.textTransform??"none",textDecoration:X.textDecoration??"none",fontVariant:X.fontVariant??"normal",color:ce},onClick:ve=>ve.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-color":I.linkColor,"--link-hover-color":I.linkHoverColor},children:l.jsx(wn,{content:n[s].imageCaption})})})})(),k.isActive&&(()=>{const[f,N]=k.position.split("-"),q=$.direction==="horiz"?`${f}-left`:k.position,G=On(q,k.offset,o),ee=()=>{if($.direction==="horiz"){if(N==="left")return"flex-start";if(N==="center")return"center";if(N==="right")return"flex-end"}else{if(f==="top")return"flex-start";if(f==="middle")return"center";if(f==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:S,className:J.thumbsWrapper,onClick:te=>he(te),style:{position:o?"absolute":"fixed",...G,...$.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:Te(J.thumbsContainer,{[J.thumbsContainerVertical]:$.direction==="vert",[J.thumbsAlignStart]:k.align==="start",[J.thumbsAlignCenter]:k.align==="center",[J.thumbsAlignEnd]:k.align==="end"}),style:{gap:E.scalingValue(k.grid.gap,o),justifyContent:V?"flex-start":ee()},children:n.map((te,X)=>{const ce=X===s,ve=T[X],xe=k.grid.size*(ce?k.activeState.scale:1),K=()=>{if(k.fit!=="fit")return{};if(!ve)return $.direction==="horiz"?{height:E.scalingValue(xe,o)}:{width:E.scalingValue(xe,o)};const Y=ve.width/ve.height;if($.direction==="horiz"){const j=xe,le=j*Y;return{width:E.scalingValue(le,o),height:E.scalingValue(j,o)}}else{const j=xe,le=j/Y;return{width:E.scalingValue(j,o),height:E.scalingValue(le,o)}}};return l.jsx("button",{className:J.thumbItem,style:{...$.direction==="horiz"&&k.fit!=="fit"?{height:E.scalingValue(xe,o)}:{},...$.direction==="vert"&&k.fit!=="fit"?{width:E.scalingValue(xe,o)}:{},...k.fit==="cover"?{width:E.scalingValue(xe,o),height:E.scalingValue(xe,o)}:{},...K(),transition:ce?"all 0.25s ease-out":"none",opacity:ce?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:Y=>{var j;Y.stopPropagation(),d(X),(j=b.current)==null||j.go(X)},onMouseEnter:()=>{var Y;k.triggers==="hov"&&((Y=b.current)==null||Y.go(X))},children:l.jsx("img",{src:te.image.url,alt:te.image.name??"",onLoad:Y=>{const j=Y.currentTarget;j.naturalWidth&&j.naturalHeight&&L(le=>({...le,[X]:{width:j.naturalWidth,height:j.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${te.image.name}-${X}`)})})})})()]})]}),document.getElementById(a))};function No({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const nc={element:ec,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},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 Vn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function rc(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -139,7 +139,23 @@
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function rc({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:d,fieldsGap:u,buttonCorners:P,buttonStroke:y,buttonPadding:x,isButtonFullWidth:h,inputCorners:b,inputStroke:L,inputPadding:v,inputColor:S,inputTextColor:f,inputBorderColor:B,placeholderColor:N,buttonColor:_,buttonTextColor:$,buttonBorderColor:A,labelTextColor:T,successColor:D,errorColor:C,fontFamily:O,inputFontSettings:V,inputFontSize:J,inputLineHeight:U,inputLetterSpacing:w,inputWordSpacing:M,inputTextAppearance:R,buttonFontSettings:H,buttonFontSize:I,buttonLineHeight:k,buttonLetterSpacing:te,buttonWordSpacing:oe,buttonTextAppearance:ce,labelFontSettings:q,labelFontSize:F,labelLineHeight:ne,labelLetterSpacing:xe,labelWordSpacing:ge,labelTextAppearance:he,statusFontSettings:Le,statusFontSize:He,statusLineHeight:m,statusLetterSpacing:g,statusWordSpacing:W,statusTextAppearance:K,successMessage:Z,errorMessage:ee,stateOverrides:Q}=e,Y=a==="B",ie=c.slice(0,Math.min(i,c.length)),ve={fontSettings:{fontFamily:O,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:J??.01,lineHeight:U,letterSpacing:w??0,wordSpacing:M??0,textAppearance:R,color:f},ue=st(Ge(ve,t)),be=E.scalingValue(L??0,t),j=E.scalingValue((U??J??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(a==="C"?L??0:(L??0)*2),t),G={...ue,borderStyle:"solid",borderRadius:a==="C"?0:E.scalingValue(b??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:be,borderLeftWidth:0}:{borderWidth:be},paddingTop:E.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:E.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:E.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:E.scalingValue((v==null?void 0:v.left)??0,t),height:j,minHeight:j},z={fontSettings:{fontFamily:O,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:I??.01,lineHeight:k,letterSpacing:te??0,wordSpacing:oe??0,textAppearance:ce,color:$},le=st(Ge(z,t)),Se=E.scalingValue(y??0,t),Ce={fontSettings:{fontFamily:O,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ne,letterSpacing:xe??0,wordSpacing:ge??0,textAppearance:he,color:T},Fe=Ge(Ce,t),fe={fontSettings:{fontFamily:O,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:He??.01,lineHeight:m,letterSpacing:g??0,wordSpacing:W??0,textAppearance:K,color:D},Be=st(Ge(fe,t)),We=E.buildColorVars(o,{inputColor:S,inputTextColor:f,inputBorderColor:B,placeholderColor:N!=null&&N.trim()?N:"#cccccc",buttonColor:_,buttonTextColor:$,buttonBorderColor:A,labelTextColor:T,successColor:D,errorColor:C},oc,ic,Q),[Ee,Oe]=p.useState(()=>Object.fromEntries(ie.map(re=>[re.name,""]))),[Ct,Ye]=p.useState("idle"),[It,nt]=p.useState(null),St=r==="success"?"success":r==="error"?"error":Ct,kt=r==="error"?ee:It,ye=r==="filled",Ve=p.useMemo(()=>{if(!ye)return Ee;let re=null;for(const Ie of ie)(Ee[Ie.name]??"").trim().length>0||(re=re??{...Ee},re[Ie.name]="Filled");return re??Ee},[Ee,ye,ie]),ut=St==="error"?E.getFormFieldValidationError(ie,Ve):null,Mt=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),Kt=n==null?void 0:n.submitUrl,qt=(re,Ie)=>{Oe(Me=>({...Me,[re]:Ie}))},Ut=async re=>{re.preventDefault();const Ie=Object.fromEntries(ie.map(Re=>{var De;return[Re.name,((De=Ee[Re.name])==null?void 0:De.trim())??""]}).filter(([,Re])=>Re));if(!Kt){Ye("error"),nt("No integrations were found for this form.");return}if(Object.keys(Ie).length===0)return;const Me=E.getFormFieldValidationError(ie,Ee);if(Me){Ye("error"),nt(Me);return}Ye("submitting"),nt(null);try{const Re=await fetch(Kt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ie)});if(!Re.ok){const De=await Re.text();throw new Error(De||`Request failed: ${Re.status}`)}Ye("success"),Oe(Object.fromEntries(ie.map(De=>[De.name,""])))}catch(Re){Ye("error"),nt(Re instanceof Error?Re.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${a} ${Mt}`.trim(),style:We,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:nc(o)}}),l.jsxs("form",{onSubmit:Ut,className:`${o}-form`,style:{gap:E.scalingValue(d??0,t)},children:[l.jsx("div",{className:`${o}-fields`,style:{gap:E.scalingValue(u??0,t)},children:ie.map((re,Ie)=>l.jsxs("div",{className:`${o}-field-group${Y?` ${o}-labeled`:""}`,children:[Y&&l.jsx("span",{className:`${o}-field-label`,style:Fe?{...Fe,lineHeight:Fe.fontSize}:void 0,children:re.label||re.name}),re.type==="textarea"?l.jsx("textarea",{name:re.name,autoComplete:"off",value:Ve[re.name]??"",onChange:Me=>qt(re.name,Me.target.value),placeholder:re.placeholder,className:`${o}-input`,style:G,rows:1,"data-filled":ye||(Ve[re.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:re.type==="phone"?"tel":re.type==="email"?"email":"text",name:re.name,autoComplete:"off",value:Ve[re.name]??"",onChange:Me=>qt(re.name,Me.target.value),placeholder:re.placeholder,required:re.isRequired??re.type==="email",className:`${o}-input`,style:G,"data-filled":ye||(Ve[re.name]??"").trim().length>0})]},Ie))}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(P??0,t),borderWidth:Se,paddingTop:E.scalingValue((x==null?void 0:x.top)??0,t),paddingRight:E.scalingValue((x==null?void 0:x.right)??0,t),paddingBottom:E.scalingValue((x==null?void 0:x.bottom)??0,t),paddingLeft:E.scalingValue((x==null?void 0:x.left)??0,t),...le,...h?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:h?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ct==="submitting"?"...":s})})})]}),St==="success"&&l.jsx("p",{className:`${o}-success`,style:{...Be},children:Z}),St==="error"&&l.jsx("p",{className:`${o}-error`,style:{...Be},role:"alert",children:ut??kt??ee})]})}const oc={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"},ic=["hover","focus","filled","success","error"],ac=`import React, { useMemo, useState } from 'react';\r
142
+ .${e}-control {
143
+ position: relative;
144
+ z-index: 2;
145
+ width: 100%;
146
+ }
147
+ .${e}-control::before {
148
+ content: "";
149
+ position: absolute;
150
+ top: 0;
151
+ left: 0;
152
+ width: 100%;
153
+ height: 100%;
154
+ min-height: 20px;
155
+ pointer-events: auto;
156
+ z-index: 10;
157
+ }
158
+ `}function oc({settings:e,isEditor:t,isEditMode:n,metadata:r,activeEvent:i}){const a=!!n,{prefix:o}=E.useScopedStyles(),{type:c="A",fieldsToShow:s=2,fields:d=[],buttonLabel:u,gap:P,fieldsGap:v,buttonCorners:x,buttonStroke:h,buttonPadding:g,isButtonFullWidth:T,inputCorners:L,inputStroke:b,inputPadding:m,inputColor:H,inputTextColor:F,inputBorderColor:_,placeholderColor:C,buttonColor:W,buttonTextColor:w,buttonBorderColor:O,labelTextColor:S,successColor:V,errorColor:D,fontFamily:Z,inputFontSettings:U,inputFontSize:$,inputLineHeight:k,inputLetterSpacing:R,inputWordSpacing:B,inputTextAppearance:I,buttonFontSettings:A,buttonFontSize:Q,buttonLineHeight:oe,buttonLetterSpacing:ie,buttonWordSpacing:z,buttonTextAppearance:M,labelFontSettings:re,labelFontSize:Ce,labelLineHeight:ue,labelLetterSpacing:he,labelWordSpacing:Re,labelTextAppearance:ne,statusFontSettings:y,statusFontSize:f,statusLineHeight:N,statusLetterSpacing:q,statusWordSpacing:G,statusTextAppearance:ee,successMessage:te,errorMessage:X,stateOverrides:ce}=e,ve=c==="B",de=d.slice(0,Math.min(s,d.length)),xe={fontSettings:{fontFamily:Z,fontWeight:(U==null?void 0:U.fontWeight)??400,fontStyle:(U==null?void 0:U.fontStyle)??"normal"},fontSize:$??.01,lineHeight:k,letterSpacing:R??0,wordSpacing:B??0,textAppearance:I,color:F},K=mt(Ge(xe,t)),Y=E.scalingValue(b??0,t),j=E.scalingValue((k??$??.01)+((m==null?void 0:m.top)??0)+((m==null?void 0:m.bottom)??0)+(c==="C"?b??0:(b??0)*2),t),le={...K,borderStyle:"solid",borderRadius:c==="C"?0:E.scalingValue(L??0,t),...c==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Y,borderLeftWidth:0}:{borderWidth:Y},paddingTop:E.scalingValue((m==null?void 0:m.top)??0,t),paddingRight:E.scalingValue((m==null?void 0:m.right)??0,t),paddingBottom:E.scalingValue((m==null?void 0:m.bottom)??0,t),paddingLeft:E.scalingValue((m==null?void 0:m.left)??0,t),height:j,minHeight:j},we={fontSettings:{fontFamily:Z,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:oe,letterSpacing:ie??0,wordSpacing:z??0,textAppearance:M,color:w},Se=mt(Ge(we,t)),Ne=E.scalingValue(h??0,t),ye={fontSettings:{fontFamily:Z,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:Ce??.01,lineHeight:ue,letterSpacing:he??0,wordSpacing:Re??0,textAppearance:ne,color:S},He=Ge(ye,t),ke={fontSettings:{fontFamily:Z,fontWeight:(y==null?void 0:y.fontWeight)??400,fontStyle:(y==null?void 0:y.fontStyle)??"normal"},fontSize:f??.01,lineHeight:N,letterSpacing:q??0,wordSpacing:G??0,textAppearance:ee,color:V},We=mt(Ge(ke,t)),Ve=E.buildColorVars(o,{inputColor:H,inputTextColor:F,inputBorderColor:_,placeholderColor:C!=null&&C.trim()?C:"#cccccc",buttonColor:W,buttonTextColor:w,buttonBorderColor:O,labelTextColor:S,successColor:V,errorColor:D},ic,ac,ce),[Ye,dt]=p.useState(()=>Object.fromEntries(de.map(fe=>[fe.name,""]))),[Tt,Je]=p.useState("idle"),[qt,Qe]=p.useState(null),Lt=i==="success"?"success":i==="error"?"error":Tt,be=i==="error"?X:qt,et=i==="filled",Xe=p.useMemo(()=>{if(!et)return Ye;let fe=null;for(const Ie of de)(Ye[Ie.name]??"").trim().length>0||(fe=fe??{...Ye},fe[Ie.name]="Filled");return fe??Ye},[Ye,et,de]),ut=Lt==="error"?E.getFormFieldValidationError(de,Xe):null,pn=`${i&&i!=="default"?`${o}-state-${i}`:""}`.trim(),Nt=r==null?void 0:r.submitUrl,Ee=(fe,Ie)=>{dt(Me=>({...Me,[fe]:Ie}))},De=async fe=>{fe.preventDefault();const Ie=Object.fromEntries(de.map(Be=>{var at;return[Be.name,((at=Ye[Be.name])==null?void 0:at.trim())??""]}).filter(([,Be])=>Be));if(!Nt){Je("error"),Qe("No integrations were found for this form.");return}if(Object.keys(Ie).length===0)return;const Me=E.getFormFieldValidationError(de,Ye);if(Me){Je("error"),Qe(Me);return}Je("submitting"),Qe(null);try{const Be=await fetch(Nt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ie)});if(!Be.ok){const at=await Be.text();throw new Error(at||`Request failed: ${Be.status}`)}Je("success"),dt(Object.fromEntries(de.map(at=>[at.name,""])))}catch(Be){Je("error"),Qe(Be instanceof Error?Be.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${o}-type-${c} ${pn}`.trim(),style:Ve,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:rc(o)}}),l.jsxs("form",{onSubmit:De,className:`${o}-form`,children:[l.jsx("div",{className:`${o}-fields`,children:de.map((fe,Ie)=>l.jsxs(p.Fragment,{children:[Ie>0&&l.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${o}-control`:void 0,style:{height:E.scalingValue(v??0,t)}}),l.jsxs("div",{className:`${o}-field-group${ve?` ${o}-labeled`:""}`,children:[ve&&l.jsx("span",{className:`${o}-field-label`,style:He?{...He,lineHeight:He.fontSize}:void 0,children:fe.label||fe.name}),fe.type==="textarea"?l.jsx("textarea",{name:fe.name,autoComplete:"off",value:Xe[fe.name]??"",onChange:Me=>Ee(fe.name,Me.target.value),placeholder:fe.placeholder,className:`${o}-input`,style:le,rows:1,"data-filled":et||(Xe[fe.name]??"").trim().length>0,"data-field-type":"textarea"}):l.jsx("input",{type:fe.type==="phone"?"tel":fe.type==="email"?"email":"text",name:fe.name,autoComplete:"off",value:Xe[fe.name]??"",onChange:Me=>Ee(fe.name,Me.target.value),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${o}-input`,style:le,"data-filled":et||(Xe[fe.name]??"").trim().length>0})]})]},Ie))}),l.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${o}-control`:void 0,style:{height:E.scalingValue(P??0,t)}}),l.jsx("div",{className:`${o}-overlay-anchor`,children:l.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(x??0,t),borderWidth:Ne,paddingTop:E.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:E.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:E.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:E.scalingValue((g==null?void 0:g.left)??0,t),...Se,...T?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:l.jsx("span",{className:`${o}-overlay-anchor`,style:T?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Tt==="submitting"?"...":u})})})]}),Lt==="success"&&l.jsx("p",{className:`${o}-success`,style:{...We},children:te}),Lt==="error"&&l.jsx("p",{className:`${o}-error`,style:{...We},role:"alert",children:ut??be??X})]})}const ic={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"},ac=["hover","focus","filled","success","error"],sc=`import React, { useMemo, useState } from 'react';\r
143
159
  import { CommonComponentProps } from '../props';\r
144
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
145
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -285,6 +301,22 @@ function getCSS(P: string): string {\r
285
301
  position: relative;\r
286
302
  height: auto;\r
287
303
  }\r
304
+ .\${P}-control {\r
305
+ position: relative;\r
306
+ z-index: 2;\r
307
+ width: 100%;\r
308
+ }\r
309
+ .\${P}-control::before {\r
310
+ content: "";\r
311
+ position: absolute;\r
312
+ top: 0;\r
313
+ left: 0;\r
314
+ width: 100%;\r
315
+ height: 100%;\r
316
+ min-height: 20px;\r
317
+ pointer-events: auto;\r
318
+ z-index: 10;\r
319
+ }\r
288
320
  \`;\r
289
321
  }\r
290
322
  \r
@@ -292,11 +324,13 @@ type FormProps = {\r
292
324
  settings: FormSettings;\r
293
325
  content?: unknown;\r
294
326
  isEditor?: boolean;\r
327
+ isEditMode?: boolean;\r
295
328
  activeEvent: string | undefined;\r
296
329
  onUpdateSettings?: (settings: FormSettings) => void;\r
297
330
  } & CommonComponentProps;\r
298
331
  \r
299
- export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {\r
332
+ export function Form({ settings, isEditor, isEditMode, metadata, activeEvent }: FormProps) {\r
333
+ const showControls = Boolean(isEditMode);\r
300
334
  const { prefix: P } = useScopedStyles();\r
301
335
  const {\r
302
336
  type = 'A',\r
@@ -538,49 +572,59 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
538
572
  <form\r
539
573
  onSubmit={handleSubmit}\r
540
574
  className={\`\${P}-form\`}\r
541
- style={{ gap: scalingValue(gap ?? 0, isEditor) }}\r
542
575
  >\r
543
- <div\r
544
- className={\`\${P}-fields\`}\r
545
- style={{ gap: scalingValue(fieldsGap ?? 0, isEditor) }}\r
546
- >\r
576
+ <div className={\`\${P}-fields\`}>\r
547
577
  {visibleFields.map((field, index) => (\r
548
- <div key={index} className={\`\${P}-field-group\${showLabels ? \` \${P}-labeled\` : ''}\`}>\r
549
- {showLabels && (\r
550
- <span className={\`\${P}-field-label\`} style={labelTextCss ? { ...labelTextCss, lineHeight: labelTextCss.fontSize } : undefined}>\r
551
- {field.label || field.name}\r
552
- </span>\r
553
- )}\r
554
- {field.type === 'textarea' ? (\r
555
- <textarea\r
556
- name={field.name}\r
557
- autoComplete="off"\r
558
- value={displayValues[field.name] ?? ''}\r
559
- onChange={(e) => handleFieldChange(field.name, e.target.value)}\r
560
- placeholder={field.placeholder}\r
561
- className={\`\${P}-input\`}\r
562
- style={inputFieldCss}\r
563
- rows={1}\r
564
- data-filled={isFilledPreview || ((displayValues[field.name] ?? '') as string).trim().length > 0}\r
565
- data-field-type="textarea"\r
566
- />\r
567
- ) : (\r
568
- <input\r
569
- type={field.type === 'phone' ? 'tel' : field.type === 'email' ? 'email' : 'text'}\r
570
- name={field.name}\r
571
- autoComplete="off"\r
572
- value={displayValues[field.name] ?? ''}\r
573
- onChange={(e) => handleFieldChange(field.name, e.target.value)}\r
574
- placeholder={field.placeholder}\r
575
- required={field.isRequired ?? field.type === 'email'}\r
576
- className={\`\${P}-input\`}\r
577
- style={inputFieldCss}\r
578
- data-filled={isFilledPreview || ((displayValues[field.name] ?? '') as string).trim().length > 0}\r
578
+ <React.Fragment key={index}>\r
579
+ {index > 0 && (\r
580
+ <div\r
581
+ data-controls={showControls ? 'fieldsGap' : undefined}\r
582
+ className={showControls ? \`\${P}-control\` : undefined}\r
583
+ style={{ height: scalingValue(fieldsGap ?? 0, isEditor) }}\r
579
584
  />\r
580
585
  )}\r
581
- </div>\r
586
+ <div className={\`\${P}-field-group\${showLabels ? \` \${P}-labeled\` : ''}\`}>\r
587
+ {showLabels && (\r
588
+ <span className={\`\${P}-field-label\`} style={labelTextCss ? { ...labelTextCss, lineHeight: labelTextCss.fontSize } : undefined}>\r
589
+ {field.label || field.name}\r
590
+ </span>\r
591
+ )}\r
592
+ {field.type === 'textarea' ? (\r
593
+ <textarea\r
594
+ name={field.name}\r
595
+ autoComplete="off"\r
596
+ value={displayValues[field.name] ?? ''}\r
597
+ onChange={(e) => handleFieldChange(field.name, e.target.value)}\r
598
+ placeholder={field.placeholder}\r
599
+ className={\`\${P}-input\`}\r
600
+ style={inputFieldCss}\r
601
+ rows={1}\r
602
+ data-filled={isFilledPreview || ((displayValues[field.name] ?? '') as string).trim().length > 0}\r
603
+ data-field-type="textarea"\r
604
+ />\r
605
+ ) : (\r
606
+ <input\r
607
+ type={field.type === 'phone' ? 'tel' : field.type === 'email' ? 'email' : 'text'}\r
608
+ name={field.name}\r
609
+ autoComplete="off"\r
610
+ value={displayValues[field.name] ?? ''}\r
611
+ onChange={(e) => handleFieldChange(field.name, e.target.value)}\r
612
+ placeholder={field.placeholder}\r
613
+ required={field.isRequired ?? field.type === 'email'}\r
614
+ className={\`\${P}-input\`}\r
615
+ style={inputFieldCss}\r
616
+ data-filled={isFilledPreview || ((displayValues[field.name] ?? '') as string).trim().length > 0}\r
617
+ />\r
618
+ )}\r
619
+ </div>\r
620
+ </React.Fragment>\r
582
621
  ))}\r
583
622
  </div>\r
623
+ <div\r
624
+ data-controls={showControls ? 'gap' : undefined}\r
625
+ className={showControls ? \`\${P}-control\` : undefined}\r
626
+ style={{ height: scalingValue(gap ?? 0, isEditor) }}\r
627
+ />\r
584
628
  <div className={\`\${P}-overlay-anchor\`}>\r
585
629
  <button\r
586
630
  type="submit"\r
@@ -740,7 +784,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
740
784
  };\r
741
785
  \r
742
786
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
743
- `,sc=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},lc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],cc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dn.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dn.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dn.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:sc,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputCorners"]},{type:"group",title:"",items:["inputStroke","inputPadding"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["gap","buttonCorners"]},{type:"row",title:"",items:["buttonStroke","buttonPadding"]},{type:"row",title:"",items:["isButtonFullWidth"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...lc],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},dc={element:rc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:cc,sourceCode:ac};function jn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uc(e){return`
787
+ `,lc=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},cc=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],dc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Dn.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Dn.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Dn.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Dn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:lc,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...cc],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},uc={element:oc,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:dc,sourceCode:sc};function jn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function pc(e){return`
744
788
  .${e}-wrapper {
745
789
  display: flex;
746
790
  flex-direction: column;
@@ -931,7 +975,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
931
975
  font-size: ${jn(14)};
932
976
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
977
  }
934
- `}const pc=({settings:e,isEditor:t,metadata:n,activeEvent:r})=>{const{prefix:o}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:s=1,fontFamily:d,inputFontSettings:u,inputFontSize:P,inputLineHeight:y,inputLetterSpacing:x,inputWordSpacing:h,inputTextAppearance:b,buttonFontSettings:L,buttonFontSize:v,buttonLineHeight:S,buttonLetterSpacing:f,buttonWordSpacing:B,buttonTextAppearance:N,statusFontSettings:_,statusFontSize:$,statusLineHeight:A,statusLetterSpacing:T,statusWordSpacing:D,statusTextAppearance:C,iconMaxWidth:O,minHeight:V,corners:J,stroke:U,stateOverrides:w,inputPadding:M,buttonPadding:R,successMessage:H="Thanks for subscribing!",errorMessage:I="Please, fill all required fields."}=e,k=a.slice(0,Math.min(s,a.length)),[te,oe]=p.useState(()=>Object.fromEntries(k.map(fe=>[fe.name,""]))),[ce,q]=p.useState("idle"),[F,ne]=p.useState(null),xe=r==="success"?"success":r==="error"?"error":ce,ge=r==="error"?I:F,he=r==="filled",Le=p.useMemo(()=>{if(!he)return te;let fe=null;for(const Be of k)(te[Be.name]??"").trim().length>0||(fe=fe??{...te},fe[Be.name]="Filled");return fe??te},[he,te,k]),He=xe==="error"?E.getFormFieldValidationError(k,Le):null,m=r&&r!=="default"?`${o}-state-${r}`:"",g=k.some(fe=>(Le[fe.name]??"").trim().length>0),W=m!==`${o}-state-filled`&&g?`${o}-state-filled`:"",K=`${m} ${W}`.trim(),Z=n==null?void 0:n.submitUrl,ee=c??"",Q=(i==null?void 0:i.icon)??"",Y=(i==null?void 0:i.mode)==="On",ie=ee||"Submit",ve={fontSettings:{fontFamily:d,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:P??.01,lineHeight:y,letterSpacing:x??0,wordSpacing:h??0,textAppearance:b,color:e.inputTextColor??"#111111"},ue={fontSettings:{fontFamily:d,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:v??.01,lineHeight:S,letterSpacing:f??0,wordSpacing:B??0,textAppearance:N,color:e.buttonTextColor??"#ffffff"},be={fontSettings:{fontFamily:d,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:$??.01,lineHeight:A,letterSpacing:T??0,wordSpacing:D??0,textAppearance:C,color:e.successColor??"#22c55e"},j=st(Ge(ve,t)),G=st(Ge(ue,t)),z=st(Ge(be,t)),le=E.buildColorVars(o,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ve==null?void 0:ve.color)??"#111111",buttonTextColor:e.buttonTextColor??(ue==null?void 0:ue.color)??"#ffffff"},mc,gc,w),Se={borderRadius:E.scalingValue(J,t),borderWidth:E.scalingValue(U,t),borderStyle:"solid"},Ce={borderLeftWidth:E.scalingValue(U,t)},Fe=async fe=>{fe.preventDefault();const Be=Object.fromEntries(k.map(Ee=>{var Oe;return[Ee.name,((Oe=te[Ee.name])==null?void 0:Oe.trim())??""]}).filter(([,Ee])=>Ee));if(!Z){q("error"),ne("No integrations were found for this form.");return}if(Object.keys(Be).length===0)return;const We=E.getFormFieldValidationError(k,te);if(We){q("error"),ne(We);return}q("submitting"),ne(null);try{const Ee=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Be)});if(!Ee.ok){const Oe=await Ee.text();throw new Error(Oe||`Request failed: ${Ee.status}`)}q("success"),oe(Object.fromEntries(k.map(Oe=>[Oe.name,""])))}catch(Ee){q("error"),ne(Ee instanceof Error?Ee.message:"Something went wrong")}};return l.jsxs("div",{className:`${o}-wrapper ${K}`.trim(),style:le,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:uc(o)}}),l.jsxs("form",{onSubmit:Fe,className:`${o}-form`,style:{...Se,height:E.scalingValue(V,t),minHeight:E.scalingValue(V,t)},children:[l.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:k.map(fe=>l.jsx("input",{type:fe.type==="email"?"email":fe.type==="phone"?"tel":"text",name:fe.name,autoComplete:"off",value:Le[fe.name]??"",onChange:Be=>oe(We=>({...We,[fe.name]:Be.target.value})),placeholder:fe.placeholder,required:fe.isRequired??fe.type==="email",className:`${o}-input`,style:{...j,paddingRight:E.scalingValue(M.right,t),paddingLeft:E.scalingValue(M.left,t),paddingTop:E.scalingValue(M.top,t),paddingBottom:E.scalingValue(M.bottom,t)}},fe.name))}),l.jsx("div",{className:`${o}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":ie,style:{...G,...Ce,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:ce==="submitting"?"...":Y?Q&&l.jsx(Lt,{url:Q,className:`${o}-submitBtnIcon`,style:{maxWidth:E.scalingValue(O??0,t)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):ee})})]}),xe==="success"&&l.jsx("p",{className:`${o}-success`,style:{...z},children:H}),xe==="error"&&l.jsx("p",{className:`${o}-error`,style:{...z},role:"alert",children:He??ge??I})]})},mc={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"},gc=["hover","focus","filled","success","error"],hc=`import React, { useMemo, useState } from 'react';\r
978
+ `}const mc=({settings:e,isEditor:t,metadata:n,activeEvent:r})=>{const{prefix:i}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:o,buttonLabel:c,fieldsToShow:s=1,fontFamily:d,inputFontSettings:u,inputFontSize:P,inputLineHeight:v,inputLetterSpacing:x,inputWordSpacing:h,inputTextAppearance:g,buttonFontSettings:T,buttonFontSize:L,buttonLineHeight:b,buttonLetterSpacing:m,buttonWordSpacing:H,buttonTextAppearance:F,statusFontSettings:_,statusFontSize:C,statusLineHeight:W,statusLetterSpacing:w,statusWordSpacing:O,statusTextAppearance:S,iconMaxWidth:V,minHeight:D,corners:Z,stroke:U,stateOverrides:$,inputPadding:k,buttonPadding:R,successMessage:B="Thanks for subscribing!",errorMessage:I="Please, fill all required fields."}=e,A=a.slice(0,Math.min(s,a.length)),[Q,oe]=p.useState(()=>Object.fromEntries(A.map(ye=>[ye.name,""]))),[ie,z]=p.useState("idle"),[M,re]=p.useState(null),Ce=r==="success"?"success":r==="error"?"error":ie,ue=r==="error"?I:M,he=r==="filled",Re=p.useMemo(()=>{if(!he)return Q;let ye=null;for(const He of A)(Q[He.name]??"").trim().length>0||(ye=ye??{...Q},ye[He.name]="Filled");return ye??Q},[he,Q,A]),ne=Ce==="error"?E.getFormFieldValidationError(A,Re):null,y=r&&r!=="default"?`${i}-state-${r}`:"",f=A.some(ye=>(Re[ye.name]??"").trim().length>0),N=y!==`${i}-state-filled`&&f?`${i}-state-filled`:"",q=`${y} ${N}`.trim(),G=n==null?void 0:n.submitUrl,ee=c??"",te=(o==null?void 0:o.icon)??"",X=(o==null?void 0:o.mode)==="On",ce=ee||"Submit",ve={fontSettings:{fontFamily:d,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:P??.01,lineHeight:v,letterSpacing:x??0,wordSpacing:h??0,textAppearance:g,color:e.inputTextColor??"#111111"},de={fontSettings:{fontFamily:d,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:L??.01,lineHeight:b,letterSpacing:m??0,wordSpacing:H??0,textAppearance:F,color:e.buttonTextColor??"#ffffff"},xe={fontSettings:{fontFamily:d,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:C??.01,lineHeight:W,letterSpacing:w??0,wordSpacing:O??0,textAppearance:S,color:e.successColor??"#22c55e"},K=mt(Ge(ve,t)),Y=mt(Ge(de,t)),j=mt(Ge(xe,t)),le=E.buildColorVars(i,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(ve==null?void 0:ve.color)??"#111111",buttonTextColor:e.buttonTextColor??(de==null?void 0:de.color)??"#ffffff"},gc,hc,$),we={borderRadius:E.scalingValue(Z,t),borderWidth:E.scalingValue(U,t),borderStyle:"solid"},Se={borderLeftWidth:E.scalingValue(U,t)},Ne=async ye=>{ye.preventDefault();const He=Object.fromEntries(A.map(We=>{var Ve;return[We.name,((Ve=Q[We.name])==null?void 0:Ve.trim())??""]}).filter(([,We])=>We));if(!G){z("error"),re("No integrations were found for this form.");return}if(Object.keys(He).length===0)return;const ke=E.getFormFieldValidationError(A,Q);if(ke){z("error"),re(ke);return}z("submitting"),re(null);try{const We=await fetch(G,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He)});if(!We.ok){const Ve=await We.text();throw new Error(Ve||`Request failed: ${We.status}`)}z("success"),oe(Object.fromEntries(A.map(Ve=>[Ve.name,""])))}catch(We){z("error"),re(We instanceof Error?We.message:"Something went wrong")}};return l.jsxs("div",{className:`${i}-wrapper ${q}`.trim(),style:le,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:pc(i)}}),l.jsxs("form",{onSubmit:Ne,className:`${i}-form`,style:{...we,height:E.scalingValue(D,t),minHeight:E.scalingValue(D,t)},children:[l.jsx("div",{className:`${i}-inputWrap ${i}-overlayAnchor`,style:{flex:1,minWidth:0},children:A.map(ye=>l.jsx("input",{type:ye.type==="email"?"email":ye.type==="phone"?"tel":"text",name:ye.name,autoComplete:"off",value:Re[ye.name]??"",onChange:He=>oe(ke=>({...ke,[ye.name]:He.target.value})),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${i}-input`,style:{...K,paddingRight:E.scalingValue(k.right,t),paddingLeft:E.scalingValue(k.left,t),paddingTop:E.scalingValue(k.top,t),paddingBottom:E.scalingValue(k.bottom,t)}},ye.name))}),l.jsx("div",{className:`${i}-overlayAnchor`,children:l.jsx("button",{type:"submit",className:`${i}-submitBtn`,"aria-label":ce,style:{...Y,...Se,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:ie==="submitting"?"...":X?te&&l.jsx(At,{url:te,className:`${i}-submitBtnIcon`,style:{maxWidth:E.scalingValue(V??0,t)},fill:`var(--${i}-button-text-color)`,hoverFill:`var(--${i}-button-text-color)`}):ee})})]}),Ce==="success"&&l.jsx("p",{className:`${i}-success`,style:{...j},children:B}),Ce==="error"&&l.jsx("p",{className:`${i}-error`,style:{...j},role:"alert",children:ne??ue??I})]})},gc={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"},hc=["hover","focus","filled","success","error"],fc=`import React, { useMemo, useState } from 'react';\r
935
979
  import { CommonComponentProps } from '../props';\r
936
980
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
937
981
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1503,7 +1547,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1503
1547
  };\r
1504
1548
  \r
1505
1549
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1506
- `,fc="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),yc=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$r={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},vc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],bc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$r.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$r.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$r.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:yc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:fc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...vc],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},xc={element:pc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:bc,sourceCode:hc};function Ho(e){return`
1550
+ `,yc="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),vc=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$r={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},bc=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],xc={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke All",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$r.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$r.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$r.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:vc,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:yc},fontFamily:"Arial",strokeColor:"#000000",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#000000",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:.001,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:.001,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...bc],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Cc={element:mc,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Single_Line.png"},defaultSize:{d:{width:400,height:60},t:{width:453,height:60},m:{width:340,height:60}},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:xc,sourceCode:fc};function Ho(e){return`
1507
1551
  .${e}-marquee-wrapper {
1508
1552
  overflow: hidden;
1509
1553
  width: 100%;
@@ -1635,7 +1679,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1635
1679
  .${e}-image-hover-grayscale:hover img {
1636
1680
  filter: grayscale(100%);
1637
1681
  }
1638
- `}const Cc=30,Sc=20,Tr=2,wc=2,$c=(e,t)=>Array.from({length:t},()=>e).flat(),Tc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Lc=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Tc(r,e))},Ec=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:o,imageHoverClass:a,isFirstSet:i,scaled:c,onFirstSetImageDone:s})=>{var $,A,T;const d=p.useRef(null);p.useLayoutEffect(()=>{if(!i)return;const D=d.current;D!=null&&D.complete&&(s==null||s())},[i,($=e.image)==null?void 0:$.url,s]);const u=n.display==="Cover",P=n.ratioValue??"1:1",y=n.reversed??!1,[x,h]=P.split(":").map(Number),v=(y?h:x)/(y?x:h);let S=r,f=S/v;f>o&&(f=o,S=f*v);const B=c(S),N=c(f),_=((A=e.image)==null?void 0:A.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((T=e.image)==null?void 0:T.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:i?s:void 0,onError:i?s:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:B}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:B,height:N,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(o)}},children:_&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:$e(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:_}):_})})},Pc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:a}=E.useScopedStyles(),{speed:i,direction:c,pauseOnHover:s,gap:d,imageMaxWidth:u,imageMaxHeight:P,imageFit:y,hoverEffect:x}=e,h=!!o,b=!n||!!r,L=b&&x!=="off"&&x!=="randomize"?`${a}-image-hover-${x}`:void 0,v=n?!!r:!0,f=((t==null?void 0:t.length)??0)>0&&(v||!!n),B=Math.max(0,i)*Cc,N=m=>E.scalingValue(m,n??!1),_=p.useRef(null),$=p.useRef(null),A=p.useRef(null),[T,D]=p.useState(0),[C,O]=p.useState(0),V=v&&s==="on",[J,U]=p.useState(!1),[w,M]=p.useState({}),R=p.useRef(w);R.current=w;const H=p.useRef(null),I=p.useRef(0),k=p.useRef(null),te=p.useMemo(()=>(t??[]).map(m=>{var g;return((g=m.image)==null?void 0:g.url)??""}).join("\0"),[t]),[oe,ce]=p.useState(Tr),q=p.useMemo(()=>{const m=t??[];return!v||m.length===0?m:$c(m,oe)},[t,v,oe]),F=p.useMemo(()=>q.filter(m=>{var g;return!!((g=m.image)!=null&&g.url)}).length,[q]),ne=f?wc:1;p.useLayoutEffect(()=>{I.current=0,M({}),H.current=null,ce(Tr),D(0)},[te]),p.useEffect(()=>{if(!b||x!=="randomize")return;const m=_.current;if(!m)return;const g=ee=>{M(Q=>{let Y=null;for(const ie of ee)ie in Q&&(Lc(m,ie)||(Y||(Y={...Q}),delete Y[ie]));return Y??Q})},W=new IntersectionObserver(ee=>{const Q=new Set;for(const Y of ee){const ie=Y.target.dataset.marqueeItemIndex,ve=ie!==void 0?Number(ie):NaN;Number.isNaN(ve)||Q.add(ve)}Q.size>0&&g(Q)},{root:m,threshold:0});Object.keys(w).forEach(ee=>{const Q=Number(ee);m.querySelectorAll(`[data-marquee-item-index="${Q}"]`).forEach(Y=>W.observe(Y))});let K=0;const Z=()=>{const ee=Object.keys(R.current);ee.length!==0&&(g(ee.map(Number)),K=requestAnimationFrame(Z))};return Object.keys(R.current).length>0&&(K=requestAnimationFrame(Z)),()=>{cancelAnimationFrame(K),W.disconnect()}},[x,w,b]),p.useLayoutEffect(()=>{if(!f)return;const m=_.current,g=A.current;if(!m||!g)return;let W=0;const K=()=>{const Q=m.getBoundingClientRect().width,Y=g.getBoundingClientRect().width,ie=H.current,ve=typeof ie=="number"&&Math.abs(ie-Y)<=.25;if(H.current=Y,v&&Y>0&&oe>0){const ue=Y/oe;if(ue>0&&Q>0){const be=Math.max(Tr,Math.ceil(Q/ue)+1);if(be!==oe){ce(be);return}}}if(Y>0&&T<=0){D(Y);return}ve&&Y!==T?D(Y):!ve&&T<=0&&(cancelAnimationFrame(W),W=requestAnimationFrame(K))},Z=()=>{cancelAnimationFrame(W),W=requestAnimationFrame(K)};k.current=Z,Z();const ee=new ResizeObserver(Z);return ee.observe(m),ee.observe(g),()=>{k.current=null,cancelAnimationFrame(W),ee.disconnect()}},[v,f,T,te,oe]),p.useLayoutEffect(()=>{const m=$.current;if(!f||!m)return;const g=T>0?T:0,W=g>0&&B>0?g/B*1e3:0,K=`${Math.max(0,W)/1e3}s`;m.style.setProperty("--marquee-distance",`${g}px`),m.style.setProperty("--marquee-duration",K)},[v,f,B,T]),p.useLayoutEffect(()=>{if(!f){O(0);return}if(T<=0){O(0);return}const m=$.current;if(!m)return;const g=()=>{const K=m.getBoundingClientRect().height;O(K>0?K:0)};g();const W=new ResizeObserver(g);return W.observe(m),()=>W.disconnect()},[f,ne,q,n,d,u,P,T,y,w]);const xe=()=>{V&&U(!0)},ge=()=>{V&&U(!1)},he=p.useCallback(()=>{var m;I.current=Math.min(F,I.current+1),(m=k.current)==null||m.call(k)},[F]),Le=p.useCallback((m,g)=>{M(W=>{const K=W[m]??g,Z=(t??[]).filter(Q=>Q!==K);if(Z.length===0)return W;const ee=Z[Math.floor(Math.random()*Z.length)];return{...W,[m]:ee}})},[t]),He=(m,g,W,K)=>{const Z=b&&x==="randomize"&&y.display==="Cover"?w[W]??m:m,ee=`max(${N(d)}, ${Sc}px)`,Q=`calc(-0.5 * (${ee} + ${N(d)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":W,onMouseEnter:b&&x==="randomize"&&y.display==="Cover"?()=>Le(W,m):void 0,children:[l.jsx(Ec,{item:Z,prefix:a,imageFit:y,imageMaxWidth:u,imageMaxHeight:P,imageHoverClass:L,isEditor:n,isFirstSet:K,scaled:N,onFirstSetImageDone:he}),h&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:Q,width:ee,height:"100%"}})]},`${g}-${W}`)};if(f){const m=v?V&&J?"paused":"running":"paused";return l.jsxs("div",{ref:_,className:$e(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:T>0&&C>0?{height:C}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(a)}}),l.jsx("div",{ref:$,className:`${a}-marquee-track`,"data-direction":c,onMouseEnter:xe,onMouseLeave:ge,style:{"--marquee-play-state":m},children:Array.from({length:ne},(g,W)=>l.jsx("div",{ref:W===0?A:void 0,className:$e(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:N(d),paddingRight:N(d)},"aria-hidden":W>0,children:q.map((K,Z)=>He(K,W,Z,W===0))},`set-${W}`))},"marquee-track")]})}return l.jsxs("div",{ref:_,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(a)}}),l.jsx("div",{className:$e(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:N(d),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((m,g)=>He(m,0,g))},"marquee-static")]})},_c=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1682
+ `}const Sc=30,wc=20,Tr=2,$c=2,Tc=(e,t)=>Array.from({length:t},()=>e).flat(),Lc=(e,t)=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return r.right>n.left&&r.left<n.right},Ec=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(r=>Lc(r,e))},Pc=({item:e,prefix:t,imageFit:n,imageMaxWidth:r,imageMaxHeight:i,imageHoverClass:a,isFirstSet:o,scaled:c,onFirstSetImageDone:s})=>{var C,W,w;const d=p.useRef(null);p.useLayoutEffect(()=>{if(!o)return;const O=d.current;O!=null&&O.complete&&(s==null||s())},[o,(C=e.image)==null?void 0:C.url,s]);const u=n.display==="Cover",P=n.ratioValue??"1:1",v=n.reversed??!1,[x,h]=P.split(":").map(Number),L=(v?h:x)/(v?x:h);let b=r,m=b/L;m>i&&(m=i,b=m*L);const H=c(b),F=c(m),_=((W=e.image)==null?void 0:W.url)&&l.jsx("img",{ref:d,src:e.image.url,alt:((w=e.image)==null?void 0:w.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:c(r),objectFit:"contain"},onLoad:o?s:void 0,onError:o?s:void 0});return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:H}:{width:"fit-content",maxWidth:c(r),minWidth:0}},children:l.jsx("div",{className:a,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:H,height:F,overflow:"hidden"}:{width:"fit-content",maxWidth:c(r),height:c(i)}},children:_&&e.link?l.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Te(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:_}):_})})},_c=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),{speed:o,direction:c,pauseOnHover:s,gap:d,imageMaxWidth:u,imageMaxHeight:P,imageFit:v,hoverEffect:x}=e,h=!!i,g=!n||!!r,T=g&&x!=="off"&&x!=="randomize"?`${a}-image-hover-${x}`:void 0,L=n?!!r:!0,m=((t==null?void 0:t.length)??0)>0&&(L||!!n),H=Math.max(0,o)*Sc,F=y=>E.scalingValue(y,n??!1),_=p.useRef(null),C=p.useRef(null),W=p.useRef(null),[w,O]=p.useState(0),[S,V]=p.useState(0),D=L&&s==="on",[Z,U]=p.useState(!1),[$,k]=p.useState({}),R=p.useRef($);R.current=$;const B=p.useRef(null),I=p.useRef(0),A=p.useRef(null),Q=p.useMemo(()=>(t??[]).map(y=>{var f;return((f=y.image)==null?void 0:f.url)??""}).join("\0"),[t]),[oe,ie]=p.useState(Tr),z=p.useMemo(()=>{const y=t??[];return!L||y.length===0?y:Tc(y,oe)},[t,L,oe]),M=p.useMemo(()=>z.filter(y=>{var f;return!!((f=y.image)!=null&&f.url)}).length,[z]),re=m?$c:1;p.useLayoutEffect(()=>{I.current=0,k({}),B.current=null,ie(Tr),O(0)},[Q]),p.useEffect(()=>{if(!g||x!=="randomize")return;const y=_.current;if(!y)return;const f=ee=>{k(te=>{let X=null;for(const ce of ee)ce in te&&(Ec(y,ce)||(X||(X={...te}),delete X[ce]));return X??te})},N=new IntersectionObserver(ee=>{const te=new Set;for(const X of ee){const ce=X.target.dataset.marqueeItemIndex,ve=ce!==void 0?Number(ce):NaN;Number.isNaN(ve)||te.add(ve)}te.size>0&&f(te)},{root:y,threshold:0});Object.keys($).forEach(ee=>{const te=Number(ee);y.querySelectorAll(`[data-marquee-item-index="${te}"]`).forEach(X=>N.observe(X))});let q=0;const G=()=>{const ee=Object.keys(R.current);ee.length!==0&&(f(ee.map(Number)),q=requestAnimationFrame(G))};return Object.keys(R.current).length>0&&(q=requestAnimationFrame(G)),()=>{cancelAnimationFrame(q),N.disconnect()}},[x,$,g]),p.useLayoutEffect(()=>{if(!m)return;const y=_.current,f=W.current;if(!y||!f)return;let N=0;const q=()=>{const te=y.getBoundingClientRect().width,X=f.getBoundingClientRect().width,ce=B.current,ve=typeof ce=="number"&&Math.abs(ce-X)<=.25;if(B.current=X,L&&X>0&&oe>0){const de=X/oe;if(de>0&&te>0){const xe=Math.max(Tr,Math.ceil(te/de)+1);if(xe!==oe){ie(xe);return}}}if(X>0&&w<=0){O(X);return}ve&&X!==w?O(X):!ve&&w<=0&&(cancelAnimationFrame(N),N=requestAnimationFrame(q))},G=()=>{cancelAnimationFrame(N),N=requestAnimationFrame(q)};A.current=G,G();const ee=new ResizeObserver(G);return ee.observe(y),ee.observe(f),()=>{A.current=null,cancelAnimationFrame(N),ee.disconnect()}},[L,m,w,Q,oe]),p.useLayoutEffect(()=>{const y=C.current;if(!m||!y)return;const f=w>0?w:0,N=f>0&&H>0?f/H*1e3:0,q=`${Math.max(0,N)/1e3}s`;y.style.setProperty("--marquee-distance",`${f}px`),y.style.setProperty("--marquee-duration",q)},[L,m,H,w]),p.useLayoutEffect(()=>{if(!m){V(0);return}if(w<=0){V(0);return}const y=C.current;if(!y)return;const f=()=>{const q=y.getBoundingClientRect().height;V(q>0?q:0)};f();const N=new ResizeObserver(f);return N.observe(y),()=>N.disconnect()},[m,re,z,n,d,u,P,w,v,$]);const Ce=()=>{D&&U(!0)},ue=()=>{D&&U(!1)},he=p.useCallback(()=>{var y;I.current=Math.min(M,I.current+1),(y=A.current)==null||y.call(A)},[M]),Re=p.useCallback((y,f)=>{k(N=>{const q=N[y]??f,G=(t??[]).filter(te=>te!==q);if(G.length===0)return N;const ee=G[Math.floor(Math.random()*G.length)];return{...N,[y]:ee}})},[t]),ne=(y,f,N,q)=>{const G=g&&x==="randomize"&&v.display==="Cover"?$[N]??y:y,ee=`max(${F(d)}, ${wc}px)`,te=`calc(-0.5 * (${ee} + ${F(d)}))`;return l.jsxs("div",{className:`${a}-marquee-card`,"data-marquee-item-index":N,onMouseEnter:g&&x==="randomize"&&v.display==="Cover"?()=>Re(N,y):void 0,children:[l.jsx(Pc,{item:G,prefix:a,imageFit:v,imageMaxWidth:u,imageMaxHeight:P,imageHoverClass:T,isEditor:n,isFirstSet:q,scaled:F,onFirstSetImageDone:he}),h&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${a}-gap-control`,style:{position:"absolute",top:0,right:te,width:ee,height:"100%"}})]},`${f}-${N}`)};if(m){const y=L?D&&Z?"paused":"running":"paused";return l.jsxs("div",{ref:_,className:Te(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Marquee",style:w>0&&S>0?{height:S}:void 0,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(a)}}),l.jsx("div",{ref:C,className:`${a}-marquee-track`,"data-direction":c,onMouseEnter:Ce,onMouseLeave:ue,style:{"--marquee-play-state":y},children:Array.from({length:re},(f,N)=>l.jsx("div",{ref:N===0?W:void 0,className:Te(`${a}-marquee-row`,`${a}-marquee-set`),style:{gap:F(d),paddingRight:F(d)},"aria-hidden":N>0,children:z.map((q,G)=>ne(q,N,G,N===0))},`set-${N}`))},"marquee-track")]})}return l.jsxs("div",{ref:_,className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Ho(a)}}),l.jsx("div",{className:Te(`${a}-marquee-row`,`${a}-marquee-static`),style:{gap:F(d),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((y,f)=>ne(y,0,f))},"marquee-static")]})},Ac=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1639
1683
  import cn from 'classnames';\r
1640
1684
  import { CommonComponentProps } from '../props';\r
1641
1685
  import { scalingValue } from '../utils/scalingValue';\r
@@ -2265,7 +2309,7 @@ type MarqueeProps = {\r
2265
2309
  isPreviewMode?: boolean;\r
2266
2310
  isEditMode?: boolean;\r
2267
2311
  } & CommonComponentProps;\r
2268
- `,Ac={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:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],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:""}]}},Rc={element:Pc,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Ac,sourceCode:_c,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function No(e){return`
2312
+ `,Rc={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:"toggle-cycle",enum:["on","off"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"numeric-input"}},imageFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"Fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[{if:{name:"imageFit.display",value:"Cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["direction"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],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:""}]}},Wc={element:_c,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:140},m:{width:390,height:80}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple_Marquee.mp4"},schema:Rc,sourceCode:Ac,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Bo(e){return`
2269
2313
  .${e}-marquee-wrapper {
2270
2314
  overflow: hidden;
2271
2315
  width: 100%;
@@ -2352,7 +2396,7 @@ type MarqueeProps = {\r
2352
2396
  pointer-events: auto;
2353
2397
  z-index: 10;
2354
2398
  }
2355
- `}const Wc=30,Bo=2,Ic=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:a}=E.useScopedStyles(),{autoplay:i,align:c,speed:s,direction:d,pauseOnHover:u,gap:P,cardWidth:y,corners:x,stroke:h,strokeColor:b,bgColor:L,padding:v,logoMarginTop:S,logoWidth:f,logoHeight:B,captionMarginTop:N}=e,_=!!o,$=((t==null?void 0:t.length)??0)>0,A=i==="on"&&(!n||!!r),T=$&&(A||!!n),D=Math.max(0,s)*Wc,C=j=>E.scalingValue(j,n??!1),O=p.useRef(null),V=p.useRef(null),J=p.useRef(null),[U,w]=p.useState(0),[M,R]=p.useState(0),[H,I]=p.useState(0),k=A&&u==="on",[te,oe]=p.useState(!1),ce=p.useRef(null),[q,F]=p.useState(0),[ne,xe]=p.useState(0),ge=p.useRef(null),he=j=>{var z,le,Se,Ce,Fe;return{fontSettings:{fontFamily:(e==null?void 0:e[`${j}FontFamily`])??"Arial",fontWeight:((z=e==null?void 0:e[`${j}FontSettings`])==null?void 0:z.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${j}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((Se=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:Se.textTransform)??"none",textDecoration:((Ce=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:Ce.textDecoration)??"none",fontVariant:((Fe=e==null?void 0:e[`${j}TextAppearance`])==null?void 0:Fe.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${j}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${j}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${j}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${j}LineHeight`])??.01,color:(e==null?void 0:e[`${j}Color`])??"#000000"}},Le=he("text"),He=he("caption"),m=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(j=>{var G,z;return(((G=j.text)==null?void 0:G.length)??0)>0||(((z=j.caption)==null?void 0:z.length)??0)>0}),[t]),g=p.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:M<=0||U<=0?Bo:Math.max(Bo,Math.ceil(U/M)+1),[T,t==null?void 0:t.length,M,U]);p.useLayoutEffect(()=>{if(!T)return;const j=O.current,G=J.current;if(!j||!G)return;let z=0;const le=()=>{const Fe=j.getBoundingClientRect().width,fe=G.getBoundingClientRect().width,Be=ge.current,We=typeof Be=="number"&&Math.abs(Be-fe)<=.25;if(ge.current=fe,w(Fe),typeof fe=="number"&&fe>0&&M<=0){R(fe);return}We&&fe!==M?R(fe):!We&&M<=0&&(cancelAnimationFrame(z),z=requestAnimationFrame(le))},Se=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(le)};Se();const Ce=new ResizeObserver(Se);return Ce.observe(j),Ce.observe(G),()=>{cancelAnimationFrame(z),Ce.disconnect()}},[A,T,M]),p.useLayoutEffect(()=>{const j=V.current;if(!T||!j)return;const G=M>0?M:0,z=G>0&&D>0?G/D*1e3:0,le=`${Math.max(0,z)/1e3}s`;j.style.setProperty("--marquee-distance",`${G}px`),j.style.setProperty("--marquee-duration",le)},[A,T,D,M]),p.useLayoutEffect(()=>{if(!T){I(0);return}const j=J.current,G=V.current;if(!j||!G)return;const z=()=>{let Se=0;for(let Ce=0;Ce<j.children.length;Ce++){const fe=j.children[Ce].firstElementChild;fe&&(Se=Math.max(Se,fe.offsetHeight))}Se<=0&&(Se=G.offsetHeight),I(Se>0?Se:0)};z();const le=new ResizeObserver(z);return le.observe(j),le.observe(G),()=>{le.disconnect()}},[T,g,t,n,P,y,v,h,x,f,B,q,ne]);const W=()=>{k&&oe(!0)},K=()=>{k&&oe(!1)},Z=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ee=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),Q=p.useCallback((j,G,z,le)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Z,width:"100%"},children:[l.jsx("div",{"data-controls":_?le==null?void 0:le.controlsName:void 0,"data-controls-axis":_?"y":void 0,className:_?`${a}-control`:void 0,style:{height:C((le==null?void 0:le.marginTop)??0)}}),l.jsx("div",{...le!=null&&le.dataMeasureKind?{"data-testimonial-measure":le.dataMeasureKind}:{},style:{...Ge(j,n),textAlign:ee,pointerEvents:"auto",...typeof(le==null?void 0:le.minHeightPx)=="number"&&le.minHeightPx>0?{minHeight:le.minHeightPx}:{}},children:l.jsx(wn,{content:G})})]},z),[Z,ee,n,_,a,C]),Y=p.useCallback((j,G,z)=>{var le,Se,Ce;return l.jsxs("div",{style:{padding:`${C(v.top)} ${C(v.right)} ${C(v.bottom)} ${C(v.left)}`,width:C(y+h*2),height:"100%",borderRadius:C(x),border:`${C(h)} solid ${b}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:L}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:Z,textAlign:ee},children:[j.text&&Q(Le,j.text,"text",z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(z==null?void 0:z.textMinHeightPx)=="number"&&z.textMinHeightPx>0?{minHeightPx:z.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:Z,width:"100%"},children:[l.jsx("div",{"data-controls":_&&!(z!=null&&z.dataMeasureAttrs)?"logoMarginTop":void 0,className:_&&!(z!=null&&z.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:C(S)}}),l.jsx("div",{style:{width:C(f),height:C(B)},children:((le=j.logo)==null?void 0:le.url)&&l.jsx("img",{src:j.logo.url,alt:((Se=j.logo)==null?void 0:Se.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ce=j.logo)==null?void 0:Ce.objectFit)||"contain"}})})]}),j.caption&&Q(He,j.caption,"caption",{...z!=null&&z.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:N,...z!=null&&z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(z==null?void 0:z.captionMinHeightPx)=="number"&&z.captionMinHeightPx>0?{minHeightPx:z.captionMinHeightPx}:{}})]})]},G)},[L,N,He,y,x,B,S,f,Z,ee,v.bottom,v.left,v.right,v.top,Q,h,b,Le,n,_,a]),ie=p.useCallback(j=>{F(j.maxTextPx),xe(j.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!m){ie({maxTextPx:0,maxCaptionPx:0});return}const j=ce.current;if(!j)return;const G=()=>{E.readTestimonialTextMeasure(j,ie)};G();const z=new ResizeObserver(G);return z.observe(j),()=>{z.disconnect()}},[m,ie,t,Y]);const ve=m?{textMinHeightPx:q,captionMinHeightPx:ne}:void 0,ue=m?l.jsx("div",{ref:ce,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((j,G)=>Y(j,`measure-${G}`,{dataMeasureAttrs:!0}))}):null,be=(j,G)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Y(j,`card-${G}`,ve),_&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(P)})`,width:C(P),height:"100%",pointerEvents:"auto",zIndex:2}})]},G);if(T){const j=A?k&&te?"paused":"running":"paused";return l.jsxs("div",{ref:O,className:$e(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:No(a)}}),ue,l.jsx("div",{ref:V,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:W,onMouseLeave:K,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":j},children:Array.from({length:g},(G,z)=>l.jsx("div",{ref:z===0?J:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(P),paddingRight:C(P)},"aria-hidden":z>0,children:t==null?void 0:t.map((le,Se)=>be(le,`${z}-${Se}`))},`set-${z}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:No(a)}}),ue,l.jsx("div",{style:{gap:C(P),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((j,G)=>be(j,G))})]})},kc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2399
+ `}const Ic=30,Oo=2,kc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),{autoplay:o,align:c,speed:s,direction:d,pauseOnHover:u,gap:P,cardWidth:v,corners:x,stroke:h,strokeColor:g,bgColor:T,padding:L,logoMarginTop:b,logoWidth:m,logoHeight:H,captionMarginTop:F}=e,_=!!i,C=((t==null?void 0:t.length)??0)>0,W=o==="on"&&(!n||!!r),w=C&&(W||!!n),O=Math.max(0,s)*Ic,S=K=>E.scalingValue(K,n??!1),V=p.useRef(null),D=p.useRef(null),Z=p.useRef(null),[U,$]=p.useState(0),[k,R]=p.useState(0),[B,I]=p.useState(0),A=W&&u==="on",[Q,oe]=p.useState(!1),ie=p.useRef(null),[z,M]=p.useState(0),[re,Ce]=p.useState(0),ue=p.useRef(null),he=K=>{var j,le,we,Se,Ne;return{fontSettings:{fontFamily:(e==null?void 0:e[`${K}FontFamily`])??"Arial",fontWeight:((j=e==null?void 0:e[`${K}FontSettings`])==null?void 0:j.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${K}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((we=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:we.textTransform)??"none",textDecoration:((Se=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Se.textDecoration)??"none",fontVariant:((Ne=e==null?void 0:e[`${K}TextAppearance`])==null?void 0:Ne.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${K}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${K}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${K}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${K}LineHeight`])??.01,color:(e==null?void 0:e[`${K}Color`])??"#000000"}},Re=he("text"),ne=he("caption"),y=p.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(K=>{var Y,j;return(((Y=K.text)==null?void 0:Y.length)??0)>0||(((j=K.caption)==null?void 0:j.length)??0)>0}),[t]),f=p.useMemo(()=>!w||(t==null?void 0:t.length)===0?1:k<=0||U<=0?Oo:Math.max(Oo,Math.ceil(U/k)+1),[w,t==null?void 0:t.length,k,U]);p.useLayoutEffect(()=>{if(!w)return;const K=V.current,Y=Z.current;if(!K||!Y)return;let j=0;const le=()=>{const Ne=K.getBoundingClientRect().width,ye=Y.getBoundingClientRect().width,He=ue.current,ke=typeof He=="number"&&Math.abs(He-ye)<=.25;if(ue.current=ye,$(Ne),typeof ye=="number"&&ye>0&&k<=0){R(ye);return}ke&&ye!==k?R(ye):!ke&&k<=0&&(cancelAnimationFrame(j),j=requestAnimationFrame(le))},we=()=>{cancelAnimationFrame(j),j=requestAnimationFrame(le)};we();const Se=new ResizeObserver(we);return Se.observe(K),Se.observe(Y),()=>{cancelAnimationFrame(j),Se.disconnect()}},[W,w,k]),p.useLayoutEffect(()=>{const K=D.current;if(!w||!K)return;const Y=k>0?k:0,j=Y>0&&O>0?Y/O*1e3:0,le=`${Math.max(0,j)/1e3}s`;K.style.setProperty("--marquee-distance",`${Y}px`),K.style.setProperty("--marquee-duration",le)},[W,w,O,k]),p.useLayoutEffect(()=>{if(!w){I(0);return}const K=Z.current,Y=D.current;if(!K||!Y)return;const j=()=>{let we=0;for(let Se=0;Se<K.children.length;Se++){const ye=K.children[Se].firstElementChild;ye&&(we=Math.max(we,ye.offsetHeight))}we<=0&&(we=Y.offsetHeight),I(we>0?we:0)};j();const le=new ResizeObserver(j);return le.observe(K),le.observe(Y),()=>{le.disconnect()}},[w,f,t,n,P,v,L,h,x,m,H,z,re]);const N=()=>{A&&oe(!0)},q=()=>{A&&oe(!1)},G=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),ee=p.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]),te=p.useCallback((K,Y,j,le)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:G,width:"100%"},children:[l.jsx("div",{"data-controls":_?le==null?void 0:le.controlsName:void 0,"data-controls-axis":_?"y":void 0,className:_?`${a}-control`:void 0,style:{height:S((le==null?void 0:le.marginTop)??0)}}),l.jsx("div",{...le!=null&&le.dataMeasureKind?{"data-testimonial-measure":le.dataMeasureKind}:{},style:{...Ge(K,n),textAlign:ee,pointerEvents:"auto",...typeof(le==null?void 0:le.minHeightPx)=="number"&&le.minHeightPx>0?{minHeight:le.minHeightPx}:{}},children:l.jsx(wn,{content:Y})})]},j),[G,ee,n,_,a,S]),X=p.useCallback((K,Y,j)=>{var le,we,Se;return l.jsxs("div",{style:{padding:`${S(L.top)} ${S(L.right)} ${S(L.bottom)} ${S(L.left)}`,width:S(v+h*2),height:"100%",borderRadius:S(x),border:`${S(h)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:`${a}-cover`,style:{background:T}}),l.jsxs("div",{className:`${a}-elements-overlay`,style:{alignItems:G,textAlign:ee},children:[K.text&&te(Re,K.text,"text",j!=null&&j.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(j==null?void 0:j.textMinHeightPx)=="number"&&j.textMinHeightPx>0?{minHeightPx:j.textMinHeightPx}:void 0),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:G,width:"100%"},children:[l.jsx("div",{"data-controls":_&&!(j!=null&&j.dataMeasureAttrs)?"logoMarginTop":void 0,className:_&&!(j!=null&&j.dataMeasureAttrs)?`${a}-control`:void 0,style:{height:S(b)}}),l.jsx("div",{style:{width:S(m),height:S(H)},children:((le=K.logo)==null?void 0:le.url)&&l.jsx("img",{src:K.logo.url,alt:((we=K.logo)==null?void 0:we.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Se=K.logo)==null?void 0:Se.objectFit)||"contain"}})})]}),K.caption&&te(ne,K.caption,"caption",{...j!=null&&j.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:F,...j!=null&&j.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(j==null?void 0:j.captionMinHeightPx)=="number"&&j.captionMinHeightPx>0?{minHeightPx:j.captionMinHeightPx}:{}})]})]},Y)},[T,F,ne,v,x,H,b,m,G,ee,L.bottom,L.left,L.right,L.top,te,h,g,Re,n,_,a]),ce=p.useCallback(K=>{M(K.maxTextPx),Ce(K.maxCaptionPx)},[]);p.useLayoutEffect(()=>{if(!y){ce({maxTextPx:0,maxCaptionPx:0});return}const K=ie.current;if(!K)return;const Y=()=>{E.readTestimonialTextMeasure(K,ce)};Y();const j=new ResizeObserver(Y);return j.observe(K),()=>{j.disconnect()}},[y,ce,t,X]);const ve=y?{textMinHeightPx:z,captionMinHeightPx:re}:void 0,de=y?l.jsx("div",{ref:ie,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((K,Y)=>X(K,`measure-${Y}`,{dataMeasureAttrs:!0}))}):null,xe=(K,Y)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[X(K,`card-${Y}`,ve),_&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${S(P)})`,width:S(P),height:"100%",pointerEvents:"auto",zIndex:2}})]},Y);if(w){const K=W?A&&Q?"paused":"running":"paused";return l.jsxs("div",{ref:V,className:Te(`${a}-wrapper`,`${a}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...B>0?{height:B}:{}},children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Bo(a)}}),de,l.jsx("div",{ref:D,className:`${a}-marquee-track`,"data-direction":d,onMouseEnter:N,onMouseLeave:q,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":K},children:Array.from({length:f},(Y,j)=>l.jsx("div",{ref:j===0?Z:void 0,className:`${a}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:S(P),paddingRight:S(P)},"aria-hidden":j>0,children:t==null?void 0:t.map((le,we)=>xe(le,`${j}-${we}`))},`set-${j}`))})]})}return l.jsxs("div",{className:`${a}-wrapper`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Bo(a)}}),de,l.jsx("div",{style:{gap:S(P),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((K,Y)=>xe(K,Y))})]})},Fc=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2356
2400
  import cn from 'classnames';\r
2357
2401
  import { CommonComponentProps } from '../props';\r
2358
2402
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -2968,7 +3012,7 @@ type TestimonialsSettings = {\r
2968
3012
  logoHeight: number;\r
2969
3013
  captionMarginTop: number;\r
2970
3014
  };\r
2971
- `,Oo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Fc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Oo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Oo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Mc={element:Ic,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Fc,sourceCode:kc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Hc(e){return`
3015
+ `,Vo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Mc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Vo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Vo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Nc={element:kc,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Mc,sourceCode:Fc,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Hc(e){return`
2972
3016
  .${e}-container {
2973
3017
  position: relative;
2974
3018
  overflow-x: clip;
@@ -3092,7 +3136,7 @@ type TestimonialsSettings = {\r
3092
3136
  width: 100%;
3093
3137
  height: 100%;
3094
3138
  }
3095
- `}const Nc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o})=>{const{prefix:a}=E.useScopedStyles(),i=t||[],c=!!o,{autoplay:s,delay:d,align:u,width:P,imageMarginTop:y,textMarginTop:x,captionMarginTop:h,imageWidth:b,imageHeight:L,controlsWidth:v,controlsColor:S,controlsHoverColor:f}=e,B=s==="on"&&r,[N,_]=p.useState(0),[$,A]=p.useState(null),[T,D]=p.useState(!1),C=p.useRef(null),O=p.useMemo(()=>{switch(u){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[u]),V=p.useMemo(()=>{switch(u){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[u]);p.useEffect(()=>{_(0),A(null),D(!1)},[i.length]);const J=i[N],U=$===null?null:i[$],w=m=>{var W,K,Z,ee,Q;return{fontSettings:{fontFamily:(e==null?void 0:e[`${m}FontFamily`])??"Arial",fontWeight:((W=e==null?void 0:e[`${m}FontSettings`])==null?void 0:W.fontWeight)??400,fontStyle:((K=e==null?void 0:e[`${m}FontSettings`])==null?void 0:K.fontStyle)??"normal"},textAppearance:{textTransform:((Z=e==null?void 0:e[`${m}TextAppearance`])==null?void 0:Z.textTransform)??"none",textDecoration:((ee=e==null?void 0:e[`${m}TextAppearance`])==null?void 0:ee.textDecoration)??"none",fontVariant:((Q=e==null?void 0:e[`${m}TextAppearance`])==null?void 0:Q.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${m}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${m}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${m}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${m}WordSpacing`])??0,color:(e==null?void 0:e[`${m}Color`])??"#000000"}},M=w("text"),R=w("caption"),H=i.length>1&&i.some(m=>{var g,W;return(((g=m.text)==null?void 0:g.length)??0)>0||(((W=m.caption)==null?void 0:W.length)??0)>0}),I=p.useRef(null),[k,te]=p.useState(0),[oe,ce]=p.useState(0),q=e.controls??{mode:"Off",icon:null},F=i.length>1,ne=p.useCallback((m,g)=>!F||g===m?m:(C.current&&window.clearTimeout(C.current),A(m),D(!0),C.current=window.setTimeout(()=>{A(null),D(!1),C.current=null},300),g),[F]),xe=p.useCallback(()=>{F&&_(m=>ne(m,(m-1+i.length)%i.length))},[F,ne,i.length]),ge=p.useCallback(()=>{F&&_(m=>ne(m,(m+1)%i.length))},[F,ne,i.length]);p.useEffect(()=>{if(!B||!F)return;const m=Math.max(300,Number.isFinite(d*1e3)?d*1e3:0),g=window.setInterval(()=>{_(W=>ne(W,(W+1)%i.length))},m);return()=>{window.clearInterval(g)}},[B,F,ne,i.length,d]),p.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);const he=(m,g)=>{var ee,Q,Y,ie;const W=g==null?void 0:g.textMinHeightPx,K=g==null?void 0:g.captionMinHeightPx,Z=g==null?void 0:g.dataMeasureAttrs;return l.jsxs(l.Fragment,{children:[m.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":c?"textMarginTop":void 0,className:c?`${a}-control`:void 0,style:{height:E.scalingValue(x??0,n??!1)}}),l.jsx("div",{...Z&&{"data-testimonial-measure":"text"},style:{...Ge(M,n),...W&&W>0?{minHeight:W}:{},textAlign:V,pointerEvents:"auto"},children:l.jsx(wn,{content:m.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":c?"imageMarginTop":void 0,className:c?`${a}-control`:void 0,style:{height:E.scalingValue(y??0,n??!1)}}),l.jsx("div",{style:{width:E.scalingValue(b??0,n??!1),height:E.scalingValue(L??0,n??!1)},children:((ee=m.image)==null?void 0:ee.url)&&l.jsx("img",{src:(Q=m.image)==null?void 0:Q.url,alt:((Y=m.image)==null?void 0:Y.name)??"",className:`${a}-icon`,style:{objectFit:((ie=m.image)==null?void 0:ie.objectFit)||"contain"}})})]}),m.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":c?"captionMarginTop":void 0,className:c?`${a}-control`:void 0,style:{height:E.scalingValue(h??0,n??!1)}}),l.jsx("div",{...Z?{"data-testimonial-measure":"caption"}:{},style:{...Ge(R,n),...K&&K>0?{minHeight:K}:{},textAlign:V,pointerEvents:"auto"},children:l.jsx(wn,{content:m.caption})})]})]})},Le=p.useCallback(m=>{te(m.maxTextPx),ce(m.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!H){Le({maxTextPx:0,maxCaptionPx:0});return}const m=I.current;if(!m)return;const g=()=>{E.readTestimonialTextMeasure(m,Le)};g();const W=new ResizeObserver(g);return W.observe(m),()=>{W.disconnect()}},[H,Le,t]),!J)return l.jsx(l.Fragment,{});const He=H?{textMinHeightPx:k,captionMinHeightPx:oe}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Hc(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:E.scalingValue(P??0,n??!1),alignItems:O},children:[H&&l.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:i.map((m,g)=>l.jsx("div",{style:{width:"100%"},children:he(m,{dataMeasureAttrs:!0})},g))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[U&&T&&l.jsx("div",{className:$e(`${a}-fade-item-prev`,`${a}-fade-out`),children:he(U,He)}),l.jsx("div",{className:$e(`${a}-fade-item-current`,T?`${a}-fade-in`:void 0),children:he(J,He)})]})]}),q.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:E.scalingValue(v??.02,n??!1),height:E.scalingValue(v??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:xe,disabled:!F,"aria-label":"Previous testimonial",children:q.icon&&l.jsx(Lt,{url:q.icon,fill:S,hoverFill:f,className:$e(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:$e(`${a}-arrow`,`${a}-next-arrow`),style:{width:E.scalingValue(v??.02,n??!1),height:E.scalingValue(v??.02,n??!1),"--arrow-hover-color":f},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:ge,disabled:!F,"aria-label":"Next testimonial",children:q.icon&&l.jsx(Lt,{url:q.icon,fill:S,hoverFill:f,className:`${a}-arrow-img`})})})]})]})})},Bc=`import cn from 'classnames';\r
3139
+ `}const Bc=({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i})=>{const{prefix:a}=E.useScopedStyles(),o=t||[],{autoplay:c,delay:s,align:d,width:u,imageMarginTop:P,textMarginTop:v,captionMarginTop:x,imageWidth:h,imageHeight:g,controlsWidth:T,controlsColor:L,controlsHoverColor:b}=e,m=c==="on"&&r,[H,F]=p.useState(0),[_,C]=p.useState(null),[W,w]=p.useState(!1),O=p.useRef(null),S=p.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),V=p.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);p.useEffect(()=>{F(0),C(null),w(!1)},[o.length]);const D=o[H],Z=_===null?null:o[_],U=ne=>{var f,N,q,G,ee;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ne}FontFamily`])??"Arial",fontWeight:((f=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:f.fontWeight)??400,fontStyle:((N=e==null?void 0:e[`${ne}FontSettings`])==null?void 0:N.fontStyle)??"normal"},textAppearance:{textTransform:((q=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:q.textTransform)??"none",textDecoration:((G=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:G.textDecoration)??"none",fontVariant:((ee=e==null?void 0:e[`${ne}TextAppearance`])==null?void 0:ee.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ne}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ne}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ne}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ne}WordSpacing`])??0,color:(e==null?void 0:e[`${ne}Color`])??"#000000"}},$=U("text"),k=U("caption"),R=o.length>1&&o.some(ne=>{var y,f;return(((y=ne.text)==null?void 0:y.length)??0)>0||(((f=ne.caption)==null?void 0:f.length)??0)>0}),B=p.useRef(null),[I,A]=p.useState(0),[Q,oe]=p.useState(0),ie=e.controls??{mode:"Off",icon:null},z=o.length>1,M=p.useCallback((ne,y)=>!z||y===ne?ne:(O.current&&window.clearTimeout(O.current),C(ne),w(!0),O.current=window.setTimeout(()=>{C(null),w(!1),O.current=null},300),y),[z]),re=p.useCallback(()=>{z&&F(ne=>M(ne,(ne-1+o.length)%o.length))},[z,M,o.length]),Ce=p.useCallback(()=>{z&&F(ne=>M(ne,(ne+1)%o.length))},[z,M,o.length]);p.useEffect(()=>{if(!m||!z)return;const ne=Math.max(300,Number.isFinite(s*1e3)?s*1e3:0),y=window.setInterval(()=>{F(f=>M(f,(f+1)%o.length))},ne);return()=>{window.clearInterval(y)}},[m,z,M,o.length,s]),p.useEffect(()=>()=>{O.current&&window.clearTimeout(O.current)},[]);const ue=(ne,y)=>{var ee,te,X,ce;const f=y==null?void 0:y.textMinHeightPx,N=y==null?void 0:y.captionMinHeightPx,q=y==null?void 0:y.dataMeasureAttrs,G=i&&!(y!=null&&y.dataMeasureAttrs)&&!(y!=null&&y.hideControls);return l.jsxs(l.Fragment,{children:[ne.text&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[l.jsx("div",{"data-controls":G?"textMarginTop":void 0,className:G?`${a}-control`:void 0,style:{height:E.scalingValue(v??0,n??!1)}}),l.jsx("div",{...q&&{"data-testimonial-measure":"text"},style:{...Ge($,n),...f&&f>0?{minHeight:f}:{},textAlign:V,pointerEvents:"auto"},children:l.jsx(wn,{content:ne.text})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[l.jsx("div",{"data-controls":G?"imageMarginTop":void 0,className:G?`${a}-control`:void 0,style:{height:E.scalingValue(P??0,n??!1)}}),l.jsx("div",{style:{width:E.scalingValue(h??0,n??!1),height:E.scalingValue(g??0,n??!1)},children:((ee=ne.image)==null?void 0:ee.url)&&l.jsx("img",{src:(te=ne.image)==null?void 0:te.url,alt:((X=ne.image)==null?void 0:X.name)??"",className:`${a}-icon`,style:{objectFit:((ce=ne.image)==null?void 0:ce.objectFit)||"contain"}})})]}),ne.caption&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:S,width:"100%"},children:[l.jsx("div",{"data-controls":G?"captionMarginTop":void 0,className:G?`${a}-control`:void 0,style:{height:E.scalingValue(x??0,n??!1)}}),l.jsx("div",{...q?{"data-testimonial-measure":"caption"}:{},style:{...Ge(k,n),...N&&N>0?{minHeight:N}:{},textAlign:V,pointerEvents:"auto"},children:l.jsx(wn,{content:ne.caption})})]})]})},he=p.useCallback(ne=>{A(ne.maxTextPx),oe(ne.maxCaptionPx)},[]);if(p.useLayoutEffect(()=>{if(!R){he({maxTextPx:0,maxCaptionPx:0});return}const ne=B.current;if(!ne)return;const y=()=>{E.readTestimonialTextMeasure(ne,he)};y();const f=new ResizeObserver(y);return f.observe(ne),()=>{f.disconnect()}},[R,he,t]),!D)return l.jsx(l.Fragment,{});const Re=R?{textMinHeightPx:I,captionMinHeightPx:Q}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:`${a}-container`,children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Hc(a)}}),l.jsxs("div",{className:`${a}-wrapper`,style:{width:E.scalingValue(u??0,n??!1),alignItems:S},children:[R&&l.jsx("div",{ref:B,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:o.map((ne,y)=>l.jsx("div",{style:{width:"100%"},children:ue(ne,{dataMeasureAttrs:!0})},y))}),l.jsxs("div",{className:`${a}-fade-stack`,children:[Z&&W&&l.jsx("div",{className:Te(`${a}-fade-item-prev`,`${a}-fade-out`),children:ue(Z,{...Re,hideControls:!0})}),l.jsx("div",{className:Te(`${a}-fade-item-current`,W?`${a}-fade-in`:void 0),children:ue(D,Re)})]})]}),ie.mode==="On"&&l.jsxs("div",{className:`${a}-controls`,children:[l.jsx("div",{className:`${a}-arrow`,style:{width:E.scalingValue(T??.02,n??!1),height:E.scalingValue(T??.02,n??!1),"--arrow-hover-color":b},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:re,disabled:!z,"aria-label":"Previous testimonial",children:ie.icon&&l.jsx(At,{url:ie.icon,fill:L,hoverFill:b,className:Te(`${a}-arrow-img`,`${a}-mirror`)})})}),l.jsx("div",{className:Te(`${a}-arrow`,`${a}-next-arrow`),style:{width:E.scalingValue(T??.02,n??!1),height:E.scalingValue(T??.02,n??!1),"--arrow-hover-color":b},children:l.jsx("button",{type:"button",className:`${a}-arrow-inner`,onClick:Ce,disabled:!z,"aria-label":"Next testimonial",children:ie.icon&&l.jsx(At,{url:ie.icon,fill:L,hoverFill:b,className:`${a}-arrow-img`})})})]})]})})},Oc=`import cn from 'classnames';\r
3096
3140
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
3097
3141
  import { CommonComponentProps } from '../props';\r
3098
3142
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -3242,12 +3286,12 @@ type RenderItemContentOpts = {\r
3242
3286
  textMinHeightPx?: number;\r
3243
3287
  captionMinHeightPx?: number;\r
3244
3288
  dataMeasureAttrs?: boolean;\r
3289
+ hideControls?: boolean;\r
3245
3290
  };\r
3246
3291
  \r
3247
3292
  export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode, isEditMode }: TestimonialsProps) => {\r
3248
3293
  const { prefix: P } = useScopedStyles();\r
3249
3294
  const items = content || [];\r
3250
- const showControls = Boolean(isEditMode);\r
3251
3295
  const { autoplay, delay, align, width, imageMarginTop, textMarginTop, captionMarginTop, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor } = settings;\r
3252
3296
  const isAnimating = autoplay === 'on' && isPreviewMode;\r
3253
3297
  const [activeIndex, setActiveIndex] = useState(0);\r
@@ -3364,14 +3408,15 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode,
3364
3408
  const textMinHeightPx = opts?.textMinHeightPx;\r
3365
3409
  const captionMinHeightPx = opts?.captionMinHeightPx;\r
3366
3410
  const dataMeasureAttrs = opts?.dataMeasureAttrs;\r
3411
+ const showMarginControls = isEditMode && !opts?.dataMeasureAttrs && !opts?.hideControls;\r
3367
3412
  \r
3368
3413
  return (\r
3369
3414
  <>\r
3370
3415
  {item.text && (\r
3371
3416
  <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>\r
3372
3417
  <div\r
3373
- data-controls={showControls ? 'textMarginTop' : undefined}\r
3374
- className={showControls ? \`\${P}-control\` : undefined}\r
3418
+ data-controls={showMarginControls ? 'textMarginTop' : undefined}\r
3419
+ className={showMarginControls ? \`\${P}-control\` : undefined}\r
3375
3420
  style={{ height: scalingValue(textMarginTop ?? 0, isEditor ?? false) }}\r
3376
3421
  />\r
3377
3422
  <div\r
@@ -3389,8 +3434,8 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode,
3389
3434
  )}\r
3390
3435
  <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>\r
3391
3436
  <div\r
3392
- data-controls={showControls ? 'imageMarginTop' : undefined}\r
3393
- className={showControls ? \`\${P}-control\` : undefined}\r
3437
+ data-controls={showMarginControls ? 'imageMarginTop' : undefined}\r
3438
+ className={showMarginControls ? \`\${P}-control\` : undefined}\r
3394
3439
  style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false) }}\r
3395
3440
  />\r
3396
3441
  <div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>\r
@@ -3407,8 +3452,8 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode,
3407
3452
  {item.caption && (\r
3408
3453
  <div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>\r
3409
3454
  <div\r
3410
- data-controls={showControls ? 'captionMarginTop' : undefined}\r
3411
- className={showControls ? \`\${P}-control\` : undefined}\r
3455
+ data-controls={showMarginControls ? 'captionMarginTop' : undefined}\r
3456
+ className={showMarginControls ? \`\${P}-control\` : undefined}\r
3412
3457
  style={{ height: scalingValue(captionMarginTop ?? 0, isEditor ?? false) }}\r
3413
3458
  />\r
3414
3459
  <div\r
@@ -3490,7 +3535,7 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode,
3490
3535
  <div className={\`\${P}-fade-stack\`}>\r
3491
3536
  {previousItem && isFading && (\r
3492
3537
  <div className={cn(\`\${P}-fade-item-prev\`, \`\${P}-fade-out\`)}>\r
3493
- {renderItemContent(previousItem, visibleContentOpts)}\r
3538
+ {renderItemContent(previousItem, { ...visibleContentOpts, hideControls: true })}\r
3494
3539
  </div>\r
3495
3540
  )}\r
3496
3541
  <div className={cn(\`\${P}-fade-item-current\`, isFading ? \`\${P}-fade-in\` : undefined)}>\r
@@ -3586,11 +3631,11 @@ type TestimonialsSettings = {\r
3586
3631
  icon?: string | null;\r
3587
3632
  };\r
3588
3633
  };\r
3589
- `,Oc="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Vo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Vc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Vo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Vo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Oc},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Dc={element:Nc,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Vc,sourceCode:Bc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function jc(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zc(e){return`
3634
+ `,Vc="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),Do={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Dc={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"percentage-input"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Do.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...Do.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Vc},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},jc={element:Bc,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Dc,sourceCode:Oc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function zc(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Kc(e){return`
3590
3635
  .${e}-wrapper {
3591
3636
  display: grid;
3592
3637
  align-items: start;
3593
- min-height: ${jc(48)};
3638
+ min-height: ${zc(48)};
3594
3639
  }
3595
3640
  .${e}-item {
3596
3641
  display: flex;
@@ -3678,7 +3723,7 @@ type TestimonialsSettings = {\r
3678
3723
  pointer-events: auto;
3679
3724
  z-index: 10;
3680
3725
  }
3681
- `}const $t=500,Nt="cubic-bezier(0.22, 1, 0.36, 1)";function Kc({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:a,onPrev:i,onNext:c,counterClassName:s,counterStyle:d}){const u=p.useRef(null),P=p.useRef(null),[y,x]=p.useState(null),[h,b]=p.useState(r?"opening":"open"),[L,v]=p.useState(!0),S=p.useRef(t),f=p.useCallback(()=>{const T=u.current,D=P.current;if(!T||!D)return;const C=T.getBoundingClientRect(),O=C.width,V=C.height,J=D.naturalWidth,U=D.naturalHeight;if(!O||!V||!J||!U)return;if(n==="Cover"){x({width:O,height:V,left:C.left,top:C.top});return}const w=J/U,M=O/V;if(w>M){const R=O/w;x({width:O,height:R,left:C.left,top:C.top+(V-R)/2})}else{const R=V*w;x({width:R,height:V,left:C.left+(O-R)/2,top:C.top})}},[n]);p.useEffect(()=>{f();const T=u.current;if(!T)return;const D=new ResizeObserver(()=>f());return D.observe(T),()=>D.disconnect()},[f,t]),p.useEffect(()=>{if(h!=="opening"||!y)return;const T={id:0};return T.id=requestAnimationFrame(()=>{T.id=requestAnimationFrame(()=>b("open"))}),()=>cancelAnimationFrame(T.id)},[h,y]),p.useEffect(()=>{if(h!=="closing")return;const T=setTimeout(()=>a(),$t);return()=>clearTimeout(T)},[h,a]),p.useEffect(()=>{S.current!==t&&v(!1),S.current=t},[t]);const B=()=>{h!=="closing"&&b("closing")},N=h==="open",_=h==="closing",$=_&&o&&!!r,A=h==="opening"?r??y:$?r:y;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:B,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:N?1:0,transition:`opacity ${$t}ms ${Nt}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:N?1:0,transition:`opacity ${$t}ms ${Nt}`},children:e.length>1&&l.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]}),A&&l.jsx("img",{ref:P,src:e[t],onLoad:f,style:{position:"fixed",top:A.top,left:A.left,width:A.width,height:A.height,objectFit:n==="Cover"?"cover":"contain",opacity:_&&!$?0:1,transition:_&&!$?`opacity ${$t}ms ${Nt}`:$||L?`top ${$t}ms ${Nt}, left ${$t}ms ${Nt}, width ${$t}ms ${Nt}, height ${$t}ms ${Nt}`:"none",pointerEvents:"none",zIndex:9998}}),N&&y&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left,width:y.width/2,height:y.height,cursor:"w-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),i()}}),l.jsx("div",{style:{position:"fixed",top:y.top,left:y.left+y.width/2,width:y.width/2,height:y.height,cursor:"e-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),c()}})]})]})}function qc({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,metadata:a,activeEvent:i,layoutId:c}){const{prefix:s}=E.useScopedStyles(),d=!!o,{type:u="A",gridLayout:P,textBoxWidth:y,verticalGap:x,entriesCount:h,lightbox:b,imageDisplay:L,slider:v,sliderTiming:S,direction:f,transition:B,titleMarginTop:N,subtitleMarginTop:_,titleColor:$,subtitleColor:A,lightboxCounterColor:T,titleFontFamily:D,titleFontSettings:C,titleFontSize:O,titleLineHeight:V,titleLetterSpacing:J,titleWordSpacing:U,titleTextAppearance:w,subtitleFontFamily:M,subtitleFontSettings:R,subtitleFontSize:H,subtitleLineHeight:I,subtitleLetterSpacing:k,subtitleWordSpacing:te,subtitleTextAppearance:oe,lightboxCounterFontFamily:ce,lightboxCounterFontSettings:q,lightboxCounterFontSize:F,lightboxCounterLineHeight:ne,lightboxCounterLetterSpacing:xe,lightboxCounterWordSpacing:ge,lightboxCounterTextAppearance:he}=e,Le={fontSettings:{fontFamily:D,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:O??.01,lineHeight:V,letterSpacing:J??0,wordSpacing:U??0,textAppearance:w,color:$},m={...st(Ge(Le,n))},g={fontSettings:{fontFamily:M,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:H??.01,lineHeight:I,letterSpacing:k??0,wordSpacing:te??0,textAppearance:oe,color:A},K={...st(Ge(g,n))},Z={fontSettings:{fontFamily:ce,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ne,letterSpacing:xe??0,wordSpacing:ge??0,textAppearance:he,color:T},Q={...st(Ge(Z,n))},Y=E.buildColorVars(s,{titleColor:$,subtitleColor:A,lightboxCounterColor:T},Uc,Gc),ve=`${i&&i!=="default"?`${s}-state-${i}`:""}`.trim(),ue=h===0?1/0:h,be=(t??[]).slice(0,ue),j=P.entryWidth??.2,G=(L==null?void 0:L.display)==="Cover",z=(L==null?void 0:L.ratioValue)??"1:1",le=(L==null?void 0:L.reversed)??!1,[Se,Ce]=z.split(":").map(Number),Fe=le?Ce:Se,fe=le?Se:Ce,Be=`${Fe} / ${fe}`,We=Fe>=fe,Ee={objectFit:G?"cover":"contain",...G&&{aspectRatio:Be,width:We?"100%":"auto",height:We?"auto":"100%"}},[Oe,Ct]=p.useState("ltr"),[Ye,It]=p.useState(0),nt=p.useRef(null);p.useEffect(()=>{const re=nt.current;if(!re)return;const Ie=new ResizeObserver(Me=>{It(Math.round(Me[0].contentRect.width))});return Ie.observe(re),()=>Ie.disconnect()},[]);const St=(()=>{const re={...Y},Ie=nt.current?getComputedStyle(nt.current).getPropertyValue("--cntrl-article-width").trim():"";return Ie&&(re["--cntrl-article-width"]=Ie),re})(),[kt,ye]=p.useState(!1),[Ve,ut]=p.useState([]),[Ft,Mt]=p.useState(0),[Kt,qt]=p.useState(null),Ut=(re,Ie,Me)=>{if(n&&!r||b==="Off")return;const Re=re.currentTarget.getBoundingClientRect();qt({top:Re.top,left:Re.left,width:Re.width,height:Re.height}),ut(Ie),Mt(Me),ye(!0)};return p.useEffect(()=>{if(!kt||b!=="On"||typeof document>"u")return;const re=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=re}},[kt,b]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:zc(s)}}),l.jsx("div",{style:Y,children:l.jsx("div",{ref:nt,className:`${s}-wrapper ${s}-type-${u} ${ve}`.trim(),style:{gridTemplateColumns:`repeat(${P.columnsCount}, minmax(0, 1fr))`,rowGap:E.scalingValue(x??0,n),columnGap:E.scalingValue(P.horizontalGap??0,n),width:E.scalingValue(P.wrapperWidth??0,n)},children:be.map((re,Ie)=>{var Me,Re;return l.jsx("div",{className:`${s}-item`.trim(),children:l.jsx("div",{className:o?`${s}-item-inner`:`${s}-item-inner-hidden`,style:{width:(y??0)>100?`calc(${E.scalingValue(j??0,n)} * (${y} / 100))`:E.scalingValue(j??0,n)},children:l.jsxs("a",{href:(((Me=re.link)==null?void 0:Me.length)??0)>0&&b==="Off"?re.link:void 0,target:"_blank",className:`${s}-item-image-link`,children:[l.jsx("div",{className:`${s}-item-image-wrapper`,style:{width:E.scalingValue(j??0,n),height:E.scalingValue(j??0,n)},children:(((Re=re.image)==null?void 0:Re.length)??0)===0?null:v==="Off"?l.jsx("img",{src:re.image[0].url,alt:re.image[0].name,className:`${s}-item-image`.trim(),style:Ee,onClick:De=>Ut(De,re.image.map(pt=>pt.url),0)}):l.jsx(ao,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:S*1e3,width:"100%",height:"100%",speed:500,type:B==="Fade"?"fade":"loop",rewind:B==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:B==="Fade"?"ltr":f!=="Random"?f==="Horizontal"?"ltr":"ttb":Oe},onMoved:De=>{if(f!=="Random"||B==="Fade")return;const pt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Ct(pt),setTimeout(()=>{De.refresh()},0)},children:re.image.map((De,pt)=>l.jsx(so,{children:l.jsx("img",{src:De.url,alt:De.name,className:`${s}-item-image`.trim(),style:Ee,onClick:vr=>Ut(vr,re.image.map(Fn=>Fn.url),pt)})},pt))},`${B}-${j}-${f}-${S}-${Ye}-${c}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${s}-control`,style:{height:E.scalingValue(N??0,n),width:E.scalingValue(j*y/100,n)}}),l.jsx("p",{className:`${s}-item-title`.trim(),style:{width:`calc(${E.scalingValue(j??0,n)} * (${y} / 100))`,...m},children:re.title}),u==="B"&&d&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${s}-control`,style:{height:E.scalingValue(_??0,n),width:E.scalingValue(j*y/100,n)}}),u==="B"&&l.jsx("p",{className:`${s}-item-subtitle`.trim(),style:{width:`calc(${E.scalingValue(j??0,n)} * (${y} / 100))`,...K},children:re.subtitle})]})})},Ie)})})}),(!n||r)&&kt&&typeof document<"u"&&b==="On"&&Qo.createPortal(l.jsx("div",{style:St,"data-selection":"none",children:l.jsx(Kc,{images:Ve,index:Ft,imageDisplay:L.display,originRect:Kt,reverseClose:v==="Off",onClose:()=>ye(!1),onPrev:()=>Mt(re=>(re-1+Ve.length)%Ve.length),onNext:()=>Mt(re=>(re+1)%Ve.length),counterClassName:`${s}-lightbox-counter`.trim(),counterStyle:Q})}),document.body)]})}const Uc={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gc=["hover","focus","filled","success","error"],Yc=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
3726
+ `}const Pt=500,Bt="cubic-bezier(0.22, 1, 0.36, 1)";function qc({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:i,onClose:a,onPrev:o,onNext:c,counterClassName:s,counterStyle:d}){const u=p.useRef(null),P=p.useRef(null),[v,x]=p.useState(null),[h,g]=p.useState(r?"opening":"open"),[T,L]=p.useState(!0),b=p.useRef(t),m=p.useCallback(()=>{const w=u.current,O=P.current;if(!w||!O)return;const S=w.getBoundingClientRect(),V=S.width,D=S.height,Z=O.naturalWidth,U=O.naturalHeight;if(!V||!D||!Z||!U)return;if(n==="Cover"){x({width:V,height:D,left:S.left,top:S.top});return}const $=Z/U,k=V/D;if($>k){const R=V/$;x({width:V,height:R,left:S.left,top:S.top+(D-R)/2})}else{const R=D*$;x({width:R,height:D,left:S.left+(V-R)/2,top:S.top})}},[n]);p.useEffect(()=>{m();const w=u.current;if(!w)return;const O=new ResizeObserver(()=>m());return O.observe(w),()=>O.disconnect()},[m,t]),p.useEffect(()=>{if(h!=="opening"||!v)return;const w={id:0};return w.id=requestAnimationFrame(()=>{w.id=requestAnimationFrame(()=>g("open"))}),()=>cancelAnimationFrame(w.id)},[h,v]),p.useEffect(()=>{if(h!=="closing")return;const w=setTimeout(()=>a(),Pt);return()=>clearTimeout(w)},[h,a]),p.useEffect(()=>{b.current!==t&&L(!1),b.current=t},[t]);const H=()=>{h!=="closing"&&g("closing")},F=h==="open",_=h==="closing",C=_&&i&&!!r,W=h==="opening"?r??v:C?r:v;return l.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:H,children:[l.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:F?1:0,transition:`opacity ${Pt}ms ${Bt}`,pointerEvents:"none"}}),l.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[l.jsx("div",{style:{height:"10%"}}),l.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:l.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})}),l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:F?1:0,transition:`opacity ${Pt}ms ${Bt}`},children:e.length>1&&l.jsxs("p",{className:s,style:d,children:[t+1," / ",e.length]})})]}),W&&l.jsx("img",{ref:P,src:e[t],onLoad:m,style:{position:"fixed",top:W.top,left:W.left,width:W.width,height:W.height,objectFit:n==="Cover"?"cover":"contain",opacity:_&&!C?0:1,transition:_&&!C?`opacity ${Pt}ms ${Bt}`:C||T?`top ${Pt}ms ${Bt}, left ${Pt}ms ${Bt}, width ${Pt}ms ${Bt}, height ${Pt}ms ${Bt}`:"none",pointerEvents:"none",zIndex:9998}}),F&&v&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:w=>{w.stopPropagation(),o()}}),l.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:w=>{w.stopPropagation(),c()}})]})]})}function Uc({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,metadata:a,activeEvent:o,layoutId:c}){const{prefix:s}=E.useScopedStyles(),d=!!i,{type:u="A",gridLayout:P,textBoxWidth:v,verticalGap:x,entriesCount:h,lightbox:g,imageDisplay:T,slider:L,sliderTiming:b,direction:m,transition:H,titleMarginTop:F,subtitleMarginTop:_,titleColor:C,subtitleColor:W,lightboxCounterColor:w,titleFontFamily:O,titleFontSettings:S,titleFontSize:V,titleLineHeight:D,titleLetterSpacing:Z,titleWordSpacing:U,titleTextAppearance:$,subtitleFontFamily:k,subtitleFontSettings:R,subtitleFontSize:B,subtitleLineHeight:I,subtitleLetterSpacing:A,subtitleWordSpacing:Q,subtitleTextAppearance:oe,lightboxCounterFontFamily:ie,lightboxCounterFontSettings:z,lightboxCounterFontSize:M,lightboxCounterLineHeight:re,lightboxCounterLetterSpacing:Ce,lightboxCounterWordSpacing:ue,lightboxCounterTextAppearance:he}=e,Re={fontSettings:{fontFamily:O,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:V??.01,lineHeight:D,letterSpacing:Z??0,wordSpacing:U??0,textAppearance:$,color:C},y={...mt(Ge(Re,n))},f={fontSettings:{fontFamily:k,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:B??.01,lineHeight:I,letterSpacing:A??0,wordSpacing:Q??0,textAppearance:oe,color:W},q={...mt(Ge(f,n))},G={fontSettings:{fontFamily:ie,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:M??.01,lineHeight:re,letterSpacing:Ce??0,wordSpacing:ue??0,textAppearance:he,color:w},te={...mt(Ge(G,n))},X=E.buildColorVars(s,{titleColor:C,subtitleColor:W,lightboxCounterColor:w},Gc,Yc),ve=`${o&&o!=="default"?`${s}-state-${o}`:""}`.trim(),de=h===0?1/0:h,xe=(t??[]).slice(0,de),K=P.entryWidth??.2,Y=(T==null?void 0:T.display)==="Cover",j=(T==null?void 0:T.ratioValue)??"1:1",le=(T==null?void 0:T.reversed)??!1,[we,Se]=j.split(":").map(Number),Ne=le?Se:we,ye=le?we:Se,He=`${Ne} / ${ye}`,ke=Ne>=ye,We={objectFit:Y?"cover":"contain",...Y&&{aspectRatio:He,width:ke?"100%":"auto",height:ke?"auto":"100%"}},[Ve,Ye]=p.useState("ltr"),[dt,Tt]=p.useState(0),Je=p.useRef(null);p.useEffect(()=>{const Ee=Je.current;if(!Ee)return;const De=new ResizeObserver(fe=>{Tt(Math.round(fe[0].contentRect.width))});return De.observe(Ee),()=>De.disconnect()},[]);const qt=(()=>{const Ee={...X},De=Je.current?getComputedStyle(Je.current).getPropertyValue("--cntrl-article-width").trim():"";return De&&(Ee["--cntrl-article-width"]=De),Ee})(),[Qe,Lt]=p.useState(!1),[be,et]=p.useState([]),[Xe,ut]=p.useState(0),[Fn,pn]=p.useState(null),Nt=(Ee,De,fe)=>{if(n&&!r||g==="Off")return;const Ie=Ee.currentTarget.getBoundingClientRect();pn({top:Ie.top,left:Ie.left,width:Ie.width,height:Ie.height}),et(De),ut(fe),Lt(!0)};return p.useEffect(()=>{if(!Qe||g!=="On"||typeof document>"u")return;const Ee=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ee}},[Qe,g]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:Kc(s)}}),l.jsx("div",{style:X,children:l.jsx("div",{ref:Je,className:`${s}-wrapper ${s}-type-${u} ${ve}`.trim(),style:{gridTemplateColumns:`repeat(${P.columnsCount}, minmax(0, 1fr))`,rowGap:E.scalingValue(x??0,n),columnGap:E.scalingValue(P.horizontalGap??0,n),width:E.scalingValue(P.wrapperWidth??0,n)},children:xe.map((Ee,De)=>{var fe,Ie;return l.jsx("div",{className:`${s}-item`.trim(),children:l.jsx("div",{className:i?`${s}-item-inner`:`${s}-item-inner-hidden`,style:{width:(v??0)>100?`calc(${E.scalingValue(K??0,n)} * (${v} / 100))`:E.scalingValue(K??0,n)},children:l.jsxs("a",{href:(((fe=Ee.link)==null?void 0:fe.length)??0)>0&&g==="Off"?Ee.link:void 0,target:"_blank",className:`${s}-item-image-link`,children:[l.jsx("div",{className:`${s}-item-image-wrapper`,style:{width:E.scalingValue(K??0,n),height:E.scalingValue(K??0,n)},children:(((Ie=Ee.image)==null?void 0:Ie.length)??0)===0?null:L==="Off"?l.jsx("img",{src:Ee.image[0].url,alt:Ee.image[0].name,className:`${s}-item-image`.trim(),style:We,onClick:Me=>Nt(Me,Ee.image.map(Be=>Be.url),0)}):l.jsx(ao,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:b*1e3,width:"100%",height:"100%",speed:500,type:H==="Fade"?"fade":"loop",rewind:H==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:H==="Fade"?"ltr":m!=="Random"?m==="Horizontal"?"ltr":"ttb":Ve},onMoved:Me=>{if(m!=="Random"||H==="Fade")return;const Be=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Ye(Be),setTimeout(()=>{Me.refresh()},0)},children:Ee.image.map((Me,Be)=>l.jsx(so,{children:l.jsx("img",{src:Me.url,alt:Me.name,className:`${s}-item-image`.trim(),style:We,onClick:at=>Nt(at,Ee.image.map(vr=>vr.url),Be)})},Be))},`${H}-${K}-${m}-${b}-${dt}-${c}`)}),l.jsx("div",{"data-controls":"titleMarginTop",className:`${s}-control`,style:{height:E.scalingValue(F??0,n),width:E.scalingValue(K*v/100,n)}}),l.jsx("p",{className:`${s}-item-title`.trim(),style:{width:`calc(${E.scalingValue(K??0,n)} * (${v} / 100))`,...y},children:Ee.title}),u==="B"&&d&&l.jsx("div",{"data-controls":"subtitleMarginTop",className:`${s}-control`,style:{height:E.scalingValue(_??0,n),width:E.scalingValue(K*v/100,n)}}),u==="B"&&l.jsx("p",{className:`${s}-item-subtitle`.trim(),style:{width:`calc(${E.scalingValue(K??0,n)} * (${v} / 100))`,...q},children:Ee.subtitle})]})})},De)})})}),(!n||r)&&Qe&&typeof document<"u"&&g==="On"&&ei.createPortal(l.jsx("div",{style:qt,"data-selection":"none",children:l.jsx(qc,{images:be,index:Xe,imageDisplay:T.display,originRect:Fn,reverseClose:L==="Off",onClose:()=>Lt(!1),onPrev:()=>ut(Ee=>(Ee-1+be.length)%be.length),onNext:()=>ut(Ee=>(Ee+1)%be.length),counterClassName:`${s}-lightbox-counter`.trim(),counterStyle:te})}),document.body)]})}const Gc={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Yc=["hover","focus","filled","success","error"],Xc=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
3682
3727
  import '@splidejs/react-splide/css/core';\r
3683
3728
  import { CommonComponentProps } from '../props';\r
3684
3729
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
@@ -4389,7 +4434,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
4389
4434
  };\r
4390
4435
  \r
4391
4436
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
4392
- `,Lr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Xc=["titleColor","subtitleColor","lightboxCounterColor"],Zc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Arial",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Xc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Jc={element:qc,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Zc,sourceCode:Yc};function Xn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Qc(e){return String(e??"").trim().length>0}function ed(e,t,n,r,o,a,i){const c=E.scalingValue(a,i),s=E.scalingValue(0,i),d=e===0,u=e===t-1&&!o;return{borderTopWidth:d&&n?c:s,borderBottomWidth:!u||r?c:s}}function td(e,t,n){const r=E.scalingValue(t,n),o=E.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?r:o}}const Do=10;function nd(e){return`
4437
+ `,Lr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Zc=["titleColor","subtitleColor","lightboxCounterColor"],Jc={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",rules:[{if:{name:"type",value:"A"},then:{name:"subtitle",value:!1}}]},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},lightboxCounterColor:{type:"string",scope:"common",title:"Lightbox Counter Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Lr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Arial",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Zc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Qc={element:Uc,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Jc,sourceCode:Xc};function Xn(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function ed(e){return String(e??"").trim().length>0}function td(e,t,n,r,i,a,o){const c=E.scalingValue(a,o),s=E.scalingValue(0,o),d=e===0,u=e===t-1&&!i;return{borderTopWidth:d&&n?c:s,borderBottomWidth:!u||r?c:s}}function nd(e,t,n){const r=E.scalingValue(t,n),i=E.scalingValue(0,n);return{borderTopWidth:i,borderBottomWidth:e?r:i}}const jo=10;function rd(e){return`
4393
4438
  .${e}-wrapper {
4394
4439
  display: grid;
4395
4440
  align-items: start;
@@ -4592,6 +4637,12 @@ a.${e}-list-item {
4592
4637
  transform: translateY(-50%);
4593
4638
  }
4594
4639
 
4640
+ .${e}-wrapper.${e}-type-b .${e}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
4641
+ .${e}-wrapper.${e}-type-b .${e}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
4642
+ left: 50%;
4643
+ transform: translate(-50%, -50%);
4644
+ }
4645
+
4595
4646
  .${e}-row-padding-handle {
4596
4647
  width: 100%;
4597
4648
  flex-shrink: 0;
@@ -4754,7 +4805,7 @@ a.${e}-list-item {
4754
4805
  overflow-wrap: anywhere;
4755
4806
  word-break: break-word;
4756
4807
  }
4757
- `}const _t=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],lo=["AColumn","BColumn","CColumn","DColumn","EColumn"],vt="cutLabel",yr=[...lo,vt],co=["A","B","C","D","E"];function Hi(e){return`${e}ColumnVerticalAlign`}const Br=["Top","Center","Bottom"];function rd(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function od(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return co.includes(n)?n:null}function Ni(e,t,n){const r=od(e);return r?r===t?!1:rd(n[Hi(r)]):!0}function $n(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return co.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function id(e,t,n){if(Bi(e,t,n))return $n(e);const r=$n(e);return r.kind==="baseline"?{kind:"top"}:r}function ad(e){const t=$n(e);return t.kind==="baseline"?{kind:"top"}:t}function Bi(e,t,n){return Ni(e,n,t)?$n(e).kind==="baseline":!1}function sd(e){const t={};let n=!1;for(const r of co){const o=Hi(r),a=e[o];if(e.type==="B"){const i=String(a??"Top").trim();i!=="Top"&&i!=="Center"&&i!=="Bottom"&&(t[o]="Top",n=!0);continue}Ni(a,r,e)||(t[o]="Top",n=!0)}return n?t:null}function ld(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function cd(e){const t=$n(e).kind;return t==="baseline"?"center":t}function dd(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function jo(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function ud(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),a=o-r;return n.remove(),a}function Er(e,t,n,r){const o=e.titleEl;if(!o)return 0;const a=o.closest(`.${n}`);if(!a)return 0;const i=ud(o,r);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+i;const c=a.getBoundingClientRect(),s=o.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-s)/2:e.kind==="bottom"&&(d=c.height-s),c.top-t+d+i}function pd(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(o=>{const a=o.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),e.offsetHeight,r)}function md(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const gd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Te(e,t){return`${e}${t.replace(/^text/,"Text")}`}const hd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function fd(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),{type:"row",items:[Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing")]},Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function yd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(yr.map(e=>[hd[e],fd(e)]))}}function or(e,t){const n=r=>{const o=Te(t,r);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===vt?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function zo(e,t){var r,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return st(Ge(n,t))}function Ko(e,t,n,r){const o=or(e,t),a=o.textFontSize??.01,i=o.textLineHeight;return i!==void 0&&i<a?`${n} ${r}`:n}function qo(e,t,n,r){const o=or(e,t),a=o.textFontSize??.01,i=o.textLineHeight;return i===void 0||i>=a?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((a-i)/2,r)}}const et=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],an=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],sn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],ln=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],vd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},bd=["hover","focus","filled","success","error"],Uo=.004,Jt=.004,Pr=Jt,Go=12,uo=50,Tn=1440,Ln=uo/Tn;function Oi(e){const t=typeof e=="number"&&e>0?e:Tn;return uo/t}function xd(e,t){const n={position:"absolute",width:Go,height:Go,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function mt({P:e,className:t,areaStyle:n,hitPlacement:r,...o}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...o,children:l.jsx("div",{style:xd(e,r)})})}function Cd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Tn}const Vi={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Zn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function Sd(e,t=1){const n=t/e;return Object.fromEntries(et.map(r=>[r,n]))}function wd(){return Object.fromEntries([...an.map(e=>[e,0]),...sn.map(e=>[e,0])])}function $d(){return Object.fromEntries(ln.map(e=>[e,0]))}function zn(e){return Object.fromEntries(et.map(t=>[t,typeof e[t]=="number"?e[t]:Vi[t]]))}function Di(e,t,n){const r=e-Ln,o=t+n;if(o<=0||o<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/o;return{paddingLeft:t*a,paddingRight:n*a}}function Jn(e,t,n){const r=po(e,t,n);if(e<=0)return[];const o=r.slice(0,e-1).reduce((a,i)=>a+i,0);return[...r.slice(0,e-1),Math.max(0,t-o)]}function Td(e,t,n){const r={};for(let o=0;o<e;o+=1){const a=an[o],i=sn[o],c=typeof n[a]=="number"?n[a]:0,s=typeof n[i]=="number"?n[i]:0,d=Di(t[o]??0,c,s);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==s&&(r[i]=d.paddingRight)}return r}function po(e,t,n){if(e<=0)return[];const r=et.slice(0,e).map(d=>n[d]);if(e===1)return r;const o=r.slice(0,e-1),i=o.reduce((d,u)=>d+u,0)+Ln;if(t>=i)return r;const c=[...o];let s=i-t;for(let d=c.length-1;d>=0&&s>0;d-=1){const u=c[d]-Ln;if(u<=0)continue;const P=Math.min(s,u);c[d]-=P,s-=P}return[...c,r[e-1]]}function Ld(e,t,n){if(e<=1)return{};const r=po(e,t,n),o={};for(let a=0;a<e-1;a+=1){const i=et[a];r[a]!==n[i]&&(o[i]=r[a])}return o}function Yo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[..._t]}function Ed(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function Pd(e,t,n,r){const o=Math.min(r,e.length,et.length),a={};for(let i=0;i<o;i+=1){const c=e[i],s=t.indexOf(c);if(s===-1)continue;const d=et[s],u=an[s],P=sn[s],y=ln[s],x=et[i],h=an[i],b=sn[i],L=ln[i],v=n[d],S=n[u],f=n[P],B=n[y];typeof v=="number"&&(a[x]=v),typeof S=="number"&&(a[h]=S),typeof f=="number"&&(a[b]=f),typeof B=="number"&&(a[L]=B)}return a}function _d(e,t,n){const r=sd(e);r&&(e={...e,...r});const o=Oi(n==null?void 0:n.designWidth),a=e.columns,i=t.columns,c=Zn(e),s=Zn(t),d=e.type==="B"||e.type===void 0&&t.type==="B",u=typeof a=="number"?a:typeof i=="number"?i:_t.length,P=f=>{if(d)return f;const B=zn({...t,...f}),N=Zn(f),_=Jn(u,N,B),$=Td(u,_,{...t,...f});return Object.keys($).length===0?f:{...f,...$}};if(typeof a=="number"&&a!==i){const f={...e,...Sd(a,c),...wd()};if(d)for(const B of ln)typeof t[B]=="number"&&(f[B]=t[B]);else Object.assign(f,$d());return f}const y=Yo(e),x=Yo(t);if(!Ed(y,x))return P({...e,...Pd(y,x,t,u)});if(c<s&&typeof u=="number"&&!d){const f=zn({...t,...e});return P({...e,...Ld(u,c,f)})}if(d){const f=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,B=Math.max(0,(c-o)/2);return f>B?{...e,textPaddingLR:B}:e}const h=zn({...t,...e}),b=Jn(u,s,zn(t)),v=Jn(u,c,h).some((f,B)=>f<(b[B]??f)),S=et.some(f=>{const B=e[f],N=t[f];return typeof B=="number"&&typeof N=="number"&&B!==N});return v||S?P(e):e}function Ad(e,t,n,r){const o=t.slice(0,e).reduce((i,c)=>i+c,0),a=n.slice(e+1,t.length-1).reduce((i,c)=>i+c,0);return Math.max(Ln,r-o-a-Ln)}function Rd(e,t){return Math.random()*(t-e)+e}function Wd(e){return Object.fromEntries(et.map(t=>[t,typeof e[t]=="number"?e[t]:Vi[t]]))}function _r(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function Id(e,t,n,r,o,a){return e.slice(0,t).map((i,c)=>{const s=an[c],d=sn[c],u=ln[c];return{key:i,textPrefix:gd[i],widthKey:et[c],width:n[et[c]],paddingLeftKey:s,paddingRightKey:d,paddingBottomKey:u,paddingLeft:r[s],paddingRight:o[d],paddingBottom:a[u]}})}function kd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:o,activeEvent:a,layoutId:i,onUpdateSettings:c}){const{prefix:s}=E.useScopedStyles(),d=!!o,{columns:u,type:P,wrapperWidth:y,entriesCount:x,cellMinHeight:h,dividerWidth:b,showVisibility:L,cut:v,showCut:S,cutCellMinHeight:f,cutLabel:B,imageSize:N,imageOnHover:_,entryHoverEffect:$,rowPaddingTop:A,rowPaddingBottom:T,rowPaddingTopB:D,columnsOrder:C,textPaddingLR:O,textColor:V,backgroundColor:J,dividerColor:U,textHoverColor:w,backgroundHoverColor:M,dividerHoverColor:R}=e,[H,I]=p.useState(void 0),[k,te]=p.useState(null),oe=_==="On"&&(!n||r),ce=(v??0)>0,q=P==="B",F=p.useRef(null),ne=p.useRef(null),[xe,ge]=p.useState(null),[he,Le]=p.useState(Tn),He=Oi(he),m=Math.max(0,((y??0)-He)/2),g=Math.min(O??0,m),W=Math.max(g,Jt),K=((y??0)+He)/2;p.useLayoutEffect(()=>{if(!n){Le(Tn);return}const se=()=>{Le(Cd(F.current))};se();const de=F.current;if(!de)return;const pe=new ResizeObserver(se);pe.observe(de);let _e=de;for(;_e&&!_e.style.getPropertyValue("--cntrl-article-width");)_e=_e.parentElement;return _e&&pe.observe(_e),()=>pe.disconnect()},[n,i]),p.useEffect(()=>{I(void 0)},[v,S,t,x]);const Z=E.buildColorVars(s,{textColor:V,backgroundColor:J,dividerColor:U,textHoverColor:w,backgroundHoverColor:M,dividerHoverColor:R},vd,bd),ee=a&&a!=="default"?`${s}-state-${a}`:"",Y=`${$==="Default"?`${s}-entry-hover-default`:$==="Blinds"?`${s}-entry-hover-blinds`:""} ${ee}`.trim(),ie=(L==null?void 0:L[0])??!1,ve=(L==null?void 0:L[1])??!1,ue=p.useRef(e),be=p.useRef(i);p.useEffect(()=>{if(!c||!n){ue.current=e,be.current=i;return}if(be.current!==i){ue.current=e,be.current=i;return}const se=ue.current;if(!(se!==e))return;const pe=_d(e,se,{designWidth:he});ue.current=e,pe!==e&&c(pe)},[e,c,n,i,he]);const j=p.useMemo(()=>Wd(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),G=p.useMemo(()=>_r(e,an),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),z=p.useMemo(()=>_r(e,sn),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),le=p.useMemo(()=>_r(e,ln),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Se=p.useMemo(()=>Array.isArray(C)&&C.length>0?C:[..._t],[C]),Ce=p.useMemo(()=>Id(Se,u,j,G,z,le),[Se,u,j,G,z,le]),Fe=Zn(e),fe=p.useMemo(()=>et.slice(0,u).map(se=>j[se]),[u,j]),Be=p.useMemo(()=>po(u,Fe,j),[u,Fe,j]),We=p.useMemo(()=>Jn(u,Fe,j),[u,Fe,j]),Ee=p.useMemo(()=>Ce.map((se,de)=>Di(We[de]??0,se.paddingLeft,se.paddingRight)),[Ce,We]),Oe=p.useMemo(()=>{const se=x===0?1/0:x;return(t??[]).slice(0,se).map((pe,_e)=>({id:_e,cells:Object.fromEntries(_t.map(qe=>[qe,pe[qe]??""])),image:pe.image,link:pe.link}))},[t,x]),Ct=ce?H??v:Oe.length,Ye=p.useMemo(()=>ce?Oe.slice(0,Ct):Oe,[Oe,ce,Ct]),It=ce&&Ct<Oe.length,nt=Ye.length>1||It,St=[ie?`${s}-divider-top`:"",ve||nt?`${s}-divider-bottom`:""].filter(Boolean).join(" "),kt=()=>{const se=H??v;if(!S){I(Oe.length);return}I(Math.min(se+S,Oe.length))},ye=se=>E.scalingValue(se,n??!1),Ve=q?D??0:A??0,ut=T??0,Ft=h??0,Mt=(Ve+Ft+ut)/2,Kt=Math.max(ut,Pr),qt=xe!=null?`${xe/2}px`:ye(Mt),Ut=q?"rowPaddingTopB":"rowPaddingTop",re=Ce[0],Ie=Ce[Ce.length-1],Me=Ee[0],Re=Ee[Ee.length-1],De=re&&Me?Math.max(Me.paddingLeft,Jt):0,pt=Ie&&Re?Math.max(Re.paddingRight,Jt):0,vr=Fe,Fn=se=>{const de=F.current;if(!de)return{x:0,y:0};const pe=de.getBoundingClientRect();return{x:se.clientX-pe.left+Do,y:se.clientY-pe.top+Do}},zi=(se,de)=>{if(!oe)return;const pe=se.image;if(!(pe!=null&&pe.url)){te(null);return}const{x:_e,y:qe}=Fn(de),Ze=(N==null?void 0:N.min)??80,we=(N==null?void 0:N.max)??320,je=(k==null?void 0:k.rowId)===se.id?k.widthPx:Rd(Ze,we);te({rowId:se.id,url:pe.url,objectFit:pe.objectFit??"cover",widthPx:je,x:_e,y:qe})},Ki=se=>{if(!oe||!k)return;const{x:de,y:pe}=Fn(se);te(_e=>!_e||_e.x===de&&_e.y===pe?_e:{..._e,x:de,y:pe})},qi=()=>{te(null)},Ui=()=>{oe&&te(null)};p.useLayoutEffect(()=>{if(!d||q){ge(null);return}const se=ne.current;if(!se){ge(null);return}const de=()=>{ge(se.getBoundingClientRect().height)};de();const pe=new ResizeObserver(de);return pe.observe(se),()=>pe.disconnect()},[d,q,Ye,Ve,ut,Ft,t,e,Ce,We,he]);const mo=p.useMemo(()=>!q&&lo.some(se=>{const de=se.charAt(0),pe=e[`${se}VerticalAlign`];return Bi(pe,e,de)}),[q,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var Ze;const se=F.current;if(!se)return;const de=()=>{se.querySelectorAll("[data-list-col]").forEach(we=>{we.style.transform="";const je=we.querySelector(`.${s}-list-col`);je&&(je.style.minHeight="",je.style.height="");const at=we.querySelector(`.${s}-list-col-title`);at&&(at.style.transform="")})};if(q||!mo){de();return}const pe=()=>{se.querySelectorAll("[data-list-row]").forEach(we=>{const je=Array.from(we.querySelectorAll("[data-list-col]"));je.forEach(Pe=>{Pe.style.transform="";const Xe=Pe.querySelector(`.${s}-list-col`);Xe&&(Xe.style.minHeight="",Xe.style.height="");const ze=Pe.querySelector(`.${s}-list-col-title`);ze&&(ze.style.transform="")}),pd(we,je,`${s}-list-col`),we.offsetHeight;const at=we.getBoundingClientRect().top,wt=`${s}-baseline-probe`,Gt=new Map,Mn=je.map(Pe=>{const Xe=Pe.querySelector(`.${s}-list-col-title`),ze={el:Pe,titleEl:Xe,letter:Pe.getAttribute("data-col-letter")??"",kind:Pe.getAttribute("data-valign")??"top",anchor:Pe.getAttribute("data-valign-anchor")};return Gt.set(ze.letter,ze),ze}),mn=new Map,Hn=(Pe,Xe)=>{const ze=mn.get(Pe.letter);if(ze!==void 0)return ze;const Nn=Pe.anchor?Gt.get(Pe.anchor):void 0;if(Pe.kind!=="baseline"||!Nn||Xe.has(Pe.letter)){const ho=Er(Pe,at,`${s}-list-col`,wt);return mn.set(Pe.letter,ho),ho}Xe.add(Pe.letter);const Gi=Hn(Nn,Xe);Xe.delete(Pe.letter);const Yi=Er(Pe,at,`${s}-list-col`,wt),Xi=Gi-Yi;md(Pe.titleEl,Xi);const go=Er(Pe,at,`${s}-list-col`,wt);return mn.set(Pe.letter,go),go};Mn.forEach(Pe=>Hn(Pe,new Set))})};pe();const _e=new ResizeObserver(()=>pe());_e.observe(se);let qe=!1;return typeof document<"u"&&((Ze=document.fonts)!=null&&Ze.ready)&&document.fonts.ready.then(()=>{qe||pe()}),()=>{qe=!0,_e.disconnect(),de()}},[mo,q,e,t,he,Ye,We]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:nd(s)}}),l.jsx("div",{style:Z,children:l.jsxs("div",{ref:F,className:`${s}-wrapper ${Y}${St?` ${St}`:""}${q?` ${s}-type-b`:""}`.trim(),style:{width:E.scalingValue(y??0,n),...!q&&d?{[`--${s}-first-entry-handle-top`]:qt}:{}},onMouseMove:oe?Ki:void 0,onMouseLeave:oe?qi:void 0,children:[l.jsxs("div",{style:{width:"100%"},children:[Ye.map((se,de)=>{var Ze;const pe=(((Ze=se.link)==null?void 0:Ze.length)??0)>0,_e=pe?"a":"div",qe=ed(de,Ye.length,ie,ve,It,b??0,n??!1);return l.jsxs(_e,{ref:de===0?we=>{ne.current=we}:void 0,className:`${s}-list-item${pe?` ${s}-list-item-has-link`:""}`,...pe?{href:se.link,target:"_blank"}:{},style:qe,onMouseEnter:oe?we=>zi(se,we):void 0,children:[Ve>0&&l.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ye(Ve)}}),l.jsxs("div",{className:`${s}-list-cols-row${q?"":` ${s}-list-cols-row-h`}${d&&de===0&&q?` ${s}-list-cols-row-controls`:""}`,...q?{}:{"data-list-row":""},style:q?void 0:{minHeight:ye(Ft)},children:[Ce.map((we,je)=>{const at=je===Ce.length-1,wt=Ee[je],Gt=we.paddingBottom,Mn=Qc(se.cells[we.key]),mn=q&&Mn&&Gt>0,Hn=q?{minHeight:ye(Ft)}:{width:ye(We[je])},Pe=q?{paddingLeft:ye(g),paddingRight:ye(g)}:{paddingLeft:ye(wt.paddingLeft),paddingRight:ye(wt.paddingRight)},Xe=we.textPrefix.charAt(0),ze=q?ad(e[`${we.textPrefix}VerticalAlign`]):id(e[`${we.textPrefix}VerticalAlign`],e,Xe),Nn=q&&Mn&&d&&de===0;return l.jsxs("div",{className:q?`${s}-list-col-wrap`:void 0,...q?{}:{"data-list-col":"","data-col-letter":Xe,"data-valign":ze.kind,...ze.kind==="baseline"?{"data-valign-anchor":ze.anchorLetter}:{}},children:[l.jsx("div",{className:`${s}-list-col${at?` ${s}-list-col-last`:""}`,style:{...Pe,...Hn,...q?{justifyContent:jo(ze.kind)}:{}},"data-test":we.width,children:l.jsx("span",{className:Ko(e,we.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...zo(or(e,we.textPrefix),n),...qo(e,we.textPrefix,s,n),...q?{}:ld(ze.kind)},children:se.cells[we.key]??null})}),mn&&l.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ye(Gt)}}),Nn&&l.jsx(mt,{P:s,"data-controls":we.paddingBottomKey,"data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ye(Math.max(Gt,Pr))}})]},we.key)}),d&&de===0&&q&&l.jsxs(l.Fragment,{children:[l.jsx(mt,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(K),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ye(W),height:"100%"}}),l.jsx(mt,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ye(Math.max(W,Fe-W)),width:ye(W),height:"100%"}})]})]}),!q&&ut>0&&l.jsx("div",{className:`${s}-row-padding-handle`,style:{height:ye(ut)}}),d&&de===0&&!q&&l.jsx(mt,{P:s,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ye(Kt)}})]},se.id)}),It&&(()=>{const se=or(e,vt),de=cd(e.cutLabelVerticalAlign),pe=se.textTextAlign==="justify"||q;return l.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:ye(f??0),...td(ve,b??0,n??!1)},onClick:kt,onMouseEnter:oe?Ui:void 0,children:l.jsx("div",{className:`${s}-list-cols-row`,style:{...q?{paddingLeft:ye(g),paddingRight:ye(g)}:{},justifyContent:dd(se.textTextAlign),alignItems:jo(de)},children:l.jsx("span",{className:Ko(e,vt,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...zo(se,n),...qo(e,vt,s,n),...pe?{width:"100%"}:{}},children:B})})})})()]}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(mt,{P:s,"data-controls":Ut,"data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:ye(Math.max(Ve,Pr))}})},"row-padding-handles"),d&&!q&&re&&Ie&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(mt,{P:s,"data-controls":re.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(We[0]-((Me==null?void 0:Me.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ye(De),height:"100%"}}),l.jsx(mt,{P:s,"data-controls":Ie.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(We[Ce.length-1]-((Re==null?void 0:Re.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ye(vr-pt),width:ye(pt),height:"100%"}})]},"column-edge-padding-handles"),d&&!q&&Ce.slice(0,-1).map((se,de)=>{const pe=Ce[de+1],_e=Be.slice(0,de+1).reduce((at,wt)=>at+wt,0),qe=Ee[de],Ze=Ee[de+1],we=Math.max(qe.paddingRight,Jt),je=Math.max(Ze.paddingLeft,Jt);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(mt,{P:s,"data-controls":se.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(We[de]-qe.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ye(_e-we),width:ye(we),height:"100%"}}),l.jsx(mt,{P:s,"data-controls":pe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(We[de+1]-Ze.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ye(_e),width:ye(je),height:"100%"}})]},`${se.paddingRightKey}-padding`)}),d&&!q&&Ce.slice(0,-1).map((se,de)=>{const pe=Ad(de,Be,fe,Fe),qe=Be.slice(0,de+1).reduce((Ze,we)=>Ze+we,0)-Uo/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":se.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(uo),"data-controls-max-fraction":String(pe),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ye(qe),width:ye(Uo),height:"calc(100%)",pointerEvents:"auto"}})},`${se.widthKey}-junction`)}),oe&&k&&l.jsx("img",{className:`${s}-hover-image`,src:k.url,alt:"",style:{width:Xn(k.widthPx),objectFit:k.objectFit,left:k.x,top:k.y}})]})})]})}const Fd=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
4808
+ `}const It=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],lo=["AColumn","BColumn","CColumn","DColumn","EColumn"],St="cutLabel",yr=[...lo,St],co=["A","B","C","D","E"];function Hi(e){return`${e}ColumnVerticalAlign`}const Br=["Top","Center","Bottom"];function od(e){const t=String(e??"Top").trim();return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function id(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return co.includes(n)?n:null}function Bi(e,t,n){const r=id(e);return r?r===t?!1:od(n[Hi(r)]):!0}function $n(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return co.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function ad(e,t,n){if(Oi(e,t,n))return $n(e);const r=$n(e);return r.kind==="baseline"?{kind:"top"}:r}function sd(e){const t=$n(e);return t.kind==="baseline"?{kind:"top"}:t}function Oi(e,t,n){return Bi(e,n,t)?$n(e).kind==="baseline":!1}function ld(e){const t={};let n=!1;for(const r of co){const i=Hi(r),a=e[i];if(e.type==="B"){const o=String(a??"Top").trim();o!=="Top"&&o!=="Center"&&o!=="Bottom"&&(t[i]="Top",n=!0);continue}Bi(a,r,e)||(t[i]="Top",n=!0)}return n?t:null}function cd(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function dd(e){const t=$n(e).kind;return t==="baseline"?"center":t}function ud(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function zo(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function pd(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:r}=e.getBoundingClientRect(),{bottom:i}=n.getBoundingClientRect(),a=i-r;return n.remove(),a}function Er(e,t,n,r){const i=e.titleEl;if(!i)return 0;const a=i.closest(`.${n}`);if(!a)return 0;const o=pd(i,r);if(e.kind==="baseline")return i.getBoundingClientRect().top-t+o;const c=a.getBoundingClientRect(),s=i.getBoundingClientRect().height;let d=0;return e.kind==="center"?d=(c.height-s)/2:e.kind==="bottom"&&(d=c.height-s),c.top-t+d+o}function md(e,t,n){const r=e.getBoundingClientRect().height;return r<=0?0:(t.forEach(i=>{const a=i.querySelector(`.${n}`);a&&(a.style.minHeight=`${r}px`,a.style.height=`${r}px`)}),e.offsetHeight,r)}function gd(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const hd={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Le(e,t){return`${e}${t.replace(/^text/,"Text")}`}const fd={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function yd(e){return[Le(e,"textFontFamily"),Le(e,"textFontSettings"),{type:"row",items:[Le(e,"textFontSize"),Le(e,"textLineHeight"),Le(e,"textLetterSpacing"),Le(e,"textWordSpacing")]},Le(e,"textTextAlign"),Le(e,"textTextAppearance"),`${e}VerticalAlign`]}function vd(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(yr.map(e=>[fd[e],yd(e)]))}}function or(e,t){const n=r=>{const i=Le(t,r);return e[i]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===St?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function Ko(e,t){var r,i;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((r=e.textFontSettings)==null?void 0:r.fontWeight)??400,fontStyle:((i=e.textFontSettings)==null?void 0:i.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return mt(Ge(n,t))}function qo(e,t,n,r){const i=or(e,t),a=i.textFontSize??.01,o=i.textLineHeight;return o!==void 0&&o<a?`${n} ${r}`:n}function Uo(e,t,n,r){const i=or(e,t),a=i.textFontSize??.01,o=i.textLineHeight;return o===void 0||o>=a?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((a-o)/2,r)}}const ot=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],on=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],an=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],sn=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],bd={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},xd=["hover","focus","filled","success","error"],Go=.004,Zt=.004,Pr=Zt,Yo=12,uo=50,Tn=1440,Ln=uo/Tn;function Vi(e){const t=typeof e=="number"&&e>0?e:Tn;return uo/t}function Cd(e,t){const n={position:"absolute",width:Yo,height:Yo,pointerEvents:"auto"};return t==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:t==="center-x"?{...n,left:"50%",top:`var(--${e}-first-entry-handle-top, 50%)`,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function yt({P:e,className:t,areaStyle:n,hitPlacement:r,...i}){return l.jsx("div",{className:t,style:{...n,pointerEvents:"none"},...i,children:l.jsx("div",{style:Cd(e,r)})})}function Sd(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const i=parseFloat(n);if(Number.isFinite(i)&&i>0)return i}const r=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(r){const i=parseFloat(r);if(Number.isFinite(i)&&i>0)return i}t=t.parentElement}return Tn}const Di={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Zn(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function wd(e,t=1){const n=t/e;return Object.fromEntries(ot.map(r=>[r,n]))}function $d(){return Object.fromEntries([...on.map(e=>[e,0]),...an.map(e=>[e,0])])}function Td(){return Object.fromEntries(sn.map(e=>[e,0]))}function zn(e){return Object.fromEntries(ot.map(t=>[t,typeof e[t]=="number"?e[t]:Di[t]]))}function ji(e,t,n){const r=e-Ln,i=t+n;if(i<=0||i<=r)return{paddingLeft:t,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const a=r/i;return{paddingLeft:t*a,paddingRight:n*a}}function Jn(e,t,n){const r=po(e,t,n);if(e<=0)return[];const i=r.slice(0,e-1).reduce((a,o)=>a+o,0);return[...r.slice(0,e-1),Math.max(0,t-i)]}function Ld(e,t,n){const r={};for(let i=0;i<e;i+=1){const a=on[i],o=an[i],c=typeof n[a]=="number"?n[a]:0,s=typeof n[o]=="number"?n[o]:0,d=ji(t[i]??0,c,s);d.paddingLeft!==c&&(r[a]=d.paddingLeft),d.paddingRight!==s&&(r[o]=d.paddingRight)}return r}function po(e,t,n){if(e<=0)return[];const r=ot.slice(0,e).map(d=>n[d]);if(e===1)return r;const i=r.slice(0,e-1),o=i.reduce((d,u)=>d+u,0)+Ln;if(t>=o)return r;const c=[...i];let s=o-t;for(let d=c.length-1;d>=0&&s>0;d-=1){const u=c[d]-Ln;if(u<=0)continue;const P=Math.min(s,u);c[d]-=P,s-=P}return[...c,r[e-1]]}function Ed(e,t,n){if(e<=1)return{};const r=po(e,t,n),i={};for(let a=0;a<e-1;a+=1){const o=ot[a];r[a]!==n[o]&&(i[o]=r[a])}return i}function Xo(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...It]}function Pd(e,t){return e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function _d(e,t,n,r){const i=Math.min(r,e.length,ot.length),a={};for(let o=0;o<i;o+=1){const c=e[o],s=t.indexOf(c);if(s===-1)continue;const d=ot[s],u=on[s],P=an[s],v=sn[s],x=ot[o],h=on[o],g=an[o],T=sn[o],L=n[d],b=n[u],m=n[P],H=n[v];typeof L=="number"&&(a[x]=L),typeof b=="number"&&(a[h]=b),typeof m=="number"&&(a[g]=m),typeof H=="number"&&(a[T]=H)}return a}function Ad(e,t,n){const r=ld(e);r&&(e={...e,...r});const i=Vi(n==null?void 0:n.designWidth),a=e.columns,o=t.columns,c=Zn(e),s=Zn(t),d=e.type==="B"||e.type===void 0&&t.type==="B",u=typeof a=="number"?a:typeof o=="number"?o:It.length,P=m=>{if(d)return m;const H=zn({...t,...m}),F=Zn(m),_=Jn(u,F,H),C=Ld(u,_,{...t,...m});return Object.keys(C).length===0?m:{...m,...C}};if(typeof a=="number"&&a!==o){const m={...e,...wd(a,c),...$d()};if(d)for(const H of sn)typeof t[H]=="number"&&(m[H]=t[H]);else Object.assign(m,Td());return m}const v=Xo(e),x=Xo(t);if(!Pd(v,x))return P({...e,..._d(v,x,t,u)});if(c<s&&typeof u=="number"&&!d){const m=zn({...t,...e});return P({...e,...Ed(u,c,m)})}if(d){const m=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,H=Math.max(0,(c-i)/2);return m>H?{...e,textPaddingLR:H}:e}const h=zn({...t,...e}),g=Jn(u,s,zn(t)),L=Jn(u,c,h).some((m,H)=>m<(g[H]??m)),b=ot.some(m=>{const H=e[m],F=t[m];return typeof H=="number"&&typeof F=="number"&&H!==F});return L||b?P(e):e}function Rd(e,t,n,r){const i=t.slice(0,e).reduce((o,c)=>o+c,0),a=n.slice(e+1,t.length-1).reduce((o,c)=>o+c,0);return Math.max(Ln,r-i-a-Ln)}function Wd(e,t){return Math.random()*(t-e)+e}function Id(e){return Object.fromEntries(ot.map(t=>[t,typeof e[t]=="number"?e[t]:Di[t]]))}function _r(e,t,n=0){return Object.fromEntries(t.map(r=>[r,typeof e[r]=="number"?e[r]:n]))}function kd(e,t,n,r,i,a){return e.slice(0,t).map((o,c)=>{const s=on[c],d=an[c],u=sn[c];return{key:o,textPrefix:hd[o],widthKey:ot[c],width:n[ot[c]],paddingLeftKey:s,paddingRightKey:d,paddingBottomKey:u,paddingLeft:r[s],paddingRight:i[d],paddingBottom:a[u]}})}function Fd({settings:e,content:t,isEditor:n,isPreviewMode:r,isEditMode:i,activeEvent:a,layoutId:o,onUpdateSettings:c}){const{prefix:s}=E.useScopedStyles(),d=!!i,{columns:u,type:P,wrapperWidth:v,entriesCount:x,cellMinHeight:h,dividerWidth:g,showVisibility:T,cut:L,showCut:b,cutCellMinHeight:m,cutLabel:H,imageSize:F,imageOnHover:_,entryHoverEffect:C,rowPaddingTop:W,rowPaddingBottom:w,rowPaddingTopB:O,columnsOrder:S,textPaddingLR:V,textColor:D,backgroundColor:Z,dividerColor:U,textHoverColor:$,backgroundHoverColor:k,dividerHoverColor:R}=e,[B,I]=p.useState(void 0),[A,Q]=p.useState(null),oe=_==="On"&&(!n||r),ie=(L??0)>0,z=P==="B",M=p.useRef(null),re=p.useRef(null),[Ce,ue]=p.useState(null),[he,Re]=p.useState(Tn),ne=Vi(he),y=Math.max(0,((v??0)-ne)/2),f=Math.min(V??0,y),N=Math.max(f,Zt),q=((v??0)+ne)/2;p.useLayoutEffect(()=>{if(!n){Re(Tn);return}const se=()=>{Re(Sd(M.current))};se();const pe=M.current;if(!pe)return;const me=new ResizeObserver(se);me.observe(pe);let _e=pe;for(;_e&&!_e.style.getPropertyValue("--cntrl-article-width");)_e=_e.parentElement;return _e&&me.observe(_e),()=>me.disconnect()},[n,o]),p.useEffect(()=>{I(void 0)},[L,b,t,x]),p.useEffect(()=>{n&&!r&&I(void 0)},[n,r]);const G=E.buildColorVars(s,{textColor:D,backgroundColor:Z,dividerColor:U,textHoverColor:$,backgroundHoverColor:k,dividerHoverColor:R},bd,xd),ee=a&&a!=="default"?`${s}-state-${a}`:"",X=`${!n||r?C==="Default"?`${s}-entry-hover-default`:C==="Blinds"?`${s}-entry-hover-blinds`:"":""} ${ee}`.trim(),ce=(T==null?void 0:T[0])??!1,ve=(T==null?void 0:T[1])??!1,de=p.useRef(e),xe=p.useRef(o);p.useEffect(()=>{if(!c||!n){de.current=e,xe.current=o;return}if(xe.current!==o){de.current=e,xe.current=o;return}const se=de.current;if(!(se!==e))return;const me=Ad(e,se,{designWidth:he});de.current=e,me!==e&&c(me)},[e,c,n,o,he]);const K=p.useMemo(()=>Id(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),Y=p.useMemo(()=>_r(e,on),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),j=p.useMemo(()=>_r(e,an),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),le=p.useMemo(()=>_r(e,sn),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),we=p.useMemo(()=>Array.isArray(S)&&S.length>0?S:[...It],[S]),Se=p.useMemo(()=>kd(we,u,K,Y,j,le),[we,u,K,Y,j,le]),Ne=Zn(e),ye=p.useMemo(()=>ot.slice(0,u).map(se=>K[se]),[u,K]),He=p.useMemo(()=>po(u,Ne,K),[u,Ne,K]),ke=p.useMemo(()=>Jn(u,Ne,K),[u,Ne,K]),We=p.useMemo(()=>Se.map((se,pe)=>ji(ke[pe]??0,se.paddingLeft,se.paddingRight)),[Se,ke]),Ve=p.useMemo(()=>{const se=x===0?1/0:x;return(t??[]).slice(0,se).map((me,_e)=>({id:_e,cells:Object.fromEntries(It.map(qe=>[qe,me[qe]??""])),image:me.image,link:me.link}))},[t,x]),Ye=ie?B??L:Ve.length,dt=p.useMemo(()=>ie?Ve.slice(0,Ye):Ve,[Ve,ie,Ye]),Tt=ie&&Ye<Ve.length,Je=dt.length>1||Tt,qt=[ce?`${s}-divider-top`:"",ve||Je?`${s}-divider-bottom`:""].filter(Boolean).join(" "),Qe=!n||r,Lt=()=>{if(!Qe)return;const se=B??L;if(!b){I(Ve.length);return}I(Math.min(se+b,Ve.length))},be=se=>E.scalingValue(se,n??!1),et=z?O??0:W??0,Xe=w??0,ut=h??0,Fn=(et+ut+Xe)/2,pn=Math.max(Xe,Pr),Nt=Ce!=null?`${Ce/2}px`:be(Fn),Ee=z?"rowPaddingTopB":"rowPaddingTop",De=Se[0],fe=Se[Se.length-1],Ie=We[0],Me=We[We.length-1],Be=De&&Ie?Math.max(Ie.paddingLeft,Zt):0,at=fe&&Me?Math.max(Me.paddingRight,Zt):0,vr=Ne,mo=se=>{const pe=M.current;if(!pe)return{x:0,y:0};const me=pe.getBoundingClientRect();return{x:se.clientX-me.left+jo,y:se.clientY-me.top+jo}},Ki=(se,pe)=>{if(!oe)return;const me=se.image;if(!(me!=null&&me.url)){Q(null);return}const{x:_e,y:qe}=mo(pe),tt=(F==null?void 0:F.min)??80,$e=(F==null?void 0:F.max)??320,je=(A==null?void 0:A.rowId)===se.id?A.widthPx:Wd(tt,$e);Q({rowId:se.id,url:me.url,objectFit:me.objectFit??"cover",widthPx:je,x:_e,y:qe})},qi=se=>{if(!oe||!A)return;const{x:pe,y:me}=mo(se);Q(_e=>!_e||_e.x===pe&&_e.y===me?_e:{..._e,x:pe,y:me})},Ui=()=>{Q(null)},Gi=()=>{oe&&Q(null)};p.useLayoutEffect(()=>{if(!d||z){ue(null);return}const se=re.current;if(!se){ue(null);return}const pe=()=>{ue(se.getBoundingClientRect().height)};pe();const me=new ResizeObserver(pe);return me.observe(se),()=>me.disconnect()},[d,z,dt,et,Xe,ut,t,e,Se,ke,he]);const go=p.useMemo(()=>!z&&lo.some(se=>{const pe=se.charAt(0),me=e[`${se}VerticalAlign`];return Oi(me,e,pe)}),[z,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);return p.useLayoutEffect(()=>{var tt;const se=M.current;if(!se)return;const pe=()=>{se.querySelectorAll("[data-list-col]").forEach($e=>{$e.style.transform="";const je=$e.querySelector(`.${s}-list-col`);je&&(je.style.minHeight="",je.style.height="");const pt=$e.querySelector(`.${s}-list-col-title`);pt&&(pt.style.transform="")})};if(z||!go){pe();return}const me=()=>{se.querySelectorAll("[data-list-row]").forEach($e=>{const je=Array.from($e.querySelectorAll("[data-list-col]"));je.forEach(Pe=>{Pe.style.transform="";const Ze=Pe.querySelector(`.${s}-list-col`);Ze&&(Ze.style.minHeight="",Ze.style.height="");const ze=Pe.querySelector(`.${s}-list-col-title`);ze&&(ze.style.transform="")}),md($e,je,`${s}-list-col`),$e.offsetHeight;const pt=$e.getBoundingClientRect().top,Et=`${s}-baseline-probe`,Ut=new Map,Mn=je.map(Pe=>{const Ze=Pe.querySelector(`.${s}-list-col-title`),ze={el:Pe,titleEl:Ze,letter:Pe.getAttribute("data-col-letter")??"",kind:Pe.getAttribute("data-valign")??"top",anchor:Pe.getAttribute("data-valign-anchor")};return Ut.set(ze.letter,ze),ze}),mn=new Map,Nn=(Pe,Ze)=>{const ze=mn.get(Pe.letter);if(ze!==void 0)return ze;const Hn=Pe.anchor?Ut.get(Pe.anchor):void 0;if(Pe.kind!=="baseline"||!Hn||Ze.has(Pe.letter)){const fo=Er(Pe,pt,`${s}-list-col`,Et);return mn.set(Pe.letter,fo),fo}Ze.add(Pe.letter);const Yi=Nn(Hn,Ze);Ze.delete(Pe.letter);const Xi=Er(Pe,pt,`${s}-list-col`,Et),Zi=Yi-Xi;gd(Pe.titleEl,Zi);const ho=Er(Pe,pt,`${s}-list-col`,Et);return mn.set(Pe.letter,ho),ho};Mn.forEach(Pe=>Nn(Pe,new Set))})};me();const _e=new ResizeObserver(()=>me());_e.observe(se);let qe=!1;return typeof document<"u"&&((tt=document.fonts)!=null&&tt.ready)&&document.fonts.ready.then(()=>{qe||me()}),()=>{qe=!0,_e.disconnect(),pe()}},[go,z,e,t,he,dt,ke]),l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:rd(s)}}),l.jsx("div",{style:G,children:l.jsxs("div",{ref:M,className:`${s}-wrapper ${X}${qt?` ${qt}`:""}${z?` ${s}-type-b`:""}`.trim(),style:{width:E.scalingValue(v??0,n),...!z&&d?{[`--${s}-first-entry-handle-top`]:Nt}:{}},onMouseMove:oe?qi:void 0,onMouseLeave:oe?Ui:void 0,children:[l.jsxs("div",{style:{width:"100%",position:"relative"},children:[dt.map((se,pe)=>{var tt;const me=(((tt=se.link)==null?void 0:tt.length)??0)>0,_e=me?"a":"div",qe=td(pe,dt.length,ce,ve,Tt,g??0,n??!1);return l.jsxs(_e,{ref:pe===0?$e=>{re.current=$e}:void 0,className:`${s}-list-item${me?` ${s}-list-item-has-link`:""}`,...me?{href:se.link,target:"_blank"}:{},style:qe,onMouseEnter:oe?$e=>Ki(se,$e):void 0,children:[et>0&&l.jsx("div",{className:`${s}-row-padding-handle`,style:{height:be(et)}}),l.jsxs("div",{className:`${s}-list-cols-row${z?"":` ${s}-list-cols-row-h`}${d&&pe===0&&z?` ${s}-list-cols-row-controls`:""}`,...z?{}:{"data-list-row":""},style:z?void 0:{minHeight:be(ut)},children:[Se.map(($e,je)=>{const pt=je===Se.length-1,Et=We[je],Ut=$e.paddingBottom,Mn=ed(se.cells[$e.key]),mn=z&&Mn&&Ut>0,Nn=z?{minHeight:be(ut)}:{width:be(ke[je])},Pe=z?{paddingLeft:be(f),paddingRight:be(f)}:{paddingLeft:be(Et.paddingLeft),paddingRight:be(Et.paddingRight)},Ze=$e.textPrefix.charAt(0),ze=z?sd(e[`${$e.textPrefix}VerticalAlign`]):ad(e[`${$e.textPrefix}VerticalAlign`],e,Ze),Hn=z&&Mn&&d&&pe===0;return l.jsxs("div",{className:z?`${s}-list-col-wrap`:void 0,...z?{}:{"data-list-col":"","data-col-letter":Ze,"data-valign":ze.kind,...ze.kind==="baseline"?{"data-valign-anchor":ze.anchorLetter}:{}},children:[l.jsx("div",{className:`${s}-list-col${pt?` ${s}-list-col-last`:""}`,style:{...Pe,...Nn,...z?{justifyContent:zo(ze.kind)}:{}},"data-test":$e.width,children:l.jsx("span",{className:qo(e,$e.textPrefix,`${s}-list-col-title`,`${s}-text-tight-leading`),style:{...Ko(or(e,$e.textPrefix),n),...Uo(e,$e.textPrefix,s,n),...z?{}:cd(ze.kind)},children:se.cells[$e.key]??null})}),mn&&l.jsx("div",{className:`${s}-row-padding-handle`,style:{height:be(Ut)}}),Hn&&l.jsx(yt,{P:s,"data-controls":$e.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:be(Math.max(Ut,Pr))}})]},$e.key)}),d&&pe===0&&z&&l.jsxs(l.Fragment,{children:[l.jsx(yt,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(q),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:be(N),height:"100%"}}),l.jsx(yt,{P:s,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(q),className:`${s}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:be(Math.max(N,Ne-N)),width:be(N),height:"100%"}})]})]}),!z&&Xe>0&&l.jsx("div",{className:`${s}-row-padding-handle`,style:{height:be(Xe)}}),d&&pe===0&&!z&&l.jsx(yt,{P:s,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:be(pn)}})]},se.id)}),d&&l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx(yt,{P:s,"data-controls":Ee,"data-controls-static-handle":"",...z?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${s}-padding-control-handle`,hitPlacement:z?"center":"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:be(Math.max(et,Pr))}})},"row-padding-handles"),d&&!z&&De&&fe&&l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(yt,{P:s,"data-controls":De.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ke[0]-((Ie==null?void 0:Ie.paddingRight)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:be(Be),height:"100%"}}),l.jsx(yt,{P:s,"data-controls":fe.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ke[Se.length-1]-((Me==null?void 0:Me.paddingLeft)??0)),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:be(vr-at),width:be(at),height:"100%"}})]},"column-edge-padding-handles"),d&&!z&&Se.slice(0,-1).map((se,pe)=>{const me=Se[pe+1],_e=He.slice(0,pe+1).reduce((pt,Et)=>pt+Et,0),qe=We[pe],tt=We[pe+1],$e=Math.max(qe.paddingRight,Zt),je=Math.max(tt.paddingLeft,Zt);return l.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[l.jsx(yt,{P:s,"data-controls":se.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ke[pe]-qe.paddingLeft),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:be(_e-$e),width:be($e),height:"100%"}}),l.jsx(yt,{P:s,"data-controls":me.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ke[pe+1]-tt.paddingRight),className:`${s}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:be(_e),width:be(je),height:"100%"}})]},`${se.paddingRightKey}-padding`)}),d&&!z&&Se.slice(0,-1).map((se,pe)=>{const me=Rd(pe,He,ye,Ne),qe=He.slice(0,pe+1).reduce((tt,$e)=>tt+$e,0)-Go/2;return l.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:l.jsx("div",{"data-controls":se.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(uo),"data-controls-max-fraction":String(me),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:be(qe),width:be(Go),height:"calc(100%)",pointerEvents:"auto"}})},`${se.widthKey}-junction`)})]}),Tt&&(()=>{const se=or(e,St),pe=dd(e.cutLabelVerticalAlign),me=se.textTextAlign==="justify"||z;return l.jsx("button",{type:"button",className:`${s}-cut-item`,style:{minHeight:be(m??0),cursor:Qe?"pointer":"default",...nd(ve,g??0,n??!1)},onClick:Qe?Lt:void 0,onMouseEnter:oe?Gi:void 0,children:l.jsx("div",{className:`${s}-list-cols-row`,style:{...z?{paddingLeft:be(f),paddingRight:be(f)}:{},justifyContent:ud(se.textTextAlign),alignItems:zo(pe)},children:l.jsx("span",{className:qo(e,St,`${s}-cut-label`,`${s}-text-tight-leading`),style:{...Ko(se,n),...Uo(e,St,s,n),...me?{width:"100%"}:{}},children:H})})})})(),oe&&A&&l.jsx("img",{className:`${s}-hover-image`,src:A.url,alt:"",style:{width:Xn(A.widthPx),objectFit:A.objectFit,left:A.x,top:A.y}})]})})]})}const Md=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ComponentPropsWithoutRef } from 'react';
4758
4809
  import { CommonComponentProps } from '../props';
4759
4810
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
4760
4811
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -5169,6 +5220,12 @@ a.\${P}-list-item {
5169
5220
  transform: translateY(-50%);
5170
5221
  }
5171
5222
 
5223
+ .\${P}-wrapper.\${P}-type-b .\${P}-padding-control-handle[data-controls-variant="row-padding"][data-controls-axis="y"]::after,
5224
+ .\${P}-wrapper.\${P}-type-b .\${P}-padding-control-handle[data-controls-variant="column-padding"][data-controls-axis="y"]::after {
5225
+ left: 50%;
5226
+ transform: translate(-50%, -50%);
5227
+ }
5228
+
5172
5229
  .\${P}-row-padding-handle {
5173
5230
  width: 100%;
5174
5231
  flex-shrink: 0;
@@ -6544,6 +6601,12 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
6544
6601
  setVisibleRowCount(undefined);
6545
6602
  }, [cut, showCut, content, entriesCount]);
6546
6603
 
6604
+ useEffect(() => {
6605
+ if (isEditor && !isPreviewMode) {
6606
+ setVisibleRowCount(undefined);
6607
+ }
6608
+ }, [isEditor, isPreviewMode]);
6609
+
6547
6610
  const colorVars = buildColorVars(P, {
6548
6611
  textColor,
6549
6612
  backgroundColor,
@@ -6554,12 +6617,13 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
6554
6617
  }, COLOR_VAR_MAP, STATE_KEYS);
6555
6618
 
6556
6619
  const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
6557
- const entryHoverClass =
6558
- entryHoverEffect === 'Default'
6620
+ const entryHoverClass = (!isEditor || isPreviewMode)
6621
+ ? entryHoverEffect === 'Default'
6559
6622
  ? \`\${P}-entry-hover-default\`
6560
6623
  : entryHoverEffect === 'Blinds'
6561
6624
  ? \`\${P}-entry-hover-blinds\`
6562
- : '';
6625
+ : ''
6626
+ : '';
6563
6627
  const wrapperStateClasses = \`\${entryHoverClass} \${stateClass}\`.trim();
6564
6628
  const showDividerTop = showVisibility?.[0] ?? false;
6565
6629
  const showDividerBottom = showVisibility?.[1] ?? false;
@@ -6726,7 +6790,11 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
6726
6790
  showDividerBottom || hasBetweenItemDividers ? \`\${P}-divider-bottom\` : '',
6727
6791
  ].filter(Boolean).join(' ');
6728
6792
 
6793
+ const cutItemClickable = !isEditor || isPreviewMode;
6794
+
6729
6795
  const handleShowMore = () => {
6796
+ if (!cutItemClickable) return;
6797
+
6730
6798
  const currentVisible = visibleRowCount ?? cut;
6731
6799
  if (!showCut) {
6732
6800
  setVisibleRowCount(allRows.length);
@@ -7026,7 +7094,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7026
7094
  onMouseMove={showHoverImage ? handleWrapperMouseMove : undefined}
7027
7095
  onMouseLeave={showHoverImage ? handleWrapperMouseLeave : undefined}
7028
7096
  >
7029
- <div style={{ width: '100%' }}>
7097
+ <div style={{ width: '100%', position: 'relative' }}>
7030
7098
  {visibleRows.map((row, rowIdx) => {
7031
7099
  const hasLink = (row.link?.length ?? 0) > 0;
7032
7100
  const RowElement = hasLink ? 'a' : 'div';
@@ -7149,12 +7217,11 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7149
7217
  P={P}
7150
7218
  data-controls={col.paddingBottomKey}
7151
7219
  data-controls-static-handle=""
7152
- data-controls-handle-left="20"
7153
7220
  data-controls-axis="y"
7154
7221
  data-controls-variant="column-padding"
7155
7222
  data-controls-min="0"
7156
7223
  className={\`\${P}-padding-control-handle\`}
7157
- hitPlacement="left-y"
7224
+ hitPlacement="center"
7158
7225
  areaStyle={{
7159
7226
  position: 'absolute',
7160
7227
  bottom: 0,
@@ -7240,71 +7307,18 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7240
7307
  </RowElement>
7241
7308
  );
7242
7309
  })}
7243
- {showCutLabel && (() => {
7244
- const cutLabelFields = resolveListColumnTextFields(settings, CUT_LABEL_TEXT_PREFIX);
7245
- const cutLabelVerticalAlignKind = resolveCutLabelVerticalAlignKind(settings.cutLabelVerticalAlign);
7246
- const cutLabelUsesFullWidth = cutLabelFields.textTextAlign === 'justify' || isVerticalLayout;
7247
-
7248
- return (
7249
- <button
7250
- type="button"
7251
- className={\`\${P}-cut-item\`}
7252
- style={{
7253
- minHeight: scaled(cutCellMinHeight ?? 0),
7254
- ...getCutItemDividerWidths(
7255
- showDividerBottom,
7256
- dividerWidth ?? 0,
7257
- isEditor ?? false,
7258
- ),
7259
- }}
7260
- onClick={handleShowMore}
7261
- onMouseEnter={showHoverImage ? handleCutItemMouseEnter : undefined}
7262
- >
7263
- <div
7264
- className={\`\${P}-list-cols-row\`}
7265
- style={{
7266
- ...(isVerticalLayout
7267
- ? {
7268
- paddingLeft: scaled(effectiveTextPaddingLR),
7269
- paddingRight: scaled(effectiveTextPaddingLR),
7270
- }
7271
- : {}),
7272
- justifyContent: textAlignToJustifyContent(cutLabelFields.textTextAlign),
7273
- alignItems: cutVerticalAlignKindToFlexAlign(cutLabelVerticalAlignKind),
7274
- }}
7275
- >
7276
- <span
7277
- className={getListColumnTitleClassName(
7278
- settings,
7279
- CUT_LABEL_TEXT_PREFIX,
7280
- \`\${P}-cut-label\`,
7281
- \`\${P}-text-tight-leading\`,
7282
- )}
7283
- style={{
7284
- ...listColumnTextFieldsToCss(cutLabelFields, isEditor),
7285
- ...getListColumnTitleVars(settings, CUT_LABEL_TEXT_PREFIX, P, isEditor),
7286
- ...(cutLabelUsesFullWidth ? { width: '100%' } : {}),
7287
- }}
7288
- >
7289
- {cutLabel}
7290
- </span>
7291
- </div>
7292
- </button>
7293
- );
7294
- })()}
7295
- </div>
7296
7310
  {showControls && (
7297
7311
  <div key="row-padding-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
7298
7312
  <ListPaddingControl
7299
7313
  P={P}
7300
7314
  data-controls={rowPaddingTopControlKey}
7301
7315
  data-controls-static-handle=""
7302
- data-controls-handle-left="20"
7316
+ {...(!isVerticalLayout ? { 'data-controls-handle-left': '20' } : {})}
7303
7317
  data-controls-axis="y"
7304
7318
  data-controls-variant="row-padding"
7305
7319
  data-controls-min="0"
7306
7320
  className={\`\${P}-padding-control-handle\`}
7307
- hitPlacement="left-y"
7321
+ hitPlacement={isVerticalLayout ? 'center' : 'left-y'}
7308
7322
  areaStyle={{
7309
7323
  position: 'absolute',
7310
7324
  top: 0,
@@ -7453,6 +7467,60 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7453
7467
  </div>
7454
7468
  );
7455
7469
  })}
7470
+ </div>
7471
+ {showCutLabel && (() => {
7472
+ const cutLabelFields = resolveListColumnTextFields(settings, CUT_LABEL_TEXT_PREFIX);
7473
+ const cutLabelVerticalAlignKind = resolveCutLabelVerticalAlignKind(settings.cutLabelVerticalAlign);
7474
+ const cutLabelUsesFullWidth = cutLabelFields.textTextAlign === 'justify' || isVerticalLayout;
7475
+
7476
+ return (
7477
+ <button
7478
+ type="button"
7479
+ className={\`\${P}-cut-item\`}
7480
+ style={{
7481
+ minHeight: scaled(cutCellMinHeight ?? 0),
7482
+ cursor: cutItemClickable ? 'pointer' : 'default',
7483
+ ...getCutItemDividerWidths(
7484
+ showDividerBottom,
7485
+ dividerWidth ?? 0,
7486
+ isEditor ?? false,
7487
+ ),
7488
+ }}
7489
+ onClick={cutItemClickable ? handleShowMore : undefined}
7490
+ onMouseEnter={showHoverImage ? handleCutItemMouseEnter : undefined}
7491
+ >
7492
+ <div
7493
+ className={\`\${P}-list-cols-row\`}
7494
+ style={{
7495
+ ...(isVerticalLayout
7496
+ ? {
7497
+ paddingLeft: scaled(effectiveTextPaddingLR),
7498
+ paddingRight: scaled(effectiveTextPaddingLR),
7499
+ }
7500
+ : {}),
7501
+ justifyContent: textAlignToJustifyContent(cutLabelFields.textTextAlign),
7502
+ alignItems: cutVerticalAlignKindToFlexAlign(cutLabelVerticalAlignKind),
7503
+ }}
7504
+ >
7505
+ <span
7506
+ className={getListColumnTitleClassName(
7507
+ settings,
7508
+ CUT_LABEL_TEXT_PREFIX,
7509
+ \`\${P}-cut-label\`,
7510
+ \`\${P}-text-tight-leading\`,
7511
+ )}
7512
+ style={{
7513
+ ...listColumnTextFieldsToCss(cutLabelFields, isEditor),
7514
+ ...getListColumnTitleVars(settings, CUT_LABEL_TEXT_PREFIX, P, isEditor),
7515
+ ...(cutLabelUsesFullWidth ? { width: '100%' } : {}),
7516
+ }}
7517
+ >
7518
+ {cutLabel}
7519
+ </span>
7520
+ </div>
7521
+ </button>
7522
+ );
7523
+ })()}
7456
7524
  {showHoverImage && hoverImage && (
7457
7525
  <img
7458
7526
  className={\`\${P}-hover-image\`}
@@ -7471,4 +7539,4 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
7471
7539
  </>
7472
7540
  );
7473
7541
  }
7474
- `,pn=["A","B","C","D","E"],Xo=[...Br,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Bt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Md(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Kn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Hd(){return Object.fromEntries(pn.map((e,t)=>{const n=_t[t],r=`${e} column`;return[n,Md(r)]}))}function Nd(){const e={};for(const t of pn)e[`${t}ColumnWidth`]=Kn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Kn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Kn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Kn(`${t} column padding bottom`);return e}function Zo(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[..._t]};for(const n of pn)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function Bd(e){const t={};if(e===vt)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Br],useTabDesign:!0},enum:[...Br]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Xo],filterBaselineByTopAnchor:!0,columnLetter:n,useTabDesign:!0},enum:[...Xo]}}return t[Te(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Te(e,"textFontSettings")]={...Bt.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Te(e,"textFontSize")]={...Bt.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Te(e,"textLineHeight")]={...Bt.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Te(e,"textLetterSpacing")]={...Bt.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Te(e,"textWordSpacing")]={...Bt.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Te(e,"textTextAlign")]={...Bt.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Te(e,"textTextAppearance")]={...Bt.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Od=yr.reduce((e,t)=>({...e,...Bd(t)}),{}),Vd=yr.reduce((e,t)=>({...e,[`${t}VerticalAlign`]:t===vt?"Center":"Top",[Te(t,"textFontFamily")]:"Arial",[Te(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[Te(t,"textLetterSpacing")]:0,[Te(t,"textWordSpacing")]:0,[Te(t,"textTextAlign")]:t===vt?"center":"left",[Te(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Jo(e){const{textFontSize:t,textLineHeight:n,textTextAlign:r}=e;return yr.reduce((o,a)=>(t!==void 0&&(o[`${a}TextFontSize`]=t),n!==void 0&&(o[`${a}TextLineHeight`]=n),r!==void 0&&(o[Te(a,"textTextAlign")]=r),o),{})}const Dd=yd();function ji(e){return[Te(e,"textFontFamily"),Te(e,"textFontSettings"),Te(e,"textFontSize"),Te(e,"textLineHeight"),Te(e,"textLetterSpacing"),Te(e,"textWordSpacing"),Te(e,"textTextAlign"),Te(e,"textTextAppearance"),`${e}VerticalAlign`]}function jd(){const e=[];return lo.forEach((t,n)=>{const r=_t[n],o=ji(t);for(let a=1;a<_t.length;a+=1){const i=[{name:"columns",value:a},...Array.from({length:a},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];o.forEach(c=>{e.push({if:i,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const zd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],Kd=["cutLabel","cutCellMinHeight","showCut"],qd=ji(vt),Ud=[...Kd,...qd],Gd=[...pn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Ot=[{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDBHFMF0NKJMYCGGRA.jpeg",name:"List-1.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD194E6Z49QD9GG03N.jpeg",name:"List-2.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDNZRY59Q8JJVYY92K.jpeg",name:"List-3.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDRXD5QWHB5YF8H3XM.jpeg",name:"List-4.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3C6H5Q9QX0SX8PSP.jpeg",name:"List-5.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDM6VHTFVXVD58V0D6.jpeg",name:"List-6.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3QT4RPG3VMM2NK5K.jpeg",name:"List-7.png"}],Yd=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Ot[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Ot[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper Constellations",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Ot[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Ot[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Ot[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Ot[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Ot[6],link:""}],Xd=[...pn.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Zd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Hd(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Yd},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Nd(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Od,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",...Vd,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:Zo({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Jo({textFontSize:.043,textLineHeight:.043,textTextAlign:"center"})}),d:Zo({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Jo({textFontSize:.01,textLineHeight:.01})})},displayRules:[...jd(),...Ud.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Gd.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...pn.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Xd]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Dd]}],paletteBookmark:{items:[...zd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Jd={element:kd,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Zd,sourceCode:Fd},Qd=[al,ml,tc,dc,xc,Rc,Mc,Dc,Jc,Jd];exports.components=Qd;exports.isSchemaV1=Zi;
7542
+ `,un=["A","B","C","D","E"],Zo=[...Br,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ot={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Nd(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Kn(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Hd(){return Object.fromEntries(un.map((e,t)=>{const n=It[t],r=`${e} column`;return[n,Nd(r)]}))}function Bd(){const e={};for(const t of un)e[`${t}ColumnWidth`]=Kn(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Kn(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Kn(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Kn(`${t} column padding bottom`);return e}function Jo(e={}){const t={columns:5,wrapperWidth:1,columnsOrder:[...It]};for(const n of un)t[`${n}ColumnWidth`]=.2,t[`${n}ColumnPaddingLeft`]=0,t[`${n}ColumnPaddingRight`]=0,t[`${n}ColumnPaddingBottom`]=0;return{...t,...e}}function Od(e){const t={};if(e===St)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Br],useTabDesign:!0},enum:[...Br]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Zo],filterBaselineByTopAnchor:!0,columnLetter:n,useTabDesign:!0},enum:[...Zo]}}return t[Le(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Le(e,"textFontSettings")]={...Ot.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Le(e,"textFontSize")]={...Ot.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Le(e,"textLineHeight")]={...Ot.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Le(e,"textLetterSpacing")]={...Ot.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Le(e,"textWordSpacing")]={...Ot.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Le(e,"textTextAlign")]={...Ot.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Le(e,"textTextAppearance")]={...Ot.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Vd=yr.reduce((e,t)=>({...e,...Od(t)}),{}),Dd=yr.reduce((e,t)=>({...e,[`${t}VerticalAlign`]:t===St?"Center":"Top",[Le(t,"textFontFamily")]:"Arial",[Le(t,"textFontSettings")]:{fontWeight:400,fontStyle:"normal"},[Le(t,"textLetterSpacing")]:0,[Le(t,"textWordSpacing")]:0,[Le(t,"textTextAlign")]:t===St?"center":"left",[Le(t,"textTextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Qo(e){const{textFontSize:t,textLineHeight:n,textTextAlign:r}=e;return yr.reduce((i,a)=>(t!==void 0&&(i[`${a}TextFontSize`]=t),n!==void 0&&(i[`${a}TextLineHeight`]=n),r!==void 0&&(i[Le(a,"textTextAlign")]=r),i),{})}const jd=vd();function zi(e){return[Le(e,"textFontFamily"),Le(e,"textFontSettings"),Le(e,"textFontSize"),Le(e,"textLineHeight"),Le(e,"textLetterSpacing"),Le(e,"textWordSpacing"),Le(e,"textTextAlign"),Le(e,"textTextAppearance"),`${e}VerticalAlign`]}function zd(){const e=[];return lo.forEach((t,n)=>{const r=It[n],i=zi(t);for(let a=1;a<It.length;a+=1){const o=[{name:"columns",value:a},...Array.from({length:a},(c,s)=>({name:`columnsOrder.${s}`,value:r,isNotEqual:!0}))];i.forEach(c=>{e.push({if:o,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const Kd=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],qd=["cutLabel","cutCellMinHeight","showCut"],Ud=zi(St),Gd=[...qd,...Ud],Yd=[...un.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Vt=[{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDBHFMF0NKJMYCGGRA.jpeg",name:"List-1.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD194E6Z49QD9GG03N.jpeg",name:"List-2.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDNZRY59Q8JJVYY92K.jpeg",name:"List-3.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDRXD5QWHB5YF8H3XM.jpeg",name:"List-4.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3C6H5Q9QX0SX8PSP.jpeg",name:"List-5.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MDM6VHTFVXVD58V0D6.jpeg",name:"List-6.png"},{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KV88Q6MD3QT4RPG3VMM2NK5K.jpeg",name:"List-7.png"}],Xd=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Vt[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Vt[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper Constellations",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Vt[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Vt[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Vt[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Vt[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Vt[6],link:""}],Zd=[...un.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Jd={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Hd(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Xd},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["Top","Bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Cut",display:{type:"toggle-numeric-input",enum:["Off","On"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Entry Hover Effect",display:{type:"toggle-cycle",enum:["None","Default","Blinds"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["All","Custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Bd(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...Vd,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"Off",entryHoverEffect:"None",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#767676",textHoverColor:"#767676",...Dd,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:Jo({type:"B",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.043,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...Qo({textFontSize:.043,textLineHeight:.043,textTextAlign:"center"})}),d:Jo({type:"A",textPaddingLR:.01,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...Qo({textFontSize:.01,textLineHeight:.01})})},displayRules:[...zd(),...Gd.map(e=>({if:{name:"cut",value:0},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yd.map(e=>({if:{name:"type",value:"B"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...un.map(e=>({if:{name:"type",value:"A"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zd]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"",items:["entryHoverEffect"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]},{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[jd]}],paletteBookmark:{items:[...Kd],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Qd={element:Fd,id:"list",name:"Default List",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png "},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Jd,sourceCode:Md},eu=[sl,gl,nc,uc,Cc,Wc,Nc,jc,Qc,Qd];exports.components=eu;exports.isSchemaV1=Ji;