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

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.
Files changed (3) hide show
  1. package/dist/index.js +218 -306
  2. package/dist/index.mjs +2568 -2690
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("react"),he=require("classnames"),k=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Sr=require("react-dom");function Cr(e){return e.type==="object"&&e.version===1}const wr="ControlSlider-module__wrapper___sHEkd",$r="ControlSlider-module__hoverArrow___A-dOH",Tr="ControlSlider-module__sliderItem___QQSkR",_r="ControlSlider-module__sliderImage___9hRl-",Er="ControlSlider-module__arrow___05ghY",kr="ControlSlider-module__arrowVertical___tBfVN",Lr="ControlSlider-module__nextArrow___-30Yc",Ar="ControlSlider-module__arrowInner___aEra3",Ir="ControlSlider-module__arrowIcon___S4ztF",Mr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",Pr="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Wr="ControlSlider-module__paginationVertical___zYqKw",Hr="ControlSlider-module__paginationItem___nTRbk",jr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",Vr="ControlSlider-module__paginationInsideBottom___R3FWn",Or="ControlSlider-module__paginationInsideTop___V-qb-",Br="ControlSlider-module__paginationOutsideBottom___14w8D",zr="ControlSlider-module__paginationOutsideTop___SCLqB",Dr="ControlSlider-module__paginationInsideLeft___yOBRZ",qr="ControlSlider-module__paginationInsideRight___Rtt3o",Ur="ControlSlider-module__paginationOutsideLeft___lahaw",Gr="ControlSlider-module__paginationOutsideRight___EtuQa",Kr="ControlSlider-module__imgWrapper___UjEgB",Yr="ControlSlider-module__captionBlock___dJ6-j",Xr="ControlSlider-module__captionTextWrapper___HFlpf",Zr="ControlSlider-module__captionText___uGBVc",Jr="ControlSlider-module__active___WZK4G",Qr="ControlSlider-module__withPointerEvents___t-18M",ei="ControlSlider-module__topLeftAlignment___zjnGM",ti="ControlSlider-module__topCenterAlignment___gD1xW",ni="ControlSlider-module__topRightAlignment___NMapS",oi="ControlSlider-module__middleLeftAlignment___OnUrY",ri="ControlSlider-module__middleCenterAlignment___Tdkl0",ii="ControlSlider-module__middleRightAlignment___wEbfX",ai="ControlSlider-module__bottomLeftAlignment___cTP2-",si="ControlSlider-module__bottomCenterAlignment___c54fB",li="ControlSlider-module__bottomRightAlignment___kEwrz",ci="ControlSlider-module__clickOverlay___DZA28",ui="ControlSlider-module__contain___pLyq7",pi="ControlSlider-module__cover___KdDat",ne={wrapper:wr,hoverArrow:$r,sliderItem:Tr,sliderImage:_r,arrow:Er,arrowVertical:kr,nextArrow:Lr,arrowInner:Ar,arrowIcon:Ir,arrowImg:Mr,mirror:Fr,pagination:Pr,paginationInner:Rr,paginationVertical:Wr,paginationItem:Hr,dot:jr,activeDot:Nr,paginationInsideBottom:Vr,paginationInsideTop:Or,paginationOutsideBottom:Br,paginationOutsideTop:zr,paginationInsideLeft:Dr,paginationInsideRight:qr,paginationOutsideLeft:Ur,paginationOutsideRight:Gr,imgWrapper:Kr,captionBlock:Yr,captionTextWrapper:Xr,captionText:Zr,active:Jr,withPointerEvents:Qr,topLeftAlignment:ei,topCenterAlignment:ti,topRightAlignment:ni,middleLeftAlignment:oi,middleCenterAlignment:ri,middleRightAlignment:ii,bottomLeftAlignment:ai,bottomCenterAlignment:si,bottomRightAlignment:li,clickOverlay:ci,contain:ui,cover:pi};function di(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function mi(e,t,n){return t&&di(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ro="(prefers-reduced-motion: reduce)",mt=1,gi=2,yt=3,xt=4,Rt=5,Xt=6,en=7,fi={CREATED:mt,MOUNTED:gi,IDLE:yt,MOVING:xt,SCROLLING:Rt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Io=setTimeout,_n=function(){};function io(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Wn(e)&&an("object",e)}var Rn=Array.isArray,Mo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Wn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Rn(e)?e:[e]}function Le(e,t){Ht(e).forEach(t)}function Hn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function ze(e,t,n){e&&Le(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){ze(e,Ze(t)?t.split(" "):t,!0)}function jt(e,t){Le(t,e.appendChild.bind(e))}function jn(e,t){Le(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Po(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function Nt(e,t){return t?Po(e,t)[0]:e.firstElementChild}var Lt=Object.keys;function rt(e,t,n){return e&&(n?Lt(e).reverse():Lt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function At(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Rn(n)?e[o]=n.slice():Et(n)?e[o]=Ye({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function ao(e,t){Le(t||Lt(e),function(n){delete e[n]})}function He(e,t){Le(e,function(n){Le(t,function(o){n&&n.removeAttribute(o)})})}function ue(e,t,n){Et(t)?rt(t,function(o,r){ue(e,r,o)}):Le(e,function(o){Wn(n)||n===""?He(o,t):o.setAttribute(t,String(n))})}function gt(e,t,n){var o=document.createElement(e);return t&&(Ze(t)?We(o,t):ue(o,t)),n&&jt(n,o),o}function Ie(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Wn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Me(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Le(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Wo(e){return Nt(new DOMParser().parseFromString(e,"text/html").body)}function Be(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ho(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){ze(e,t,!1)}function En(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",Vn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Mt=Math.ceil,_e=Math.abs;function jo(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function kn(e){return+(e>0)-+(e<0)}function Ln(e,t){return Le(t,function(n){e=e.replace("%s",""+n)}),e}function On(e){return e<10?"0"+e:""+e}var lo={};function hi(e){return""+e+On(lo[e]=(lo[e]||0)+1)}function No(){var e=[];function t(i,u,l,d){r(i,u,function(c,T,w){var f="addEventListener"in c,p=f?c.removeEventListener.bind(c,T,l,d):c.removeListener.bind(c,l);f?c.addEventListener(T,l,d):c.addListener(l),e.push([c,T,w,l,p])})}function n(i,u,l){r(i,u,function(d,c,T){e=e.filter(function(w){return w[0]===d&&w[1]===c&&w[2]===T&&(!l||w[3]===l)?(w[4](),!1):!0})})}function o(i,u,l){var d,c=!0;return typeof CustomEvent=="function"?d=new CustomEvent(u,{bubbles:c,detail:l}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(u,c,!1,l)),i.dispatchEvent(d),d}function r(i,u,l){Le(i,function(d){d&&Le(u,function(c){c.split(" ").forEach(function(T){var w=T.split(".");l(d,w[0],w[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",Bn="click",Vo="active",Oo="inactive",Bo="visible",zo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",Do="drag",qo="dragging",Uo="dragged",ln="scroll",st="scrolled",yi="overflow",zn="destroy",Go="arrows:mounted",Ko="arrows:updated",Yo="pagination:mounted",Xo="pagination:updated",Dn="navigation:mounted",qn="autoplay:play",Zo="autoplay:playing",Un="autoplay:pause",Gn="lazyload:loaded",Jo="sk",Qo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function o(s,i){n.bind(t,Ht(s).join(" "),function(u){i.apply(i,Rn(u.detail)?u.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(zn,n.destroy),At(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,u,l=!0,d=0;function c(){if(!l){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++d>=o))return w();u=io(c)}}function T(v){v||p(),s=r()-(v?i*e:0),l=!1,u=io(c)}function w(){l=!0}function f(){s=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,l=!0}function m(v){e=v}function S(){return l}return{start:T,rewind:f,pause:w,cancel:p,set:m,isPaused:S}}function vi(e){var t=e;function n(r){t=r}function o(r){return Hn(Ht(r),t)}return{set:n,is:o}}function bi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function xi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=No(),u=[];function l(){var p=n.mediaQuery==="min";Lt(r).sort(function(m,S){return p?+m-+S:+S-+m}).forEach(function(m){c(r[m],"("+(p?"min":"max")+"-width:"+m+"px)")}),c(s,ro),T()}function d(p){p&&i.destroy()}function c(p,m){var S=matchMedia(m);i.bind(S,"change",T),u.push([p,S])}function T(){var p=o.is(en),m=n.direction,S=u.reduce(function(v,x){return Ye(v,x[1].matches?x[0]:{})},{});ao(n),f(S),n.destroy?e.destroy(n.destroy==="completely"):p?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function w(p){matchMedia(ro).matches&&(p?Ye(n,s):ao(n,Lt(s)))}function f(p,m,S){Ye(n,p),m&&Ye(Object.getPrototypeOf(n),p),(S||!o.is(mt))&&e.emit(Te,n)}return{setup:l,destroy:d,reduce:w,set:f}}var un="Arrow",pn=un+"Left",dn=un+"Right",er=un+"Up",tr=un+"Down",co="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[er,dn],ArrowRight:[tr,pn]};function Si(e,t,n){function o(s,i,u){u=u||n.direction;var l=u===co&&!i?1:u===mn?0:-1;return bn[s]&&bn[s][l]||s.replace(/width|left|right/i,function(d,c){var T=bn[d.toLowerCase()][l]||d;return c>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function r(s){return s*(n.direction===co?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",Ci="disabled",Fe="aria-",Ot=Fe+"controls",nr=Fe+"current",uo=Fe+"selected",ke=Fe+"label",Kn=Fe+"labelledby",or=Fe+"hidden",Yn=Fe+"orientation",Ft=Fe+"roledescription",po=Fe+"live",mo=Fe+"busy",go=Fe+"atomic",Xn=[qe,ft,Ci,Ot,nr,ke,Kn,or,Yn,Ft],je=Vt+"__",tt="is-",xn=Vt,fo=je+"track",wi=je+"list",gn=je+"slide",rr=gn+"--clone",$i=gn+"__container",Zn=je+"arrows",fn=je+"arrow",ir=fn+"--prev",ar=fn+"--next",hn=je+"pagination",sr=hn+"__page",Ti=je+"progress",_i=Ti+"__bar",Ei=je+"toggle",ki=je+"spinner",Li=je+"sr",Ai=tt+"initialized",at=tt+"active",lr=tt+"prev",cr=tt+"next",In=tt+"visible",Mn=tt+"loading",ur=tt+"focus-in",pr=tt+"overflow",Ii=[at,In,lr,cr,Mn,ur,pr],Mi={slide:gn,clone:rr,arrows:Zn,arrow:fn,prev:ir,next:ar,pagination:hn,page:sr,spinner:ki};function Fi(e,t){if(Mo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Pi=5,ho=200,dr="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Ri(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,u=n.i18n,l={},d=[],c=[],T=[],w,f,p;function m(){_(),q(),x()}function S(){r(Se,v),r(Se,m),r(Te,x),s(document,dr+" keydown",function(C){p=C.type==="keydown"},{capture:!0}),s(i,"focusin",function(){ze(i,ur,!!p)})}function v(C){var $=Xn.concat("style");Ue(d),De(i,c),De(w,T),He([w,f],$),He(i,C?$:["style",Ft])}function x(){De(i,c),De(w,T),c=L(xn),T=L(fo),We(i,c),We(w,T),ue(i,ke,n.label),ue(i,Kn,n.labelledby)}function _(){w=H("."+fo),f=Nt(w,"."+wi),Tt(w&&f,"A track/list element is missing."),Zt(d,Po(f,"."+gn+":not(."+rr+")")),rt({arrows:Zn,pagination:hn,prev:ir,next:ar,bar:_i,toggle:Ei},function(C,$){l[$]=H("."+C)}),At(l,{root:i,track:w,list:f,slides:d})}function q(){var C=i.id||hi(Vt),$=n.role;i.id=C,w.id=w.id||C+"-track",f.id=f.id||C+"-list",!Me(i,qe)&&i.tagName!=="SECTION"&&$&&ue(i,qe,$),ue(i,Ft,u.carousel),ue(f,qe,"presentation")}function H(C){var $=Ho(i,C);return $&&Fi($,"."+xn)===i?$:void 0}function L(C){return[C+"--"+n.type,C+"--"+n.direction,n.drag&&C+"--draggable",n.isNavigation&&C+"--nav",C===xn&&at]}return At(l,{setup:m,mount:S,destroy:v})}var bt="slide",Ct="loop",Bt="fade";function Wi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,u=r.bind,l=e.Components,d=e.root,c=e.options,T=c.isNavigation,w=c.updateOnMove,f=c.i18n,p=c.pagination,m=c.slideFocus,S=l.Direction.resolve,v=Me(o,"style"),x=Me(o,ke),_=n>-1,q=Nt(o,"."+$i),H;function L(){_||(o.id=d.id+"-slide"+On(t+1),ue(o,qe,p?"tabpanel":"group"),ue(o,Ft,f.slide),ue(o,ke,x||Ln(f.slideLabel,[t+1,e.length]))),C()}function C(){u(o,"click",ve(i,Bn,I)),u(o,"keydown",ve(i,Jo,I)),s([St,Qo,st],R),s(Dn,A),w&&s(Ge,B)}function $(){H=!0,r.destroy(),De(o,Ii),He(o,Xn),ue(o,"style",v),ue(o,ke,x||"")}function A(){var P=e.splides.map(function(E){var W=E.splide.Components.Slides.getAt(t);return W?W.slide.id:""}).join(" ");ue(o,ke,Ln(f.slideX,(_?n:t)+1)),ue(o,Ot,P),ue(o,qe,m?"button":""),m&&He(o,Ft)}function B(){H||R()}function R(){if(!H){var P=e.index;j(),V(),ze(o,lr,t===P-1),ze(o,cr,t===P+1)}}function j(){var P=Y();P!==so(o,at)&&(ze(o,at,P),ue(o,nr,T&&P||""),i(P?Vo:Oo,I))}function V(){var P=y(),E=!P&&(!Y()||_);if(e.state.is([xt,Rt])||ue(o,or,E||""),ue(Nn(o,c.focusableNodes||""),ft,E?-1:""),m&&ue(o,ft,E?-1:0),P!==so(o,In)&&(ze(o,In,P),i(P?Bo:zo,I)),!P&&document.activeElement===o){var W=l.Slides.getAt(e.index);W&&Ro(W.slide)}}function z(P,E,W){Ie(W&&q||o,P,E)}function Y(){var P=e.index;return P===t||c.cloneStatus&&P===n}function y(){if(e.is(Bt))return Y();var P=Ee(l.Elements.track),E=Ee(o),W=S("left",!0),ee=S("right",!0);return nn(P[W])<=Mt(E[W])&&nn(E[ee])<=Mt(P[ee])}function F(P,E){var W=_e(P-t);return!_&&(c.rewind||e.is(Ct))&&(W=Je(W,e.length-W)),W<=E}var I={index:t,slideIndex:n,slide:o,container:q,isClone:_,mount:L,destroy:$,update:R,style:z,isWithin:F};return I}function Hi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Elements,l=u.slides,d=u.list,c=[];function T(){w(),r(Se,f),r(Se,w)}function w(){l.forEach(function(R,j){m(R,j,-1)})}function f(){H(function(R){R.destroy()}),Ue(c)}function p(){H(function(R){R.update()})}function m(R,j,V){var z=Wi(e,j,V,R);z.mount(),c.push(z),c.sort(function(Y,y){return Y.index-y.index})}function S(R){return R?L(function(j){return!j.isClone}):c}function v(R){var j=t.Controller,V=j.toIndex(R),z=j.hasFocus()?1:n.perPage;return L(function(Y){return Jt(Y.index,V,V+z-1)})}function x(R){return L(R)[0]}function _(R,j){Le(R,function(V){if(Ze(V)&&(V=Wo(V)),Fo(V)){var z=l[j];z?jn(V,z):jt(d,V),We(V,n.classes.slide),$(V,ve(s,vt))}}),s(Se)}function q(R){it(L(R).map(function(j){return j.slide})),s(Se)}function H(R,j){S(j).forEach(R)}function L(R){return c.filter(Mo(R)?R:function(j){return Ze(R)?kt(j.slide,R):Hn(Ht(R),j.index)})}function C(R,j,V){H(function(z){z.style(R,j,V)})}function $(R,j){var V=Nn(R,"img"),z=V.length;z?V.forEach(function(Y){i(Y,"load error",function(){--z||j()})}):j()}function A(R){return R?l.length:c.length}function B(){return c.length>n.perPage}return{mount:T,destroy:f,update:p,register:m,get:S,getIn:v,getAt:x,add:_,remove:q,forEach:H,filter:L,style:C,getLength:A,isEnough:B}}function ji(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=t.Slides,l=t.Direction.resolve,d=t.Elements,c=d.root,T=d.track,w=d.list,f=u.getAt,p=u.style,m,S,v;function x(){_(),s(window,"resize load",bi(ve(i,vt))),r([Te,Se],_),r(vt,q)}function _(){m=n.direction===mn,Ie(c,"maxWidth",ot(n.width)),Ie(T,l("paddingLeft"),H(!1)),Ie(T,l("paddingRight"),H(!0)),q(!0)}function q(I){var P=Ee(c);(I||S.width!==P.width||S.height!==P.height)&&(Ie(T,"height",L()),p(l("marginRight"),ot(n.gap)),p("width",$()),p("height",A(),!0),S=P,i(sn),v!==(v=F())&&(ze(c,pr,v),i(yi,v)))}function H(I){var P=n.padding,E=l(I?"right":"left");return P&&ot(P[E]||(Et(P)?0:P))||"0px"}function L(){var I="";return m&&(I=C(),Tt(I,"height or heightRatio is missing."),I="calc("+I+" - "+H(!1)+" - "+H(!0)+")"),I}function C(){return ot(n.height||Ee(w).width*n.heightRatio)}function $(){return n.autoWidth?null:ot(n.fixedWidth)||(m?"":B())}function A(){return ot(n.fixedHeight)||(m?n.autoHeight?null:B():C())}function B(){var I=ot(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function R(){return Ee(w)[l("width")]}function j(I,P){var E=f(I||0);return E?Ee(E.slide)[l("width")]+(P?0:Y()):0}function V(I,P){var E=f(I);if(E){var W=Ee(E.slide)[l("right")],ee=Ee(w)[l("left")];return _e(W-ee)+(P?0:Y())}return 0}function z(I){return V(e.length-1)-V(0)+j(0,I)}function Y(){var I=f(0);return I&&parseFloat(Ie(I.slide,l("marginRight")))||0}function y(I){return parseFloat(Ie(T,l("padding"+(I?"Right":"Left"))))||0}function F(){return e.is(Bt)||z(!0)>R()}return{mount:x,resize:q,listSize:R,slideSize:j,sliderSize:z,totalSize:V,getPadding:y,isOverflow:F}}var Ni=2;function Vi(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,u=t.Direction.resolve,l=[],d;function c(){r(Se,T),r([Te,vt],f),(d=S())&&(p(d),t.Layout.resize(!0))}function T(){w(),c()}function w(){it(l),Ue(l),o.destroy()}function f(){var v=S();d!==v&&(d<v||!v)&&o.emit(Se)}function p(v){var x=i.get().slice(),_=x.length;if(_){for(;x.length<v;)Zt(x,x);Zt(x.slice(-v),x.slice(0,v)).forEach(function(q,H){var L=H<v,C=m(q.slide,H);L?jn(C,x[0].slide):jt(s.list,C),Zt(l,C),i.register(C,H-v+(L?0:_),q.index)})}}function m(v,x){var _=v.cloneNode(!0);return We(_,n.classes.clone),_.id=e.root.id+"-clone"+On(x+1),_}function S(){var v=n.clones;if(!e.is(Ct))v=0;else if(Wt(v)){var x=n[u("fixedWidth")]&&t.Layout.slideSize(0),_=x&&Mt(Ee(s.track)[u("width")]/x);v=_||n[u("autoWidth")]&&e.length||n.perPage*Ni}return v}return{mount:c,destroy:w}}function Oi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Layout,l=u.slideSize,d=u.getPadding,c=u.totalSize,T=u.listSize,w=u.sliderSize,f=t.Direction,p=f.resolve,m=f.orient,S=t.Elements,v=S.list,x=S.track,_;function q(){_=t.Transition,r([et,sn,Te,Se],H)}function H(){t.Controller.isBusy()||(t.Scroll.cancel(),C(e.index),t.Slides.update())}function L(E,W,ee,se){E!==W&&I(E>ee)&&(R(),$(B(z(),E>ee),!0)),i(xt),s(Ge,W,ee,E),_.start(W,function(){i(yt),s(St,W,ee,E),se&&se()})}function C(E){$(V(E,!0))}function $(E,W){if(!e.is(Bt)){var ee=W?E:A(E);Ie(v,"transform","translate"+p("X")+"("+ee+"px)"),E!==ee&&s(Qo)}}function A(E){if(e.is(Ct)){var W=j(E),ee=W>t.Controller.getEnd(),se=W<0;(se||ee)&&(E=B(E,ee))}return E}function B(E,W){var ee=E-F(W),se=w();return E-=m(se*(Mt(_e(ee)/se)||1))*(W?1:-1),E}function R(){$(z(),!0),_.cancel()}function j(E){for(var W=t.Slides.get(),ee=0,se=1/0,M=0;M<W.length;M++){var O=W[M].index,h=_e(V(O,!0)-E);if(h<=se)se=h,ee=O;else break}return ee}function V(E,W){var ee=m(c(E-1)-y(E));return W?Y(ee):ee}function z(){var E=p("left");return Ee(v)[E]-Ee(x)[E]+m(d(!1))}function Y(E){return n.trimSpace&&e.is(bt)&&(E=pt(E,0,m(w(!0)-T()))),E}function y(E){var W=n.focus;return W==="center"?(T()-l(E,!0))/2:+W*l(E)||0}function F(E){return V(E?t.Controller.getEnd():0,!!n.trimSpace)}function I(E){var W=m(B(z(),E));return E?W>=0:W<=v[p("scrollWidth")]-Ee(x)[p("width")]}function P(E,W){W=Wt(W)?z():W;var ee=E!==!0&&m(W)<m(F(!1)),se=E!==!1&&m(W)>m(F(!0));return ee||se}return{mount:q,move:L,jump:C,translate:$,shift:B,cancel:R,toIndex:j,toPosition:V,getPosition:z,getLimit:F,exceededLimit:P,reposition:H}}function Bi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,u=i.getPosition,l=i.getLimit,d=i.toPosition,c=t.Slides,T=c.isEnough,w=c.getLength,f=n.omitEnd,p=e.is(Ct),m=e.is(bt),S=ve(z,!1),v=ve(z,!0),x=n.start||0,_,q=x,H,L,C;function $(){A(),r([Te,Se,on],A),r(sn,B)}function A(){H=w(!0),L=n.perMove,C=n.perPage,_=I();var h=pt(x,0,f?_:H-1);h!==x&&(x=h,i.reposition())}function B(){_!==I()&&s(on)}function R(h,K,ae){if(!O()){var pe=V(h),fe=F(pe);fe>-1&&(K||fe!==x)&&(ee(fe),i.move(pe,fe,q,ae))}}function j(h,K,ae,pe){t.Scroll.scroll(h,K,ae,function(){var fe=F(i.toIndex(u()));ee(f?Je(fe,_):fe),pe&&pe()})}function V(h){var K=x;if(Ze(h)){var ae=h.match(/([+\-<>])(\d+)?/)||[],pe=ae[1],fe=ae[2];pe==="+"||pe==="-"?K=Y(x+ +(""+pe+(+fe||1)),x):pe===">"?K=fe?P(+fe):S(!0):pe==="<"&&(K=v(!0))}else K=p?h:pt(h,0,_);return K}function z(h,K){var ae=L||(M()?1:C),pe=Y(x+ae*(h?-1:1),x,!(L||M()));return pe===-1&&m&&!jo(u(),l(!h),1)?h?0:_:K?pe:F(pe)}function Y(h,K,ae){if(T()||M()){var pe=y(h);pe!==h&&(K=h,h=pe,ae=!1),h<0||h>_?!L&&(Jt(0,h,K,!0)||Jt(_,K,h,!0))?h=P(E(h)):p?h=ae?h<0?-(H%C||C):H:h:n.rewind?h=h<0?_:0:h=-1:ae&&h!==K&&(h=P(E(K)+(h<K?-1:1)))}else h=-1;return h}function y(h){if(m&&n.trimSpace==="move"&&h!==x)for(var K=u();K===d(h,!0)&&Jt(h,0,e.length-1,!n.rewind);)h<x?--h:++h;return h}function F(h){return p?(h+H)%H||0:h}function I(){for(var h=H-(M()||p&&L?1:C);f&&h-- >0;)if(d(H-1,!0)!==d(h,!0)){h++;break}return pt(h,0,H-1)}function P(h){return pt(M()?h:C*h,0,_)}function E(h){return M()?Je(h,_):nn((h>=_?H-1:h)/C)}function W(h){var K=i.toIndex(h);return m?pt(K,0,_):K}function ee(h){h!==x&&(q=x,x=h)}function se(h){return h?q:x}function M(){return!Wt(n.focus)||n.isNavigation}function O(){return e.state.is([xt,Rt])&&!!n.waitForTransition}return{mount:$,go:R,scroll:j,getNext:S,getPrev:v,getAdjacent:z,getEnd:I,setIndex:ee,getIndex:se,toIndex:P,toPage:E,toDest:W,hasFocus:M,isBusy:O}}var zi="http://www.w3.org/2000/svg",Di="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",qt=40;function qi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=n.classes,l=n.i18n,d=t.Elements,c=t.Controller,T=d.arrows,w=d.track,f=T,p=d.prev,m=d.next,S,v,x={};function _(){H(),r(Te,q)}function q(){L(),_()}function H(){var j=n.arrows;j&&!(p&&m)&&A(),p&&m&&(At(x,{prev:p,next:m}),It(f,j?"":"none"),We(f,v=Zn+"--"+n.direction),j&&(C(),R(),ue([p,m],Ot,w.id),i(Go,p,m)))}function L(){o.destroy(),De(f,v),S?(it(T?[p,m]:f),p=m=null):He([p,m],Xn)}function C(){r([et,St,Se,st,on],R),s(m,"click",ve($,">")),s(p,"click",ve($,"<"))}function $(j){c.go(j,!0)}function A(){f=T||gt("div",u.arrows),p=B(!0),m=B(!1),S=!0,jt(f,[p,m]),!T&&jn(f,w)}function B(j){var V='<button class="'+u.arrow+" "+(j?u.prev:u.next)+'" type="button"><svg xmlns="'+zi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||Di)+'" />';return Wo(V)}function R(){if(p&&m){var j=e.index,V=c.getPrev(),z=c.getNext(),Y=V>-1&&j<V?l.last:l.prev,y=z>-1&&j>z?l.first:l.next;p.disabled=V<0,m.disabled=z<0,ue(p,ke,Y),ue(m,ke,y),i(Ko,p,m,V,z)}}return{arrows:x,mount:_,destroy:L,update:R}}var Ui=Vn+"-interval";function Gi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),C),l=u.isPaused,d=t.Elements,c=t.Elements,T=c.root,w=c.toggle,f=n.autoplay,p,m,S=f==="pause";function v(){f&&(x(),w&&ue(w,Ot,d.track.id),S||_(),L())}function x(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(A){p=A.type==="mouseenter",H()}),n.pauseOnFocus&&s(T,"focusin focusout",function(A){m=A.type==="focusin",H()}),w&&s(w,"click",function(){S?_():q(!0)}),r([Ge,ln,Se],u.rewind),r(Ge,$)}function _(){l()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),m=p=S=!1,L(),i(qn))}function q(A){A===void 0&&(A=!0),S=!!A,L(),l()||(u.pause(),i(Un))}function H(){S||(p||m?q(!1):_())}function L(){w&&(ze(w,at,!S),ue(w,ke,n.i18n[S?"play":"pause"]))}function C(A){var B=d.bar;B&&Ie(B,"width",A*100+"%"),i(Zo,A)}function $(A){var B=t.Slides.getAt(A);u.set(B&&+Me(B.slide,Ui)||n.interval)}return{mount:v,destroy:u.cancel,play:_,pause:q,isPaused:l}}function Ki(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Gn,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(l){t.Slides.forEach(function(d){var c=Nt(d.container||d.slide,"img");c&&c.src&&u(l,c,d)})}function u(l,d,c){c.style("background",l?'center/cover no-repeat url("'+d.src+'")':"",!0),It(d,l?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Yi=10,Xi=600,Zi=.6,Ji=1.5,Qi=800;function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Move,l=u.getPosition,d=u.getLimit,c=u.exceededLimit,T=u.translate,w=e.is(bt),f,p,m=1;function S(){r(Ge,q),r([Te,Se],H)}function v(C,$,A,B,R){var j=l();if(q(),A&&(!w||!c())){var V=t.Layout.sliderSize(),z=kn(C)*V*nn(_e(C)/V)||0;C=u.toPosition(t.Controller.toDest(C%V))+z}var Y=jo(j,C,1);m=1,$=Y?0:$||tn(_e(C-j)/Ji,Qi),p=B,f=cn($,x,ve(_,j,C,R),1),i(Rt),s(ln),f.start()}function x(){i(yt),p&&p(),s(st)}function _(C,$,A,B){var R=l(),j=C+($-C)*L(B),V=(j-R)*m;T(R+V),w&&!A&&c()&&(m*=Zi,_e(V)<Yi&&v(d(c(!0)),Xi,!1,p,!0))}function q(){f&&f.cancel()}function H(){f&&!f.isPaused()&&(q(),x())}function L(C){var $=n.easingFunc;return $?$(C):1-Math.pow(1-C,4)}return{mount:S,destroy:q,scroll:v,cancel:H}}var dt={passive:!1,capture:!0};function ta(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=o.unbind,l=e.state,d=t.Move,c=t.Scroll,T=t.Controller,w=t.Elements.track,f=t.Media.reduce,p=t.Direction,m=p.resolve,S=p.orient,v=d.getPosition,x=d.exceededLimit,_,q,H,L,C,$=!1,A,B,R;function j(){i(w,Sn,_n,dt),i(w,Cn,_n,dt),i(w,dr,z,dt),i(w,"click",F,{capture:!0}),i(w,"dragstart",Be),r([et,Te],V)}function V(){var N=n.drag;de(!N),L=N==="free"}function z(N){if(A=!1,!B){var b=fe(N);pe(N.target)&&(b||!N.button)&&(T.isBusy()?Be(N,!0):(R=b?w:window,C=l.is([xt,Rt]),H=null,i(R,Sn,Y,dt),i(R,Cn,y,dt),d.cancel(),c.cancel(),I(N)))}}function Y(N){if(l.is(Xt)||(l.set(Xt),s(Do)),N.cancelable)if(C){d.translate(_+ae(M(N)));var b=O(N)>ho,U=$!==($=x());(b||U)&&I(N),A=!0,s(qo),Be(N)}else W(N)&&(C=E(N),Be(N))}function y(N){l.is(Xt)&&(l.set(yt),s(Uo)),C&&(P(N),Be(N)),u(R,Sn,Y),u(R,Cn,y),C=!1}function F(N){!B&&A&&Be(N,!0)}function I(N){H=q,q=N,_=v()}function P(N){var b=ee(N),U=se(b),Q=n.rewind&&n.rewindByDrag;f(!1),L?T.scroll(U,0,n.snap):e.is(Bt)?T.go(S(kn(b))<0?Q?"<":"-":Q?">":"+"):e.is(bt)&&$&&Q?T.go(x(!0)?">":"<"):T.go(T.toDest(U),!0),f(!0)}function E(N){var b=n.dragMinThreshold,U=Et(b),Q=U&&b.mouse||0,te=(U?b.touch:+b)||10;return _e(M(N))>(fe(N)?te:Q)}function W(N){return _e(M(N))>_e(M(N,!0))}function ee(N){if(e.is(Ct)||!$){var b=O(N);if(b&&b<ho)return M(N)/b}return 0}function se(N){return v()+kn(N)*Je(_e(N)*(n.flickPower||600),L?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function M(N,b){return K(N,b)-K(h(N),b)}function O(N){return En(N)-En(h(N))}function h(N){return q===N&&H||q}function K(N,b){return(fe(N)?N.changedTouches[0]:N)["page"+m(b?"Y":"X")]}function ae(N){return N/($&&e.is(bt)?Pi:1)}function pe(N){var b=n.noDrag;return!kt(N,"."+sr+", ."+fn)&&(!b||!kt(N,b))}function fe(N){return typeof TouchEvent<"u"&&N instanceof TouchEvent}function X(){return C}function de(N){B=N}return{mount:j,disable:de,isDragging:X}}var na={Spacebar:" ",Right:dn,Left:pn,Up:er,Down:tr};function Jn(e){return e=Ze(e)?e:e.key,na[e]||e}var yo="keydown";function oa(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,u=e.root,l=t.Direction.resolve,d,c;function T(){w(),r(Te,f),r(Te,w),r(Ge,m)}function w(){var v=n.keyboard;v&&(d=v==="global"?window:u,s(d,yo,S))}function f(){i(d,yo)}function p(v){c=v}function m(){var v=c;c=!0,Io(function(){c=v})}function S(v){if(!c){var x=Jn(v);x===l(pn)?e.go("<"):x===l(dn)&&e.go(">")}}return{mount:T,destroy:f,disable:p}}var _t=Vn+"-lazy",Qt=_t+"-srcset",ra="["+_t+"], ["+Qt+"]";function ia(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,u=o.emit,l=n.lazyLoad==="sequential",d=[St,st],c=[];function T(){n.lazyLoad&&(w(),r(Se,w))}function w(){Ue(c),f(),l?v():(s(d),r(d,p),p())}function f(){t.Slides.forEach(function(x){Nn(x.slide,ra).forEach(function(_){var q=Me(_,_t),H=Me(_,Qt);if(q!==_.src||H!==_.srcset){var L=n.classes.spinner,C=_.parentElement,$=Nt(C,"."+L)||gt("span",L,C);c.push([_,x,$]),_.src||It(_,"none")}})})}function p(){c=c.filter(function(x){var _=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,_)?m(x):!0}),c.length||s(d)}function m(x){var _=x[0];We(x[1].slide,Mn),i(_,"load error",ve(S,x)),ue(_,"src",Me(_,_t)),ue(_,"srcset",Me(_,Qt)),He(_,_t),He(_,Qt)}function S(x,_){var q=x[0],H=x[1];De(H.slide,Mn),_.type!=="error"&&(it(x[2]),It(q,""),u(Gn,q,H),u(vt)),l&&v()}function v(){c.length&&m(c.shift())}return{mount:T,destroy:ve(Ue,c),check:p}}function aa(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Slides,l=t.Elements,d=t.Controller,c=d.hasFocus,T=d.getIndex,w=d.go,f=t.Direction.resolve,p=l.pagination,m=[],S,v;function x(){_(),r([Te,Se,on],x);var B=n.pagination;p&&It(p,B?"":"none"),B&&(r([Ge,ln,st],A),q(),A(),s(Yo,{list:S,items:m},$(e.index)))}function _(){S&&(it(p?Qe(S.children):S),De(S,v),Ue(m),S=null),o.destroy()}function q(){var B=e.length,R=n.classes,j=n.i18n,V=n.perPage,z=c()?d.getEnd()+1:Mt(B/V);S=p||gt("ul",R.pagination,l.track.parentElement),We(S,v=hn+"--"+C()),ue(S,qe,"tablist"),ue(S,ke,j.select),ue(S,Yn,C()===mn?"vertical":"");for(var Y=0;Y<z;Y++){var y=gt("li",null,S),F=gt("button",{class:R.page,type:"button"},y),I=u.getIn(Y).map(function(E){return E.slide.id}),P=!c()&&V>1?j.pageX:j.slideX;i(F,"click",ve(H,Y)),n.paginationKeyboard&&i(F,"keydown",ve(L,Y)),ue(y,qe,"presentation"),ue(F,qe,"tab"),ue(F,Ot,I.join(" ")),ue(F,ke,Ln(P,Y+1)),ue(F,ft,-1),m.push({li:y,button:F,page:Y})}}function H(B){w(">"+B,!0)}function L(B,R){var j=m.length,V=Jn(R),z=C(),Y=-1;V===f(dn,!1,z)?Y=++B%j:V===f(pn,!1,z)?Y=(--B+j)%j:V==="Home"?Y=0:V==="End"&&(Y=j-1);var y=m[Y];y&&(Ro(y.button),w(">"+Y),Be(R,!0))}function C(){return n.paginationDirection||n.direction}function $(B){return m[d.toPage(B)]}function A(){var B=$(T(!0)),R=$(T());if(B){var j=B.button;De(j,at),He(j,uo),ue(j,ft,-1)}if(R){var V=R.button;We(V,at),ue(V,uo,!0),ue(V,ft,"")}s(Xo,{list:S,items:m},B,R)}return{items:m,mount:x,destroy:_,getAt:$,update:A}}var sa=[" ","Enter"];function la(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(d(e,p.splide),d(p.splide,e))}),o&&c()}function u(){s.forEach(function(p){p.destroy()}),Ue(s)}function l(){u(),i()}function d(p,m){var S=be(p);S.on(Ge,function(v,x,_){m.go(m.is(Ct)?_:v)}),s.push(S)}function c(){var p=be(e),m=p.on;m(Bn,w),m(Jo,f),m([et,Te],T),s.push(p),p.emit(Dn,e.splides)}function T(){ue(t.Elements.list,Yn,n.direction===mn?"vertical":"")}function w(p){e.go(p.index)}function f(p,m){Hn(sa,Jn(m))&&(w(p),Be(m))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:l}}function ca(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(d){if(d.cancelable){var c=d.deltaY,T=c<0,w=En(d),f=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(c)>f&&w-s>p&&(e.go(T?"<":">"),s=w),l(T)&&Be(d)}}function l(d){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var ua=90;function pa(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",Li),l=cn(ua,ve(c,!1));function d(){i&&(w(!t.Autoplay.isPaused()),ue(s,go,!0),u.textContent="…",r(qn,ve(w,!0)),r(Un,ve(w,!1)),r([St,st],ve(c,!0)))}function c(f){ue(s,mo,f),f?(jt(s,u),l.start()):(it(u),l.cancel())}function T(){He(s,[po,go,mo]),it(u)}function w(f){i&&ue(s,po,f?"off":"polite")}return{mount:d,disable:w,destroy:T}}var da=Object.freeze({__proto__:null,Media:xi,Direction:Si,Elements:Ri,Slides:Hi,Layout:ji,Clones:Vi,Move:Oi,Controller:Bi,Arrows:qi,Autoplay:Gi,Cover:Ki,Scroll:ea,Drag:ta,Keyboard:oa,LazyLoad:ia,Pagination:aa,Sync:la,Wheel:ca,Live:pa}),ma={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"},ga={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:Mi,i18n:ma,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function fa(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),Io(l)}return{mount:r,start:i,cancel:_n}}function ha(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,u=ve(Ie,i,"transition"),l;function d(){be(e).bind(i,"transitionend",function(f){f.target===i&&l&&(T(),l())})}function c(f,p){var m=o.toPosition(f,!0),S=o.getPosition(),v=w(f);_e(m-S)>=1&&v>=1?n.useScroll?s.scroll(m,v,!1,p):(u("transform "+v+"ms "+n.easing),o.translate(m,!0),l=p):(o.jump(f),p())}function T(){u(""),s.cancel()}function w(f){var p=n.rewindSpeed;if(e.is(bt)&&p){var m=r.getIndex(!0),S=r.getEnd();if(m===0&&f>=S||m>=S&&f===0)return p}return n.speed}return{mount:d,start:c,cancel:T}}var ya=(function(){function e(n,o){this.event=be(),this.Components={},this.state=vi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Ho(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ye({label:Me(r,ke)||"",labelledby:Me(r,Kn)||""},ga,e.defaults,o||{});try{Ye(o,JSON.parse(Me(r,Vn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,u=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=u,this._T=r||this._T||(this.is(Bt)?fa:ha),this._E=o||this._E;var l=At({},da,this._E,{Transition:this._T});return rt(l,function(d,c){var T=d(s,u,s._o);u[c]=T,T.setup&&T.setup()}),rt(u,function(d){d.mount&&d.mount()}),this.emit(et),We(this.root,Ai),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Qe(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(An,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(zn),r.destroy(),o&&Ue(this.splides),s.set(en)),this},mi(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Qn=ya;Qn.defaults={};Qn.STATES=fi;var vo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[Bn,"onClick"],[Vo,"onActive"],[Oo,"onInactive"],[Bo,"onVisible"],[zo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[Do,"onDrag"],[qo,"onDragging"],[Uo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[zn,"onDestroy"],[Go,"onArrowsMounted"],[Ko,"onArrowsUpdated"],[Yo,"onPaginationMounted"],[Xo,"onPaginationUpdated"],[Dn,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Zo,"onAutoplayPlaying"],[Un,"onAutoplayPause"],[Gn,"onLazyLoadLoaded"]];function eo(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function Fn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Fn(n,t[o]));if(rn(e)&&rn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Fn(e[r],t[r]))}return e===t}function va(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ba(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Pn(e,t){const n=e;return ba(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Pn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var xa=({children:e,className:t,...n})=>g.createElement("div",{className:eo("splide__track",t),...n},g.createElement("ul",{className:"splide__list"},e)),mr=class extends g.Component{constructor(){super(...arguments),this.splideRef=g.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Qn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Pn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Fn(this.options,e)&&(this.splide.options=e,this.options=Pn({},e));const t=this.getSlides();va(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){vo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return g.createElement(t,{className:eo("splide",e),ref:this.splideRef,...this.omit(r,["options",...vo.map(s=>s[1])])},n?g.createElement(xa,null,o):o)}},gr=({children:e,className:t,...n})=>g.createElement("li",{className:eo("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("react"),he=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),xr=require("react-dom");function Sr(e){return e.type==="object"&&e.version===1}const Cr="ControlSlider-module__wrapper___sHEkd",wr="ControlSlider-module__hoverArrow___A-dOH",$r="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",Er="ControlSlider-module__arrowVertical___tBfVN",kr="ControlSlider-module__nextArrow___-30Yc",Ar="ControlSlider-module__arrowInner___aEra3",Ir="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",Rr="ControlSlider-module__pagination___bicLF",Mr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Hr="ControlSlider-module__dot___p1Qun",Nr="ControlSlider-module__activeDot___LHFaj",jr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Br="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",zr="ControlSlider-module__paginationInsideLeft___yOBRZ",Dr="ControlSlider-module__paginationInsideRight___Rtt3o",qr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",Gr="ControlSlider-module__imgWrapper___UjEgB",Kr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Zr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Qr="ControlSlider-module__topLeftAlignment___zjnGM",ei="ControlSlider-module__topCenterAlignment___gD1xW",ti="ControlSlider-module__topRightAlignment___NMapS",ni="ControlSlider-module__middleLeftAlignment___OnUrY",oi="ControlSlider-module__middleCenterAlignment___Tdkl0",ri="ControlSlider-module__middleRightAlignment___wEbfX",ii="ControlSlider-module__bottomLeftAlignment___cTP2-",ai="ControlSlider-module__bottomCenterAlignment___c54fB",si="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",ci="ControlSlider-module__contain___pLyq7",ui="ControlSlider-module__cover___KdDat",ee={wrapper:Cr,hoverArrow:wr,sliderItem:$r,sliderImage:Tr,arrow:_r,arrowVertical:Er,nextArrow:kr,arrowInner:Ar,arrowIcon:Ir,arrowImg:Lr,mirror:Fr,pagination:Rr,paginationInner:Mr,paginationVertical:Pr,paginationItem:Wr,dot:Hr,activeDot:Nr,paginationInsideBottom:jr,paginationInsideTop:Vr,paginationOutsideBottom:Br,paginationOutsideTop:Or,paginationInsideLeft:zr,paginationInsideRight:Dr,paginationOutsideLeft:qr,paginationOutsideRight:Ur,imgWrapper:Gr,captionBlock:Kr,captionTextWrapper:Yr,captionText:Xr,active:Zr,withPointerEvents:Jr,topLeftAlignment:Qr,topCenterAlignment:ei,topRightAlignment:ti,middleLeftAlignment:ni,middleCenterAlignment:oi,middleRightAlignment:ri,bottomLeftAlignment:ii,bottomCenterAlignment:ai,bottomRightAlignment:si,clickOverlay:li,contain:ci,cover:ui};function pi(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function di(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,mi=2,yt=3,xt=4,Pt=5,Xt=6,en=7,gi={CREATED:mt,MOUNTED:mi,IDLE:yt,MOVING:xt,SCROLLING:Pt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Io=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Pn(e)&&an("object",e)}var Mn=Array.isArray,Lo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Pn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Mn(e)?e:[e]}function Ae(e,t){Ht(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function ze(e,t,n){e&&Ae(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){ze(e,Ze(t)?t.split(" "):t,!0)}function Nt(e,t){Ae(t,e.appendChild.bind(e))}function Hn(e,t){Ae(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Ro(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Ro(e,t)[0]:e.firstElementChild}var At=Object.keys;function rt(e,t,n){return e&&(n?At(e).reverse():At(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function It(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ye(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Mn(n)?e[o]=n.slice():Et(n)?e[o]=Ye({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function io(e,t){Ae(t||At(e),function(n){delete e[n]})}function He(e,t){Ae(e,function(n){Ae(t,function(o){n&&n.removeAttribute(o)})})}function de(e,t,n){Et(t)?rt(t,function(o,r){de(e,r,o)}):Ae(e,function(o){Pn(n)||n===""?He(o,t):o.setAttribute(t,String(n))})}function gt(e,t,n){var o=document.createElement(e);return t&&(Ze(t)?We(o,t):de(o,t)),n&&Nt(n,o),o}function Le(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Pn(n)||(e.style[t]=""+n)}function Lt(e,t){Le(e,"display",t)}function Mo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function ao(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Ae(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){ze(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",jn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Ho(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function kn(e,t){return Ae(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var so={};function fi(e){return""+e+Vn(so[e]=(so[e]||0)+1)}function No(){var e=[];function t(i,p,l,m){r(i,p,function(c,T,w){var y="addEventListener"in c,u=y?c.removeEventListener.bind(c,T,l,m):c.removeListener.bind(c,l);y?c.addEventListener(T,l,m):c.addListener(l),e.push([c,T,w,l,u])})}function n(i,p,l){r(i,p,function(m,c,T){e=e.filter(function(w){return w[0]===m&&w[1]===c&&w[2]===T&&(!l||w[3]===l)?(w[4](),!1):!0})})}function o(i,p,l){var m,c=!0;return typeof CustomEvent=="function"?m=new CustomEvent(p,{bubbles:c,detail:l}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(p,c,!1,l)),i.dispatchEvent(m),m}function r(i,p,l){Ae(i,function(m){m&&Ae(p,function(c){c.split(" ").forEach(function(T){var w=T.split(".");l(m,w[0],w[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",Bn="click",jo="active",Vo="inactive",Bo="visible",Oo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",zo="drag",Do="dragging",qo="dragged",ln="scroll",st="scrolled",hi="overflow",On="destroy",Uo="arrows:mounted",Go="arrows:updated",Ko="pagination:mounted",Yo="pagination:updated",zn="navigation:mounted",Dn="autoplay:play",Xo="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Zo="sk",Jo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=No();function o(s,i){n.bind(t,Ht(s).join(" "),function(p){i.apply(i,Mn(p.detail)?p.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(On,n.destroy),It(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,p,l=!0,m=0;function c(){if(!l){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++m>=o))return w();p=ro(c)}}function T(b){b||u(),s=r()-(b?i*e:0),l=!1,p=ro(c)}function w(){l=!0}function y(){s=r(),i=0,n&&n(i)}function u(){p&&cancelAnimationFrame(p),i=0,p=0,l=!0}function d(b){e=b}function C(){return l}return{start:T,rewind:y,pause:w,cancel:u,set:d,isPaused:C}}function yi(e){var t=e;function n(r){t=r}function o(r){return Wn(Ht(r),t)}return{set:n,is:o}}function vi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function bi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=No(),p=[];function l(){var u=n.mediaQuery==="min";At(r).sort(function(d,C){return u?+d-+C:+C-+d}).forEach(function(d){c(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),c(s,oo),T()}function m(u){u&&i.destroy()}function c(u,d){var C=matchMedia(d);i.bind(C,"change",T),p.push([u,C])}function T(){var u=o.is(en),d=n.direction,C=p.reduce(function(b,x){return Ye(b,x[1].matches?x[0]:{})},{});io(n),y(C),n.destroy?e.destroy(n.destroy==="completely"):u?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function w(u){matchMedia(oo).matches&&(u?Ye(n,s):io(n,At(s)))}function y(u,d,C){Ye(n,u),d&&Ye(Object.getPrototypeOf(n),u),(C||!o.is(mt))&&e.emit(Te,n)}return{setup:l,destroy:m,reduce:w,set:y}}var un="Arrow",pn=un+"Left",dn=un+"Right",Qo=un+"Up",er=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qo,dn],ArrowRight:[er,pn]};function xi(e,t,n){function o(s,i,p){p=p||n.direction;var l=p===lo&&!i?1:p===mn?0:-1;return bn[s]&&bn[s][l]||s.replace(/width|left|right/i,function(m,c){var T=bn[m.toLowerCase()][l]||m;return c>0?T.charAt(0).toUpperCase()+T.slice(1):T})}function r(s){return s*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",Si="disabled",Re="aria-",Bt=Re+"controls",tr=Re+"current",co=Re+"selected",ke=Re+"label",Gn=Re+"labelledby",nr=Re+"hidden",Kn=Re+"orientation",Rt=Re+"roledescription",uo=Re+"live",po=Re+"busy",mo=Re+"atomic",Yn=[qe,ft,Si,Bt,tr,ke,Gn,nr,Kn,Rt],Ne=Vt+"__",tt="is-",xn=Vt,go=Ne+"track",Ci=Ne+"list",gn=Ne+"slide",or=gn+"--clone",wi=gn+"__container",Xn=Ne+"arrows",fn=Ne+"arrow",rr=fn+"--prev",ir=fn+"--next",hn=Ne+"pagination",ar=hn+"__page",$i=Ne+"progress",Ti=$i+"__bar",_i=Ne+"toggle",Ei=Ne+"spinner",ki=Ne+"sr",Ai=tt+"initialized",at=tt+"active",sr=tt+"prev",lr=tt+"next",In=tt+"visible",Ln=tt+"loading",cr=tt+"focus-in",ur=tt+"overflow",Ii=[at,In,sr,lr,Ln,cr,ur],Li={slide:gn,clone:or,arrows:Xn,arrow:fn,prev:rr,next:ir,pagination:hn,page:ar,spinner:Ei};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Ri=5,fo=200,pr="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Mi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,p=n.i18n,l={},m=[],c=[],T=[],w,y,u;function d(){A(),V(),x()}function C(){r(Se,b),r(Se,d),r(Te,x),s(document,pr+" keydown",function(S){u=S.type==="keydown"},{capture:!0}),s(i,"focusin",function(){ze(i,cr,!!u)})}function b(S){var $=Yn.concat("style");Ue(m),De(i,c),De(w,T),He([w,y],$),He(i,S?$:["style",Rt])}function x(){De(i,c),De(w,T),c=k(xn),T=k(go),We(i,c),We(w,T),de(i,ke,n.label),de(i,Gn,n.labelledby)}function A(){w=j("."+go),y=jt(w,"."+Ci),Tt(w&&y,"A track/list element is missing."),Zt(m,Ro(y,"."+gn+":not(."+or+")")),rt({arrows:Xn,pagination:hn,prev:rr,next:ir,bar:Ti,toggle:_i},function(S,$){l[$]=j("."+S)}),It(l,{root:i,track:w,list:y,slides:m})}function V(){var S=i.id||fi(Vt),$=n.role;i.id=S,w.id=w.id||S+"-track",y.id=y.id||S+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&$&&de(i,qe,$),de(i,Rt,p.carousel),de(y,qe,"presentation")}function j(S){var $=Wo(i,S);return $&&Fi($,"."+xn)===i?$:void 0}function k(S){return[S+"--"+n.type,S+"--"+n.direction,n.drag&&S+"--draggable",n.isNavigation&&S+"--nav",S===xn&&at]}return It(l,{setup:d,mount:C,destroy:b})}var bt="slide",Ct="loop",Ot="fade";function Pi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,p=r.bind,l=e.Components,m=e.root,c=e.options,T=c.isNavigation,w=c.updateOnMove,y=c.i18n,u=c.pagination,d=c.slideFocus,C=l.Direction.resolve,b=Fe(o,"style"),x=Fe(o,ke),A=n>-1,V=jt(o,"."+wi),j;function k(){A||(o.id=m.id+"-slide"+Vn(t+1),de(o,qe,u?"tabpanel":"group"),de(o,Rt,y.slide),de(o,ke,x||kn(y.slideLabel,[t+1,e.length]))),S()}function S(){p(o,"click",ve(i,Bn,R)),p(o,"keydown",ve(i,Zo,R)),s([St,Jo,st],W),s(zn,M),w&&s(Ge,B)}function $(){j=!0,r.destroy(),De(o,Ii),He(o,Yn),de(o,"style",b),de(o,ke,x||"")}function M(){var L=e.splides.map(function(_){var N=_.splide.Components.Slides.getAt(t);return N?N.slide.id:""}).join(" ");de(o,ke,kn(y.slideX,(A?n:t)+1)),de(o,Bt,L),de(o,qe,d?"button":""),d&&He(o,Rt)}function B(){j||W()}function W(){if(!j){var L=e.index;F(),H(),ze(o,sr,t===L-1),ze(o,lr,t===L+1)}}function F(){var L=G();L!==ao(o,at)&&(ze(o,at,L),de(o,tr,T&&L||""),i(L?jo:Vo,R))}function H(){var L=v(),_=!L&&(!G()||A);if(e.state.is([xt,Pt])||de(o,nr,_||""),de(Nn(o,c.focusableNodes||""),ft,_?-1:""),d&&de(o,ft,_?-1:0),L!==ao(o,In)&&(ze(o,In,L),i(L?Bo:Oo,R)),!L&&document.activeElement===o){var N=l.Slides.getAt(e.index);N&&Mo(N.slide)}}function z(L,_,N){Le(N&&V||o,L,_)}function G(){var L=e.index;return L===t||c.cloneStatus&&L===n}function v(){if(e.is(Ot))return G();var L=Ee(l.Elements.track),_=Ee(o),N=C("left",!0),J=C("right",!0);return nn(L[N])<=Ft(_[N])&&nn(_[J])<=Ft(L[J])}function I(L,_){var N=_e(L-t);return!A&&(c.rewind||e.is(Ct))&&(N=Je(N,e.length-N)),N<=_}var R={index:t,slideIndex:n,slide:o,container:V,isClone:A,mount:k,destroy:$,update:W,style:z,isWithin:I};return R}function Wi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=t.Elements,l=p.slides,m=p.list,c=[];function T(){w(),r(Se,y),r(Se,w)}function w(){l.forEach(function(W,F){d(W,F,-1)})}function y(){j(function(W){W.destroy()}),Ue(c)}function u(){j(function(W){W.update()})}function d(W,F,H){var z=Pi(e,F,H,W);z.mount(),c.push(z),c.sort(function(G,v){return G.index-v.index})}function C(W){return W?k(function(F){return!F.isClone}):c}function b(W){var F=t.Controller,H=F.toIndex(W),z=F.hasFocus()?1:n.perPage;return k(function(G){return Jt(G.index,H,H+z-1)})}function x(W){return k(W)[0]}function A(W,F){Ae(W,function(H){if(Ze(H)&&(H=Po(H)),Fo(H)){var z=l[F];z?Hn(H,z):Nt(m,H),We(H,n.classes.slide),$(H,ve(s,vt))}}),s(Se)}function V(W){it(k(W).map(function(F){return F.slide})),s(Se)}function j(W,F){C(F).forEach(W)}function k(W){return c.filter(Lo(W)?W:function(F){return Ze(W)?kt(F.slide,W):Wn(Ht(W),F.index)})}function S(W,F,H){j(function(z){z.style(W,F,H)})}function $(W,F){var H=Nn(W,"img"),z=H.length;z?H.forEach(function(G){i(G,"load error",function(){--z||F()})}):F()}function M(W){return W?l.length:c.length}function B(){return c.length>n.perPage}return{mount:T,destroy:y,update:u,register:d,get:C,getIn:b,getAt:x,add:A,remove:V,forEach:j,filter:k,style:S,getLength:M,isEnough:B}}function Hi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=t.Slides,l=t.Direction.resolve,m=t.Elements,c=m.root,T=m.track,w=m.list,y=p.getAt,u=p.style,d,C,b;function x(){A(),s(window,"resize load",vi(ve(i,vt))),r([Te,Se],A),r(vt,V)}function A(){d=n.direction===mn,Le(c,"maxWidth",ot(n.width)),Le(T,l("paddingLeft"),j(!1)),Le(T,l("paddingRight"),j(!0)),V(!0)}function V(R){var L=Ee(c);(R||C.width!==L.width||C.height!==L.height)&&(Le(T,"height",k()),u(l("marginRight"),ot(n.gap)),u("width",$()),u("height",M(),!0),C=L,i(sn),b!==(b=I())&&(ze(c,ur,b),i(hi,b)))}function j(R){var L=n.padding,_=l(R?"right":"left");return L&&ot(L[_]||(Et(L)?0:L))||"0px"}function k(){var R="";return d&&(R=S(),Tt(R,"height or heightRatio is missing."),R="calc("+R+" - "+j(!1)+" - "+j(!0)+")"),R}function S(){return ot(n.height||Ee(w).width*n.heightRatio)}function $(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":B())}function M(){return ot(n.fixedHeight)||(d?n.autoHeight?null:B():S())}function B(){var R=ot(n.gap);return"calc((100%"+(R&&" + "+R)+")/"+(n.perPage||1)+(R&&" - "+R)+")"}function W(){return Ee(w)[l("width")]}function F(R,L){var _=y(R||0);return _?Ee(_.slide)[l("width")]+(L?0:G()):0}function H(R,L){var _=y(R);if(_){var N=Ee(_.slide)[l("right")],J=Ee(w)[l("left")];return _e(N-J)+(L?0:G())}return 0}function z(R){return H(e.length-1)-H(0)+F(0,R)}function G(){var R=y(0);return R&&parseFloat(Le(R.slide,l("marginRight")))||0}function v(R){return parseFloat(Le(T,l("padding"+(R?"Right":"Left"))))||0}function I(){return e.is(Ot)||z(!0)>W()}return{mount:x,resize:V,listSize:W,slideSize:F,sliderSize:z,totalSize:H,getPadding:v,isOverflow:I}}var Ni=2;function ji(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,p=t.Direction.resolve,l=[],m;function c(){r(Se,T),r([Te,vt],y),(m=C())&&(u(m),t.Layout.resize(!0))}function T(){w(),c()}function w(){it(l),Ue(l),o.destroy()}function y(){var b=C();m!==b&&(m<b||!b)&&o.emit(Se)}function u(b){var x=i.get().slice(),A=x.length;if(A){for(;x.length<b;)Zt(x,x);Zt(x.slice(-b),x.slice(0,b)).forEach(function(V,j){var k=j<b,S=d(V.slide,j);k?Hn(S,x[0].slide):Nt(s.list,S),Zt(l,S),i.register(S,j-b+(k?0:A),V.index)})}}function d(b,x){var A=b.cloneNode(!0);return We(A,n.classes.clone),A.id=e.root.id+"-clone"+Vn(x+1),A}function C(){var b=n.clones;if(!e.is(Ct))b=0;else if(Wt(b)){var x=n[p("fixedWidth")]&&t.Layout.slideSize(0),A=x&&Ft(Ee(s.track)[p("width")]/x);b=A||n[p("autoWidth")]&&e.length||n.perPage*Ni}return b}return{mount:c,destroy:w}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,p=t.Layout,l=p.slideSize,m=p.getPadding,c=p.totalSize,T=p.listSize,w=p.sliderSize,y=t.Direction,u=y.resolve,d=y.orient,C=t.Elements,b=C.list,x=C.track,A;function V(){A=t.Transition,r([et,sn,Te,Se],j)}function j(){t.Controller.isBusy()||(t.Scroll.cancel(),S(e.index),t.Slides.update())}function k(_,N,J,ce){_!==N&&R(_>J)&&(W(),$(B(z(),_>J),!0)),i(xt),s(Ge,N,J,_),A.start(N,function(){i(yt),s(St,N,J,_),ce&&ce()})}function S(_){$(H(_,!0))}function $(_,N){if(!e.is(Ot)){var J=N?_:M(_);Le(b,"transform","translate"+u("X")+"("+J+"px)"),_!==J&&s(Jo)}}function M(_){if(e.is(Ct)){var N=F(_),J=N>t.Controller.getEnd(),ce=N<0;(ce||J)&&(_=B(_,J))}return _}function B(_,N){var J=_-I(N),ce=w();return _-=d(ce*(Ft(_e(J)/ce)||1))*(N?1:-1),_}function W(){$(z(),!0),A.cancel()}function F(_){for(var N=t.Slides.get(),J=0,ce=1/0,te=0;te<N.length;te++){var me=N[te].index,f=_e(H(me,!0)-_);if(f<=ce)ce=f,J=me;else break}return J}function H(_,N){var J=d(c(_-1)-v(_));return N?G(J):J}function z(){var _=u("left");return Ee(b)[_]-Ee(x)[_]+d(m(!1))}function G(_){return n.trimSpace&&e.is(bt)&&(_=pt(_,0,d(w(!0)-T()))),_}function v(_){var N=n.focus;return N==="center"?(T()-l(_,!0))/2:+N*l(_)||0}function I(_){return H(_?t.Controller.getEnd():0,!!n.trimSpace)}function R(_){var N=d(B(z(),_));return _?N>=0:N<=b[u("scrollWidth")]-Ee(x)[u("width")]}function L(_,N){N=Wt(N)?z():N;var J=_!==!0&&d(N)<d(I(!1)),ce=_!==!1&&d(N)>d(I(!0));return J||ce}return{mount:V,move:k,jump:S,translate:$,shift:B,cancel:W,toIndex:F,toPosition:H,getPosition:z,getLimit:I,exceededLimit:L,reposition:j}}function Bi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,p=i.getPosition,l=i.getLimit,m=i.toPosition,c=t.Slides,T=c.isEnough,w=c.getLength,y=n.omitEnd,u=e.is(Ct),d=e.is(bt),C=ve(z,!1),b=ve(z,!0),x=n.start||0,A,V=x,j,k,S;function $(){M(),r([Te,Se,on],M),r(sn,B)}function M(){j=w(!0),k=n.perMove,S=n.perPage,A=R();var f=pt(x,0,y?A:j-1);f!==x&&(x=f,i.reposition())}function B(){A!==R()&&s(on)}function W(f,O,oe){if(!me()){var ne=H(f),ue=I(ne);ue>-1&&(O||ue!==x)&&(J(ue),i.move(ne,ue,V,oe))}}function F(f,O,oe,ne){t.Scroll.scroll(f,O,oe,function(){var ue=I(i.toIndex(p()));J(y?Je(ue,A):ue),ne&&ne()})}function H(f){var O=x;if(Ze(f)){var oe=f.match(/([+\-<>])(\d+)?/)||[],ne=oe[1],ue=oe[2];ne==="+"||ne==="-"?O=G(x+ +(""+ne+(+ue||1)),x):ne===">"?O=ue?L(+ue):C(!0):ne==="<"&&(O=b(!0))}else O=u?f:pt(f,0,A);return O}function z(f,O){var oe=k||(te()?1:S),ne=G(x+oe*(f?-1:1),x,!(k||te()));return ne===-1&&d&&!Ho(p(),l(!f),1)?f?0:A:O?ne:I(ne)}function G(f,O,oe){if(T()||te()){var ne=v(f);ne!==f&&(O=f,f=ne,oe=!1),f<0||f>A?!k&&(Jt(0,f,O,!0)||Jt(A,O,f,!0))?f=L(_(f)):u?f=oe?f<0?-(j%S||S):j:f:n.rewind?f=f<0?A:0:f=-1:oe&&f!==O&&(f=L(_(O)+(f<O?-1:1)))}else f=-1;return f}function v(f){if(d&&n.trimSpace==="move"&&f!==x)for(var O=p();O===m(f,!0)&&Jt(f,0,e.length-1,!n.rewind);)f<x?--f:++f;return f}function I(f){return u?(f+j)%j||0:f}function R(){for(var f=j-(te()||u&&k?1:S);y&&f-- >0;)if(m(j-1,!0)!==m(f,!0)){f++;break}return pt(f,0,j-1)}function L(f){return pt(te()?f:S*f,0,A)}function _(f){return te()?Je(f,A):nn((f>=A?j-1:f)/S)}function N(f){var O=i.toIndex(f);return d?pt(O,0,A):O}function J(f){f!==x&&(V=x,x=f)}function ce(f){return f?V:x}function te(){return!Wt(n.focus)||n.isNavigation}function me(){return e.state.is([xt,Pt])&&!!n.waitForTransition}return{mount:$,go:W,scroll:F,getNext:C,getPrev:b,getAdjacent:z,getEnd:R,setIndex:J,getIndex:ce,toIndex:L,toPage:_,toDest:N,hasFocus:te,isBusy:me}}var Oi="http://www.w3.org/2000/svg",zi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",qt=40;function Di(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=n.classes,l=n.i18n,m=t.Elements,c=t.Controller,T=m.arrows,w=m.track,y=T,u=m.prev,d=m.next,C,b,x={};function A(){j(),r(Te,V)}function V(){k(),A()}function j(){var F=n.arrows;F&&!(u&&d)&&M(),u&&d&&(It(x,{prev:u,next:d}),Lt(y,F?"":"none"),We(y,b=Xn+"--"+n.direction),F&&(S(),W(),de([u,d],Bt,w.id),i(Uo,u,d)))}function k(){o.destroy(),De(y,b),C?(it(T?[u,d]:y),u=d=null):He([u,d],Yn)}function S(){r([et,St,Se,st,on],W),s(d,"click",ve($,">")),s(u,"click",ve($,"<"))}function $(F){c.go(F,!0)}function M(){y=T||gt("div",p.arrows),u=B(!0),d=B(!1),C=!0,Nt(y,[u,d]),!T&&Hn(y,w)}function B(F){var H='<button class="'+p.arrow+" "+(F?p.prev:p.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||zi)+'" />';return Po(H)}function W(){if(u&&d){var F=e.index,H=c.getPrev(),z=c.getNext(),G=H>-1&&F<H?l.last:l.prev,v=z>-1&&F>z?l.first:l.next;u.disabled=H<0,d.disabled=z<0,de(u,ke,G),de(d,ke,v),i(Go,u,d,H,z)}}return{arrows:x,mount:A,destroy:k,update:W}}var qi=jn+"-interval";function Ui(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,p=cn(n.interval,e.go.bind(e,">"),S),l=p.isPaused,m=t.Elements,c=t.Elements,T=c.root,w=c.toggle,y=n.autoplay,u,d,C=y==="pause";function b(){y&&(x(),w&&de(w,Bt,m.track.id),C||A(),k())}function x(){n.pauseOnHover&&s(T,"mouseenter mouseleave",function(M){u=M.type==="mouseenter",j()}),n.pauseOnFocus&&s(T,"focusin focusout",function(M){d=M.type==="focusin",j()}),w&&s(w,"click",function(){C?A():V(!0)}),r([Ge,ln,Se],p.rewind),r(Ge,$)}function A(){l()&&t.Slides.isEnough()&&(p.start(!n.resetProgress),d=u=C=!1,k(),i(Dn))}function V(M){M===void 0&&(M=!0),C=!!M,k(),l()||(p.pause(),i(qn))}function j(){C||(u||d?V(!1):A())}function k(){w&&(ze(w,at,!C),de(w,ke,n.i18n[C?"play":"pause"]))}function S(M){var B=m.bar;B&&Le(B,"width",M*100+"%"),i(Xo,M)}function $(M){var B=t.Slides.getAt(M);p.set(B&&+Fe(B.slide,qi)||n.interval)}return{mount:b,destroy:p.cancel,play:A,pause:V,isPaused:l}}function Gi(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Un,ve(p,!0)),r([et,Te,Se],ve(i,!0)))}function i(l){t.Slides.forEach(function(m){var c=jt(m.container||m.slide,"img");c&&c.src&&p(l,c,m)})}function p(l,m,c){c.style("background",l?'center/cover no-repeat url("'+m.src+'")':"",!0),Lt(m,l?"none":"")}return{mount:s,destroy:ve(i,!1)}}var Ki=10,Yi=600,Xi=.6,Zi=1.5,Ji=800;function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,p=t.Move,l=p.getPosition,m=p.getLimit,c=p.exceededLimit,T=p.translate,w=e.is(bt),y,u,d=1;function C(){r(Ge,V),r([Te,Se],j)}function b(S,$,M,B,W){var F=l();if(V(),M&&(!w||!c())){var H=t.Layout.sliderSize(),z=En(S)*H*nn(_e(S)/H)||0;S=p.toPosition(t.Controller.toDest(S%H))+z}var G=Ho(F,S,1);d=1,$=G?0:$||tn(_e(S-F)/Zi,Ji),u=B,y=cn($,x,ve(A,F,S,W),1),i(Pt),s(ln),y.start()}function x(){i(yt),u&&u(),s(st)}function A(S,$,M,B){var W=l(),F=S+($-S)*k(B),H=(F-W)*d;T(W+H),w&&!M&&c()&&(d*=Xi,_e(H)<Ki&&b(m(c(!0)),Yi,!1,u,!0))}function V(){y&&y.cancel()}function j(){y&&!y.isPaused()&&(V(),x())}function k(S){var $=n.easingFunc;return $?$(S):1-Math.pow(1-S,4)}return{mount:C,destroy:V,scroll:b,cancel:j}}var dt={passive:!1,capture:!0};function ea(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=o.unbind,l=e.state,m=t.Move,c=t.Scroll,T=t.Controller,w=t.Elements.track,y=t.Media.reduce,u=t.Direction,d=u.resolve,C=u.orient,b=m.getPosition,x=m.exceededLimit,A,V,j,k,S,$=!1,M,B,W;function F(){i(w,Sn,Tn,dt),i(w,Cn,Tn,dt),i(w,pr,z,dt),i(w,"click",I,{capture:!0}),i(w,"dragstart",Oe),r([et,Te],H)}function H(){var P=n.drag;se(!P),k=P==="free"}function z(P){if(M=!1,!B){var h=ue(P);ne(P.target)&&(h||!P.button)&&(T.isBusy()?Oe(P,!0):(W=h?w:window,S=l.is([xt,Pt]),j=null,i(W,Sn,G,dt),i(W,Cn,v,dt),m.cancel(),c.cancel(),R(P)))}}function G(P){if(l.is(Xt)||(l.set(Xt),s(zo)),P.cancelable)if(S){m.translate(A+oe(te(P)));var h=me(P)>fo,D=$!==($=x());(h||D)&&R(P),M=!0,s(Do),Oe(P)}else N(P)&&(S=_(P),Oe(P))}function v(P){l.is(Xt)&&(l.set(yt),s(qo)),S&&(L(P),Oe(P)),p(W,Sn,G),p(W,Cn,v),S=!1}function I(P){!B&&M&&Oe(P,!0)}function R(P){j=V,V=P,A=b()}function L(P){var h=J(P),D=ce(h),Y=n.rewind&&n.rewindByDrag;y(!1),k?T.scroll(D,0,n.snap):e.is(Ot)?T.go(C(En(h))<0?Y?"<":"-":Y?">":"+"):e.is(bt)&&$&&Y?T.go(x(!0)?">":"<"):T.go(T.toDest(D),!0),y(!0)}function _(P){var h=n.dragMinThreshold,D=Et(h),Y=D&&h.mouse||0,Q=(D?h.touch:+h)||10;return _e(te(P))>(ue(P)?Q:Y)}function N(P){return _e(te(P))>_e(te(P,!0))}function J(P){if(e.is(Ct)||!$){var h=me(P);if(h&&h<fo)return te(P)/h}return 0}function ce(P){return b()+En(P)*Je(_e(P)*(n.flickPower||600),k?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(P,h){return O(P,h)-O(f(P),h)}function me(P){return _n(P)-_n(f(P))}function f(P){return V===P&&j||V}function O(P,h){return(ue(P)?P.changedTouches[0]:P)["page"+d(h?"Y":"X")]}function oe(P){return P/($&&e.is(bt)?Ri:1)}function ne(P){var h=n.noDrag;return!kt(P,"."+ar+", ."+fn)&&(!h||!kt(P,h))}function ue(P){return typeof TouchEvent<"u"&&P instanceof TouchEvent}function q(){return S}function se(P){B=P}return{mount:F,disable:se,isDragging:q}}var ta={Spacebar:" ",Right:dn,Left:pn,Up:Qo,Down:er};function Zn(e){return e=Ze(e)?e:e.key,ta[e]||e}var ho="keydown";function na(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,p=e.root,l=t.Direction.resolve,m,c;function T(){w(),r(Te,y),r(Te,w),r(Ge,d)}function w(){var b=n.keyboard;b&&(m=b==="global"?window:p,s(m,ho,C))}function y(){i(m,ho)}function u(b){c=b}function d(){var b=c;c=!0,Io(function(){c=b})}function C(b){if(!c){var x=Zn(b);x===l(pn)?e.go("<"):x===l(dn)&&e.go(">")}}return{mount:T,destroy:y,disable:u}}var _t=jn+"-lazy",Qt=_t+"-srcset",oa="["+_t+"], ["+Qt+"]";function ra(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,p=o.emit,l=n.lazyLoad==="sequential",m=[St,st],c=[];function T(){n.lazyLoad&&(w(),r(Se,w))}function w(){Ue(c),y(),l?b():(s(m),r(m,u),u())}function y(){t.Slides.forEach(function(x){Nn(x.slide,oa).forEach(function(A){var V=Fe(A,_t),j=Fe(A,Qt);if(V!==A.src||j!==A.srcset){var k=n.classes.spinner,S=A.parentElement,$=jt(S,"."+k)||gt("span",k,S);c.push([A,x,$]),A.src||Lt(A,"none")}})})}function u(){c=c.filter(function(x){var A=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,A)?d(x):!0}),c.length||s(m)}function d(x){var A=x[0];We(x[1].slide,Ln),i(A,"load error",ve(C,x)),de(A,"src",Fe(A,_t)),de(A,"srcset",Fe(A,Qt)),He(A,_t),He(A,Qt)}function C(x,A){var V=x[0],j=x[1];De(j.slide,Ln),A.type!=="error"&&(it(x[2]),Lt(V,""),p(Un,V,j),p(vt)),l&&b()}function b(){c.length&&d(c.shift())}return{mount:T,destroy:ve(Ue,c),check:u}}function ia(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,p=t.Slides,l=t.Elements,m=t.Controller,c=m.hasFocus,T=m.getIndex,w=m.go,y=t.Direction.resolve,u=l.pagination,d=[],C,b;function x(){A(),r([Te,Se,on],x);var B=n.pagination;u&&Lt(u,B?"":"none"),B&&(r([Ge,ln,st],M),V(),M(),s(Ko,{list:C,items:d},$(e.index)))}function A(){C&&(it(u?Qe(C.children):C),De(C,b),Ue(d),C=null),o.destroy()}function V(){var B=e.length,W=n.classes,F=n.i18n,H=n.perPage,z=c()?m.getEnd()+1:Ft(B/H);C=u||gt("ul",W.pagination,l.track.parentElement),We(C,b=hn+"--"+S()),de(C,qe,"tablist"),de(C,ke,F.select),de(C,Kn,S()===mn?"vertical":"");for(var G=0;G<z;G++){var v=gt("li",null,C),I=gt("button",{class:W.page,type:"button"},v),R=p.getIn(G).map(function(_){return _.slide.id}),L=!c()&&H>1?F.pageX:F.slideX;i(I,"click",ve(j,G)),n.paginationKeyboard&&i(I,"keydown",ve(k,G)),de(v,qe,"presentation"),de(I,qe,"tab"),de(I,Bt,R.join(" ")),de(I,ke,kn(L,G+1)),de(I,ft,-1),d.push({li:v,button:I,page:G})}}function j(B){w(">"+B,!0)}function k(B,W){var F=d.length,H=Zn(W),z=S(),G=-1;H===y(dn,!1,z)?G=++B%F:H===y(pn,!1,z)?G=(--B+F)%F:H==="Home"?G=0:H==="End"&&(G=F-1);var v=d[G];v&&(Mo(v.button),w(">"+G),Oe(W,!0))}function S(){return n.paginationDirection||n.direction}function $(B){return d[m.toPage(B)]}function M(){var B=$(T(!0)),W=$(T());if(B){var F=B.button;De(F,at),He(F,co),de(F,ft,-1)}if(W){var H=W.button;We(H,at),de(H,co,!0),de(H,ft,"")}s(Yo,{list:C,items:d},B,W)}return{items:d,mount:x,destroy:A,getAt:$,update:M}}var aa=[" ","Enter"];function sa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(u){u.isParent||(m(e,u.splide),m(u.splide,e))}),o&&c()}function p(){s.forEach(function(u){u.destroy()}),Ue(s)}function l(){p(),i()}function m(u,d){var C=be(u);C.on(Ge,function(b,x,A){d.go(d.is(Ct)?A:b)}),s.push(C)}function c(){var u=be(e),d=u.on;d(Bn,w),d(Zo,y),d([et,Te],T),s.push(u),u.emit(zn,e.splides)}function T(){de(t.Elements.list,Kn,n.direction===mn?"vertical":"")}function w(u){e.go(u.index)}function y(u,d){Wn(aa,Zn(d))&&(w(u),Oe(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:p,remount:l}}function la(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",p,dt)}function p(m){if(m.cancelable){var c=m.deltaY,T=c<0,w=_n(m),y=n.wheelMinThreshold||0,u=n.wheelSleep||0;_e(c)>y&&w-s>u&&(e.go(T?"<":">"),s=w),l(T)&&Oe(m)}}function l(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var ca=90;function ua(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,p=gt("span",ki),l=cn(ca,ve(c,!1));function m(){i&&(w(!t.Autoplay.isPaused()),de(s,mo,!0),p.textContent="…",r(Dn,ve(w,!0)),r(qn,ve(w,!1)),r([St,st],ve(c,!0)))}function c(y){de(s,po,y),y?(Nt(s,p),l.start()):(it(p),l.cancel())}function T(){He(s,[uo,mo,po]),it(p)}function w(y){i&&de(s,uo,y?"off":"polite")}return{mount:m,disable:w,destroy:T}}var pa=Object.freeze({__proto__:null,Media:bi,Direction:xi,Elements:Mi,Slides:Wi,Layout:Hi,Clones:ji,Move:Vi,Controller:Bi,Arrows:Di,Autoplay:Ui,Cover:Gi,Scroll:Qi,Drag:ea,Keyboard:na,LazyLoad:ra,Pagination:ia,Sync:sa,Wheel:la,Live:ua}),da={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ma={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Li,i18n:da,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(p){p.style("transform","translateX(-"+100*p.index+"%)")})}function i(p,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),Io(l)}return{mount:r,start:i,cancel:Tn}}function fa(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,p=ve(Le,i,"transition"),l;function m(){be(e).bind(i,"transitionend",function(y){y.target===i&&l&&(T(),l())})}function c(y,u){var d=o.toPosition(y,!0),C=o.getPosition(),b=w(y);_e(d-C)>=1&&b>=1?n.useScroll?s.scroll(d,b,!1,u):(p("transform "+b+"ms "+n.easing),o.translate(d,!0),l=u):(o.jump(y),u())}function T(){p(""),s.cancel()}function w(y){var u=n.rewindSpeed;if(e.is(bt)&&u){var d=r.getIndex(!0),C=r.getEnd();if(d===0&&y>=C||d>=C&&y===0)return u}return n.speed}return{mount:m,start:c,cancel:T}}var ha=(function(){function e(n,o){this.event=be(),this.Components={},this.state=yi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Wo(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ye({label:Fe(r,ke)||"",labelledby:Fe(r,Gn)||""},ma,e.defaults,o||{});try{Ye(o,JSON.parse(Fe(r,jn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ye({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,p=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=p,this._T=r||this._T||(this.is(Ot)?ga:fa),this._E=o||this._E;var l=It({},pa,this._E,{Transition:this._T});return rt(l,function(m,c){var T=m(s,p,s._o);p[c]=T,T.setup&&T.setup()}),rt(p,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,Ai),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Qe(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(An,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(On),r.destroy(),o&&Ue(this.splides),s.set(en)),this},di(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Jn=ha;Jn.defaults={};Jn.STATES=gi;var yo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[Bn,"onClick"],[jo,"onActive"],[Vo,"onInactive"],[Bo,"onVisible"],[Oo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[zo,"onDrag"],[Do,"onDragging"],[qo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[On,"onDestroy"],[Uo,"onArrowsMounted"],[Go,"onArrowsUpdated"],[Ko,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Dn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Un,"onLazyLoadLoaded"]];function Qn(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function Fn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Fn(n,t[o]));if(rn(e)&&rn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Fn(e[r],t[r]))}return e===t}function ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function va(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Rn(e,t){const n=e;return va(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Rn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var ba=({children:e,className:t,...n})=>g.createElement("div",{className:Qn("splide__track",t),...n},g.createElement("ul",{className:"splide__list"},e)),dr=class extends g.Component{constructor(){super(...arguments),this.splideRef=g.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Rn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Fn(this.options,e)&&(this.splide.options=e,this.options=Rn({},e));const t=this.getSlides();ya(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){yo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return g.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(s=>s[1])])},n?g.createElement(ba,null,o):o)}},mr=({children:e,className:t,...n})=>g.createElement("li",{className:Qn("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const Sa="RichTextRenderer-module__link___BWeZ2",Ca={link:Sa},wa=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>wa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?k.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}const Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:Ca.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:$a(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function $a(e){return{...e.fontFamily&&{fontFamily:yn(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Ta="SvgImage-module__svg___q3xE-",_a="SvgImage-module__img___VsTm-",bo={svg:Ta,img:_a},Ea=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},ka=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=g.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return g.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ea(e)||!s?a.jsx("img",{src:e,alt:"",className:he(bo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(bo.svg,o),style:{"--svg":ka(e),"--fill":t,"--hover-fill":n,...r??{}}})},La={"top-left":ne.topLeftAlignment,"top-center":ne.topCenterAlignment,"top-right":ne.topRightAlignment,"middle-left":ne.middleLeftAlignment,"middle-center":ne.middleCenterAlignment,"middle-right":ne.middleRightAlignment,"bottom-left":ne.bottomLeftAlignment,"bottom-center":ne.bottomCenterAlignment,"bottom-right":ne.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=g.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:l,textAlign:d,wordSpacing:c,fontSizeLineHeight:T,textAppearance:w,color:f}=n.imageCaption,[p,m]=g.useState(void 0),[S,v]=g.useState(null),[x,_]=g.useState(0),[q,H]=g.useState(0),{direction:L,transition:C,controls:$,pagination:A,imageCaption:B,triggers:R}=e,j=g.useRef(C.type),{x:V,y:z}=e.controls.offset,Y=y=>{r&&r.go(y)};return g.useEffect(()=>{if(!S)return;const y=new ResizeObserver(F=>{if(!r)return;const[I]=F;m({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return y.observe(S),()=>y.unobserve(S)},[S]),g.useEffect(()=>{!r||j.current===C.type||(H(y=>y+1),j.current=C.type)},[C.type]),a.jsx("div",{className:he(ne.wrapper,{[ne.editor]:o}),ref:v,children:a.jsxs("div",{className:ne.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:C.backgroundColor&&C.type==="fade in"?C.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(ne.captionBlock),children:a.jsx("div",{className:ne.captionTextWrapper,children:t.map((y,F)=>a.jsx("div",{className:he(ne.captionText,La[B.alignment],{[ne.withPointerEvents]:F===x&&o,[ne.active]:F===x}),style:{fontFamily:yn(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":k.scalingValue(i.width,o),letterSpacing:k.scalingValue(l,o),wordSpacing:k.scalingValue(c,o),textAlign:d,fontSize:k.scalingValue(T.fontSize,o),lineHeight:k.scalingValue(T.lineHeight,o),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:f,transitionDuration:C.duration?`${Math.round(parseInt(C.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ne.captionTextInner,style:{"--link-hover-color":B.linkHoverColor,"--link-color":B.linkColor,position:"relative",top:k.scalingValue(B.offset.y,o),left:k.scalingValue(B.offset.x,o)},children:a.jsx(Pt,{content:y.imageCaption})})},F))})}),a.jsx(mr,{onMove:y=>{_(y.index)},ref:s,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:L==="horiz"||C.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:C.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((y,F)=>a.jsx(gr,{children:a.jsx("div",{className:ne.sliderItem,children:a.jsx("div",{className:ne.imgWrapper,children:a.jsx("img",{className:he(ne.sliderImage,{[ne.contain]:y.image.objectFit==="contain",[ne.cover]:y.image.objectFit==="cover"}),src:y.image.url,alt:y.image.name??""})})})},F))},q),$.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(ne.arrow,{[ne.arrowVertical]:L==="vert",[ne.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{onClick:()=>{Y("-1")},className:ne.arrowInner,style:{transform:`translate(${k.scalingValue(V,o)}, ${k.scalingValue(z*(L==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(Xe,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:he(ne.arrowImg,ne.mirror)}),!$.arrowsImgUrl&&a.jsx(xo,{color:$.color,className:he(ne.arrowIcon,ne.arrowImg,ne.mirror)})]})}),a.jsx("div",{className:he(ne.arrow,ne.nextArrow,{[ne.arrowVertical]:L==="vert",[ne.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{className:ne.arrowInner,onClick:()=>Y("+1"),style:{transform:`translate(${k.scalingValue(V*(L==="horiz"?-1:1),o)}, ${k.scalingValue(z,o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(Xe,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:ne.arrowImg}),!$.arrowsImgUrl&&a.jsx(xo,{color:$.color,className:he(ne.arrowIcon,ne.arrowImg)})]})})]}),R.triggersList.click&&a.jsx("div",{className:ne.clickOverlay,onClick:()=>{r&&r.go("+1")}}),A.isActive&&a.jsx("div",{className:he(ne.pagination,{[ne.paginationInsideBottom]:A.position==="inside-1"&&L==="horiz",[ne.paginationInsideTop]:A.position==="inside-2"&&L==="horiz",[ne.paginationOutsideBottom]:A.position==="outside-1"&&L==="horiz",[ne.paginationOutsideTop]:A.position==="outside-2"&&L==="horiz",[ne.paginationInsideLeft]:A.position==="inside-1"&&L==="vert",[ne.paginationInsideRight]:A.position==="inside-2"&&L==="vert",[ne.paginationOutsideLeft]:A.position==="outside-1"&&L==="vert",[ne.paginationOutsideRight]:A.position==="outside-2"&&L==="vert",[ne.paginationVertical]:L==="vert"}),children:a.jsx("div",{className:ne.paginationInner,style:{backgroundColor:A.colors[2],transform:`scale(${A.scale/100}) translate(${k.scalingValue(A.offset.x,o)}, ${k.scalingValue(A.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:t.map((y,F)=>a.jsx("button",{onClick:()=>{r&&r.go(F)},className:he(ne.paginationItem),children:a.jsx("div",{className:he(ne.dot,{[ne.activeDot]:F===x}),style:{backgroundColor:F===x?A.colors[0]:A.colors[1],"--pagination-hover-color":A.hover}})},F))})})]})})}function xo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ia={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},Ma="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",Pa="ImageRevealSlider-module__link___N-iLG",Ra="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:Ma,image:Fa,link:Pa,cursor:Ra};function So(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,u=s/2,l=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Wa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ha({settings:e,content:t,isEditor:n}){const[o,r]=g.useState(null),[s,i]=g.useState([]),[u,l]=g.useState(0),d=g.useRef(0),[c,T]=g.useState({x:0,y:0}),[w,f]=g.useState(1),[p,m]=g.useState("none"),S=g.useRef({x:0,y:0}),[v,x]=g.useState(!1),{sizeType:_,imageWidth:q,randomRangeImageWidth:H}=e.imageSize,{revealPosition:L,visible:C}=e.position,{cursorType:$,target:A,defaultCursorScale:B,defaultCursor:R,hoverCursorScale:j,hoverCursor:V}=e.cursor;g.useEffect(()=>{if(!o)return;const y=(P,E)=>{const W=o.getBoundingClientRect(),ee=P-W.left,se=E-W.top;if(T({x:ee,y:se}),$==="system"){m("none"),f(1);return}const M=ee,O=se,h=document.elementFromPoint(W.left+M,W.top+O);if(h&&h.closest("a")){m("none"),f(1);return}const K=So(M,O,s)||A==="area"?{img:V??"none",scale:j}:{img:R??"none",scale:B};m(K.img),f(K.scale)},F=P=>{P.stopPropagation(),S.current={x:P.clientX,y:P.clientY},y(P.clientX,P.clientY)},I=()=>{v&&y(S.current.x,S.current.y)};return o.addEventListener("mousemove",F),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",F),window.removeEventListener("scroll",I,!0)}},[o,v,c,$,A,V,R,j,B,s]),g.useEffect(()=>{v||(m("none"),f(0))},[v]);const z=async(y,F,I,P={})=>{const{width:E,height:W,finalWidth:ee}=await Wa(y.image.url,_,q,H);let se=0,M=0;L==="same"?(se=F/2,M=I/2):(se=P.x??Math.random()*F,M=P.y??Math.random()*I);const O=Math.min(Math.max(se,E/2),F-E/2),h=Math.min(Math.max(M,W/2),I-W/2);return{id:d.current++,url:y.image.url,link:y.link,name:y.image.name,x:O,y:h,width:ee}};g.useEffect(()=>{if(!o||t.length===0)return;const y=o.getBoundingClientRect(),F=y.width,I=y.height,P=[];(async()=>{const W=t[0],ee=await z(W,F,I);P.push(ee),i(P),l(1)})()},[_,q,H,L,o]),g.useEffect(()=>{C==="last One"&&i(y=>y.length>0?[y[y.length-1]]:[])},[C]);const Y=async y=>{if(!o)return;const F=o.getBoundingClientRect(),I=y.clientX-F.left,P=y.clientY-F.top;if(A==="image"&&!So(I,P,s))return;let E=0,W=0;L==="on Click"?(E=I,W=P):L==="same"?(E=F.width/2,W=F.height/2):(E=Math.random()*F.width,W=Math.random()*F.height);const ee=t[u],se=await z(ee,F.width,F.height,{x:E,y:W});i(M=>C==="all"?[...M,se]:[se]),l(M=>M>=t.length-1?0:M+1)};return a.jsxs("div",{ref:r,onClick:Y,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(y=>a.jsx("div",{className:ut.wrapper,style:{top:`${y.y}px`,left:`${y.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:y.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:A==="area"&&y.link?a.jsx("a",{href:y.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:y.url,alt:y.name,className:ut.image},y.id)}):a.jsx("img",{src:y.url,alt:y.name,className:ut.image},y.id)},y.id)),v&&a.jsx("div",{className:ut.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ja={element:Ha,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Na="LightBox-module__hidden___9s-9x",Va="LightBox-module__heroImage___sTxNF",Oa="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",za="LightBox-module__contentStyle___Bgnsq",Da="LightBox-module__imageStyle___tLIlB",qa="LightBox-module__imgWrapper___LuFUp",Ua="LightBox-module__contain___8-yaS",Ga="LightBox-module__cover___hNvOG",Ka="LightBox-module__caption___b6L2I",Ya="LightBox-module__captionTextInner___rCGNH",Xa="LightBox-module__lightboxSplide___XFuWC",Za="LightBox-module__arrow___iz38X",Ja="LightBox-module__arrowVertical___Zfz81",Qa="LightBox-module__nextArrow___zkAQN",es="LightBox-module__arrowInner___p48sW",ts="LightBox-module__arrowIcon___3VaFf",ns="LightBox-module__arrowImg___pNV88",os="LightBox-module__mirror___pjeXc",rs="LightBox-module__thumbsWrapper___GB-nU",is="LightBox-module__thumbsContainerVertical___wttk5",as="LightBox-module__thumbsContainer___osSma",ss="LightBox-module__thumbsAlignStart___MO6tY",ls="LightBox-module__thumbsAlignCenter___Q4sUx",cs="LightBox-module__thumbsAlignEnd___p4y9R",us="LightBox-module__thumbItem___HvnF3",ps="LightBox-module__closeButton___g2khP",ds="LightBox-module__fadeIn___0m5GW",ms="LightBox-module__slideInLeft___gPYwC",gs="LightBox-module__slideInRight___S-pPp",fs="LightBox-module__slideInTop___DFdAj",hs="LightBox-module__slideInBottom___m27kZ",ys="LightBox-module__fadeOut___55qBR",vs="LightBox-module__slideOutLeft___NvU7P",bs="LightBox-module__slideOutRight___SK7eC",xs="LightBox-module__slideOutTop___Vgg0z",Ss="LightBox-module__slideOutBottom___nJ0Ef",Cs="LightBox-module__scaleSlide___vZriG",G={hidden:Na,heroImage:Va,background:Oa,editor:Ba,contentStyle:za,imageStyle:Da,imgWrapper:qa,contain:Ua,cover:Ga,caption:Ka,captionTextInner:Ya,lightboxSplide:Xa,arrow:Za,arrowVertical:Ja,nextArrow:Qa,arrowInner:es,arrowIcon:ts,arrowImg:ns,mirror:os,thumbsWrapper:rs,thumbsContainerVertical:is,thumbsContainer:as,thumbsAlignStart:ss,thumbsAlignCenter:ls,thumbsAlignEnd:cs,thumbItem:us,closeButton:ps,fadeIn:ds,slideInLeft:ms,slideInRight:gs,slideInTop:fs,slideInBottom:hs,fadeOut:ys,slideOutLeft:vs,slideOutRight:bs,slideOutTop:xs,slideOutBottom:Ss,scaleSlide:Cs},Ut=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), calc(-50% + ${k.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${k.scalingValue(t.x,n)}, calc(-50% + ${k.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), ${k.scalingValue(t.y,n)})`:o.transform=`translate(${k.scalingValue(t.x,n)}, ${k.scalingValue(t.y,n)})`,o};function fr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function Co(e){const t=e.getBoundingClientRect(),n=fr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,u=o/r,l=s/i;let d,c;l>u?(d=o,c=o/l):(c=r,d=r*l);const T=t.left+n.left,w=t.top+n.top,f=(o-d)/2+T,p=(r-c)/2+w;return{x:f,y:p,width:d,height:c}}function wo(e){const t=e.getBoundingClientRect(),n=fr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function $o(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function ws(e,t){const n=(()=>{if(e==="fade in")return G.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return G.slideInLeft;case"right":return G.slideInRight;case"top":return G.slideInTop;case"bottom":return G.slideInBottom;default:return G.slideInRight}return G.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return G.fadeIn;if(e==="slide in")switch(t){case"left":return G.slideInLeft;case"right":return G.slideInRight;case"top":return G.slideInTop;case"bottom":return G.slideInBottom;default:return G.slideInRight}return G.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return G.fadeOut;if(e==="slide in")switch(t){case"left":return G.slideOutLeft;case"right":return G.slideOutRight;case"top":return G.slideOutTop;case"bottom":return G.slideOutBottom;default:return G.slideOutRight}return G.fadeOut})(),s=(()=>{if(e==="fade in")return G.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return G.slideOutLeft;case"right":return G.slideOutRight;case"top":return G.slideOutTop;case"bottom":return G.slideOutBottom;default:return G.slideOutRight}return G.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const $s=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,u]=g.useState(!1),{url:l}=e.thumbnailBlock.cover;return g.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:l,alt:"Cover",className:G.heroImage,onClick:()=>u(!0)}),a.jsx(Ts,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},Ts=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:u})=>{var N;const[l,d]=g.useState(0),[c,T]=g.useState(0),[w,f]=g.useState(!1),[p,m]=g.useState(!1),[S,v]=g.useState({}),x=g.useRef(null),_=g.useRef(null),q=g.useRef(null),H=g.useRef(!1),L=g.useRef(null),C=g.useRef(null),$=g.useRef(null),A=g.useRef(null),B=g.useRef(!1),R=g.useRef(null),[j,V]=g.useState(!1),{appear:z,triggers:Y,slider:y,thumbnail:F,controls:I,area:P,caption:E,layout:W}=r.lightboxBlock,{appearClass:ee,backdropAppearClass:se,backdropDisappearClass:M,disappearClass:O}=ws(z.type,z.direction),h=(u==null?void 0:u.itemId)??null;g.useEffect(()=>{const b=()=>{setTimeout(()=>{var Q,te;(te=(Q=x.current)==null?void 0:Q.splide)==null||te.refresh()},16)},U=()=>{T(Q=>Q+1)};return window.addEventListener("ArticleEditor.Layout:change",b),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",b),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),g.useEffect(()=>{if(!e||!F.isActive){V(!1);return}const b=R.current;if(!b)return;const U=()=>{y.direction==="horiz"?V(b.scrollWidth>b.clientWidth):V(b.scrollHeight>b.clientHeight)};U();const Q=new ResizeObserver(U);return Q.observe(b),()=>Q.disconnect()},[e,F.isActive,n.length,S,y.direction]);const K=g.useCallback(()=>{const b=window.matchMedia("(max-width: 768px)").matches,U=$o(P.color);b&&!i&&U>.9&&(document.body.style.backgroundColor=""),f(!0),H.current=!0;const Q=te=>{te.target===L.current&&te.animationName&&(L.current&&C.current&&L.current.removeEventListener("animationend",C.current),C.current=null,H.current&&(H.current=!1,t()),f(!1))};L.current&&(C.current=Q,L.current.addEventListener("animationend",Q))},[t,P.color,i]),ae=(b,U,Q)=>{var te,le;if(b){if(Y.type==="click"&&Y.switch==="image")Y.repeat==="close"&&l===n.length-1?K():(te=x.current)==null||te.go("+1");else if(Y.type==="click"&&Y.switch==="50/50"){const ie=b.getBoundingClientRect(),oe=U-ie.left,me=Q-ie.top,D=ie.width,J=ie.height;let Z;y.direction==="horiz"?Z=oe<D/2?"-1":"+1":Z=me<J/2?"-1":"+1",(le=x.current)==null||le.go(Z)}}},pe=b=>{if(B.current){B.current=!1;return}const U=n[l],Q=(U==null?void 0:U.image.objectFit)==="cover";let te,le;if("changedTouches"in b&&b.changedTouches.length>0)te=b.changedTouches[0].clientX,le=b.changedTouches[0].clientY;else if("clientX"in b)te=b.clientX,le=b.clientY;else return;let ie;if(Q&&q.current){const oe=wo(q.current);ie=te>=oe.left&&te<=oe.right&&le>=oe.top&&le<=oe.bottom}else{const oe=q.current?Co(q.current):null;if(!oe){b.target===b.currentTarget&&K();return}ie=te>=oe.x&&te<=oe.x+oe.width&&le>=oe.y&&le<=oe.y+oe.height}ie?ae(q.current,te,le):K()},fe=b=>{const U=b.target;(U.classList.contains(G.thumbsWrapper)||U.classList.contains(G.thumbsContainer))&&pe(b)};g.useEffect(()=>{if(!e)return;const b=U=>{var Q,te;if(U.key==="Escape"){K();return}if(U.key==="ArrowRight"){d(le=>(le+1)%Math.max(n.length,1)),(Q=x.current)==null||Q.go("+1");return}U.key==="ArrowLeft"&&(d(le=>(le-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=x.current)==null||te.go("-1"))};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[e,K,n.length]),g.useEffect(()=>{if(e){if(d(0),T(U=>U+1),H.current=!1,f(!1),m(!1),v({}),!h)return;const b=new CustomEvent("page-overlay",{detail:{itemId:h}});window.dispatchEvent(b)}return()=>{L.current&&C.current&&(L.current.removeEventListener("animationend",C.current),C.current=null),m(!1)}},[e,h]),g.useEffect(()=>{_.current!==null&&_.current!==y.type&&T(b=>b+1),_.current=y.type},[y.type]),g.useEffect(()=>{if(!e)return;const b=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,Q=$o(P.color);document.body.style.overflow="hidden",m(!1);const te=ie=>{ie.target===L.current&&!H.current&&ie.animationName&&(U&&!i&&Q>.9&&(document.body.style.backgroundColor=P.color),m(!0),L.current&&$.current&&L.current.removeEventListener("animationend",$.current),$.current=null)};L.current&&($.current=te,L.current.addEventListener("animationend",te));const le=ie=>{const oe=ie.target;oe&&(oe.closest(`.${G.thumbsWrapper}`)||oe.closest(`.${G.thumbsContainer}`))||y.type!=="slide"&&ie.preventDefault()};return document.addEventListener("touchmove",le,{passive:!1}),()=>{document.body.style.overflow=b,document.removeEventListener("touchmove",le),L.current&&$.current&&(L.current.removeEventListener("animationend",$.current),$.current=null),m(!1)}},[e,i,P.color,y.type]),g.useEffect(()=>{if(!e)return;const b=U=>{var te,le;if(H.current){U.stopPropagation();return}if(B.current){B.current=!1;return}const Q=U.target;if(!(Q&&(Q.closest(`.${G.thumbsContainer}`)||Q.closest(`.${G.thumbItem}`)))){if(y.type==="slide"&&Y.type==="drag"&&((le=(te=x.current)==null?void 0:te.splide)!=null&&le.root)){const ie=x.current.splide.root;if(Q&&(ie.contains(Q)||ie===Q))return}if(U.touches.length===0&&U.changedTouches.length>0){const ie=n[l],oe=(ie==null?void 0:ie.image.objectFit)==="cover",me=U.changedTouches[0];let D;if(oe&&q.current){const J=wo(q.current);D=me.clientX>=J.left&&me.clientX<=J.right&&me.clientY>=J.top&&me.clientY<=J.bottom}else{const J=q.current?Co(q.current):null;if(!J)return;D=me.clientX>=J.x&&me.clientX<=J.x+J.width&&me.clientY>=J.y&&me.clientY<=J.y+J.height}if(!D){U.stopPropagation(),H.current=!0;const J=Z=>{Z.stopPropagation(),Z.preventDefault(),document.removeEventListener("click",J,!0)};document.addEventListener("click",J,!0),K()}}}};return document.addEventListener("touchend",b,{passive:!0}),()=>{document.removeEventListener("touchend",b)}},[e,K,l,n]);const X=(y.type==="scale"||y.type==="fade")&&y.direction==="vert"&&Y.type==="drag";g.useEffect(()=>{var Z,ce;if(!e||!X||!((ce=(Z=x.current)==null?void 0:Z.splide)!=null&&ce.root))return;const b=x.current.splide.root,U=30,Q=(re,ge)=>{if(A.current){const we=Math.abs(re-A.current.x),$e=Math.abs(ge-A.current.y);(we>0||$e>0)&&(B.current=!0)}},te=re=>{A.current&&(re.preventDefault(),Q(re.clientX,re.clientY))},le=re=>{A.current&&re.touches.length>0&&(re.preventDefault(),Q(re.touches[0].clientX,re.touches[0].clientY))},ie=(re,ge)=>{if(!A.current||!x.current){A.current=null;return}const we=Math.abs(re-A.current.x),$e=Math.abs(ge-A.current.y);$e>U&&$e>we&&x.current.go(ge<A.current.y?"+1":"-1"),A.current=null},oe=re=>{A.current&&ie(re.clientX,re.clientY),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("pointermove",te)},me=re=>{if(A.current){if(re.changedTouches.length>0){const ge=re.changedTouches[0];ie(ge.clientX,ge.clientY)}document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),document.removeEventListener("touchmove",le)}},D=re=>{A.current={x:re.clientX,y:re.clientY},B.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",oe),document.addEventListener("pointercancel",oe)},J=re=>{re.touches.length>0&&(A.current={x:re.touches[0].clientX,y:re.touches[0].clientY},B.current=!1,document.addEventListener("touchmove",le,{passive:!1}),document.addEventListener("touchend",me),document.addEventListener("touchcancel",me))};return b.addEventListener("pointerdown",D),b.addEventListener("touchstart",J),()=>{b.removeEventListener("pointerdown",D),b.removeEventListener("touchstart",J),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("touchmove",le),document.removeEventListener("touchend",me),document.removeEventListener("touchcancel",me),A.current=null,B.current=!1}},[e,X,c]);const de={backgroundColor:P.color,backdropFilter:`blur(${P.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Sr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:L,className:he(G.background,w?M:se,{[G.editor]:i},{[G.hidden]:!e}),style:{...de,...p&&!i&&!w?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?L:null,className:he(G.contentStyle,w?O:ee,{[G.editor]:i},{[G.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(mr,{onMove:b=>d(b.index),ref:x,className:G.lightboxSplide,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,direction:y.direction==="horiz"||y.type==="fade"||y.type==="scale"?"ltr":"ttb",pagination:!1,drag:Y.type==="drag"&&!X,perPage:1,width:"100%",height:"100%",type:y.type==="fade"||y.type==="scale"?"fade":"loop",padding:0,rewind:Y.repeat!=="close",start:0},style:{"--splide-speed":y.duration},children:n.map((b,U)=>{const Q=Ut(W.position,W.offset,i),te=`${k.scalingValue(W.padding.top,i)} ${k.scalingValue(W.padding.right,i)} ${k.scalingValue(W.padding.bottom,i)} ${k.scalingValue(W.padding.left,i)}`,le=y.type==="scale"?(()=>{const{transform:ie,...oe}=Q;return{...oe,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":ie||"none"}})():{...Q,position:"absolute",padding:te,boxSizing:"border-box"};return a.jsx(gr,{children:a.jsx("div",{className:G.imgWrapper,onClick:pe,children:a.jsx("img",{ref:U===l?q:null,className:he(G.imageStyle,{[G.contain]:b.image.objectFit==="contain",[G.cover]:b.image.objectFit==="cover",[G.scaleSlide]:y.type==="scale"}),src:b.image.url,alt:b.image.name??"",style:{...le,pointerEvents:b.image.objectFit==="contain"?"none":"auto"}})})},U)})},c),I.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(G.arrow,{[G.arrowVertical]:y.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:G.arrowInner,style:{transform:`translate(${k.scalingValue(I.offset.x,i)}, ${k.scalingValue(I.offset.y*(y.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=x.current)==null?void 0:b.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&a.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:he(G.arrowImg,G.mirror)}),!I.arrowsImgUrl&&a.jsx(To,{color:I.color,className:he(G.arrowIcon,G.arrowImg,G.mirror)})]})}),a.jsx("div",{className:he(G.arrow,G.nextArrow,{[G.arrowVertical]:y.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:a.jsxs("button",{className:G.arrowInner,style:{transform:`translate(${k.scalingValue(I.offset.x*(y.direction==="horiz"?-1:1),i)}, ${k.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${y.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var b;return(b=x.current)==null?void 0:b.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&a.jsx(Xe,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:G.arrowImg}),!I.arrowsImgUrl&&a.jsx(To,{color:I.color,className:he(G.arrowIcon,G.arrowImg)})]})})]}),P.closeIconUrl&&(()=>{const b=Ut(P.closeIconAlign,P.closeIconOffset,i),U=`scale(${P.closeIconScale})`,Q=b.transform?`${b.transform} ${U}`:U;return a.jsx("button",{className:G.closeButton,style:{...b,transform:Q},onClick:K,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:P.closeIconUrl,fill:P.closeIconColor??"#000000",hoverFill:P.closeIconHover??"#cccccc"})})})(),E&&E.isActive&&o.imageCaption&&((N=n[l])==null?void 0:N.imageCaption)&&(()=>{const{widthSettings:b,fontSettings:U,letterSpacing:Q,textAlign:te,wordSpacing:le,fontSizeLineHeight:ie,textAppearance:oe,color:me}=o.imageCaption;return a.jsx("div",{className:G.caption,style:{...Ut(E.alignment,E.offset,i),fontFamily:yn(U.fontFamily),fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:b.sizing==="auto"?"max-content":k.scalingValue(b.width,i),letterSpacing:k.scalingValue(Q,i),wordSpacing:k.scalingValue(le,i),textAlign:te,fontSize:k.scalingValue(ie.fontSize,i),lineHeight:k.scalingValue(ie.lineHeight,i),textTransform:oe.textTransform??"none",textDecoration:oe.textDecoration??"none",fontVariant:oe.fontVariant??"normal",color:me},onClick:D=>D.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:G.captionTextInner,style:{"--link-color":E.linkColor,"--link-hover-color":E.linkHoverColor},children:a.jsx(Pt,{content:n[l].imageCaption})})})})(),F.isActive&&(()=>{const[b,U]=F.position.split("-"),Q=y.direction==="horiz"?`${b}-left`:F.position,te=Ut(Q,F.offset,i),le=()=>{if(y.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(b==="top")return"flex-start";if(b==="middle")return"center";if(b==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:R,className:G.thumbsWrapper,onClick:ie=>fe(ie),style:{position:i?"absolute":"fixed",...te,...y.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(G.thumbsContainer,{[G.thumbsContainerVertical]:y.direction==="vert",[G.thumbsAlignStart]:F.align==="start",[G.thumbsAlignCenter]:F.align==="center",[G.thumbsAlignEnd]:F.align==="end"}),style:{gap:k.scalingValue(F.grid.gap,i),justifyContent:j?"flex-start":le()},children:n.map((ie,oe)=>{const me=oe===l,D=S[oe],Z=F.grid.size*(me?F.activeState.scale:1),ce=()=>{if(F.fit!=="fit")return{};if(!D)return y.direction==="horiz"?{height:k.scalingValue(Z,i)}:{width:k.scalingValue(Z,i)};const re=D.width/D.height;if(y.direction==="horiz"){const ge=Z,we=ge*re;return{width:k.scalingValue(we,i),height:k.scalingValue(ge,i)}}else{const ge=Z,we=ge/re;return{width:k.scalingValue(ge,i),height:k.scalingValue(we,i)}}};return a.jsx("button",{className:G.thumbItem,style:{...y.direction==="horiz"&&F.fit!=="fit"?{height:k.scalingValue(Z,i)}:{},...y.direction==="vert"&&F.fit!=="fit"?{width:k.scalingValue(Z,i)}:{},...F.fit==="cover"?{width:k.scalingValue(Z,i),height:k.scalingValue(Z,i)}:{},...ce(),transition:me?"all 0.25s ease-out":"none",opacity:me?F.activeState.opacity/100:F.opacity/100,"--thumb-hover":F.activeState.opacity/100},onClick:re=>{var ge;re.stopPropagation(),d(oe),(ge=x.current)==null||ge.go(oe)},onMouseEnter:()=>{var re;F.triggers==="hov"&&((re=x.current)==null||re.go(oe))},children:a.jsx("img",{src:ie.image.url,alt:ie.image.name??"",onLoad:re=>{const ge=re.currentTarget;ge.naturalWidth&&ge.naturalHeight&&v(we=>({...we,[oe]:{width:ge.naturalWidth,height:ge.naturalHeight}}))},style:{objectFit:F.fit==="cover"?"cover":"contain",...F.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...F.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ie.image.name}-${oe}`)})})})})()]})]}),document.getElementById(s))};function To({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const _s={element:$s,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Es(e){return`
6
+ */const xa="RichTextRenderer-module__link___BWeZ2",Sa={link:xa},Ca=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Ca(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Pe(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?E.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}const Mt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:Sa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:wa(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function wa(e){return{...e.fontFamily&&{fontFamily:yn(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const $a="SvgImage-module__svg___q3xE-",Ta="SvgImage-module__img___VsTm-",vo={svg:$a,img:Ta},_a=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Ea=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=g.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return g.useEffect(()=>{if(typeof window<"u"&&window.CSS){const p=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(p)}},[]),!_a(e)||!s?a.jsx("img",{src:e,alt:"",className:he(vo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(vo.svg,o),style:{"--svg":Ea(e),"--fill":t,"--hover-fill":n,...r??{}}})},ka={"top-left":ee.topLeftAlignment,"top-center":ee.topCenterAlignment,"top-right":ee.topRightAlignment,"middle-left":ee.middleLeftAlignment,"middle-center":ee.middleCenterAlignment,"middle-right":ee.middleRightAlignment,"bottom-left":ee.bottomLeftAlignment,"bottom-center":ee.bottomCenterAlignment,"bottom-right":ee.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=g.useState(null),{widthSettings:i,fontSettings:p,letterSpacing:l,textAlign:m,wordSpacing:c,fontSizeLineHeight:T,textAppearance:w,color:y}=n.imageCaption,[u,d]=g.useState(void 0),[C,b]=g.useState(null),[x,A]=g.useState(0),[V,j]=g.useState(0),{direction:k,transition:S,controls:$,pagination:M,imageCaption:B,triggers:W}=e,F=g.useRef(S.type),{x:H,y:z}=e.controls.offset,G=v=>{r&&r.go(v)};return g.useEffect(()=>{if(!C)return;const v=new ResizeObserver(I=>{if(!r)return;const[R]=I;d({width:Math.round(R.contentRect.width),height:Math.round(R.contentRect.height)})});return v.observe(C),()=>v.unobserve(C)},[C]),g.useEffect(()=>{!r||F.current===S.type||(j(v=>v+1),F.current=S.type)},[S.type]),a.jsx("div",{className:he(ee.wrapper,{[ee.editor]:o}),ref:b,children:a.jsxs("div",{className:ee.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:S.backgroundColor&&S.type==="fade in"?S.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(ee.captionBlock),children:a.jsx("div",{className:ee.captionTextWrapper,children:t.map((v,I)=>a.jsx("div",{className:he(ee.captionText,ka[B.alignment],{[ee.withPointerEvents]:I===x&&o,[ee.active]:I===x}),style:{fontFamily:yn(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,o),letterSpacing:E.scalingValue(l,o),wordSpacing:E.scalingValue(c,o),textAlign:m,fontSize:E.scalingValue(T.fontSize,o),lineHeight:E.scalingValue(T.lineHeight,o),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:y,transitionDuration:S.duration?`${Math.round(parseInt(S.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ee.captionTextInner,style:{"--link-hover-color":B.linkHoverColor,"--link-color":B.linkColor,position:"relative",top:E.scalingValue(B.offset.y,o),left:E.scalingValue(B.offset.x,o)},children:a.jsx(Mt,{content:v.imageCaption})})},I))})}),a.jsx(dr,{onMove:v=>{A(v.index)},ref:s,options:{arrows:!1,speed:S.duration?parseInt(S.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:k==="horiz"||S.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:S.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((v,I)=>a.jsx(mr,{children:a.jsx("div",{className:ee.sliderItem,children:a.jsx("div",{className:ee.imgWrapper,children:a.jsx("img",{className:he(ee.sliderImage,{[ee.contain]:v.image.objectFit==="contain",[ee.cover]:v.image.objectFit==="cover"}),src:v.image.url,alt:v.image.name??""})})})},I))},V),$.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(ee.arrow,{[ee.arrowVertical]:k==="vert",[ee.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{onClick:()=>{G("-1")},className:ee.arrowInner,style:{transform:`translate(${E.scalingValue(H,o)}, ${E.scalingValue(z*(k==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(Xe,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:he(ee.arrowImg,ee.mirror)}),!$.arrowsImgUrl&&a.jsx(bo,{color:$.color,className:he(ee.arrowIcon,ee.arrowImg,ee.mirror)})]})}),a.jsx("div",{className:he(ee.arrow,ee.nextArrow,{[ee.arrowVertical]:k==="vert",[ee.hoverArrow]:$.show==="on hover"}),style:{color:$.color,"--arrow-hover-color":$.hover},children:a.jsxs("button",{className:ee.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${E.scalingValue(H*(k==="horiz"?-1:1),o)}, ${E.scalingValue(z,o)}) scale(${e.controls.scale/100}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:[$.arrowsImgUrl&&a.jsx(Xe,{url:$.arrowsImgUrl,fill:$.color,hoverFill:$.hover,className:ee.arrowImg}),!$.arrowsImgUrl&&a.jsx(bo,{color:$.color,className:he(ee.arrowIcon,ee.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:ee.clickOverlay,onClick:()=>{r&&r.go("+1")}}),M.isActive&&a.jsx("div",{className:he(ee.pagination,{[ee.paginationInsideBottom]:M.position==="inside-1"&&k==="horiz",[ee.paginationInsideTop]:M.position==="inside-2"&&k==="horiz",[ee.paginationOutsideBottom]:M.position==="outside-1"&&k==="horiz",[ee.paginationOutsideTop]:M.position==="outside-2"&&k==="horiz",[ee.paginationInsideLeft]:M.position==="inside-1"&&k==="vert",[ee.paginationInsideRight]:M.position==="inside-2"&&k==="vert",[ee.paginationOutsideLeft]:M.position==="outside-1"&&k==="vert",[ee.paginationOutsideRight]:M.position==="outside-2"&&k==="vert",[ee.paginationVertical]:k==="vert"}),children:a.jsx("div",{className:ee.paginationInner,style:{backgroundColor:M.colors[2],transform:`scale(${M.scale/100}) translate(${E.scalingValue(M.offset.x,o)}, ${E.scalingValue(M.offset.y,o)}) rotate(${k==="horiz"?"0deg":"90deg"})`},children:t.map((v,I)=>a.jsx("button",{onClick:()=>{r&&r.go(I)},className:he(ee.paginationItem),children:a.jsx("div",{className:he(ee.dot,{[ee.activeDot]:I===x}),style:{backgroundColor:I===x?M.colors[0]:M.colors[1],"--pagination-hover-color":M.hover}})},I))})})]})})}function bo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ia={element:Aa,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Fa="ImageRevealSlider-module__image___Qjt-e",Ra="ImageRevealSlider-module__link___N-iLG",Ma="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:La,image:Fa,link:Ra,cursor:Ma};function xo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,p=s/2,l=i/2;if(e>=o.x-p&&e<=o.x+p&&t>=o.y-l&&t<=o.y+l)return!0}return!1}function wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Wa({settings:e,content:t,isEditor:n}){const[o,r]=g.useState(null),[s,i]=g.useState([]),[p,l]=g.useState(0),m=g.useRef(0),[c,T]=g.useState({x:0,y:0}),[w,y]=g.useState(1),[u,d]=g.useState("none"),C=g.useRef({x:0,y:0}),[b,x]=g.useState(!1),{sizeType:A,imageWidth:V,randomRangeImageWidth:j}=e.imageSize,{revealPosition:k,visible:S}=e.position,{cursorType:$,target:M,defaultCursorScale:B,defaultCursor:W,hoverCursorScale:F,hoverCursor:H}=e.cursor;g.useEffect(()=>{if(!o)return;const v=(L,_)=>{const N=o.getBoundingClientRect(),J=L-N.left,ce=_-N.top;if(T({x:J,y:ce}),$==="system"){d("none"),y(1);return}const te=J,me=ce,f=document.elementFromPoint(N.left+te,N.top+me);if(f&&f.closest("a")){d("none"),y(1);return}const O=xo(te,me,s)||M==="area"?{img:H??"none",scale:F}:{img:W??"none",scale:B};d(O.img),y(O.scale)},I=L=>{L.stopPropagation(),C.current={x:L.clientX,y:L.clientY},v(L.clientX,L.clientY)},R=()=>{b&&v(C.current.x,C.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",R,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",R,!0)}},[o,b,c,$,M,H,W,F,B,s]),g.useEffect(()=>{b||(d("none"),y(0))},[b]);const z=async(v,I,R,L={})=>{const{width:_,height:N,finalWidth:J}=await Pa(v.image.url,A,V,j);let ce=0,te=0;k==="same"?(ce=I/2,te=R/2):(ce=L.x??Math.random()*I,te=L.y??Math.random()*R);const me=Math.min(Math.max(ce,_/2),I-_/2),f=Math.min(Math.max(te,N/2),R-N/2);return{id:m.current++,url:v.image.url,link:v.link,name:v.image.name,x:me,y:f,width:J}};g.useEffect(()=>{if(!o||t.length===0)return;const v=o.getBoundingClientRect(),I=v.width,R=v.height,L=[];(async()=>{const N=t[0],J=await z(N,I,R);L.push(J),i(L),l(1)})()},[A,V,j,k,o]),g.useEffect(()=>{S==="last One"&&i(v=>v.length>0?[v[v.length-1]]:[])},[S]);const G=async v=>{if(!o)return;const I=o.getBoundingClientRect(),R=v.clientX-I.left,L=v.clientY-I.top;if(M==="image"&&!xo(R,L,s))return;let _=0,N=0;k==="on Click"?(_=R,N=L):k==="same"?(_=I.width/2,N=I.height/2):(_=Math.random()*I.width,N=Math.random()*I.height);const J=t[p],ce=await z(J,I.width,I.height,{x:_,y:N});i(te=>S==="all"?[...te,ce]:[ce]),l(te=>te>=t.length-1?0:te+1)};return a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:ut.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[s.map(v=>a.jsx("div",{className:ut.wrapper,style:{top:`${v.y}px`,left:`${v.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:v.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:M==="area"&&v.link?a.jsx("a",{href:v.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)}):a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)},v.id)),b&&a.jsx("div",{className:ut.cursor,style:{left:`${c.x}px`,top:`${c.y}px`,transform:`translate(-50%, -50%) scale(${w})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ha={element:Wa,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Na="LightBox-module__hidden___9s-9x",ja="LightBox-module__heroImage___sTxNF",Va="LightBox-module__background___rm9ml",Ba="LightBox-module__editor___4ACaY",Oa="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Da="LightBox-module__imgWrapper___LuFUp",qa="LightBox-module__contain___8-yaS",Ua="LightBox-module__cover___hNvOG",Ga="LightBox-module__caption___b6L2I",Ka="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Za="LightBox-module__arrowVertical___Zfz81",Ja="LightBox-module__nextArrow___zkAQN",Qa="LightBox-module__arrowInner___p48sW",es="LightBox-module__arrowIcon___3VaFf",ts="LightBox-module__arrowImg___pNV88",ns="LightBox-module__mirror___pjeXc",os="LightBox-module__thumbsWrapper___GB-nU",rs="LightBox-module__thumbsContainerVertical___wttk5",is="LightBox-module__thumbsContainer___osSma",as="LightBox-module__thumbsAlignStart___MO6tY",ss="LightBox-module__thumbsAlignCenter___Q4sUx",ls="LightBox-module__thumbsAlignEnd___p4y9R",cs="LightBox-module__thumbItem___HvnF3",us="LightBox-module__closeButton___g2khP",ps="LightBox-module__fadeIn___0m5GW",ds="LightBox-module__slideInLeft___gPYwC",ms="LightBox-module__slideInRight___S-pPp",gs="LightBox-module__slideInTop___DFdAj",fs="LightBox-module__slideInBottom___m27kZ",hs="LightBox-module__fadeOut___55qBR",ys="LightBox-module__slideOutLeft___NvU7P",vs="LightBox-module__slideOutRight___SK7eC",bs="LightBox-module__slideOutTop___Vgg0z",xs="LightBox-module__slideOutBottom___nJ0Ef",Ss="LightBox-module__scaleSlide___vZriG",K={hidden:Na,heroImage:ja,background:Va,editor:Ba,contentStyle:Oa,imageStyle:za,imgWrapper:Da,contain:qa,cover:Ua,caption:Ga,captionTextInner:Ka,lightboxSplide:Ya,arrow:Xa,arrowVertical:Za,nextArrow:Ja,arrowInner:Qa,arrowIcon:es,arrowImg:ts,mirror:ns,thumbsWrapper:os,thumbsContainerVertical:rs,thumbsContainer:is,thumbsAlignStart:as,thumbsAlignCenter:ss,thumbsAlignEnd:ls,thumbItem:cs,closeButton:us,fadeIn:ps,slideInLeft:ds,slideInRight:ms,slideInTop:gs,slideInBottom:fs,fadeOut:hs,slideOutLeft:ys,slideOutRight:vs,slideOutTop:bs,slideOutBottom:xs,scaleSlide:Ss},Ut=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:o.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,o};function gr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function So(e){const t=e.getBoundingClientRect(),n=gr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,p=o/r,l=s/i;let m,c;l>p?(m=o,c=o/l):(c=r,m=r*l);const T=t.left+n.left,w=t.top+n.top,y=(o-m)/2+T,u=(r-c)/2+w;return{x:y,y:u,width:m,height:c}}function Co(e){const t=e.getBoundingClientRect(),n=gr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function wo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Cs(e,t){const n=(()=>{if(e==="fade in")return K.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return K.slideInLeft;case"right":return K.slideInRight;case"top":return K.slideInTop;case"bottom":return K.slideInBottom;default:return K.slideInRight}return K.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return K.fadeIn;if(e==="slide in")switch(t){case"left":return K.slideInLeft;case"right":return K.slideInRight;case"top":return K.slideInTop;case"bottom":return K.slideInBottom;default:return K.slideInRight}return K.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return K.fadeOut;if(e==="slide in")switch(t){case"left":return K.slideOutLeft;case"right":return K.slideOutRight;case"top":return K.slideOutTop;case"bottom":return K.slideOutBottom;default:return K.slideOutRight}return K.fadeOut})(),s=(()=>{if(e==="fade in")return K.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return K.slideOutLeft;case"right":return K.slideOutRight;case"top":return K.slideOutTop;case"bottom":return K.slideOutBottom;default:return K.slideOutRight}return K.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const ws=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,p]=g.useState(!1),{url:l}=e.thumbnailBlock.cover;return g.useEffect(()=>{r==="close"&&p(!1),r==="open"&&p(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:l,alt:"Cover",className:K.heroImage,onClick:()=>p(!0)}),a.jsx($s,{isOpen:i,onClose:()=>p(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},$s=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:p})=>{var P;const[l,m]=g.useState(0),[c,T]=g.useState(0),[w,y]=g.useState(!1),[u,d]=g.useState(!1),[C,b]=g.useState({}),x=g.useRef(null),A=g.useRef(null),V=g.useRef(null),j=g.useRef(!1),k=g.useRef(null),S=g.useRef(null),$=g.useRef(null),M=g.useRef(null),B=g.useRef(!1),W=g.useRef(null),[F,H]=g.useState(!1),{appear:z,triggers:G,slider:v,thumbnail:I,controls:R,area:L,caption:_,layout:N}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ce,backdropDisappearClass:te,disappearClass:me}=Cs(z.type,z.direction),f=(p==null?void 0:p.itemId)??null;g.useEffect(()=>{const h=()=>{setTimeout(()=>{var Y,Q;(Q=(Y=x.current)==null?void 0:Y.splide)==null||Q.refresh()},16)},D=()=>{T(Y=>Y+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),g.useEffect(()=>{if(!e||!I.isActive){H(!1);return}const h=W.current;if(!h)return;const D=()=>{v.direction==="horiz"?H(h.scrollWidth>h.clientWidth):H(h.scrollHeight>h.clientHeight)};D();const Y=new ResizeObserver(D);return Y.observe(h),()=>Y.disconnect()},[e,I.isActive,n.length,C,v.direction]);const O=g.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,D=wo(L.color);h&&!i&&D>.9&&(document.body.style.backgroundColor=""),y(!0),j.current=!0;const Y=Q=>{Q.target===k.current&&Q.animationName&&(k.current&&S.current&&k.current.removeEventListener("animationend",S.current),S.current=null,j.current&&(j.current=!1,t()),y(!1))};k.current&&(S.current=Y,k.current.addEventListener("animationend",Y))},[t,L.color,i]),oe=(h,D,Y)=>{var Q,le;if(h){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&l===n.length-1?O():(Q=x.current)==null||Q.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const ae=h.getBoundingClientRect(),re=D-ae.left,ge=Y-ae.top,U=ae.width,Z=ae.height;let X;v.direction==="horiz"?X=re<U/2?"-1":"+1":X=ge<Z/2?"-1":"+1",(le=x.current)==null||le.go(X)}}},ne=h=>{if(B.current){B.current=!1;return}const D=n[l],Y=(D==null?void 0:D.image.objectFit)==="cover";let Q,le;if("changedTouches"in h&&h.changedTouches.length>0)Q=h.changedTouches[0].clientX,le=h.changedTouches[0].clientY;else if("clientX"in h)Q=h.clientX,le=h.clientY;else return;let ae;if(Y&&V.current){const re=Co(V.current);ae=Q>=re.left&&Q<=re.right&&le>=re.top&&le<=re.bottom}else{const re=V.current?So(V.current):null;if(!re){h.target===h.currentTarget&&O();return}ae=Q>=re.x&&Q<=re.x+re.width&&le>=re.y&&le<=re.y+re.height}ae?oe(V.current,Q,le):O()},ue=h=>{const D=h.target;(D.classList.contains(K.thumbsWrapper)||D.classList.contains(K.thumbsContainer))&&ne(h)};g.useEffect(()=>{if(!e)return;const h=D=>{var Y,Q;if(D.key==="Escape"){O();return}if(D.key==="ArrowRight"){m(le=>(le+1)%Math.max(n.length,1)),(Y=x.current)==null||Y.go("+1");return}D.key==="ArrowLeft"&&(m(le=>(le-1+Math.max(n.length,1))%Math.max(n.length,1)),(Q=x.current)==null||Q.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,O,n.length]),g.useEffect(()=>{if(e){if(m(0),T(D=>D+1),j.current=!1,y(!1),d(!1),b({}),!f)return;const h=new CustomEvent("page-overlay",{detail:{itemId:f}});window.dispatchEvent(h)}return()=>{k.current&&S.current&&(k.current.removeEventListener("animationend",S.current),S.current=null),d(!1)}},[e,f]),g.useEffect(()=>{A.current!==null&&A.current!==v.type&&T(h=>h+1),A.current=v.type},[v.type]),g.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,Y=wo(L.color);document.body.style.overflow="hidden",d(!1);const Q=ae=>{ae.target===k.current&&!j.current&&ae.animationName&&(D&&!i&&Y>.9&&(document.body.style.backgroundColor=L.color),d(!0),k.current&&$.current&&k.current.removeEventListener("animationend",$.current),$.current=null)};k.current&&($.current=Q,k.current.addEventListener("animationend",Q));const le=ae=>{const re=ae.target;re&&(re.closest(`.${K.thumbsWrapper}`)||re.closest(`.${K.thumbsContainer}`))||v.type!=="slide"&&ae.preventDefault()};return document.addEventListener("touchmove",le,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",le),k.current&&$.current&&(k.current.removeEventListener("animationend",$.current),$.current=null),d(!1)}},[e,i,L.color,v.type]),g.useEffect(()=>{if(!e)return;const h=D=>{var Q,le;if(j.current){D.stopPropagation();return}if(B.current){B.current=!1;return}const Y=D.target;if(!(Y&&(Y.closest(`.${K.thumbsContainer}`)||Y.closest(`.${K.thumbItem}`)))){if(v.type==="slide"&&G.type==="drag"&&((le=(Q=x.current)==null?void 0:Q.splide)!=null&&le.root)){const ae=x.current.splide.root;if(Y&&(ae.contains(Y)||ae===Y))return}if(D.touches.length===0&&D.changedTouches.length>0){const ae=n[l],re=(ae==null?void 0:ae.image.objectFit)==="cover",ge=D.changedTouches[0];let U;if(re&&V.current){const Z=Co(V.current);U=ge.clientX>=Z.left&&ge.clientX<=Z.right&&ge.clientY>=Z.top&&ge.clientY<=Z.bottom}else{const Z=V.current?So(V.current):null;if(!Z)return;U=ge.clientX>=Z.x&&ge.clientX<=Z.x+Z.width&&ge.clientY>=Z.y&&ge.clientY<=Z.y+Z.height}if(!U){D.stopPropagation(),j.current=!0;const Z=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",Z,!0)};document.addEventListener("click",Z,!0),O()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,O,l,n]);const q=(v.type==="scale"||v.type==="fade")&&v.direction==="vert"&&G.type==="drag";g.useEffect(()=>{var X,pe;if(!e||!q||!((pe=(X=x.current)==null?void 0:X.splide)!=null&&pe.root))return;const h=x.current.splide.root,D=30,Y=(ie,fe)=>{if(M.current){const we=Math.abs(ie-M.current.x),$e=Math.abs(fe-M.current.y);(we>0||$e>0)&&(B.current=!0)}},Q=ie=>{M.current&&(ie.preventDefault(),Y(ie.clientX,ie.clientY))},le=ie=>{M.current&&ie.touches.length>0&&(ie.preventDefault(),Y(ie.touches[0].clientX,ie.touches[0].clientY))},ae=(ie,fe)=>{if(!M.current||!x.current){M.current=null;return}const we=Math.abs(ie-M.current.x),$e=Math.abs(fe-M.current.y);$e>D&&$e>we&&x.current.go(fe<M.current.y?"+1":"-1"),M.current=null},re=ie=>{M.current&&ae(ie.clientX,ie.clientY),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("pointermove",Q)},ge=ie=>{if(M.current){if(ie.changedTouches.length>0){const fe=ie.changedTouches[0];ae(fe.clientX,fe.clientY)}document.removeEventListener("touchend",ge),document.removeEventListener("touchcancel",ge),document.removeEventListener("touchmove",le)}},U=ie=>{M.current={x:ie.clientX,y:ie.clientY},B.current=!1,document.addEventListener("pointermove",Q,{passive:!1}),document.addEventListener("pointerup",re),document.addEventListener("pointercancel",re)},Z=ie=>{ie.touches.length>0&&(M.current={x:ie.touches[0].clientX,y:ie.touches[0].clientY},B.current=!1,document.addEventListener("touchmove",le,{passive:!1}),document.addEventListener("touchend",ge),document.addEventListener("touchcancel",ge))};return h.addEventListener("pointerdown",U),h.addEventListener("touchstart",Z),()=>{h.removeEventListener("pointerdown",U),h.removeEventListener("touchstart",Z),document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",re),document.removeEventListener("pointercancel",re),document.removeEventListener("touchmove",le),document.removeEventListener("touchend",ge),document.removeEventListener("touchcancel",ge),M.current=null,B.current=!1}},[e,q,c]);const se={backgroundColor:L.color,backdropFilter:`blur(${L.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:xr.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:k,className:he(K.background,w?te:ce,{[K.editor]:i},{[K.hidden]:!e}),style:{...se,...u&&!i&&!w?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?k:null,className:he(K.contentStyle,w?me:J,{[K.editor]:i},{[K.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(dr,{onMove:h=>m(h.index),ref:x,className:K.lightboxSplide,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,direction:v.direction==="horiz"||v.type==="fade"||v.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!q,perPage:1,width:"100%",height:"100%",type:v.type==="fade"||v.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":v.duration},children:n.map((h,D)=>{const Y=Ut(N.position,N.offset,i),Q=`${E.scalingValue(N.padding.top,i)} ${E.scalingValue(N.padding.right,i)} ${E.scalingValue(N.padding.bottom,i)} ${E.scalingValue(N.padding.left,i)}`,le=v.type==="scale"?(()=>{const{transform:ae,...re}=Y;return{...re,position:"absolute",padding:Q,boxSizing:"border-box","--position-transform":ae||"none"}})():{...Y,position:"absolute",padding:Q,boxSizing:"border-box"};return a.jsx(mr,{children:a.jsx("div",{className:K.imgWrapper,onClick:ne,children:a.jsx("img",{ref:D===l?V:null,className:he(K.imageStyle,{[K.contain]:h.image.objectFit==="contain",[K.cover]:h.image.objectFit==="cover",[K.scaleSlide]:v.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...le,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},D)})},c),R.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(K.arrow,{[K.arrowVertical]:v.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:K.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x,i)}, ${E.scalingValue(R.offset.y*(v.direction==="horiz"?1:-1),i)}) scale(${R.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=x.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[R.arrowsImgUrl&&a.jsx(Xe,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:he(K.arrowImg,K.mirror)}),!R.arrowsImgUrl&&a.jsx($o,{color:R.color,className:he(K.arrowIcon,K.arrowImg,K.mirror)})]})}),a.jsx("div",{className:he(K.arrow,K.nextArrow,{[K.arrowVertical]:v.direction==="vert"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:a.jsxs("button",{className:K.arrowInner,style:{transform:`translate(${E.scalingValue(R.offset.x*(v.direction==="horiz"?-1:1),i)}, ${E.scalingValue(R.offset.y,i)}) scale(${R.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=x.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[R.arrowsImgUrl&&a.jsx(Xe,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:K.arrowImg}),!R.arrowsImgUrl&&a.jsx($o,{color:R.color,className:he(K.arrowIcon,K.arrowImg)})]})})]}),L.closeIconUrl&&(()=>{const h=Ut(L.closeIconAlign,L.closeIconOffset,i),D=`scale(${L.closeIconScale})`,Y=h.transform?`${h.transform} ${D}`:D;return a.jsx("button",{className:K.closeButton,style:{...h,transform:Y},onClick:O,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:L.closeIconUrl,fill:L.closeIconColor??"#000000",hoverFill:L.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&o.imageCaption&&((P=n[l])==null?void 0:P.imageCaption)&&(()=>{const{widthSettings:h,fontSettings:D,letterSpacing:Y,textAlign:Q,wordSpacing:le,fontSizeLineHeight:ae,textAppearance:re,color:ge}=o.imageCaption;return a.jsx("div",{className:K.caption,style:{...Ut(_.alignment,_.offset,i),fontFamily:yn(D.fontFamily),fontWeight:D.fontWeight,fontStyle:D.fontStyle,width:h.sizing==="auto"?"max-content":E.scalingValue(h.width,i),letterSpacing:E.scalingValue(Y,i),wordSpacing:E.scalingValue(le,i),textAlign:Q,fontSize:E.scalingValue(ae.fontSize,i),lineHeight:E.scalingValue(ae.lineHeight,i),textTransform:re.textTransform??"none",textDecoration:re.textDecoration??"none",fontVariant:re.fontVariant??"normal",color:ge},onClick:U=>U.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:K.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:a.jsx(Mt,{content:n[l].imageCaption})})})})(),I.isActive&&(()=>{const[h,D]=I.position.split("-"),Y=v.direction==="horiz"?`${h}-left`:I.position,Q=Ut(Y,I.offset,i),le=()=>{if(v.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:K.thumbsWrapper,onClick:ae=>ue(ae),style:{position:i?"absolute":"fixed",...Q,...v.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(K.thumbsContainer,{[K.thumbsContainerVertical]:v.direction==="vert",[K.thumbsAlignStart]:I.align==="start",[K.thumbsAlignCenter]:I.align==="center",[K.thumbsAlignEnd]:I.align==="end"}),style:{gap:E.scalingValue(I.grid.gap,i),justifyContent:F?"flex-start":le()},children:n.map((ae,re)=>{const ge=re===l,U=C[re],X=I.grid.size*(ge?I.activeState.scale:1),pe=()=>{if(I.fit!=="fit")return{};if(!U)return v.direction==="horiz"?{height:E.scalingValue(X,i)}:{width:E.scalingValue(X,i)};const ie=U.width/U.height;if(v.direction==="horiz"){const fe=X,we=fe*ie;return{width:E.scalingValue(we,i),height:E.scalingValue(fe,i)}}else{const fe=X,we=fe/ie;return{width:E.scalingValue(fe,i),height:E.scalingValue(we,i)}}};return a.jsx("button",{className:K.thumbItem,style:{...v.direction==="horiz"&&I.fit!=="fit"?{height:E.scalingValue(X,i)}:{},...v.direction==="vert"&&I.fit!=="fit"?{width:E.scalingValue(X,i)}:{},...I.fit==="cover"?{width:E.scalingValue(X,i),height:E.scalingValue(X,i)}:{},...pe(),transition:ge?"all 0.25s ease-out":"none",opacity:ge?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:ie=>{var fe;ie.stopPropagation(),m(re),(fe=x.current)==null||fe.go(re)},onMouseEnter:()=>{var ie;I.triggers==="hov"&&((ie=x.current)==null||ie.go(re))},children:a.jsx("img",{src:ae.image.url,alt:ae.image.name??"",onLoad:ie=>{const fe=ie.currentTarget;fe.naturalWidth&&fe.naturalHeight&&b(we=>({...we,[re]:{width:fe.naturalWidth,height:fe.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ae.image.name}-${re}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ts={element:ws,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function _s(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -139,7 +139,7 @@
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function ks({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=k.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:u=[],buttonLabel:l,gap:d,fieldsGap:c,buttonCorners:T,buttonStroke:w,buttonPadding:f,isButtonFullWidth:p,inputCorners:m,inputStroke:S,inputPadding:v,inputColor:x,inputTextColor:_,inputBorderColor:q,placeholderColor:H,buttonColor:L,buttonTextColor:C,buttonBorderColor:$,labelTextColor:A,successColor:B,errorColor:R,fontFamily:j,inputFontSettings:V,inputFontSize:z,inputLineHeight:Y,inputLetterSpacing:y,inputWordSpacing:F,inputTextAppearance:I,buttonFontSettings:P,buttonFontSize:E,buttonLineHeight:W,buttonLetterSpacing:ee,buttonWordSpacing:se,buttonTextAppearance:M,labelFontSettings:O,labelFontSize:h,labelLineHeight:K,labelLetterSpacing:ae,labelWordSpacing:pe,labelTextAppearance:fe,statusFontSettings:X,statusFontSize:de,statusLineHeight:N,statusLetterSpacing:b,statusWordSpacing:U,statusTextAppearance:Q,successMessage:te,errorMessage:le,stateOverrides:ie}=e,oe=s==="B",me=u.slice(0,Math.min(i,u.length)),D={fontSettings:{fontFamily:j,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:z??.01,lineHeight:Y,letterSpacing:y??0,wordSpacing:F??0,textAppearance:I,color:_},J=ht(Re(D,t)),Z=k.scalingValue(S??0,t),ce=k.scalingValue((Y??z??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?S??0:(S??0)*2),t),re={...J,borderStyle:"solid",borderRadius:s==="C"?0:k.scalingValue(m??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Z,borderLeftWidth:0}:{borderWidth:Z},paddingTop:k.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:k.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:k.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:k.scalingValue((v==null?void 0:v.left)??0,t),height:ce,minHeight:ce},ge={fontSettings:{fontFamily:j,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:E??.01,lineHeight:W,letterSpacing:ee??0,wordSpacing:se??0,textAppearance:M,color:C},we=ht(Re(ge,t)),$e=k.scalingValue(w??0,t),lt={fontSettings:{fontFamily:j,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:h??.01,lineHeight:K,letterSpacing:ae??0,wordSpacing:pe??0,textAppearance:fe,color:A},Ke=Re(lt,t),xe={fontSettings:{fontFamily:j,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:de??.01,lineHeight:N,letterSpacing:b??0,wordSpacing:U??0,textAppearance:Q,color:B},Pe=ht(Re(xe,t)),nt=k.buildColorVars(r,{inputColor:x,inputTextColor:_,inputBorderColor:q,placeholderColor:H!=null&&H.trim()?H:"#cccccc",buttonColor:L,buttonTextColor:C,buttonBorderColor:$,labelTextColor:A,successColor:B,errorColor:R},Ls,As,ie),[Ce,Ne]=g.useState(()=>Object.fromEntries(me.map(ye=>[ye.name,""]))),[to,wt]=g.useState("idle"),[hr,zt]=g.useState(null),vn=o==="success"?"success":o==="error"?"error":to,yr=o==="error"?le:hr,Dt=o==="filled",$t=g.useMemo(()=>{if(!Dt)return Ce;let ye=null;for(const Ve of me)(Ce[Ve.name]??"").trim().length>0||(ye=ye??{...Ce},ye[Ve.name]="Filled");return ye??Ce},[Ce,Dt,me]),vr=vn==="error"?k.getFormFieldValidationError(me,$t):null,br=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),no=n==null?void 0:n.submitUrl,oo=(ye,Ve)=>{Ne(Oe=>({...Oe,[ye]:Ve}))},xr=async ye=>{ye.preventDefault();const Ve=Object.fromEntries(me.map(Ae=>{var ct;return[Ae.name,((ct=Ce[Ae.name])==null?void 0:ct.trim())??""]}).filter(([,Ae])=>Ae));if(!no){wt("error"),zt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const Oe=k.getFormFieldValidationError(me,Ce);if(Oe){wt("error"),zt(Oe);return}wt("submitting"),zt(null);try{const Ae=await fetch(no,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Ae.ok){const ct=await Ae.text();throw new Error(ct||`Request failed: ${Ae.status}`)}wt("success"),Ne(Object.fromEntries(me.map(ct=>[ct.name,""])))}catch(Ae){wt("error"),zt(Ae instanceof Error?Ae.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${br}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Es(r)}}),a.jsxs("form",{onSubmit:xr,className:`${r}-form`,style:{gap:k.scalingValue(d??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:k.scalingValue(c??0,t)},children:me.map((ye,Ve)=>a.jsxs("div",{className:`${r}-field-group${oe?` ${r}-labeled`:""}`,children:[oe&&a.jsx("span",{className:`${r}-field-label`,style:Ke?{...Ke,lineHeight:Ke.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Oe=>oo(ye.name,Oe.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:re,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Oe=>oo(ye.name,Oe.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:re,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Ve))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:k.scalingValue(T??0,t),borderWidth:$e,paddingTop:k.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:k.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:k.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:k.scalingValue((f==null?void 0:f.left)??0,t),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:to==="submitting"?"...":l})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Pe},children:te}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Pe},role:"alert",children:vr??yr??le})]})}const Ls={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},As=["hover","focus","filled","success","error"],Is=`import React, { useMemo, useState } from 'react';
142
+ `}function Es({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=E.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:p=[],buttonLabel:l,gap:m,fieldsGap:c,buttonCorners:T,buttonStroke:w,buttonPadding:y,isButtonFullWidth:u,inputCorners:d,inputStroke:C,inputPadding:b,inputColor:x,inputTextColor:A,inputBorderColor:V,placeholderColor:j,buttonColor:k,buttonTextColor:S,buttonBorderColor:$,labelTextColor:M,successColor:B,errorColor:W,fontFamily:F,inputFontSettings:H,inputFontSize:z,inputLineHeight:G,inputLetterSpacing:v,inputWordSpacing:I,inputTextAppearance:R,buttonFontSettings:L,buttonFontSize:_,buttonLineHeight:N,buttonLetterSpacing:J,buttonWordSpacing:ce,buttonTextAppearance:te,labelFontSettings:me,labelFontSize:f,labelLineHeight:O,labelLetterSpacing:oe,labelWordSpacing:ne,labelTextAppearance:ue,statusFontSettings:q,statusFontSize:se,statusLineHeight:P,statusLetterSpacing:h,statusWordSpacing:D,statusTextAppearance:Y,successMessage:Q,errorMessage:le,stateOverrides:ae}=e,re=s==="B",ge=p.slice(0,Math.min(i,p.length)),U={fontSettings:{fontFamily:F,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:z??.01,lineHeight:G,letterSpacing:v??0,wordSpacing:I??0,textAppearance:R,color:A},Z=ht(Pe(U,t)),X=E.scalingValue(C??0,t),pe=E.scalingValue((G??z??.01)+((b==null?void 0:b.top)??0)+((b==null?void 0:b.bottom)??0)+(s==="C"?C??0:(C??0)*2),t),ie={...Z,borderStyle:"solid",borderRadius:s==="C"?0:E.scalingValue(d??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:X,borderLeftWidth:0}:{borderWidth:X},paddingTop:E.scalingValue((b==null?void 0:b.top)??0,t),paddingRight:E.scalingValue((b==null?void 0:b.right)??0,t),paddingBottom:E.scalingValue((b==null?void 0:b.bottom)??0,t),paddingLeft:E.scalingValue((b==null?void 0:b.left)??0,t),height:pe,minHeight:pe},fe={fontSettings:{fontFamily:F,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:_??.01,lineHeight:N,letterSpacing:J??0,wordSpacing:ce??0,textAppearance:te,color:S},we=ht(Pe(fe,t)),$e=E.scalingValue(w??0,t),lt={fontSettings:{fontFamily:F,fontWeight:(me==null?void 0:me.fontWeight)??400,fontStyle:(me==null?void 0:me.fontStyle)??"normal"},fontSize:f??.01,lineHeight:O,letterSpacing:oe??0,wordSpacing:ne??0,textAppearance:ue,color:M},Ke=Pe(lt,t),xe={fontSettings:{fontFamily:F,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:se??.01,lineHeight:P,letterSpacing:h??0,wordSpacing:D??0,textAppearance:Y,color:B},Me=ht(Pe(xe,t)),nt=E.buildColorVars(r,{inputColor:x,inputTextColor:A,inputBorderColor:V,placeholderColor:j!=null&&j.trim()?j:"#cccccc",buttonColor:k,buttonTextColor:S,buttonBorderColor:$,labelTextColor:M,successColor:B,errorColor:W},ks,As,ae),[Ce,je]=g.useState(()=>Object.fromEntries(ge.map(ye=>[ye.name,""]))),[eo,wt]=g.useState("idle"),[fr,zt]=g.useState(null),vn=o==="success"?"success":o==="error"?"error":eo,hr=o==="error"?le:fr,Dt=o==="filled",$t=g.useMemo(()=>{if(!Dt)return Ce;let ye=null;for(const Ve of ge)(Ce[Ve.name]??"").trim().length>0||(ye=ye??{...Ce},ye[Ve.name]="Filled");return ye??Ce},[Ce,Dt,ge]),yr=vn==="error"?E.getFormFieldValidationError(ge,$t):null,vr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),to=n==null?void 0:n.submitUrl,no=(ye,Ve)=>{je(Be=>({...Be,[ye]:Ve}))},br=async ye=>{ye.preventDefault();const Ve=Object.fromEntries(ge.map(Ie=>{var ct;return[Ie.name,((ct=Ce[Ie.name])==null?void 0:ct.trim())??""]}).filter(([,Ie])=>Ie));if(!to){wt("error"),zt("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const Be=E.getFormFieldValidationError(ge,Ce);if(Be){wt("error"),zt(Be);return}wt("submitting"),zt(null);try{const Ie=await fetch(to,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Ie.ok){const ct=await Ie.text();throw new Error(ct||`Request failed: ${Ie.status}`)}wt("success"),je(Object.fromEntries(ge.map(ct=>[ct.name,""])))}catch(Ie){wt("error"),zt(Ie instanceof Error?Ie.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${vr}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_s(r)}}),a.jsxs("form",{onSubmit:br,className:`${r}-form`,style:{gap:E.scalingValue(m??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:E.scalingValue(c??0,t)},children:ge.map((ye,Ve)=>a.jsxs("div",{className:`${r}-field-group${re?` ${r}-labeled`:""}`,children:[re&&a.jsx("span",{className:`${r}-field-label`,style:Ke?{...Ke,lineHeight:Ke.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:ie,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:ie,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Ve))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(T??0,t),borderWidth:$e,paddingTop:E.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:E.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:E.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:E.scalingValue((y==null?void 0:y.left)??0,t),...we,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:eo==="submitting"?"...":l})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Me},children:Q}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:yr??hr??le})]})}const ks={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},As=["hover","focus","filled","success","error"],Is=`import React, { useMemo, useState } from 'react';
143
143
  import { CommonComponentProps } from '../props';
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -740,7 +740,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
740
740
  };
741
741
 
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
743
- `,Ms=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fs=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ps={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Kt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Kt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Kt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Kt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Ms,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Fs],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Rs={element:ks,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:Ps,sourceCode:Is};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ws(e){return`
743
+ `,Ls=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Fs=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Rs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Kt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Kt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Kt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Kt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Ls,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Fs],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ms={element:Es,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:Rs,sourceCode:Is};function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ps(e){return`
744
744
  .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
@@ -931,7 +931,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
931
931
  font-size: ${Yt(14)};
932
932
  color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const Hs=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=k.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:l=1,fontFamily:d,inputFontSettings:c,inputFontSize:T,inputLineHeight:w,inputLetterSpacing:f,inputWordSpacing:p,inputTextAppearance:m,buttonFontSettings:S,buttonFontSize:v,buttonLineHeight:x,buttonLetterSpacing:_,buttonWordSpacing:q,buttonTextAppearance:H,statusFontSettings:L,statusFontSize:C,statusLineHeight:$,statusLetterSpacing:A,statusWordSpacing:B,statusTextAppearance:R,iconMaxWidth:j,minHeight:V,corners:z,stroke:Y,stateOverrides:y,inputPadding:F,buttonPadding:I,successMessage:P="Thanks for subscribing!",errorMessage:E="Please, fill all required fields."}=e,W=s.slice(0,Math.min(l,s.length)),[ee,se]=g.useState(()=>Object.fromEntries(W.map(xe=>[xe.name,""]))),[M,O]=g.useState("idle"),[h,K]=g.useState(null),ae=o==="success"?"success":o==="error"?"error":M,pe=o==="error"?E:h,fe=o==="filled",X=g.useMemo(()=>{if(!fe)return ee;let xe=null;for(const Pe of W)(ee[Pe.name]??"").trim().length>0||(xe=xe??{...ee},xe[Pe.name]="Filled");return xe??ee},[fe,ee,W]),de=ae==="error"?k.getFormFieldValidationError(W,X):null,N=o&&o!=="default"?`${r}-state-${o}`:"",b=W.some(xe=>(X[xe.name]??"").trim().length>0),U=N!==`${r}-state-filled`&&b?`${r}-state-filled`:"",Q=`${N} ${U}`.trim(),te=n==null?void 0:n.submitUrl,le=u??"",ie=(i==null?void 0:i.icon)??"",oe=(i==null?void 0:i.mode)==="On",me=le||"Submit",D={fontSettings:{fontFamily:d,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:T??.01,lineHeight:w,letterSpacing:f??0,wordSpacing:p??0,textAppearance:m,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:d,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:v??.01,lineHeight:x,letterSpacing:_??0,wordSpacing:q??0,textAppearance:H,color:e.buttonTextColor??"#ffffff"},Z={fontSettings:{fontFamily:d,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:C??.01,lineHeight:$,letterSpacing:A??0,wordSpacing:B??0,textAppearance:R,color:e.successColor??"#22c55e"},ce=ht(Re(D,t)),re=ht(Re(J,t)),ge=ht(Re(Z,t)),we=k.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(D==null?void 0:D.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},js,Ns,y),$e={borderRadius:k.scalingValue(z,t),borderWidth:k.scalingValue(Y,t),borderStyle:"solid"},lt={borderLeftWidth:k.scalingValue(Y,t)},Ke=async xe=>{xe.preventDefault();const Pe=Object.fromEntries(W.map(Ce=>{var Ne;return[Ce.name,((Ne=ee[Ce.name])==null?void 0:Ne.trim())??""]}).filter(([,Ce])=>Ce));if(!te){O("error"),K("No integrations were found for this form.");return}if(Object.keys(Pe).length===0)return;const nt=k.getFormFieldValidationError(W,ee);if(nt){O("error"),K(nt);return}O("submitting"),K(null);try{const Ce=await fetch(te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(!Ce.ok){const Ne=await Ce.text();throw new Error(Ne||`Request failed: ${Ce.status}`)}O("success"),se(Object.fromEntries(W.map(Ne=>[Ne.name,""])))}catch(Ce){O("error"),K(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Q}`.trim(),style:we,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ws(r)}}),a.jsxs("form",{onSubmit:Ke,className:`${r}-form`,style:{...$e,height:k.scalingValue(V,t),minHeight:k.scalingValue(V,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:W.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:X[xe.name]??"",onChange:Pe=>se(nt=>({...nt,[xe.name]:Pe.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...ce,paddingRight:k.scalingValue(F.right,t),paddingLeft:k.scalingValue(F.left,t),paddingTop:k.scalingValue(F.top,t),paddingBottom:k.scalingValue(F.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":me,style:{...re,...lt,paddingRight:k.scalingValue(I.right,t),paddingLeft:k.scalingValue(I.left,t),paddingTop:k.scalingValue(I.top,t),paddingBottom:k.scalingValue(I.bottom,t)},children:M==="submitting"?"...":oe?ie&&a.jsx(Xe,{url:ie,className:`${r}-submitBtnIcon`,style:{maxWidth:k.scalingValue(j??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):le})})]}),ae==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ge},children:P}),ae==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ge},role:"alert",children:de??pe??E})]})},js={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"],Vs=`import React, { useMemo, useState } from 'react';
934
+ `}const Ws=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=E.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:p,fieldsToShow:l=1,fontFamily:m,inputFontSettings:c,inputFontSize:T,inputLineHeight:w,inputLetterSpacing:y,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:C,buttonFontSize:b,buttonLineHeight:x,buttonLetterSpacing:A,buttonWordSpacing:V,buttonTextAppearance:j,statusFontSettings:k,statusFontSize:S,statusLineHeight:$,statusLetterSpacing:M,statusWordSpacing:B,statusTextAppearance:W,iconMaxWidth:F,minHeight:H,corners:z,stroke:G,stateOverrides:v,inputPadding:I,buttonPadding:R,successMessage:L="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=e,N=s.slice(0,Math.min(l,s.length)),[J,ce]=g.useState(()=>Object.fromEntries(N.map(xe=>[xe.name,""]))),[te,me]=g.useState("idle"),[f,O]=g.useState(null),oe=o==="success"?"success":o==="error"?"error":te,ne=o==="error"?_:f,ue=o==="filled",q=g.useMemo(()=>{if(!ue)return J;let xe=null;for(const Me of N)(J[Me.name]??"").trim().length>0||(xe=xe??{...J},xe[Me.name]="Filled");return xe??J},[ue,J,N]),se=oe==="error"?E.getFormFieldValidationError(N,q):null,P=o&&o!=="default"?`${r}-state-${o}`:"",h=N.some(xe=>(q[xe.name]??"").trim().length>0),D=P!==`${r}-state-filled`&&h?`${r}-state-filled`:"",Y=`${P} ${D}`.trim(),Q=n==null?void 0:n.submitUrl,le=p??"",ae=(i==null?void 0:i.icon)??"",re=(i==null?void 0:i.mode)==="On",ge=le||"Submit",U={fontSettings:{fontFamily:m,fontWeight:(c==null?void 0:c.fontWeight)??400,fontStyle:(c==null?void 0:c.fontStyle)??"normal"},fontSize:T??.01,lineHeight:w,letterSpacing:y??0,wordSpacing:u??0,textAppearance:d,color:e.inputTextColor??"#111111"},Z={fontSettings:{fontFamily:m,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:x,letterSpacing:A??0,wordSpacing:V??0,textAppearance:j,color:e.buttonTextColor??"#ffffff"},X={fontSettings:{fontFamily:m,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:S??.01,lineHeight:$,letterSpacing:M??0,wordSpacing:B??0,textAppearance:W,color:e.successColor??"#22c55e"},pe=ht(Pe(U,t)),ie=ht(Pe(Z,t)),fe=ht(Pe(X,t)),we=E.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(U==null?void 0:U.color)??"#111111",buttonTextColor:e.buttonTextColor??(Z==null?void 0:Z.color)??"#ffffff"},Hs,Ns,v),$e={borderRadius:E.scalingValue(z,t),borderWidth:E.scalingValue(G,t),borderStyle:"solid"},lt={borderLeftWidth:E.scalingValue(G,t)},Ke=async xe=>{xe.preventDefault();const Me=Object.fromEntries(N.map(Ce=>{var je;return[Ce.name,((je=J[Ce.name])==null?void 0:je.trim())??""]}).filter(([,Ce])=>Ce));if(!Q){me("error"),O("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const nt=E.getFormFieldValidationError(N,J);if(nt){me("error"),O(nt);return}me("submitting"),O(null);try{const Ce=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const je=await Ce.text();throw new Error(je||`Request failed: ${Ce.status}`)}me("success"),ce(Object.fromEntries(N.map(je=>[je.name,""])))}catch(Ce){me("error"),O(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Y}`.trim(),style:we,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ps(r)}}),a.jsxs("form",{onSubmit:Ke,className:`${r}-form`,style:{...$e,height:E.scalingValue(H,t),minHeight:E.scalingValue(H,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:N.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:q[xe.name]??"",onChange:Me=>ce(nt=>({...nt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...pe,paddingRight:E.scalingValue(I.right,t),paddingLeft:E.scalingValue(I.left,t),paddingTop:E.scalingValue(I.top,t),paddingBottom:E.scalingValue(I.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ge,style:{...ie,...lt,paddingRight:E.scalingValue(R.right,t),paddingLeft:E.scalingValue(R.left,t),paddingTop:E.scalingValue(R.top,t),paddingBottom:E.scalingValue(R.bottom,t)},children:te==="submitting"?"...":re?ae&&a.jsx(Xe,{url:ae,className:`${r}-submitBtnIcon`,style:{maxWidth:E.scalingValue(F??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):le})})]}),oe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...fe},children:L}),oe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...fe},role:"alert",children:se??ne??_})]})},Hs={strokeColor:"stroke-color",inputColor:"input-color",placeholderColor:"placeholder-color",buttonColor:"button-color",inputTextColor:"input-text-color",buttonTextColor:"button-text-color",successColor:"success-color",errorColor:"error-color"},Ns=["hover","focus","filled","success","error"],js=`import React, { useMemo, useState } from 'react';
935
935
  import { CommonComponentProps } from '../props';
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1503,23 +1503,13 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1503
1503
  };
1504
1504
 
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1506
- `,Os="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Bs=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ds={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Bs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Os},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...zs],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},qs={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:Ds,sourceCode:Vs},Tn=.5,_o=e=>`
1506
+ `,Vs="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Bs=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Os=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],zs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Bs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Vs},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Os],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ds={element:Ws,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:zs,sourceCode:js};function To(e){return`
1507
1507
  .${e}-marquee-wrapper {
1508
1508
  overflow: hidden;
1509
1509
  width: 100%;
1510
1510
  height: auto;
1511
1511
  }
1512
1512
 
1513
- @keyframes ${e}-marquee-left {
1514
- from { transform: translate3d(0, 0, 0); }
1515
- to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1516
- }
1517
-
1518
- @keyframes ${e}-marquee-right {
1519
- from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1520
- to { transform: translate3d(0, 0, 0); }
1521
- }
1522
-
1523
1513
  .${e}-marquee-track {
1524
1514
  display: flex;
1525
1515
  flex-direction: row;
@@ -1529,25 +1519,14 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1529
1519
  transform: translateZ(0);
1530
1520
  -webkit-backface-visibility: hidden;
1531
1521
  -webkit-transform: translateZ(0);
1532
- animation-duration: var(--marquee-duration);
1533
- animation-timing-function: linear;
1534
- animation-iteration-count: infinite;
1535
- animation-play-state: var(--marquee-play-state, running);
1536
- }
1537
-
1538
- .${e}-marquee-track[data-direction="left"] {
1539
- animation-name: ${e}-marquee-left;
1540
- }
1541
-
1542
- .${e}-marquee-track[data-direction="right"] {
1543
- animation-name: ${e}-marquee-right;
1522
+ perspective: 1000px;
1544
1523
  }
1545
1524
 
1546
1525
  .${e}-marquee-set {
1547
1526
  display: flex;
1548
1527
  flex-direction: row;
1549
1528
  flex: 0 0 auto;
1550
- align-items: center;
1529
+
1551
1530
  }
1552
1531
 
1553
1532
  .${e}-wrapper {
@@ -1590,39 +1569,20 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1590
1569
  pointer-events: auto;
1591
1570
  z-index: 10;
1592
1571
  }
1593
- `,Eo=({index:e,onMeasured:t,...n})=>{const o=g.useRef(null),{src:r}=n;return g.useLayoutEffect(()=>{const s=o.current;if(!s)return;const i=()=>{const d=s.getBoundingClientRect().width;d<=0||t(e,d)};let u=!1;const l=()=>{u||i()};return s.complete?i():s.addEventListener("load",l,{once:!0}),()=>{u=!0,s.removeEventListener("load",l)}},[e,t,r]),a.jsx("img",{ref:o,...n})},Us=30,Gs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=k.useScopedStyles(),{speed:s,direction:i,pauseOnHover:u,gap:l,imageMaxWidth:d,imageMaxHeight:c}=e,T=!o,w=Math.max(0,s)*Us,f=M=>k.scalingValue(M,n??!1),p=g.useRef(null),m=g.useRef(null),S=g.useRef(null),[v,x]=g.useState(0),[_,q]=g.useState(0),[H,L]=g.useState(0),[C,$]=g.useState({}),A=T&&u==="on",[B,R]=g.useState(!1),j=g.useMemo(()=>(t??[]).map(M=>{var O,h;return`${((O=M.image)==null?void 0:O.url)??""}|${((h=M.image)==null?void 0:h.objectFit)??""}`}).join(";"),[t]),V=g.useRef(null);g.useLayoutEffect(()=>{const M=`${j}|${l}|${d}|${c}|${n}`,O=V.current;V.current=M,O!==null&&O!==M&&($({}),q(0))},[j,l,d,c,n]);const z=g.useCallback((M,O)=>{$(h=>h[M]===O?h:{...h,[M]:O})},[]),Y=g.useMemo(()=>{const M=(t==null?void 0:t.length)??0;if(M===0)return!1;for(let O=0;O<M;O++){const h=C[O];if(typeof h!="number"||h<=0)return!1}return!0},[t==null?void 0:t.length,C]),y=g.useCallback(()=>{const M=S.current;if(!M)return;const O=M.getBoundingClientRect().width;O<=0||q(h=>Math.abs(h-O)<Tn?h:O)},[]);g.useLayoutEffect(()=>{if(!T||!Y)return;const M=S.current;if(!M)return;y();const O=new ResizeObserver(()=>{y()});return O.observe(M),()=>{O.disconnect()}},[Y,T,y,l,d,c,n]);const F=g.useMemo(()=>(t==null?void 0:t.length)===0?1:_<=0||v<=0?2:Math.max(2,Math.ceil(v/_)+1),[t==null?void 0:t.length,_,v]);g.useLayoutEffect(()=>{const M=p.current;if(!M)return;const O=()=>{const K=M.getBoundingClientRect().width;x(ae=>ae>0&&Math.abs(ae-K)<Tn?ae:K)};O();const h=new ResizeObserver(O);return h.observe(M),()=>{h.disconnect()}},[]),g.useLayoutEffect(()=>{const M=m.current;if(!M||!T)return;const O=_>0?_:0,h=O>0&&w>0?O/w*1e3:0,K=`${Math.max(0,h)/1e3}s`;M.style.setProperty("--marquee-distance",`${O}px`),M.style.setProperty("--marquee-duration",K)},[T,w,_]),g.useLayoutEffect(()=>{const M=m.current;if(!M)return;const O=()=>{const K=M.getBoundingClientRect().height,ae=K>0?K:0;L(pe=>pe>0&&Math.abs(pe-ae)<Tn?pe:ae)};O();const h=new ResizeObserver(O);return h.observe(M),()=>{h.disconnect()}},[F,t,n,l,d,c]);const I=g.useCallback(()=>{A&&R(!0)},[A]),P=g.useCallback(()=>{A&&R(!1)},[A]),E=g.useMemo(()=>A?{"--marquee-play-state":B?"paused":"running"}:{"--marquee-play-state":"running"},[A,B]),W=(M,O,h)=>{var fe,X,de,N,b,U;const K=f(d),ae=f(c),pe=((fe=M.image)==null?void 0:fe.objectFit)||"contain";return(X=M.image)!=null&&X.url?pe==="cover"?a.jsx("div",{style:{width:K,height:ae,flexShrink:0,lineHeight:0},children:T?a.jsx(Eo,{index:h,onMeasured:z,src:M.image.url,alt:((de=M.image)==null?void 0:de.name)??"",width:K,height:ae,style:{display:"block",pointerEvents:"auto",width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}}):a.jsx("img",{src:M.image.url,alt:((N=M.image)==null?void 0:N.name)??"",width:K,height:ae,style:{display:"block",pointerEvents:"auto",width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}})},O):a.jsx("div",{style:{display:"flex",maxWidth:K,maxHeight:ae,lineHeight:0,flexShrink:0},children:T?a.jsx(Eo,{index:h,onMeasured:z,src:M.image.url,alt:((b=M.image)==null?void 0:b.name)??"",style:{display:"block",pointerEvents:"auto",maxWidth:K,maxHeight:ae,width:"auto",height:"auto"}}):a.jsx("img",{src:M.image.url,alt:((U=M.image)==null?void 0:U.name)??"",style:{display:"block",pointerEvents:"auto",maxWidth:K,maxHeight:ae,width:"auto",height:"auto"}})},O):a.jsx("div",{ref:T?Q=>{if(!Q)return;const te=Q.getBoundingClientRect().width;te>0&&z(h,te)}:void 0,style:{width:K,height:ae,flexShrink:0}},O)},ee=(M,O,h)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[W(M,`card-${O}`,h),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${f(l)})`,width:f(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},O),se=g.useMemo(()=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",...E}),[E]);return T&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:p,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:{overflow:"hidden",width:"100%",...H>0?{height:H}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),a.jsx("div",{ref:m,className:`${r}-marquee-track`,"data-direction":i,onMouseEnter:I,onMouseLeave:P,style:se,children:Array.from({length:F},(M,O)=>a.jsx("div",{ref:O===0?S:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:f(l),paddingRight:f(l)},"aria-hidden":O>0,children:t==null?void 0:t.map((h,K)=>ee(h,`${O}-${K}`,K))},`set-${O}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),a.jsx("div",{style:{gap:f(l),justifyContent:"center",alignItems:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Marquee",children:t==null?void 0:t.map((M,O)=>ee(M,O,O))})]})},Ks=`import {
1594
- useCallback,
1595
- useLayoutEffect,
1596
- useMemo,
1597
- useRef,
1598
- useState,
1599
- type CSSProperties,
1600
- type ImgHTMLAttributes,
1601
- } from 'react';
1572
+ `}const qs=30,Us=12,_o=180,Gs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),{speed:s,direction:i,pauseOnHover:p,gap:l,imageMaxWidth:m,imageMaxHeight:c}=e,T=!o,w=T,y=Math.max(0,s)*qs,u=f=>E.scalingValue(f,n??!1),d=g.useRef(null),C=g.useRef(null),b=g.useRef(null),[x,A]=g.useState(0),[V,j]=g.useState(0),[k,S]=g.useState(0),$=w&&p==="on",[M,B]=g.useState(!1),W=g.useRef(!1),F=g.useRef(0),H=g.useRef(0),z=g.useRef({w:-1,n:0}),G=g.useRef(0),v=g.useRef(0),I=g.useRef(null),R=g.useMemo(()=>(t??[]).map(f=>{var O;return((O=f.image)==null?void 0:O.url)??""}).join("\0"),[t]),L=g.useMemo(()=>(t??[]).filter(f=>{var O;return!!((O=f.image)!=null&&O.url)}).length,[t]),_=g.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:V<=0||x<=0?2:Math.max(2,Math.ceil(x/V)+1),[T,t==null?void 0:t.length,V,x]);g.useLayoutEffect(()=>{v.current=0},[R]),g.useLayoutEffect(()=>{if(!T)return;const f=d.current,O=b.current;if(!f||!O)return;let oe=0;const ne=()=>{const se=f.getBoundingClientRect().width,P=O.getBoundingClientRect().width;P>0&&(H.current=P);const h=O.offsetWidth>0?O.offsetWidth:Math.max(0,Math.round(P));z.current.w!==h?z.current={w:h,n:1}:z.current.n+=1;const D=z.current.n>=Us,Y=L===0||v.current>=L;A(se);const Q=typeof h=="number"&&h>0&&V<=0,le=typeof h=="number"&&h>0&&V>0&&h!==V;if(Q){if(G.current+=1,Y&&(D||G.current>_o)){G.current=0,j(h);return}cancelAnimationFrame(oe),oe=requestAnimationFrame(ne);return}if(le){if(G.current+=1,Y&&(D||G.current>_o)){G.current=0,j(h);return}cancelAnimationFrame(oe),oe=requestAnimationFrame(ne);return}G.current=0},ue=()=>{cancelAnimationFrame(oe),oe=requestAnimationFrame(ne)};I.current=ue,ue();const q=new ResizeObserver(ue);return q.observe(f),q.observe(O),()=>{I.current=null,cancelAnimationFrame(oe),q.disconnect()}},[T,L,V]),g.useEffect(()=>{W.current=M},[M]),g.useLayoutEffect(()=>{if(!T||!w)return;const f=C.current,O=b.current;if(!f||!O||V<=0||y<=0)return;if(H.current<=0){const se=O.getBoundingClientRect().width;se>0&&(H.current=se)}const oe=H.current>0?H.current:V;i==="right"&&F.current>=0?F.current=-oe:i==="left"&&F.current>0&&(F.current=0);let ne=0,ue=0;const q=se=>{ue===0&&(ue=se);const P=Math.min(100,se-ue)/1e3;if(ue=se,!($&&W.current)){const D=y*P;F.current+=i==="left"?-D:D;const Y=H.current>0?H.current:V;Y>0&&(i==="left"&&F.current<=-Y?F.current+=Y:i==="right"&&F.current>=0&&(F.current-=Y)),f.style.transform=`translate3d(${F.current}px, 0, 0)`}ne=requestAnimationFrame(q)};return f.style.transform=`translate3d(${F.current}px, 0, 0)`,ne=requestAnimationFrame(q),()=>{cancelAnimationFrame(ne)}},[T,w,y,i,V,$]),g.useLayoutEffect(()=>{if(!T){S(0);return}if(V<=0){S(0);return}const f=C.current;if(!f)return;const O=()=>{const ne=f.getBoundingClientRect().height;S(ne>0?ne:0)};O();const oe=new ResizeObserver(O);return oe.observe(f),()=>{oe.disconnect()}},[T,_,t,n,l,m,c,V]);const N=()=>{$&&B(!0)},J=()=>{$&&B(!1)},ce=()=>{var f;v.current=Math.min(L,v.current+1),(f=I.current)==null||f.call(I)},te=(f,O,oe)=>{var ue,q,se,P;const ne=((ue=f==null?void 0:f.image)==null?void 0:ue.objectFit)==="contain";return a.jsx("div",{style:{...ne?{maxWidth:u(m)}:{width:u(m)},height:u(c)},children:((q=f.image)==null?void 0:q.url)&&a.jsx("img",{src:f.image.url,alt:((se=f.image)==null?void 0:se.name)??"",style:{pointerEvents:"auto",height:"100%",...ne?{width:"auto",maxWidth:"100%"}:{width:"100%"},objectFit:((P=f.image)==null?void 0:P.objectFit)||"contain"},onLoad:oe?ce:void 0,onError:oe?ce:void 0})},O)},me=(f,O,oe)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[te(f,`card-${O}`,oe),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${u(l)})`,width:u(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},O);return T&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:d,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:{overflow:"hidden",width:"100%",...V>0&&k>0?{height:k}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{ref:C,className:`${r}-marquee-track`,"data-direction":i,onMouseEnter:N,onMouseLeave:J,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px"},children:Array.from({length:_},(f,O)=>a.jsx("div",{ref:O===0?b:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:u(l),paddingRight:u(l)},"aria-hidden":O>0,children:t==null?void 0:t.map((oe,ne)=>me(oe,`${O}-${ne}`,O===0))},`set-${O}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{style:{gap:u(l),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Marquee",children:t==null?void 0:t.map((f,O)=>me(f,O))})]})},Ks=`import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1602
1573
  import cn from 'classnames';
1603
1574
  import { CommonComponentProps } from '../props';
1604
1575
  import { scalingValue } from '../utils/scalingValue';
1605
1576
  import { useScopedStyles } from '../utils/useScopedStyles';
1606
1577
 
1607
- const LAYOUT_EPSILON = 0.5;
1608
-
1609
- const getCSS = (P: string): string => \`
1578
+ function getCSS(P: string): string {
1579
+ return \`
1610
1580
  .\${P}-marquee-wrapper {
1611
1581
  overflow: hidden;
1612
1582
  width: 100%;
1613
1583
  height: auto;
1614
1584
  }
1615
1585
 
1616
- @keyframes \${P}-marquee-left {
1617
- from { transform: translate3d(0, 0, 0); }
1618
- to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1619
- }
1620
-
1621
- @keyframes \${P}-marquee-right {
1622
- from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
1623
- to { transform: translate3d(0, 0, 0); }
1624
- }
1625
-
1626
1586
  .\${P}-marquee-track {
1627
1587
  display: flex;
1628
1588
  flex-direction: row;
@@ -1632,25 +1592,14 @@ const getCSS = (P: string): string => \`
1632
1592
  transform: translateZ(0);
1633
1593
  -webkit-backface-visibility: hidden;
1634
1594
  -webkit-transform: translateZ(0);
1635
- animation-duration: var(--marquee-duration);
1636
- animation-timing-function: linear;
1637
- animation-iteration-count: infinite;
1638
- animation-play-state: var(--marquee-play-state, running);
1639
- }
1640
-
1641
- .\${P}-marquee-track[data-direction="left"] {
1642
- animation-name: \${P}-marquee-left;
1643
- }
1644
-
1645
- .\${P}-marquee-track[data-direction="right"] {
1646
- animation-name: \${P}-marquee-right;
1595
+ perspective: 1000px;
1647
1596
  }
1648
1597
 
1649
1598
  .\${P}-marquee-set {
1650
1599
  display: flex;
1651
1600
  flex-direction: row;
1652
1601
  flex: 0 0 auto;
1653
- align-items: center;
1602
+
1654
1603
  }
1655
1604
 
1656
1605
  .\${P}-wrapper {
@@ -1694,45 +1643,7 @@ const getCSS = (P: string): string => \`
1694
1643
  z-index: 10;
1695
1644
  }
1696
1645
  \`;
1697
-
1698
- type MarqueeMeasuredImgProps = ImgHTMLAttributes<HTMLImageElement> & {
1699
- index: number;
1700
- onMeasured: (index: number, width: number) => void;
1701
- };
1702
-
1703
- const MarqueeMeasuredImg = ({ index, onMeasured, ...imgProps }: MarqueeMeasuredImgProps) => {
1704
- const imgRef = useRef<HTMLImageElement | null>(null);
1705
- const { src } = imgProps;
1706
-
1707
- useLayoutEffect(() => {
1708
- const node = imgRef.current;
1709
- if (!node) return;
1710
-
1711
- const measure = () => {
1712
- const w = node.getBoundingClientRect().width;
1713
- if (w <= 0) return;
1714
- onMeasured(index, w);
1715
- };
1716
-
1717
- let canceled = false;
1718
- const onLoad = () => {
1719
- if (!canceled) measure();
1720
- };
1721
-
1722
- if (node.complete) {
1723
- measure();
1724
- } else {
1725
- node.addEventListener('load', onLoad, { once: true });
1726
- }
1727
-
1728
- return () => {
1729
- canceled = true;
1730
- node.removeEventListener('load', onLoad);
1731
- };
1732
- }, [index, onMeasured, src]);
1733
-
1734
- return <img ref={imgRef} {...imgProps} />;
1735
- };
1646
+ }
1736
1647
 
1737
1648
  type MarqueeProps = {
1738
1649
  settings: MarqueeSettings;
@@ -1742,11 +1653,14 @@ type MarqueeProps = {
1742
1653
  } & CommonComponentProps;
1743
1654
 
1744
1655
  const PX_PER_SEC_PER_SPEED_UNIT = 30;
1656
+ const SET_WIDTH_STREAK_MIN = 12;
1657
+ const SET_WIDTH_RAF_FALLBACK = 180;
1745
1658
 
1746
1659
  export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeProps) => {
1747
1660
  const { prefix: P } = useScopedStyles();
1748
1661
  const { speed, direction, pauseOnHover, gap, imageMaxWidth, imageMaxHeight } = settings;
1749
- const isAnimating = !isPreviewMode;
1662
+ const autoplayEnabled = !isPreviewMode;
1663
+ const isAnimating = autoplayEnabled;
1750
1664
  const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
1751
1665
  const scaled = (v: number) => scalingValue(v, isEditor ?? false);
1752
1666
  const wrapperRef = useRef<HTMLDivElement | null>(null);
@@ -1755,106 +1669,177 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1755
1669
  const [containerWidth, setContainerWidth] = useState(0);
1756
1670
  const [setWidth, setSetWidth] = useState(0);
1757
1671
  const [trackHeight, setTrackHeight] = useState(0);
1758
- const [itemWidths, setItemWidths] = useState<Record<number, number>>({});
1759
1672
  const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
1760
1673
  const [isHovering, setIsHovering] = useState(false);
1761
-
1762
- const contentMeasureKey = useMemo(
1763
- () => (content ?? []).map((c) => \`\${c.image?.url ?? ''}|\${c.image?.objectFit ?? ''}\`).join(';'),
1674
+ const isHoveringRef = useRef(false);
1675
+ const offsetRef = useRef(0);
1676
+ const loopWidthRef = useRef(0);
1677
+ const widthStreakRef = useRef<{ w: number; n: number }>({ w: -1, n: 0 });
1678
+ const settleFramesRef = useRef(0);
1679
+ const loadedFirstSetImagesRef = useRef(0);
1680
+ const scheduleRemeasureRef = useRef<(() => void) | null>(null);
1681
+ const contentImageUrlsKey = useMemo(
1682
+ () => (content ?? []).map((i) => i.image?.url ?? '').join('\\0'),
1683
+ [content],
1684
+ );
1685
+ const firstSetImageUrlCount = useMemo(
1686
+ () => (content ?? []).filter((i) => Boolean(i.image?.url)).length,
1764
1687
  [content],
1765
1688
  );
1766
-
1767
- const prevMeasuredLayoutFingerprintRef = useRef<string | null>(null);
1768
- useLayoutEffect(() => {
1769
- const fingerprint = \`\${contentMeasureKey}|\${gap}|\${imageMaxWidth}|\${imageMaxHeight}|\${isEditor}\`;
1770
- const prev = prevMeasuredLayoutFingerprintRef.current;
1771
- prevMeasuredLayoutFingerprintRef.current = fingerprint;
1772
- if (prev === null) return;
1773
- if (prev !== fingerprint) {
1774
- setItemWidths({});
1775
- setSetWidth(0);
1776
- }
1777
- }, [contentMeasureKey, gap, imageMaxWidth, imageMaxHeight, isEditor]);
1778
-
1779
- const onItemMeasured = useCallback((index: number, width: number) => {
1780
- setItemWidths((prev) => {
1781
- if (prev[index] === width) return prev;
1782
- return { ...prev, [index]: width };
1783
- });
1784
- }, []);
1785
-
1786
- const allItemWidthsKnown = useMemo(() => {
1787
- const len = content?.length ?? 0;
1788
- if (len === 0) return false;
1789
- for (let i = 0; i < len; i++) {
1790
- const w = itemWidths[i];
1791
- if (typeof w !== 'number' || w <= 0) return false;
1792
- }
1793
- return true;
1794
- }, [content?.length, itemWidths]);
1795
-
1796
- const applySetWidthFromDom = useCallback(() => {
1797
- const set = setRef.current;
1798
- if (!set) return;
1799
- const next = set.getBoundingClientRect().width;
1800
- if (next <= 0) return;
1801
- setSetWidth((prev) => (Math.abs(prev - next) < LAYOUT_EPSILON ? prev : next));
1802
- }, []);
1803
-
1804
- useLayoutEffect(() => {
1805
- if (!isAnimating || !allItemWidthsKnown) return;
1806
- const set = setRef.current;
1807
- if (!set) return;
1808
- applySetWidthFromDom();
1809
- const ro = new ResizeObserver(() => {
1810
- applySetWidthFromDom();
1811
- });
1812
- ro.observe(set);
1813
- return () => {
1814
- ro.disconnect();
1815
- };
1816
- }, [allItemWidthsKnown, isAnimating, applySetWidthFromDom, gap, imageMaxWidth, imageMaxHeight, isEditor]);
1817
-
1818
1689
  const copies = useMemo(() => {
1819
- if (content?.length === 0) return 1;
1690
+ if (!autoplayEnabled || content?.length === 0) return 1;
1820
1691
  if (setWidth <= 0 || containerWidth <= 0) return 2;
1821
1692
  return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
1822
- }, [content?.length, setWidth, containerWidth]);
1693
+ }, [autoplayEnabled, content?.length, setWidth, containerWidth]);
1823
1694
 
1824
1695
  useLayoutEffect(() => {
1696
+ loadedFirstSetImagesRef.current = 0;
1697
+ }, [contentImageUrlsKey]);
1698
+
1699
+ useLayoutEffect(() => {
1700
+ if (!autoplayEnabled) return;
1825
1701
  const wrapper = wrapperRef.current;
1826
- if (!wrapper) return;
1702
+ const set = setRef.current;
1703
+ if (!wrapper || !set) return;
1704
+ let raf = 0;
1827
1705
  const measure = () => {
1828
1706
  const nextContainerWidth = wrapper.getBoundingClientRect().width;
1829
- setContainerWidth((prev) =>
1830
- prev > 0 && Math.abs(prev - nextContainerWidth) < LAYOUT_EPSILON ? prev : nextContainerWidth
1831
- );
1707
+ const rectW = set.getBoundingClientRect().width;
1708
+ if (rectW > 0) loopWidthRef.current = rectW;
1709
+ const nextRawSetWidth =
1710
+ set.offsetWidth > 0 ? set.offsetWidth : Math.max(0, Math.round(rectW));
1711
+ if (widthStreakRef.current.w !== nextRawSetWidth) {
1712
+ widthStreakRef.current = { w: nextRawSetWidth, n: 1 };
1713
+ } else {
1714
+ widthStreakRef.current.n += 1;
1715
+ }
1716
+ const streakOk = widthStreakRef.current.n >= SET_WIDTH_STREAK_MIN;
1717
+ const imagesOk =
1718
+ firstSetImageUrlCount === 0 ||
1719
+ loadedFirstSetImagesRef.current >= firstSetImageUrlCount;
1720
+ setContainerWidth(nextContainerWidth);
1721
+ const initialPending =
1722
+ typeof nextRawSetWidth === 'number' && nextRawSetWidth > 0 && setWidth <= 0;
1723
+ const updatePending =
1724
+ typeof nextRawSetWidth === 'number' &&
1725
+ nextRawSetWidth > 0 &&
1726
+ setWidth > 0 &&
1727
+ nextRawSetWidth !== setWidth;
1728
+ if (initialPending) {
1729
+ settleFramesRef.current += 1;
1730
+ const canCommit =
1731
+ imagesOk &&
1732
+ (streakOk || settleFramesRef.current > SET_WIDTH_RAF_FALLBACK);
1733
+ if (canCommit) {
1734
+ settleFramesRef.current = 0;
1735
+ setSetWidth(nextRawSetWidth);
1736
+ return;
1737
+ }
1738
+ cancelAnimationFrame(raf);
1739
+ raf = requestAnimationFrame(measure);
1740
+ return;
1741
+ }
1742
+ if (updatePending) {
1743
+ settleFramesRef.current += 1;
1744
+ const canUpdate =
1745
+ imagesOk &&
1746
+ (streakOk || settleFramesRef.current > SET_WIDTH_RAF_FALLBACK);
1747
+ if (canUpdate) {
1748
+ settleFramesRef.current = 0;
1749
+ setSetWidth(nextRawSetWidth);
1750
+ return;
1751
+ }
1752
+ cancelAnimationFrame(raf);
1753
+ raf = requestAnimationFrame(measure);
1754
+ return;
1755
+ }
1756
+ settleFramesRef.current = 0;
1832
1757
  };
1833
- measure();
1834
- const ro = new ResizeObserver(measure);
1758
+ const schedule = () => {
1759
+ cancelAnimationFrame(raf);
1760
+ raf = requestAnimationFrame(measure);
1761
+ };
1762
+ scheduleRemeasureRef.current = schedule;
1763
+ schedule();
1764
+ const ro = new ResizeObserver(schedule);
1835
1765
  ro.observe(wrapper);
1766
+ ro.observe(set);
1836
1767
  return () => {
1768
+ scheduleRemeasureRef.current = null;
1769
+ cancelAnimationFrame(raf);
1837
1770
  ro.disconnect();
1838
1771
  };
1839
- }, []);
1772
+ }, [autoplayEnabled, firstSetImageUrlCount, setWidth]);
1773
+
1774
+ useEffect(() => {
1775
+ isHoveringRef.current = isHovering;
1776
+ }, [isHovering]);
1840
1777
 
1841
1778
  useLayoutEffect(() => {
1779
+ if (!autoplayEnabled || !isAnimating) return;
1842
1780
  const track = trackRef.current;
1843
- if (!track || !isAnimating) return;
1844
- const safeSetWidth = setWidth > 0 ? setWidth : 0;
1845
- const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
1846
- const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
1847
- track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
1848
- track.style.setProperty('--marquee-duration', durationS);
1849
- }, [isAnimating, pxPerSec, setWidth]);
1781
+ const set = setRef.current;
1782
+ if (!track || !set) return;
1783
+ if (setWidth <= 0 || pxPerSec <= 0) return;
1784
+
1785
+ if (loopWidthRef.current <= 0) {
1786
+ const rectW = set.getBoundingClientRect().width;
1787
+ if (rectW > 0) loopWidthRef.current = rectW;
1788
+ }
1789
+ const initialW = loopWidthRef.current > 0 ? loopWidthRef.current : setWidth;
1790
+
1791
+ if (direction === 'right' && offsetRef.current >= 0) {
1792
+ offsetRef.current = -initialW;
1793
+ } else if (direction === 'left' && offsetRef.current > 0) {
1794
+ offsetRef.current = 0;
1795
+ }
1796
+
1797
+ let raf = 0;
1798
+ let lastTime = 0;
1799
+ const tick = (now: number) => {
1800
+ if (lastTime === 0) lastTime = now;
1801
+ const dt = Math.min(100, now - lastTime) / 1000;
1802
+ lastTime = now;
1803
+ const paused = hoverPauseEnabled && isHoveringRef.current;
1804
+ if (!paused) {
1805
+ const delta = pxPerSec * dt;
1806
+ offsetRef.current += direction === 'left' ? -delta : delta;
1807
+ const liveW = loopWidthRef.current > 0 ? loopWidthRef.current : setWidth;
1808
+ if (liveW > 0) {
1809
+ if (direction === 'left' && offsetRef.current <= -liveW) {
1810
+ offsetRef.current += liveW;
1811
+ } else if (direction === 'right' && offsetRef.current >= 0) {
1812
+ offsetRef.current -= liveW;
1813
+ }
1814
+ }
1815
+ track.style.transform = \`translate3d(\${offsetRef.current}px, 0, 0)\`;
1816
+ }
1817
+ raf = requestAnimationFrame(tick);
1818
+ };
1819
+
1820
+ track.style.transform = \`translate3d(\${offsetRef.current}px, 0, 0)\`;
1821
+ raf = requestAnimationFrame(tick);
1822
+
1823
+ return () => {
1824
+ cancelAnimationFrame(raf);
1825
+ };
1826
+ }, [autoplayEnabled, isAnimating, pxPerSec, direction, setWidth, hoverPauseEnabled]);
1850
1827
 
1851
1828
  useLayoutEffect(() => {
1829
+ if (!autoplayEnabled) {
1830
+ setTrackHeight(0);
1831
+ return;
1832
+ }
1833
+ if (setWidth <= 0) {
1834
+ setTrackHeight(0);
1835
+ return;
1836
+ }
1852
1837
  const track = trackRef.current;
1853
1838
  if (!track) return;
1854
1839
  const measure = () => {
1855
1840
  const next = track.getBoundingClientRect().height;
1856
- const useH = next > 0 ? next : 0;
1857
- setTrackHeight((prev) => (prev > 0 && Math.abs(prev - useH) < LAYOUT_EPSILON ? prev : useH));
1841
+ setTrackHeight(next > 0 ? next : 0);
1842
+
1858
1843
  };
1859
1844
  measure();
1860
1845
  const ro = new ResizeObserver(measure);
@@ -1862,138 +1847,69 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
1862
1847
  return () => {
1863
1848
  ro.disconnect();
1864
1849
  };
1865
- }, [copies, content, isEditor, gap, imageMaxWidth, imageMaxHeight]);
1850
+ }, [autoplayEnabled, copies, content, isEditor, gap, imageMaxWidth, imageMaxHeight, setWidth]);
1866
1851
 
1867
- const onTrackEnter = useCallback(() => {
1852
+ const onTrackEnter = () => {
1868
1853
  if (!hoverPauseEnabled) return;
1869
1854
  setIsHovering(true);
1870
- }, [hoverPauseEnabled]);
1871
-
1872
- const onTrackLeave = useCallback(() => {
1855
+ };
1856
+ const onTrackLeave = () => {
1873
1857
  if (!hoverPauseEnabled) return;
1874
1858
  setIsHovering(false);
1875
- }, [hoverPauseEnabled]);
1859
+ };
1876
1860
 
1877
- const marqueePlayStateStyle = useMemo((): CSSProperties => {
1878
- if (!hoverPauseEnabled) {
1879
- return { '--marquee-play-state': 'running' } as CSSProperties;
1880
- }
1881
- return {
1882
- '--marquee-play-state': isHovering ? 'paused' : 'running',
1883
- } as CSSProperties;
1884
- }, [hoverPauseEnabled, isHovering]);
1885
-
1886
- const renderCard = (item: MarqueeItem, key: string | number, index: number) => {
1887
- const maxW = scaled(imageMaxWidth);
1888
- const maxH = scaled(imageMaxHeight);
1889
- const objectFit = item.image?.objectFit || 'contain';
1890
-
1891
- if (!item.image?.url) {
1892
- return (
1893
- <div
1894
- key={key}
1895
- ref={
1896
- isAnimating
1897
- ? (node) => {
1898
- if (!node) return;
1899
- const w = node.getBoundingClientRect().width;
1900
- if (w > 0) onItemMeasured(index, w);
1901
- }
1902
- : undefined
1903
- }
1904
- style={{ width: maxW, height: maxH, flexShrink: 0 }}
1905
- />
1906
- );
1907
- }
1861
+ const onFirstSetImageDone = () => {
1862
+ loadedFirstSetImagesRef.current = Math.min(
1863
+ firstSetImageUrlCount,
1864
+ loadedFirstSetImagesRef.current + 1,
1865
+ );
1866
+ scheduleRemeasureRef.current?.();
1867
+ };
1908
1868
 
1909
- if (objectFit === 'cover') {
1910
- return (
1911
- <div key={key} style={{ width: maxW, height: maxH, flexShrink: 0, lineHeight: 0 }}>
1912
- {isAnimating ? (
1913
- <MarqueeMeasuredImg
1914
- index={index}
1915
- onMeasured={onItemMeasured}
1916
- src={item.image.url}
1917
- alt={item.image?.name ?? ''}
1918
- width={maxW}
1919
- height={maxH}
1920
- style={{
1921
- display: 'block',
1922
- pointerEvents: 'auto',
1923
- width: '100%',
1924
- height: '100%',
1925
- objectFit: 'cover',
1926
- objectPosition: 'center',
1927
- }}
1928
- />
1929
- ) : (
1930
- <img
1931
- src={item.image.url}
1932
- alt={item.image?.name ?? ''}
1933
- width={maxW}
1934
- height={maxH}
1935
- style={{
1936
- display: 'block',
1937
- pointerEvents: 'auto',
1938
- width: '100%',
1939
- height: '100%',
1940
- objectFit: 'cover',
1941
- objectPosition: 'center',
1942
- }}
1943
- />
1944
- )}
1945
- </div>
1946
- );
1947
- }
1869
+ const renderCard = (item: MarqueeItem, key: string | number, isFirstSet?: boolean) => {
1870
+ const isContain = item?.image?.objectFit === 'contain';
1948
1871
  return (
1949
1872
  <div
1950
1873
  key={key}
1951
1874
  style={{
1952
- display: 'flex',
1953
- maxWidth: maxW,
1954
- maxHeight: maxH,
1955
- lineHeight: 0,
1956
- flexShrink: 0,
1875
+ ...(isContain ? { maxWidth: scaled(imageMaxWidth) } : { width: scaled(imageMaxWidth) }),
1876
+ height: scaled(imageMaxHeight),
1957
1877
  }}
1958
1878
  >
1959
- {isAnimating ? (
1960
- <MarqueeMeasuredImg
1961
- index={index}
1962
- onMeasured={onItemMeasured}
1879
+ {item.image?.url && (
1880
+ <img
1963
1881
  src={item.image.url}
1964
1882
  alt={item.image?.name ?? ''}
1965
1883
  style={{
1966
- display: 'block',
1967
1884
  pointerEvents: 'auto',
1968
- maxWidth: maxW,
1969
- maxHeight: maxH,
1970
- width: 'auto',
1971
- height: 'auto',
1885
+ height: '100%',
1886
+ ...(isContain
1887
+ ? { width: 'auto', maxWidth: '100%' }
1888
+ : { width: '100%' }),
1889
+ objectFit: item.image?.objectFit || 'contain',
1972
1890
  }}
1891
+ onLoad={isFirstSet ? onFirstSetImageDone : undefined}
1892
+ onError={isFirstSet ? onFirstSetImageDone : undefined}
1973
1893
  />
1974
- ) : (
1975
- <img src={item.image.url} alt={item.image?.name ?? ''} style={{
1976
- display: 'block',
1977
- pointerEvents: 'auto',
1978
- maxWidth: maxW,
1979
- maxHeight: maxH,
1980
- width: 'auto',
1981
- height: 'auto',
1982
- }} />
1983
1894
  )}
1984
1895
  </div>
1985
1896
  );
1986
1897
  };
1987
1898
 
1988
- const renderCardWrapper = (item: MarqueeItem, key: string | number, index: number) => (
1899
+ const renderCardWrapper = (item: MarqueeItem, key: string | number, isFirstSet?: boolean) => (
1989
1900
  <div
1990
1901
  key={key}
1991
1902
  style={{
1992
1903
  position: 'relative',
1993
1904
  flex: '0 0 auto',
1905
+ height: '100%',
1906
+ transform: 'translateZ(0)',
1907
+ backfaceVisibility: 'hidden',
1908
+ WebkitBackfaceVisibility: 'hidden',
1909
+ willChange: 'transform',
1994
1910
  }}
1995
1911
  >
1996
- {renderCard(item, \`card-\${key}\`, index)}
1912
+ {renderCard(item, \`card-\${key}\`, isFirstSet)}
1997
1913
  {isEditor && (
1998
1914
  <div
1999
1915
  data-controls="gap"
@@ -2012,23 +1928,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2012
1928
  </div>
2013
1929
  );
2014
1930
 
2015
- const trackMotionStyle = useMemo(
2016
- (): CSSProperties => ({
2017
- display: 'flex',
2018
- flexDirection: 'row',
2019
- flexWrap: 'nowrap',
2020
- width: 'max-content',
2021
- willChange: 'transform',
2022
- backfaceVisibility: 'hidden',
2023
- WebkitBackfaceVisibility: 'hidden',
2024
- transform: 'translateZ(0)',
2025
- WebkitTransform: 'translateZ(0)',
2026
- ...marqueePlayStateStyle,
2027
- }),
2028
- [marqueePlayStateStyle],
2029
- );
2030
-
2031
- if (isAnimating && (content?.length ?? 0) > 0) {
1931
+ if (autoplayEnabled && (content?.length ?? 0) > 0) {
2032
1932
  return (
2033
1933
  <div
2034
1934
  ref={wrapperRef}
@@ -2037,7 +1937,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2037
1937
  style={{
2038
1938
  overflow: 'hidden',
2039
1939
  width: '100%',
2040
- ...(trackHeight > 0 ? { height: trackHeight } : {}),
1940
+ ...(setWidth > 0 && trackHeight > 0 ? { height: trackHeight } : {}),
2041
1941
  }}
2042
1942
  >
2043
1943
  <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
@@ -2047,7 +1947,18 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2047
1947
  data-direction={direction}
2048
1948
  onMouseEnter={onTrackEnter}
2049
1949
  onMouseLeave={onTrackLeave}
2050
- style={trackMotionStyle}
1950
+ style={{
1951
+ display: 'flex',
1952
+ flexDirection: 'row',
1953
+ flexWrap: 'nowrap',
1954
+ width: 'max-content',
1955
+ willChange: 'transform',
1956
+ backfaceVisibility: 'hidden',
1957
+ WebkitBackfaceVisibility: 'hidden',
1958
+ transform: 'translateZ(0)',
1959
+ WebkitTransform: 'translateZ(0)',
1960
+ perspective: '1000px',
1961
+ }}
2051
1962
  >
2052
1963
  {Array.from({ length: copies }, (_, copyIndex) => (
2053
1964
  <div
@@ -2064,7 +1975,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2064
1975
  aria-hidden={copyIndex > 0}
2065
1976
  >
2066
1977
  {content?.map((item: MarqueeItem, index: number) =>
2067
- renderCardWrapper(item, \`\${copyIndex}-\${index}\`, index)
1978
+ renderCardWrapper(item, \`\${copyIndex}-\${index}\`, copyIndex === 0)
2068
1979
  )}
2069
1980
  </div>
2070
1981
  ))}
@@ -2080,14 +1991,15 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
2080
1991
  style={{
2081
1992
  gap: scaled(gap),
2082
1993
  justifyContent: 'center',
2083
- alignItems: 'center',
2084
1994
  overflowX: 'auto',
2085
1995
  display: 'flex',
2086
1996
  flexDirection: 'row',
2087
1997
  }}
2088
1998
  aria-label="Marquee"
2089
1999
  >
2090
- {content?.map((item: MarqueeItem, index: number) => renderCardWrapper(item, index, index))}
2000
+ {content?.map((item: MarqueeItem, index: number) =>
2001
+ renderCardWrapper(item, index)
2002
+ )}
2091
2003
  </div>
2092
2004
  </div>
2093
2005
  );
@@ -2109,7 +2021,7 @@ export type MarqueeSettings = {
2109
2021
  imageMaxWidth: number;
2110
2022
  imageMaxHeight: number;
2111
2023
  };
2112
- `,Ys={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:0,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:0,max:400,display:{type:"range-control"}}},defaults:{direction:"left",pauseOnHover:"off"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[],layout:["__componentName__","speed","direction","pauseOnHover","gap","imageMaxWidth","imageMaxHeight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["imageMaxWidth","speed"]},{type:"row",items:["imageMaxHeight","pauseOnHover"]},{type:"row",items:["direction"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}}}},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""}}]}},Xs={element:Gs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Ys,sourceCode:Ks,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function ko(e){return`
2024
+ `,Ys={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,max:400,display:{type:"range-control"}}},defaults:{direction:"left",pauseOnHover:"off"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[],layout:["__componentName__","speed","direction","pauseOnHover","gap","imageMaxWidth","imageMaxHeight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["imageMaxWidth","speed"]},{type:"row",items:["imageMaxHeight","pauseOnHover"]},{type:"row",items:["direction"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""}}]}},Xs={element:Gs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Ys,sourceCode:Ks,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Eo(e){return`
2113
2025
  .${e}-marquee-wrapper {
2114
2026
  overflow: hidden;
2115
2027
  width: 100%;
@@ -2196,7 +2108,7 @@ export type MarqueeSettings = {
2196
2108
  pointer-events: auto;
2197
2109
  z-index: 10;
2198
2110
  }
2199
- `}const Zs=30,Js=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=k.useScopedStyles(),{autoplay:s,align:i,speed:u,direction:l,pauseOnHover:d,gap:c,cardWidth:T,corners:w,stroke:f,strokeColor:p,bgColor:m,padding:S,logoMarginTop:v,logoWidth:x,logoHeight:_,captionMarginTop:q}=e,H=s==="on"&&!o,L=H,C=Math.max(0,u)*Zs,$=D=>k.scalingValue(D,n??!1),A=g.useRef(null),B=g.useRef(null),R=g.useRef(null),[j,V]=g.useState(0),[z,Y]=g.useState(0),[y,F]=g.useState(0),I=L&&d==="on",[P,E]=g.useState(!1),W=g.useRef(null),[ee,se]=g.useState(0),[M,O]=g.useState(0),h=g.useRef(null),K=D=>{var Z,ce,re,ge,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${D}FontFamily`])??"Arial",fontWeight:((Z=e==null?void 0:e[`${D}FontSettings`])==null?void 0:Z.fontWeight)??400,fontStyle:((ce=e==null?void 0:e[`${D}FontSettings`])==null?void 0:ce.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((ge=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:ge.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${D}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${D}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${D}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${D}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${D}LineHeight`])??.01,color:(e==null?void 0:e[`${D}Color`])??"#000000"}},ae=K("text"),pe=K("caption"),fe=g.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(D=>{var J,Z;return(((J=D.text)==null?void 0:J.length)??0)>0||(((Z=D.caption)==null?void 0:Z.length)??0)>0}),[t]),X=g.useMemo(()=>!H||(t==null?void 0:t.length)===0?1:z<=0||j<=0?2:Math.max(2,Math.ceil(j/z)+1),[H,t==null?void 0:t.length,z,j]);g.useLayoutEffect(()=>{if(!H)return;const D=A.current,J=R.current;if(!D||!J)return;let Z=0;const ce=()=>{const we=D.getBoundingClientRect().width,$e=J.getBoundingClientRect().width,lt=h.current,Ke=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(h.current=$e,V(we),typeof $e=="number"&&$e>0&&z<=0){Y($e);return}Ke&&$e!==z?Y($e):!Ke&&z<=0&&(cancelAnimationFrame(Z),Z=requestAnimationFrame(ce))},re=()=>{cancelAnimationFrame(Z),Z=requestAnimationFrame(ce)};re();const ge=new ResizeObserver(re);return ge.observe(D),ge.observe(J),()=>{cancelAnimationFrame(Z),ge.disconnect()}},[H,z]),g.useLayoutEffect(()=>{const D=B.current;if(!H||!D||!L)return;const J=z>0?z:0,Z=J>0&&C>0?J/C*1e3:0,ce=`${Math.max(0,Z)/1e3}s`;D.style.setProperty("--marquee-distance",`${J}px`),D.style.setProperty("--marquee-duration",ce)},[H,L,C,z]),g.useLayoutEffect(()=>{if(!H){F(0);return}const D=B.current;if(!D)return;const J=()=>{const ce=D.getBoundingClientRect().height;F(ce>0?ce:0)};J();const Z=new ResizeObserver(J);return Z.observe(D),()=>{Z.disconnect()}},[H,X,t,n,c,T,S,f,w,x,_]);const de=()=>{I&&E(!0)},N=()=>{I&&E(!1)},b=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),U=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Q=g.useCallback((D,J,Z,ce)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:b,width:"100%"},children:[a.jsx("div",{"data-controls":ce==null?void 0:ce.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:$((ce==null?void 0:ce.marginTop)??0)}}),a.jsx("div",{...ce!=null&&ce.dataMeasureKind?{"data-testimonial-measure":ce.dataMeasureKind}:{},style:{...Re(D,n),textAlign:U,pointerEvents:"auto",...typeof(ce==null?void 0:ce.minHeightPx)=="number"&&ce.minHeightPx>0?{minHeight:ce.minHeightPx}:{}},children:a.jsx(Pt,{content:J})})]},Z),[b,U,n]),te=g.useCallback((D,J,Z)=>{var ce,re,ge;return a.jsxs("div",{style:{padding:`${$(S.top)} ${$(S.right)} ${$(S.bottom)} ${$(S.left)}`,width:$(T+f*2),height:"100%",borderRadius:$(w),border:`${$(f)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:m}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:b,textAlign:U},children:[D.text&&Q(ae,D.text,"text",Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Z==null?void 0:Z.textMinHeightPx)=="number"&&Z.textMinHeightPx>0?{minHeightPx:Z.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:b,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:$(v)}}),a.jsx("div",{style:{width:$(x),height:$(_)},children:((ce=D.logo)==null?void 0:ce.url)&&a.jsx("img",{src:D.logo.url,alt:((re=D.logo)==null?void 0:re.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((ge=D.logo)==null?void 0:ge.objectFit)||"contain"}})})]}),D.caption&&Q(pe,D.caption,"caption",{controlsName:"captionMarginTop",marginTop:q,...Z!=null&&Z.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Z==null?void 0:Z.captionMinHeightPx)=="number"&&Z.captionMinHeightPx>0?{minHeightPx:Z.captionMinHeightPx}:{}})]})]},J)},[m,q,pe,T,w,_,v,x,b,U,S.bottom,S.left,S.right,S.top,Q,f,p,ae,n]),le=g.useCallback(D=>{se(D.maxTextPx),O(D.maxCaptionPx)},[]);g.useLayoutEffect(()=>{if(!fe){le({maxTextPx:0,maxCaptionPx:0});return}const D=W.current;if(!D)return;const J=()=>{k.readTestimonialTextMeasure(D,le)};J();const Z=new ResizeObserver(J);return Z.observe(D),()=>{Z.disconnect()}},[fe,le,t,te]);const ie=fe?{textMinHeightPx:ee,captionMinHeightPx:M}:void 0,oe=fe?a.jsx("div",{ref:W,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((D,J)=>te(D,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,me=(D,J)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[te(D,`card-${J}`,ie),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(c)})`,width:$(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);return H&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:A,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...y>0?{height:y}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ko(r)}}),oe,a.jsx("div",{ref:B,className:`${r}-marquee-track`,"data-direction":l,onMouseEnter:de,onMouseLeave:N,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...I?{"--marquee-play-state":P?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:X},(D,J)=>a.jsx("div",{ref:J===0?R:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(c),paddingRight:$(c)},"aria-hidden":J>0,children:t==null?void 0:t.map((Z,ce)=>me(Z,`${J}-${ce}`))},`set-${J}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ko(r)}}),oe,a.jsx("div",{style:{gap:$(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((D,J)=>me(D,J))})]})},Qs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2111
+ `}const Zs=30,Js=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),{autoplay:s,align:i,speed:p,direction:l,pauseOnHover:m,gap:c,cardWidth:T,corners:w,stroke:y,strokeColor:u,bgColor:d,padding:C,logoMarginTop:b,logoWidth:x,logoHeight:A,captionMarginTop:V}=e,j=s==="on"&&!o,k=j,S=Math.max(0,p)*Zs,$=U=>E.scalingValue(U,n??!1),M=g.useRef(null),B=g.useRef(null),W=g.useRef(null),[F,H]=g.useState(0),[z,G]=g.useState(0),[v,I]=g.useState(0),R=k&&m==="on",[L,_]=g.useState(!1),N=g.useRef(null),[J,ce]=g.useState(0),[te,me]=g.useState(0),f=g.useRef(null),O=U=>{var X,pe,ie,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${U}FontFamily`])??"Arial",fontWeight:((X=e==null?void 0:e[`${U}FontSettings`])==null?void 0:X.fontWeight)??400,fontStyle:((pe=e==null?void 0:e[`${U}FontSettings`])==null?void 0:pe.fontStyle)??"normal"},textAppearance:{textTransform:((ie=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:ie.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${U}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${U}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${U}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${U}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${U}LineHeight`])??.01,color:(e==null?void 0:e[`${U}Color`])??"#000000"}},oe=O("text"),ne=O("caption"),ue=g.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(U=>{var Z,X;return(((Z=U.text)==null?void 0:Z.length)??0)>0||(((X=U.caption)==null?void 0:X.length)??0)>0}),[t]),q=g.useMemo(()=>!j||(t==null?void 0:t.length)===0?1:z<=0||F<=0?2:Math.max(2,Math.ceil(F/z)+1),[j,t==null?void 0:t.length,z,F]);g.useLayoutEffect(()=>{if(!j)return;const U=M.current,Z=W.current;if(!U||!Z)return;let X=0;const pe=()=>{const we=U.getBoundingClientRect().width,$e=Z.getBoundingClientRect().width,lt=f.current,Ke=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(f.current=$e,H(we),typeof $e=="number"&&$e>0&&z<=0){G($e);return}Ke&&$e!==z?G($e):!Ke&&z<=0&&(cancelAnimationFrame(X),X=requestAnimationFrame(pe))},ie=()=>{cancelAnimationFrame(X),X=requestAnimationFrame(pe)};ie();const fe=new ResizeObserver(ie);return fe.observe(U),fe.observe(Z),()=>{cancelAnimationFrame(X),fe.disconnect()}},[j,z]),g.useLayoutEffect(()=>{const U=B.current;if(!j||!U||!k)return;const Z=z>0?z:0,X=Z>0&&S>0?Z/S*1e3:0,pe=`${Math.max(0,X)/1e3}s`;U.style.setProperty("--marquee-distance",`${Z}px`),U.style.setProperty("--marquee-duration",pe)},[j,k,S,z]),g.useLayoutEffect(()=>{if(!j){I(0);return}const U=B.current;if(!U)return;const Z=()=>{const pe=U.getBoundingClientRect().height;I(pe>0?pe:0)};Z();const X=new ResizeObserver(Z);return X.observe(U),()=>{X.disconnect()}},[j,q,t,n,c,T,C,y,w,x,A]);const se=()=>{R&&_(!0)},P=()=>{R&&_(!1)},h=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),D=g.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),Y=g.useCallback((U,Z,X,pe)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[a.jsx("div",{"data-controls":pe==null?void 0:pe.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:$((pe==null?void 0:pe.marginTop)??0)}}),a.jsx("div",{...pe!=null&&pe.dataMeasureKind?{"data-testimonial-measure":pe.dataMeasureKind}:{},style:{...Pe(U,n),textAlign:D,pointerEvents:"auto",...typeof(pe==null?void 0:pe.minHeightPx)=="number"&&pe.minHeightPx>0?{minHeight:pe.minHeightPx}:{}},children:a.jsx(Mt,{content:Z})})]},X),[h,D,n]),Q=g.useCallback((U,Z,X)=>{var pe,ie,fe;return a.jsxs("div",{style:{padding:`${$(C.top)} ${$(C.right)} ${$(C.bottom)} ${$(C.left)}`,width:$(T+y*2),height:"100%",borderRadius:$(w),border:`${$(y)} solid ${u}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:d}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:h,textAlign:D},children:[U.text&&Y(oe,U.text,"text",X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(X==null?void 0:X.textMinHeightPx)=="number"&&X.textMinHeightPx>0?{minHeightPx:X.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:h,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:$(b)}}),a.jsx("div",{style:{width:$(x),height:$(A)},children:((pe=U.logo)==null?void 0:pe.url)&&a.jsx("img",{src:U.logo.url,alt:((ie=U.logo)==null?void 0:ie.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((fe=U.logo)==null?void 0:fe.objectFit)||"contain"}})})]}),U.caption&&Y(ne,U.caption,"caption",{controlsName:"captionMarginTop",marginTop:V,...X!=null&&X.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(X==null?void 0:X.captionMinHeightPx)=="number"&&X.captionMinHeightPx>0?{minHeightPx:X.captionMinHeightPx}:{}})]})]},Z)},[d,V,ne,T,w,A,b,x,h,D,C.bottom,C.left,C.right,C.top,Y,y,u,oe,n]),le=g.useCallback(U=>{ce(U.maxTextPx),me(U.maxCaptionPx)},[]);g.useLayoutEffect(()=>{if(!ue){le({maxTextPx:0,maxCaptionPx:0});return}const U=N.current;if(!U)return;const Z=()=>{E.readTestimonialTextMeasure(U,le)};Z();const X=new ResizeObserver(Z);return X.observe(U),()=>{X.disconnect()}},[ue,le,t,Q]);const ae=ue?{textMinHeightPx:J,captionMinHeightPx:te}:void 0,re=ue?a.jsx("div",{ref:N,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((U,Z)=>Q(U,`measure-${Z}`,{dataMeasureAttrs:!0}))}):null,ge=(U,Z)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Q(U,`card-${Z}`,ae),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(c)})`,width:$(c),height:"100%",pointerEvents:"auto",zIndex:2}})]},Z);return j&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:M,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...v>0?{height:v}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),re,a.jsx("div",{ref:B,className:`${r}-marquee-track`,"data-direction":l,onMouseEnter:se,onMouseLeave:P,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...R?{"--marquee-play-state":L?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:q},(U,Z)=>a.jsx("div",{ref:Z===0?W:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(c),paddingRight:$(c)},"aria-hidden":Z>0,children:t==null?void 0:t.map((X,pe)=>ge(X,`${Z}-${pe}`))},`set-${Z}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Eo(r)}}),re,a.jsx("div",{style:{gap:$(c),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((U,Z)=>ge(U,Z))})]})},Qs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2200
2112
  import cn from 'classnames';
2201
2113
  import { CommonComponentProps } from '../props';
2202
2114
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -2792,7 +2704,7 @@ type TestimonialsSettings = {
2792
2704
  logoHeight: number;
2793
2705
  captionMarginTop: number;
2794
2706
  };
2795
- `,Lo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},el={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"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:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Lo.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:{...Lo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},tl={element:Js,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:el,sourceCode:Qs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function nl(e){return`
2707
+ `,ko={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},el={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"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:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},tl={element:Js,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:el,sourceCode:Qs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function nl(e){return`
2796
2708
  .${e}-container {
2797
2709
  position: relative;
2798
2710
  overflow-x: clip;
@@ -2916,7 +2828,7 @@ type TestimonialsSettings = {
2916
2828
  width: 100%;
2917
2829
  height: 100%;
2918
2830
  }
2919
- `}const ol=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=k.useScopedStyles(),s=t||[],{autoplay:i,delay:u,align:l,width:d,imageMarginTop:c,textMarginTop:T,captionMarginTop:w,imageWidth:f,imageHeight:p,controlsWidth:m,controlsColor:S,controlsHoverColor:v}=e,x=i==="on"&&!o,[_,q]=g.useState(0),[H,L]=g.useState(null),[C,$]=g.useState(!1),A=g.useRef(null),B=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),R=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);g.useEffect(()=>{q(0),L(null),$(!1)},[s.length]);const j=s[_],V=H===null?null:s[H],z=X=>{var N,b,U,Q,te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${X}FontFamily`])??"Arial",fontWeight:((N=e==null?void 0:e[`${X}FontSettings`])==null?void 0:N.fontWeight)??400,fontStyle:((b=e==null?void 0:e[`${X}FontSettings`])==null?void 0:b.fontStyle)??"normal"},textAppearance:{textTransform:((U=e==null?void 0:e[`${X}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((Q=e==null?void 0:e[`${X}TextAppearance`])==null?void 0:Q.textDecoration)??"none",fontVariant:((te=e==null?void 0:e[`${X}TextAppearance`])==null?void 0:te.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${X}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${X}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${X}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${X}WordSpacing`])??0,color:(e==null?void 0:e[`${X}Color`])??"#000000"}},Y=z("text"),y=z("caption"),F=s.length>1&&s.some(X=>{var de,N;return(((de=X.text)==null?void 0:de.length)??0)>0||(((N=X.caption)==null?void 0:N.length)??0)>0}),I=g.useRef(null),[P,E]=g.useState(0),[W,ee]=g.useState(0),se=e.controls??{mode:"Off",icon:null},M=s.length>1,O=g.useCallback((X,de)=>!M||de===X?X:(A.current&&window.clearTimeout(A.current),L(X),$(!0),A.current=window.setTimeout(()=>{L(null),$(!1),A.current=null},300),de),[M]),h=g.useCallback(()=>{M&&q(X=>O(X,(X-1+s.length)%s.length))},[M,O,s.length]),K=g.useCallback(()=>{M&&q(X=>O(X,(X+1)%s.length))},[M,O,s.length]);g.useEffect(()=>{if(!x||!M)return;const X=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),de=window.setInterval(()=>{q(N=>O(N,(N+1)%s.length))},X);return()=>{window.clearInterval(de)}},[x,M,O,s.length,u]),g.useEffect(()=>()=>{A.current&&window.clearTimeout(A.current)},[]);const ae=(X,de)=>{var Q,te,le,ie;const N=de==null?void 0:de.textMinHeightPx,b=de==null?void 0:de.captionMinHeightPx,U=de==null?void 0:de.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[X.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:k.scalingValue(T??0,n??!1)}}),a.jsx("div",{...U&&{"data-testimonial-measure":"text"},style:{...Re(Y,n),...N&&N>0?{minHeight:N}:{},textAlign:R,pointerEvents:"auto"},children:a.jsx(Pt,{content:X.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:k.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:k.scalingValue(f??0,n??!1),height:k.scalingValue(p??0,n??!1)},children:((Q=X.image)==null?void 0:Q.url)&&a.jsx("img",{src:(te=X.image)==null?void 0:te.url,alt:((le=X.image)==null?void 0:le.name)??"",className:`${r}-icon`,style:{objectFit:((ie=X.image)==null?void 0:ie.objectFit)||"contain"}})})]}),X.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:k.scalingValue(w??0,n??!1)}}),a.jsx("div",{...U?{"data-testimonial-measure":"caption"}:{},style:{...Re(y,n),...b&&b>0?{minHeight:b}:{},textAlign:R,pointerEvents:"auto"},children:a.jsx(Pt,{content:X.caption})})]})]})},pe=g.useCallback(X=>{E(X.maxTextPx),ee(X.maxCaptionPx)},[]);if(g.useLayoutEffect(()=>{if(!F){pe({maxTextPx:0,maxCaptionPx:0});return}const X=I.current;if(!X)return;const de=()=>{k.readTestimonialTextMeasure(X,pe)};de();const N=new ResizeObserver(de);return N.observe(X),()=>{N.disconnect()}},[F,pe,t]),!j)return a.jsx(a.Fragment,{});const fe=F?{textMinHeightPx:P,captionMinHeightPx:W}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:nl(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:k.scalingValue(d??0,n??!1),alignItems:B},children:[F&&a.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((X,de)=>a.jsx("div",{style:{width:"100%"},children:ae(X,{dataMeasureAttrs:!0})},de))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[V&&C&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:ae(V,fe)}),a.jsx("div",{className:he(`${r}-fade-item-current`,C?`${r}-fade-in`:void 0),children:ae(j,fe)})]})]}),se.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:k.scalingValue(m??.02,n??!1),height:k.scalingValue(m??.02,n??!1),"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:h,disabled:!M,"aria-label":"Previous testimonial",children:se.icon&&a.jsx(Xe,{url:se.icon,fill:S,hoverFill:v,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:k.scalingValue(m??.02,n??!1),height:k.scalingValue(m??.02,n??!1),"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:K,disabled:!M,"aria-label":"Next testimonial",children:se.icon&&a.jsx(Xe,{url:se.icon,fill:S,hoverFill:v,className:`${r}-arrow-img`})})})]})]})})},rl=`import cn from 'classnames';
2831
+ `}const ol=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),s=t||[],{autoplay:i,delay:p,align:l,width:m,imageMarginTop:c,textMarginTop:T,captionMarginTop:w,imageWidth:y,imageHeight:u,controlsWidth:d,controlsColor:C,controlsHoverColor:b}=e,x=i==="on"&&!o,[A,V]=g.useState(0),[j,k]=g.useState(null),[S,$]=g.useState(!1),M=g.useRef(null),B=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),W=g.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);g.useEffect(()=>{V(0),k(null),$(!1)},[s.length]);const F=s[A],H=j===null?null:s[j],z=q=>{var P,h,D,Y,Q;return{fontSettings:{fontFamily:(e==null?void 0:e[`${q}FontFamily`])??"Arial",fontWeight:((P=e==null?void 0:e[`${q}FontSettings`])==null?void 0:P.fontWeight)??400,fontStyle:((h=e==null?void 0:e[`${q}FontSettings`])==null?void 0:h.fontStyle)??"normal"},textAppearance:{textTransform:((D=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:D.textTransform)??"none",textDecoration:((Y=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:Y.textDecoration)??"none",fontVariant:((Q=e==null?void 0:e[`${q}TextAppearance`])==null?void 0:Q.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${q}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${q}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${q}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${q}WordSpacing`])??0,color:(e==null?void 0:e[`${q}Color`])??"#000000"}},G=z("text"),v=z("caption"),I=s.length>1&&s.some(q=>{var se,P;return(((se=q.text)==null?void 0:se.length)??0)>0||(((P=q.caption)==null?void 0:P.length)??0)>0}),R=g.useRef(null),[L,_]=g.useState(0),[N,J]=g.useState(0),ce=e.controls??{mode:"Off",icon:null},te=s.length>1,me=g.useCallback((q,se)=>!te||se===q?q:(M.current&&window.clearTimeout(M.current),k(q),$(!0),M.current=window.setTimeout(()=>{k(null),$(!1),M.current=null},300),se),[te]),f=g.useCallback(()=>{te&&V(q=>me(q,(q-1+s.length)%s.length))},[te,me,s.length]),O=g.useCallback(()=>{te&&V(q=>me(q,(q+1)%s.length))},[te,me,s.length]);g.useEffect(()=>{if(!x||!te)return;const q=Math.max(300,Number.isFinite(p*1e3)?p*1e3:0),se=window.setInterval(()=>{V(P=>me(P,(P+1)%s.length))},q);return()=>{window.clearInterval(se)}},[x,te,me,s.length,p]),g.useEffect(()=>()=>{M.current&&window.clearTimeout(M.current)},[]);const oe=(q,se)=>{var Y,Q,le,ae;const P=se==null?void 0:se.textMinHeightPx,h=se==null?void 0:se.captionMinHeightPx,D=se==null?void 0:se.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[q.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:E.scalingValue(T??0,n??!1)}}),a.jsx("div",{...D&&{"data-testimonial-measure":"text"},style:{...Pe(G,n),...P&&P>0?{minHeight:P}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(Mt,{content:q.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:E.scalingValue(c??0,n??!1)}}),a.jsx("div",{style:{width:E.scalingValue(y??0,n??!1),height:E.scalingValue(u??0,n??!1)},children:((Y=q.image)==null?void 0:Y.url)&&a.jsx("img",{src:(Q=q.image)==null?void 0:Q.url,alt:((le=q.image)==null?void 0:le.name)??"",className:`${r}-icon`,style:{objectFit:((ae=q.image)==null?void 0:ae.objectFit)||"contain"}})})]}),q.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:B,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:E.scalingValue(w??0,n??!1)}}),a.jsx("div",{...D?{"data-testimonial-measure":"caption"}:{},style:{...Pe(v,n),...h&&h>0?{minHeight:h}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(Mt,{content:q.caption})})]})]})},ne=g.useCallback(q=>{_(q.maxTextPx),J(q.maxCaptionPx)},[]);if(g.useLayoutEffect(()=>{if(!I){ne({maxTextPx:0,maxCaptionPx:0});return}const q=R.current;if(!q)return;const se=()=>{E.readTestimonialTextMeasure(q,ne)};se();const P=new ResizeObserver(se);return P.observe(q),()=>{P.disconnect()}},[I,ne,t]),!F)return a.jsx(a.Fragment,{});const ue=I?{textMinHeightPx:L,captionMinHeightPx:N}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:nl(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:E.scalingValue(m??0,n??!1),alignItems:B},children:[I&&a.jsx("div",{ref:R,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((q,se)=>a.jsx("div",{style:{width:"100%"},children:oe(q,{dataMeasureAttrs:!0})},se))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[H&&S&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:oe(H,ue)}),a.jsx("div",{className:he(`${r}-fade-item-current`,S?`${r}-fade-in`:void 0),children:oe(F,ue)})]})]}),ce.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:E.scalingValue(d??.02,n??!1),height:E.scalingValue(d??.02,n??!1),"--arrow-hover-color":b},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:f,disabled:!te,"aria-label":"Previous testimonial",children:ce.icon&&a.jsx(Xe,{url:ce.icon,fill:C,hoverFill:b,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:E.scalingValue(d??.02,n??!1),height:E.scalingValue(d??.02,n??!1),"--arrow-hover-color":b},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:O,disabled:!te,"aria-label":"Next testimonial",children:ce.icon&&a.jsx(Xe,{url:ce.icon,fill:C,hoverFill:b,className:`${r}-arrow-img`})})})]})]})})},rl=`import cn from 'classnames';
2920
2832
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
2921
2833
  import { CommonComponentProps } from '../props';
2922
2834
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3408,4 +3320,4 @@ type TestimonialsSettings = {
3408
3320
  icon?: string | null;
3409
3321
  };
3410
3322
  };
3411
- `,il="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>'),Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},al={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"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:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ao.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:{...Ao.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:il},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Charter",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},sl={element:ol,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:al,sourceCode:rl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},ll=[Ia,ja,_s,Rs,qs,Xs,tl,sl];exports.components=ll;exports.isSchemaV1=Cr;
3323
+ `,il="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>'),Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},al={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"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:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...Ao.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:{...Ao.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:il},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},sl={element:ol,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:al,sourceCode:rl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},ll=[Ia,Ha,Ts,Ms,Ds,Xs,tl,sl];exports.components=ll;exports.isSchemaV1=Sr;