@cntrl-site/components 1.0.11-alpha.8 → 1.0.11-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),h=require("react"),bt=require("classnames"),S=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Lo=require("react-dom");function $i(t){return t.type==="object"&&t.version===1}const wi="ControlSlider-module__wrapper___sHEkd",Ti="ControlSlider-module__hoverArrow___A-dOH",Li="ControlSlider-module__sliderItem___QQSkR",Pi="ControlSlider-module__sliderImage___9hRl-",Wi="ControlSlider-module__arrow___05ghY",_i="ControlSlider-module__arrowVertical___tBfVN",Ei="ControlSlider-module__nextArrow___-30Yc",Ai="ControlSlider-module__arrowInner___aEra3",Ii="ControlSlider-module__arrowIcon___S4ztF",Ri="ControlSlider-module__arrowImg___2dwJW",ki="ControlSlider-module__mirror___brd6U",Fi="ControlSlider-module__pagination___bicLF",Mi="ControlSlider-module__paginationInner___bT-P-",Bi="ControlSlider-module__paginationVertical___zYqKw",Hi="ControlSlider-module__paginationItem___nTRbk",Oi="ControlSlider-module__dot___p1Qun",Ni="ControlSlider-module__activeDot___LHFaj",Di="ControlSlider-module__paginationInsideBottom___R3FWn",ji="ControlSlider-module__paginationInsideTop___V-qb-",zi="ControlSlider-module__paginationOutsideBottom___14w8D",Vi="ControlSlider-module__paginationOutsideTop___SCLqB",Ki="ControlSlider-module__paginationInsideLeft___yOBRZ",Ui="ControlSlider-module__paginationInsideRight___Rtt3o",Gi="ControlSlider-module__paginationOutsideLeft___lahaw",Yi="ControlSlider-module__paginationOutsideRight___EtuQa",qi="ControlSlider-module__imgWrapper___UjEgB",Xi="ControlSlider-module__captionBlock___dJ6-j",Zi="ControlSlider-module__captionTextWrapper___HFlpf",Ji="ControlSlider-module__captionText___uGBVc",Qi="ControlSlider-module__active___WZK4G",ta="ControlSlider-module__withPointerEvents___t-18M",ea="ControlSlider-module__topLeftAlignment___zjnGM",na="ControlSlider-module__topCenterAlignment___gD1xW",ra="ControlSlider-module__topRightAlignment___NMapS",oa="ControlSlider-module__middleLeftAlignment___OnUrY",ia="ControlSlider-module__middleCenterAlignment___Tdkl0",aa="ControlSlider-module__middleRightAlignment___wEbfX",la="ControlSlider-module__bottomLeftAlignment___cTP2-",sa="ControlSlider-module__bottomCenterAlignment___c54fB",ca="ControlSlider-module__bottomRightAlignment___kEwrz",da="ControlSlider-module__clickOverlay___DZA28",ua="ControlSlider-module__contain___pLyq7",pa="ControlSlider-module__cover___KdDat",et={wrapper:wi,hoverArrow:Ti,sliderItem:Li,sliderImage:Pi,arrow:Wi,arrowVertical:_i,nextArrow:Ei,arrowInner:Ai,arrowIcon:Ii,arrowImg:Ri,mirror:ki,pagination:Fi,paginationInner:Mi,paginationVertical:Bi,paginationItem:Hi,dot:Oi,activeDot:Ni,paginationInsideBottom:Di,paginationInsideTop:ji,paginationOutsideBottom:zi,paginationOutsideTop:Vi,paginationInsideLeft:Ki,paginationInsideRight:Ui,paginationOutsideLeft:Gi,paginationOutsideRight:Yi,imgWrapper:qi,captionBlock:Xi,captionTextWrapper:Zi,captionText:Ji,active:Qi,withPointerEvents:ta,topLeftAlignment:ea,topCenterAlignment:na,topRightAlignment:ra,middleLeftAlignment:oa,middleCenterAlignment:ia,middleRightAlignment:aa,bottomLeftAlignment:la,bottomCenterAlignment:sa,bottomRightAlignment:ca,clickOverlay:da,contain:ua,cover:pa};function ma(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ga(t,e,n){return e&&ma(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Jr="(prefers-reduced-motion: reduce)",He=1,ha=2,De=3,Ve=4,mn=5,In=6,On=7,fa={CREATED:He,MOUNTED:ha,IDLE:De,MOVING:Ve,SCROLLING:mn,DRAGGING:In,DESTROYED:On};function pe(t){t.length=0}function xe(t,e,n){return Array.prototype.slice.call(t,e,n)}function $t(t){return t.bind.apply(t,[null].concat(xe(arguments,1)))}var Po=setTimeout,hr=function(){};function Qr(t){return requestAnimationFrame(t)}function Kn(t,e){return typeof e===t}function tn(t){return!Tr(t)&&Kn("object",t)}var wr=Array.isArray,Wo=$t(Kn,"function"),ve=$t(Kn,"string"),gn=$t(Kn,"undefined");function Tr(t){return t===null}function _o(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function hn(t){return wr(t)?t:[t]}function Ut(t,e){hn(t).forEach(e)}function Lr(t,e){return t.indexOf(e)>-1}function Rn(t,e){return t.push.apply(t,hn(e)),t}function se(t,e,n){t&&Ut(e,function(r){r&&t.classList[n?"add":"remove"](r)})}function re(t,e){se(t,ve(e)?e.split(" "):e,!0)}function fn(t,e){Ut(e,t.appendChild.bind(t))}function Pr(t,e){Ut(t,function(n){var r=(e||n).parentNode;r&&r.insertBefore(n,e)})}function en(t,e){return _o(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Eo(t,e){var n=t?xe(t.children):[];return e?n.filter(function(r){return en(r,e)}):n}function yn(t,e){return e?Eo(t,e)[0]:t.firstElementChild}var nn=Object.keys;function We(t,e,n){return t&&(n?nn(t).reverse():nn(t)).forEach(function(r){r!=="__proto__"&&e(t[r],r)}),t}function rn(t){return xe(arguments,1).forEach(function(e){We(e,function(n,r){t[r]=e[r]})}),t}function fe(t){return xe(arguments,1).forEach(function(e){We(e,function(n,r){wr(n)?t[r]=n.slice():tn(n)?t[r]=fe({},tn(t[r])?t[r]:{},n):t[r]=n})}),t}function to(t,e){Ut(e||nn(t),function(n){delete t[n]})}function oe(t,e){Ut(t,function(n){Ut(e,function(r){n&&n.removeAttribute(r)})})}function pt(t,e,n){tn(e)?We(e,function(r,o){pt(t,o,r)}):Ut(t,function(r){Tr(n)||n===""?oe(r,e):r.setAttribute(e,String(n))})}function Oe(t,e,n){var r=document.createElement(t);return e&&(ve(e)?re(r,e):pt(r,e)),n&&fn(n,r),r}function qt(t,e,n){if(gn(n))return getComputedStyle(t)[e];Tr(n)||(t.style[e]=""+n)}function on(t,e){qt(t,"display",e)}function Ao(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function Xt(t,e){return t.getAttribute(e)}function eo(t,e){return t&&t.classList.contains(e)}function Vt(t){return t.getBoundingClientRect()}function _e(t){Ut(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Io(t){return yn(new DOMParser().parseFromString(t,"text/html").body)}function le(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Ro(t,e){return t&&t.querySelector(e)}function Wr(t,e){return e?xe(t.querySelectorAll(e)):[]}function ce(t,e){se(t,e,!1)}function fr(t){return t.timeStamp}function Le(t){return ve(t)?t:t?t+"px":""}var vn="splide",_r="data-"+vn;function Je(t,e){if(!t)throw new Error("["+vn+"] "+(e||""))}var be=Math.min,Nn=Math.max,Dn=Math.floor,an=Math.ceil,Mt=Math.abs;function ko(t,e,n){return Mt(t-e)<n}function kn(t,e,n,r){var o=be(e,n),l=Nn(e,n);return r?o<t&&t<l:o<=t&&t<=l}function Fe(t,e,n){var r=be(e,n),o=Nn(e,n);return be(Nn(r,t),o)}function yr(t){return+(t>0)-+(t<0)}function vr(t,e){return Ut(e,function(n){t=t.replace("%s",""+n)}),t}function Er(t){return t<10?"0"+t:""+t}var no={};function ya(t){return""+t+Er(no[t]=(no[t]||0)+1)}function Fo(){var t=[];function e(i,c,s,u){o(i,c,function(d,T,x){var y="addEventListener"in d,p=y?d.removeEventListener.bind(d,T,s,u):d.removeListener.bind(d,s);y?d.addEventListener(T,s,u):d.addListener(s),t.push([d,T,x,s,p])})}function n(i,c,s){o(i,c,function(u,d,T){t=t.filter(function(x){return x[0]===u&&x[1]===d&&x[2]===T&&(!s||x[3]===s)?(x[4](),!1):!0})})}function r(i,c,s){var u,d=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:d,detail:s}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,d,!1,s)),i.dispatchEvent(u),u}function o(i,c,s){Ut(i,function(u){u&&Ut(c,function(d){d.split(" ").forEach(function(T){var x=T.split(".");s(u,x[0],x[1])})})})}function l(){t.forEach(function(i){i[4]()}),pe(t)}return{bind:e,unbind:n,dispatch:r,destroy:l}}var Ce="mounted",br="ready",me="move",Ke="moved",Ar="click",Mo="active",Bo="inactive",Ho="visible",Oo="hidden",_t="refresh",kt="updated",je="resize",Un="resized",No="drag",Do="dragging",jo="dragged",Gn="scroll",Ae="scrolled",va="overflow",Ir="destroy",zo="arrows:mounted",Vo="arrows:updated",Ko="pagination:mounted",Uo="pagination:updated",Rr="navigation:mounted",kr="autoplay:play",Go="autoplay:playing",Fr="autoplay:pause",Mr="lazyload:loaded",Yo="sk",qo="sh",jn="ei";function Lt(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Fo();function r(l,i){n.bind(e,hn(l).join(" "),function(c){i.apply(i,wr(c.detail)?c.detail:[])})}function o(l){n.dispatch(e,l,xe(arguments,1))}return t&&t.event.on(Ir,n.destroy),rn(n,{bus:e,on:r,off:$t(n.unbind,e),emit:o})}function Yn(t,e,n,r){var o=Date.now,l,i=0,c,s=!0,u=0;function d(){if(!s){if(i=t?be((o()-l)/t,1):1,n&&n(i),i>=1&&(e(),l=o(),r&&++u>=r))return x();c=Qr(d)}}function T(g){g||p(),l=o()-(g?i*t:0),s=!1,c=Qr(d)}function x(){s=!0}function y(){l=o(),i=0,n&&n(i)}function p(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function f(g){t=g}function m(){return s}return{start:T,rewind:y,pause:x,cancel:p,set:f,isPaused:m}}function ba(t){var e=t;function n(o){e=o}function r(o){return Lr(hn(o),e)}return{set:n,is:r}}function xa(t,e){var n=Yn(0,t,null,1);return function(){n.isPaused()&&n.start()}}function Ca(t,e,n){var r=t.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=Fo(),c=[];function s(){var p=n.mediaQuery==="min";nn(o).sort(function(f,m){return p?+f-+m:+m-+f}).forEach(function(f){d(o[f],"("+(p?"min":"max")+"-width:"+f+"px)")}),d(l,Jr),T()}function u(p){p&&i.destroy()}function d(p,f){var m=matchMedia(f);i.bind(m,"change",T),c.push([p,m])}function T(){var p=r.is(On),f=n.direction,m=c.reduce(function(g,v){return fe(g,v[1].matches?v[0]:{})},{});to(n),y(m),n.destroy?t.destroy(n.destroy==="completely"):p?(u(!0),t.mount()):f!==n.direction&&t.refresh()}function x(p){matchMedia(Jr).matches&&(p?fe(n,l):to(n,nn(l)))}function y(p,f,m){fe(n,p),f&&fe(Object.getPrototypeOf(n),p),(m||!r.is(He))&&t.emit(kt,n)}return{setup:s,destroy:u,reduce:x,set:y}}var qn="Arrow",Xn=qn+"Left",Zn=qn+"Right",Xo=qn+"Up",Zo=qn+"Down",ro="rtl",Jn="ttb",cr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Xo,Zn],ArrowRight:[Zo,Xn]};function Sa(t,e,n){function r(l,i,c){c=c||n.direction;var s=c===ro&&!i?1:c===Jn?0:-1;return cr[l]&&cr[l][s]||l.replace(/width|left|right/i,function(u,d){var T=cr[u.toLowerCase()][s]||u;return d>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function o(l){return l*(n.direction===ro?1:-1)}return{resolve:r,orient:o}}var de="role",Ne="tabindex",$a="disabled",Jt="aria-",bn=Jt+"controls",Jo=Jt+"current",oo=Jt+"selected",Kt=Jt+"label",Br=Jt+"labelledby",Qo=Jt+"hidden",Hr=Jt+"orientation",ln=Jt+"roledescription",io=Jt+"live",ao=Jt+"busy",lo=Jt+"atomic",Or=[de,Ne,$a,bn,Jo,Kt,Br,Qo,Hr,ln],ie=vn+"__",Se="is-",dr=vn,so=ie+"track",wa=ie+"list",Qn=ie+"slide",ti=Qn+"--clone",Ta=Qn+"__container",Nr=ie+"arrows",tr=ie+"arrow",ei=tr+"--prev",ni=tr+"--next",er=ie+"pagination",ri=er+"__page",La=ie+"progress",Pa=La+"__bar",Wa=ie+"toggle",_a=ie+"spinner",Ea=ie+"sr",Aa=Se+"initialized",Ee=Se+"active",oi=Se+"prev",ii=Se+"next",xr=Se+"visible",Cr=Se+"loading",ai=Se+"focus-in",li=Se+"overflow",Ia=[Ee,xr,oi,ii,Cr,ai,li],Ra={slide:Qn,clone:ti,arrows:Nr,arrow:tr,prev:ei,next:ni,pagination:er,page:ri,spinner:_a};function ka(t,e){if(Wo(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!en(n,e);)n=n.parentElement;return n}var Fa=5,co=200,si="touchstart mousedown",ur="touchmove mousemove",pr="touchend touchcancel mouseup click";function Ma(t,e,n){var r=Lt(t),o=r.on,l=r.bind,i=t.root,c=n.i18n,s={},u=[],d=[],T=[],x,y,p;function f(){L(),D(),v()}function m(){o(_t,g),o(_t,f),o(kt,v),l(document,si+" keydown",function(b){p=b.type==="keydown"},{capture:!0}),l(i,"focusin",function(){se(i,ai,!!p)})}function g(b){var $=Or.concat("style");pe(u),ce(i,d),ce(x,T),oe([x,y],$),oe(i,b?$:["style",ln])}function v(){ce(i,d),ce(x,T),d=P(dr),T=P(so),re(i,d),re(x,T),pt(i,Kt,n.label),pt(i,Br,n.labelledby)}function L(){x=A("."+so),y=yn(x,"."+wa),Je(x&&y,"A track/list element is missing."),Rn(u,Eo(y,"."+Qn+":not(."+ti+")")),We({arrows:Nr,pagination:er,prev:ei,next:ni,bar:Pa,toggle:Wa},function(b,$){s[$]=A("."+b)}),rn(s,{root:i,track:x,list:y,slides:u})}function D(){var b=i.id||ya(vn),$=n.role;i.id=b,x.id=x.id||b+"-track",y.id=y.id||b+"-list",!Xt(i,de)&&i.tagName!=="SECTION"&&$&&pt(i,de,$),pt(i,ln,c.carousel),pt(y,de,"presentation")}function A(b){var $=Ro(i,b);return $&&ka($,"."+dr)===i?$:void 0}function P(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===dr&&Ee]}return rn(s,{setup:f,mount:m,destroy:g})}var ze="slide",Ue="loop",xn="fade";function Ba(t,e,n,r){var o=Lt(t),l=o.on,i=o.emit,c=o.bind,s=t.Components,u=t.root,d=t.options,T=d.isNavigation,x=d.updateOnMove,y=d.i18n,p=d.pagination,f=d.slideFocus,m=s.Direction.resolve,g=Xt(r,"style"),v=Xt(r,Kt),L=n>-1,D=yn(r,"."+Ta),A;function P(){L||(r.id=u.id+"-slide"+Er(e+1),pt(r,de,p?"tabpanel":"group"),pt(r,ln,y.slide),pt(r,Kt,v||vr(y.slideLabel,[e+1,t.length]))),b()}function b(){c(r,"click",$t(i,Ar,R)),c(r,"keydown",$t(i,Yo,R)),l([Ke,qo,Ae],W),l(Rr,E),x&&l(me,N)}function $(){A=!0,o.destroy(),ce(r,Ia),oe(r,Or),pt(r,"style",g),pt(r,Kt,v||"")}function E(){var I=t.splides.map(function(_){var M=_.splide.Components.Slides.getAt(e);return M?M.slide.id:""}).join(" ");pt(r,Kt,vr(y.slideX,(L?n:e)+1)),pt(r,bn,I),pt(r,de,f?"button":""),f&&oe(r,ln)}function N(){A||W()}function W(){if(!A){var I=t.index;B(),H(),se(r,oi,e===I-1),se(r,ii,e===I+1)}}function B(){var I=z();I!==eo(r,Ee)&&(se(r,Ee,I),pt(r,Jo,T&&I||""),i(I?Mo:Bo,R))}function H(){var I=C(),_=!I&&(!z()||L);if(t.state.is([Ve,mn])||pt(r,Qo,_||""),pt(Wr(r,d.focusableNodes||""),Ne,_?-1:""),f&&pt(r,Ne,_?-1:0),I!==eo(r,xr)&&(se(r,xr,I),i(I?Ho:Oo,R)),!I&&document.activeElement===r){var M=s.Slides.getAt(t.index);M&&Ao(M.slide)}}function j(I,_,M){qt(M&&D||r,I,_)}function z(){var I=t.index;return I===e||d.cloneStatus&&I===n}function C(){if(t.is(xn))return z();var I=Vt(s.Elements.track),_=Vt(r),M=m("left",!0),Z=m("right",!0);return Dn(I[M])<=an(_[M])&&Dn(_[Z])<=an(I[Z])}function k(I,_){var M=Mt(I-e);return!L&&(d.rewind||t.is(Ue))&&(M=be(M,t.length-M)),M<=_}var R={index:e,slideIndex:n,slide:r,container:D,isClone:L,mount:P,destroy:$,update:W,style:j,isWithin:k};return R}function Ha(t,e,n){var r=Lt(t),o=r.on,l=r.emit,i=r.bind,c=e.Elements,s=c.slides,u=c.list,d=[];function T(){x(),o(_t,y),o(_t,x)}function x(){s.forEach(function(W,B){f(W,B,-1)})}function y(){A(function(W){W.destroy()}),pe(d)}function p(){A(function(W){W.update()})}function f(W,B,H){var j=Ba(t,B,H,W);j.mount(),d.push(j),d.sort(function(z,C){return z.index-C.index})}function m(W){return W?P(function(B){return!B.isClone}):d}function g(W){var B=e.Controller,H=B.toIndex(W),j=B.hasFocus()?1:n.perPage;return P(function(z){return kn(z.index,H,H+j-1)})}function v(W){return P(W)[0]}function L(W,B){Ut(W,function(H){if(ve(H)&&(H=Io(H)),_o(H)){var j=s[B];j?Pr(H,j):fn(u,H),re(H,n.classes.slide),$(H,$t(l,je))}}),l(_t)}function D(W){_e(P(W).map(function(B){return B.slide})),l(_t)}function A(W,B){m(B).forEach(W)}function P(W){return d.filter(Wo(W)?W:function(B){return ve(W)?en(B.slide,W):Lr(hn(W),B.index)})}function b(W,B,H){A(function(j){j.style(W,B,H)})}function $(W,B){var H=Wr(W,"img"),j=H.length;j?H.forEach(function(z){i(z,"load error",function(){--j||B()})}):B()}function E(W){return W?s.length:d.length}function N(){return d.length>n.perPage}return{mount:T,destroy:y,update:p,register:f,get:m,getIn:g,getAt:v,add:L,remove:D,forEach:A,filter:P,style:b,getLength:E,isEnough:N}}function Oa(t,e,n){var r=Lt(t),o=r.on,l=r.bind,i=r.emit,c=e.Slides,s=e.Direction.resolve,u=e.Elements,d=u.root,T=u.track,x=u.list,y=c.getAt,p=c.style,f,m,g;function v(){L(),l(window,"resize load",xa($t(i,je))),o([kt,_t],L),o(je,D)}function L(){f=n.direction===Jn,qt(d,"maxWidth",Le(n.width)),qt(T,s("paddingLeft"),A(!1)),qt(T,s("paddingRight"),A(!0)),D(!0)}function D(R){var I=Vt(d);(R||m.width!==I.width||m.height!==I.height)&&(qt(T,"height",P()),p(s("marginRight"),Le(n.gap)),p("width",$()),p("height",E(),!0),m=I,i(Un),g!==(g=k())&&(se(d,li,g),i(va,g)))}function A(R){var I=n.padding,_=s(R?"right":"left");return I&&Le(I[_]||(tn(I)?0:I))||"0px"}function P(){var R="";return f&&(R=b(),Je(R,"height or heightRatio is missing."),R="calc("+R+" - "+A(!1)+" - "+A(!0)+")"),R}function b(){return Le(n.height||Vt(x).width*n.heightRatio)}function $(){return n.autoWidth?null:Le(n.fixedWidth)||(f?"":N())}function E(){return Le(n.fixedHeight)||(f?n.autoHeight?null:N():b())}function N(){var R=Le(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function W(){return Vt(x)[s("width")]}function B(R,I){var _=y(R||0);return _?Vt(_.slide)[s("width")]+(I?0:z()):0}function H(R,I){var _=y(R);if(_){var M=Vt(_.slide)[s("right")],Z=Vt(x)[s("left")];return Mt(M-Z)+(I?0:z())}return 0}function j(R){return H(t.length-1)-H(0)+B(0,R)}function z(){var R=y(0);return R&&parseFloat(qt(R.slide,s("marginRight")))||0}function C(R){return parseFloat(qt(T,s("padding"+(R?"Right":"Left"))))||0}function k(){return t.is(xn)||j(!0)>W()}return{mount:v,resize:D,listSize:W,slideSize:B,sliderSize:j,totalSize:H,getPadding:C,isOverflow:k}}var Na=2;function Da(t,e,n){var r=Lt(t),o=r.on,l=e.Elements,i=e.Slides,c=e.Direction.resolve,s=[],u;function d(){o(_t,T),o([kt,je],y),(u=m())&&(p(u),e.Layout.resize(!0))}function T(){x(),d()}function x(){_e(s),pe(s),r.destroy()}function y(){var g=m();u!==g&&(u<g||!g)&&r.emit(_t)}function p(g){var v=i.get().slice(),L=v.length;if(L){for(;v.length<g;)Rn(v,v);Rn(v.slice(-g),v.slice(0,g)).forEach(function(D,A){var P=A<g,b=f(D.slide,A);P?Pr(b,v[0].slide):fn(l.list,b),Rn(s,b),i.register(b,A-g+(P?0:L),D.index)})}}function f(g,v){var L=g.cloneNode(!0);return re(L,n.classes.clone),L.id=t.root.id+"-clone"+Er(v+1),L}function m(){var g=n.clones;if(!t.is(Ue))g=0;else if(gn(g)){var v=n[c("fixedWidth")]&&e.Layout.slideSize(0),L=v&&an(Vt(l.track)[c("width")]/v);g=L||n[c("autoWidth")]&&t.length||n.perPage*Na}return g}return{mount:d,destroy:x}}function ja(t,e,n){var r=Lt(t),o=r.on,l=r.emit,i=t.state.set,c=e.Layout,s=c.slideSize,u=c.getPadding,d=c.totalSize,T=c.listSize,x=c.sliderSize,y=e.Direction,p=y.resolve,f=y.orient,m=e.Elements,g=m.list,v=m.track,L;function D(){L=e.Transition,o([Ce,Un,kt,_t],A)}function A(){e.Controller.isBusy()||(e.Scroll.cancel(),b(t.index),e.Slides.update())}function P(_,M,Z,it){_!==M&&R(_>Z)&&(W(),$(N(j(),_>Z),!0)),i(Ve),l(me,M,Z,_),L.start(M,function(){i(De),l(Ke,M,Z,_),it&&it()})}function b(_){$(H(_,!0))}function $(_,M){if(!t.is(xn)){var Z=M?_:E(_);qt(g,"transform","translate"+p("X")+"("+Z+"px)"),_!==Z&&l(qo)}}function E(_){if(t.is(Ue)){var M=B(_),Z=M>e.Controller.getEnd(),it=M<0;(it||Z)&&(_=N(_,Z))}return _}function N(_,M){var Z=_-k(M),it=x();return _-=f(it*(an(Mt(Z)/it)||1))*(M?1:-1),_}function W(){$(j(),!0),L.cancel()}function B(_){for(var M=e.Slides.get(),Z=0,it=1/0,nt=0;nt<M.length;nt++){var ut=M[nt].index,F=Mt(H(ut,!0)-_);if(F<=it)it=F,Z=ut;else break}return Z}function H(_,M){var Z=f(d(_-1)-C(_));return M?z(Z):Z}function j(){var _=p("left");return Vt(g)[_]-Vt(v)[_]+f(u(!1))}function z(_){return n.trimSpace&&t.is(ze)&&(_=Fe(_,0,f(x(!0)-T()))),_}function C(_){var M=n.focus;return M==="center"?(T()-s(_,!0))/2:+M*s(_)||0}function k(_){return H(_?e.Controller.getEnd():0,!!n.trimSpace)}function R(_){var M=f(N(j(),_));return _?M>=0:M<=g[p("scrollWidth")]-Vt(v)[p("width")]}function I(_,M){M=gn(M)?j():M;var Z=_!==!0&&f(M)<f(k(!1)),it=_!==!1&&f(M)>f(k(!0));return Z||it}return{mount:D,move:P,jump:b,translate:$,shift:N,cancel:W,toIndex:B,toPosition:H,getPosition:j,getLimit:k,exceededLimit:I,reposition:A}}function za(t,e,n){var r=Lt(t),o=r.on,l=r.emit,i=e.Move,c=i.getPosition,s=i.getLimit,u=i.toPosition,d=e.Slides,T=d.isEnough,x=d.getLength,y=n.omitEnd,p=t.is(Ue),f=t.is(ze),m=$t(j,!1),g=$t(j,!0),v=n.start||0,L,D=v,A,P,b;function $(){E(),o([kt,_t,jn],E),o(Un,N)}function E(){A=x(!0),P=n.perMove,b=n.perPage,L=R();var F=Fe(v,0,y?L:A-1);F!==v&&(v=F,i.reposition())}function N(){L!==R()&&l(jn)}function W(F,J,ht){if(!ut()){var mt=H(F),gt=k(mt);gt>-1&&(J||gt!==v)&&(Z(gt),i.move(mt,gt,D,ht))}}function B(F,J,ht,mt){e.Scroll.scroll(F,J,ht,function(){var gt=k(i.toIndex(c()));Z(y?be(gt,L):gt),mt&&mt()})}function H(F){var J=v;if(ve(F)){var ht=F.match(/([+\-<>])(\d+)?/)||[],mt=ht[1],gt=ht[2];mt==="+"||mt==="-"?J=z(v+ +(""+mt+(+gt||1)),v):mt===">"?J=gt?I(+gt):m(!0):mt==="<"&&(J=g(!0))}else J=p?F:Fe(F,0,L);return J}function j(F,J){var ht=P||(nt()?1:b),mt=z(v+ht*(F?-1:1),v,!(P||nt()));return mt===-1&&f&&!ko(c(),s(!F),1)?F?0:L:J?mt:k(mt)}function z(F,J,ht){if(T()||nt()){var mt=C(F);mt!==F&&(J=F,F=mt,ht=!1),F<0||F>L?!P&&(kn(0,F,J,!0)||kn(L,J,F,!0))?F=I(_(F)):p?F=ht?F<0?-(A%b||b):A:F:n.rewind?F=F<0?L:0:F=-1:ht&&F!==J&&(F=I(_(J)+(F<J?-1:1)))}else F=-1;return F}function C(F){if(f&&n.trimSpace==="move"&&F!==v)for(var J=c();J===u(F,!0)&&kn(F,0,t.length-1,!n.rewind);)F<v?--F:++F;return F}function k(F){return p?(F+A)%A||0:F}function R(){for(var F=A-(nt()||p&&P?1:b);y&&F-- >0;)if(u(A-1,!0)!==u(F,!0)){F++;break}return Fe(F,0,A-1)}function I(F){return Fe(nt()?F:b*F,0,L)}function _(F){return nt()?be(F,L):Dn((F>=L?A-1:F)/b)}function M(F){var J=i.toIndex(F);return f?Fe(J,0,L):J}function Z(F){F!==v&&(D=v,v=F)}function it(F){return F?D:v}function nt(){return!gn(n.focus)||n.isNavigation}function ut(){return t.state.is([Ve,mn])&&!!n.waitForTransition}return{mount:$,go:W,scroll:B,getNext:m,getPrev:g,getAdjacent:j,getEnd:R,setIndex:Z,getIndex:it,toIndex:I,toPage:_,toDest:M,hasFocus:nt,isBusy:ut}}var Va="http://www.w3.org/2000/svg",Ka="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",Tn=40;function Ua(t,e,n){var r=Lt(t),o=r.on,l=r.bind,i=r.emit,c=n.classes,s=n.i18n,u=e.Elements,d=e.Controller,T=u.arrows,x=u.track,y=T,p=u.prev,f=u.next,m,g,v={};function L(){A(),o(kt,D)}function D(){P(),L()}function A(){var B=n.arrows;B&&!(p&&f)&&E(),p&&f&&(rn(v,{prev:p,next:f}),on(y,B?"":"none"),re(y,g=Nr+"--"+n.direction),B&&(b(),W(),pt([p,f],bn,x.id),i(zo,p,f)))}function P(){r.destroy(),ce(y,g),m?(_e(T?[p,f]:y),p=f=null):oe([p,f],Or)}function b(){o([Ce,Ke,_t,Ae,jn],W),l(f,"click",$t($,">")),l(p,"click",$t($,"<"))}function $(B){d.go(B,!0)}function E(){y=T||Oe("div",c.arrows),p=N(!0),f=N(!1),m=!0,fn(y,[p,f]),!T&&Pr(y,x)}function N(B){var H='<button class="'+c.arrow+" "+(B?c.prev:c.next)+'" type="button"><svg xmlns="'+Va+'" viewBox="0 0 '+Tn+" "+Tn+'" width="'+Tn+'" height="'+Tn+'" focusable="false"><path d="'+(n.arrowPath||Ka)+'" />';return Io(H)}function W(){if(p&&f){var B=t.index,H=d.getPrev(),j=d.getNext(),z=H>-1&&B<H?s.last:s.prev,C=j>-1&&B>j?s.first:s.next;p.disabled=H<0,f.disabled=j<0,pt(p,Kt,z),pt(f,Kt,C),i(Vo,p,f,H,j)}}return{arrows:v,mount:L,destroy:P,update:W}}var Ga=_r+"-interval";function Ya(t,e,n){var r=Lt(t),o=r.on,l=r.bind,i=r.emit,c=Yn(n.interval,t.go.bind(t,">"),b),s=c.isPaused,u=e.Elements,d=e.Elements,T=d.root,x=d.toggle,y=n.autoplay,p,f,m=y==="pause";function g(){y&&(v(),x&&pt(x,bn,u.track.id),m||L(),P())}function v(){n.pauseOnHover&&l(T,"mouseenter mouseleave",function(E){p=E.type==="mouseenter",A()}),n.pauseOnFocus&&l(T,"focusin focusout",function(E){f=E.type==="focusin",A()}),x&&l(x,"click",function(){m?L():D(!0)}),o([me,Gn,_t],c.rewind),o(me,$)}function L(){s()&&e.Slides.isEnough()&&(c.start(!n.resetProgress),f=p=m=!1,P(),i(kr))}function D(E){E===void 0&&(E=!0),m=!!E,P(),s()||(c.pause(),i(Fr))}function A(){m||(p||f?D(!1):L())}function P(){x&&(se(x,Ee,!m),pt(x,Kt,n.i18n[m?"play":"pause"]))}function b(E){var N=u.bar;N&&qt(N,"width",E*100+"%"),i(Go,E)}function $(E){var N=e.Slides.getAt(E);c.set(N&&+Xt(N.slide,Ga)||n.interval)}return{mount:g,destroy:c.cancel,play:L,pause:D,isPaused:s}}function qa(t,e,n){var r=Lt(t),o=r.on;function l(){n.cover&&(o(Mr,$t(c,!0)),o([Ce,kt,_t],$t(i,!0)))}function i(s){e.Slides.forEach(function(u){var d=yn(u.container||u.slide,"img");d&&d.src&&c(s,d,u)})}function c(s,u,d){d.style("background",s?'center/cover no-repeat url("'+u.src+'")':"",!0),on(u,s?"none":"")}return{mount:l,destroy:$t(i,!1)}}var Xa=10,Za=600,Ja=.6,Qa=1.5,tl=800;function el(t,e,n){var r=Lt(t),o=r.on,l=r.emit,i=t.state.set,c=e.Move,s=c.getPosition,u=c.getLimit,d=c.exceededLimit,T=c.translate,x=t.is(ze),y,p,f=1;function m(){o(me,D),o([kt,_t],A)}function g(b,$,E,N,W){var B=s();if(D(),E&&(!x||!d())){var H=e.Layout.sliderSize(),j=yr(b)*H*Dn(Mt(b)/H)||0;b=c.toPosition(e.Controller.toDest(b%H))+j}var z=ko(B,b,1);f=1,$=z?0:$||Nn(Mt(b-B)/Qa,tl),p=N,y=Yn($,v,$t(L,B,b,W),1),i(mn),l(Gn),y.start()}function v(){i(De),p&&p(),l(Ae)}function L(b,$,E,N){var W=s(),B=b+($-b)*P(N),H=(B-W)*f;T(W+H),x&&!E&&d()&&(f*=Ja,Mt(H)<Xa&&g(u(d(!0)),Za,!1,p,!0))}function D(){y&&y.cancel()}function A(){y&&!y.isPaused()&&(D(),v())}function P(b){var $=n.easingFunc;return $?$(b):1-Math.pow(1-b,4)}return{mount:m,destroy:D,scroll:g,cancel:A}}var Me={passive:!1,capture:!0};function nl(t,e,n){var r=Lt(t),o=r.on,l=r.emit,i=r.bind,c=r.unbind,s=t.state,u=e.Move,d=e.Scroll,T=e.Controller,x=e.Elements.track,y=e.Media.reduce,p=e.Direction,f=p.resolve,m=p.orient,g=u.getPosition,v=u.exceededLimit,L,D,A,P,b,$=!1,E,N,W;function B(){i(x,ur,hr,Me),i(x,pr,hr,Me),i(x,si,j,Me),i(x,"click",k,{capture:!0}),i(x,"dragstart",le),o([Ce,kt],H)}function H(){var O=n.drag;lt(!O),P=O==="free"}function j(O){if(E=!1,!N){var w=gt(O);mt(O.target)&&(w||!O.button)&&(T.isBusy()?le(O,!0):(W=w?x:window,b=s.is([Ve,mn]),A=null,i(W,ur,z,Me),i(W,pr,C,Me),u.cancel(),d.cancel(),R(O)))}}function z(O){if(s.is(In)||(s.set(In),l(No)),O.cancelable)if(b){u.translate(L+ht(nt(O)));var w=ut(O)>co,K=$!==($=v());(w||K)&&R(O),E=!0,l(Do),le(O)}else M(O)&&(b=_(O),le(O))}function C(O){s.is(In)&&(s.set(De),l(jo)),b&&(I(O),le(O)),c(W,ur,z),c(W,pr,C),b=!1}function k(O){!N&&E&&le(O,!0)}function R(O){A=D,D=O,L=g()}function I(O){var w=Z(O),K=it(w),q=n.rewind&&n.rewindByDrag;y(!1),P?T.scroll(K,0,n.snap):t.is(xn)?T.go(m(yr(w))<0?q?"<":"-":q?">":"+"):t.is(ze)&&$&&q?T.go(v(!0)?">":"<"):T.go(T.toDest(K),!0),y(!0)}function _(O){var w=n.dragMinThreshold,K=tn(w),q=K&&w.mouse||0,Q=(K?w.touch:+w)||10;return Mt(nt(O))>(gt(O)?Q:q)}function M(O){return Mt(nt(O))>Mt(nt(O,!0))}function Z(O){if(t.is(Ue)||!$){var w=ut(O);if(w&&w<co)return nt(O)/w}return 0}function it(O){return g()+yr(O)*be(Mt(O)*(n.flickPower||600),P?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function nt(O,w){return J(O,w)-J(F(O),w)}function ut(O){return fr(O)-fr(F(O))}function F(O){return D===O&&A||D}function J(O,w){return(gt(O)?O.changedTouches[0]:O)["page"+f(w?"Y":"X")]}function ht(O){return O/($&&t.is(ze)?Fa:1)}function mt(O){var w=n.noDrag;return!en(O,"."+ri+", ."+tr)&&(!w||!en(O,w))}function gt(O){return typeof TouchEvent<"u"&&O instanceof TouchEvent}function G(){return b}function lt(O){N=O}return{mount:B,disable:lt,isDragging:G}}var rl={Spacebar:" ",Right:Zn,Left:Xn,Up:Xo,Down:Zo};function Dr(t){return t=ve(t)?t:t.key,rl[t]||t}var uo="keydown";function ol(t,e,n){var r=Lt(t),o=r.on,l=r.bind,i=r.unbind,c=t.root,s=e.Direction.resolve,u,d;function T(){x(),o(kt,y),o(kt,x),o(me,f)}function x(){var g=n.keyboard;g&&(u=g==="global"?window:c,l(u,uo,m))}function y(){i(u,uo)}function p(g){d=g}function f(){var g=d;d=!0,Po(function(){d=g})}function m(g){if(!d){var v=Dr(g);v===s(Xn)?t.go("<"):v===s(Zn)&&t.go(">")}}return{mount:T,destroy:y,disable:p}}var Qe=_r+"-lazy",Fn=Qe+"-srcset",il="["+Qe+"], ["+Fn+"]";function al(t,e,n){var r=Lt(t),o=r.on,l=r.off,i=r.bind,c=r.emit,s=n.lazyLoad==="sequential",u=[Ke,Ae],d=[];function T(){n.lazyLoad&&(x(),o(_t,x))}function x(){pe(d),y(),s?g():(l(u),o(u,p),p())}function y(){e.Slides.forEach(function(v){Wr(v.slide,il).forEach(function(L){var D=Xt(L,Qe),A=Xt(L,Fn);if(D!==L.src||A!==L.srcset){var P=n.classes.spinner,b=L.parentElement,$=yn(b,"."+P)||Oe("span",P,b);d.push([L,v,$]),L.src||on(L,"none")}})})}function p(){d=d.filter(function(v){var L=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(t.index,L)?f(v):!0}),d.length||l(u)}function f(v){var L=v[0];re(v[1].slide,Cr),i(L,"load error",$t(m,v)),pt(L,"src",Xt(L,Qe)),pt(L,"srcset",Xt(L,Fn)),oe(L,Qe),oe(L,Fn)}function m(v,L){var D=v[0],A=v[1];ce(A.slide,Cr),L.type!=="error"&&(_e(v[2]),on(D,""),c(Mr,D,A),c(je)),s&&g()}function g(){d.length&&f(d.shift())}return{mount:T,destroy:$t(pe,d),check:p}}function ll(t,e,n){var r=Lt(t),o=r.on,l=r.emit,i=r.bind,c=e.Slides,s=e.Elements,u=e.Controller,d=u.hasFocus,T=u.getIndex,x=u.go,y=e.Direction.resolve,p=s.pagination,f=[],m,g;function v(){L(),o([kt,_t,jn],v);var N=n.pagination;p&&on(p,N?"":"none"),N&&(o([me,Gn,Ae],E),D(),E(),l(Ko,{list:m,items:f},$(t.index)))}function L(){m&&(_e(p?xe(m.children):m),ce(m,g),pe(f),m=null),r.destroy()}function D(){var N=t.length,W=n.classes,B=n.i18n,H=n.perPage,j=d()?u.getEnd()+1:an(N/H);m=p||Oe("ul",W.pagination,s.track.parentElement),re(m,g=er+"--"+b()),pt(m,de,"tablist"),pt(m,Kt,B.select),pt(m,Hr,b()===Jn?"vertical":"");for(var z=0;z<j;z++){var C=Oe("li",null,m),k=Oe("button",{class:W.page,type:"button"},C),R=c.getIn(z).map(function(_){return _.slide.id}),I=!d()&&H>1?B.pageX:B.slideX;i(k,"click",$t(A,z)),n.paginationKeyboard&&i(k,"keydown",$t(P,z)),pt(C,de,"presentation"),pt(k,de,"tab"),pt(k,bn,R.join(" ")),pt(k,Kt,vr(I,z+1)),pt(k,Ne,-1),f.push({li:C,button:k,page:z})}}function A(N){x(">"+N,!0)}function P(N,W){var B=f.length,H=Dr(W),j=b(),z=-1;H===y(Zn,!1,j)?z=++N%B:H===y(Xn,!1,j)?z=(--N+B)%B:H==="Home"?z=0:H==="End"&&(z=B-1);var C=f[z];C&&(Ao(C.button),x(">"+z),le(W,!0))}function b(){return n.paginationDirection||n.direction}function $(N){return f[u.toPage(N)]}function E(){var N=$(T(!0)),W=$(T());if(N){var B=N.button;ce(B,Ee),oe(B,oo),pt(B,Ne,-1)}if(W){var H=W.button;re(H,Ee),pt(H,oo,!0),pt(H,Ne,"")}l(Uo,{list:m,items:f},N,W)}return{items:f,mount:v,destroy:L,getAt:$,update:E}}var sl=[" ","Enter"];function cl(t,e,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){t.splides.forEach(function(p){p.isParent||(u(t,p.splide),u(p.splide,t))}),r&&d()}function c(){l.forEach(function(p){p.destroy()}),pe(l)}function s(){c(),i()}function u(p,f){var m=Lt(p);m.on(me,function(g,v,L){f.go(f.is(Ue)?L:g)}),l.push(m)}function d(){var p=Lt(t),f=p.on;f(Ar,x),f(Yo,y),f([Ce,kt],T),l.push(p),p.emit(Rr,t.splides)}function T(){pt(e.Elements.list,Hr,n.direction===Jn?"vertical":"")}function x(p){t.go(p.index)}function y(p,f){Lr(sl,Dr(f))&&(x(p),le(f))}return{setup:$t(e.Media.set,{slideFocus:gn(o)?r:o},!0),mount:i,destroy:c,remount:s}}function dl(t,e,n){var r=Lt(t),o=r.bind,l=0;function i(){n.wheel&&o(e.Elements.track,"wheel",c,Me)}function c(u){if(u.cancelable){var d=u.deltaY,T=d<0,x=fr(u),y=n.wheelMinThreshold||0,p=n.wheelSleep||0;Mt(d)>y&&x-l>p&&(t.go(T?"<":">"),l=x),s(T)&&le(u)}}function s(u){return!n.releaseWheel||t.state.is(Ve)||e.Controller.getAdjacent(u)!==-1}return{mount:i}}var ul=90;function pl(t,e,n){var r=Lt(t),o=r.on,l=e.Elements.track,i=n.live&&!n.isNavigation,c=Oe("span",Ea),s=Yn(ul,$t(d,!1));function u(){i&&(x(!e.Autoplay.isPaused()),pt(l,lo,!0),c.textContent="…",o(kr,$t(x,!0)),o(Fr,$t(x,!1)),o([Ke,Ae],$t(d,!0)))}function d(y){pt(l,ao,y),y?(fn(l,c),s.start()):(_e(c),s.cancel())}function T(){oe(l,[io,lo,ao]),_e(c)}function x(y){i&&pt(l,io,y?"off":"polite")}return{mount:u,disable:x,destroy:T}}var ml=Object.freeze({__proto__:null,Media:Ca,Direction:Sa,Elements:Ma,Slides:Ha,Layout:Oa,Clones:Da,Move:ja,Controller:za,Arrows:Ua,Autoplay:Ya,Cover:qa,Scroll:el,Drag:nl,Keyboard:ol,LazyLoad:al,Pagination:ll,Sync:cl,Wheel:dl,Live:pl}),gl={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"},hl={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:Ra,i18n:gl,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function fl(t,e,n){var r=e.Slides;function o(){Lt(t).on([Ce,_t],l)}function l(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Po(s)}return{mount:o,start:i,cancel:hr}}function yl(t,e,n){var r=e.Move,o=e.Controller,l=e.Scroll,i=e.Elements.list,c=$t(qt,i,"transition"),s;function u(){Lt(t).bind(i,"transitionend",function(y){y.target===i&&s&&(T(),s())})}function d(y,p){var f=r.toPosition(y,!0),m=r.getPosition(),g=x(y);Mt(f-m)>=1&&g>=1?n.useScroll?l.scroll(f,g,!1,p):(c("transform "+g+"ms "+n.easing),r.translate(f,!0),s=p):(r.jump(y),p())}function T(){c(""),l.cancel()}function x(y){var p=n.rewindSpeed;if(t.is(ze)&&p){var f=o.getIndex(!0),m=o.getEnd();if(f===0&&y>=m||f>=m&&y===0)return p}return n.speed}return{mount:u,start:d,cancel:T}}var vl=(function(){function t(n,r){this.event=Lt(),this.Components={},this.state=ba(He),this.splides=[],this._o={},this._E={};var o=ve(n)?Ro(document,n):n;Je(o,o+" is invalid."),this.root=o,r=fe({label:Xt(o,Kt)||"",labelledby:Xt(o,Br)||""},hl,t.defaults,r||{});try{fe(r,JSON.parse(Xt(o,_r)))}catch{Je(!1,"Invalid JSON")}this._o=Object.create(fe({},r))}var e=t.prototype;return e.mount=function(r,o){var l=this,i=this.state,c=this.Components;Je(i.is([He,On]),"Already mounted!"),i.set(He),this._C=c,this._T=o||this._T||(this.is(xn)?fl:yl),this._E=r||this._E;var s=rn({},ml,this._E,{Transition:this._T});return We(s,function(u,d){var T=u(l,c,l._o);c[d]=T,T.setup&&T.setup()}),We(c,function(u){u.mount&&u.mount()}),this.emit(Ce),re(this.root,Aa),i.set(De),this.emit(br),this},e.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(De)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},e.go=function(r){return this._C.Controller.go(r),this},e.on=function(r,o){return this.event.on(r,o),this},e.off=function(r){return this.event.off(r),this},e.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(xe(arguments,1))),this},e.add=function(r,o){return this._C.Slides.add(r,o),this},e.remove=function(r){return this._C.Slides.remove(r),this},e.is=function(r){return this._o.type===r},e.refresh=function(){return this.emit(_t),this},e.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(He)?Lt(this).on(br,this.destroy.bind(this,r)):(We(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(Ir),o.destroy(),r&&pe(this.splides),l.set(On)),this},ga(t,[{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()}}]),t})(),jr=vl;jr.defaults={};jr.STATES=fa;var po=[[Ce,"onMounted"],[br,"onReady"],[me,"onMove"],[Ke,"onMoved"],[Ar,"onClick"],[Mo,"onActive"],[Bo,"onInactive"],[Ho,"onVisible"],[Oo,"onHidden"],[_t,"onRefresh"],[kt,"onUpdated"],[je,"onResize"],[Un,"onResized"],[No,"onDrag"],[Do,"onDragging"],[jo,"onDragged"],[Gn,"onScroll"],[Ae,"onScrolled"],[Ir,"onDestroy"],[zo,"onArrowsMounted"],[Vo,"onArrowsUpdated"],[Ko,"onPaginationMounted"],[Uo,"onPaginationUpdated"],[Rr,"onNavigationMounted"],[kr,"onAutoplayPlay"],[Go,"onAutoplayPlaying"],[Fr,"onAutoplayPause"],[Mr,"onLazyLoadLoaded"]];function zr(...t){return t.filter(Boolean).join(" ")}function zn(t){return t!==null&&typeof t=="object"}function Sr(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,r)=>!Sr(n,e[r]));if(zn(t)&&zn(e)){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(e,o)||!Sr(t[o],e[o]))}return t===e}function bl(t,e){return t.length===e.length&&!t.some((n,r)=>n!==e[r])}function xl(t,e){if(t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function $r(t,e){const n=t;return xl(e,(r,o)=>{Array.isArray(r)?n[o]=r.slice():zn(r)?n[o]=$r(zn(n[o])?n[o]:{},r):n[o]=r}),n}var Cl=({children:t,className:e,...n})=>h.createElement("div",{className:zr("splide__track",e),...n},h.createElement("ul",{className:"splide__list"},t)),Vr=class extends h.Component{constructor(){super(...arguments),this.splideRef=h.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new jr(r,t),this.bind(this.splide),this.splide.mount(e,n),this.options=$r({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!Sr(this.options,t)&&(this.splide.options=t,this.options=$r({},t));const e=this.getSlides();bl(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){po.forEach(([e,n])=>{const r=this.props[n];typeof r=="function"&&t.on(e,(...o)=>{r(t,...o)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:r,...o}=this.props;return h.createElement(e,{className:zr("splide",t),ref:this.splideRef,...this.omit(o,["options",...po.map(l=>l[1])])},n?h.createElement(Cl,null,r):r)}},Kr=({children:t,className:e,...n})=>h.createElement("li",{className:zr("splide__slide",e),...n},t);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),xt=require("classnames"),S=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),_o=require("react-dom");function Ci(t){return t.type==="object"&&t.version===1}const Si="ControlSlider-module__wrapper___sHEkd",$i="ControlSlider-module__hoverArrow___A-dOH",wi="ControlSlider-module__sliderItem___QQSkR",Ti="ControlSlider-module__sliderImage___9hRl-",Li="ControlSlider-module__arrow___05ghY",_i="ControlSlider-module__arrowVertical___tBfVN",Ei="ControlSlider-module__nextArrow___-30Yc",Pi="ControlSlider-module__arrowInner___aEra3",Wi="ControlSlider-module__arrowIcon___S4ztF",Fi="ControlSlider-module__arrowImg___2dwJW",Ri="ControlSlider-module__mirror___brd6U",Ii="ControlSlider-module__pagination___bicLF",Ai="ControlSlider-module__paginationInner___bT-P-",ki="ControlSlider-module__paginationVertical___zYqKw",Mi="ControlSlider-module__paginationItem___nTRbk",Oi="ControlSlider-module__dot___p1Qun",Ni="ControlSlider-module__activeDot___LHFaj",Hi="ControlSlider-module__paginationInsideBottom___R3FWn",Bi="ControlSlider-module__paginationInsideTop___V-qb-",zi="ControlSlider-module__paginationOutsideBottom___14w8D",Di="ControlSlider-module__paginationOutsideTop___SCLqB",ji="ControlSlider-module__paginationInsideLeft___yOBRZ",Vi="ControlSlider-module__paginationInsideRight___Rtt3o",Ki="ControlSlider-module__paginationOutsideLeft___lahaw",Ui="ControlSlider-module__paginationOutsideRight___EtuQa",Gi="ControlSlider-module__imgWrapper___UjEgB",Yi="ControlSlider-module__captionBlock___dJ6-j",qi="ControlSlider-module__captionTextWrapper___HFlpf",Xi="ControlSlider-module__captionText___uGBVc",Zi="ControlSlider-module__active___WZK4G",Ji="ControlSlider-module__withPointerEvents___t-18M",Qi="ControlSlider-module__topLeftAlignment___zjnGM",ta="ControlSlider-module__topCenterAlignment___gD1xW",ea="ControlSlider-module__topRightAlignment___NMapS",na="ControlSlider-module__middleLeftAlignment___OnUrY",ra="ControlSlider-module__middleCenterAlignment___Tdkl0",oa="ControlSlider-module__middleRightAlignment___wEbfX",ia="ControlSlider-module__bottomLeftAlignment___cTP2-",aa="ControlSlider-module__bottomCenterAlignment___c54fB",sa="ControlSlider-module__bottomRightAlignment___kEwrz",la="ControlSlider-module__clickOverlay___DZA28",ca="ControlSlider-module__contain___pLyq7",da="ControlSlider-module__cover___KdDat",tt={wrapper:Si,hoverArrow:$i,sliderItem:wi,sliderImage:Ti,arrow:Li,arrowVertical:_i,nextArrow:Ei,arrowInner:Pi,arrowIcon:Wi,arrowImg:Fi,mirror:Ri,pagination:Ii,paginationInner:Ai,paginationVertical:ki,paginationItem:Mi,dot:Oi,activeDot:Ni,paginationInsideBottom:Hi,paginationInsideTop:Bi,paginationOutsideBottom:zi,paginationOutsideTop:Di,paginationInsideLeft:ji,paginationInsideRight:Vi,paginationOutsideLeft:Ki,paginationOutsideRight:Ui,imgWrapper:Gi,captionBlock:Yi,captionTextWrapper:qi,captionText:Xi,active:Zi,withPointerEvents:Ji,topLeftAlignment:Qi,topCenterAlignment:ta,topRightAlignment:ea,middleLeftAlignment:na,middleCenterAlignment:ra,middleRightAlignment:oa,bottomLeftAlignment:ia,bottomCenterAlignment:aa,bottomRightAlignment:sa,clickOverlay:la,contain:ca,cover:da};function ua(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function pa(t,e,n){return e&&ua(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Xr="(prefers-reduced-motion: reduce)",Me=1,ma=2,He=3,Ue=4,gn=5,In=6,Bn=7,ga={CREATED:Me,MOUNTED:ma,IDLE:He,MOVING:Ue,SCROLLING:gn,DRAGGING:In,DESTROYED:Bn};function me(t){t.length=0}function Ce(t,e,n){return Array.prototype.slice.call(t,e,n)}function wt(t){return t.bind.apply(t,[null].concat(Ce(arguments,1)))}var Eo=setTimeout,hr=function(){};function Zr(t){return requestAnimationFrame(t)}function Kn(t,e){return typeof e===t}function rn(t){return!Tr(t)&&Kn("object",t)}var wr=Array.isArray,Po=wt(Kn,"function"),be=wt(Kn,"string"),hn=wt(Kn,"undefined");function Tr(t){return t===null}function Wo(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function fn(t){return wr(t)?t:[t]}function Zt(t,e){fn(t).forEach(e)}function Lr(t,e){return t.indexOf(e)>-1}function An(t,e){return t.push.apply(t,fn(e)),t}function ce(t,e,n){t&&Zt(e,function(r){r&&t.classList[n?"add":"remove"](r)})}function ie(t,e){ce(t,be(e)?e.split(" "):e,!0)}function yn(t,e){Zt(e,t.appendChild.bind(t))}function _r(t,e){Zt(t,function(n){var r=(e||n).parentNode;r&&r.insertBefore(n,e)})}function on(t,e){return Wo(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Fo(t,e){var n=t?Ce(t.children):[];return e?n.filter(function(r){return on(r,e)}):n}function vn(t,e){return e?Fo(t,e)[0]:t.firstElementChild}var an=Object.keys;function _e(t,e,n){return t&&(n?an(t).reverse():an(t)).forEach(function(r){r!=="__proto__"&&e(t[r],r)}),t}function sn(t){return Ce(arguments,1).forEach(function(e){_e(e,function(n,r){t[r]=e[r]})}),t}function ye(t){return Ce(arguments,1).forEach(function(e){_e(e,function(n,r){wr(n)?t[r]=n.slice():rn(n)?t[r]=ye({},rn(t[r])?t[r]:{},n):t[r]=n})}),t}function Jr(t,e){Zt(e||an(t),function(n){delete t[n]})}function ae(t,e){Zt(t,function(n){Zt(e,function(r){n&&n.removeAttribute(r)})})}function mt(t,e,n){rn(e)?_e(e,function(r,o){mt(t,o,r)}):Zt(t,function(r){Tr(n)||n===""?ae(r,e):r.setAttribute(e,String(n))})}function Oe(t,e,n){var r=document.createElement(t);return e&&(be(e)?ie(r,e):mt(r,e)),n&&yn(n,r),r}function te(t,e,n){if(hn(n))return getComputedStyle(t)[e];Tr(n)||(t.style[e]=""+n)}function ln(t,e){te(t,"display",e)}function Ro(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function ee(t,e){return t.getAttribute(e)}function Qr(t,e){return t&&t.classList.contains(e)}function Yt(t){return t.getBoundingClientRect()}function Ee(t){Zt(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Io(t){return vn(new DOMParser().parseFromString(t,"text/html").body)}function le(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Ao(t,e){return t&&t.querySelector(e)}function Er(t,e){return e?Ce(t.querySelectorAll(e)):[]}function de(t,e){ce(t,e,!1)}function fr(t){return t.timeStamp}function we(t){return be(t)?t:t?t+"px":""}var bn="splide",Pr="data-"+bn;function en(t,e){if(!t)throw new Error("["+bn+"] "+(e||""))}var xe=Math.min,zn=Math.max,Dn=Math.floor,cn=Math.ceil,zt=Math.abs;function ko(t,e,n){return zt(t-e)<n}function kn(t,e,n,r){var o=xe(e,n),l=zn(e,n);return r?o<t&&t<l:o<=t&&t<=l}function Ae(t,e,n){var r=xe(e,n),o=zn(e,n);return xe(zn(r,t),o)}function yr(t){return+(t>0)-+(t<0)}function vr(t,e){return Zt(e,function(n){t=t.replace("%s",""+n)}),t}function Wr(t){return t<10?"0"+t:""+t}var to={};function ha(t){return""+t+Wr(to[t]=(to[t]||0)+1)}function Mo(){var t=[];function e(i,s,d,u){o(i,s,function(c,L,v){var h="addEventListener"in c,p=h?c.removeEventListener.bind(c,L,d,u):c.removeListener.bind(c,d);h?c.addEventListener(L,d,u):c.addListener(d),t.push([c,L,v,d,p])})}function n(i,s,d){o(i,s,function(u,c,L){t=t.filter(function(v){return v[0]===u&&v[1]===c&&v[2]===L&&(!d||v[3]===d)?(v[4](),!1):!0})})}function r(i,s,d){var u,c=!0;return typeof CustomEvent=="function"?u=new CustomEvent(s,{bubbles:c,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(s,c,!1,d)),i.dispatchEvent(u),u}function o(i,s,d){Zt(i,function(u){u&&Zt(s,function(c){c.split(" ").forEach(function(L){var v=L.split(".");d(u,v[0],v[1])})})})}function l(){t.forEach(function(i){i[4]()}),me(t)}return{bind:e,unbind:n,dispatch:r,destroy:l}}var Se="mounted",br="ready",ge="move",Ge="moved",Fr="click",Oo="active",No="inactive",Ho="visible",Bo="hidden",Ft="refresh",Nt="updated",Be="resize",Un="resized",zo="drag",Do="dragging",jo="dragged",Gn="scroll",We="scrolled",fa="overflow",Rr="destroy",Vo="arrows:mounted",Ko="arrows:updated",Uo="pagination:mounted",Go="pagination:updated",Ir="navigation:mounted",Ar="autoplay:play",Yo="autoplay:playing",kr="autoplay:pause",Mr="lazyload:loaded",qo="sk",Xo="sh",jn="ei";function _t(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Mo();function r(l,i){n.bind(e,fn(l).join(" "),function(s){i.apply(i,wr(s.detail)?s.detail:[])})}function o(l){n.dispatch(e,l,Ce(arguments,1))}return t&&t.event.on(Rr,n.destroy),sn(n,{bus:e,on:r,off:wt(n.unbind,e),emit:o})}function Yn(t,e,n,r){var o=Date.now,l,i=0,s,d=!0,u=0;function c(){if(!d){if(i=t?xe((o()-l)/t,1):1,n&&n(i),i>=1&&(e(),l=o(),r&&++u>=r))return v();s=Zr(c)}}function L(f){f||p(),l=o()-(f?i*t:0),d=!1,s=Zr(c)}function v(){d=!0}function h(){l=o(),i=0,n&&n(i)}function p(){s&&cancelAnimationFrame(s),i=0,s=0,d=!0}function g(f){t=f}function $(){return d}return{start:L,rewind:h,pause:v,cancel:p,set:g,isPaused:$}}function ya(t){var e=t;function n(o){e=o}function r(o){return Lr(fn(o),e)}return{set:n,is:r}}function va(t,e){var n=Yn(0,t,null,1);return function(){n.isPaused()&&n.start()}}function ba(t,e,n){var r=t.state,o=n.breakpoints||{},l=n.reducedMotion||{},i=Mo(),s=[];function d(){var p=n.mediaQuery==="min";an(o).sort(function(g,$){return p?+g-+$:+$-+g}).forEach(function(g){c(o[g],"("+(p?"min":"max")+"-width:"+g+"px)")}),c(l,Xr),L()}function u(p){p&&i.destroy()}function c(p,g){var $=matchMedia(g);i.bind($,"change",L),s.push([p,$])}function L(){var p=r.is(Bn),g=n.direction,$=s.reduce(function(f,x){return ye(f,x[1].matches?x[0]:{})},{});Jr(n),h($),n.destroy?t.destroy(n.destroy==="completely"):p?(u(!0),t.mount()):g!==n.direction&&t.refresh()}function v(p){matchMedia(Xr).matches&&(p?ye(n,l):Jr(n,an(l)))}function h(p,g,$){ye(n,p),g&&ye(Object.getPrototypeOf(n),p),($||!r.is(Me))&&t.emit(Nt,n)}return{setup:d,destroy:u,reduce:v,set:h}}var qn="Arrow",Xn=qn+"Left",Zn=qn+"Right",Zo=qn+"Up",Jo=qn+"Down",eo="rtl",Jn="ttb",sr={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,Zn],ArrowRight:[Jo,Xn]};function xa(t,e,n){function r(l,i,s){s=s||n.direction;var d=s===eo&&!i?1:s===Jn?0:-1;return sr[l]&&sr[l][d]||l.replace(/width|left|right/i,function(u,c){var L=sr[u.toLowerCase()][d]||u;return c>0?L.charAt(0).toUpperCase()+L.slice(1):L})}function o(l){return l*(n.direction===eo?1:-1)}return{resolve:r,orient:o}}var ue="role",Ne="tabindex",Ca="disabled",ne="aria-",xn=ne+"controls",Qo=ne+"current",no=ne+"selected",qt=ne+"label",Or=ne+"labelledby",ti=ne+"hidden",Nr=ne+"orientation",dn=ne+"roledescription",ro=ne+"live",oo=ne+"busy",io=ne+"atomic",Hr=[ue,Ne,Ca,xn,Qo,qt,Or,ti,Nr,dn],se=bn+"__",$e="is-",lr=bn,ao=se+"track",Sa=se+"list",Qn=se+"slide",ei=Qn+"--clone",$a=Qn+"__container",Br=se+"arrows",tr=se+"arrow",ni=tr+"--prev",ri=tr+"--next",er=se+"pagination",oi=er+"__page",wa=se+"progress",Ta=wa+"__bar",La=se+"toggle",_a=se+"spinner",Ea=se+"sr",Pa=$e+"initialized",Pe=$e+"active",ii=$e+"prev",ai=$e+"next",xr=$e+"visible",Cr=$e+"loading",si=$e+"focus-in",li=$e+"overflow",Wa=[Pe,xr,ii,ai,Cr,si,li],Fa={slide:Qn,clone:ei,arrows:Br,arrow:tr,prev:ni,next:ri,pagination:er,page:oi,spinner:_a};function Ra(t,e){if(Po(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!on(n,e);)n=n.parentElement;return n}var Ia=5,so=200,ci="touchstart mousedown",cr="touchmove mousemove",dr="touchend touchcancel mouseup click";function Aa(t,e,n){var r=_t(t),o=r.on,l=r.bind,i=t.root,s=n.i18n,d={},u=[],c=[],L=[],v,h,p;function g(){b(),R(),x()}function $(){o(Ft,f),o(Ft,g),o(Nt,x),l(document,ci+" keydown",function(y){p=y.type==="keydown"},{capture:!0}),l(i,"focusin",function(){ce(i,si,!!p)})}function f(y){var w=Hr.concat("style");me(u),de(i,c),de(v,L),ae([v,h],w),ae(i,y?w:["style",dn])}function x(){de(i,c),de(v,L),c=_(lr),L=_(ao),ie(i,c),ie(v,L),mt(i,qt,n.label),mt(i,Or,n.labelledby)}function b(){v=W("."+ao),h=vn(v,"."+Sa),en(v&&h,"A track/list element is missing."),An(u,Fo(h,"."+Qn+":not(."+ei+")")),_e({arrows:Br,pagination:er,prev:ni,next:ri,bar:Ta,toggle:La},function(y,w){d[w]=W("."+y)}),sn(d,{root:i,track:v,list:h,slides:u})}function R(){var y=i.id||ha(bn),w=n.role;i.id=y,v.id=v.id||y+"-track",h.id=h.id||y+"-list",!ee(i,ue)&&i.tagName!=="SECTION"&&w&&mt(i,ue,w),mt(i,dn,s.carousel),mt(h,ue,"presentation")}function W(y){var w=Ao(i,y);return w&&Ra(w,"."+lr)===i?w:void 0}function _(y){return[y+"--"+n.type,y+"--"+n.direction,n.drag&&y+"--draggable",n.isNavigation&&y+"--nav",y===lr&&Pe]}return sn(d,{setup:g,mount:$,destroy:f})}var ze="slide",Ye="loop",Cn="fade";function ka(t,e,n,r){var o=_t(t),l=o.on,i=o.emit,s=o.bind,d=t.Components,u=t.root,c=t.options,L=c.isNavigation,v=c.updateOnMove,h=c.i18n,p=c.pagination,g=c.slideFocus,$=d.Direction.resolve,f=ee(r,"style"),x=ee(r,qt),b=n>-1,R=vn(r,"."+$a),W;function _(){b||(r.id=u.id+"-slide"+Wr(e+1),mt(r,ue,p?"tabpanel":"group"),mt(r,dn,h.slide),mt(r,qt,x||vr(h.slideLabel,[e+1,t.length]))),y()}function y(){s(r,"click",wt(i,Fr,I)),s(r,"keydown",wt(i,qo,I)),l([Ge,Xo,We],F),l(Ir,E),v&&l(ge,H)}function w(){W=!0,o.destroy(),de(r,Wa),ae(r,Hr),mt(r,"style",f),mt(r,qt,x||"")}function E(){var A=t.splides.map(function(P){var N=P.splide.Components.Slides.getAt(e);return N?N.slide.id:""}).join(" ");mt(r,qt,vr(h.slideX,(b?n:e)+1)),mt(r,xn,A),mt(r,ue,g?"button":""),g&&ae(r,dn)}function H(){W||F()}function F(){if(!W){var A=t.index;O(),z(),ce(r,ii,e===A-1),ce(r,ai,e===A+1)}}function O(){var A=K();A!==Qr(r,Pe)&&(ce(r,Pe,A),mt(r,Qo,L&&A||""),i(A?Oo:No,I))}function z(){var A=C(),P=!A&&(!K()||b);if(t.state.is([Ue,gn])||mt(r,ti,P||""),mt(Er(r,c.focusableNodes||""),Ne,P?-1:""),g&&mt(r,Ne,P?-1:0),A!==Qr(r,xr)&&(ce(r,xr,A),i(A?Ho:Bo,I)),!A&&document.activeElement===r){var N=d.Slides.getAt(t.index);N&&Ro(N.slide)}}function V(A,P,N){te(N&&R||r,A,P)}function K(){var A=t.index;return A===e||c.cloneStatus&&A===n}function C(){if(t.is(Cn))return K();var A=Yt(d.Elements.track),P=Yt(r),N=$("left",!0),Q=$("right",!0);return Dn(A[N])<=cn(P[N])&&Dn(P[Q])<=cn(A[Q])}function k(A,P){var N=zt(A-e);return!b&&(c.rewind||t.is(Ye))&&(N=xe(N,t.length-N)),N<=P}var I={index:e,slideIndex:n,slide:r,container:R,isClone:b,mount:_,destroy:w,update:F,style:V,isWithin:k};return I}function Ma(t,e,n){var r=_t(t),o=r.on,l=r.emit,i=r.bind,s=e.Elements,d=s.slides,u=s.list,c=[];function L(){v(),o(Ft,h),o(Ft,v)}function v(){d.forEach(function(F,O){g(F,O,-1)})}function h(){W(function(F){F.destroy()}),me(c)}function p(){W(function(F){F.update()})}function g(F,O,z){var V=ka(t,O,z,F);V.mount(),c.push(V),c.sort(function(K,C){return K.index-C.index})}function $(F){return F?_(function(O){return!O.isClone}):c}function f(F){var O=e.Controller,z=O.toIndex(F),V=O.hasFocus()?1:n.perPage;return _(function(K){return kn(K.index,z,z+V-1)})}function x(F){return _(F)[0]}function b(F,O){Zt(F,function(z){if(be(z)&&(z=Io(z)),Wo(z)){var V=d[O];V?_r(z,V):yn(u,z),ie(z,n.classes.slide),w(z,wt(l,Be))}}),l(Ft)}function R(F){Ee(_(F).map(function(O){return O.slide})),l(Ft)}function W(F,O){$(O).forEach(F)}function _(F){return c.filter(Po(F)?F:function(O){return be(F)?on(O.slide,F):Lr(fn(F),O.index)})}function y(F,O,z){W(function(V){V.style(F,O,z)})}function w(F,O){var z=Er(F,"img"),V=z.length;V?z.forEach(function(K){i(K,"load error",function(){--V||O()})}):O()}function E(F){return F?d.length:c.length}function H(){return c.length>n.perPage}return{mount:L,destroy:h,update:p,register:g,get:$,getIn:f,getAt:x,add:b,remove:R,forEach:W,filter:_,style:y,getLength:E,isEnough:H}}function Oa(t,e,n){var r=_t(t),o=r.on,l=r.bind,i=r.emit,s=e.Slides,d=e.Direction.resolve,u=e.Elements,c=u.root,L=u.track,v=u.list,h=s.getAt,p=s.style,g,$,f;function x(){b(),l(window,"resize load",va(wt(i,Be))),o([Nt,Ft],b),o(Be,R)}function b(){g=n.direction===Jn,te(c,"maxWidth",we(n.width)),te(L,d("paddingLeft"),W(!1)),te(L,d("paddingRight"),W(!0)),R(!0)}function R(I){var A=Yt(c);(I||$.width!==A.width||$.height!==A.height)&&(te(L,"height",_()),p(d("marginRight"),we(n.gap)),p("width",w()),p("height",E(),!0),$=A,i(Un),f!==(f=k())&&(ce(c,li,f),i(fa,f)))}function W(I){var A=n.padding,P=d(I?"right":"left");return A&&we(A[P]||(rn(A)?0:A))||"0px"}function _(){var I="";return g&&(I=y(),en(I,"height or heightRatio is missing."),I="calc("+I+" - "+W(!1)+" - "+W(!0)+")"),I}function y(){return we(n.height||Yt(v).width*n.heightRatio)}function w(){return n.autoWidth?null:we(n.fixedWidth)||(g?"":H())}function E(){return we(n.fixedHeight)||(g?n.autoHeight?null:H():y())}function H(){var I=we(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function F(){return Yt(v)[d("width")]}function O(I,A){var P=h(I||0);return P?Yt(P.slide)[d("width")]+(A?0:K()):0}function z(I,A){var P=h(I);if(P){var N=Yt(P.slide)[d("right")],Q=Yt(v)[d("left")];return zt(N-Q)+(A?0:K())}return 0}function V(I){return z(t.length-1)-z(0)+O(0,I)}function K(){var I=h(0);return I&&parseFloat(te(I.slide,d("marginRight")))||0}function C(I){return parseFloat(te(L,d("padding"+(I?"Right":"Left"))))||0}function k(){return t.is(Cn)||V(!0)>F()}return{mount:x,resize:R,listSize:F,slideSize:O,sliderSize:V,totalSize:z,getPadding:C,isOverflow:k}}var Na=2;function Ha(t,e,n){var r=_t(t),o=r.on,l=e.Elements,i=e.Slides,s=e.Direction.resolve,d=[],u;function c(){o(Ft,L),o([Nt,Be],h),(u=$())&&(p(u),e.Layout.resize(!0))}function L(){v(),c()}function v(){Ee(d),me(d),r.destroy()}function h(){var f=$();u!==f&&(u<f||!f)&&r.emit(Ft)}function p(f){var x=i.get().slice(),b=x.length;if(b){for(;x.length<f;)An(x,x);An(x.slice(-f),x.slice(0,f)).forEach(function(R,W){var _=W<f,y=g(R.slide,W);_?_r(y,x[0].slide):yn(l.list,y),An(d,y),i.register(y,W-f+(_?0:b),R.index)})}}function g(f,x){var b=f.cloneNode(!0);return ie(b,n.classes.clone),b.id=t.root.id+"-clone"+Wr(x+1),b}function $(){var f=n.clones;if(!t.is(Ye))f=0;else if(hn(f)){var x=n[s("fixedWidth")]&&e.Layout.slideSize(0),b=x&&cn(Yt(l.track)[s("width")]/x);f=b||n[s("autoWidth")]&&t.length||n.perPage*Na}return f}return{mount:c,destroy:v}}function Ba(t,e,n){var r=_t(t),o=r.on,l=r.emit,i=t.state.set,s=e.Layout,d=s.slideSize,u=s.getPadding,c=s.totalSize,L=s.listSize,v=s.sliderSize,h=e.Direction,p=h.resolve,g=h.orient,$=e.Elements,f=$.list,x=$.track,b;function R(){b=e.Transition,o([Se,Un,Nt,Ft],W)}function W(){e.Controller.isBusy()||(e.Scroll.cancel(),y(t.index),e.Slides.update())}function _(P,N,Q,st){P!==N&&I(P>Q)&&(F(),w(H(V(),P>Q),!0)),i(Ue),l(ge,N,Q,P),b.start(N,function(){i(He),l(Ge,N,Q,P),st&&st()})}function y(P){w(z(P,!0))}function w(P,N){if(!t.is(Cn)){var Q=N?P:E(P);te(f,"transform","translate"+p("X")+"("+Q+"px)"),P!==Q&&l(Xo)}}function E(P){if(t.is(Ye)){var N=O(P),Q=N>e.Controller.getEnd(),st=N<0;(st||Q)&&(P=H(P,Q))}return P}function H(P,N){var Q=P-k(N),st=v();return P-=g(st*(cn(zt(Q)/st)||1))*(N?1:-1),P}function F(){w(V(),!0),b.cancel()}function O(P){for(var N=e.Slides.get(),Q=0,st=1/0,rt=0;rt<N.length;rt++){var ut=N[rt].index,M=zt(z(ut,!0)-P);if(M<=st)st=M,Q=ut;else break}return Q}function z(P,N){var Q=g(c(P-1)-C(P));return N?K(Q):Q}function V(){var P=p("left");return Yt(f)[P]-Yt(x)[P]+g(u(!1))}function K(P){return n.trimSpace&&t.is(ze)&&(P=Ae(P,0,g(v(!0)-L()))),P}function C(P){var N=n.focus;return N==="center"?(L()-d(P,!0))/2:+N*d(P)||0}function k(P){return z(P?e.Controller.getEnd():0,!!n.trimSpace)}function I(P){var N=g(H(V(),P));return P?N>=0:N<=f[p("scrollWidth")]-Yt(x)[p("width")]}function A(P,N){N=hn(N)?V():N;var Q=P!==!0&&g(N)<g(k(!1)),st=P!==!1&&g(N)>g(k(!0));return Q||st}return{mount:R,move:_,jump:y,translate:w,shift:H,cancel:F,toIndex:O,toPosition:z,getPosition:V,getLimit:k,exceededLimit:A,reposition:W}}function za(t,e,n){var r=_t(t),o=r.on,l=r.emit,i=e.Move,s=i.getPosition,d=i.getLimit,u=i.toPosition,c=e.Slides,L=c.isEnough,v=c.getLength,h=n.omitEnd,p=t.is(Ye),g=t.is(ze),$=wt(V,!1),f=wt(V,!0),x=n.start||0,b,R=x,W,_,y;function w(){E(),o([Nt,Ft,jn],E),o(Un,H)}function E(){W=v(!0),_=n.perMove,y=n.perPage,b=I();var M=Ae(x,0,h?b:W-1);M!==x&&(x=M,i.reposition())}function H(){b!==I()&&l(jn)}function F(M,J,ht){if(!ut()){var pt=z(M),gt=k(pt);gt>-1&&(J||gt!==x)&&(Q(gt),i.move(pt,gt,R,ht))}}function O(M,J,ht,pt){e.Scroll.scroll(M,J,ht,function(){var gt=k(i.toIndex(s()));Q(h?xe(gt,b):gt),pt&&pt()})}function z(M){var J=x;if(be(M)){var ht=M.match(/([+\-<>])(\d+)?/)||[],pt=ht[1],gt=ht[2];pt==="+"||pt==="-"?J=K(x+ +(""+pt+(+gt||1)),x):pt===">"?J=gt?A(+gt):$(!0):pt==="<"&&(J=f(!0))}else J=p?M:Ae(M,0,b);return J}function V(M,J){var ht=_||(rt()?1:y),pt=K(x+ht*(M?-1:1),x,!(_||rt()));return pt===-1&&g&&!ko(s(),d(!M),1)?M?0:b:J?pt:k(pt)}function K(M,J,ht){if(L()||rt()){var pt=C(M);pt!==M&&(J=M,M=pt,ht=!1),M<0||M>b?!_&&(kn(0,M,J,!0)||kn(b,J,M,!0))?M=A(P(M)):p?M=ht?M<0?-(W%y||y):W:M:n.rewind?M=M<0?b:0:M=-1:ht&&M!==J&&(M=A(P(J)+(M<J?-1:1)))}else M=-1;return M}function C(M){if(g&&n.trimSpace==="move"&&M!==x)for(var J=s();J===u(M,!0)&&kn(M,0,t.length-1,!n.rewind);)M<x?--M:++M;return M}function k(M){return p?(M+W)%W||0:M}function I(){for(var M=W-(rt()||p&&_?1:y);h&&M-- >0;)if(u(W-1,!0)!==u(M,!0)){M++;break}return Ae(M,0,W-1)}function A(M){return Ae(rt()?M:y*M,0,b)}function P(M){return rt()?xe(M,b):Dn((M>=b?W-1:M)/y)}function N(M){var J=i.toIndex(M);return g?Ae(J,0,b):J}function Q(M){M!==x&&(R=x,x=M)}function st(M){return M?R:x}function rt(){return!hn(n.focus)||n.isNavigation}function ut(){return t.state.is([Ue,gn])&&!!n.waitForTransition}return{mount:w,go:F,scroll:O,getNext:$,getPrev:f,getAdjacent:V,getEnd:I,setIndex:Q,getIndex:st,toIndex:A,toPage:P,toDest:N,hasFocus:rt,isBusy:ut}}var Da="http://www.w3.org/2000/svg",ja="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",Ln=40;function Va(t,e,n){var r=_t(t),o=r.on,l=r.bind,i=r.emit,s=n.classes,d=n.i18n,u=e.Elements,c=e.Controller,L=u.arrows,v=u.track,h=L,p=u.prev,g=u.next,$,f,x={};function b(){W(),o(Nt,R)}function R(){_(),b()}function W(){var O=n.arrows;O&&!(p&&g)&&E(),p&&g&&(sn(x,{prev:p,next:g}),ln(h,O?"":"none"),ie(h,f=Br+"--"+n.direction),O&&(y(),F(),mt([p,g],xn,v.id),i(Vo,p,g)))}function _(){r.destroy(),de(h,f),$?(Ee(L?[p,g]:h),p=g=null):ae([p,g],Hr)}function y(){o([Se,Ge,Ft,We,jn],F),l(g,"click",wt(w,">")),l(p,"click",wt(w,"<"))}function w(O){c.go(O,!0)}function E(){h=L||Oe("div",s.arrows),p=H(!0),g=H(!1),$=!0,yn(h,[p,g]),!L&&_r(h,v)}function H(O){var z='<button class="'+s.arrow+" "+(O?s.prev:s.next)+'" type="button"><svg xmlns="'+Da+'" viewBox="0 0 '+Ln+" "+Ln+'" width="'+Ln+'" height="'+Ln+'" focusable="false"><path d="'+(n.arrowPath||ja)+'" />';return Io(z)}function F(){if(p&&g){var O=t.index,z=c.getPrev(),V=c.getNext(),K=z>-1&&O<z?d.last:d.prev,C=V>-1&&O>V?d.first:d.next;p.disabled=z<0,g.disabled=V<0,mt(p,qt,K),mt(g,qt,C),i(Ko,p,g,z,V)}}return{arrows:x,mount:b,destroy:_,update:F}}var Ka=Pr+"-interval";function Ua(t,e,n){var r=_t(t),o=r.on,l=r.bind,i=r.emit,s=Yn(n.interval,t.go.bind(t,">"),y),d=s.isPaused,u=e.Elements,c=e.Elements,L=c.root,v=c.toggle,h=n.autoplay,p,g,$=h==="pause";function f(){h&&(x(),v&&mt(v,xn,u.track.id),$||b(),_())}function x(){n.pauseOnHover&&l(L,"mouseenter mouseleave",function(E){p=E.type==="mouseenter",W()}),n.pauseOnFocus&&l(L,"focusin focusout",function(E){g=E.type==="focusin",W()}),v&&l(v,"click",function(){$?b():R(!0)}),o([ge,Gn,Ft],s.rewind),o(ge,w)}function b(){d()&&e.Slides.isEnough()&&(s.start(!n.resetProgress),g=p=$=!1,_(),i(Ar))}function R(E){E===void 0&&(E=!0),$=!!E,_(),d()||(s.pause(),i(kr))}function W(){$||(p||g?R(!1):b())}function _(){v&&(ce(v,Pe,!$),mt(v,qt,n.i18n[$?"play":"pause"]))}function y(E){var H=u.bar;H&&te(H,"width",E*100+"%"),i(Yo,E)}function w(E){var H=e.Slides.getAt(E);s.set(H&&+ee(H.slide,Ka)||n.interval)}return{mount:f,destroy:s.cancel,play:b,pause:R,isPaused:d}}function Ga(t,e,n){var r=_t(t),o=r.on;function l(){n.cover&&(o(Mr,wt(s,!0)),o([Se,Nt,Ft],wt(i,!0)))}function i(d){e.Slides.forEach(function(u){var c=vn(u.container||u.slide,"img");c&&c.src&&s(d,c,u)})}function s(d,u,c){c.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),ln(u,d?"none":"")}return{mount:l,destroy:wt(i,!1)}}var Ya=10,qa=600,Xa=.6,Za=1.5,Ja=800;function Qa(t,e,n){var r=_t(t),o=r.on,l=r.emit,i=t.state.set,s=e.Move,d=s.getPosition,u=s.getLimit,c=s.exceededLimit,L=s.translate,v=t.is(ze),h,p,g=1;function $(){o(ge,R),o([Nt,Ft],W)}function f(y,w,E,H,F){var O=d();if(R(),E&&(!v||!c())){var z=e.Layout.sliderSize(),V=yr(y)*z*Dn(zt(y)/z)||0;y=s.toPosition(e.Controller.toDest(y%z))+V}var K=ko(O,y,1);g=1,w=K?0:w||zn(zt(y-O)/Za,Ja),p=H,h=Yn(w,x,wt(b,O,y,F),1),i(gn),l(Gn),h.start()}function x(){i(He),p&&p(),l(We)}function b(y,w,E,H){var F=d(),O=y+(w-y)*_(H),z=(O-F)*g;L(F+z),v&&!E&&c()&&(g*=Xa,zt(z)<Ya&&f(u(c(!0)),qa,!1,p,!0))}function R(){h&&h.cancel()}function W(){h&&!h.isPaused()&&(R(),x())}function _(y){var w=n.easingFunc;return w?w(y):1-Math.pow(1-y,4)}return{mount:$,destroy:R,scroll:f,cancel:W}}var ke={passive:!1,capture:!0};function ts(t,e,n){var r=_t(t),o=r.on,l=r.emit,i=r.bind,s=r.unbind,d=t.state,u=e.Move,c=e.Scroll,L=e.Controller,v=e.Elements.track,h=e.Media.reduce,p=e.Direction,g=p.resolve,$=p.orient,f=u.getPosition,x=u.exceededLimit,b,R,W,_,y,w=!1,E,H,F;function O(){i(v,cr,hr,ke),i(v,dr,hr,ke),i(v,ci,V,ke),i(v,"click",k,{capture:!0}),i(v,"dragstart",le),o([Se,Nt],z)}function z(){var B=n.drag;at(!B),_=B==="free"}function V(B){if(E=!1,!H){var T=gt(B);pt(B.target)&&(T||!B.button)&&(L.isBusy()?le(B,!0):(F=T?v:window,y=d.is([Ue,gn]),W=null,i(F,cr,K,ke),i(F,dr,C,ke),u.cancel(),c.cancel(),I(B)))}}function K(B){if(d.is(In)||(d.set(In),l(zo)),B.cancelable)if(y){u.translate(b+ht(rt(B)));var T=ut(B)>so,U=w!==(w=x());(T||U)&&I(B),E=!0,l(Do),le(B)}else N(B)&&(y=P(B),le(B))}function C(B){d.is(In)&&(d.set(He),l(jo)),y&&(A(B),le(B)),s(F,cr,K),s(F,dr,C),y=!1}function k(B){!H&&E&&le(B,!0)}function I(B){W=R,R=B,b=f()}function A(B){var T=Q(B),U=st(T),q=n.rewind&&n.rewindByDrag;h(!1),_?L.scroll(U,0,n.snap):t.is(Cn)?L.go($(yr(T))<0?q?"<":"-":q?">":"+"):t.is(ze)&&w&&q?L.go(x(!0)?">":"<"):L.go(L.toDest(U),!0),h(!0)}function P(B){var T=n.dragMinThreshold,U=rn(T),q=U&&T.mouse||0,Z=(U?T.touch:+T)||10;return zt(rt(B))>(gt(B)?Z:q)}function N(B){return zt(rt(B))>zt(rt(B,!0))}function Q(B){if(t.is(Ye)||!w){var T=ut(B);if(T&&T<so)return rt(B)/T}return 0}function st(B){return f()+yr(B)*xe(zt(B)*(n.flickPower||600),_?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function rt(B,T){return J(B,T)-J(M(B),T)}function ut(B){return fr(B)-fr(M(B))}function M(B){return R===B&&W||R}function J(B,T){return(gt(B)?B.changedTouches[0]:B)["page"+g(T?"Y":"X")]}function ht(B){return B/(w&&t.is(ze)?Ia:1)}function pt(B){var T=n.noDrag;return!on(B,"."+oi+", ."+tr)&&(!T||!on(B,T))}function gt(B){return typeof TouchEvent<"u"&&B instanceof TouchEvent}function D(){return y}function at(B){H=B}return{mount:O,disable:at,isDragging:D}}var es={Spacebar:" ",Right:Zn,Left:Xn,Up:Zo,Down:Jo};function zr(t){return t=be(t)?t:t.key,es[t]||t}var lo="keydown";function ns(t,e,n){var r=_t(t),o=r.on,l=r.bind,i=r.unbind,s=t.root,d=e.Direction.resolve,u,c;function L(){v(),o(Nt,h),o(Nt,v),o(ge,g)}function v(){var f=n.keyboard;f&&(u=f==="global"?window:s,l(u,lo,$))}function h(){i(u,lo)}function p(f){c=f}function g(){var f=c;c=!0,Eo(function(){c=f})}function $(f){if(!c){var x=zr(f);x===d(Xn)?t.go("<"):x===d(Zn)&&t.go(">")}}return{mount:L,destroy:h,disable:p}}var nn=Pr+"-lazy",Mn=nn+"-srcset",rs="["+nn+"], ["+Mn+"]";function os(t,e,n){var r=_t(t),o=r.on,l=r.off,i=r.bind,s=r.emit,d=n.lazyLoad==="sequential",u=[Ge,We],c=[];function L(){n.lazyLoad&&(v(),o(Ft,v))}function v(){me(c),h(),d?f():(l(u),o(u,p),p())}function h(){e.Slides.forEach(function(x){Er(x.slide,rs).forEach(function(b){var R=ee(b,nn),W=ee(b,Mn);if(R!==b.src||W!==b.srcset){var _=n.classes.spinner,y=b.parentElement,w=vn(y,"."+_)||Oe("span",_,y);c.push([b,x,w]),b.src||ln(b,"none")}})})}function p(){c=c.filter(function(x){var b=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(t.index,b)?g(x):!0}),c.length||l(u)}function g(x){var b=x[0];ie(x[1].slide,Cr),i(b,"load error",wt($,x)),mt(b,"src",ee(b,nn)),mt(b,"srcset",ee(b,Mn)),ae(b,nn),ae(b,Mn)}function $(x,b){var R=x[0],W=x[1];de(W.slide,Cr),b.type!=="error"&&(Ee(x[2]),ln(R,""),s(Mr,R,W),s(Be)),d&&f()}function f(){c.length&&g(c.shift())}return{mount:L,destroy:wt(me,c),check:p}}function is(t,e,n){var r=_t(t),o=r.on,l=r.emit,i=r.bind,s=e.Slides,d=e.Elements,u=e.Controller,c=u.hasFocus,L=u.getIndex,v=u.go,h=e.Direction.resolve,p=d.pagination,g=[],$,f;function x(){b(),o([Nt,Ft,jn],x);var H=n.pagination;p&&ln(p,H?"":"none"),H&&(o([ge,Gn,We],E),R(),E(),l(Uo,{list:$,items:g},w(t.index)))}function b(){$&&(Ee(p?Ce($.children):$),de($,f),me(g),$=null),r.destroy()}function R(){var H=t.length,F=n.classes,O=n.i18n,z=n.perPage,V=c()?u.getEnd()+1:cn(H/z);$=p||Oe("ul",F.pagination,d.track.parentElement),ie($,f=er+"--"+y()),mt($,ue,"tablist"),mt($,qt,O.select),mt($,Nr,y()===Jn?"vertical":"");for(var K=0;K<V;K++){var C=Oe("li",null,$),k=Oe("button",{class:F.page,type:"button"},C),I=s.getIn(K).map(function(P){return P.slide.id}),A=!c()&&z>1?O.pageX:O.slideX;i(k,"click",wt(W,K)),n.paginationKeyboard&&i(k,"keydown",wt(_,K)),mt(C,ue,"presentation"),mt(k,ue,"tab"),mt(k,xn,I.join(" ")),mt(k,qt,vr(A,K+1)),mt(k,Ne,-1),g.push({li:C,button:k,page:K})}}function W(H){v(">"+H,!0)}function _(H,F){var O=g.length,z=zr(F),V=y(),K=-1;z===h(Zn,!1,V)?K=++H%O:z===h(Xn,!1,V)?K=(--H+O)%O:z==="Home"?K=0:z==="End"&&(K=O-1);var C=g[K];C&&(Ro(C.button),v(">"+K),le(F,!0))}function y(){return n.paginationDirection||n.direction}function w(H){return g[u.toPage(H)]}function E(){var H=w(L(!0)),F=w(L());if(H){var O=H.button;de(O,Pe),ae(O,no),mt(O,Ne,-1)}if(F){var z=F.button;ie(z,Pe),mt(z,no,!0),mt(z,Ne,"")}l(Go,{list:$,items:g},H,F)}return{items:g,mount:x,destroy:b,getAt:w,update:E}}var as=[" ","Enter"];function ss(t,e,n){var r=n.isNavigation,o=n.slideFocus,l=[];function i(){t.splides.forEach(function(p){p.isParent||(u(t,p.splide),u(p.splide,t))}),r&&c()}function s(){l.forEach(function(p){p.destroy()}),me(l)}function d(){s(),i()}function u(p,g){var $=_t(p);$.on(ge,function(f,x,b){g.go(g.is(Ye)?b:f)}),l.push($)}function c(){var p=_t(t),g=p.on;g(Fr,v),g(qo,h),g([Se,Nt],L),l.push(p),p.emit(Ir,t.splides)}function L(){mt(e.Elements.list,Nr,n.direction===Jn?"vertical":"")}function v(p){t.go(p.index)}function h(p,g){Lr(as,zr(g))&&(v(p),le(g))}return{setup:wt(e.Media.set,{slideFocus:hn(o)?r:o},!0),mount:i,destroy:s,remount:d}}function ls(t,e,n){var r=_t(t),o=r.bind,l=0;function i(){n.wheel&&o(e.Elements.track,"wheel",s,ke)}function s(u){if(u.cancelable){var c=u.deltaY,L=c<0,v=fr(u),h=n.wheelMinThreshold||0,p=n.wheelSleep||0;zt(c)>h&&v-l>p&&(t.go(L?"<":">"),l=v),d(L)&&le(u)}}function d(u){return!n.releaseWheel||t.state.is(Ue)||e.Controller.getAdjacent(u)!==-1}return{mount:i}}var cs=90;function ds(t,e,n){var r=_t(t),o=r.on,l=e.Elements.track,i=n.live&&!n.isNavigation,s=Oe("span",Ea),d=Yn(cs,wt(c,!1));function u(){i&&(v(!e.Autoplay.isPaused()),mt(l,io,!0),s.textContent="…",o(Ar,wt(v,!0)),o(kr,wt(v,!1)),o([Ge,We],wt(c,!0)))}function c(h){mt(l,oo,h),h?(yn(l,s),d.start()):(Ee(s),d.cancel())}function L(){ae(l,[ro,io,oo]),Ee(s)}function v(h){i&&mt(l,ro,h?"off":"polite")}return{mount:u,disable:v,destroy:L}}var us=Object.freeze({__proto__:null,Media:ba,Direction:xa,Elements:Aa,Slides:Ma,Layout:Oa,Clones:Ha,Move:Ba,Controller:za,Arrows:Va,Autoplay:Ua,Cover:Ga,Scroll:Qa,Drag:ts,Keyboard:ns,LazyLoad:os,Pagination:is,Sync:ss,Wheel:ls,Live:ds}),ps={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"},ms={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:Fa,i18n:ps,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function gs(t,e,n){var r=e.Slides;function o(){_t(t).on([Se,Ft],l)}function l(){r.forEach(function(s){s.style("transform","translateX(-"+100*s.index+"%)")})}function i(s,d){r.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(d)}return{mount:o,start:i,cancel:hr}}function hs(t,e,n){var r=e.Move,o=e.Controller,l=e.Scroll,i=e.Elements.list,s=wt(te,i,"transition"),d;function u(){_t(t).bind(i,"transitionend",function(h){h.target===i&&d&&(L(),d())})}function c(h,p){var g=r.toPosition(h,!0),$=r.getPosition(),f=v(h);zt(g-$)>=1&&f>=1?n.useScroll?l.scroll(g,f,!1,p):(s("transform "+f+"ms "+n.easing),r.translate(g,!0),d=p):(r.jump(h),p())}function L(){s(""),l.cancel()}function v(h){var p=n.rewindSpeed;if(t.is(ze)&&p){var g=o.getIndex(!0),$=o.getEnd();if(g===0&&h>=$||g>=$&&h===0)return p}return n.speed}return{mount:u,start:c,cancel:L}}var fs=(function(){function t(n,r){this.event=_t(),this.Components={},this.state=ya(Me),this.splides=[],this._o={},this._E={};var o=be(n)?Ao(document,n):n;en(o,o+" is invalid."),this.root=o,r=ye({label:ee(o,qt)||"",labelledby:ee(o,Or)||""},ms,t.defaults,r||{});try{ye(r,JSON.parse(ee(o,Pr)))}catch{en(!1,"Invalid JSON")}this._o=Object.create(ye({},r))}var e=t.prototype;return e.mount=function(r,o){var l=this,i=this.state,s=this.Components;en(i.is([Me,Bn]),"Already mounted!"),i.set(Me),this._C=s,this._T=o||this._T||(this.is(Cn)?gs:hs),this._E=r||this._E;var d=sn({},us,this._E,{Transition:this._T});return _e(d,function(u,c){var L=u(l,s,l._o);s[c]=L,L.setup&&L.setup()}),_e(s,function(u){u.mount&&u.mount()}),this.emit(Se),ie(this.root,Pa),i.set(He),this.emit(br),this},e.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(He)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},e.go=function(r){return this._C.Controller.go(r),this},e.on=function(r,o){return this.event.on(r,o),this},e.off=function(r){return this.event.off(r),this},e.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(Ce(arguments,1))),this},e.add=function(r,o){return this._C.Slides.add(r,o),this},e.remove=function(r){return this._C.Slides.remove(r),this},e.is=function(r){return this._o.type===r},e.refresh=function(){return this.emit(Ft),this},e.destroy=function(r){r===void 0&&(r=!0);var o=this.event,l=this.state;return l.is(Me)?_t(this).on(br,this.destroy.bind(this,r)):(_e(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(Rr),o.destroy(),r&&me(this.splides),l.set(Bn)),this},pa(t,[{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()}}]),t})(),Dr=fs;Dr.defaults={};Dr.STATES=ga;var co=[[Se,"onMounted"],[br,"onReady"],[ge,"onMove"],[Ge,"onMoved"],[Fr,"onClick"],[Oo,"onActive"],[No,"onInactive"],[Ho,"onVisible"],[Bo,"onHidden"],[Ft,"onRefresh"],[Nt,"onUpdated"],[Be,"onResize"],[Un,"onResized"],[zo,"onDrag"],[Do,"onDragging"],[jo,"onDragged"],[Gn,"onScroll"],[We,"onScrolled"],[Rr,"onDestroy"],[Vo,"onArrowsMounted"],[Ko,"onArrowsUpdated"],[Uo,"onPaginationMounted"],[Go,"onPaginationUpdated"],[Ir,"onNavigationMounted"],[Ar,"onAutoplayPlay"],[Yo,"onAutoplayPlaying"],[kr,"onAutoplayPause"],[Mr,"onLazyLoadLoaded"]];function jr(...t){return t.filter(Boolean).join(" ")}function Vn(t){return t!==null&&typeof t=="object"}function Sr(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,r)=>!Sr(n,e[r]));if(Vn(t)&&Vn(e)){const n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(e,o)||!Sr(t[o],e[o]))}return t===e}function ys(t,e){return t.length===e.length&&!t.some((n,r)=>n!==e[r])}function vs(t,e){if(t){const n=Object.keys(t);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function $r(t,e){const n=t;return vs(e,(r,o)=>{Array.isArray(r)?n[o]=r.slice():Vn(r)?n[o]=$r(Vn(n[o])?n[o]:{},r):n[o]=r}),n}var bs=({children:t,className:e,...n})=>m.createElement("div",{className:jr("splide__track",e),...n},m.createElement("ul",{className:"splide__list"},t)),Vr=class extends m.Component{constructor(){super(...arguments),this.splideRef=m.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Dr(r,t),this.bind(this.splide),this.splide.mount(e,n),this.options=$r({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!Sr(this.options,t)&&(this.splide.options=t,this.options=$r({},t));const e=this.getSlides();ys(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){co.forEach(([e,n])=>{const r=this.props[n];typeof r=="function"&&t.on(e,(...o)=>{r(t,...o)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:r,...o}=this.props;return m.createElement(e,{className:jr("splide",t),ref:this.splideRef,...this.omit(o,["options",...co.map(l=>l[1])])},n?m.createElement(bs,null,r):r)}},Kr=({children:t,className:e,...n})=>m.createElement("li",{className:jr("splide__slide",e),...n},t);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const Sl="RichTextRenderer-module__link___BWeZ2",$l={link:Sl},wl=t=>{const e=t.trim();return!e||e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?!1:e.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},nr=t=>t&&t.split(",").map(n=>n.trim()).filter(Boolean).map(n=>wl(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ue(t){const{color:e,...n}=t;return n}function Nt(t,e){var n,r,o;return{fontFamily:nr(t.fontSettings.fontFamily),fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:S.scalingValue(t.letterSpacing,e),wordSpacing:S.scalingValue(t.wordSpacing,e),fontSize:S.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?S.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(r=t.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=t.textAppearance)==null?void 0:o.fontVariant,color:t.color}}const sn=({content:t})=>{const e=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:$l.link,href:r.value,target:r.target,children:e(r.children)},o):a.jsx("span",{style:Tl(r),children:r.text},o));return a.jsx(a.Fragment,{children:t.map((n,r)=>{const o=n.children;return a.jsx("div",{children:e(o)},r)})})};function Tl(t){return{...t.fontFamily&&{fontFamily:nr(t.fontFamily)},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const Ll="SvgImage-module__svg___q3xE-",Pl="SvgImage-module__img___VsTm-",mo={svg:Ll,img:Pl},Wl=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},_l=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ye=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=h.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return h.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Wl(t)||!l?a.jsx("img",{src:t,alt:"",className:bt(mo.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:bt(mo.svg,r),style:{"--svg":_l(t),"--fill":e,"--hover-fill":n,...o??{}}})},El={"top-left":et.topLeftAlignment,"top-center":et.topCenterAlignment,"top-right":et.topRightAlignment,"middle-left":et.middleLeftAlignment,"middle-center":et.middleCenterAlignment,"middle-right":et.middleRightAlignment,"bottom-left":et.bottomLeftAlignment,"bottom-center":et.bottomCenterAlignment,"bottom-right":et.bottomRightAlignment};function Al({settings:t,content:e,styles:n,isEditor:r}){const[o,l]=h.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:u,wordSpacing:d,fontSizeLineHeight:T,textAppearance:x,color:y}=n.imageCaption,[p,f]=h.useState(void 0),[m,g]=h.useState(null),[v,L]=h.useState(0),[D,A]=h.useState(0),{direction:P,transition:b,controls:$,pagination:E,imageCaption:N,triggers:W}=t,B=h.useRef(b.type),{x:H,y:j}=t.controls.offset,z=C=>{o&&o.go(C)};return h.useEffect(()=>{if(!m)return;const C=new ResizeObserver(k=>{if(!o)return;const[R]=k;f({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return C.observe(m),()=>C.unobserve(m)},[m]),h.useEffect(()=>{!o||B.current===b.type||(A(C=>C+1),B.current=b.type)},[b.type]),a.jsx("div",{className:bt(et.wrapper,{[et.editor]:r}),ref:g,children:a.jsxs("div",{className:et.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&a.jsx("div",{className:bt(et.captionBlock),children:a.jsx("div",{className:et.captionTextWrapper,children:e.map((C,k)=>a.jsx("div",{className:bt(et.captionText,El[N.alignment],{[et.withPointerEvents]:k===v&&r,[et.active]:k===v}),style:{fontFamily:nr(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":S.scalingValue(i.width,r),letterSpacing:S.scalingValue(s,r),wordSpacing:S.scalingValue(d,r),textAlign:u,fontSize:S.scalingValue(T.fontSize,r),lineHeight:S.scalingValue(T.lineHeight,r),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:y,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:et.captionTextInner,style:{"--link-hover-color":N.linkHoverColor,"--link-color":N.linkColor,position:"relative",top:S.scalingValue(N.offset.y,r),left:S.scalingValue(N.offset.x,r)},children:a.jsx(sn,{content:C.imageCaption})})},k))})}),a.jsx(Vr,{onMove:C=>{L(C.index)},ref:l,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:P==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((C,k)=>a.jsx(Kr,{children:a.jsx("div",{className:et.sliderItem,children:a.jsx("div",{className:et.imgWrapper,children:a.jsx("img",{className:bt(et.sliderImage,{[et.contain]:C.image.objectFit==="contain",[et.cover]:C.image.objectFit==="cover"}),src:C.image.url,alt:C.image.name??""})})})},k))},D),$.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bt(et.arrow,{[et.arrowVertical]:P==="vert",[et.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{onClick:()=>{z("-1")},className:et.arrowInner,style:{transform:`translate(${S.scalingValue(H,r)}, ${S.scalingValue(j*(P==="horiz"?1:-1),r)}) scale(${t.controls.scale/100}) rotate(${P==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(ye,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:bt(et.arrowImg,et.mirror)}),!$.arrowsImgUrl&&a.jsx(go,{color:$.color,className:bt(et.arrowIcon,et.arrowImg,et.mirror)})]})}),a.jsx("div",{className:bt(et.arrow,et.nextArrow,{[et.arrowVertical]:P==="vert",[et.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{className:et.arrowInner,onClick:()=>z("+1"),style:{transform:`translate(${S.scalingValue(H*(P==="horiz"?-1:1),r)}, ${S.scalingValue(j,r)}) scale(${t.controls.scale/100}) rotate(${P==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(ye,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:et.arrowImg}),!$.arrowsImgUrl&&a.jsx(go,{color:$.color,className:bt(et.arrowIcon,et.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:et.clickOverlay,onClick:()=>{o&&o.go("+1")}}),E.isActive&&a.jsx("div",{className:bt(et.pagination,{[et.paginationInsideBottom]:E.position==="inside-1"&&P==="horiz",[et.paginationInsideTop]:E.position==="inside-2"&&P==="horiz",[et.paginationOutsideBottom]:E.position==="outside-1"&&P==="horiz",[et.paginationOutsideTop]:E.position==="outside-2"&&P==="horiz",[et.paginationInsideLeft]:E.position==="inside-1"&&P==="vert",[et.paginationInsideRight]:E.position==="inside-2"&&P==="vert",[et.paginationOutsideLeft]:E.position==="outside-1"&&P==="vert",[et.paginationOutsideRight]:E.position==="outside-2"&&P==="vert",[et.paginationVertical]:P==="vert"}),children:a.jsx("div",{className:et.paginationInner,style:{backgroundColor:E.colors[2],transform:`scale(${E.scale/100}) translate(${S.scalingValue(E.offset.x,r)}, ${S.scalingValue(E.offset.y,r)}) rotate(${P==="horiz"?"0deg":"90deg"})`},children:e.map((C,k)=>a.jsx("button",{onClick:()=>{o&&o.go(k)},className:bt(et.paginationItem),children:a.jsx("div",{className:bt(et.dot,{[et.activeDot]:k===v}),style:{backgroundColor:k===v?E.colors[0]:E.colors[1],"--pagination-hover-color":E.hover}})},k))})})]})})}function go({color:t,className:e}){return a.jsx("svg",{viewBox:"0 0 10 18",className:e,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Il={element:Al,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Rl="ImageRevealSlider-module__imageRevealSlider___UE5Ob",kl="ImageRevealSlider-module__image___Qjt-e",Fl="ImageRevealSlider-module__link___N-iLG",Ml="ImageRevealSlider-module__cursor___2U03d",ke={imageRevealSlider:Rl,image:kl,link:Fl,cursor:Ml};function ho(t,e,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,c=l/2,s=i/2;if(t>=r.x-c&&t<=r.x+c&&e>=r.y-s&&e<=r.y+s)return!0}return!1}function mr(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function Bl(t,e,n,r){let o,l;if(e==="custom"){o=n;const i=await mr(t);l=i.height/i.width*o}else if(e==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await mr(t);l=i.height/i.width*o}else{const i=await mr(t);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Hl({settings:t,content:e,isEditor:n}){const[r,o]=h.useState(null),[l,i]=h.useState([]),[c,s]=h.useState(0),u=h.useRef(0),[d,T]=h.useState({x:0,y:0}),[x,y]=h.useState(1),[p,f]=h.useState("none"),m=h.useRef({x:0,y:0}),[g,v]=h.useState(!1),{sizeType:L,imageWidth:D,randomRangeImageWidth:A}=t.imageSize,{revealPosition:P,visible:b}=t.position,{cursorType:$,target:E,defaultCursorScale:N,defaultCursor:W,hoverCursorScale:B,hoverCursor:H}=t.cursor;h.useEffect(()=>{if(!r)return;const C=(I,_)=>{const M=r.getBoundingClientRect(),Z=I-M.left,it=_-M.top;if(T({x:Z,y:it}),$==="system"){f("none"),y(1);return}const nt=Z,ut=it,F=document.elementFromPoint(M.left+nt,M.top+ut);if(F&&F.closest("a")){f("none"),y(1);return}const J=ho(nt,ut,l)||E==="area"?{img:H??"none",scale:B}:{img:W??"none",scale:N};f(J.img),y(J.scale)},k=I=>{I.stopPropagation(),m.current={x:I.clientX,y:I.clientY},C(I.clientX,I.clientY)},R=()=>{g&&C(m.current.x,m.current.y)};return r.addEventListener("mousemove",k),window.addEventListener("scroll",R,!0),()=>{r.removeEventListener("mousemove",k),window.removeEventListener("scroll",R,!0)}},[r,g,d,$,E,H,W,B,N,l]),h.useEffect(()=>{g||(f("none"),y(0))},[g]);const j=async(C,k,R,I={})=>{const{width:_,height:M,finalWidth:Z}=await Bl(C.image.url,L,D,A);let it=0,nt=0;P==="same"?(it=k/2,nt=R/2):(it=I.x??Math.random()*k,nt=I.y??Math.random()*R);const ut=Math.min(Math.max(it,_/2),k-_/2),F=Math.min(Math.max(nt,M/2),R-M/2);return{id:u.current++,url:C.image.url,link:C.link,name:C.image.name,x:ut,y:F,width:Z}};h.useEffect(()=>{if(!r||e.length===0)return;const C=r.getBoundingClientRect(),k=C.width,R=C.height,I=[];(async()=>{const M=e[0],Z=await j(M,k,R);I.push(Z),i(I),s(1)})()},[L,D,A,P,r]),h.useEffect(()=>{b==="last One"&&i(C=>C.length>0?[C[C.length-1]]:[])},[b]);const z=async C=>{if(!r)return;const k=r.getBoundingClientRect(),R=C.clientX-k.left,I=C.clientY-k.top;if(E==="image"&&!ho(R,I,l))return;let _=0,M=0;P==="on Click"?(_=R,M=I):P==="same"?(_=k.width/2,M=k.height/2):(_=Math.random()*k.width,M=Math.random()*k.height);const Z=e[c],it=await j(Z,k.width,k.height,{x:_,y:M});i(nt=>b==="all"?[...nt,it]:[it]),s(nt=>nt>=e.length-1?0:nt+1)};return a.jsxs("div",{ref:o,onClick:z,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:ke.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[l.map(C=>a.jsx("div",{className:ke.wrapper,style:{top:`${C.y}px`,left:`${C.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:C.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:E==="area"&&C.link?a.jsx("a",{href:C.link,target:"_blank",className:ke.link,children:a.jsx("img",{src:C.url,alt:C.name,className:ke.image},C.id)}):a.jsx("img",{src:C.url,alt:C.name,className:ke.image},C.id)},C.id)),g&&a.jsx("div",{className:ke.cursor,style:{left:`${d.x}px`,top:`${d.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ol={element:Hl,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Nl="LightBox-module__hidden___9s-9x",Dl="LightBox-module__heroImage___sTxNF",jl="LightBox-module__background___rm9ml",zl="LightBox-module__editor___4ACaY",Vl="LightBox-module__contentStyle___Bgnsq",Kl="LightBox-module__imageStyle___tLIlB",Ul="LightBox-module__imgWrapper___LuFUp",Gl="LightBox-module__contain___8-yaS",Yl="LightBox-module__cover___hNvOG",ql="LightBox-module__caption___b6L2I",Xl="LightBox-module__captionTextInner___rCGNH",Zl="LightBox-module__lightboxSplide___XFuWC",Jl="LightBox-module__arrow___iz38X",Ql="LightBox-module__arrowVertical___Zfz81",ts="LightBox-module__nextArrow___zkAQN",es="LightBox-module__arrowInner___p48sW",ns="LightBox-module__arrowIcon___3VaFf",rs="LightBox-module__arrowImg___pNV88",os="LightBox-module__mirror___pjeXc",is="LightBox-module__thumbsWrapper___GB-nU",as="LightBox-module__thumbsContainerVertical___wttk5",ls="LightBox-module__thumbsContainer___osSma",ss="LightBox-module__thumbsAlignStart___MO6tY",cs="LightBox-module__thumbsAlignCenter___Q4sUx",ds="LightBox-module__thumbsAlignEnd___p4y9R",us="LightBox-module__thumbItem___HvnF3",ps="LightBox-module__closeButton___g2khP",ms="LightBox-module__fadeIn___0m5GW",gs="LightBox-module__slideInLeft___gPYwC",hs="LightBox-module__slideInRight___S-pPp",fs="LightBox-module__slideInTop___DFdAj",ys="LightBox-module__slideInBottom___m27kZ",vs="LightBox-module__fadeOut___55qBR",bs="LightBox-module__slideOutLeft___NvU7P",xs="LightBox-module__slideOutRight___SK7eC",Cs="LightBox-module__slideOutTop___Vgg0z",Ss="LightBox-module__slideOutBottom___nJ0Ef",$s="LightBox-module__scaleSlide___vZriG",U={hidden:Nl,heroImage:Dl,background:jl,editor:zl,contentStyle:Vl,imageStyle:Kl,imgWrapper:Ul,contain:Gl,cover:Yl,caption:ql,captionTextInner:Xl,lightboxSplide:Zl,arrow:Jl,arrowVertical:Ql,nextArrow:ts,arrowInner:es,arrowIcon:ns,arrowImg:rs,mirror:os,thumbsWrapper:is,thumbsContainerVertical:as,thumbsContainer:ls,thumbsAlignStart:ss,thumbsAlignCenter:cs,thumbsAlignEnd:ds,thumbItem:us,closeButton:ps,fadeIn:ms,slideInLeft:gs,slideInRight:hs,slideInTop:fs,slideInBottom:ys,fadeOut:vs,slideOutLeft:bs,slideOutRight:xs,slideOutTop:Cs,slideOutBottom:Ss,scaleSlide:$s},Ln=(t,e,n)=>{const r={},[o,l]=t.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"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(e.x,n)}), calc(-50% + ${S.scalingValue(e.y,n)}))`:o==="middle"?r.transform=`translate(${S.scalingValue(e.x,n)}, calc(-50% + ${S.scalingValue(e.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(e.x,n)}), ${S.scalingValue(e.y,n)})`:r.transform=`translate(${S.scalingValue(e.x,n)}, ${S.scalingValue(e.y,n)})`,r};function ci(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function fo(t){const e=t.getBoundingClientRect(),n=ci(t),r=Math.max(0,e.width-n.left-n.right),o=Math.max(0,e.height-n.top-n.bottom),l=t.naturalWidth,i=t.naturalHeight,c=r/o,s=l/i;let u,d;s>c?(u=r,d=r/s):(d=o,u=o*s);const T=e.left+n.left,x=e.top+n.top,y=(r-u)/2+T,p=(o-d)/2+x;return{x:y,y:p,width:u,height:d}}function yo(t){const e=t.getBoundingClientRect(),n=ci(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function vo(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const r=e[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function ws(t,e){const n=(()=>{if(t==="fade in")return U.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return U.fadeIn;if(t==="slide in")switch(e){case"left":return U.slideInLeft;case"right":return U.slideInRight;case"top":return U.slideInTop;case"bottom":return U.slideInBottom;default:return U.slideInRight}return U.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return U.fadeOut;if(t==="slide in")switch(e){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})(),l=(()=>{if(t==="fade in")return U.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return U.slideOutLeft;case"right":return U.slideOutRight;case"top":return U.slideOutTop;case"bottom":return U.slideOutBottom;default:return U.slideOutRight}return U.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const Ts=({settings:t,content:e,styles:n,portalId:r,activeEvent:o,isEditor:l})=>{const[i,c]=h.useState(!1),{url:s}=t.thumbnailBlock.cover;return h.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:s,alt:"Cover",className:U.heroImage,onClick:()=>c(!0)}),a.jsx(Ls,{isOpen:i,onClose:()=>c(!1),content:e,settings:t,lightboxStyles:n,portalId:r,isEditor:l})]})},Ls=({isOpen:t,onClose:e,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:c})=>{var O;const[s,u]=h.useState(0),[d,T]=h.useState(0),[x,y]=h.useState(!1),[p,f]=h.useState(!1),[m,g]=h.useState({}),v=h.useRef(null),L=h.useRef(null),D=h.useRef(null),A=h.useRef(!1),P=h.useRef(null),b=h.useRef(null),$=h.useRef(null),E=h.useRef(null),N=h.useRef(!1),W=h.useRef(null),[B,H]=h.useState(!1),{appear:j,triggers:z,slider:C,thumbnail:k,controls:R,area:I,caption:_,layout:M}=o.lightboxBlock,{appearClass:Z,backdropAppearClass:it,backdropDisappearClass:nt,disappearClass:ut}=ws(j.type,j.direction),F=(c==null?void 0:c.itemId)??null;h.useEffect(()=>{const w=()=>{setTimeout(()=>{var q,Q;(Q=(q=v.current)==null?void 0:q.splide)==null||Q.refresh()},16)},K=()=>{T(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",w),window.addEventListener("ArticleEditor.ComponentContent:change",K),()=>{window.removeEventListener("ArticleEditor.Layout:change",w),window.removeEventListener("ArticleEditor.ComponentContent:change",K)}},[]),h.useEffect(()=>{if(!t||!k.isActive){H(!1);return}const w=W.current;if(!w)return;const K=()=>{C.direction==="horiz"?H(w.scrollWidth>w.clientWidth):H(w.scrollHeight>w.clientHeight)};K();const q=new ResizeObserver(K);return q.observe(w),()=>q.disconnect()},[t,k.isActive,n.length,m,C.direction]);const J=h.useCallback(()=>{const w=window.matchMedia("(max-width: 768px)").matches,K=vo(I.color);w&&!i&&K>.9&&(document.body.style.backgroundColor=""),y(!0),A.current=!0;const q=Q=>{Q.target===P.current&&Q.animationName&&(P.current&&b.current&&P.current.removeEventListener("animationend",b.current),b.current=null,A.current&&(A.current=!1,e()),y(!1))};P.current&&(b.current=q,P.current.addEventListener("animationend",q))},[e,I.color,i]),ht=(w,K,q)=>{var Q,at;if(w){if(z.type==="click"&&z.switch==="image")z.repeat==="close"&&s===n.length-1?J():(Q=v.current)==null||Q.go("+1");else if(z.type==="click"&&z.switch==="50/50"){const ot=w.getBoundingClientRect(),rt=K-ot.left,dt=q-ot.top,V=ot.width,X=ot.height;let Y;C.direction==="horiz"?Y=rt<V/2?"-1":"+1":Y=dt<X/2?"-1":"+1",(at=v.current)==null||at.go(Y)}}},mt=w=>{if(N.current){N.current=!1;return}const K=n[s],q=(K==null?void 0:K.image.objectFit)==="cover";let Q,at;if("changedTouches"in w&&w.changedTouches.length>0)Q=w.changedTouches[0].clientX,at=w.changedTouches[0].clientY;else if("clientX"in w)Q=w.clientX,at=w.clientY;else return;let ot;if(q&&D.current){const rt=yo(D.current);ot=Q>=rt.left&&Q<=rt.right&&at>=rt.top&&at<=rt.bottom}else{const rt=D.current?fo(D.current):null;if(!rt){w.target===w.currentTarget&&J();return}ot=Q>=rt.x&&Q<=rt.x+rt.width&&at>=rt.y&&at<=rt.y+rt.height}ot?ht(D.current,Q,at):J()},gt=w=>{const K=w.target;(K.classList.contains(U.thumbsWrapper)||K.classList.contains(U.thumbsContainer))&&mt(w)};h.useEffect(()=>{if(!t)return;const w=K=>{var q,Q;if(K.key==="Escape"){J();return}if(K.key==="ArrowRight"){u(at=>(at+1)%Math.max(n.length,1)),(q=v.current)==null||q.go("+1");return}K.key==="ArrowLeft"&&(u(at=>(at-1+Math.max(n.length,1))%Math.max(n.length,1)),(Q=v.current)==null||Q.go("-1"))};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[t,J,n.length]),h.useEffect(()=>{if(t){if(u(0),T(K=>K+1),A.current=!1,y(!1),f(!1),g({}),!F)return;const w=new CustomEvent("page-overlay",{detail:{itemId:F}});window.dispatchEvent(w)}return()=>{P.current&&b.current&&(P.current.removeEventListener("animationend",b.current),b.current=null),f(!1)}},[t,F]),h.useEffect(()=>{L.current!==null&&L.current!==C.type&&T(w=>w+1),L.current=C.type},[C.type]),h.useEffect(()=>{if(!t)return;const w=document.body.style.overflow,K=window.matchMedia("(max-width: 768px)").matches,q=vo(I.color);document.body.style.overflow="hidden",f(!1);const Q=ot=>{ot.target===P.current&&!A.current&&ot.animationName&&(K&&!i&&q>.9&&(document.body.style.backgroundColor=I.color),f(!0),P.current&&$.current&&P.current.removeEventListener("animationend",$.current),$.current=null)};P.current&&($.current=Q,P.current.addEventListener("animationend",Q));const at=ot=>{const rt=ot.target;rt&&(rt.closest(`.${U.thumbsWrapper}`)||rt.closest(`.${U.thumbsContainer}`))||C.type!=="slide"&&ot.preventDefault()};return document.addEventListener("touchmove",at,{passive:!1}),()=>{document.body.style.overflow=w,document.removeEventListener("touchmove",at),P.current&&$.current&&(P.current.removeEventListener("animationend",$.current),$.current=null),f(!1)}},[t,i,I.color,C.type]),h.useEffect(()=>{if(!t)return;const w=K=>{var Q,at;if(A.current){K.stopPropagation();return}if(N.current){N.current=!1;return}const q=K.target;if(!(q&&(q.closest(`.${U.thumbsContainer}`)||q.closest(`.${U.thumbItem}`)||q.closest(`.${U.arrow}`)||q.closest(`.${U.closeButton}`)||q.closest(`.${U.caption}`)))){if(C.type==="slide"&&z.type==="drag"&&((at=(Q=v.current)==null?void 0:Q.splide)!=null&&at.root)){const ot=v.current.splide.root;if(q&&(ot.contains(q)||ot===q))return}if(K.touches.length===0&&K.changedTouches.length>0){const ot=n[s],rt=(ot==null?void 0:ot.image.objectFit)==="cover",dt=K.changedTouches[0];let V;if(rt&&D.current){const X=yo(D.current);V=dt.clientX>=X.left&&dt.clientX<=X.right&&dt.clientY>=X.top&&dt.clientY<=X.bottom}else{const X=D.current?fo(D.current):null;if(!X)return;V=dt.clientX>=X.x&&dt.clientX<=X.x+X.width&&dt.clientY>=X.y&&dt.clientY<=X.y+X.height}if(!V){K.stopPropagation(),A.current=!0;const X=Y=>{Y.stopPropagation(),Y.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),J()}}}};return document.addEventListener("touchend",w,{passive:!0}),()=>{document.removeEventListener("touchend",w)}},[t,J,s,n]);const G=(C.type==="scale"||C.type==="fade")&&C.direction==="vert"&&z.type==="drag";h.useEffect(()=>{var Y,ct;if(!t||!G||!((ct=(Y=v.current)==null?void 0:Y.splide)!=null&&ct.root))return;const w=v.current.splide.root,K=30,q=(tt,st)=>{if(E.current){const St=Math.abs(tt-E.current.x),wt=Math.abs(st-E.current.y);(St>0||wt>0)&&(N.current=!0)}},Q=tt=>{E.current&&(tt.preventDefault(),q(tt.clientX,tt.clientY))},at=tt=>{E.current&&tt.touches.length>0&&(tt.preventDefault(),q(tt.touches[0].clientX,tt.touches[0].clientY))},ot=(tt,st)=>{if(!E.current||!v.current){E.current=null;return}const St=Math.abs(tt-E.current.x),wt=Math.abs(st-E.current.y);wt>K&&wt>St&&v.current.go(st<E.current.y?"+1":"-1"),E.current=null},rt=tt=>{E.current&&ot(tt.clientX,tt.clientY),document.removeEventListener("pointerup",rt),document.removeEventListener("pointercancel",rt),document.removeEventListener("pointermove",Q)},dt=tt=>{if(E.current){if(tt.changedTouches.length>0){const st=tt.changedTouches[0];ot(st.clientX,st.clientY)}document.removeEventListener("touchend",dt),document.removeEventListener("touchcancel",dt),document.removeEventListener("touchmove",at)}},V=tt=>{E.current={x:tt.clientX,y:tt.clientY},N.current=!1,document.addEventListener("pointermove",Q,{passive:!1}),document.addEventListener("pointerup",rt),document.addEventListener("pointercancel",rt)},X=tt=>{tt.touches.length>0&&(E.current={x:tt.touches[0].clientX,y:tt.touches[0].clientY},N.current=!1,document.addEventListener("touchmove",at,{passive:!1}),document.addEventListener("touchend",dt),document.addEventListener("touchcancel",dt))};return w.addEventListener("pointerdown",V),w.addEventListener("touchstart",X),()=>{w.removeEventListener("pointerdown",V),w.removeEventListener("touchstart",X),document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",rt),document.removeEventListener("pointercancel",rt),document.removeEventListener("touchmove",at),document.removeEventListener("touchend",dt),document.removeEventListener("touchcancel",dt),E.current=null,N.current=!1}},[t,G,d]);const lt={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:Lo.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:P,className:bt(U.background,x?nt:it,{[U.editor]:i},{[U.hidden]:!t}),style:{...lt,...p&&!i&&!x?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?P:null,className:bt(U.contentStyle,x?ut:Z,{[U.editor]:i},{[U.hidden]:!t}),style:{animationDuration:`${parseInt(j.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Vr,{onMove:w=>u(w.index),ref:v,className:U.lightboxSplide,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,direction:C.direction==="horiz"||C.type==="fade"||C.type==="scale"?"ltr":"ttb",pagination:!1,drag:z.type==="drag"&&!G,perPage:1,width:"100%",height:"100%",type:C.type==="fade"||C.type==="scale"?"fade":"loop",padding:0,rewind:z.repeat!=="close",start:0},style:{"--splide-speed":C.duration},children:n.map((w,K)=>{const q=Ln(M.position,M.offset,i),Q=`${S.scalingValue(M.padding.top,i)} ${S.scalingValue(M.padding.right,i)} ${S.scalingValue(M.padding.bottom,i)} ${S.scalingValue(M.padding.left,i)}`,at=C.type==="scale"?(()=>{const{transform:ot,...rt}=q;return{...rt,position:"absolute",padding:Q,boxSizing:"border-box","--position-transform":ot||"none"}})():{...q,position:"absolute",padding:Q,boxSizing:"border-box"};return a.jsx(Kr,{children:a.jsx("div",{className:U.imgWrapper,onClick:mt,children:a.jsx("img",{ref:K===s?D:null,className:bt(U.imageStyle,{[U.contain]:w.image.objectFit==="contain",[U.cover]:w.image.objectFit==="cover",[U.scaleSlide]:C.type==="scale"}),src:w.image.url,alt:w.image.name??"",style:{...at,pointerEvents:w.image.objectFit==="contain"?"none":"auto"}})})},K)})},d),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:bt(U.arrow,{[U.arrowVertical]:C.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${S.scalingValue(R.offset.x,i)}, ${S.scalingValue(R.offset.y*(C.direction==="horiz"?1:-1),i)}) scale(${R.scale}) rotate(${C.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=v.current)==null?void 0:w.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&a.jsx(ye,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:bt(U.arrowImg,U.mirror)}),!R.arrowsImgUrl&&a.jsx(bo,{color:R.color,className:bt(U.arrowIcon,U.arrowImg,U.mirror)})]})}),a.jsx("div",{className:bt(U.arrow,U.nextArrow,{[U.arrowVertical]:C.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:U.arrowInner,style:{transform:`translate(${S.scalingValue(R.offset.x*(C.direction==="horiz"?-1:1),i)}, ${S.scalingValue(R.offset.y,i)}) scale(${R.scale}) rotate(${C.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=v.current)==null?void 0:w.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&a.jsx(ye,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:U.arrowImg}),!R.arrowsImgUrl&&a.jsx(bo,{color:R.color,className:bt(U.arrowIcon,U.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const w=Ln(I.closeIconAlign,I.closeIconOffset,i),K=`scale(${I.closeIconScale})`,q=w.transform?`${w.transform} ${K}`:K;return a.jsx("button",{className:U.closeButton,style:{...w,transform:q},onClick:J,"aria-label":"Close lightbox",children:a.jsx(ye,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&r.imageCaption&&((O=n[s])==null?void 0:O.imageCaption)&&(()=>{const{widthSettings:w,fontSettings:K,letterSpacing:q,textAlign:Q,wordSpacing:at,fontSizeLineHeight:ot,textAppearance:rt,color:dt}=r.imageCaption;return a.jsx("div",{className:U.caption,style:{...Ln(_.alignment,_.offset,i),fontFamily:nr(K.fontFamily),fontWeight:K.fontWeight,fontStyle:K.fontStyle,width:w.sizing==="auto"?"max-content":S.scalingValue(w.width,i),letterSpacing:S.scalingValue(q,i),wordSpacing:S.scalingValue(at,i),textAlign:Q,fontSize:S.scalingValue(ot.fontSize,i),lineHeight:S.scalingValue(ot.lineHeight,i),textTransform:rt.textTransform??"none",textDecoration:rt.textDecoration??"none",fontVariant:rt.fontVariant??"normal",color:dt},onClick:V=>V.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:a.jsx(sn,{content:n[s].imageCaption})})})})(),k.isActive&&(()=>{const[w,K]=k.position.split("-"),q=C.direction==="horiz"?`${w}-left`:k.position,Q=Ln(q,k.offset,i),at=()=>{if(C.direction==="horiz"){if(K==="left")return"flex-start";if(K==="center")return"center";if(K==="right")return"flex-end"}else{if(w==="top")return"flex-start";if(w==="middle")return"center";if(w==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:U.thumbsWrapper,onClick:ot=>gt(ot),style:{position:i?"absolute":"fixed",...Q,...C.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:bt(U.thumbsContainer,{[U.thumbsContainerVertical]:C.direction==="vert",[U.thumbsAlignStart]:k.align==="start",[U.thumbsAlignCenter]:k.align==="center",[U.thumbsAlignEnd]:k.align==="end"}),style:{gap:S.scalingValue(k.grid.gap,i),justifyContent:B?"flex-start":at()},children:n.map((ot,rt)=>{const dt=rt===s,V=m[rt],Y=k.grid.size*(dt?k.activeState.scale:1),ct=()=>{if(k.fit!=="fit")return{};if(!V)return C.direction==="horiz"?{height:S.scalingValue(Y,i)}:{width:S.scalingValue(Y,i)};const tt=V.width/V.height;if(C.direction==="horiz"){const st=Y,St=st*tt;return{width:S.scalingValue(St,i),height:S.scalingValue(st,i)}}else{const st=Y,St=st/tt;return{width:S.scalingValue(st,i),height:S.scalingValue(St,i)}}};return a.jsx("button",{className:U.thumbItem,style:{...C.direction==="horiz"&&k.fit!=="fit"?{height:S.scalingValue(Y,i)}:{},...C.direction==="vert"&&k.fit!=="fit"?{width:S.scalingValue(Y,i)}:{},...k.fit==="cover"?{width:S.scalingValue(Y,i),height:S.scalingValue(Y,i)}:{},...ct(),transition:dt?"all 0.25s ease-out":"none",opacity:dt?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:tt=>{var st;tt.stopPropagation(),u(rt),(st=v.current)==null||st.go(rt)},onMouseEnter:()=>{var tt;k.triggers==="hov"&&((tt=v.current)==null||tt.go(rt))},children:a.jsx("img",{src:ot.image.url,alt:ot.image.name??"",onLoad:tt=>{const st=tt.currentTarget;st.naturalWidth&&st.naturalHeight&&g(St=>({...St,[rt]:{width:st.naturalWidth,height:st.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ot.image.name}-${rt}`)})})})})()]})]}),document.getElementById(l))};function bo({color:t,className:e}){return a.jsx("svg",{viewBox:"0 0 10 18",className:e,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ps={element:Ts,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Pn(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Ws(t){return`
6
+ */const xs="RichTextRenderer-module__link___BWeZ2",Cs={link:xs},Ss=t=>{const e=t.trim();return!e||e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?!1:e.split(/\s+/g).filter(Boolean).some(r=>/^\d/.test(r))},nr=t=>t&&t.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ss(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function pe(t){const{color:e,...n}=t;return n}function Vt(t,e){var n,r,o;return{fontFamily:nr(t.fontSettings.fontFamily),fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:S.scalingValue(t.letterSpacing,e),wordSpacing:S.scalingValue(t.wordSpacing,e),fontSize:S.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?S.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(r=t.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=t.textAppearance)==null?void 0:o.fontVariant,color:t.color}}const un=({content:t})=>{const e=n=>n.map((r,o)=>r.type==="link"?a.jsx("a",{className:Cs.link,href:r.value,target:r.target,children:e(r.children)},o):a.jsx("span",{style:$s(r),children:r.text},o));return a.jsx(a.Fragment,{children:t.map((n,r)=>{const o=n.children;return a.jsx("div",{children:e(o)},r)})})};function $s(t){return{...t.fontFamily&&{fontFamily:nr(t.fontFamily)},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const ws="SvgImage-module__svg___q3xE-",Ts="SvgImage-module__img___VsTm-",uo={svg:ws,img:Ts},Ls=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},_s=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ve=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[l,i]=m.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return m.useEffect(()=>{if(typeof window<"u"&&window.CSS){const s=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(s)}},[]),!Ls(t)||!l?a.jsx("img",{src:t,alt:"",className:xt(uo.img,r),style:o}):a.jsx("span",{"data-supports-mask":l,className:xt(uo.svg,r),style:{"--svg":_s(t),"--fill":e,"--hover-fill":n,...o??{}}})},Es={"top-left":tt.topLeftAlignment,"top-center":tt.topCenterAlignment,"top-right":tt.topRightAlignment,"middle-left":tt.middleLeftAlignment,"middle-center":tt.middleCenterAlignment,"middle-right":tt.middleRightAlignment,"bottom-left":tt.bottomLeftAlignment,"bottom-center":tt.bottomCenterAlignment,"bottom-right":tt.bottomRightAlignment};function Ps({settings:t,content:e,styles:n,isEditor:r}){const[o,l]=m.useState(null),{widthSettings:i,fontSettings:s,letterSpacing:d,textAlign:u,wordSpacing:c,fontSizeLineHeight:L,textAppearance:v,color:h}=n.imageCaption,[p,g]=m.useState(void 0),[$,f]=m.useState(null),[x,b]=m.useState(0),[R,W]=m.useState(0),{direction:_,transition:y,controls:w,pagination:E,imageCaption:H,triggers:F}=t,O=m.useRef(y.type),{x:z,y:V}=t.controls.offset,K=C=>{o&&o.go(C)};return m.useEffect(()=>{if(!$)return;const C=new ResizeObserver(k=>{if(!o)return;const[I]=k;g({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return C.observe($),()=>C.unobserve($)},[$]),m.useEffect(()=>{!o||O.current===y.type||(W(C=>C+1),O.current=y.type)},[y.type]),a.jsx("div",{className:xt(tt.wrapper,{[tt.editor]:r}),ref:f,children:a.jsxs("div",{className:tt.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&a.jsx("div",{className:xt(tt.captionBlock),children:a.jsx("div",{className:tt.captionTextWrapper,children:e.map((C,k)=>a.jsx("div",{className:xt(tt.captionText,Es[H.alignment],{[tt.withPointerEvents]:k===x&&r,[tt.active]:k===x}),style:{fontFamily:nr(s.fontFamily),fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:i.sizing==="auto"?"max-content":S.scalingValue(i.width,r),letterSpacing:S.scalingValue(d,r),wordSpacing:S.scalingValue(c,r),textAlign:u,fontSize:S.scalingValue(L.fontSize,r),lineHeight:S.scalingValue(L.lineHeight,r),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:h,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:tt.captionTextInner,style:{"--link-hover-color":H.linkHoverColor,"--link-color":H.linkColor,position:"relative",top:S.scalingValue(H.offset.y,r),left:S.scalingValue(H.offset.x,r)},children:a.jsx(un,{content:C.imageCaption})})},k))})}),a.jsx(Vr,{onMove:C=>{b(C.index)},ref:l,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:F.autoPlay!==null,...F.autoPlay!==null&&{interval:parseInt(F.autoPlay)*1e3},direction:_==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:F.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((C,k)=>a.jsx(Kr,{children:a.jsx("div",{className:tt.sliderItem,children:a.jsx("div",{className:tt.imgWrapper,children:a.jsx("img",{className:xt(tt.sliderImage,{[tt.contain]:C.image.objectFit==="contain",[tt.cover]:C.image.objectFit==="cover"}),src:C.image.url,alt:C.image.name??""})})})},k))},R),w.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:xt(tt.arrow,{[tt.arrowVertical]:_==="vert",[tt.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{onClick:()=>{K("-1")},className:tt.arrowInner,style:{transform:`translate(${S.scalingValue(z,r)}, ${S.scalingValue(V*(_==="horiz"?1:-1),r)}) scale(${t.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(ve,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:xt(tt.arrowImg,tt.mirror)}),!w.arrowsImgUrl&&a.jsx(po,{color:w.color,className:xt(tt.arrowIcon,tt.arrowImg,tt.mirror)})]})}),a.jsx("div",{className:xt(tt.arrow,tt.nextArrow,{[tt.arrowVertical]:_==="vert",[tt.hoverArrow]:w.show==="on hover"}),style:{color:w.color,"--arrow-hover-color":w.hover},children:a.jsxs("button",{className:tt.arrowInner,onClick:()=>K("+1"),style:{transform:`translate(${S.scalingValue(z*(_==="horiz"?-1:1),r)}, ${S.scalingValue(V,r)}) scale(${t.controls.scale/100}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:[w.arrowsImgUrl&&a.jsx(ve,{url:w.arrowsImgUrl,fill:w.color,hoverFill:w.hover,className:tt.arrowImg}),!w.arrowsImgUrl&&a.jsx(po,{color:w.color,className:xt(tt.arrowIcon,tt.arrowImg)})]})})]}),F.triggersList.click&&a.jsx("div",{className:tt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),E.isActive&&a.jsx("div",{className:xt(tt.pagination,{[tt.paginationInsideBottom]:E.position==="inside-1"&&_==="horiz",[tt.paginationInsideTop]:E.position==="inside-2"&&_==="horiz",[tt.paginationOutsideBottom]:E.position==="outside-1"&&_==="horiz",[tt.paginationOutsideTop]:E.position==="outside-2"&&_==="horiz",[tt.paginationInsideLeft]:E.position==="inside-1"&&_==="vert",[tt.paginationInsideRight]:E.position==="inside-2"&&_==="vert",[tt.paginationOutsideLeft]:E.position==="outside-1"&&_==="vert",[tt.paginationOutsideRight]:E.position==="outside-2"&&_==="vert",[tt.paginationVertical]:_==="vert"}),children:a.jsx("div",{className:tt.paginationInner,style:{backgroundColor:E.colors[2],transform:`scale(${E.scale/100}) translate(${S.scalingValue(E.offset.x,r)}, ${S.scalingValue(E.offset.y,r)}) rotate(${_==="horiz"?"0deg":"90deg"})`},children:e.map((C,k)=>a.jsx("button",{onClick:()=>{o&&o.go(k)},className:xt(tt.paginationItem),children:a.jsx("div",{className:xt(tt.dot,{[tt.activeDot]:k===x}),style:{backgroundColor:k===x?E.colors[0]:E.colors[1],"--pagination-hover-color":E.hover}})},k))})})]})})}function po({color:t,className:e}){return a.jsx("svg",{viewBox:"0 0 10 18",className:e,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ws={element:Ps,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"inside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Fs="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Rs="ImageRevealSlider-module__image___Qjt-e",Is="ImageRevealSlider-module__link___N-iLG",As="ImageRevealSlider-module__cursor___2U03d",Ie={imageRevealSlider:Fs,image:Rs,link:Is,cursor:As};function mo(t,e,n){for(const r of n){const o=new Image;o.src=r.url;const l=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*l,s=l/2,d=i/2;if(t>=r.x-s&&t<=r.x+s&&e>=r.y-d&&e<=r.y+d)return!0}return!1}function ur(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function ks(t,e,n,r){let o,l;if(e==="custom"){o=n;const i=await ur(t);l=i.height/i.width*o}else if(e==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await ur(t);l=i.height/i.width*o}else{const i=await ur(t);o=i.width,l=i.height}return{width:o,height:l,finalWidth:`${o}px`}}function Ms({settings:t,content:e,isEditor:n}){const[r,o]=m.useState(null),[l,i]=m.useState([]),[s,d]=m.useState(0),u=m.useRef(0),[c,L]=m.useState({x:0,y:0}),[v,h]=m.useState(1),[p,g]=m.useState("none"),$=m.useRef({x:0,y:0}),[f,x]=m.useState(!1),{sizeType:b,imageWidth:R,randomRangeImageWidth:W}=t.imageSize,{revealPosition:_,visible:y}=t.position,{cursorType:w,target:E,defaultCursorScale:H,defaultCursor:F,hoverCursorScale:O,hoverCursor:z}=t.cursor;m.useEffect(()=>{if(!r)return;const C=(A,P)=>{const N=r.getBoundingClientRect(),Q=A-N.left,st=P-N.top;if(L({x:Q,y:st}),w==="system"){g("none"),h(1);return}const rt=Q,ut=st,M=document.elementFromPoint(N.left+rt,N.top+ut);if(M&&M.closest("a")){g("none"),h(1);return}const J=mo(rt,ut,l)||E==="area"?{img:z??"none",scale:O}:{img:F??"none",scale:H};g(J.img),h(J.scale)},k=A=>{A.stopPropagation(),$.current={x:A.clientX,y:A.clientY},C(A.clientX,A.clientY)},I=()=>{f&&C($.current.x,$.current.y)};return r.addEventListener("mousemove",k),window.addEventListener("scroll",I,!0),()=>{r.removeEventListener("mousemove",k),window.removeEventListener("scroll",I,!0)}},[r,f,c,w,E,z,F,O,H,l]),m.useEffect(()=>{f||(g("none"),h(0))},[f]);const V=async(C,k,I,A={})=>{const{width:P,height:N,finalWidth:Q}=await ks(C.image.url,b,R,W);let st=0,rt=0;_==="same"?(st=k/2,rt=I/2):(st=A.x??Math.random()*k,rt=A.y??Math.random()*I);const ut=Math.min(Math.max(st,P/2),k-P/2),M=Math.min(Math.max(rt,N/2),I-N/2);return{id:u.current++,url:C.image.url,link:C.link,name:C.image.name,x:ut,y:M,width:Q}};m.useEffect(()=>{if(!r||e.length===0)return;const C=r.getBoundingClientRect(),k=C.width,I=C.height,A=[];(async()=>{const N=e[0],Q=await V(N,k,I);A.push(Q),i(A),d(1)})()},[b,R,W,_,r]),m.useEffect(()=>{y==="last One"&&i(C=>C.length>0?[C[C.length-1]]:[])},[y]);const K=async C=>{if(!r)return;const k=r.getBoundingClientRect(),I=C.clientX-k.left,A=C.clientY-k.top;if(E==="image"&&!mo(I,A,l))return;let P=0,N=0;_==="on Click"?(P=I,N=A):_==="same"?(P=k.width/2,N=k.height/2):(P=Math.random()*k.width,N=Math.random()*k.height);const Q=e[s],st=await V(Q,k.width,k.height,{x:P,y:N});i(rt=>y==="all"?[...rt,st]:[st]),d(rt=>rt>=e.length-1?0:rt+1)};return a.jsxs("div",{ref:o,onClick:K,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:Ie.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[l.map(C=>a.jsx("div",{className:Ie.wrapper,style:{top:`${C.y}px`,left:`${C.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:C.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:E==="area"&&C.link?a.jsx("a",{href:C.link,target:"_blank",className:Ie.link,children:a.jsx("img",{src:C.url,alt:C.name,className:Ie.image},C.id)}):a.jsx("img",{src:C.url,alt:C.name,className:Ie.image},C.id)},C.id)),f&&a.jsx("div",{className:Ie.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Os={element:Ms,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Ns="LightBox-module__hidden___9s-9x",Hs="LightBox-module__heroImage___sTxNF",Bs="LightBox-module__background___rm9ml",zs="LightBox-module__editor___4ACaY",Ds="LightBox-module__contentStyle___Bgnsq",js="LightBox-module__imageStyle___tLIlB",Vs="LightBox-module__imgWrapper___LuFUp",Ks="LightBox-module__contain___8-yaS",Us="LightBox-module__cover___hNvOG",Gs="LightBox-module__caption___b6L2I",Ys="LightBox-module__captionTextInner___rCGNH",qs="LightBox-module__lightboxSplide___XFuWC",Xs="LightBox-module__arrow___iz38X",Zs="LightBox-module__arrowVertical___Zfz81",Js="LightBox-module__nextArrow___zkAQN",Qs="LightBox-module__arrowInner___p48sW",tl="LightBox-module__arrowIcon___3VaFf",el="LightBox-module__arrowImg___pNV88",nl="LightBox-module__mirror___pjeXc",rl="LightBox-module__thumbsWrapper___GB-nU",ol="LightBox-module__thumbsContainerVertical___wttk5",il="LightBox-module__thumbsContainer___osSma",al="LightBox-module__thumbsAlignStart___MO6tY",sl="LightBox-module__thumbsAlignCenter___Q4sUx",ll="LightBox-module__thumbsAlignEnd___p4y9R",cl="LightBox-module__thumbItem___HvnF3",dl="LightBox-module__closeButton___g2khP",ul="LightBox-module__fadeIn___0m5GW",pl="LightBox-module__slideInLeft___gPYwC",ml="LightBox-module__slideInRight___S-pPp",gl="LightBox-module__slideInTop___DFdAj",hl="LightBox-module__slideInBottom___m27kZ",fl="LightBox-module__fadeOut___55qBR",yl="LightBox-module__slideOutLeft___NvU7P",vl="LightBox-module__slideOutRight___SK7eC",bl="LightBox-module__slideOutTop___Vgg0z",xl="LightBox-module__slideOutBottom___nJ0Ef",Cl="LightBox-module__scaleSlide___vZriG",G={hidden:Ns,heroImage:Hs,background:Bs,editor:zs,contentStyle:Ds,imageStyle:js,imgWrapper:Vs,contain:Ks,cover:Us,caption:Gs,captionTextInner:Ys,lightboxSplide:qs,arrow:Xs,arrowVertical:Zs,nextArrow:Js,arrowInner:Qs,arrowIcon:tl,arrowImg:el,mirror:nl,thumbsWrapper:rl,thumbsContainerVertical:ol,thumbsContainer:il,thumbsAlignStart:al,thumbsAlignCenter:sl,thumbsAlignEnd:ll,thumbItem:cl,closeButton:dl,fadeIn:ul,slideInLeft:pl,slideInRight:ml,slideInTop:gl,slideInBottom:hl,fadeOut:fl,slideOutLeft:yl,slideOutRight:vl,slideOutTop:bl,slideOutBottom:xl,scaleSlide:Cl},_n=(t,e,n)=>{const r={},[o,l]=t.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"),l==="left"?(r.left="0",r.right="auto"):l==="center"?(r.left="50%",r.right="auto"):l==="right"&&(r.left="auto",r.right="0"),o==="middle"&&l==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(e.x,n)}), calc(-50% + ${S.scalingValue(e.y,n)}))`:o==="middle"?r.transform=`translate(${S.scalingValue(e.x,n)}, calc(-50% + ${S.scalingValue(e.y,n)}))`:l==="center"?r.transform=`translate(calc(-50% + ${S.scalingValue(e.x,n)}), ${S.scalingValue(e.y,n)})`:r.transform=`translate(${S.scalingValue(e.x,n)}, ${S.scalingValue(e.y,n)})`,r};function di(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function go(t){const e=t.getBoundingClientRect(),n=di(t),r=Math.max(0,e.width-n.left-n.right),o=Math.max(0,e.height-n.top-n.bottom),l=t.naturalWidth,i=t.naturalHeight,s=r/o,d=l/i;let u,c;d>s?(u=r,c=r/d):(c=o,u=o*d);const L=e.left+n.left,v=e.top+n.top,h=(r-u)/2+L,p=(o-c)/2+v;return{x:h,y:p,width:u,height:c}}function ho(t){const e=t.getBoundingClientRect(),n=di(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function fo(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const r=e[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Sl(t,e){const n=(()=>{if(t==="fade in")return G.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return G.slideInLeft;case"right":return G.slideInRight;case"top":return G.slideInTop;case"bottom":return G.slideInBottom;default:return G.slideInRight}return G.fadeIn})(),r=(()=>{if(t==="fade in"||t==="mix")return G.fadeIn;if(t==="slide in")switch(e){case"left":return G.slideInLeft;case"right":return G.slideInRight;case"top":return G.slideInTop;case"bottom":return G.slideInBottom;default:return G.slideInRight}return G.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return G.fadeOut;if(t==="slide in")switch(e){case"left":return G.slideOutLeft;case"right":return G.slideOutRight;case"top":return G.slideOutTop;case"bottom":return G.slideOutBottom;default:return G.slideOutRight}return G.fadeOut})(),l=(()=>{if(t==="fade in")return G.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return G.slideOutLeft;case"right":return G.slideOutRight;case"top":return G.slideOutTop;case"bottom":return G.slideOutBottom;default:return G.slideOutRight}return G.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:l}}const $l=({settings:t,content:e,styles:n,portalId:r,activeEvent:o,isEditor:l})=>{const[i,s]=m.useState(!1),{url:d}=t.thumbnailBlock.cover;return m.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:d,alt:"Cover",className:G.heroImage,onClick:()=>s(!0)}),a.jsx(wl,{isOpen:i,onClose:()=>s(!1),content:e,settings:t,lightboxStyles:n,portalId:r,isEditor:l})]})},wl=({isOpen:t,onClose:e,content:n,lightboxStyles:r,settings:o,portalId:l,isEditor:i,metadata:s})=>{var B;const[d,u]=m.useState(0),[c,L]=m.useState(0),[v,h]=m.useState(!1),[p,g]=m.useState(!1),[$,f]=m.useState({}),x=m.useRef(null),b=m.useRef(null),R=m.useRef(null),W=m.useRef(!1),_=m.useRef(null),y=m.useRef(null),w=m.useRef(null),E=m.useRef(null),H=m.useRef(!1),F=m.useRef(null),[O,z]=m.useState(!1),{appear:V,triggers:K,slider:C,thumbnail:k,controls:I,area:A,caption:P,layout:N}=o.lightboxBlock,{appearClass:Q,backdropAppearClass:st,backdropDisappearClass:rt,disappearClass:ut}=Sl(V.type,V.direction),M=(s==null?void 0:s.itemId)??null;m.useEffect(()=>{const T=()=>{setTimeout(()=>{var q,Z;(Z=(q=x.current)==null?void 0:q.splide)==null||Z.refresh()},16)},U=()=>{L(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",T),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",T),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),m.useEffect(()=>{if(!t||!k.isActive){z(!1);return}const T=F.current;if(!T)return;const U=()=>{C.direction==="horiz"?z(T.scrollWidth>T.clientWidth):z(T.scrollHeight>T.clientHeight)};U();const q=new ResizeObserver(U);return q.observe(T),()=>q.disconnect()},[t,k.isActive,n.length,$,C.direction]);const J=m.useCallback(()=>{const T=window.matchMedia("(max-width: 768px)").matches,U=fo(A.color);T&&!i&&U>.9&&(document.body.style.backgroundColor=""),h(!0),W.current=!0;const q=Z=>{Z.target===_.current&&Z.animationName&&(_.current&&y.current&&_.current.removeEventListener("animationend",y.current),y.current=null,W.current&&(W.current=!1,e()),h(!1))};_.current&&(y.current=q,_.current.addEventListener("animationend",q))},[e,A.color,i]),ht=(T,U,q)=>{var Z,ot;if(T){if(K.type==="click"&&K.switch==="image")K.repeat==="close"&&d===n.length-1?J():(Z=x.current)==null||Z.go("+1");else if(K.type==="click"&&K.switch==="50/50"){const it=T.getBoundingClientRect(),et=U-it.left,dt=q-it.top,j=it.width,X=it.height;let Y;C.direction==="horiz"?Y=et<j/2?"-1":"+1":Y=dt<X/2?"-1":"+1",(ot=x.current)==null||ot.go(Y)}}},pt=T=>{if(H.current){H.current=!1;return}const U=n[d],q=(U==null?void 0:U.image.objectFit)==="cover";let Z,ot;if("changedTouches"in T&&T.changedTouches.length>0)Z=T.changedTouches[0].clientX,ot=T.changedTouches[0].clientY;else if("clientX"in T)Z=T.clientX,ot=T.clientY;else return;let it;if(q&&R.current){const et=ho(R.current);it=Z>=et.left&&Z<=et.right&&ot>=et.top&&ot<=et.bottom}else{const et=R.current?go(R.current):null;if(!et){T.target===T.currentTarget&&J();return}it=Z>=et.x&&Z<=et.x+et.width&&ot>=et.y&&ot<=et.y+et.height}it?ht(R.current,Z,ot):J()},gt=T=>{const U=T.target;(U.classList.contains(G.thumbsWrapper)||U.classList.contains(G.thumbsContainer))&&pt(T)};m.useEffect(()=>{if(!t)return;const T=U=>{var q,Z;if(U.key==="Escape"){J();return}if(U.key==="ArrowRight"){u(ot=>(ot+1)%Math.max(n.length,1)),(q=x.current)==null||q.go("+1");return}U.key==="ArrowLeft"&&(u(ot=>(ot-1+Math.max(n.length,1))%Math.max(n.length,1)),(Z=x.current)==null||Z.go("-1"))};return window.addEventListener("keydown",T),()=>{window.removeEventListener("keydown",T)}},[t,J,n.length]),m.useEffect(()=>{if(t){if(u(0),L(U=>U+1),W.current=!1,h(!1),g(!1),f({}),!M)return;const T=new CustomEvent("page-overlay",{detail:{itemId:M}});window.dispatchEvent(T)}return()=>{_.current&&y.current&&(_.current.removeEventListener("animationend",y.current),y.current=null),g(!1)}},[t,M]),m.useEffect(()=>{b.current!==null&&b.current!==C.type&&L(T=>T+1),b.current=C.type},[C.type]),m.useEffect(()=>{if(!t)return;const T=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,q=fo(A.color);document.body.style.overflow="hidden",g(!1);const Z=it=>{it.target===_.current&&!W.current&&it.animationName&&(U&&!i&&q>.9&&(document.body.style.backgroundColor=A.color),g(!0),_.current&&w.current&&_.current.removeEventListener("animationend",w.current),w.current=null)};_.current&&(w.current=Z,_.current.addEventListener("animationend",Z));const ot=it=>{const et=it.target;et&&(et.closest(`.${G.thumbsWrapper}`)||et.closest(`.${G.thumbsContainer}`))||C.type!=="slide"&&it.preventDefault()};return document.addEventListener("touchmove",ot,{passive:!1}),()=>{document.body.style.overflow=T,document.removeEventListener("touchmove",ot),_.current&&w.current&&(_.current.removeEventListener("animationend",w.current),w.current=null),g(!1)}},[t,i,A.color,C.type]),m.useEffect(()=>{if(!t)return;const T=U=>{var Z,ot;if(W.current){U.stopPropagation();return}if(H.current){H.current=!1;return}const q=U.target;if(!(q&&(q.closest(`.${G.thumbsContainer}`)||q.closest(`.${G.thumbItem}`)||q.closest(`.${G.arrow}`)||q.closest(`.${G.closeButton}`)||q.closest(`.${G.caption}`)))){if(C.type==="slide"&&K.type==="drag"&&((ot=(Z=x.current)==null?void 0:Z.splide)!=null&&ot.root)){const it=x.current.splide.root;if(q&&(it.contains(q)||it===q))return}if(U.touches.length===0&&U.changedTouches.length>0){const it=n[d],et=(it==null?void 0:it.image.objectFit)==="cover",dt=U.changedTouches[0];let j;if(et&&R.current){const X=ho(R.current);j=dt.clientX>=X.left&&dt.clientX<=X.right&&dt.clientY>=X.top&&dt.clientY<=X.bottom}else{const X=R.current?go(R.current):null;if(!X)return;j=dt.clientX>=X.x&&dt.clientX<=X.x+X.width&&dt.clientY>=X.y&&dt.clientY<=X.y+X.height}if(!j){U.stopPropagation(),W.current=!0;const X=Y=>{Y.stopPropagation(),Y.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),J()}}}};return document.addEventListener("touchend",T,{passive:!0}),()=>{document.removeEventListener("touchend",T)}},[t,J,d,n]);const D=(C.type==="scale"||C.type==="fade")&&C.direction==="vert"&&K.type==="drag";m.useEffect(()=>{var Y,lt;if(!t||!D||!((lt=(Y=x.current)==null?void 0:Y.splide)!=null&&lt.root))return;const T=x.current.splide.root,U=30,q=(nt,ct)=>{if(E.current){const Ct=Math.abs(nt-E.current.x),Lt=Math.abs(ct-E.current.y);(Ct>0||Lt>0)&&(H.current=!0)}},Z=nt=>{E.current&&(nt.preventDefault(),q(nt.clientX,nt.clientY))},ot=nt=>{E.current&&nt.touches.length>0&&(nt.preventDefault(),q(nt.touches[0].clientX,nt.touches[0].clientY))},it=(nt,ct)=>{if(!E.current||!x.current){E.current=null;return}const Ct=Math.abs(nt-E.current.x),Lt=Math.abs(ct-E.current.y);Lt>U&&Lt>Ct&&x.current.go(ct<E.current.y?"+1":"-1"),E.current=null},et=nt=>{E.current&&it(nt.clientX,nt.clientY),document.removeEventListener("pointerup",et),document.removeEventListener("pointercancel",et),document.removeEventListener("pointermove",Z)},dt=nt=>{if(E.current){if(nt.changedTouches.length>0){const ct=nt.changedTouches[0];it(ct.clientX,ct.clientY)}document.removeEventListener("touchend",dt),document.removeEventListener("touchcancel",dt),document.removeEventListener("touchmove",ot)}},j=nt=>{E.current={x:nt.clientX,y:nt.clientY},H.current=!1,document.addEventListener("pointermove",Z,{passive:!1}),document.addEventListener("pointerup",et),document.addEventListener("pointercancel",et)},X=nt=>{nt.touches.length>0&&(E.current={x:nt.touches[0].clientX,y:nt.touches[0].clientY},H.current=!1,document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",dt),document.addEventListener("touchcancel",dt))};return T.addEventListener("pointerdown",j),T.addEventListener("touchstart",X),()=>{T.removeEventListener("pointerdown",j),T.removeEventListener("touchstart",X),document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",et),document.removeEventListener("pointercancel",et),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",dt),document.removeEventListener("touchcancel",dt),E.current=null,H.current=!1}},[t,D,c]);const at={backgroundColor:A.color,backdropFilter:`blur(${A.blur}px)`,animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(l)?null:_o.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:_,className:xt(G.background,v?rt:st,{[G.editor]:i},{[G.hidden]:!t}),style:{...at,...p&&!i&&!v?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?_:null,className:xt(G.contentStyle,v?ut:Q,{[G.editor]:i},{[G.hidden]:!t}),style:{animationDuration:`${parseInt(V.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Vr,{onMove:T=>u(T.index),ref:x,className:G.lightboxSplide,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,direction:C.direction==="horiz"||C.type==="fade"||C.type==="scale"?"ltr":"ttb",pagination:!1,drag:K.type==="drag"&&!D,perPage:1,width:"100%",height:"100%",type:C.type==="fade"||C.type==="scale"?"fade":"loop",padding:0,rewind:K.repeat!=="close",start:0},style:{"--splide-speed":C.duration},children:n.map((T,U)=>{const q=_n(N.position,N.offset,i),Z=`${S.scalingValue(N.padding.top,i)} ${S.scalingValue(N.padding.right,i)} ${S.scalingValue(N.padding.bottom,i)} ${S.scalingValue(N.padding.left,i)}`,ot=C.type==="scale"?(()=>{const{transform:it,...et}=q;return{...et,position:"absolute",padding:Z,boxSizing:"border-box","--position-transform":it||"none"}})():{...q,position:"absolute",padding:Z,boxSizing:"border-box"};return a.jsx(Kr,{children:a.jsx("div",{className:G.imgWrapper,onClick:pt,children:a.jsx("img",{ref:U===d?R:null,className:xt(G.imageStyle,{[G.contain]:T.image.objectFit==="contain",[G.cover]:T.image.objectFit==="cover",[G.scaleSlide]:C.type==="scale"}),src:T.image.url,alt:T.image.name??"",style:{...ot,pointerEvents:T.image.objectFit==="contain"?"none":"auto"}})})},U)})},c),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:xt(G.arrow,{[G.arrowVertical]:C.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:G.arrowInner,style:{transform:`translate(${S.scalingValue(I.offset.x,i)}, ${S.scalingValue(I.offset.y*(C.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${C.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var T;return(T=x.current)==null?void 0:T.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(ve,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:xt(G.arrowImg,G.mirror)}),!I.arrowsImgUrl&&a.jsx(yo,{color:I.color,className:xt(G.arrowIcon,G.arrowImg,G.mirror)})]})}),a.jsx("div",{className:xt(G.arrow,G.nextArrow,{[G.arrowVertical]:C.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:G.arrowInner,style:{transform:`translate(${S.scalingValue(I.offset.x*(C.direction==="horiz"?-1:1),i)}, ${S.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${C.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var T;return(T=x.current)==null?void 0:T.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(ve,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:G.arrowImg}),!I.arrowsImgUrl&&a.jsx(yo,{color:I.color,className:xt(G.arrowIcon,G.arrowImg)})]})})]}),A.closeIconUrl&&(()=>{const T=_n(A.closeIconAlign,A.closeIconOffset,i),U=`scale(${A.closeIconScale})`,q=T.transform?`${T.transform} ${U}`:U;return a.jsx("button",{className:G.closeButton,style:{...T,transform:q},onClick:J,"aria-label":"Close lightbox",children:a.jsx(ve,{url:A.closeIconUrl,fill:A.closeIconColor??"#000000",hoverFill:A.closeIconHover??"#cccccc"})})})(),P&&P.isActive&&r.imageCaption&&((B=n[d])==null?void 0:B.imageCaption)&&(()=>{const{widthSettings:T,fontSettings:U,letterSpacing:q,textAlign:Z,wordSpacing:ot,fontSizeLineHeight:it,textAppearance:et,color:dt}=r.imageCaption;return a.jsx("div",{className:G.caption,style:{..._n(P.alignment,P.offset,i),fontFamily:nr(U.fontFamily),fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:T.sizing==="auto"?"max-content":S.scalingValue(T.width,i),letterSpacing:S.scalingValue(q,i),wordSpacing:S.scalingValue(ot,i),textAlign:Z,fontSize:S.scalingValue(it.fontSize,i),lineHeight:S.scalingValue(it.lineHeight,i),textTransform:et.textTransform??"none",textDecoration:et.textDecoration??"none",fontVariant:et.fontVariant??"normal",color:dt},onClick:j=>j.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:G.captionTextInner,style:{"--link-color":P.linkColor,"--link-hover-color":P.linkHoverColor},children:a.jsx(un,{content:n[d].imageCaption})})})})(),k.isActive&&(()=>{const[T,U]=k.position.split("-"),q=C.direction==="horiz"?`${T}-left`:k.position,Z=_n(q,k.offset,i),ot=()=>{if(C.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(T==="top")return"flex-start";if(T==="middle")return"center";if(T==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:F,className:G.thumbsWrapper,onClick:it=>gt(it),style:{position:i?"absolute":"fixed",...Z,...C.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:xt(G.thumbsContainer,{[G.thumbsContainerVertical]:C.direction==="vert",[G.thumbsAlignStart]:k.align==="start",[G.thumbsAlignCenter]:k.align==="center",[G.thumbsAlignEnd]:k.align==="end"}),style:{gap:S.scalingValue(k.grid.gap,i),justifyContent:O?"flex-start":ot()},children:n.map((it,et)=>{const dt=et===d,j=$[et],Y=k.grid.size*(dt?k.activeState.scale:1),lt=()=>{if(k.fit!=="fit")return{};if(!j)return C.direction==="horiz"?{height:S.scalingValue(Y,i)}:{width:S.scalingValue(Y,i)};const nt=j.width/j.height;if(C.direction==="horiz"){const ct=Y,Ct=ct*nt;return{width:S.scalingValue(Ct,i),height:S.scalingValue(ct,i)}}else{const ct=Y,Ct=ct/nt;return{width:S.scalingValue(ct,i),height:S.scalingValue(Ct,i)}}};return a.jsx("button",{className:G.thumbItem,style:{...C.direction==="horiz"&&k.fit!=="fit"?{height:S.scalingValue(Y,i)}:{},...C.direction==="vert"&&k.fit!=="fit"?{width:S.scalingValue(Y,i)}:{},...k.fit==="cover"?{width:S.scalingValue(Y,i),height:S.scalingValue(Y,i)}:{},...lt(),transition:dt?"all 0.25s ease-out":"none",opacity:dt?k.activeState.opacity/100:k.opacity/100,"--thumb-hover":k.activeState.opacity/100},onClick:nt=>{var ct;nt.stopPropagation(),u(et),(ct=x.current)==null||ct.go(et)},onMouseEnter:()=>{var nt;k.triggers==="hov"&&((nt=x.current)==null||nt.go(et))},children:a.jsx("img",{src:it.image.url,alt:it.image.name??"",onLoad:nt=>{const ct=nt.currentTarget;ct.naturalWidth&&ct.naturalHeight&&f(Ct=>({...Ct,[et]:{width:ct.naturalWidth,height:ct.naturalHeight}}))},style:{objectFit:k.fit==="cover"?"cover":"contain",...k.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...k.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${it.image.name}-${et}`)})})})})()]})]}),document.getElementById(l))};function yo({color:t,className:e}){return a.jsx("svg",{viewBox:"0 0 10 18",className:e,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Tl={element:$l,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function En(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Ll(t){return`
7
7
  .${t}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Pn(48)};
11
+ min-height: ${En(48)};
12
12
  }
13
13
  .${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
14
14
  .${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${t}-field-group.${t}-labeled {
35
- gap: ${Pn(4)};
35
+ gap: ${En(4)};
36
36
  }
37
37
  .${t}-field-label {
38
38
  white-space: nowrap;
@@ -128,18 +128,18 @@
128
128
  outline: none;
129
129
  }
130
130
  .${t}-success {
131
- margin-top: ${Pn(8)};
131
+ margin-top: ${En(8)};
132
132
  color: var(--${t}-success-success-color, var(--${t}-success-color));
133
133
  }
134
134
  .${t}-error {
135
- margin-top: ${Pn(8)};
135
+ margin-top: ${En(8)};
136
136
  color: var(--${t}-error-error-color, var(--${t}-error-color));
137
137
  }
138
138
  .${t}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function _s({settings:t,isEditor:e,metadata:n,activeEvent:r}){const{prefix:o}=S.useScopedStyles(),{type:l="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:u,fieldsGap:d,buttonCorners:T,buttonStroke:x,buttonPadding:y,isButtonFullWidth:p,inputCorners:f,inputStroke:m,inputPadding:g,inputColor:v,inputTextColor:L,inputBorderColor:D,placeholderColor:A,buttonColor:P,buttonTextColor:b,buttonBorderColor:$,labelTextColor:E,successColor:N,errorColor:W,fontFamily:B,inputFontSettings:H,inputFontSize:j,inputLineHeight:z,inputLetterSpacing:C,inputWordSpacing:k,inputTextAppearance:R,buttonFontSettings:I,buttonFontSize:_,buttonLineHeight:M,buttonLetterSpacing:Z,buttonWordSpacing:it,buttonTextAppearance:nt,labelFontSettings:ut,labelFontSize:F,labelLineHeight:J,labelLetterSpacing:ht,labelWordSpacing:mt,labelTextAppearance:gt,statusFontSettings:G,statusFontSize:lt,statusLineHeight:O,statusLetterSpacing:w,statusWordSpacing:K,statusTextAppearance:q,successMessage:Q,errorMessage:at,stateOverrides:ot}=t,rt=l==="B",dt=c.slice(0,Math.min(i,c.length)),V={fontSettings:{fontFamily:B,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:j??.01,lineHeight:z,letterSpacing:C??0,wordSpacing:k??0,textAppearance:R,color:L},X=ue(Nt(V,e)),Y=S.scalingValue(m??0,e),ct=S.scalingValue((z??j??.01)+((g==null?void 0:g.top)??0)+((g==null?void 0:g.bottom)??0)+(l==="C"?m??0:(m??0)*2),e),tt={...X,borderStyle:"solid",borderRadius:l==="C"?0:S.scalingValue(f??0,e),...l==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Y,borderLeftWidth:0}:{borderWidth:Y},paddingTop:S.scalingValue((g==null?void 0:g.top)??0,e),paddingRight:S.scalingValue((g==null?void 0:g.right)??0,e),paddingBottom:S.scalingValue((g==null?void 0:g.bottom)??0,e),paddingLeft:S.scalingValue((g==null?void 0:g.left)??0,e),height:ct,minHeight:ct},st={fontSettings:{fontFamily:B,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:_??.01,lineHeight:M,letterSpacing:Z??0,wordSpacing:it??0,textAppearance:nt,color:b},St=ue(Nt(st,e)),wt=S.scalingValue(x??0,e),It={fontSettings:{fontFamily:B,fontWeight:(ut==null?void 0:ut.fontWeight)??400,fontStyle:(ut==null?void 0:ut.fontStyle)??"normal"},fontSize:F??.01,lineHeight:J,letterSpacing:ht??0,wordSpacing:mt??0,textAppearance:gt,color:E},Pt=Nt(It,e),vt={fontSettings:{fontFamily:B,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:lt??.01,lineHeight:O,letterSpacing:w??0,wordSpacing:K??0,textAppearance:q,color:N},Rt=ue(Nt(vt,e)),Gt=S.buildColorVars(o,{inputColor:v,inputTextColor:L,inputBorderColor:D,placeholderColor:A!=null&&A.trim()?A:"#cccccc",buttonColor:P,buttonTextColor:b,buttonBorderColor:$,labelTextColor:E,successColor:N,errorColor:W},Es,As,ot),[Tt,Bt]=h.useState(()=>Object.fromEntries(dt.map(ft=>[ft.name,""]))),[xt,Ft]=h.useState("idle"),[Qt,Ht]=h.useState(null),Dt=r==="success"?"success":r==="error"?"error":xt,jt=r==="error"?at:Qt,te=r==="filled",ee=h.useMemo(()=>{if(!te)return Tt;let ft=null;for(const zt of dt)(Tt[zt.name]??"").trim().length>0||(ft=ft??{...Tt},ft[zt.name]="Filled");return ft??Tt},[Tt,te,dt]),rr=Dt==="error"?S.getFormFieldValidationError(dt,ee):null,Ye=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),$e=n==null?void 0:n.submitUrl,Cn=(ft,zt)=>{Bt(Wt=>({...Wt,[ft]:zt}))},or=async ft=>{ft.preventDefault();const zt=Object.fromEntries(dt.map(Et=>{var ge;return[Et.name,((ge=Tt[Et.name])==null?void 0:ge.trim())??""]}).filter(([,Et])=>Et));if(!$e){Ft("error"),Ht("No integrations were found for this form.");return}if(Object.keys(zt).length===0)return;const Wt=S.getFormFieldValidationError(dt,Tt);if(Wt){Ft("error"),Ht(Wt);return}Ft("submitting"),Ht(null);try{const Et=await fetch($e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(zt)});if(!Et.ok){const ge=await Et.text();throw new Error(ge||`Request failed: ${Et.status}`)}Ft("success"),Bt(Object.fromEntries(dt.map(ge=>[ge.name,""])))}catch(Et){Ft("error"),Ht(Et instanceof Error?Et.message:"Something went wrong")}};return a.jsxs("div",{className:`${o}-wrapper ${o}-type-${l} ${Ye}`.trim(),style:Gt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ws(o)}}),a.jsxs("form",{onSubmit:or,className:`${o}-form`,style:{gap:S.scalingValue(u??0,e)},children:[a.jsx("div",{className:`${o}-fields`,style:{gap:S.scalingValue(d??0,e)},children:dt.map((ft,zt)=>a.jsxs("div",{className:`${o}-field-group${rt?` ${o}-labeled`:""}`,children:[rt&&a.jsx("span",{className:`${o}-field-label`,style:Pt?{...Pt,lineHeight:Pt.fontSize}:void 0,children:ft.label||ft.name}),ft.type==="textarea"?a.jsx("textarea",{name:ft.name,autoComplete:"off",value:ee[ft.name]??"",onChange:Wt=>Cn(ft.name,Wt.target.value),placeholder:ft.placeholder,className:`${o}-input`,style:tt,rows:1,"data-filled":te||(ee[ft.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ft.type==="phone"?"tel":ft.type==="email"?"email":"text",name:ft.name,autoComplete:"off",value:ee[ft.name]??"",onChange:Wt=>Cn(ft.name,Wt.target.value),placeholder:ft.placeholder,required:ft.isRequired??ft.type==="email",className:`${o}-input`,style:tt,"data-filled":te||(ee[ft.name]??"").trim().length>0})]},zt))}),a.jsx("div",{className:`${o}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:S.scalingValue(T??0,e),borderWidth:wt,paddingTop:S.scalingValue((y==null?void 0:y.top)??0,e),paddingRight:S.scalingValue((y==null?void 0:y.right)??0,e),paddingBottom:S.scalingValue((y==null?void 0:y.bottom)??0,e),paddingLeft:S.scalingValue((y==null?void 0:y.left)??0,e),...St,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${o}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:xt==="submitting"?"...":s})})})]}),Dt==="success"&&a.jsx("p",{className:`${o}-success`,style:{...Rt},children:Q}),Dt==="error"&&a.jsx("p",{className:`${o}-error`,style:{...Rt},role:"alert",children:rr??jt??at})]})}const Es={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},As=["hover","focus","filled","success","error"],Is=`import React, { useMemo, useState } from 'react';\r
142
+ `}function _l({settings:t,isEditor:e,metadata:n,activeEvent:r}){const{prefix:o}=S.useScopedStyles(),{type:l="A",fieldsToShow:i=2,fields:s=[],buttonLabel:d,gap:u,fieldsGap:c,buttonCorners:L,buttonStroke:v,buttonPadding:h,isButtonFullWidth:p,inputCorners:g,inputStroke:$,inputPadding:f,inputColor:x,inputTextColor:b,inputBorderColor:R,placeholderColor:W,buttonColor:_,buttonTextColor:y,buttonBorderColor:w,labelTextColor:E,successColor:H,errorColor:F,fontFamily:O,inputFontSettings:z,inputFontSize:V,inputLineHeight:K,inputLetterSpacing:C,inputWordSpacing:k,inputTextAppearance:I,buttonFontSettings:A,buttonFontSize:P,buttonLineHeight:N,buttonLetterSpacing:Q,buttonWordSpacing:st,buttonTextAppearance:rt,labelFontSettings:ut,labelFontSize:M,labelLineHeight:J,labelLetterSpacing:ht,labelWordSpacing:pt,labelTextAppearance:gt,statusFontSettings:D,statusFontSize:at,statusLineHeight:B,statusLetterSpacing:T,statusWordSpacing:U,statusTextAppearance:q,successMessage:Z,errorMessage:ot,stateOverrides:it}=t,et=l==="B",dt=s.slice(0,Math.min(i,s.length)),j={fontSettings:{fontFamily:O,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:V??.01,lineHeight:K,letterSpacing:C??0,wordSpacing:k??0,textAppearance:I,color:b},X=pe(Vt(j,e)),Y=S.scalingValue($??0,e),lt=S.scalingValue((K??V??.01)+((f==null?void 0:f.top)??0)+((f==null?void 0:f.bottom)??0)+(l==="C"?$??0:($??0)*2),e),nt={...X,borderStyle:"solid",borderRadius:l==="C"?0:S.scalingValue(g??0,e),...l==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Y,borderLeftWidth:0}:{borderWidth:Y},paddingTop:S.scalingValue((f==null?void 0:f.top)??0,e),paddingRight:S.scalingValue((f==null?void 0:f.right)??0,e),paddingBottom:S.scalingValue((f==null?void 0:f.bottom)??0,e),paddingLeft:S.scalingValue((f==null?void 0:f.left)??0,e),height:lt,minHeight:lt},ct={fontSettings:{fontFamily:O,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:P??.01,lineHeight:N,letterSpacing:Q??0,wordSpacing:st??0,textAppearance:rt,color:y},Ct=pe(Vt(ct,e)),Lt=S.scalingValue(v??0,e),Pt={fontSettings:{fontFamily:O,fontWeight:(ut==null?void 0:ut.fontWeight)??400,fontStyle:(ut==null?void 0:ut.fontStyle)??"normal"},fontSize:M??.01,lineHeight:J,letterSpacing:ht??0,wordSpacing:pt??0,textAppearance:gt,color:E},Dt=Vt(Pt,e),St={fontSettings:{fontFamily:O,fontWeight:(D==null?void 0:D.fontWeight)??400,fontStyle:(D==null?void 0:D.fontStyle)??"normal"},fontSize:at??.01,lineHeight:B,letterSpacing:T??0,wordSpacing:U??0,textAppearance:q,color:H},At=pe(Vt(St,e)),Kt=S.buildColorVars(o,{inputColor:x,inputTextColor:b,inputBorderColor:R,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:_,buttonTextColor:y,buttonBorderColor:w,labelTextColor:E,successColor:H,errorColor:F},El,Pl,it),[yt,Wt]=m.useState(()=>Object.fromEntries(dt.map(vt=>[vt.name,""]))),[$t,Mt]=m.useState("idle"),[kt,Rt]=m.useState(null),It=r==="success"?"success":r==="error"?"error":$t,Ut=r==="error"?ot:kt,re=r==="filled",Jt=m.useMemo(()=>{if(!re)return yt;let vt=null;for(const Qt of dt)(yt[Qt.name]??"").trim().length>0||(vt=vt??{...yt},vt[Qt.name]="Filled");return vt??yt},[yt,re,dt]),rr=It==="error"?S.getFormFieldValidationError(dt,Jt):null,ir=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),bt=n==null?void 0:n.submitUrl,Xe=(vt,Qt)=>{Wt(jt=>({...jt,[vt]:Qt}))},Sn=async vt=>{vt.preventDefault();const Qt=Object.fromEntries(dt.map(Ot=>{var Gt;return[Ot.name,((Gt=yt[Ot.name])==null?void 0:Gt.trim())??""]}).filter(([,Ot])=>Ot));if(!bt){Mt("error"),Rt("No integrations were found for this form.");return}if(Object.keys(Qt).length===0)return;const jt=S.getFormFieldValidationError(dt,yt);if(jt){Mt("error"),Rt(jt);return}Mt("submitting"),Rt(null);try{const Ot=await fetch(bt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Qt)});if(!Ot.ok){const Gt=await Ot.text();throw new Error(Gt||`Request failed: ${Ot.status}`)}Mt("success"),Wt(Object.fromEntries(dt.map(Gt=>[Gt.name,""])))}catch(Ot){Mt("error"),Rt(Ot instanceof Error?Ot.message:"Something went wrong")}};return a.jsxs("div",{className:`${o}-wrapper ${o}-type-${l} ${ir}`.trim(),style:Kt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ll(o)}}),a.jsxs("form",{onSubmit:Sn,className:`${o}-form`,style:{gap:S.scalingValue(u??0,e)},children:[a.jsx("div",{className:`${o}-fields`,style:{gap:S.scalingValue(c??0,e)},children:dt.map((vt,Qt)=>a.jsxs("div",{className:`${o}-field-group${et?` ${o}-labeled`:""}`,children:[et&&a.jsx("span",{className:`${o}-field-label`,style:Dt?{...Dt,lineHeight:Dt.fontSize}:void 0,children:vt.label||vt.name}),vt.type==="textarea"?a.jsx("textarea",{name:vt.name,autoComplete:"off",value:Jt[vt.name]??"",onChange:jt=>Xe(vt.name,jt.target.value),placeholder:vt.placeholder,className:`${o}-input`,style:nt,rows:1,"data-filled":re||(Jt[vt.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:vt.type==="phone"?"tel":vt.type==="email"?"email":"text",name:vt.name,autoComplete:"off",value:Jt[vt.name]??"",onChange:jt=>Xe(vt.name,jt.target.value),placeholder:vt.placeholder,required:vt.isRequired??vt.type==="email",className:`${o}-input`,style:nt,"data-filled":re||(Jt[vt.name]??"").trim().length>0})]},Qt))}),a.jsx("div",{className:`${o}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:S.scalingValue(L??0,e),borderWidth:Lt,paddingTop:S.scalingValue((h==null?void 0:h.top)??0,e),paddingRight:S.scalingValue((h==null?void 0:h.right)??0,e),paddingBottom:S.scalingValue((h==null?void 0:h.bottom)??0,e),paddingLeft:S.scalingValue((h==null?void 0:h.left)??0,e),...Ct,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${o}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:$t==="submitting"?"...":d})})})]}),It==="success"&&a.jsx("p",{className:`${o}-success`,style:{...At},children:Z}),It==="error"&&a.jsx("p",{className:`${o}-error`,style:{...At},role:"alert",children:rr??Ut??ot})]})}const El={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"},Pl=["hover","focus","filled","success","error"],Wl=`import React, { useMemo, useState } from 'react';\r
143
143
  import { CommonComponentProps } from '../props';\r
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -740,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
740
740
  };\r
741
741
  \r
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
743
- `,Rs=[{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"}],Wn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ks=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Wn.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:{...Wn.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:{...Wn.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:{...Wn.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:Rs,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:[...ks],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ms={element:_s,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Fs,sourceCode:Is};function _n(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Bs(t){return`
743
+ `,Fl=[{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"}],Pn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Rl=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Il={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Pn.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:{...Pn.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:{...Pn.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:{...Pn.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:Fl,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:[...Rl],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"]},Al={element:_l,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Il,sourceCode:Wl};function Wn(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function kl(t){return`
744
744
  .${t}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
922
922
  align-items: center;
923
923
  }
924
924
  .${t}-success {
925
- margin-top: ${_n(8)};
926
- font-size: ${_n(14)};
925
+ margin-top: ${Wn(8)};
926
+ font-size: ${Wn(14)};
927
927
  color: var(--${t}-success-success-color, var(--${t}-success-color));
928
928
  }
929
929
  .${t}-error {
930
- margin-top: ${_n(8)};
931
- font-size: ${_n(14)};
930
+ margin-top: ${Wn(8)};
931
+ font-size: ${Wn(14)};
932
932
  color: var(--${t}-error-error-color, var(--${t}-error-color));
933
933
  }
934
- `}const Hs=({settings:t,isEditor:e,metadata:n,activeEvent:r})=>{const{prefix:o}=S.useScopedStyles(),{fields:l=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:s=1,fontFamily:u,inputFontSettings:d,inputFontSize:T,inputLineHeight:x,inputLetterSpacing:y,inputWordSpacing:p,inputTextAppearance:f,buttonFontSettings:m,buttonFontSize:g,buttonLineHeight:v,buttonLetterSpacing:L,buttonWordSpacing:D,buttonTextAppearance:A,statusFontSettings:P,statusFontSize:b,statusLineHeight:$,statusLetterSpacing:E,statusWordSpacing:N,statusTextAppearance:W,iconMaxWidth:B,minHeight:H,corners:j,stroke:z,stateOverrides:C,inputPadding:k,buttonPadding:R,successMessage:I="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=t,M=l.slice(0,Math.min(s,l.length)),[Z,it]=h.useState(()=>Object.fromEntries(M.map(vt=>[vt.name,""]))),[nt,ut]=h.useState("idle"),[F,J]=h.useState(null),ht=r==="success"?"success":r==="error"?"error":nt,mt=r==="error"?_:F,gt=r==="filled",G=h.useMemo(()=>{if(!gt)return Z;let vt=null;for(const Rt of M)(Z[Rt.name]??"").trim().length>0||(vt=vt??{...Z},vt[Rt.name]="Filled");return vt??Z},[gt,Z,M]),lt=ht==="error"?S.getFormFieldValidationError(M,G):null,O=r&&r!=="default"?`${o}-state-${r}`:"",w=M.some(vt=>(G[vt.name]??"").trim().length>0),K=O!==`${o}-state-filled`&&w?`${o}-state-filled`:"",q=`${O} ${K}`.trim(),Q=n==null?void 0:n.submitUrl,at=c??"",ot=(i==null?void 0:i.icon)??"",rt=(i==null?void 0:i.mode)==="On",dt=at||"Submit",V={fontSettings:{fontFamily:u,fontWeight:(d==null?void 0:d.fontWeight)??400,fontStyle:(d==null?void 0:d.fontStyle)??"normal"},fontSize:T??.01,lineHeight:x,letterSpacing:y??0,wordSpacing:p??0,textAppearance:f,color:t.inputTextColor??"#111111"},X={fontSettings:{fontFamily:u,fontWeight:(m==null?void 0:m.fontWeight)??400,fontStyle:(m==null?void 0:m.fontStyle)??"normal"},fontSize:g??.01,lineHeight:v,letterSpacing:L??0,wordSpacing:D??0,textAppearance:A,color:t.buttonTextColor??"#ffffff"},Y={fontSettings:{fontFamily:u,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:b??.01,lineHeight:$,letterSpacing:E??0,wordSpacing:N??0,textAppearance:W,color:t.successColor??"#22c55e"},ct=ue(Nt(V,e)),tt=ue(Nt(X,e)),st=ue(Nt(Y,e)),St=S.buildColorVars(o,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(V==null?void 0:V.color)??"#111111",buttonTextColor:t.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},Os,Ns,C),wt={borderRadius:S.scalingValue(j,e),borderWidth:S.scalingValue(z,e),borderStyle:"solid"},It={borderLeftWidth:S.scalingValue(z,e)},Pt=async vt=>{vt.preventDefault();const Rt=Object.fromEntries(M.map(Tt=>{var Bt;return[Tt.name,((Bt=Z[Tt.name])==null?void 0:Bt.trim())??""]}).filter(([,Tt])=>Tt));if(!Q){ut("error"),J("No integrations were found for this form.");return}if(Object.keys(Rt).length===0)return;const Gt=S.getFormFieldValidationError(M,Z);if(Gt){ut("error"),J(Gt);return}ut("submitting"),J(null);try{const Tt=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Rt)});if(!Tt.ok){const Bt=await Tt.text();throw new Error(Bt||`Request failed: ${Tt.status}`)}ut("success"),it(Object.fromEntries(M.map(Bt=>[Bt.name,""])))}catch(Tt){ut("error"),J(Tt instanceof Error?Tt.message:"Something went wrong")}};return a.jsxs("div",{className:`${o}-wrapper ${q}`.trim(),style:St,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Bs(o)}}),a.jsxs("form",{onSubmit:Pt,className:`${o}-form`,style:{...wt,height:S.scalingValue(H,e),minHeight:S.scalingValue(H,e)},children:[a.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:M.map(vt=>a.jsx("input",{type:vt.type==="email"?"email":vt.type==="phone"?"tel":"text",name:vt.name,autoComplete:"off",value:G[vt.name]??"",onChange:Rt=>it(Gt=>({...Gt,[vt.name]:Rt.target.value})),placeholder:vt.placeholder,required:vt.isRequired??vt.type==="email",className:`${o}-input`,style:{...ct,paddingRight:S.scalingValue(k.right,e),paddingLeft:S.scalingValue(k.left,e),paddingTop:S.scalingValue(k.top,e),paddingBottom:S.scalingValue(k.bottom,e)}},vt.name))}),a.jsx("div",{className:`${o}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":dt,style:{...tt,...It,paddingRight:S.scalingValue(R.right,e),paddingLeft:S.scalingValue(R.left,e),paddingTop:S.scalingValue(R.top,e),paddingBottom:S.scalingValue(R.bottom,e)},children:nt==="submitting"?"...":rt?ot&&a.jsx(ye,{url:ot,className:`${o}-submitBtnIcon`,style:{maxWidth:S.scalingValue(B??0,e)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):at})})]}),ht==="success"&&a.jsx("p",{className:`${o}-success`,style:{...st},children:I}),ht==="error"&&a.jsx("p",{className:`${o}-error`,style:{...st},role:"alert",children:lt??mt??_})]})},Os={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Ns=["hover","focus","filled","success","error"],Ds=`import React, { useMemo, useState } from 'react';\r
934
+ `}const Ml=({settings:t,isEditor:e,metadata:n,activeEvent:r})=>{const{prefix:o}=S.useScopedStyles(),{fields:l=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:s,fieldsToShow:d=1,fontFamily:u,inputFontSettings:c,inputFontSize:L,inputLineHeight:v,inputLetterSpacing:h,inputWordSpacing:p,inputTextAppearance:g,buttonFontSettings:$,buttonFontSize:f,buttonLineHeight:x,buttonLetterSpacing:b,buttonWordSpacing:R,buttonTextAppearance:W,statusFontSettings:_,statusFontSize:y,statusLineHeight:w,statusLetterSpacing:E,statusWordSpacing:H,statusTextAppearance:F,iconMaxWidth:O,minHeight:z,corners:V,stroke:K,stateOverrides:C,inputPadding:k,buttonPadding:I,successMessage:A="Thanks for subscribing!",errorMessage:P="Please, fill all required fields."}=t,N=l.slice(0,Math.min(d,l.length)),[Q,st]=m.useState(()=>Object.fromEntries(N.map(St=>[St.name,""]))),[rt,ut]=m.useState("idle"),[M,J]=m.useState(null),ht=r==="success"?"success":r==="error"?"error":rt,pt=r==="error"?P:M,gt=r==="filled",D=m.useMemo(()=>{if(!gt)return Q;let St=null;for(const At of N)(Q[At.name]??"").trim().length>0||(St=St??{...Q},St[At.name]="Filled");return St??Q},[gt,Q,N]),at=ht==="error"?S.getFormFieldValidationError(N,D):null,B=r&&r!=="default"?`${o}-state-${r}`:"",T=N.some(St=>(D[St.name]??"").trim().length>0),U=B!==`${o}-state-filled`&&T?`${o}-state-filled`:"",q=`${B} ${U}`.trim(),Z=n==null?void 0:n.submitUrl,ot=s??"",it=(i==null?void 0:i.icon)??"",et=(i==null?void 0:i.mode)==="On",dt=ot||"Submit",j={fontSettings:{fontFamily:u,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:L??.01,lineHeight:v,letterSpacing:h??0,wordSpacing:p??0,textAppearance:g,color:t.inputTextColor??"#111111"},X={fontSettings:{fontFamily:u,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:f??.01,lineHeight:x,letterSpacing:b??0,wordSpacing:R??0,textAppearance:W,color:t.buttonTextColor??"#ffffff"},Y={fontSettings:{fontFamily:u,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:y??.01,lineHeight:w,letterSpacing:E??0,wordSpacing:H??0,textAppearance:F,color:t.successColor??"#22c55e"},lt=pe(Vt(j,e)),nt=pe(Vt(X,e)),ct=pe(Vt(Y,e)),Ct=S.buildColorVars(o,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(j==null?void 0:j.color)??"#111111",buttonTextColor:t.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},Ol,Nl,C),Lt={borderRadius:S.scalingValue(V,e),borderWidth:S.scalingValue(K,e),borderStyle:"solid"},Pt={borderLeftWidth:S.scalingValue(K,e)},Dt=async St=>{St.preventDefault();const At=Object.fromEntries(N.map(yt=>{var Wt;return[yt.name,((Wt=Q[yt.name])==null?void 0:Wt.trim())??""]}).filter(([,yt])=>yt));if(!Z){ut("error"),J("No integrations were found for this form.");return}if(Object.keys(At).length===0)return;const Kt=S.getFormFieldValidationError(N,Q);if(Kt){ut("error"),J(Kt);return}ut("submitting"),J(null);try{const yt=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(At)});if(!yt.ok){const Wt=await yt.text();throw new Error(Wt||`Request failed: ${yt.status}`)}ut("success"),st(Object.fromEntries(N.map(Wt=>[Wt.name,""])))}catch(yt){ut("error"),J(yt instanceof Error?yt.message:"Something went wrong")}};return a.jsxs("div",{className:`${o}-wrapper ${q}`.trim(),style:Ct,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:kl(o)}}),a.jsxs("form",{onSubmit:Dt,className:`${o}-form`,style:{...Lt,height:S.scalingValue(z,e),minHeight:S.scalingValue(z,e)},children:[a.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(St=>a.jsx("input",{type:St.type==="email"?"email":St.type==="phone"?"tel":"text",name:St.name,autoComplete:"off",value:D[St.name]??"",onChange:At=>st(Kt=>({...Kt,[St.name]:At.target.value})),placeholder:St.placeholder,required:St.isRequired??St.type==="email",className:`${o}-input`,style:{...lt,paddingRight:S.scalingValue(k.right,e),paddingLeft:S.scalingValue(k.left,e),paddingTop:S.scalingValue(k.top,e),paddingBottom:S.scalingValue(k.bottom,e)}},St.name))}),a.jsx("div",{className:`${o}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":dt,style:{...nt,...Pt,paddingRight:S.scalingValue(I.right,e),paddingLeft:S.scalingValue(I.left,e),paddingTop:S.scalingValue(I.top,e),paddingBottom:S.scalingValue(I.bottom,e)},children:rt==="submitting"?"...":et?it&&a.jsx(ve,{url:it,className:`${o}-submitBtnIcon`,style:{maxWidth:S.scalingValue(O??0,e)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):ot})})]}),ht==="success"&&a.jsx("p",{className:`${o}-success`,style:{...ct},children:A}),ht==="error"&&a.jsx("p",{className:`${o}-error`,style:{...ct},role:"alert",children:at??pt??P})]})},Ol={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"},Nl=["hover","focus","filled","success","error"],Hl=`import React, { useMemo, useState } from 'react';\r
935
935
  import { CommonComponentProps } from '../props';\r
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1503,7 +1503,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1503
1503
  };\r
1504
1504
  \r
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1506
- `,js="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),zs=[{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."}],gr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Vs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ks={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...gr.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:{...gr.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:{...gr.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:zs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:js},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vs],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"]},Us={element:Hs,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Ks,sourceCode:Ds};function xo(t){return`
1506
+ `,Bl="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>'),zl=[{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."}],pr={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Dl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],jl={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"Input Padding",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"Button Padding",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"numeric-input"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...pr.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:{...pr.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:{...pr.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:zl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Bl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight"]},{type:"row",items:["corners","stroke"]},{type:"row",title:"",items:["inputPadding","buttonPadding"]},{type:"row",title:"",items:["buttonIcon"]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Dl],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"]},Vl={element:Ml,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:jl,sourceCode:Hl};function vo(t){return`
1507
1507
  .${t}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
@@ -1590,7 +1590,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1590
1590
  pointer-events: auto;
1591
1591
  z-index: 10;
1592
1592
  }
1593
- `}const Gs=30,Ys=({settings:t,content:e,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=S.useScopedStyles(),{autoplay:l,align:i,speed:c,direction:s,pauseOnHover:u,gap:d,cardWidth:T,corners:x,stroke:y,strokeColor:p,bgColor:f,padding:m,logoMarginTop:g,logoWidth:v,logoHeight:L,captionMarginTop:D}=t,A=l==="on"&&!r,P=A,b=Math.max(0,c)*Gs,$=V=>S.scalingValue(V,n??!1),E=h.useRef(null),N=h.useRef(null),W=h.useRef(null),[B,H]=h.useState(0),[j,z]=h.useState(0),[C,k]=h.useState(0),R=P&&u==="on",[I,_]=h.useState(!1),M=h.useRef(null),[Z,it]=h.useState(0),[nt,ut]=h.useState(0),F=h.useRef(null),J=V=>{var Y,ct,tt,st,St;return{fontSettings:{fontFamily:(t==null?void 0:t[`${V}FontFamily`])??"Arial",fontWeight:((Y=t==null?void 0:t[`${V}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((ct=t==null?void 0:t[`${V}FontSettings`])==null?void 0:ct.fontStyle)??"normal"},textAppearance:{textTransform:((tt=t==null?void 0:t[`${V}TextAppearance`])==null?void 0:tt.textTransform)??"none",textDecoration:((st=t==null?void 0:t[`${V}TextAppearance`])==null?void 0:st.textDecoration)??"none",fontVariant:((St=t==null?void 0:t[`${V}TextAppearance`])==null?void 0:St.fontVariant)??"normal"},letterSpacing:(t==null?void 0:t[`${V}LetterSpacing`])??0,wordSpacing:(t==null?void 0:t[`${V}WordSpacing`])??0,fontSize:(t==null?void 0:t[`${V}FontSize`])??.01,lineHeight:(t==null?void 0:t[`${V}LineHeight`])??.01,color:(t==null?void 0:t[`${V}Color`])??"#000000"}},ht=J("text"),mt=J("caption"),gt=h.useMemo(()=>((e==null?void 0:e.length)??0)>1&&(e??[]).some(V=>{var X,Y;return(((X=V.text)==null?void 0:X.length)??0)>0||(((Y=V.caption)==null?void 0:Y.length)??0)>0}),[e]),G=h.useMemo(()=>!A||(e==null?void 0:e.length)===0?1:j<=0||B<=0?2:Math.max(2,Math.ceil(B/j)+1),[A,e==null?void 0:e.length,j,B]);h.useLayoutEffect(()=>{if(!A)return;const V=E.current,X=W.current;if(!V||!X)return;let Y=0;const ct=()=>{const St=V.getBoundingClientRect().width,wt=X.getBoundingClientRect().width,It=F.current,Pt=typeof It=="number"&&Math.abs(It-wt)<=.25;if(F.current=wt,H(St),typeof wt=="number"&&wt>0&&j<=0){z(wt);return}Pt&&wt!==j?z(wt):!Pt&&j<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(ct))},tt=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(ct)};tt();const st=new ResizeObserver(tt);return st.observe(V),st.observe(X),()=>{cancelAnimationFrame(Y),st.disconnect()}},[A,j]),h.useLayoutEffect(()=>{const V=N.current;if(!A||!V||!P)return;const X=j>0?j:0,Y=X>0&&b>0?X/b*1e3:0,ct=`${Math.max(0,Y)/1e3}s`;V.style.setProperty("--marquee-distance",`${X}px`),V.style.setProperty("--marquee-duration",ct)},[A,P,b,j]),h.useLayoutEffect(()=>{if(!A){k(0);return}const V=N.current;if(!V)return;const X=()=>{const ct=V.getBoundingClientRect().height;k(ct>0?ct:0)};X();const Y=new ResizeObserver(X);return Y.observe(V),()=>{Y.disconnect()}},[A,G,e,n,d,T,m,y,x,v,L]);const lt=()=>{R&&_(!0)},O=()=>{R&&_(!1)},w=h.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),K=h.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),q=h.useCallback((V,X,Y,ct)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[a.jsx("div",{"data-controls":ct==null?void 0:ct.controlsName,"data-controls-axis":"y",className:`${o}-control`,style:{height:$((ct==null?void 0:ct.marginTop)??0)}}),a.jsx("div",{...ct!=null&&ct.dataMeasureKind?{"data-testimonial-measure":ct.dataMeasureKind}:{},style:{...Nt(V,n),textAlign:K,pointerEvents:"auto",...typeof(ct==null?void 0:ct.minHeightPx)=="number"&&ct.minHeightPx>0?{minHeight:ct.minHeightPx}:{}},children:a.jsx(sn,{content:X})})]},Y),[w,K,n]),Q=h.useCallback((V,X,Y)=>{var ct,tt,st;return a.jsxs("div",{style:{padding:`${$(m.top)} ${$(m.right)} ${$(m.bottom)} ${$(m.left)}`,width:$(T+y*2),height:"100%",borderRadius:$(x),border:`${$(y)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${o}-cover`,style:{background:f}}),a.jsxs("div",{className:`${o}-elements-overlay`,style:{alignItems:w,textAlign:K},children:[V.text&&q(ht,V.text,"text",Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Y==null?void 0:Y.textMinHeightPx)=="number"&&Y.textMinHeightPx>0?{minHeightPx:Y.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${o}-control`,style:{height:$(g)}}),a.jsx("div",{style:{width:$(v),height:$(L)},children:((ct=V.logo)==null?void 0:ct.url)&&a.jsx("img",{src:V.logo.url,alt:((tt=V.logo)==null?void 0:tt.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((st=V.logo)==null?void 0:st.objectFit)||"contain"}})})]}),V.caption&&q(mt,V.caption,"caption",{controlsName:"captionMarginTop",marginTop:D,...Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Y==null?void 0:Y.captionMinHeightPx)=="number"&&Y.captionMinHeightPx>0?{minHeightPx:Y.captionMinHeightPx}:{}})]})]},X)},[f,D,mt,T,x,L,g,v,w,K,m.bottom,m.left,m.right,m.top,q,y,p,ht,n]),at=h.useCallback(V=>{it(V.maxTextPx),ut(V.maxCaptionPx)},[]);h.useLayoutEffect(()=>{if(!gt){at({maxTextPx:0,maxCaptionPx:0});return}const V=M.current;if(!V)return;const X=()=>{S.readTestimonialTextMeasure(V,at)};X();const Y=new ResizeObserver(X);return Y.observe(V),()=>{Y.disconnect()}},[gt,at,e,Q]);const ot=gt?{textMinHeightPx:Z,captionMinHeightPx:nt}:void 0,rt=gt?a.jsx("div",{ref:M,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(e??[]).map((V,X)=>Q(V,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,dt=(V,X)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Q(V,`card-${X}`,ot),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(d)})`,width:$(d),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);return A&&((e==null?void 0:e.length)??0)>0?a.jsxs("div",{ref:E,className:bt(`${o}-wrapper`,`${o}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...C>0?{height:C}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:xo(o)}}),rt,a.jsx("div",{ref:N,className:`${o}-marquee-track`,"data-direction":s,onMouseEnter:lt,onMouseLeave:O,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...R?{"--marquee-play-state":I?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:G},(V,X)=>a.jsx("div",{ref:X===0?W:void 0,className:`${o}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(d),paddingRight:$(d)},"aria-hidden":X>0,children:e==null?void 0:e.map((Y,ct)=>dt(Y,`${X}-${ct}`))},`set-${X}`))})]}):a.jsxs("div",{className:`${o}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:xo(o)}}),rt,a.jsx("div",{style:{gap:$(d),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:e==null?void 0:e.map((V,X)=>dt(V,X))})]})},qs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1593
+ `}const Kl=30,Ul=({settings:t,content:e,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=S.useScopedStyles(),{autoplay:l,align:i,speed:s,direction:d,pauseOnHover:u,gap:c,cardWidth:L,corners:v,stroke:h,strokeColor:p,bgColor:g,padding:$,logoMarginTop:f,logoWidth:x,logoHeight:b,captionMarginTop:R}=t,W=l==="on"&&!r,_=W,y=Math.max(0,s)*Kl,w=j=>S.scalingValue(j,n??!1),E=m.useRef(null),H=m.useRef(null),F=m.useRef(null),[O,z]=m.useState(0),[V,K]=m.useState(0),[C,k]=m.useState(0),I=_&&u==="on",[A,P]=m.useState(!1),N=m.useRef(null),[Q,st]=m.useState(0),[rt,ut]=m.useState(0),M=m.useRef(null),J=j=>{var Y,lt,nt,ct,Ct;return{fontSettings:{fontFamily:(t==null?void 0:t[`${j}FontFamily`])??"Arial",fontWeight:((Y=t==null?void 0:t[`${j}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((lt=t==null?void 0:t[`${j}FontSettings`])==null?void 0:lt.fontStyle)??"normal"},textAppearance:{textTransform:((nt=t==null?void 0:t[`${j}TextAppearance`])==null?void 0:nt.textTransform)??"none",textDecoration:((ct=t==null?void 0:t[`${j}TextAppearance`])==null?void 0:ct.textDecoration)??"none",fontVariant:((Ct=t==null?void 0:t[`${j}TextAppearance`])==null?void 0:Ct.fontVariant)??"normal"},letterSpacing:(t==null?void 0:t[`${j}LetterSpacing`])??0,wordSpacing:(t==null?void 0:t[`${j}WordSpacing`])??0,fontSize:(t==null?void 0:t[`${j}FontSize`])??.01,lineHeight:(t==null?void 0:t[`${j}LineHeight`])??.01,color:(t==null?void 0:t[`${j}Color`])??"#000000"}},ht=J("text"),pt=J("caption"),gt=m.useMemo(()=>((e==null?void 0:e.length)??0)>1&&(e??[]).some(j=>{var X,Y;return(((X=j.text)==null?void 0:X.length)??0)>0||(((Y=j.caption)==null?void 0:Y.length)??0)>0}),[e]),D=m.useMemo(()=>!W||(e==null?void 0:e.length)===0?1:V<=0||O<=0?2:Math.max(2,Math.ceil(O/V)+1),[W,e==null?void 0:e.length,V,O]);m.useLayoutEffect(()=>{if(!W)return;const j=E.current,X=F.current;if(!j||!X)return;let Y=0;const lt=()=>{const Ct=j.getBoundingClientRect().width,Lt=X.getBoundingClientRect().width,Pt=M.current,Dt=typeof Pt=="number"&&Math.abs(Pt-Lt)<=.25;if(M.current=Lt,z(Ct),typeof Lt=="number"&&Lt>0&&V<=0){K(Lt);return}Dt&&Lt!==V?K(Lt):!Dt&&V<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(lt))},nt=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(lt)};nt();const ct=new ResizeObserver(nt);return ct.observe(j),ct.observe(X),()=>{cancelAnimationFrame(Y),ct.disconnect()}},[W,V]),m.useLayoutEffect(()=>{const j=H.current;if(!W||!j||!_)return;const X=V>0?V:0,Y=X>0&&y>0?X/y*1e3:0,lt=`${Math.max(0,Y)/1e3}s`;j.style.setProperty("--marquee-distance",`${X}px`),j.style.setProperty("--marquee-duration",lt)},[W,_,y,V]),m.useLayoutEffect(()=>{if(!W){k(0);return}const j=H.current;if(!j)return;const X=()=>{const lt=j.getBoundingClientRect().height;k(lt>0?lt:0)};X();const Y=new ResizeObserver(X);return Y.observe(j),()=>{Y.disconnect()}},[W,D,e,n,c,L,$,h,v,x,b]);const at=()=>{I&&P(!0)},B=()=>{I&&P(!1)},T=m.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),U=m.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),q=m.useCallback((j,X,Y,lt)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":lt==null?void 0:lt.controlsName,"data-controls-axis":"y",className:`${o}-control`,style:{height:w((lt==null?void 0:lt.marginTop)??0)}}),a.jsx("div",{...lt!=null&&lt.dataMeasureKind?{"data-testimonial-measure":lt.dataMeasureKind}:{},style:{...Vt(j,n),textAlign:U,pointerEvents:"auto",...typeof(lt==null?void 0:lt.minHeightPx)=="number"&&lt.minHeightPx>0?{minHeight:lt.minHeightPx}:{}},children:a.jsx(un,{content:X})})]},Y),[T,U,n]),Z=m.useCallback((j,X,Y)=>{var lt,nt,ct;return a.jsxs("div",{style:{padding:`${w($.top)} ${w($.right)} ${w($.bottom)} ${w($.left)}`,width:w(L+h*2),height:"100%",borderRadius:w(v),border:`${w(h)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${o}-cover`,style:{background:g}}),a.jsxs("div",{className:`${o}-elements-overlay`,style:{alignItems:T,textAlign:U},children:[j.text&&q(ht,j.text,"text",Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Y==null?void 0:Y.textMinHeightPx)=="number"&&Y.textMinHeightPx>0?{minHeightPx:Y.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:T,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${o}-control`,style:{height:w(f)}}),a.jsx("div",{style:{width:w(x),height:w(b)},children:((lt=j.logo)==null?void 0:lt.url)&&a.jsx("img",{src:j.logo.url,alt:((nt=j.logo)==null?void 0:nt.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ct=j.logo)==null?void 0:ct.objectFit)||"contain"}})})]}),j.caption&&q(pt,j.caption,"caption",{controlsName:"captionMarginTop",marginTop:R,...Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Y==null?void 0:Y.captionMinHeightPx)=="number"&&Y.captionMinHeightPx>0?{minHeightPx:Y.captionMinHeightPx}:{}})]})]},X)},[g,R,pt,L,v,b,f,x,T,U,$.bottom,$.left,$.right,$.top,q,h,p,ht,n]),ot=m.useCallback(j=>{st(j.maxTextPx),ut(j.maxCaptionPx)},[]);m.useLayoutEffect(()=>{if(!gt){ot({maxTextPx:0,maxCaptionPx:0});return}const j=N.current;if(!j)return;const X=()=>{S.readTestimonialTextMeasure(j,ot)};X();const Y=new ResizeObserver(X);return Y.observe(j),()=>{Y.disconnect()}},[gt,ot,e,Z]);const it=gt?{textMinHeightPx:Q,captionMinHeightPx:rt}:void 0,et=gt?a.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(e??[]).map((j,X)=>Z(j,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,dt=(j,X)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Z(j,`card-${X}`,it),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${w(c)})`,width:w(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);return W&&((e==null?void 0:e.length)??0)>0?a.jsxs("div",{ref:E,className:xt(`${o}-wrapper`,`${o}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...C>0?{height:C}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:vo(o)}}),et,a.jsx("div",{ref:H,className:`${o}-marquee-track`,"data-direction":d,onMouseEnter:at,onMouseLeave:B,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...I?{"--marquee-play-state":A?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:D},(j,X)=>a.jsx("div",{ref:X===0?F:void 0,className:`${o}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:w(c),paddingRight:w(c)},"aria-hidden":X>0,children:e==null?void 0:e.map((Y,lt)=>dt(Y,`${X}-${lt}`))},`set-${X}`))})]}):a.jsxs("div",{className:`${o}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:vo(o)}}),et,a.jsx("div",{style:{gap:w(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:e==null?void 0:e.map((j,X)=>dt(j,X))})]})},Gl=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
1594
1594
  import cn from 'classnames';\r
1595
1595
  import { CommonComponentProps } from '../props';\r
1596
1596
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -2186,7 +2186,7 @@ type TestimonialsSettings = {\r
2186
2186
  logoHeight: number;\r
2187
2187
  captionMarginTop: number;\r
2188
2188
  };\r
2189
- `,Co={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Xs={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 color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Co.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:{...Co.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"}]}]}]}},Zs={element:Ys,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:"100%",height:320},schema:Xs,sourceCode:qs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Js(t){return`
2189
+ `,bo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Yl={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 color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...bo.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:{...bo.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"}]}]}]}},ql={element:Ul,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:"100%",height:320},schema:Yl,sourceCode:Gl,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Xl(t){return`
2190
2190
  .${t}-container {
2191
2191
  position: relative;
2192
2192
  overflow-x: clip;
@@ -2310,7 +2310,7 @@ type TestimonialsSettings = {\r
2310
2310
  width: 100%;
2311
2311
  height: 100%;
2312
2312
  }
2313
- `}const Qs=({settings:t,content:e,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=S.useScopedStyles(),l=e||[],{autoplay:i,delay:c,align:s,width:u,imageMarginTop:d,textMarginTop:T,captionMarginTop:x,imageWidth:y,imageHeight:p,controlsWidth:f,controlsColor:m,controlsHoverColor:g}=t,v=i==="on"&&!r,[L,D]=h.useState(0),[A,P]=h.useState(null),[b,$]=h.useState(!1),E=h.useRef(null),N=h.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),W=h.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]);h.useEffect(()=>{D(0),P(null),$(!1)},[l.length]);const B=l[L],H=A===null?null:l[A],j=G=>{var O,w,K,q,Q;return{fontSettings:{fontFamily:(t==null?void 0:t[`${G}FontFamily`])??"Arial",fontWeight:((O=t==null?void 0:t[`${G}FontSettings`])==null?void 0:O.fontWeight)??400,fontStyle:((w=t==null?void 0:t[`${G}FontSettings`])==null?void 0:w.fontStyle)??"normal"},textAppearance:{textTransform:((K=t==null?void 0:t[`${G}TextAppearance`])==null?void 0:K.textTransform)??"none",textDecoration:((q=t==null?void 0:t[`${G}TextAppearance`])==null?void 0:q.textDecoration)??"none",fontVariant:((Q=t==null?void 0:t[`${G}TextAppearance`])==null?void 0:Q.fontVariant)??"normal"},fontSize:(t==null?void 0:t[`${G}FontSize`])??.01,lineHeight:(t==null?void 0:t[`${G}LineHeight`])??.01,letterSpacing:(t==null?void 0:t[`${G}LetterSpacing`])??0,wordSpacing:(t==null?void 0:t[`${G}WordSpacing`])??0,color:(t==null?void 0:t[`${G}Color`])??"#000000"}},z=j("text"),C=j("caption"),k=l.length>1&&l.some(G=>{var lt,O;return(((lt=G.text)==null?void 0:lt.length)??0)>0||(((O=G.caption)==null?void 0:O.length)??0)>0}),R=h.useRef(null),[I,_]=h.useState(0),[M,Z]=h.useState(0),it=t.controls??{mode:"Off",icon:null},nt=l.length>1,ut=h.useCallback((G,lt)=>!nt||lt===G?G:(E.current&&window.clearTimeout(E.current),P(G),$(!0),E.current=window.setTimeout(()=>{P(null),$(!1),E.current=null},300),lt),[nt]),F=h.useCallback(()=>{nt&&D(G=>ut(G,(G-1+l.length)%l.length))},[nt,ut,l.length]),J=h.useCallback(()=>{nt&&D(G=>ut(G,(G+1)%l.length))},[nt,ut,l.length]);h.useEffect(()=>{if(!v||!nt)return;const G=Math.max(300,Number.isFinite(c*1e3)?c*1e3:0),lt=window.setInterval(()=>{D(O=>ut(O,(O+1)%l.length))},G);return()=>{window.clearInterval(lt)}},[v,nt,ut,l.length,c]),h.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const ht=(G,lt)=>{var q,Q,at,ot;const O=lt==null?void 0:lt.textMinHeightPx,w=lt==null?void 0:lt.captionMinHeightPx,K=lt==null?void 0:lt.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[G.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:N,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${o}-control`,style:{height:S.scalingValue(T??0,n??!1)}}),a.jsx("div",{...K&&{"data-testimonial-measure":"text"},style:{...Nt(z,n),...O&&O>0?{minHeight:O}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(sn,{content:G.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:N,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${o}-control`,style:{height:S.scalingValue(d??0,n??!1)}}),a.jsx("div",{style:{width:S.scalingValue(y??0,n??!1),height:S.scalingValue(p??0,n??!1)},children:((q=G.image)==null?void 0:q.url)&&a.jsx("img",{src:(Q=G.image)==null?void 0:Q.url,alt:((at=G.image)==null?void 0:at.name)??"",className:`${o}-icon`,style:{objectFit:((ot=G.image)==null?void 0:ot.objectFit)||"contain"}})})]}),G.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:N,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${o}-control`,style:{height:S.scalingValue(x??0,n??!1)}}),a.jsx("div",{...K?{"data-testimonial-measure":"caption"}:{},style:{...Nt(C,n),...w&&w>0?{minHeight:w}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(sn,{content:G.caption})})]})]})},mt=h.useCallback(G=>{_(G.maxTextPx),Z(G.maxCaptionPx)},[]);if(h.useLayoutEffect(()=>{if(!k){mt({maxTextPx:0,maxCaptionPx:0});return}const G=R.current;if(!G)return;const lt=()=>{S.readTestimonialTextMeasure(G,mt)};lt();const O=new ResizeObserver(lt);return O.observe(G),()=>{O.disconnect()}},[k,mt,e]),!B)return a.jsx(a.Fragment,{});const gt=k?{textMinHeightPx:I,captionMinHeightPx:M}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${o}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Js(o)}}),a.jsxs("div",{className:`${o}-wrapper`,style:{width:S.scalingValue(u??0,n??!1),alignItems:N},children:[k&&a.jsx("div",{ref:R,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((G,lt)=>a.jsx("div",{style:{width:"100%"},children:ht(G,{dataMeasureAttrs:!0})},lt))}),a.jsxs("div",{className:`${o}-fade-stack`,children:[H&&b&&a.jsx("div",{className:bt(`${o}-fade-item-prev`,`${o}-fade-out`),children:ht(H,gt)}),a.jsx("div",{className:bt(`${o}-fade-item-current`,b?`${o}-fade-in`:void 0),children:ht(B,gt)})]})]}),it.mode==="On"&&a.jsxs("div",{className:`${o}-controls`,children:[a.jsx("div",{className:`${o}-arrow`,style:{width:S.scalingValue(f??.02,n??!1),height:S.scalingValue(f??.02,n??!1),"--arrow-hover-color":g},children:a.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:F,disabled:!nt,"aria-label":"Previous testimonial",children:it.icon&&a.jsx(ye,{url:it.icon,fill:m,hoverFill:g,className:bt(`${o}-arrow-img`,`${o}-mirror`)})})}),a.jsx("div",{className:bt(`${o}-arrow`,`${o}-next-arrow`),style:{width:S.scalingValue(f??.02,n??!1),height:S.scalingValue(f??.02,n??!1),"--arrow-hover-color":g},children:a.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:J,disabled:!nt,"aria-label":"Next testimonial",children:it.icon&&a.jsx(ye,{url:it.icon,fill:m,hoverFill:g,className:`${o}-arrow-img`})})})]})]})})},tc=`import cn from 'classnames';\r
2313
+ `}const Zl=({settings:t,content:e,isEditor:n,isPreviewMode:r})=>{const{prefix:o}=S.useScopedStyles(),l=e||[],{autoplay:i,delay:s,align:d,width:u,imageMarginTop:c,textMarginTop:L,captionMarginTop:v,imageWidth:h,imageHeight:p,controlsWidth:g,controlsColor:$,controlsHoverColor:f}=t,x=i==="on"&&!r,[b,R]=m.useState(0),[W,_]=m.useState(null),[y,w]=m.useState(!1),E=m.useRef(null),H=m.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),F=m.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);m.useEffect(()=>{R(0),_(null),w(!1)},[l.length]);const O=l[b],z=W===null?null:l[W],V=D=>{var B,T,U,q,Z;return{fontSettings:{fontFamily:(t==null?void 0:t[`${D}FontFamily`])??"Arial",fontWeight:((B=t==null?void 0:t[`${D}FontSettings`])==null?void 0:B.fontWeight)??400,fontStyle:((T=t==null?void 0:t[`${D}FontSettings`])==null?void 0:T.fontStyle)??"normal"},textAppearance:{textTransform:((U=t==null?void 0:t[`${D}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((q=t==null?void 0:t[`${D}TextAppearance`])==null?void 0:q.textDecoration)??"none",fontVariant:((Z=t==null?void 0:t[`${D}TextAppearance`])==null?void 0:Z.fontVariant)??"normal"},fontSize:(t==null?void 0:t[`${D}FontSize`])??.01,lineHeight:(t==null?void 0:t[`${D}LineHeight`])??.01,letterSpacing:(t==null?void 0:t[`${D}LetterSpacing`])??0,wordSpacing:(t==null?void 0:t[`${D}WordSpacing`])??0,color:(t==null?void 0:t[`${D}Color`])??"#000000"}},K=V("text"),C=V("caption"),k=l.length>1&&l.some(D=>{var at,B;return(((at=D.text)==null?void 0:at.length)??0)>0||(((B=D.caption)==null?void 0:B.length)??0)>0}),I=m.useRef(null),[A,P]=m.useState(0),[N,Q]=m.useState(0),st=t.controls??{mode:"Off",icon:null},rt=l.length>1,ut=m.useCallback((D,at)=>!rt||at===D?D:(E.current&&window.clearTimeout(E.current),_(D),w(!0),E.current=window.setTimeout(()=>{_(null),w(!1),E.current=null},300),at),[rt]),M=m.useCallback(()=>{rt&&R(D=>ut(D,(D-1+l.length)%l.length))},[rt,ut,l.length]),J=m.useCallback(()=>{rt&&R(D=>ut(D,(D+1)%l.length))},[rt,ut,l.length]);m.useEffect(()=>{if(!x||!rt)return;const D=Math.max(300,Number.isFinite(s*1e3)?s*1e3:0),at=window.setInterval(()=>{R(B=>ut(B,(B+1)%l.length))},D);return()=>{window.clearInterval(at)}},[x,rt,ut,l.length,s]),m.useEffect(()=>()=>{E.current&&window.clearTimeout(E.current)},[]);const ht=(D,at)=>{var q,Z,ot,it;const B=at==null?void 0:at.textMinHeightPx,T=at==null?void 0:at.captionMinHeightPx,U=at==null?void 0:at.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[D.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${o}-control`,style:{height:S.scalingValue(L??0,n??!1)}}),a.jsx("div",{...U&&{"data-testimonial-measure":"text"},style:{...Vt(K,n),...B&&B>0?{minHeight:B}:{},textAlign:F,pointerEvents:"auto"},children:a.jsx(un,{content:D.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${o}-control`,style:{height:S.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:S.scalingValue(h??0,n??!1),height:S.scalingValue(p??0,n??!1)},children:((q=D.image)==null?void 0:q.url)&&a.jsx("img",{src:(Z=D.image)==null?void 0:Z.url,alt:((ot=D.image)==null?void 0:ot.name)??"",className:`${o}-icon`,style:{objectFit:((it=D.image)==null?void 0:it.objectFit)||"contain"}})})]}),D.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:H,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${o}-control`,style:{height:S.scalingValue(v??0,n??!1)}}),a.jsx("div",{...U?{"data-testimonial-measure":"caption"}:{},style:{...Vt(C,n),...T&&T>0?{minHeight:T}:{},textAlign:F,pointerEvents:"auto"},children:a.jsx(un,{content:D.caption})})]})]})},pt=m.useCallback(D=>{P(D.maxTextPx),Q(D.maxCaptionPx)},[]);if(m.useLayoutEffect(()=>{if(!k){pt({maxTextPx:0,maxCaptionPx:0});return}const D=I.current;if(!D)return;const at=()=>{S.readTestimonialTextMeasure(D,pt)};at();const B=new ResizeObserver(at);return B.observe(D),()=>{B.disconnect()}},[k,pt,e]),!O)return a.jsx(a.Fragment,{});const gt=k?{textMinHeightPx:A,captionMinHeightPx:N}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${o}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Xl(o)}}),a.jsxs("div",{className:`${o}-wrapper`,style:{width:S.scalingValue(u??0,n??!1),alignItems:H},children:[k&&a.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((D,at)=>a.jsx("div",{style:{width:"100%"},children:ht(D,{dataMeasureAttrs:!0})},at))}),a.jsxs("div",{className:`${o}-fade-stack`,children:[z&&y&&a.jsx("div",{className:xt(`${o}-fade-item-prev`,`${o}-fade-out`),children:ht(z,gt)}),a.jsx("div",{className:xt(`${o}-fade-item-current`,y?`${o}-fade-in`:void 0),children:ht(O,gt)})]})]}),st.mode==="On"&&a.jsxs("div",{className:`${o}-controls`,children:[a.jsx("div",{className:`${o}-arrow`,style:{width:S.scalingValue(g??.02,n??!1),height:S.scalingValue(g??.02,n??!1),"--arrow-hover-color":f},children:a.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:M,disabled:!rt,"aria-label":"Previous testimonial",children:st.icon&&a.jsx(ve,{url:st.icon,fill:$,hoverFill:f,className:xt(`${o}-arrow-img`,`${o}-mirror`)})})}),a.jsx("div",{className:xt(`${o}-arrow`,`${o}-next-arrow`),style:{width:S.scalingValue(g??.02,n??!1),height:S.scalingValue(g??.02,n??!1),"--arrow-hover-color":f},children:a.jsx("button",{type:"button",className:`${o}-arrow-inner`,onClick:J,disabled:!rt,"aria-label":"Next testimonial",children:st.icon&&a.jsx(ve,{url:st.icon,fill:$,hoverFill:f,className:`${o}-arrow-img`})})})]})]})})},Jl=`import cn from 'classnames';\r
2314
2314
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\r
2315
2315
  import { CommonComponentProps } from '../props';\r
2316
2316
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';\r
@@ -2802,11 +2802,11 @@ type TestimonialsSettings = {\r
2802
2802
  icon?: string | null;\r
2803
2803
  };\r
2804
2804
  };\r
2805
- `,ec="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>'),So={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},nc={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:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...So.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...So.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"on",controls:{mode:"On",icon:ec},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Charter",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},rc={element:Qs,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonialsSingle.png"},defaultSize:{width:700,height:300},schema:nc,sourceCode:tc,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function oc(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function ic(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function ac(t){return`
2805
+ `,Ql="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>'),xo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},tc={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:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...xo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...xo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"on",controls:{mode:"On",icon:Ql},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Charter",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","delay"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ec={element:Zl,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonialsSingle.png"},defaultSize:{width:700,height:300},schema:tc,sourceCode:Jl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function nc(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function rc(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function oc(t){return`
2806
2806
  .${t}-wrapper {
2807
2807
  display: grid;
2808
2808
  align-items: start;
2809
- min-height: ${ic(48)};
2809
+ min-height: ${rc(48)};
2810
2810
  }
2811
2811
  .${t}-item {
2812
2812
  display: flex;
@@ -2890,7 +2890,7 @@ type TestimonialsSettings = {\r
2890
2890
  pointer-events: auto;
2891
2891
  z-index: 10;
2892
2892
  }
2893
- `}const he=500,Pe="cubic-bezier(0.22, 1, 0.36, 1)";function lc({images:t,index:e,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:c}){const s=h.useRef(null),u=h.useRef(null),[d,T]=h.useState(null),[x,y]=h.useState(r?"opening":"open"),[p,f]=h.useState(!0),m=h.useRef(e),g=h.useCallback(()=>{const b=s.current,$=u.current;if(!b||!$)return;const E=b.getBoundingClientRect(),N=E.width,W=E.height,B=$.naturalWidth,H=$.naturalHeight;if(!N||!W||!B||!H)return;if(n==="Cover"){T({width:N,height:W,left:E.left,top:E.top});return}const j=B/H,z=N/W;if(j>z){const C=N/j;T({width:N,height:C,left:E.left,top:E.top+(W-C)/2})}else{const C=W*j;T({width:C,height:W,left:E.left+(N-C)/2,top:E.top})}},[n]);h.useEffect(()=>{g();const b=s.current;if(!b)return;const $=new ResizeObserver(()=>g());return $.observe(b),()=>$.disconnect()},[g,e]),h.useEffect(()=>{if(x!=="opening"||!d)return;const b={id:0};return b.id=requestAnimationFrame(()=>{b.id=requestAnimationFrame(()=>y("open"))}),()=>cancelAnimationFrame(b.id)},[x,d]),h.useEffect(()=>{if(x!=="closing")return;const b=setTimeout(()=>l(),he);return()=>clearTimeout(b)},[x,l]),h.useEffect(()=>{m.current!==e&&f(!1),m.current=e},[e]);const v=()=>{x!=="closing"&&y("closing")},L=x==="open",D=x==="closing",A=D&&o&&!!r,P=x==="opening"?r??d:A?r:d;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:v,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:L?1:0,transition:`opacity ${he}ms ${Pe}`,pointerEvents:"none"}}),a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:L?1:0,transition:`opacity ${he}ms ${Pe}`,fontFamily:oc()},children:t.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("p",{children:e+1}),a.jsx("p",{children:"/"}),a.jsx("p",{children:t.length})]})})]}),P&&a.jsx("img",{ref:u,src:t[e],onLoad:g,style:{position:"fixed",top:P.top,left:P.left,width:P.width,height:P.height,objectFit:n==="Cover"?"cover":"contain",opacity:D&&!A?0:1,transition:D&&!A?`opacity ${he}ms ${Pe}`:A||p?`top ${he}ms ${Pe}, left ${he}ms ${Pe}, width ${he}ms ${Pe}, height ${he}ms ${Pe}`:"none",pointerEvents:"none",zIndex:9998}}),L&&d&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:d.top,left:d.left,width:d.width/2,height:d.height,cursor:"w-resize",zIndex:9999},onClick:b=>{b.stopPropagation(),i()}}),a.jsx("div",{style:{position:"fixed",top:d.top,left:d.left+d.width/2,width:d.width/2,height:d.height,cursor:"e-resize",zIndex:9999},onClick:b=>{b.stopPropagation(),c()}})]})]})}function sc({settings:t,content:e,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:l,layoutId:i}){const{prefix:c}=S.useScopedStyles(),{type:s="A",gridLayout:u,textBoxWidth:d,verticalGap:T,entriesCount:x,lightbox:y,imageDisplay:p,slider:f,sliderTiming:m,direction:g,transition:v,titleMarginTop:L,subtitleMarginTop:D,titleColor:A,subtitleColor:P,titleFontFamily:b,titleFontSettings:$,titleFontSize:E,titleLineHeight:N,titleLetterSpacing:W,titleWordSpacing:B,titleTextAppearance:H,subtitleFontFamily:j,subtitleFontSettings:z,subtitleFontSize:C,subtitleLineHeight:k,subtitleLetterSpacing:R,subtitleWordSpacing:I,subtitleTextAppearance:_}=t,M={fontSettings:{fontFamily:b,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:E??.01,lineHeight:N,letterSpacing:W??0,wordSpacing:B??0,textAppearance:H,color:A},it={...ue(Nt(M,n))},nt={fontSettings:{fontFamily:j,fontWeight:(z==null?void 0:z.fontWeight)??400,fontStyle:(z==null?void 0:z.fontStyle)??"normal"},fontSize:C??.01,lineHeight:k,letterSpacing:R??0,wordSpacing:I??0,textAppearance:_,color:P},F={...ue(Nt(nt,n))},J=S.buildColorVars(c,{titleColor:A,subtitleColor:P},cc,dc),mt=`${l&&l!=="default"?`${c}-state-${l}`:""}`.trim(),gt=x===0?1/0:x,G=(e??[]).slice(0,gt),lt=u.entryWidth??.2,O=(p==null?void 0:p.display)==="Cover",w=(p==null?void 0:p.ratioValue)??"1:1",K=(p==null?void 0:p.reversed)??!1,[q,Q]=w.split(":").map(Number),at=K?Q:q,ot=K?q:Q,rt=`${at} / ${ot}`,dt=at>=ot,V={objectFit:O?"cover":"contain",...O&&{aspectRatio:rt,width:dt?"100%":"auto",height:dt?"auto":"100%"}},[X,Y]=h.useState("ltr"),[ct,tt]=h.useState(0),st=h.useRef(null);h.useEffect(()=>{const xt=st.current;if(!xt)return;const Ft=new ResizeObserver(Qt=>{tt(Math.round(Qt[0].contentRect.width))});return Ft.observe(xt),()=>Ft.disconnect()},[]);const[St,wt]=h.useState(!1),[It,Pt]=h.useState([]),[vt,Rt]=h.useState(0),[Gt,Tt]=h.useState(null),Bt=(xt,Ft,Qt)=>{if(y==="Off")return;const Ht=xt.currentTarget.getBoundingClientRect();Tt({top:Ht.top,left:Ht.left,width:Ht.width,height:Ht.height}),Pt(Ft),Rt(Qt),wt(!0)};return h.useEffect(()=>{if(!St||y!=="On"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[St,y]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ac(c)}}),a.jsx("div",{style:J,children:a.jsx("div",{ref:st,className:`${c}-wrapper ${c}-type-${s} ${mt}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:S.scalingValue(T??0,n),columnGap:S.scalingValue(u.horizontalGap??0,n),width:S.scalingValue(u.wrapperWidth??0,n)},children:G.map((xt,Ft)=>{var Qt,Ht;return a.jsx("div",{className:`${c}-item`.trim(),children:a.jsx("div",{className:r?`${c}-item-inner`:`${c}-item-inner-hidden`,style:{width:(d??0)>100?`calc(${S.scalingValue(lt??0,n)} * (${d} / 100))`:S.scalingValue(lt??0,n)},children:a.jsxs("a",{href:(((Qt=xt.link)==null?void 0:Qt.length)??0)>0&&y==="Off"?xt.link:void 0,target:"_blank",className:`${c}-item-image-link`,children:[a.jsx("div",{className:`${c}-item-image-wrapper`,style:{width:S.scalingValue(lt??0,n),height:S.scalingValue(lt??0,n)},children:(((Ht=xt.image)==null?void 0:Ht.length)??0)===0?null:f==="Off"?a.jsx("img",{src:xt.image[0].url,alt:xt.image[0].name,className:`${c}-item-image`.trim(),style:V,onClick:Dt=>Bt(Dt,xt.image.map(jt=>jt.url),0)}):a.jsx(Vr,{className:`${c}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:m*1e3,width:"100%",height:"100%",speed:500,type:v==="Fade"?"fade":"loop",rewind:v==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:v==="Fade"?"ltr":g!=="Random"?g==="Horizontal"?"ltr":"ttb":X},onMoved:Dt=>{if(g!=="Random"||v==="Fade")return;const jt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Y(jt),setTimeout(()=>{Dt.refresh()},0)},children:xt.image.map((Dt,jt)=>a.jsx(Kr,{children:a.jsx("img",{src:Dt.url,alt:Dt.name,className:`${c}-item-image`.trim(),style:V,onClick:te=>Bt(te,xt.image.map(ee=>ee.url),jt)})},jt))},`${v}-${lt}-${g}-${m}-${ct}-${i}`)}),a.jsx("div",{"data-controls":"titleMarginTop",className:`${c}-control`,style:{height:S.scalingValue(L??0,n),width:S.scalingValue(lt*d/100,n)}}),a.jsx("p",{className:`${c}-item-title`.trim(),style:{width:`calc(${S.scalingValue(lt??0,n)} * (${d} / 100))`,...it},children:xt.title}),s==="B"&&a.jsx("div",{"data-controls":"subtitleMarginTop",className:`${c}-control`,style:{height:S.scalingValue(D??0,n),width:S.scalingValue(lt*d/100,n)}}),s==="B"&&a.jsx("p",{className:`${c}-item-subtitle`.trim(),style:{width:`calc(${S.scalingValue(lt??0,n)} * (${d} / 100))`,...F},children:xt.subtitle})]})})},Ft)})})}),St&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&y==="On"&&Lo.createPortal(a.jsx("div",{"data-selection":"none",children:a.jsx(lc,{images:It,index:vt,imageDisplay:p.display,originRect:Gt,reverseClose:f==="Off",onClose:()=>wt(!1),onPrev:()=>Rt(xt=>(xt-1+It.length)%It.length),onNext:()=>Rt(xt=>(xt+1)%It.length)})}),document.body)]})}const cc={titleColor:"title-color",subtitleColor:"subtitle-color"},dc=["hover","focus","filled","success","error"],uc=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
2893
+ `}const fe=500,Te="cubic-bezier(0.22, 1, 0.36, 1)";function ic({images:t,index:e,imageDisplay:n,originRect:r,reverseClose:o,onClose:l,onPrev:i,onNext:s}){const d=m.useRef(null),u=m.useRef(null),[c,L]=m.useState(null),[v,h]=m.useState(r?"opening":"open"),[p,g]=m.useState(!0),$=m.useRef(e),f=m.useCallback(()=>{const y=d.current,w=u.current;if(!y||!w)return;const E=y.getBoundingClientRect(),H=E.width,F=E.height,O=w.naturalWidth,z=w.naturalHeight;if(!H||!F||!O||!z)return;if(n==="Cover"){L({width:H,height:F,left:E.left,top:E.top});return}const V=O/z,K=H/F;if(V>K){const C=H/V;L({width:H,height:C,left:E.left,top:E.top+(F-C)/2})}else{const C=F*V;L({width:C,height:F,left:E.left+(H-C)/2,top:E.top})}},[n]);m.useEffect(()=>{f();const y=d.current;if(!y)return;const w=new ResizeObserver(()=>f());return w.observe(y),()=>w.disconnect()},[f,e]),m.useEffect(()=>{if(v!=="opening"||!c)return;const y={id:0};return y.id=requestAnimationFrame(()=>{y.id=requestAnimationFrame(()=>h("open"))}),()=>cancelAnimationFrame(y.id)},[v,c]),m.useEffect(()=>{if(v!=="closing")return;const y=setTimeout(()=>l(),fe);return()=>clearTimeout(y)},[v,l]),m.useEffect(()=>{$.current!==e&&g(!1),$.current=e},[e]);const x=()=>{v!=="closing"&&h("closing")},b=v==="open",R=v==="closing",W=R&&o&&!!r,_=v==="opening"?r??c:W?r:c;return a.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:x,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:b?1:0,transition:`opacity ${fe}ms ${Te}`,pointerEvents:"none"}}),a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:d,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:b?1:0,transition:`opacity ${fe}ms ${Te}`,fontFamily:nc()},children:t.length>1&&a.jsxs(a.Fragment,{children:[a.jsx("p",{children:e+1}),a.jsx("p",{children:"/"}),a.jsx("p",{children:t.length})]})})]}),_&&a.jsx("img",{ref:u,src:t[e],onLoad:f,style:{position:"fixed",top:_.top,left:_.left,width:_.width,height:_.height,objectFit:n==="Cover"?"cover":"contain",opacity:R&&!W?0:1,transition:R&&!W?`opacity ${fe}ms ${Te}`:W||p?`top ${fe}ms ${Te}, left ${fe}ms ${Te}, width ${fe}ms ${Te}, height ${fe}ms ${Te}`:"none",pointerEvents:"none",zIndex:9998}}),b&&c&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{position:"fixed",top:c.top,left:c.left,width:c.width/2,height:c.height,cursor:"w-resize",zIndex:9999},onClick:y=>{y.stopPropagation(),i()}}),a.jsx("div",{style:{position:"fixed",top:c.top,left:c.left+c.width/2,width:c.width/2,height:c.height,cursor:"e-resize",zIndex:9999},onClick:y=>{y.stopPropagation(),s()}})]})]})}function ac({settings:t,content:e,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:l,layoutId:i}){const{prefix:s}=S.useScopedStyles(),{type:d="A",gridLayout:u,textBoxWidth:c,verticalGap:L,entriesCount:v,lightbox:h,imageDisplay:p,slider:g,sliderTiming:$,direction:f,transition:x,titleMarginTop:b,subtitleMarginTop:R,titleColor:W,subtitleColor:_,titleFontFamily:y,titleFontSettings:w,titleFontSize:E,titleLineHeight:H,titleLetterSpacing:F,titleWordSpacing:O,titleTextAppearance:z,subtitleFontFamily:V,subtitleFontSettings:K,subtitleFontSize:C,subtitleLineHeight:k,subtitleLetterSpacing:I,subtitleWordSpacing:A,subtitleTextAppearance:P}=t,N={fontSettings:{fontFamily:y,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:E??.01,lineHeight:H,letterSpacing:F??0,wordSpacing:O??0,textAppearance:z,color:W},st={...pe(Vt(N,n))},rt={fontSettings:{fontFamily:V,fontWeight:(K==null?void 0:K.fontWeight)??400,fontStyle:(K==null?void 0:K.fontStyle)??"normal"},fontSize:C??.01,lineHeight:k,letterSpacing:I??0,wordSpacing:A??0,textAppearance:P,color:_},M={...pe(Vt(rt,n))},J=S.buildColorVars(s,{titleColor:W,subtitleColor:_},sc,lc),pt=`${l&&l!=="default"?`${s}-state-${l}`:""}`.trim(),gt=v===0?1/0:v,D=(e??[]).slice(0,gt),at=u.entryWidth??.2,B=(p==null?void 0:p.display)==="Cover",T=(p==null?void 0:p.ratioValue)??"1:1",U=(p==null?void 0:p.reversed)??!1,[q,Z]=T.split(":").map(Number),ot=U?Z:q,it=U?q:Z,et=`${ot} / ${it}`,dt=ot>=it,j={objectFit:B?"cover":"contain",...B&&{aspectRatio:et,width:dt?"100%":"auto",height:dt?"auto":"100%"}},[X,Y]=m.useState("ltr"),[lt,nt]=m.useState(0),ct=m.useRef(null);m.useEffect(()=>{const $t=ct.current;if(!$t)return;const Mt=new ResizeObserver(kt=>{nt(Math.round(kt[0].contentRect.width))});return Mt.observe($t),()=>Mt.disconnect()},[]);const[Ct,Lt]=m.useState(!1),[Pt,Dt]=m.useState([]),[St,At]=m.useState(0),[Kt,yt]=m.useState(null),Wt=($t,Mt,kt)=>{if(h==="Off")return;const Rt=$t.currentTarget.getBoundingClientRect();yt({top:Rt.top,left:Rt.left,width:Rt.width,height:Rt.height}),Dt(Mt),At(kt),Lt(!0)};return m.useEffect(()=>{if(!Ct||h!=="On"||typeof document>"u")return;const $t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$t}},[Ct,h]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:oc(s)}}),a.jsx("div",{style:J,children:a.jsx("div",{ref:ct,className:`${s}-wrapper ${s}-type-${d} ${pt}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:S.scalingValue(L??0,n),columnGap:S.scalingValue(u.horizontalGap??0,n),width:S.scalingValue(u.wrapperWidth??0,n)},children:D.map(($t,Mt)=>{var kt,Rt;return a.jsx("div",{className:`${s}-item`.trim(),children:a.jsx("div",{className:r?`${s}-item-inner`:`${s}-item-inner-hidden`,style:{width:(c??0)>100?`calc(${S.scalingValue(at??0,n)} * (${c} / 100))`:S.scalingValue(at??0,n)},children:a.jsxs("a",{href:(((kt=$t.link)==null?void 0:kt.length)??0)>0&&h==="Off"?$t.link:void 0,target:"_blank",className:`${s}-item-image-link`,children:[a.jsx("div",{className:`${s}-item-image-wrapper`,style:{width:S.scalingValue(at??0,n),height:S.scalingValue(at??0,n)},children:(((Rt=$t.image)==null?void 0:Rt.length)??0)===0?null:g==="Off"?a.jsx("img",{src:$t.image[0].url,alt:$t.image[0].name,className:`${s}-item-image`.trim(),style:j,onClick:It=>Wt(It,$t.image.map(Ut=>Ut.url),0)}):a.jsx(Vr,{className:`${s}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:$*1e3,width:"100%",height:"100%",speed:500,type:x==="Fade"?"fade":"loop",rewind:x==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:x==="Fade"?"ltr":f!=="Random"?f==="Horizontal"?"ltr":"ttb":X},onMoved:It=>{if(f!=="Random"||x==="Fade")return;const Ut=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";Y(Ut),setTimeout(()=>{It.refresh()},0)},children:$t.image.map((It,Ut)=>a.jsx(Kr,{children:a.jsx("img",{src:It.url,alt:It.name,className:`${s}-item-image`.trim(),style:j,onClick:re=>Wt(re,$t.image.map(Jt=>Jt.url),Ut)})},Ut))},`${x}-${at}-${f}-${$}-${lt}-${i}`)}),a.jsx("div",{"data-controls":"titleMarginTop",className:`${s}-control`,style:{height:S.scalingValue(b??0,n),width:S.scalingValue(at*c/100,n)}}),a.jsx("p",{className:`${s}-item-title`.trim(),style:{width:`calc(${S.scalingValue(at??0,n)} * (${c} / 100))`,...st},children:$t.title}),d==="B"&&a.jsx("div",{"data-controls":"subtitleMarginTop",className:`${s}-control`,style:{height:S.scalingValue(R??0,n),width:S.scalingValue(at*c/100,n)}}),d==="B"&&a.jsx("p",{className:`${s}-item-subtitle`.trim(),style:{width:`calc(${S.scalingValue(at??0,n)} * (${c} / 100))`,...M},children:$t.subtitle})]})})},Mt)})})}),Ct&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&h==="On"&&_o.createPortal(a.jsx("div",{"data-selection":"none",children:a.jsx(ic,{images:Pt,index:St,imageDisplay:p.display,originRect:Kt,reverseClose:g==="Off",onClose:()=>Lt(!1),onPrev:()=>At($t=>($t-1+Pt.length)%Pt.length),onNext:()=>At($t=>($t+1)%Pt.length)})}),document.body)]})}const sc={titleColor:"title-color",subtitleColor:"subtitle-color"},lc=["hover","focus","filled","success","error"],cc=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
2894
2894
  import '@splidejs/react-splide/css/core';\r
2895
2895
  import { CommonComponentProps } from '../props';\r
2896
2896
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
@@ -3549,11 +3549,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
3549
3549
  };\r
3550
3550
  \r
3551
3551
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
3552
- `,$o={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},pc=["titleColor","subtitleColor"],mc={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]}},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",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,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...$o.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:{...$o.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...pc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},gc={element:sc,id:"grid",name:"Neptune",category:"grids",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:mc,sourceCode:uc};function Mn(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function hc(t){return String(t??"").trim().length>0}function fc(t,e,n,r,o){const l=S.scalingValue(r,o),i=S.scalingValue(0,o);return!e&&!n?{borderTopWidth:i,borderBottomWidth:i}:e&&n?{borderTopWidth:t===0?l:i,borderBottomWidth:l}:e?{borderTopWidth:l,borderBottomWidth:i}:{borderTopWidth:i,borderBottomWidth:l}}function yc(t,e,n,r){const o=S.scalingValue(n,r),l=S.scalingValue(0,r);return!t&&!e?{borderTopWidth:l,borderBottomWidth:l}:{borderTopWidth:t&&!e?o:l,borderBottomWidth:e?o:l}}function vc(t){return`
3552
+ `,Co={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},dc=["titleColor","subtitleColor"],uc={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}],link:""},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}],link:""},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}],link:""}]}},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",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,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Co.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:{...Co.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{gridLayout:{entryWidth:.2,horizontalGap:.05,wrapperWidth:1,columnsCount:2,lockedParam:null},textBoxWidth:100,verticalGap:.0083,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","entriesCount","lightbox","imageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"Image",items:["imageDisplay","lightbox"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...dc],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},pc={element:ac,id:"grid",name:"Neptune",category:"grids",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:uc,sourceCode:cc};function On(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function mc(t){return String(t??"").trim().length>0}function gc(t,e,n,r,o,l,i){const s=S.scalingValue(l,i),d=S.scalingValue(0,i),u=t===0,c=t===e-1&&!o;return{borderTopWidth:u&&n?s:d,borderBottomWidth:!c||r?s:d}}function hc(t,e,n){const r=S.scalingValue(e,n),o=S.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:t?r:o}}function fc(t){return`
3553
3553
  .${t}-wrapper {
3554
3554
  display: grid;
3555
3555
  align-items: start;
3556
- min-height: ${Mn(48)};
3556
+ min-height: ${On(48)};
3557
3557
  position: relative;
3558
3558
  overflow: visible;
3559
3559
  box-sizing: border-box;
@@ -3614,6 +3614,18 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
3614
3614
  text-align: center;
3615
3615
  }
3616
3616
 
3617
+ .${t}-wrapper.${t}-type-b .${t}-cut-item .${t}-list-cols-row {
3618
+ flex-direction: row;
3619
+ align-items: center;
3620
+ justify-content: center;
3621
+ }
3622
+
3623
+ .${t}-wrapper.${t}-type-b .${t}-cut-label {
3624
+ text-align: center;
3625
+ width: 100%;
3626
+ box-sizing: border-box;
3627
+ }
3628
+
3617
3629
  .${t}-wrapper.${t}-type-b .${t}-list-col-last {
3618
3630
  flex: 0 0 auto;
3619
3631
  min-width: 0;
@@ -3629,7 +3641,7 @@ a.${t}-list-item {
3629
3641
  flex-shrink: 0;
3630
3642
  overflow: visible;
3631
3643
  box-sizing: border-box;
3632
- min-width: ${Mn(50)};
3644
+ min-width: ${On(50)};
3633
3645
  position: relative;
3634
3646
  display: flex;
3635
3647
  align-items: center;
@@ -3637,7 +3649,7 @@ a.${t}-list-item {
3637
3649
 
3638
3650
  .${t}-list-col-last {
3639
3651
  flex: 1 1 auto;
3640
- min-width: ${Mn(50)};
3652
+ min-width: ${On(50)};
3641
3653
  }
3642
3654
 
3643
3655
  .${t}-list-col-title {
@@ -3715,6 +3727,25 @@ a.${t}-list-item {
3715
3727
  height: 4px;
3716
3728
  }
3717
3729
 
3730
+ .${t}-text-padding-lr-handle {
3731
+ background: transparent;
3732
+ }
3733
+
3734
+ .${t}-text-padding-lr-handle::after {
3735
+ content: '';
3736
+ position: absolute;
3737
+ top: 50%;
3738
+ left: 50%;
3739
+ transform: translate(-50%, -50%);
3740
+ width: 4px;
3741
+ height: 12px;
3742
+ background: #FF5C02;
3743
+ border: 1px solid #FFFFFF;
3744
+ border-radius: 5px;
3745
+ pointer-events: none;
3746
+ box-sizing: border-box;
3747
+ }
3748
+
3718
3749
  .${t}-wrapper.${t}-entry-hover-default .${t}-list-item,
3719
3750
  .${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item,
3720
3751
  .${t}-wrapper.${t}-entry-hover-default .${t}-cut-item,
@@ -3751,14 +3782,10 @@ a.${t}-list-item {
3751
3782
  border-bottom-color: var(--${t}-divider-hover-color);
3752
3783
  }
3753
3784
 
3754
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default .${t}-list-item:hover,
3755
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default .${t}-cut-item:hover,
3756
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default.${t}-state-hover .${t}-list-item,
3757
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default.${t}-state-hover .${t}-cut-item,
3758
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds .${t}-list-item:hover,
3759
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds .${t}-cut-item:hover,
3760
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item,
3761
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item {
3785
+ .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default .${t}-list-item:hover:first-child,
3786
+ .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default.${t}-state-hover .${t}-list-item:first-child,
3787
+ .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds .${t}-list-item:hover:first-child,
3788
+ .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item:first-child {
3762
3789
  border-top-color: var(--${t}-divider-hover-color);
3763
3790
  }
3764
3791
 
@@ -3813,6 +3840,7 @@ a.${t}-list-item {
3813
3840
  width: 100%;
3814
3841
  overflow: visible;
3815
3842
  position: relative;
3843
+ z-index: 3;
3816
3844
  box-sizing: border-box;
3817
3845
  user-select: none;
3818
3846
  background: var(--${t}-background-color);
@@ -3823,26 +3851,114 @@ a.${t}-list-item {
3823
3851
  border-bottom-color: var(--${t}-divider-color);
3824
3852
  }
3825
3853
 
3826
- .${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom) .${t}-cut-item {
3827
- border-top-style: solid;
3828
- border-top-color: var(--${t}-divider-color);
3829
- }
3830
-
3831
3854
  .${t}-cut-label {
3832
3855
  all: unset;
3833
3856
  cursor: pointer;
3857
+ position: relative;
3858
+ z-index: 1;
3834
3859
  color: var(--${t}-text-color);
3835
3860
  white-space: pre-wrap;
3836
3861
  overflow-wrap: anywhere;
3837
3862
  word-break: break-word;
3838
3863
  }
3839
- `}const Vn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Zt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],cn=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],dn=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],un=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],wo=.004,En=.004,di=50,bc=1440,pn=di/bc,Be={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Bn(t){const e=typeof t.wrapperWidth=="number"?t.wrapperWidth:1;return Math.max(0,e)}function xc(t,e=1){const n=e/t;return Object.fromEntries(Zt.map(r=>[r,n]))}function Cc(){return Object.fromEntries([...cn.map(t=>[t,0]),...dn.map(t=>[t,0])])}function Sc(){return Object.fromEntries(un.map(t=>[t,0]))}function An(t){return Object.fromEntries(Zt.map(e=>[e,typeof t[e]=="number"?t[e]:Be[e]]))}function ui(t,e,n){const r=t-pn,o=e+n;if(o<=0||o<=r)return{paddingLeft:e,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:e*l,paddingRight:n*l}}function Hn(t,e,n){const r=Ur(t,e,n);if(t<=0)return[];const o=r.slice(0,t-1).reduce((l,i)=>l+i,0);return[...r.slice(0,t-1),Math.max(0,e-o)]}function $c(t,e,n){const r={};for(let o=0;o<t;o+=1){const l=cn[o],i=dn[o],c=typeof n[l]=="number"?n[l]:0,s=typeof n[i]=="number"?n[i]:0,u=ui(e[o]??0,c,s);u.paddingLeft!==c&&(r[l]=u.paddingLeft),u.paddingRight!==s&&(r[i]=u.paddingRight)}return r}function Ur(t,e,n){if(t<=0)return[];const r=Zt.slice(0,t).map(u=>n[u]);if(t===1)return r;const o=r.slice(0,t-1),i=o.reduce((u,d)=>u+d,0)+pn;if(e>=i)return r;const c=[...o];let s=i-e;for(let u=c.length-1;u>=0&&s>0;u-=1){const d=c[u]-pn;if(d<=0)continue;const T=Math.min(s,d);c[u]-=T,s-=T}return[...c,r[t-1]]}function wc(t,e,n){if(t<=1)return{};const r=Ur(t,e,n),o={};for(let l=0;l<t-1;l+=1){const i=Zt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function To(t){return Array.isArray(t.columnsOrder)&&t.columnsOrder.length>0?t.columnsOrder:[...Vn]}function Tc(t,e){return t.length!==e.length?!1:t.every((n,r)=>n===e[r])}function Lc(t,e,n,r){const o=Math.min(r,t.length,Zt.length),l={};for(let i=0;i<o;i+=1){const c=t[i],s=e.indexOf(c);if(s===-1)continue;const u=Zt[s],d=cn[s],T=dn[s],x=un[s],y=Zt[i],p=cn[i],f=dn[i],m=un[i],g=n[u],v=n[d],L=n[T],D=n[x];typeof g=="number"&&(l[y]=g),typeof v=="number"&&(l[p]=v),typeof L=="number"&&(l[f]=L),typeof D=="number"&&(l[m]=D)}return l}function Pc(t,e){const n=t.columns,r=e.columns,o=Bn(t),l=Bn(e),i=t.type==="B"||t.type===void 0&&e.type==="B",c=typeof n=="number"?n:typeof r=="number"?r:Vn.length,s=m=>{if(i)return m;const g=An({...e,...m}),v=Bn(m),L=Hn(c,v,g),D=$c(c,L,{...e,...m});return Object.keys(D).length===0?m:{...m,...D}};if(typeof n=="number"&&n!==r){const m={...t,...xc(n,o),...Cc()};if(i)for(const g of un)typeof e[g]=="number"&&(m[g]=e[g]);else Object.assign(m,Sc());return m}const u=To(t),d=To(e);if(!Tc(u,d))return s({...t,...Lc(u,d,e,c)});if(o<l&&typeof c=="number"&&!i){const m=An({...e,...t});return s({...t,...wc(c,o,m)})}if(i)return t;const T=An({...e,...t}),x=Hn(c,l,An(e)),p=Hn(c,o,T).some((m,g)=>m<(x[g]??m)),f=Zt.some(m=>{const g=t[m],v=e[m];return typeof g=="number"&&typeof v=="number"&&g!==v});return p||f?s(t):t}function Wc(t,e,n,r){const o=e.slice(0,t).reduce((i,c)=>i+c,0),l=n.slice(t+1,e.length-1).reduce((i,c)=>i+c,0);return Math.max(pn,r-o-l-pn)}function _c(t,e){return Math.random()*(e-t)+t}function Ec({settings:t,content:e,isEditor:n,isPreviewMode:r,metadata:o,activeEvent:l,layoutId:i,onUpdateSettings:c}){const{prefix:s}=S.useScopedStyles(),u=!!(n&&r),{columns:d,type:T,wrapperWidth:x,entriesCount:y,cellMinHeight:p,dividerWidth:f,showVisibility:m,cut:g,showCut:v,cutCellMinHeight:L,cutLabel:D,imageSize:A,imageOnHover:P,entryHoverEffect:b,rowPaddingTop:$,rowPaddingBottom:E,rowPaddingTopB:N,AColumnWidth:W,AColumnPaddingLeft:B,AColumnPaddingRight:H,AColumnPaddingBottom:j,BColumnWidth:z,BColumnPaddingLeft:C,BColumnPaddingRight:k,BColumnPaddingBottom:R,CColumnWidth:I,CColumnPaddingLeft:_,CColumnPaddingRight:M,CColumnPaddingBottom:Z,DColumnWidth:it,DColumnPaddingLeft:nt,DColumnPaddingRight:ut,DColumnPaddingBottom:F,EColumnWidth:J,EColumnPaddingLeft:ht,EColumnPaddingRight:mt,EColumnPaddingBottom:gt,columnsOrder:G,textColor:lt,textFontFamily:O,textFontSettings:w,textFontSize:K,textLineHeight:q,textLetterSpacing:Q,textWordSpacing:at,textTextAppearance:ot,backgroundColor:rt,dividerColor:dt,textHoverColor:V,backgroundHoverColor:X,dividerHoverColor:Y}=t,[ct,tt]=h.useState(void 0),[st,St]=h.useState(null),wt=P==="On",It=(g??0)>0,Pt=T==="B";h.useEffect(()=>{tt(void 0)},[g,v,e,y]);const vt=K??.01,Rt=vt*1.2,Gt=Math.max(q??vt,Rt),Tt={fontSettings:{fontFamily:O,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:vt,lineHeight:Gt,letterSpacing:Q??0,wordSpacing:at??0,textAppearance:ot,color:lt},xt={...ue(Nt(Tt,n))},Ft=S.buildColorVars(s,{textColor:lt,backgroundColor:rt,dividerColor:dt,textHoverColor:V,backgroundHoverColor:X,dividerHoverColor:Y},Ac,Ic),Qt=l&&l!=="default"?`${s}-state-${l}`:"",Dt=`${b==="Default"?`${s}-entry-hover-default`:b==="Blinds"?`${s}-entry-hover-blinds`:""} ${Qt}`.trim(),jt=(m==null?void 0:m[0])??!1,te=(m==null?void 0:m[1])??!1,ee=[jt?`${s}-divider-top`:"",te?`${s}-divider-bottom`:""].filter(Boolean).join(" "),rr=h.useRef(null),Ge=h.useRef(t),Ye=h.useRef(i);h.useEffect(()=>{if(!c||!n){Ge.current=t,Ye.current=i;return}if(i!==Ye.current){Ge.current=t,Ye.current=i;return}const yt=Ge.current,Ct=Pc(t,yt);Ge.current=t,Ct!==t&&c(Ct)},[t,c,n,i]);const $e={AColumnWidth:W??Be.AColumnWidth,BColumnWidth:z??Be.BColumnWidth,CColumnWidth:I??Be.CColumnWidth,DColumnWidth:it??Be.DColumnWidth,EColumnWidth:J??Be.EColumnWidth},Cn={AColumnPaddingLeft:B??0,BColumnPaddingLeft:C??0,CColumnPaddingLeft:_??0,DColumnPaddingLeft:nt??0,EColumnPaddingLeft:ht??0},or={AColumnPaddingRight:H??0,BColumnPaddingRight:k??0,CColumnPaddingRight:M??0,DColumnPaddingRight:ut??0,EColumnPaddingRight:mt??0},ft={AColumnPaddingBottom:j??0,BColumnPaddingBottom:R??0,CColumnPaddingBottom:Z??0,DColumnPaddingBottom:F??0,EColumnPaddingBottom:gt??0},zt=h.useMemo(()=>Array.isArray(G)&&G.length>0?G:[...Vn],[G]),Wt=h.useMemo(()=>zt.slice(0,d).map((yt,Ct)=>{const Ot=cn[Ct],ne=dn[Ct],Yt=un[Ct];return{key:yt,widthKey:Zt[Ct],width:$e[Zt[Ct]],paddingLeftKey:Ot,paddingRightKey:ne,paddingBottomKey:Yt,paddingLeft:Cn[Ot],paddingRight:or[ne],paddingBottom:ft[Yt]}}),[d,zt,W,z,I,it,J,B,H,j,C,k,R,_,M,Z,nt,ut,F,ht,mt,gt]),Et=Bn(t),ge=h.useMemo(()=>Zt.slice(0,d).map(yt=>$e[yt]),[d,W,z,I,it,J]),Gr=h.useMemo(()=>Ur(d,Et,$e),[d,Et,W,z,I,it,J]),we=h.useMemo(()=>Hn(d,Et,$e),[d,Et,W,z,I,it,J]),Ie=h.useMemo(()=>Wt.map((yt,Ct)=>ui(we[Ct]??0,yt.paddingLeft,yt.paddingRight)),[Wt,we]),Te=h.useMemo(()=>{const yt=y===0?1/0:y;return(e??[]).slice(0,yt).map((Ot,ne)=>({id:ne,cells:Object.fromEntries(Vn.map(Yt=>[Yt,Ot[Yt]??""])),image:Ot.image,link:Ot.link}))},[e,y]),ir=It?ct??g:Te.length,pi=h.useMemo(()=>It?Te.slice(0,ir):Te,[Te,It,ir]),mi=It&&ir<Te.length,gi=()=>{const yt=ct??g;if(!v){tt(Te.length);return}tt(Math.min(yt+v,Te.length))},At=yt=>S.scalingValue(yt,n??!1),Yr=Pt?N??0:$??0,qr=E??0,Xr=p??0,hi=Pt?"rowPaddingTopB":"rowPaddingTop",ar=Wt[0],lr=Wt[Wt.length-1],qe=Ie[0],Xe=Ie[Ie.length-1],fi=ar&&qe?Math.max(qe.paddingLeft,En):0,Zr=lr&&Xe?Math.max(Xe.paddingRight,En):0,yi=Et,vi=yt=>{if(!wt)return;const Ct=yt.image;if(!(Ct!=null&&Ct.url)){St(null);return}if((st==null?void 0:st.rowId)===yt.id)return;const Ot=(A==null?void 0:A.min)??80,ne=(A==null?void 0:A.max)??320;St({rowId:yt.id,url:Ct.url,objectFit:Ct.objectFit??"cover",widthPx:_c(Ot,ne)})},bi=()=>{St(null)};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:vc(s)}}),a.jsx("div",{style:Ft,children:a.jsxs("div",{ref:rr,className:`${s}-wrapper ${Dt}${ee?` ${ee}`:""}${Pt?` ${s}-type-b`:""}`.trim(),style:{width:S.scalingValue(x??0,n)},onMouseLeave:wt?bi:void 0,children:[a.jsxs("div",{style:{width:"100%"},children:[pi.map((yt,Ct)=>{var Ze;const Ot=(((Ze=yt.link)==null?void 0:Ze.length)??0)>0,ne=Ot?"a":"div",Yt=fc(Ct,jt,te,f??0,n??!1);return a.jsxs(ne,{className:`${s}-list-item`,...Ot?{href:yt.link,target:"_blank"}:{},style:Yt,onMouseEnter:wt?()=>vi(yt):void 0,children:[(Yr>0||u)&&a.jsx("div",{...u?{"data-controls":hi,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${s}-row-padding-handle`,style:{height:At(Yr)}}),a.jsx("div",{className:`${s}-list-cols-row`,style:Pt?void 0:{minHeight:At(Xr)},children:Wt.map((ae,Re)=>{const Sn=Re===Wt.length-1,$n=Ie[Re],wn=ae.paddingBottom,sr=hc(yt.cells[ae.key]),xi=Pt&&sr&&(wn>0||u),Ci=Pt?{minHeight:At(Xr)}:Sn?{}:{width:At(we[Re])},Si=Pt?{}:{paddingLeft:At($n.paddingLeft),paddingRight:At($n.paddingRight)};return a.jsxs("div",{children:[a.jsx("div",{className:`${s}-list-col${Sn?` ${s}-list-col-last`:""}`,style:{...Si,...Ci},"data-test":ae.width,children:a.jsx("span",{className:`${s}-list-col-title`,style:xt,children:yt.cells[ae.key]??null})}),xi&&a.jsx("div",{...u?{"data-controls":ae.paddingBottomKey,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${s}-row-padding-handle`,style:{height:At(wn)}})]},ae.key)})}),!Pt&&(qr>0||u)&&a.jsx("div",{...u?{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-min":"0"}:{},className:`${s}-row-padding-handle`,style:{height:At(qr)}})]},yt.id)}),mi&&a.jsx("div",{className:`${s}-cut-item`,style:{minHeight:At(L??0),...yc(jt,te,f??0,n??!1)},children:a.jsx("div",{className:`${s}-list-cols-row`,style:{justifyContent:"center"},children:a.jsx("button",{type:"button",className:`${s}-cut-label`,style:xt,onClick:gi,children:D})})})]}),u&&!Pt&&ar&&lr&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ar.paddingLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we[0]-((qe==null?void 0:qe.paddingRight)??0)),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:At(fi),height:"100%",pointerEvents:"auto",zIndex:2}}),a.jsx("div",{"data-controls":lr.paddingRightKey,"data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we[Wt.length-1]-((Xe==null?void 0:Xe.paddingLeft)??0)),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:At(yi-Zr),width:At(Zr),height:"100%",pointerEvents:"auto",zIndex:2}})]},"column-edge-padding-handles"),u&&!Pt&&Wt.slice(0,-1).map((yt,Ct)=>{const Ot=Wt[Ct+1],ne=Wc(Ct,Gr,ge,Et),Yt=Gr.slice(0,Ct+1).reduce((wn,sr)=>wn+sr,0),Ze=Ie[Ct],ae=Ie[Ct+1],Re=Math.max(Ze.paddingRight,En),Sn=Math.max(ae.paddingLeft,En),$n=Yt-wo/2;return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":yt.paddingRightKey,"data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we[Ct]-Ze.paddingLeft),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:At(Yt-Re),width:At(Re),height:"100%",pointerEvents:"auto",zIndex:2}}),a.jsx("div",{"data-controls":yt.widthKey,"data-controls-axis":"x","data-controls-min":String(di),"data-controls-max-fraction":String(ne),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:At($n),width:At(wo),height:"calc(100%)",pointerEvents:"auto",zIndex:4}}),a.jsx("div",{"data-controls":Ot.paddingLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we[Ct+1]-ae.paddingRight),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:At(Yt),width:At(Sn),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${yt.widthKey}-junction`)}),wt&&st&&a.jsx("img",{className:`${s}-hover-image`,src:st.url,alt:"",style:{width:Mn(st.widthPx),objectFit:st.objectFit}})]})})]})}const Ac={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},Ic=["hover","focus","filled","success","error"],Rc=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3840
- import '@splidejs/react-splide/css/core';
3864
+ `}const De=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],qe=["AColumn","BColumn","CColumn","DColumn","EColumn"],yc={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"},vc=["textFontFamily","textFontSettings","textFontSize","textLineHeight","textLetterSpacing","textWordSpacing","textTextAppearance"];function Ur(t,e){return`${t}${e.replace(/^text/,"Text")}`}function bc(t){return{textFontFamily:t.textFontFamily??"Arial",textFontSettings:t.textFontSettings??{fontWeight:400,fontStyle:"normal"},textFontSize:t.textFontSize,textLineHeight:t.textLineHeight,textLetterSpacing:t.textLetterSpacing??0,textWordSpacing:t.textWordSpacing??0,textTextAppearance:t.textTextAppearance,textColor:t.textColor}}function xc(t,e){const n=r=>{const o=Ur(e,r),l=t[o];return l!==void 0?l:t[r]};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,textTextAppearance:n("textTextAppearance"),textColor:t.textColor}}function So(t,e){var i,s;const n=t.textFontSize??.01,r=n*1.2,o=Math.max(t.textLineHeight??n,r),l={fontSettings:{fontFamily:t.textFontFamily,fontWeight:((i=t.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((s=t.textFontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:n,lineHeight:o,letterSpacing:t.textLetterSpacing,wordSpacing:t.textWordSpacing,textAppearance:t.textTextAppearance,color:t.textColor??"#767676"};return pe(Vt(l,e))}function Cc(t,e){const n={};let r=!1;for(const o of vc)if(t[o]!==e[o]&&t[o]!==void 0){r=!0;for(const l of qe)n[Ur(l,o)]=t[o]}return r?n:null}const Xt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],je=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Ve=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Ke=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],Sc={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},$c=["hover","focus","filled","success","error"],$o=.004,Qe=.004,Gr=50,pn=1440,mn=Gr/pn;function ui(t){const e=typeof t=="number"&&t>0?t:pn;return Gr/e}function wc(t){let e=t??null;for(;e;){const n=e.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const r=getComputedStyle(e).getPropertyValue("--cntrl-article-width").trim();if(r){const o=parseFloat(r);if(Number.isFinite(o)&&o>0)return o}e=e.parentElement}return pn}const pi={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Nn(t){const e=typeof t.wrapperWidth=="number"?t.wrapperWidth:1;return Math.max(0,e)}function Tc(t,e=1){const n=e/t;return Object.fromEntries(Xt.map(r=>[r,n]))}function Lc(){return Object.fromEntries([...je.map(t=>[t,0]),...Ve.map(t=>[t,0])])}function _c(){return Object.fromEntries(Ke.map(t=>[t,0]))}function Fn(t){return Object.fromEntries(Xt.map(e=>[e,typeof t[e]=="number"?t[e]:pi[e]]))}function mi(t,e,n){const r=t-mn,o=e+n;if(o<=0||o<=r)return{paddingLeft:e,paddingRight:n};if(r<=0)return{paddingLeft:0,paddingRight:0};const l=r/o;return{paddingLeft:e*l,paddingRight:n*l}}function Hn(t,e,n){const r=Yr(t,e,n);if(t<=0)return[];const o=r.slice(0,t-1).reduce((l,i)=>l+i,0);return[...r.slice(0,t-1),Math.max(0,e-o)]}function Ec(t,e,n){const r={};for(let o=0;o<t;o+=1){const l=je[o],i=Ve[o],s=typeof n[l]=="number"?n[l]:0,d=typeof n[i]=="number"?n[i]:0,u=mi(e[o]??0,s,d);u.paddingLeft!==s&&(r[l]=u.paddingLeft),u.paddingRight!==d&&(r[i]=u.paddingRight)}return r}function Yr(t,e,n){if(t<=0)return[];const r=Xt.slice(0,t).map(u=>n[u]);if(t===1)return r;const o=r.slice(0,t-1),i=o.reduce((u,c)=>u+c,0)+mn;if(e>=i)return r;const s=[...o];let d=i-e;for(let u=s.length-1;u>=0&&d>0;u-=1){const c=s[u]-mn;if(c<=0)continue;const L=Math.min(d,c);s[u]-=L,d-=L}return[...s,r[t-1]]}function Pc(t,e,n){if(t<=1)return{};const r=Yr(t,e,n),o={};for(let l=0;l<t-1;l+=1){const i=Xt[l];r[l]!==n[i]&&(o[i]=r[l])}return o}function wo(t){return Array.isArray(t.columnsOrder)&&t.columnsOrder.length>0?t.columnsOrder:[...De]}function Wc(t,e){return t.length!==e.length?!1:t.every((n,r)=>n===e[r])}function Fc(t,e,n,r){const o=Math.min(r,t.length,Xt.length),l={};for(let i=0;i<o;i+=1){const s=t[i],d=e.indexOf(s);if(d===-1)continue;const u=Xt[d],c=je[d],L=Ve[d],v=Ke[d],h=Xt[i],p=je[i],g=Ve[i],$=Ke[i],f=n[u],x=n[c],b=n[L],R=n[v];typeof f=="number"&&(l[h]=f),typeof x=="number"&&(l[p]=x),typeof b=="number"&&(l[g]=b),typeof R=="number"&&(l[$]=R)}return l}function Rc(t,e,n){const r=Cc(t,e);r&&(t={...t,...r});const o=ui(n==null?void 0:n.designWidth),l=t.columns,i=e.columns,s=Nn(t),d=Nn(e),u=t.type==="B"||t.type===void 0&&e.type==="B",c=typeof l=="number"?l:typeof i=="number"?i:De.length,L=b=>{if(u)return b;const R=Fn({...e,...b}),W=Nn(b),_=Hn(c,W,R),y=Ec(c,_,{...e,...b});return Object.keys(y).length===0?b:{...b,...y}};if(typeof l=="number"&&l!==i){const b={...t,...Tc(l,s),...Lc()};if(u)for(const R of Ke)typeof e[R]=="number"&&(b[R]=e[R]);else Object.assign(b,_c());return b}const v=wo(t),h=wo(e);if(!Wc(v,h))return L({...t,...Fc(v,h,e,c)});if(s<d&&typeof c=="number"&&!u){const b=Fn({...e,...t});return L({...t,...Pc(c,s,b)})}if(u){const b=typeof t.textPaddingLR=="number"?t.textPaddingLR:0,R=Math.max(0,(s-o)/2);return b>R?{...t,textPaddingLR:R}:t}const p=Fn({...e,...t}),g=Hn(c,d,Fn(e)),f=Hn(c,s,p).some((b,R)=>b<(g[R]??b)),x=Xt.some(b=>{const R=t[b],W=e[b];return typeof R=="number"&&typeof W=="number"&&R!==W});return f||x?L(t):t}function Ic(t,e,n,r){const o=e.slice(0,t).reduce((i,s)=>i+s,0),l=n.slice(t+1,e.length-1).reduce((i,s)=>i+s,0);return Math.max(mn,r-o-l-mn)}function Ac(t,e){return Math.random()*(e-t)+t}function kc(t){return Object.fromEntries(Xt.map(e=>[e,typeof t[e]=="number"?t[e]:pi[e]]))}function mr(t,e,n=0){return Object.fromEntries(e.map(r=>[r,typeof t[r]=="number"?t[r]:n]))}function Mc(t,e,n,r,o,l){return t.slice(0,e).map((i,s)=>{const d=je[s],u=Ve[s],c=Ke[s];return{key:i,textPrefix:yc[i],widthKey:Xt[s],width:n[Xt[s]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:c,paddingLeft:r[d],paddingRight:o[u],paddingBottom:l[c]}})}function Oc({settings:t,content:e,isEditor:n,isPreviewMode:r,activeEvent:o,layoutId:l,onUpdateSettings:i}){const{prefix:s}=S.useScopedStyles(),d=!!(n&&r),{columns:u,type:c,wrapperWidth:L,entriesCount:v,cellMinHeight:h,dividerWidth:p,showVisibility:g,cut:$,showCut:f,cutCellMinHeight:x,cutLabel:b,imageSize:R,imageOnHover:W,entryHoverEffect:_,rowPaddingTop:y,rowPaddingBottom:w,rowPaddingTopB:E,columnsOrder:H,textPaddingLR:F,textColor:O,textFontFamily:z,textFontSettings:V,textFontSize:K,textLineHeight:C,textLetterSpacing:k,textWordSpacing:I,textTextAppearance:A,backgroundColor:P,dividerColor:N,textHoverColor:Q,backgroundHoverColor:st,dividerHoverColor:rt}=t,[ut,M]=m.useState(void 0),[J,ht]=m.useState(null),pt=W==="On",gt=($??0)>0,D=c==="B",at=m.useRef(null),[B,T]=m.useState(pn),U=ui(B),q=Math.max(0,((L??0)-U)/2),Z=Math.min(F??0,q),ot=Math.max(Z,Qe),it=((L??0)+U)/2;m.useLayoutEffect(()=>{if(!n){T(pn);return}const ft=()=>{T(wc(at.current))};ft();const Tt=at.current;if(!Tt)return;const Ht=new ResizeObserver(ft);Ht.observe(Tt);let Bt=Tt;for(;Bt&&!Bt.style.getPropertyValue("--cntrl-article-width");)Bt=Bt.parentElement;return Bt&&Ht.observe(Bt),()=>Ht.disconnect()},[n,l]),m.useEffect(()=>{M(void 0)},[$,f,e,v]);const et=So(bc(t),n),dt=m.useMemo(()=>Object.fromEntries(qe.map(ft=>[ft,So(xc(t,ft),n)])),[t,z,V,K,C,k,I,A,O,n]),j=S.buildColorVars(s,{textColor:O,backgroundColor:P,dividerColor:N,textHoverColor:Q,backgroundHoverColor:st,dividerHoverColor:rt},Sc,$c),X=o&&o!=="default"?`${s}-state-${o}`:"",lt=`${_==="Default"?`${s}-entry-hover-default`:_==="Blinds"?`${s}-entry-hover-blinds`:""} ${X}`.trim(),nt=(g==null?void 0:g[0])??!1,ct=(g==null?void 0:g[1])??!1,Ct=m.useRef(t),Lt=m.useRef(l);m.useEffect(()=>{if(!i||!n){Ct.current=t,Lt.current=l;return}if(Lt.current!==l){Ct.current=t,Lt.current=l;return}const ft=Ct.current,Tt=Rc(t,ft,{designWidth:B});Ct.current=t,Tt!==t&&i(Tt)},[t,i,n,l,B]);const Pt=m.useMemo(()=>kc(t),[t.AColumnWidth,t.BColumnWidth,t.CColumnWidth,t.DColumnWidth,t.EColumnWidth]),Dt=m.useMemo(()=>mr(t,je),[t.AColumnPaddingLeft,t.BColumnPaddingLeft,t.CColumnPaddingLeft,t.DColumnPaddingLeft,t.EColumnPaddingLeft]),St=m.useMemo(()=>mr(t,Ve),[t.AColumnPaddingRight,t.BColumnPaddingRight,t.CColumnPaddingRight,t.DColumnPaddingRight,t.EColumnPaddingRight]),At=m.useMemo(()=>mr(t,Ke),[t.AColumnPaddingBottom,t.BColumnPaddingBottom,t.CColumnPaddingBottom,t.DColumnPaddingBottom,t.EColumnPaddingBottom]),Kt=m.useMemo(()=>Array.isArray(H)&&H.length>0?H:[...De],[H]),yt=m.useMemo(()=>Mc(Kt,u,Pt,Dt,St,At),[Kt,u,Pt,Dt,St,At]),Wt=Nn(t),$t=m.useMemo(()=>Xt.slice(0,u).map(ft=>Pt[ft]),[u,Pt]),Mt=m.useMemo(()=>Yr(u,Wt,Pt),[u,Wt,Pt]),kt=m.useMemo(()=>Hn(u,Wt,Pt),[u,Wt,Pt]),Rt=m.useMemo(()=>yt.map((ft,Tt)=>mi(kt[Tt]??0,ft.paddingLeft,ft.paddingRight)),[yt,kt]),It=m.useMemo(()=>{const ft=v===0?1/0:v;return(e??[]).slice(0,ft).map((Ht,Bt)=>({id:Bt,cells:Object.fromEntries(De.map(he=>[he,Ht[he]??""])),image:Ht.image,link:Ht.link}))},[e,v]),Ut=gt?ut??$:It.length,re=m.useMemo(()=>gt?It.slice(0,Ut):It,[It,gt,Ut]),Jt=gt&&Ut<It.length,rr=re.length>1||Jt,or=[nt?`${s}-divider-top`:"",ct||rr?`${s}-divider-bottom`:""].filter(Boolean).join(" "),ir=()=>{const ft=ut??$;if(!f){M(It.length);return}M(Math.min(ft+f,It.length))},bt=ft=>S.scalingValue(ft,n??!1),Xe=D?E??0:y??0,Sn=w??0,vt=h??0,Qt=D?"rowPaddingTopB":"rowPaddingTop",jt=yt[0],Ot=yt[yt.length-1],Gt=Rt[0],Ze=Rt[Rt.length-1],gi=jt&&Gt?Math.max(Gt.paddingLeft,Qe):0,qr=Ot&&Ze?Math.max(Ze.paddingRight,Qe):0,hi=Wt,fi=ft=>{if(!pt)return;const Tt=ft.image;if(!(Tt!=null&&Tt.url)){ht(null);return}if((J==null?void 0:J.rowId)===ft.id)return;const Ht=(R==null?void 0:R.min)??80,Bt=(R==null?void 0:R.max)??320;ht({rowId:ft.id,url:Tt.url,objectFit:Tt.objectFit??"cover",widthPx:Ac(Ht,Bt)})},yi=()=>{ht(null)};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:fc(s)}}),a.jsx("div",{style:j,children:a.jsxs("div",{ref:at,className:`${s}-wrapper ${lt}${or?` ${or}`:""}${D?` ${s}-type-b`:""}`.trim(),style:{width:S.scalingValue(L??0,n)},onMouseLeave:pt?yi:void 0,children:[a.jsxs("div",{style:{width:"100%"},children:[re.map((ft,Tt)=>{var Je;const Ht=(((Je=ft.link)==null?void 0:Je.length)??0)>0,Bt=Ht?"a":"div",he=gc(Tt,re.length,nt,ct,Jt,p??0,n??!1);return a.jsxs(Bt,{className:`${s}-list-item`,...Ht?{href:ft.link,target:"_blank"}:{},style:he,onMouseEnter:pt?()=>fi(ft):void 0,children:[(Xe>0||d)&&a.jsx("div",{...d?{"data-controls":Qt,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${s}-row-padding-handle`,style:{height:bt(Xe)}}),a.jsx("div",{className:`${s}-list-cols-row`,style:D?void 0:{minHeight:bt(vt)},children:yt.map((oe,Re)=>{const $n=Re===yt.length-1,wn=Rt[Re],Tn=oe.paddingBottom,ar=mc(ft.cells[oe.key]),vi=D&&ar&&(Tn>0||d),bi=D?{minHeight:bt(vt)}:$n?{}:{width:bt(kt[Re])},xi=D?{paddingLeft:bt(Z),paddingRight:bt(Z)}:{paddingLeft:bt(wn.paddingLeft),paddingRight:bt(wn.paddingRight)};return a.jsxs("div",{children:[a.jsx("div",{className:`${s}-list-col${$n?` ${s}-list-col-last`:""}`,style:{...xi,...bi},"data-test":oe.width,children:a.jsx("span",{className:`${s}-list-col-title`,style:dt[oe.textPrefix]??et,children:ft.cells[oe.key]??null})}),vi&&a.jsx("div",{...d?{"data-controls":oe.paddingBottomKey,"data-controls-axis":"y","data-controls-min":"0"}:{},className:`${s}-row-padding-handle`,style:{height:bt(Tn)}})]},oe.key)})}),!D&&(Sn>0||d)&&a.jsx("div",{...d?{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-min":"0"}:{},className:`${s}-row-padding-handle`,style:{height:bt(Sn)}})]},ft.id)}),Jt&&a.jsx("div",{className:`${s}-cut-item`,style:{minHeight:bt(x??0),...hc(ct,p??0,n??!1)},children:a.jsx("div",{className:`${s}-list-cols-row`,style:D?{paddingLeft:bt(Z),paddingRight:bt(Z)}:{justifyContent:"center"},children:a.jsx("button",{type:"button",className:`${s}-cut-label`,style:et,onClick:ir,children:b})})})]}),d&&!D&&jt&&Ot&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":jt.paddingLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(kt[0]-((Gt==null?void 0:Gt.paddingRight)??0)),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:0,width:bt(gi),height:"100%",pointerEvents:"auto",zIndex:2}}),a.jsx("div",{"data-controls":Ot.paddingRightKey,"data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(kt[yt.length-1]-((Ze==null?void 0:Ze.paddingLeft)??0)),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:bt(hi-qr),width:bt(qr),height:"100%",pointerEvents:"auto",zIndex:2}})]},"column-edge-padding-handles"),d&&!D&&yt.slice(0,-1).map((ft,Tt)=>{const Ht=yt[Tt+1],Bt=Ic(Tt,Mt,$t,Wt),he=Mt.slice(0,Tt+1).reduce((Tn,ar)=>Tn+ar,0),Je=Rt[Tt],oe=Rt[Tt+1],Re=Math.max(Je.paddingRight,Qe),$n=Math.max(oe.paddingLeft,Qe),wn=he-$o/2;return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":ft.paddingRightKey,"data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(kt[Tt]-Je.paddingLeft),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:bt(he-Re),width:bt(Re),height:"100%",pointerEvents:"auto",zIndex:2}}),a.jsx("div",{"data-controls":ft.widthKey,"data-controls-axis":"x","data-controls-min":String(Gr),"data-controls-max-fraction":String(Bt),"data-controls-variant":"column-width",className:`${s}-col-resize-handle`,style:{position:"absolute",top:"0px",left:bt(wn),width:bt($o),height:"calc(100%)",pointerEvents:"auto",zIndex:4}}),a.jsx("div",{"data-controls":Ht.paddingLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(kt[Tt+1]-oe.paddingRight),"data-controls-static-handle":"",className:`${s}-padding-control-handle`,style:{position:"absolute",top:0,left:bt(he),width:bt($n),height:"100%",pointerEvents:"auto",zIndex:2}})]},`${ft.widthKey}-junction`)}),d&&D&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(it),"data-controls-static-handle":"",className:`${s}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:0,width:bt(ot),height:"100%",pointerEvents:"auto",zIndex:2}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(it),"data-controls-static-handle":"",className:`${s}-text-padding-lr-handle`,style:{position:"absolute",top:0,left:bt(Math.max(ot,Wt-ot)),width:bt(ot),height:"100%",pointerEvents:"auto",zIndex:2}})]},"text-padding-lr-handles"),pt&&J&&a.jsx("img",{className:`${s}-hover-image`,src:J.url,alt:"",style:{width:On(J.widthPx),objectFit:J.objectFit}})]})})]})}const Nc=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3841
3865
  import { CommonComponentProps } from '../props';
3842
3866
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
3843
- import { useEffect, useMemo, useRef, useState } from 'react';
3844
3867
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
3845
3868
 
3869
+ type ListSettings = {
3870
+ columns: number;
3871
+ type: 'A' | 'B';
3872
+ wrapperWidth: number;
3873
+ entriesCount: number;
3874
+ cellMinHeight: number;
3875
+ imageOnHover: 'On' | 'Off';
3876
+ imageSize?: { min: number; max: number };
3877
+ dividerWidth: number;
3878
+ showVisibility: boolean[];
3879
+ cut: number;
3880
+ showCut: number;
3881
+ cutCellMinHeight: number;
3882
+ cutLabel: string;
3883
+ entryHoverEffect: 'None' | 'Default' | 'Blinds';
3884
+ rowPaddingTop: number;
3885
+ rowPaddingBottom: number;
3886
+ rowPaddingTopB: number;
3887
+ AColumnWidth: number;
3888
+ AColumnPaddingLeft: number;
3889
+ AColumnPaddingRight: number;
3890
+ AColumnPaddingBottom: number;
3891
+ BColumnWidth: number;
3892
+ BColumnPaddingLeft: number;
3893
+ BColumnPaddingRight: number;
3894
+ BColumnPaddingBottom: number;
3895
+ CColumnWidth: number;
3896
+ CColumnPaddingLeft: number;
3897
+ CColumnPaddingRight: number;
3898
+ CColumnPaddingBottom: number;
3899
+ DColumnWidth: number;
3900
+ DColumnPaddingLeft: number;
3901
+ DColumnPaddingRight: number;
3902
+ DColumnPaddingBottom: number;
3903
+ EColumnWidth: number;
3904
+ EColumnPaddingLeft: number;
3905
+ EColumnPaddingRight: number;
3906
+ EColumnPaddingBottom: number;
3907
+ columnsOrder?: string[];
3908
+ textPaddingLR?: number;
3909
+ textColor: string;
3910
+ textFontFamily: string;
3911
+ textFontSettings?: { fontWeight: number; fontStyle: string };
3912
+ textFontSize?: number;
3913
+ textLineHeight?: number;
3914
+ textLetterSpacing?: number;
3915
+ textWordSpacing?: number;
3916
+ textTextAppearance?: TextStyles['textAppearance'];
3917
+ backgroundColor: string;
3918
+ dividerColor: string;
3919
+ textHoverColor: string;
3920
+ backgroundHoverColor: string;
3921
+ dividerHoverColor: string;
3922
+ };
3923
+
3924
+ type ListContentItem = {
3925
+ AColumn?: string;
3926
+ BColumnWidth?: string;
3927
+ CColumnWidth?: string;
3928
+ DColumnWidth?: string;
3929
+ EColumnWidth?: string;
3930
+ image?: {
3931
+ objectFit?: 'cover' | 'contain';
3932
+ url: string;
3933
+ name: string;
3934
+ };
3935
+ link?: string;
3936
+ };
3937
+
3938
+ type ListItemRow = {
3939
+ id: string | number;
3940
+ cells: Record<string, React.ReactNode>;
3941
+ image?: ListContentItem['image'];
3942
+ link?: string;
3943
+ };
3944
+
3945
+ type HoverImageState = {
3946
+ rowId: string | number;
3947
+ url: string;
3948
+ objectFit: 'cover' | 'contain';
3949
+ widthPx: number;
3950
+ };
3951
+
3952
+ type ListProps = {
3953
+ layoutId?: string;
3954
+ settings: ListSettings;
3955
+ content?: ListContentItem[];
3956
+ isEditor?: boolean;
3957
+ isPreviewMode?: boolean;
3958
+ activeEvent: string | undefined;
3959
+ onUpdateSettings?: (settings: ListSettings) => void;
3960
+ } & CommonComponentProps;
3961
+
3846
3962
  function sv(px: number): string {
3847
3963
  return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
3848
3964
  }
@@ -3853,34 +3969,26 @@ function hasListColumnText(value: unknown): boolean {
3853
3969
 
3854
3970
  function getEntryDividerWidths(
3855
3971
  rowIdx: number,
3972
+ rowCount: number,
3856
3973
  showDividerTop: boolean,
3857
3974
  showDividerBottom: boolean,
3975
+ hasCutItem: boolean,
3858
3976
  dividerWidth: number,
3859
3977
  isEditor: boolean,
3860
3978
  ): { borderTopWidth: string; borderBottomWidth: string } {
3861
3979
  const scaledDividerWidth = scalingValue(dividerWidth, isEditor);
3862
3980
  const none = scalingValue(0, isEditor);
3863
3981
 
3864
- if (!showDividerTop && !showDividerBottom) {
3865
- return { borderTopWidth: none, borderBottomWidth: none };
3866
- }
3867
-
3868
- if (showDividerTop && showDividerBottom) {
3869
- return {
3870
- borderTopWidth: rowIdx === 0 ? scaledDividerWidth : none,
3871
- borderBottomWidth: scaledDividerWidth,
3872
- };
3873
- }
3982
+ const isFirst = rowIdx === 0;
3983
+ const isLastEntry = rowIdx === rowCount - 1 && !hasCutItem;
3874
3984
 
3875
- if (showDividerTop) {
3876
- return { borderTopWidth: scaledDividerWidth, borderBottomWidth: none };
3877
- }
3985
+ const borderTopWidth = isFirst && showDividerTop ? scaledDividerWidth : none;
3986
+ const borderBottomWidth = !isLastEntry || showDividerBottom ? scaledDividerWidth : none;
3878
3987
 
3879
- return { borderTopWidth: none, borderBottomWidth: scaledDividerWidth };
3988
+ return { borderTopWidth, borderBottomWidth };
3880
3989
  }
3881
3990
 
3882
3991
  function getCutItemDividerWidths(
3883
- showDividerTop: boolean,
3884
3992
  showDividerBottom: boolean,
3885
3993
  dividerWidth: number,
3886
3994
  isEditor: boolean,
@@ -3888,12 +3996,8 @@ function getCutItemDividerWidths(
3888
3996
  const scaledDividerWidth = scalingValue(dividerWidth, isEditor);
3889
3997
  const none = scalingValue(0, isEditor);
3890
3998
 
3891
- if (!showDividerTop && !showDividerBottom) {
3892
- return { borderTopWidth: none, borderBottomWidth: none };
3893
- }
3894
-
3895
3999
  return {
3896
- borderTopWidth: showDividerTop && !showDividerBottom ? scaledDividerWidth : none,
4000
+ borderTopWidth: none,
3897
4001
  borderBottomWidth: showDividerBottom ? scaledDividerWidth : none,
3898
4002
  };
3899
4003
  }
@@ -3964,6 +4068,18 @@ function getCSS(P: string): string {
3964
4068
  text-align: center;
3965
4069
  }
3966
4070
 
4071
+ .\${P}-wrapper.\${P}-type-b .\${P}-cut-item .\${P}-list-cols-row {
4072
+ flex-direction: row;
4073
+ align-items: center;
4074
+ justify-content: center;
4075
+ }
4076
+
4077
+ .\${P}-wrapper.\${P}-type-b .\${P}-cut-label {
4078
+ text-align: center;
4079
+ width: 100%;
4080
+ box-sizing: border-box;
4081
+ }
4082
+
3967
4083
  .\${P}-wrapper.\${P}-type-b .\${P}-list-col-last {
3968
4084
  flex: 0 0 auto;
3969
4085
  min-width: 0;
@@ -4065,6 +4181,25 @@ a.\${P}-list-item {
4065
4181
  height: 4px;
4066
4182
  }
4067
4183
 
4184
+ .\${P}-text-padding-lr-handle {
4185
+ background: transparent;
4186
+ }
4187
+
4188
+ .\${P}-text-padding-lr-handle::after {
4189
+ content: '';
4190
+ position: absolute;
4191
+ top: 50%;
4192
+ left: 50%;
4193
+ transform: translate(-50%, -50%);
4194
+ width: 4px;
4195
+ height: 12px;
4196
+ background: #FF5C02;
4197
+ border: 1px solid #FFFFFF;
4198
+ border-radius: 5px;
4199
+ pointer-events: none;
4200
+ box-sizing: border-box;
4201
+ }
4202
+
4068
4203
  .\${P}-wrapper.\${P}-entry-hover-default .\${P}-list-item,
4069
4204
  .\${P}-wrapper.\${P}-entry-hover-blinds .\${P}-list-item,
4070
4205
  .\${P}-wrapper.\${P}-entry-hover-default .\${P}-cut-item,
@@ -4101,14 +4236,10 @@ a.\${P}-list-item {
4101
4236
  border-bottom-color: var(--\${P}-divider-hover-color);
4102
4237
  }
4103
4238
 
4104
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default .\${P}-list-item:hover,
4105
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default .\${P}-cut-item:hover,
4106
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item,
4107
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default.\${P}-state-hover .\${P}-cut-item,
4108
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds .\${P}-list-item:hover,
4109
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds .\${P}-cut-item:hover,
4110
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item,
4111
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-cut-item {
4239
+ .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default .\${P}-list-item:hover:first-child,
4240
+ .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-default.\${P}-state-hover .\${P}-list-item:first-child,
4241
+ .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds .\${P}-list-item:hover:first-child,
4242
+ .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom).\${P}-entry-hover-blinds.\${P}-state-hover .\${P}-list-item:first-child {
4112
4243
  border-top-color: var(--\${P}-divider-hover-color);
4113
4244
  }
4114
4245
 
@@ -4163,6 +4294,7 @@ a.\${P}-list-item {
4163
4294
  width: 100%;
4164
4295
  overflow: visible;
4165
4296
  position: relative;
4297
+ z-index: 3;
4166
4298
  box-sizing: border-box;
4167
4299
  user-select: none;
4168
4300
  background: var(--\${P}-background-color);
@@ -4173,14 +4305,11 @@ a.\${P}-list-item {
4173
4305
  border-bottom-color: var(--\${P}-divider-color);
4174
4306
  }
4175
4307
 
4176
- .\${P}-wrapper.\${P}-divider-top:not(.\${P}-divider-bottom) .\${P}-cut-item {
4177
- border-top-style: solid;
4178
- border-top-color: var(--\${P}-divider-color);
4179
- }
4180
-
4181
4308
  .\${P}-cut-label {
4182
4309
  all: unset;
4183
4310
  cursor: pointer;
4311
+ position: relative;
4312
+ z-index: 1;
4184
4313
  color: var(--\${P}-text-color);
4185
4314
  white-space: pre-wrap;
4186
4315
  overflow-wrap: anywhere;
@@ -4189,23 +4318,7 @@ a.\${P}-list-item {
4189
4318
  \`;
4190
4319
  }
4191
4320
 
4192
- type ColumnPaddingLeftKey = typeof COLUMN_PADDING_LEFT_KEYS[number];
4193
- type ColumnPaddingRightKey = typeof COLUMN_PADDING_RIGHT_KEYS[number];
4194
- type ColumnPaddingBottomKey = typeof COLUMN_PADDING_BOTTOM_KEYS[number];
4195
-
4196
- type ListItemColumn = {
4197
- key: string;
4198
- widthKey: ColumnWidthKey;
4199
- paddingLeftKey: ColumnPaddingLeftKey;
4200
- paddingRightKey: ColumnPaddingRightKey;
4201
- paddingBottomKey: ColumnPaddingBottomKey;
4202
- width: number;
4203
- paddingLeft: number;
4204
- paddingRight: number;
4205
- paddingBottom: number;
4206
- };
4207
-
4208
- const COLUMN_CONTENT_KEYS = [
4321
+ export const COLUMN_CONTENT_KEYS = [
4209
4322
  'AColumn',
4210
4323
  'BColumnWidth',
4211
4324
  'CColumnWidth',
@@ -4213,6 +4326,160 @@ const COLUMN_CONTENT_KEYS = [
4213
4326
  'EColumnWidth',
4214
4327
  ] as const;
4215
4328
 
4329
+ export const COLUMN_TEXT_PREFIXES = [
4330
+ 'AColumn',
4331
+ 'BColumn',
4332
+ 'CColumn',
4333
+ 'DColumn',
4334
+ 'EColumn',
4335
+ ] as const;
4336
+
4337
+ const COLUMN_CONTENT_KEY_TO_TEXT_PREFIX: Record<
4338
+ typeof COLUMN_CONTENT_KEYS[number],
4339
+ typeof COLUMN_TEXT_PREFIXES[number]
4340
+ > = {
4341
+ AColumn: 'AColumn',
4342
+ BColumnWidth: 'BColumn',
4343
+ CColumnWidth: 'CColumn',
4344
+ DColumnWidth: 'DColumn',
4345
+ EColumnWidth: 'EColumn',
4346
+ };
4347
+
4348
+ export const LIST_GLOBAL_TEXT_STYLE_KEYS = [
4349
+ 'textFontFamily',
4350
+ 'textFontSettings',
4351
+ 'textFontSize',
4352
+ 'textLineHeight',
4353
+ 'textLetterSpacing',
4354
+ 'textWordSpacing',
4355
+ 'textTextAppearance',
4356
+ ] as const;
4357
+
4358
+ export type ListGlobalTextStyleKey = typeof LIST_GLOBAL_TEXT_STYLE_KEYS[number];
4359
+
4360
+ export function getListColumnTextSettingKey(
4361
+ prefix: typeof COLUMN_TEXT_PREFIXES[number],
4362
+ globalKey: ListGlobalTextStyleKey,
4363
+ ): string {
4364
+ return \`\${prefix}\${globalKey.replace(/^text/, 'Text')}\`;
4365
+ }
4366
+
4367
+ type ListTextStyleFields = {
4368
+ textFontFamily?: string;
4369
+ textFontSettings?: { fontWeight: number; fontStyle: string };
4370
+ textFontSize?: number;
4371
+ textLineHeight?: number;
4372
+ textLetterSpacing?: number;
4373
+ textWordSpacing?: number;
4374
+ textTextAppearance?: TextStyles['textAppearance'];
4375
+ textColor?: string;
4376
+ };
4377
+
4378
+ type ResolvedListTextFields = {
4379
+ textFontFamily: string;
4380
+ textFontSettings: { fontWeight: number; fontStyle: string };
4381
+ textFontSize?: number;
4382
+ textLineHeight?: number;
4383
+ textLetterSpacing: number;
4384
+ textWordSpacing: number;
4385
+ textTextAppearance?: TextStyles['textAppearance'];
4386
+ textColor?: string;
4387
+ };
4388
+
4389
+ function resolveListGlobalTextFields(
4390
+ settings: ListTextStyleFields,
4391
+ ): ResolvedListTextFields {
4392
+ return {
4393
+ textFontFamily: settings.textFontFamily ?? 'Arial',
4394
+ textFontSettings: settings.textFontSettings ?? {
4395
+ fontWeight: 400,
4396
+ fontStyle: 'normal',
4397
+ },
4398
+ textFontSize: settings.textFontSize,
4399
+ textLineHeight: settings.textLineHeight,
4400
+ textLetterSpacing: settings.textLetterSpacing ?? 0,
4401
+ textWordSpacing: settings.textWordSpacing ?? 0,
4402
+ textTextAppearance: settings.textTextAppearance,
4403
+ textColor: settings.textColor,
4404
+ };
4405
+ }
4406
+
4407
+ function resolveListColumnTextFields(
4408
+ settings: ListTextStyleFields & Record<string, unknown>,
4409
+ textPrefix: typeof COLUMN_TEXT_PREFIXES[number],
4410
+ ): ResolvedListTextFields {
4411
+ const read = <K extends ListGlobalTextStyleKey>(globalKey: K) => {
4412
+ const columnKey = getListColumnTextSettingKey(textPrefix, globalKey);
4413
+ const columnValue = settings[columnKey];
4414
+ if (columnValue !== undefined) {
4415
+ return columnValue as ListTextStyleFields[K];
4416
+ }
4417
+ return settings[globalKey];
4418
+ };
4419
+
4420
+ return {
4421
+ textFontFamily: (read('textFontFamily') as string | undefined) ?? 'Arial',
4422
+ textFontSettings: (read('textFontSettings') as ListTextStyleFields['textFontSettings']) ?? {
4423
+ fontWeight: 400,
4424
+ fontStyle: 'normal',
4425
+ },
4426
+ textFontSize: read('textFontSize') as number | undefined,
4427
+ textLineHeight: read('textLineHeight') as number | undefined,
4428
+ textLetterSpacing: (read('textLetterSpacing') as number | undefined) ?? 0,
4429
+ textWordSpacing: (read('textWordSpacing') as number | undefined) ?? 0,
4430
+ textTextAppearance: read('textTextAppearance') as ListTextStyleFields['textTextAppearance'],
4431
+ textColor: settings.textColor,
4432
+ };
4433
+ }
4434
+
4435
+ function listColumnTextFieldsToCss(
4436
+ fields: ResolvedListTextFields,
4437
+ isEditor?: boolean,
4438
+ ): React.CSSProperties {
4439
+ const resolvedFontSize = fields.textFontSize ?? 0.01;
4440
+ const minLineHeight = resolvedFontSize * 1.2;
4441
+ const resolvedLineHeight = Math.max(fields.textLineHeight ?? resolvedFontSize, minLineHeight);
4442
+ const resolvedTextStyle: TextStyles = {
4443
+ fontSettings: {
4444
+ fontFamily: fields.textFontFamily,
4445
+ fontWeight: fields.textFontSettings?.fontWeight ?? 400,
4446
+ fontStyle: fields.textFontSettings?.fontStyle ?? 'normal',
4447
+ },
4448
+ fontSize: resolvedFontSize,
4449
+ lineHeight: resolvedLineHeight,
4450
+ letterSpacing: fields.textLetterSpacing,
4451
+ wordSpacing: fields.textWordSpacing,
4452
+ textAppearance: fields.textTextAppearance,
4453
+ color: fields.textColor ?? '#767676',
4454
+ };
4455
+
4456
+ return omitTextColors(textStylesToCss(resolvedTextStyle, isEditor));
4457
+ }
4458
+
4459
+ function getListGlobalTextSyncUpdates(
4460
+ nextSettings: Record<string, unknown>,
4461
+ prevSettings: Record<string, unknown>,
4462
+ ): Record<string, unknown> | null {
4463
+ const updates: Record<string, unknown> = {};
4464
+ let hasChanges = false;
4465
+
4466
+ for (const globalKey of LIST_GLOBAL_TEXT_STYLE_KEYS) {
4467
+ if (nextSettings[globalKey] === prevSettings[globalKey]) {
4468
+ continue;
4469
+ }
4470
+ if (nextSettings[globalKey] === undefined) {
4471
+ continue;
4472
+ }
4473
+
4474
+ hasChanges = true;
4475
+ for (const prefix of COLUMN_TEXT_PREFIXES) {
4476
+ updates[getListColumnTextSettingKey(prefix, globalKey)] = nextSettings[globalKey];
4477
+ }
4478
+ }
4479
+
4480
+ return hasChanges ? updates : null;
4481
+ }
4482
+
4216
4483
  const COLUMN_WIDTH_KEYS = [
4217
4484
  'AColumnWidth',
4218
4485
  'BColumnWidth',
@@ -4245,7 +4512,42 @@ const COLUMN_PADDING_BOTTOM_KEYS = [
4245
4512
  'EColumnPaddingBottom',
4246
4513
  ] as const;
4247
4514
 
4248
- type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
4515
+ type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
4516
+ type ColumnPaddingLeftKey = typeof COLUMN_PADDING_LEFT_KEYS[number];
4517
+ type ColumnPaddingRightKey = typeof COLUMN_PADDING_RIGHT_KEYS[number];
4518
+ type ColumnPaddingBottomKey = typeof COLUMN_PADDING_BOTTOM_KEYS[number];
4519
+
4520
+ type ListItemColumn = {
4521
+ key: string;
4522
+ textPrefix: typeof COLUMN_TEXT_PREFIXES[number];
4523
+ widthKey: ColumnWidthKey;
4524
+ paddingLeftKey: ColumnPaddingLeftKey;
4525
+ paddingRightKey: ColumnPaddingRightKey;
4526
+ paddingBottomKey: ColumnPaddingBottomKey;
4527
+ width: number;
4528
+ paddingLeft: number;
4529
+ paddingRight: number;
4530
+ paddingBottom: number;
4531
+ };
4532
+
4533
+ type ColorKeys =
4534
+ | 'textColor'
4535
+ | 'backgroundColor'
4536
+ | 'dividerColor'
4537
+ | 'textHoverColor'
4538
+ | 'backgroundHoverColor'
4539
+ | 'dividerHoverColor';
4540
+
4541
+ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
4542
+ textColor: 'text-color',
4543
+ backgroundColor: 'background-color',
4544
+ dividerColor: 'divider-color',
4545
+ textHoverColor: 'text-hover-color',
4546
+ backgroundHoverColor: 'background-hover-color',
4547
+ dividerHoverColor: 'divider-hover-color',
4548
+ };
4549
+
4550
+ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
4249
4551
 
4250
4552
  const COL_RESIZE_HANDLE_WIDTH = 0.004;
4251
4553
  const COL_PADDING_HANDLE_WIDTH = 0.004;
@@ -4253,6 +4555,40 @@ const MIN_COLUMN_WIDTH_PX = 50;
4253
4555
  const ARTICLE_DESIGN_WIDTH = 1440;
4254
4556
  const MIN_COLUMN_WIDTH = MIN_COLUMN_WIDTH_PX / ARTICLE_DESIGN_WIDTH;
4255
4557
 
4558
+ export function getListMinColumnWidth(designWidthPx?: number): number {
4559
+ const designWidth = typeof designWidthPx === 'number' && designWidthPx > 0
4560
+ ? designWidthPx
4561
+ : ARTICLE_DESIGN_WIDTH;
4562
+
4563
+ return MIN_COLUMN_WIDTH_PX / designWidth;
4564
+ }
4565
+
4566
+ function getEditorDesignWidth(element: HTMLElement | null | undefined): number {
4567
+ let el = element ?? null;
4568
+
4569
+ while (el) {
4570
+ const inline = el.style.getPropertyValue('--cntrl-article-width').trim();
4571
+ if (inline) {
4572
+ const px = parseFloat(inline);
4573
+ if (Number.isFinite(px) && px > 0) {
4574
+ return px;
4575
+ }
4576
+ }
4577
+
4578
+ const computed = getComputedStyle(el).getPropertyValue('--cntrl-article-width').trim();
4579
+ if (computed) {
4580
+ const px = parseFloat(computed);
4581
+ if (Number.isFinite(px) && px > 0) {
4582
+ return px;
4583
+ }
4584
+ }
4585
+
4586
+ el = el.parentElement;
4587
+ }
4588
+
4589
+ return ARTICLE_DESIGN_WIDTH;
4590
+ }
4591
+
4256
4592
  const DEFAULT_COLUMN_WIDTHS: Record<ColumnWidthKey, number> = {
4257
4593
  AColumnWidth: 0.02,
4258
4594
  BColumnWidth: 0.02,
@@ -4295,7 +4631,7 @@ function getResetListColumnPaddingBottomUpdates(): Record<ColumnPaddingBottomKey
4295
4631
  ) as Record<ColumnPaddingBottomKey, number>;
4296
4632
  }
4297
4633
 
4298
- function getStoreDColumnWidthWidths(
4634
+ function getStoredColumnWidths(
4299
4635
  settings: Record<string, unknown>,
4300
4636
  ): Record<ColumnWidthKey, number> {
4301
4637
  return Object.fromEntries(
@@ -4519,7 +4855,14 @@ function getColumnLayoutUpdatesForOrderChange(
4519
4855
  export function applyListSettingsChange(
4520
4856
  nextSettings: Record<string, unknown>,
4521
4857
  prevSettings: Record<string, unknown>,
4858
+ options?: { designWidth?: number },
4522
4859
  ): Record<string, unknown> {
4860
+ const textSyncUpdates = getListGlobalTextSyncUpdates(nextSettings, prevSettings);
4861
+ if (textSyncUpdates) {
4862
+ nextSettings = { ...nextSettings, ...textSyncUpdates };
4863
+ }
4864
+
4865
+ const minColumnWidth = getListMinColumnWidth(options?.designWidth);
4523
4866
  const nextColumns = nextSettings.columns;
4524
4867
  const prevColumns = prevSettings.columns;
4525
4868
  const nextContentWidth = getListEffectiveContentWidth(nextSettings);
@@ -4540,7 +4883,7 @@ export function applyListSettingsChange(
4540
4883
  return settings;
4541
4884
  }
4542
4885
 
4543
- const storedWidths = getStoreDColumnWidthWidths({ ...prevSettings, ...settings });
4886
+ const storedWidths = getStoredColumnWidths({ ...prevSettings, ...settings });
4544
4887
  const contentWidth = getListEffectiveContentWidth(settings);
4545
4888
  const effectiveWidths = getEffectiveListColumnWidths(columns, contentWidth, storedWidths);
4546
4889
  const paddingUpdates = getListColumnPaddingUpdates(columns, effectiveWidths, {
@@ -4590,7 +4933,7 @@ export function applyListSettingsChange(
4590
4933
 
4591
4934
  if (nextContentWidth < prevContentWidth) {
4592
4935
  if (typeof columns === 'number' && !isVerticalLayout) {
4593
- const storedWidths = getStoreDColumnWidthWidths({ ...prevSettings, ...nextSettings });
4936
+ const storedWidths = getStoredColumnWidths({ ...prevSettings, ...nextSettings });
4594
4937
 
4595
4938
  return withColumnPaddingUpdates({
4596
4939
  ...nextSettings,
@@ -4600,14 +4943,23 @@ export function applyListSettingsChange(
4600
4943
  }
4601
4944
 
4602
4945
  if (isVerticalLayout) {
4946
+ const storedTextPaddingLR = typeof nextSettings.textPaddingLR === 'number'
4947
+ ? nextSettings.textPaddingLR as number
4948
+ : 0;
4949
+ const maxAllowedPadding = Math.max(0, (nextContentWidth - minColumnWidth) / 2);
4950
+
4951
+ if (storedTextPaddingLR > maxAllowedPadding) {
4952
+ return { ...nextSettings, textPaddingLR: maxAllowedPadding };
4953
+ }
4954
+
4603
4955
  return nextSettings;
4604
4956
  }
4605
4957
 
4606
- const storedWidths = getStoreDColumnWidthWidths({ ...prevSettings, ...nextSettings });
4958
+ const storedWidths = getStoredColumnWidths({ ...prevSettings, ...nextSettings });
4607
4959
  const prevEffectiveWidths = getEffectiveListColumnWidths(
4608
4960
  columns,
4609
4961
  prevContentWidth,
4610
- getStoreDColumnWidthWidths(prevSettings),
4962
+ getStoredColumnWidths(prevSettings),
4611
4963
  );
4612
4964
  const nextEffectiveWidths = getEffectiveListColumnWidths(
4613
4965
  columns,
@@ -4652,49 +5004,63 @@ function getColumnMaxWidth(
4652
5004
  );
4653
5005
  }
4654
5006
 
4655
- type ListContentItem = {
4656
- AColumn?: string;
4657
- BColumnWidth?: string;
4658
- CColumnWidth?: string;
4659
- DColumnWidth?: string;
4660
- EColumnWidth?: string;
4661
- image?: {
4662
- objectFit?: 'cover' | 'contain';
4663
- url: string;
4664
- name: string;
4665
- };
4666
- link?: string;
4667
- };
4668
-
4669
- type ListItemRow = {
4670
- id: string | number;
4671
- cells: Record<string, React.ReactNode>;
4672
- image?: ListContentItem['image'];
4673
- link?: string;
4674
- };
4675
-
4676
- type HoverImageState = {
4677
- rowId: string | number;
4678
- url: string;
4679
- objectFit: 'cover' | 'contain';
4680
- widthPx: number;
4681
- };
4682
-
4683
5007
  function randomBetween(min: number, max: number): number {
4684
5008
  return Math.random() * (max - min) + min;
4685
5009
  }
4686
5010
 
4687
- type ListProps = {
4688
- layoutId?: string;
4689
- settings: ListSettings;
4690
- content?: ListContentItem[];
4691
- isEditor?: boolean;
4692
- isPreviewMode?: boolean;
4693
- activeEvent: string | undefined;
4694
- onUpdateSettings?: (settings: ListSettings) => void;
4695
- } & CommonComponentProps;
5011
+ function getColumnWidthsFromSettings(
5012
+ settings: Record<string, unknown>,
5013
+ ): Record<ColumnWidthKey, number> {
5014
+ return Object.fromEntries(
5015
+ COLUMN_WIDTH_KEYS.map((key) => [
5016
+ key,
5017
+ typeof settings[key] === 'number' ? settings[key] as number : DEFAULT_COLUMN_WIDTHS[key],
5018
+ ]),
5019
+ ) as Record<ColumnWidthKey, number>;
5020
+ }
5021
+
5022
+ function getNumericSettingValues<K extends string>(
5023
+ settings: Record<string, unknown>,
5024
+ keys: readonly K[],
5025
+ fallback = 0,
5026
+ ): Record<K, number> {
5027
+ return Object.fromEntries(
5028
+ keys.map((key) => [
5029
+ key,
5030
+ typeof settings[key] === 'number' ? settings[key] as number : fallback,
5031
+ ]),
5032
+ ) as Record<K, number>;
5033
+ }
5034
+
5035
+ function buildListColumns(
5036
+ columnContentOrder: readonly typeof COLUMN_CONTENT_KEYS[number][],
5037
+ columns: number,
5038
+ columnWidthByKey: Record<ColumnWidthKey, number>,
5039
+ columnPaddingLeftByKey: Record<ColumnPaddingLeftKey, number>,
5040
+ columnPaddingRightByKey: Record<ColumnPaddingRightKey, number>,
5041
+ columnPaddingBottomByKey: Record<ColumnPaddingBottomKey, number>,
5042
+ ): ListItemColumn[] {
5043
+ return columnContentOrder.slice(0, columns).map((key, index) => {
5044
+ const paddingLeftKey = COLUMN_PADDING_LEFT_KEYS[index];
5045
+ const paddingRightKey = COLUMN_PADDING_RIGHT_KEYS[index];
5046
+ const paddingBottomKey = COLUMN_PADDING_BOTTOM_KEYS[index];
5047
+
5048
+ return {
5049
+ key,
5050
+ textPrefix: COLUMN_CONTENT_KEY_TO_TEXT_PREFIX[key],
5051
+ widthKey: COLUMN_WIDTH_KEYS[index],
5052
+ width: columnWidthByKey[COLUMN_WIDTH_KEYS[index]],
5053
+ paddingLeftKey,
5054
+ paddingRightKey,
5055
+ paddingBottomKey,
5056
+ paddingLeft: columnPaddingLeftByKey[paddingLeftKey],
5057
+ paddingRight: columnPaddingRightByKey[paddingRightKey],
5058
+ paddingBottom: columnPaddingBottomByKey[paddingBottomKey],
5059
+ };
5060
+ });
5061
+ }
4696
5062
 
4697
- export function List({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId, onUpdateSettings }: ListProps) {
5063
+ export function List({ settings, content, isEditor, isPreviewMode, activeEvent, layoutId, onUpdateSettings }: ListProps) {
4698
5064
  const { prefix: P } = useScopedStyles();
4699
5065
  const showControls = Boolean(isEditor && isPreviewMode);
4700
5066
  const {
@@ -4715,27 +5081,8 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4715
5081
  rowPaddingTop,
4716
5082
  rowPaddingBottom,
4717
5083
  rowPaddingTopB,
4718
- AColumnWidth,
4719
- AColumnPaddingLeft,
4720
- AColumnPaddingRight,
4721
- AColumnPaddingBottom,
4722
- BColumnWidth,
4723
- BColumnPaddingLeft,
4724
- BColumnPaddingRight,
4725
- BColumnPaddingBottom,
4726
- CColumnWidth,
4727
- CColumnPaddingLeft,
4728
- CColumnPaddingRight,
4729
- CColumnPaddingBottom,
4730
- DColumnWidth,
4731
- DColumnPaddingLeft,
4732
- DColumnPaddingRight,
4733
- DColumnPaddingBottom,
4734
- EColumnWidth,
4735
- EColumnPaddingLeft,
4736
- EColumnPaddingRight,
4737
- EColumnPaddingBottom,
4738
5084
  columnsOrder,
5085
+ textPaddingLR,
4739
5086
  textColor,
4740
5087
  textFontFamily,
4741
5088
  textFontSettings,
@@ -4756,32 +5103,72 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4756
5103
  const showHoverImage = imageOnHover === 'On';
4757
5104
  const cutEnabled = (cut ?? 0) > 0;
4758
5105
  const isVerticalLayout = type === 'B';
5106
+ const containerRef = useRef<HTMLDivElement>(null);
5107
+ const [designWidth, setDesignWidth] = useState(ARTICLE_DESIGN_WIDTH);
5108
+ const minColumnWidth = getListMinColumnWidth(designWidth);
5109
+
5110
+ const storedTextPaddingLRMax = Math.max(0, ((wrapperWidth ?? 0) - minColumnWidth) / 2);
5111
+ const effectiveTextPaddingLR = Math.min(textPaddingLR ?? 0, storedTextPaddingLRMax);
5112
+ const textPaddingLRHandleWidth = Math.max(effectiveTextPaddingLR, COL_PADDING_HANDLE_WIDTH);
5113
+ const textPaddingLRMaxFraction = ((wrapperWidth ?? 0) + minColumnWidth) / 2;
5114
+
5115
+ useLayoutEffect(() => {
5116
+ if (!isEditor) {
5117
+ setDesignWidth(ARTICLE_DESIGN_WIDTH);
5118
+ return;
5119
+ }
5120
+
5121
+ const syncDesignWidth = () => {
5122
+ setDesignWidth(getEditorDesignWidth(containerRef.current));
5123
+ };
5124
+
5125
+ syncDesignWidth();
5126
+
5127
+ const observed = containerRef.current;
5128
+ if (!observed) {
5129
+ return;
5130
+ }
5131
+
5132
+ const observer = new ResizeObserver(syncDesignWidth);
5133
+ observer.observe(observed);
5134
+
5135
+ let pageEl: HTMLElement | null = observed;
5136
+ while (pageEl && !pageEl.style.getPropertyValue('--cntrl-article-width')) {
5137
+ pageEl = pageEl.parentElement;
5138
+ }
5139
+ if (pageEl) {
5140
+ observer.observe(pageEl);
5141
+ }
5142
+
5143
+ return () => observer.disconnect();
5144
+ }, [isEditor, layoutId]);
4759
5145
 
4760
5146
  useEffect(() => {
4761
5147
  setVisibleRowCount(undefined);
4762
5148
  }, [cut, showCut, content, entriesCount]);
4763
5149
 
4764
- const resolvedFontSize = textFontSize ?? 0.01;
4765
- const minLineHeight = resolvedFontSize * 1.2;
4766
- const resolvedLineHeight = Math.max(textLineHeight ?? resolvedFontSize, minLineHeight);
5150
+ const textFieldCss = listColumnTextFieldsToCss(resolveListGlobalTextFields(settings), isEditor);
4767
5151
 
4768
- const resolvedTextTextStyle: TextStyles = {
4769
- fontSettings: {
4770
- fontFamily: textFontFamily,
4771
- fontWeight: textFontSettings?.fontWeight ?? 400,
4772
- fontStyle: textFontSettings?.fontStyle ?? 'normal',
4773
- },
4774
- fontSize: resolvedFontSize,
4775
- lineHeight: resolvedLineHeight,
4776
- letterSpacing: textLetterSpacing ?? 0,
4777
- wordSpacing: textWordSpacing ?? 0,
4778
- textAppearance: textTextAppearance,
4779
- color: textColor,
4780
- };
4781
- const textTypographyCss = omitTextColors(textStylesToCss(resolvedTextTextStyle, isEditor));
4782
- const textFieldCss = {
4783
- ...textTypographyCss,
4784
- } as React.CSSProperties;
5152
+ const columnTextCssByPrefix = useMemo(
5153
+ () => Object.fromEntries(
5154
+ COLUMN_TEXT_PREFIXES.map((prefix) => [
5155
+ prefix,
5156
+ listColumnTextFieldsToCss(resolveListColumnTextFields(settings, prefix), isEditor),
5157
+ ]),
5158
+ ),
5159
+ [
5160
+ settings,
5161
+ textFontFamily,
5162
+ textFontSettings,
5163
+ textFontSize,
5164
+ textLineHeight,
5165
+ textLetterSpacing,
5166
+ textWordSpacing,
5167
+ textTextAppearance,
5168
+ textColor,
5169
+ isEditor,
5170
+ ],
5171
+ );
4785
5172
 
4786
5173
  const colorVars = buildColorVars(P, {
4787
5174
  textColor,
@@ -4802,12 +5189,7 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4802
5189
  const wrapperStateClasses = \`\${entryHoverClass} \${stateClass}\`.trim();
4803
5190
  const showDividerTop = showVisibility?.[0] ?? false;
4804
5191
  const showDividerBottom = showVisibility?.[1] ?? false;
4805
- const dividerClassNames = [
4806
- showDividerTop ? \`\${P}-divider-top\` : '',
4807
- showDividerBottom ? \`\${P}-divider-bottom\` : '',
4808
- ].filter(Boolean).join(' ');
4809
5192
 
4810
- const containerRef = useRef<HTMLDivElement>(null);
4811
5193
  const prevSettingsRef = useRef(settings);
4812
5194
  const prevLayoutIdRef = useRef(layoutId);
4813
5195
 
@@ -4818,7 +5200,7 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4818
5200
  return;
4819
5201
  }
4820
5202
 
4821
- if (layoutId !== prevLayoutIdRef.current) {
5203
+ if (prevLayoutIdRef.current !== layoutId) {
4822
5204
  prevSettingsRef.current = settings;
4823
5205
  prevLayoutIdRef.current = layoutId;
4824
5206
  return;
@@ -4828,6 +5210,7 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4828
5210
  const updatedSettings = applyListSettingsChange(
4829
5211
  settings as Record<string, unknown>,
4830
5212
  prevSettings as Record<string, unknown>,
5213
+ { designWidth },
4831
5214
  ) as ListSettings;
4832
5215
 
4833
5216
  prevSettingsRef.current = settings;
@@ -4837,127 +5220,86 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4837
5220
  }
4838
5221
 
4839
5222
  onUpdateSettings(updatedSettings);
4840
- }, [settings, onUpdateSettings, isEditor, layoutId]);
4841
-
4842
- const columnWidthByKey: Record<ColumnWidthKey, number> = {
4843
- AColumnWidth: AColumnWidth ?? DEFAULT_COLUMN_WIDTHS.AColumnWidth,
4844
- BColumnWidth: BColumnWidth ?? DEFAULT_COLUMN_WIDTHS.BColumnWidth,
4845
- CColumnWidth: CColumnWidth ?? DEFAULT_COLUMN_WIDTHS.CColumnWidth,
4846
- DColumnWidth: DColumnWidth ?? DEFAULT_COLUMN_WIDTHS.DColumnWidth,
4847
- EColumnWidth: EColumnWidth ?? DEFAULT_COLUMN_WIDTHS.EColumnWidth,
4848
- };
5223
+ }, [settings, onUpdateSettings, isEditor, layoutId, designWidth]);
4849
5224
 
4850
- const columnPaddingLeftByKey: Record<ColumnPaddingLeftKey, number> = {
4851
- AColumnPaddingLeft: AColumnPaddingLeft ?? 0,
4852
- BColumnPaddingLeft: BColumnPaddingLeft ?? 0,
4853
- CColumnPaddingLeft: CColumnPaddingLeft ?? 0,
4854
- DColumnPaddingLeft: DColumnPaddingLeft ?? 0,
4855
- EColumnPaddingLeft: EColumnPaddingLeft ?? 0,
4856
- };
5225
+ const columnWidthByKey = useMemo(
5226
+ () => getColumnWidthsFromSettings(settings as Record<string, unknown>),
5227
+ [
5228
+ settings.AColumnWidth,
5229
+ settings.BColumnWidth,
5230
+ settings.CColumnWidth,
5231
+ settings.DColumnWidth,
5232
+ settings.EColumnWidth,
5233
+ ],
5234
+ );
4857
5235
 
4858
- const columnPaddingRightByKey: Record<ColumnPaddingRightKey, number> = {
4859
- AColumnPaddingRight: AColumnPaddingRight ?? 0,
4860
- BColumnPaddingRight: BColumnPaddingRight ?? 0,
4861
- CColumnPaddingRight: CColumnPaddingRight ?? 0,
4862
- DColumnPaddingRight: DColumnPaddingRight ?? 0,
4863
- EColumnPaddingRight: EColumnPaddingRight ?? 0,
4864
- };
5236
+ const columnPaddingLeftByKey = useMemo(
5237
+ () => getNumericSettingValues(settings as Record<string, unknown>, COLUMN_PADDING_LEFT_KEYS),
5238
+ [
5239
+ settings.AColumnPaddingLeft,
5240
+ settings.BColumnPaddingLeft,
5241
+ settings.CColumnPaddingLeft,
5242
+ settings.DColumnPaddingLeft,
5243
+ settings.EColumnPaddingLeft,
5244
+ ],
5245
+ );
4865
5246
 
4866
- const columnPaddingBottomByKey: Record<ColumnPaddingBottomKey, number> = {
4867
- AColumnPaddingBottom: AColumnPaddingBottom ?? 0,
4868
- BColumnPaddingBottom: BColumnPaddingBottom ?? 0,
4869
- CColumnPaddingBottom: CColumnPaddingBottom ?? 0,
4870
- DColumnPaddingBottom: DColumnPaddingBottom ?? 0,
4871
- EColumnPaddingBottom: EColumnPaddingBottom ?? 0,
4872
- };
5247
+ const columnPaddingRightByKey = useMemo(
5248
+ () => getNumericSettingValues(settings as Record<string, unknown>, COLUMN_PADDING_RIGHT_KEYS),
5249
+ [
5250
+ settings.AColumnPaddingRight,
5251
+ settings.BColumnPaddingRight,
5252
+ settings.CColumnPaddingRight,
5253
+ settings.DColumnPaddingRight,
5254
+ settings.EColumnPaddingRight,
5255
+ ],
5256
+ );
5257
+
5258
+ const columnPaddingBottomByKey = useMemo(
5259
+ () => getNumericSettingValues(settings as Record<string, unknown>, COLUMN_PADDING_BOTTOM_KEYS),
5260
+ [
5261
+ settings.AColumnPaddingBottom,
5262
+ settings.BColumnPaddingBottom,
5263
+ settings.CColumnPaddingBottom,
5264
+ settings.DColumnPaddingBottom,
5265
+ settings.EColumnPaddingBottom,
5266
+ ],
5267
+ );
4873
5268
 
4874
- const resolveDColumnWidthsOrder = useMemo(() => {
5269
+ const columnContentOrder = useMemo((): typeof COLUMN_CONTENT_KEYS[number][] => {
4875
5270
  if (Array.isArray(columnsOrder) && columnsOrder.length > 0) {
4876
5271
  return columnsOrder as typeof COLUMN_CONTENT_KEYS[number][];
4877
5272
  }
4878
5273
  return [...COLUMN_CONTENT_KEYS];
4879
5274
  }, [columnsOrder]);
4880
5275
 
4881
- const listColumns: ListItemColumn[] = useMemo(
4882
- () =>
4883
- resolveDColumnWidthsOrder.slice(0, columns).map((key, index) => {
4884
- const paddingLeftKey = COLUMN_PADDING_LEFT_KEYS[index];
4885
- const paddingRightKey = COLUMN_PADDING_RIGHT_KEYS[index];
4886
- const paddingBottomKey = COLUMN_PADDING_BOTTOM_KEYS[index];
4887
- return {
4888
- key,
4889
- widthKey: COLUMN_WIDTH_KEYS[index],
4890
- width: columnWidthByKey[COLUMN_WIDTH_KEYS[index]],
4891
- paddingLeftKey,
4892
- paddingRightKey,
4893
- paddingBottomKey,
4894
- paddingLeft: columnPaddingLeftByKey[paddingLeftKey],
4895
- paddingRight: columnPaddingRightByKey[paddingRightKey],
4896
- paddingBottom: columnPaddingBottomByKey[paddingBottomKey],
4897
- };
4898
- }),
4899
- [
5276
+ const listColumns = useMemo(
5277
+ () => buildListColumns(
5278
+ columnContentOrder,
4900
5279
  columns,
4901
- resolveDColumnWidthsOrder,
4902
- AColumnWidth,
4903
- BColumnWidth,
4904
- CColumnWidth,
4905
- DColumnWidth,
4906
- EColumnWidth,
4907
- AColumnPaddingLeft,
4908
- AColumnPaddingRight,
4909
- AColumnPaddingBottom,
4910
- BColumnPaddingLeft,
4911
- BColumnPaddingRight,
4912
- BColumnPaddingBottom,
4913
- CColumnPaddingLeft,
4914
- CColumnPaddingRight,
4915
- CColumnPaddingBottom,
4916
- DColumnPaddingLeft,
4917
- DColumnPaddingRight,
4918
- DColumnPaddingBottom,
4919
- EColumnPaddingLeft,
4920
- EColumnPaddingRight,
4921
- EColumnPaddingBottom,
4922
- ]
5280
+ columnWidthByKey,
5281
+ columnPaddingLeftByKey,
5282
+ columnPaddingRightByKey,
5283
+ columnPaddingBottomByKey,
5284
+ ),
5285
+ [columnContentOrder, columns, columnWidthByKey, columnPaddingLeftByKey, columnPaddingRightByKey, columnPaddingBottomByKey],
4923
5286
  );
4924
5287
 
4925
5288
  const resolvedContentWidth = getListEffectiveContentWidth(settings as Record<string, unknown>);
4926
- const storeDColumnWidthWidths = useMemo(
5289
+
5290
+ const storedColumnWidths = useMemo(
4927
5291
  () => COLUMN_WIDTH_KEYS.slice(0, columns).map((key) => columnWidthByKey[key]),
4928
- [
4929
- columns,
4930
- AColumnWidth,
4931
- BColumnWidth,
4932
- CColumnWidth,
4933
- DColumnWidth,
4934
- EColumnWidth,
4935
- ],
5292
+ [columns, columnWidthByKey],
4936
5293
  );
4937
- const resolveDColumnWidthWidths = useMemo(
5294
+
5295
+ const resolvedColumnWidths = useMemo(
4938
5296
  () => resolveListColumnWidths(columns, resolvedContentWidth, columnWidthByKey),
4939
- [
4940
- columns,
4941
- resolvedContentWidth,
4942
- AColumnWidth,
4943
- BColumnWidth,
4944
- CColumnWidth,
4945
- DColumnWidth,
4946
- EColumnWidth,
4947
- ],
5297
+ [columns, resolvedContentWidth, columnWidthByKey],
4948
5298
  );
4949
5299
 
4950
5300
  const effectiveColumnWidths = useMemo(
4951
5301
  () => getEffectiveListColumnWidths(columns, resolvedContentWidth, columnWidthByKey),
4952
- [
4953
- columns,
4954
- resolvedContentWidth,
4955
- AColumnWidth,
4956
- BColumnWidth,
4957
- CColumnWidth,
4958
- DColumnWidth,
4959
- EColumnWidth,
4960
- ],
5302
+ [columns, resolvedContentWidth, columnWidthByKey],
4961
5303
  );
4962
5304
 
4963
5305
  const effectiveColumnPaddings = useMemo(
@@ -4998,6 +5340,12 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
4998
5340
 
4999
5341
  const showCutLabel = cutEnabled && effectiveVisibleCount < allRows.length;
5000
5342
 
5343
+ const hasBetweenItemDividers = visibleRows.length > 1 || showCutLabel;
5344
+ const dividerClassNames = [
5345
+ showDividerTop ? \`\${P}-divider-top\` : '',
5346
+ showDividerBottom || hasBetweenItemDividers ? \`\${P}-divider-bottom\` : '',
5347
+ ].filter(Boolean).join(' ');
5348
+
5001
5349
  const handleShowMore = () => {
5002
5350
  const currentVisible = visibleRowCount ?? cut;
5003
5351
  if (!showCut) {
@@ -5071,8 +5419,10 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5071
5419
  const RowElement = hasLink ? 'a' : 'div';
5072
5420
  const rowStyle = getEntryDividerWidths(
5073
5421
  rowIdx,
5422
+ visibleRows.length,
5074
5423
  showDividerTop,
5075
5424
  showDividerBottom,
5425
+ showCutLabel,
5076
5426
  dividerWidth ?? 0,
5077
5427
  isEditor ?? false,
5078
5428
  );
@@ -5112,7 +5462,10 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5112
5462
  ? { minHeight: scaled(resolvedCellMinHeight) }
5113
5463
  : (isLastColumn ? {} : { width: scaled(effectiveColumnWidths[colIndex]) });
5114
5464
  const columnPaddingStyle = isVerticalLayout
5115
- ? {}
5465
+ ? {
5466
+ paddingLeft: scaled(effectiveTextPaddingLR),
5467
+ paddingRight: scaled(effectiveTextPaddingLR),
5468
+ }
5116
5469
  : {
5117
5470
  paddingLeft: scaled(effectivePadding.paddingLeft),
5118
5471
  paddingRight: scaled(effectivePadding.paddingRight),
@@ -5130,7 +5483,7 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5130
5483
  >
5131
5484
  <span
5132
5485
  className={\`\${P}-list-col-title\`}
5133
- style={textFieldCss}
5486
+ style={columnTextCssByPrefix[col.textPrefix] ?? textFieldCss}
5134
5487
  >
5135
5488
  {row.cells[col.key] ?? null}
5136
5489
  </span>
@@ -5170,7 +5523,6 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5170
5523
  style={{
5171
5524
  minHeight: scaled(cutCellMinHeight ?? 0),
5172
5525
  ...getCutItemDividerWidths(
5173
- showDividerTop,
5174
5526
  showDividerBottom,
5175
5527
  dividerWidth ?? 0,
5176
5528
  isEditor ?? false,
@@ -5179,7 +5531,14 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5179
5531
  >
5180
5532
  <div
5181
5533
  className={\`\${P}-list-cols-row\`}
5182
- style={{ justifyContent: 'center' }}
5534
+ style={
5535
+ isVerticalLayout
5536
+ ? {
5537
+ paddingLeft: scaled(effectiveTextPaddingLR),
5538
+ paddingRight: scaled(effectiveTextPaddingLR),
5539
+ }
5540
+ : { justifyContent: 'center' }
5541
+ }
5183
5542
  >
5184
5543
  <button
5185
5544
  type="button"
@@ -5241,11 +5600,11 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5241
5600
  const nextCol = listColumns[colIndex + 1];
5242
5601
  const maxColumnWidth = getColumnMaxWidth(
5243
5602
  colIndex,
5244
- resolveDColumnWidthWidths,
5245
- storeDColumnWidthWidths,
5603
+ resolvedColumnWidths,
5604
+ storedColumnWidths,
5246
5605
  resolvedContentWidth,
5247
5606
  );
5248
- const boundaryOffset = resolveDColumnWidthWidths.slice(0, colIndex + 1).reduce((sum, width) => sum + width, 0);
5607
+ const boundaryOffset = resolvedColumnWidths.slice(0, colIndex + 1).reduce((sum, width) => sum + width, 0);
5249
5608
  const colEffectivePadding = effectiveColumnPaddings[colIndex];
5250
5609
  const nextColEffectivePadding = effectiveColumnPaddings[colIndex + 1];
5251
5610
  const paddingRightWidth = Math.max(
@@ -5319,6 +5678,47 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5319
5678
  </div>
5320
5679
  );
5321
5680
  })}
5681
+ {showControls && isVerticalLayout && (
5682
+ <div key="text-padding-lr-handles" style={{ position: 'absolute', inset: 0, pointerEvents: 'none' }}>
5683
+ <div
5684
+ data-controls="textPaddingLR"
5685
+ data-controls-paired=""
5686
+ data-controls-axis="x"
5687
+ data-controls-min="0"
5688
+ data-controls-max-fraction={String(textPaddingLRMaxFraction)}
5689
+ data-controls-static-handle=""
5690
+ className={\`\${P}-text-padding-lr-handle\`}
5691
+ style={{
5692
+ position: 'absolute',
5693
+ top: 0,
5694
+ left: 0,
5695
+ width: scaled(textPaddingLRHandleWidth),
5696
+ height: '100%',
5697
+ pointerEvents: 'auto',
5698
+ zIndex: 2,
5699
+ }}
5700
+ />
5701
+ <div
5702
+ data-controls="textPaddingLR"
5703
+ data-controls-paired=""
5704
+ data-controls-axis="x"
5705
+ data-controls-reverse=""
5706
+ data-controls-min="0"
5707
+ data-controls-max-fraction={String(textPaddingLRMaxFraction)}
5708
+ data-controls-static-handle=""
5709
+ className={\`\${P}-text-padding-lr-handle\`}
5710
+ style={{
5711
+ position: 'absolute',
5712
+ top: 0,
5713
+ left: scaled(Math.max(textPaddingLRHandleWidth, resolvedContentWidth - textPaddingLRHandleWidth)),
5714
+ width: scaled(textPaddingLRHandleWidth),
5715
+ height: '100%',
5716
+ pointerEvents: 'auto',
5717
+ zIndex: 2,
5718
+ }}
5719
+ />
5720
+ </div>
5721
+ )}
5322
5722
  {showHoverImage && hoverImage && (
5323
5723
  <img
5324
5724
  className={\`\${P}-hover-image\`}
@@ -5335,77 +5735,4 @@ export function List({ settings, content, isEditor, isPreviewMode, metadata, act
5335
5735
  </>
5336
5736
  );
5337
5737
  }
5338
-
5339
- type ListSettings = {
5340
- columns: number;
5341
- type: 'A' | 'B';
5342
- wrapperWidth: number;
5343
- entriesCount: number;
5344
- cellMinHeight: number;
5345
- imageOnHover: 'On' | 'Off';
5346
- imageSize?: { min: number; max: number };
5347
- dividerWidth: number;
5348
- showVisibility: boolean[];
5349
- cut: number;
5350
- showCut: number;
5351
- cutCellMinHeight: number;
5352
- cutLabel: string;
5353
- entryHoverEffect: 'None' | 'Default' | 'Blinds';
5354
- rowPaddingTop: number;
5355
- rowPaddingBottom: number;
5356
- rowPaddingTopB: number;
5357
- AColumnWidth: number;
5358
- AColumnPaddingLeft: number;
5359
- AColumnPaddingRight: number;
5360
- AColumnPaddingBottom: number;
5361
- BColumnWidth: number;
5362
- BColumnPaddingLeft: number;
5363
- BColumnPaddingRight: number;
5364
- BColumnPaddingBottom: number;
5365
- CColumnWidth: number;
5366
- CColumnPaddingLeft: number;
5367
- CColumnPaddingRight: number;
5368
- CColumnPaddingBottom: number;
5369
- DColumnWidth: number;
5370
- DColumnPaddingLeft: number;
5371
- DColumnPaddingRight: number;
5372
- DColumnPaddingBottom: number;
5373
- EColumnWidth: number;
5374
- EColumnPaddingLeft: number;
5375
- EColumnPaddingRight: number;
5376
- EColumnPaddingBottom: number;
5377
- columnsOrder?: string[];
5378
- textColor: string;
5379
- textFontFamily: string;
5380
- textFontSettings?: { fontWeight: number; fontStyle: string };
5381
- textFontSize?: number;
5382
- textLineHeight?: number;
5383
- textLetterSpacing?: number;
5384
- textWordSpacing?: number;
5385
- textTextAppearance?: TextStyles['textAppearance'];
5386
- backgroundColor: string;
5387
- dividerColor: string;
5388
- textHoverColor: string;
5389
- backgroundHoverColor: string;
5390
- dividerHoverColor: string;
5391
- };
5392
-
5393
- type ColorKeys =
5394
- | 'textColor'
5395
- | 'backgroundColor'
5396
- | 'dividerColor'
5397
- | 'textHoverColor'
5398
- | 'backgroundHoverColor'
5399
- | 'dividerHoverColor'
5400
-
5401
- const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5402
- textColor: 'text-color',
5403
- backgroundColor: 'background-color',
5404
- dividerColor: 'divider-color',
5405
- textHoverColor: 'text-hover-color',
5406
- backgroundHoverColor: 'background-hover-color',
5407
- dividerHoverColor: 'divider-hover-color',
5408
- };
5409
-
5410
- const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5411
- `,kc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fc=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],Mc={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{AColumn:{type:"string",label:"A column",placeholder:"Add Title...",display:{type:"text-input"}},BColumnWidth:{type:"string",label:"B column",placeholder:"Add Title...",display:{type:"text-input"}},CColumnWidth:{type:"string",label:"C column",placeholder:"Add Title...",display:{type:"text-input"}},DColumnWidth:{type:"string",label:"D column",placeholder:"Add Title...",display:{type:"text-input"}},EColumnWidth:{type:"string",label:"E column",placeholder:"Add Title...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{AColumn:"AColumn",BColumnWidth:"BColumnWidth",CColumnWidth:"CColumnWidth",DColumnWidth:"DColumnWidth",EColumnWidth:"EColumnWidth",image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{AColumn:"AColumn 2",BColumnWidth:"BColumnWidth 2",CColumnWidth:"CColumnWidth 2",DColumnWidth:"DColumnWidth 2",EColumnWidth:"EColumnWidth 2",image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{AColumn:"AColumn 3",BColumnWidth:"BColumnWidth 3",CColumnWidth:"CColumnWidth 3",DColumnWidth:"DColumnWidth 3",EColumnWidth:"EColumnWidth 3",image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""}]}},settings:{sizing:"auto auto",properties:{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},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"}},AColumnWidth:{type:"number",scope:"layout",title:"A column width",min:0,max:100,display:{type:"range-control"}},AColumnPaddingLeft:{type:"number",scope:"layout",title:"A column padding left",min:0,max:100,display:{type:"range-control"}},AColumnPaddingRight:{type:"number",scope:"layout",title:"A column padding right",min:0,max:100,display:{type:"range-control"}},BColumnWidth:{type:"number",scope:"layout",title:"B column width",min:0,max:100,display:{type:"range-control"}},BColumnPaddingLeft:{type:"number",scope:"layout",title:"B column padding left",min:0,max:100,display:{type:"range-control"}},BColumnPaddingRight:{type:"number",scope:"layout",title:"B column padding right",min:0,max:100,display:{type:"range-control"}},CColumnWidth:{type:"number",scope:"layout",title:"C column width",min:0,max:100,display:{type:"range-control"}},CColumnPaddingLeft:{type:"number",scope:"layout",title:"C column padding left",min:0,max:100,display:{type:"range-control"}},CColumnPaddingRight:{type:"number",scope:"layout",title:"C column padding right",min:0,max:100,display:{type:"range-control"}},DColumnWidth:{type:"number",scope:"layout",title:"D column width",min:0,max:100,display:{type:"range-control"}},DColumnPaddingLeft:{type:"number",scope:"layout",title:"D column padding left",min:0,max:100,display:{type:"range-control"}},DColumnPaddingRight:{type:"number",scope:"layout",title:"D column padding right",min:0,max:100,display:{type:"range-control"}},EColumnWidth:{type:"number",scope:"layout",title:"E column width",min:0,max:100,display:{type:"range-control"}},EColumnPaddingLeft:{type:"number",scope:"layout",title:"E column padding left",min:0,max:100,display:{type:"range-control"}},EColumnPaddingRight:{type:"number",scope:"layout",title:"E column padding right",min:0,max:100,display:{type:"range-control"}},AColumnPaddingBottom:{type:"number",scope:"layout",title:"A column padding bottom",min:0,max:100,display:{type:"range-control"}},BColumnPaddingBottom:{type:"number",scope:"layout",title:"B column padding bottom",min:0,max:100,display:{type:"range-control"}},CColumnPaddingBottom:{type:"number",scope:"layout",title:"C column padding bottom",min:0,max:100,display:{type:"range-control"}},DColumnPaddingBottom:{type:"number",scope:"layout",title:"D column padding bottom",min:0,max:100,display:{type:"range-control"}},EColumnPaddingBottom:{type:"number",scope:"layout",title:"E column padding bottom",min:0,max:100,display:{type:"range-control"}},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"}},textFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},textFontSettings:{...kc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},backgroundColor:{type:"string",scope:"common",title:"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:[!1,!0],textColor:"#767676",textHoverColor:"#767676",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:{columns:5,type:"B",wrapperWidth:1,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.002,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,AColumnWidth:.2,AColumnPaddingLeft:0,AColumnPaddingRight:0,BColumnWidth:.2,BColumnPaddingLeft:0,BColumnPaddingRight:0,CColumnWidth:.2,CColumnPaddingLeft:0,CColumnPaddingRight:0,DColumnWidth:.2,DColumnPaddingLeft:0,DColumnPaddingRight:0,EColumnWidth:.2,EColumnPaddingLeft:0,EColumnPaddingRight:0,AColumnPaddingBottom:0,BColumnPaddingBottom:0,CColumnPaddingBottom:0,DColumnPaddingBottom:0,EColumnPaddingBottom:0,columnsOrder:["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},textFontSize:.043,textLineHeight:.043},d:{columns:5,type:"A",wrapperWidth:1,entriesCount:0,cellMinHeight:.03,imageSize:{min:80,max:320},dividerWidth:6e-4,cut:0,showCut:0,cutCellMinHeight:.03,rowPaddingTop:.01,rowPaddingBottom:.01,rowPaddingTopB:.01,AColumnWidth:.2,AColumnPaddingLeft:0,AColumnPaddingRight:0,BColumnWidth:.2,BColumnPaddingLeft:0,BColumnPaddingRight:0,CColumnWidth:.2,CColumnPaddingLeft:0,CColumnPaddingRight:0,DColumnWidth:.2,DColumnPaddingLeft:0,DColumnPaddingRight:0,EColumnWidth:.2,EColumnPaddingLeft:0,EColumnPaddingRight:0,AColumnPaddingBottom:0,BColumnPaddingBottom:0,CColumnPaddingBottom:0,DColumnPaddingBottom:0,EColumnPaddingBottom:0,columnsOrder:["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},textFontSize:.01,textLineHeight:.01}},displayRules:[{if:{name:"cut",value:0},then:{name:"properties.cutLabel.display.visible",value:!1}},{if:{name:"cut",value:0},then:{name:"properties.cutCellMinHeight.display.visible",value:!1}},{if:{name:"cut",value:0},then:{name:"properties.showCut.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.AColumnWidth.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.AColumnPaddingLeft.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.AColumnPaddingRight.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.BColumnWidth.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.BColumnPaddingLeft.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.BColumnPaddingRight.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.CColumnWidth.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.CColumnPaddingLeft.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.CColumnPaddingRight.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.DColumnWidth.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.DColumnPaddingLeft.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.DColumnPaddingRight.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.EColumnWidth.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.EColumnPaddingLeft.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.EColumnPaddingRight.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.rowPaddingTop.display.visible",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.rowPaddingBottom.display.visible",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.AColumnPaddingBottom.display.visible",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.BColumnPaddingBottom.display.visible",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.CColumnPaddingBottom.display.visible",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.DColumnPaddingBottom.display.visible",value:!1}},{if:{name:"type",value:"A"},then:{name:"properties.EColumnPaddingBottom.display.visible",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB","AColumnWidth","AColumnPaddingLeft","AColumnPaddingRight","AColumnPaddingBottom","BColumnWidth","BColumnPaddingLeft","BColumnPaddingRight","BColumnPaddingBottom","CColumnWidth","CColumnPaddingLeft","CColumnPaddingRight","CColumnPaddingBottom","DColumnWidth","DColumnPaddingLeft","DColumnPaddingRight","DColumnPaddingBottom","EColumnWidth","EColumnPaddingLeft","EColumnPaddingRight","EColumnPaddingBottom","columnsOrder"]},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:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]}],paletteBookmark:{items:[...Fc],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},Bc={element:Ec,id:"list",name:"Default List",category:"lists",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Mc,sourceCode:Rc},Hc=[Il,Ol,Ps,Ms,Us,Zs,rc,gc,Bc];exports.components=Hc;exports.isSchemaV1=$i;
5738
+ `,Fe=["A","B","C","D","E"],Hc={FontFamily:"textFontFamily",FontSettings:"textFontSettings",FontSize:"textFontSize",LineHeight:"textLineHeight",LetterSpacing:"textLetterSpacing",WordSpacing:"textWordSpacing",TextAppearance:"textTextAppearance"};function Et(t,e){return Ur(t,Hc[e])}const Le={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"}},textAppearance:{type:"object",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"]}}}};function Bc(t){return{type:"string",label:t,placeholder:"Add Title...",display:{type:"text-input"}}}function Rn(t){return{type:"number",scope:"layout",title:t,min:0,max:100,display:{type:"range-control"}}}function zc(){return Object.fromEntries(Fe.map((t,e)=>{const n=De[e],r=`${t} column`;return[n,Bc(r)]}))}function Dc(){const t={};for(const e of Fe)t[`${e}ColumnWidth`]=Rn(`${e} column width`),t[`${e}ColumnPaddingLeft`]=Rn(`${e} column padding left`),t[`${e}ColumnPaddingRight`]=Rn(`${e} column padding right`),t[`${e}ColumnPaddingBottom`]=Rn(`${e} column padding bottom`);return t}function To(t={}){const e={columns:5,wrapperWidth:1,columnsOrder:[...De]};for(const n of Fe)e[`${n}ColumnWidth`]=.2,e[`${n}ColumnPaddingLeft`]=0,e[`${n}ColumnPaddingRight`]=0,e[`${n}ColumnPaddingBottom`]=0;return{...e,...t}}function jc(t){return{[Et(t,"FontFamily")]:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},[Et(t,"FontSettings")]:{...Le.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},[Et(t,"FontSize")]:{...Le.fontSize,scope:"layout",title:"Font Size",display:{type:"font-size"}},[Et(t,"LineHeight")]:{...Le.lineHeight,scope:"layout",title:"Line Height",display:{type:"line-height-input"}},[Et(t,"LetterSpacing")]:{...Le.letterSpacing,scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},[Et(t,"WordSpacing")]:{...Le.wordSpacing,scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},[Et(t,"TextAppearance")]:{...Le.textAppearance,scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}}}}const Vc=qe.reduce((t,e)=>({...t,...jc(e)}),{}),Kc=qe.reduce((t,e)=>({...t,[Et(e,"FontFamily")]:"Arial",[Et(e,"FontSettings")]:{fontWeight:400,fontStyle:"normal"},[Et(e,"LetterSpacing")]:0,[Et(e,"WordSpacing")]:0,[Et(e,"TextAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Lo(t){const{textFontSize:e,textLineHeight:n}=t;return qe.reduce((r,o)=>(e!==void 0&&(r[Et(o,"FontSize")]=e),n!==void 0&&(r[Et(o,"LineHeight")]=n),r),{})}const Uc=Fe.map(t=>`${t} column`),Gc=qe.map((t,e)=>({type:"group",title:Uc[e],items:[Et(t,"FontFamily"),Et(t,"FontSettings"),{type:"row",items:[Et(t,"FontSize"),Et(t,"LineHeight"),Et(t,"LetterSpacing"),Et(t,"WordSpacing")]},Et(t,"TextAppearance")]})),Yc=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"],qc=["cutLabel","cutCellMinHeight","showCut"],Xc=[...Fe.flatMap(t=>[`${t}ColumnWidth`,`${t}ColumnPaddingLeft`,`${t}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"];function tn(t,e,n){return n.map(r=>({if:{name:t,value:e},then:{name:`properties.${r}.display.visible`,value:!1}}))}function gr(t,e){const n=t?` ${t}`:"";return{AColumn:`AColumn${n}`,BColumnWidth:`BColumnWidth${n}`,CColumnWidth:`CColumnWidth${n}`,DColumnWidth:`DColumnWidth${n}`,EColumnWidth:`EColumnWidth${n}`,image:e,link:""}}const Zc=[gr("",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"}),gr("2",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"}),gr("3",{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"})],Jc=[...Fe.flatMap(t=>[`${t}ColumnWidth`,`${t}ColumnPaddingLeft`,`${t}ColumnPaddingRight`,`${t}ColumnPaddingBottom`]),"columnsOrder"],Qc={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{...zc(),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:Zc}},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"}},...Dc(),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"}},textFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},textFontSettings:{...Le.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},...Vc,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",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...Kc,backgroundColor:"#FFFFFF00",dividerColor:"#767676",backgroundHoverColor:"#FFFFFF00",dividerHoverColor:"#767676"},layoutDefaults:{m:To({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},textFontSize:.043,textLineHeight:.043,...Lo({textFontSize:.043,textLineHeight:.043})}),d:To({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},textFontSize:.01,textLineHeight:.01,...Lo({textFontSize:.01,textLineHeight:.01})})},displayRules:[...tn("cut",0,qc),...tn("type","A",["textPaddingLR"]),...tn("type","B",Xc),...tn("type","A",["rowPaddingTopB"]),...tn("type","A",Fe.map(t=>`${t}ColumnPaddingBottom`))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Jc]},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:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["columnsOrder"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"All text",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},...Gc]}],paletteBookmark:{items:[...Yc],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},td={element:Oc,id:"list",name:"Default List",category:"lists",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qc,sourceCode:Nc},ed=[Ws,Os,Tl,Al,Vl,ql,ec,pc,td];exports.components=ed;exports.isSchemaV1=Ci;