@cntrl-site/components 1.0.7-alpha.9 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/Form/FormComponent.d.ts +30 -2
- package/dist/Components/TestimonialGrid/TestimonialGrid.d.ts +1 -32
- package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +1 -55
- package/dist/Components/TestimonialSingle/TestimonialSingle.d.ts +2 -31
- package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +0 -50
- package/dist/Components/utils/index.d.ts +1 -0
- package/dist/Components/utils/readTestimonialTextMeasure.d.ts +5 -0
- package/dist/components.css +1 -1
- package/dist/index.js +858 -608
- package/dist/index.mjs +3868 -3730
- package/dist/readTestimonialTextMeasure-B1FI-93F.mjs +60 -0
- package/dist/readTestimonialTextMeasure-CB_Uq-fO.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +7 -6
- package/package.json +1 -1
- package/dist/useScopedStyles-BSwFAT27.mjs +0 -49
- package/dist/useScopedStyles-DpVdqfXj.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),A=require("react"),ue=require("classnames"),_=require("./useScopedStyles-DpVdqfXj.js"),br=require("react-dom");function xr(e){return e.type==="object"&&e.version===1}const Sr="ControlSlider-module__wrapper___sHEkd",Cr="ControlSlider-module__hoverArrow___A-dOH",wr="ControlSlider-module__sliderItem___QQSkR",Tr="ControlSlider-module__sliderImage___9hRl-",_r="ControlSlider-module__arrow___05ghY",$r="ControlSlider-module__arrowVertical___tBfVN",Ar="ControlSlider-module__nextArrow___-30Yc",Ir="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Fr="ControlSlider-module__mirror___brd6U",kr="ControlSlider-module__pagination___bicLF",Rr="ControlSlider-module__paginationInner___bT-P-",Mr="ControlSlider-module__paginationVertical___zYqKw",Wr="ControlSlider-module__paginationItem___nTRbk",Pr="ControlSlider-module__dot___p1Qun",zr="ControlSlider-module__activeDot___LHFaj",Hr="ControlSlider-module__paginationInsideBottom___R3FWn",Vr="ControlSlider-module__paginationInsideTop___V-qb-",Nr="ControlSlider-module__paginationOutsideBottom___14w8D",Or="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",Ur="ControlSlider-module__paginationOutsideRight___EtuQa",qr="ControlSlider-module__imgWrapper___UjEgB",Gr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Xr="ControlSlider-module__captionText___uGBVc",Kr="ControlSlider-module__active___WZK4G",Jr="ControlSlider-module__withPointerEvents___t-18M",Zr="ControlSlider-module__topLeftAlignment___zjnGM",Qr="ControlSlider-module__topCenterAlignment___gD1xW",ei="ControlSlider-module__topRightAlignment___NMapS",ti="ControlSlider-module__middleLeftAlignment___OnUrY",ni="ControlSlider-module__middleCenterAlignment___Tdkl0",oi="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ii="ControlSlider-module__bottomCenterAlignment___c54fB",ai="ControlSlider-module__bottomRightAlignment___kEwrz",li="ControlSlider-module__clickOverlay___DZA28",si="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",Z={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:Tr,arrow:_r,arrowVertical:$r,nextArrow:Ar,arrowInner:Ir,arrowIcon:Er,arrowImg:Lr,mirror:Fr,pagination:kr,paginationInner:Rr,paginationVertical:Mr,paginationItem:Wr,dot:Pr,activeDot:zr,paginationInsideBottom:Hr,paginationInsideTop:Vr,paginationOutsideBottom:Nr,paginationOutsideTop:Or,paginationInsideLeft:jr,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:Ur,imgWrapper:qr,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Jr,topLeftAlignment:Zr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:li,contain:si,cover:ci};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 ui(e,t,n){return t&&pi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var io="(prefers-reduced-motion: reduce)",yt=1,di=2,xt=3,wt=4,Ht=5,Qt=6,on=7,gi={CREATED:yt,MOUNTED:di,IDLE:xt,MOVING:wt,SCROLLING:Ht,DRAGGING:Qt,DESTROYED:on};function Ke(e){e.length=0}function ot(e,t,n){return Array.prototype.slice.call(e,t,n)}function fe(e){return e.bind.apply(e,[null].concat(ot(arguments,1)))}var Eo=setTimeout,An=function(){};function ao(e){return requestAnimationFrame(e)}function cn(e,t){return typeof t===e}function Lt(e){return!zn(e)&&cn("object",e)}var Pn=Array.isArray,Lo=fe(cn,"function"),tt=fe(cn,"string"),Vt=fe(cn,"undefined");function zn(e){return e===null}function Fo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Nt(e){return Pn(e)?e:[e]}function Fe(e,t){Nt(e).forEach(t)}function Hn(e,t){return e.indexOf(t)>-1}function en(e,t){return e.push.apply(e,Nt(t)),e}function Ge(e,t,n){e&&Fe(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function He(e,t){Ge(e,tt(t)?t.split(" "):t,!0)}function Ot(e,t){Fe(t,e.appendChild.bind(e))}function Vn(e,t){Fe(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function Ft(e,t){return Fo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?ot(e.children):[];return t?n.filter(function(o){return Ft(o,t)}):n}function jt(e,t){return t?ko(e,t)[0]:e.firstElementChild}var kt=Object.keys;function st(e,t,n){return e&&(n?kt(e).reverse():kt(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Rt(e){return ot(arguments,1).forEach(function(t){st(t,function(n,o){e[o]=t[o]})}),e}function Ze(e){return ot(arguments,1).forEach(function(t){st(t,function(n,o){Pn(n)?e[o]=n.slice():Lt(n)?e[o]=Ze({},Lt(e[o])?e[o]:{},n):e[o]=n})}),e}function lo(e,t){Fe(t||kt(e),function(n){delete e[n]})}function Ve(e,t){Fe(e,function(n){Fe(t,function(o){n&&n.removeAttribute(o)})})}function re(e,t,n){Lt(t)?st(t,function(o,r){re(e,r,o)}):Fe(e,function(o){zn(n)||n===""?Ve(o,t):o.setAttribute(t,String(n))})}function ht(e,t,n){var o=document.createElement(e);return t&&(tt(t)?He(o,t):re(o,t)),n&&Ot(n,o),o}function Me(e,t,n){if(Vt(n))return getComputedStyle(e)[t];zn(n)||(e.style[t]=""+n)}function Mt(e,t){Me(e,"display",t)}function Ro(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function We(e,t){return e.getAttribute(t)}function so(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function ct(e){Fe(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Mo(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function qe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Wo(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?ot(e.querySelectorAll(t)):[]}function Ye(e,t){Ge(e,t,!1)}function In(e){return e.timeStamp}function lt(e){return tt(e)?e:e?e+"px":""}var Bt="splide",On="data-"+Bt;function It(e,t){if(!e)throw new Error("["+Bt+"] "+(t||""))}var nt=Math.min,rn=Math.max,an=Math.floor,Wt=Math.ceil,Ie=Math.abs;function Po(e,t,n){return Ie(e-t)<n}function tn(e,t,n,o){var r=nt(t,n),s=rn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function mt(e,t,n){var o=nt(t,n),r=rn(t,n);return nt(rn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function Ln(e,t){return Fe(t,function(n){e=e.replace("%s",""+n)}),e}function jn(e){return e<10?"0"+e:""+e}var co={};function mi(e){return""+e+jn(co[e]=(co[e]||0)+1)}function zo(){var e=[];function t(i,c,p,g){r(i,c,function(u,F,S){var y="addEventListener"in u,d=y?u.removeEventListener.bind(u,F,p,g):u.removeListener.bind(u,p);y?u.addEventListener(F,p,g):u.addListener(p),e.push([u,F,S,p,d])})}function n(i,c,p){r(i,c,function(g,u,F){e=e.filter(function(S){return S[0]===g&&S[1]===u&&S[2]===F&&(!p||S[3]===p)?(S[4](),!1):!0})})}function o(i,c,p){var g,u=!0;return typeof CustomEvent=="function"?g=new CustomEvent(c,{bubbles:u,detail:p}):(g=document.createEvent("CustomEvent"),g.initCustomEvent(c,u,!1,p)),i.dispatchEvent(g),g}function r(i,c,p){Fe(i,function(g){g&&Fe(c,function(u){u.split(" ").forEach(function(F){var S=F.split(".");p(g,S[0],S[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ke(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var rt="mounted",Fn="ready",Je="move",Tt="moved",Bn="click",Ho="active",Vo="inactive",No="visible",Oo="hidden",Ce="refresh",$e="updated",St="resize",pn="resized",jo="drag",Bo="dragging",Do="dragged",un="scroll",ut="scrolled",fi="overflow",Dn="destroy",Uo="arrows:mounted",qo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",Un="navigation:mounted",qn="autoplay:play",Xo="autoplay:playing",Gn="autoplay:pause",Yn="lazyload:loaded",Ko="sk",Jo="sh",ln="ei";function ve(e){var t=e?e.event.bus:document.createDocumentFragment(),n=zo();function o(s,i){n.bind(t,Nt(s).join(" "),function(c){i.apply(i,Pn(c.detail)?c.detail:[])})}function r(s){n.dispatch(t,s,ot(arguments,1))}return e&&e.event.on(Dn,n.destroy),Rt(n,{bus:t,on:o,off:fe(n.unbind,t),emit:r})}function dn(e,t,n,o){var r=Date.now,s,i=0,c,p=!0,g=0;function u(){if(!p){if(i=e?nt((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++g>=o))return S();c=ao(u)}}function F(v){v||d(),s=r()-(v?i*e:0),p=!1,c=ao(u)}function S(){p=!0}function y(){s=r(),i=0,n&&n(i)}function d(){c&&cancelAnimationFrame(c),i=0,c=0,p=!0}function m(v){e=v}function w(){return p}return{start:F,rewind:y,pause:S,cancel:d,set:m,isPaused:w}}function yi(e){var t=e;function n(r){t=r}function o(r){return Hn(Nt(r),t)}return{set:n,is:o}}function hi(e,t){var n=dn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function vi(e,t,n){var o=e.state,r=n.breakpoints||{},s=n.reducedMotion||{},i=zo(),c=[];function p(){var d=n.mediaQuery==="min";kt(r).sort(function(m,w){return d?+m-+w:+w-+m}).forEach(function(m){u(r[m],"("+(d?"min":"max")+"-width:"+m+"px)")}),u(s,io),F()}function g(d){d&&i.destroy()}function u(d,m){var w=matchMedia(m);i.bind(w,"change",F),c.push([d,w])}function F(){var d=o.is(on),m=n.direction,w=c.reduce(function(v,b){return Ze(v,b[1].matches?b[0]:{})},{});lo(n),y(w),n.destroy?e.destroy(n.destroy==="completely"):d?(g(!0),e.mount()):m!==n.direction&&e.refresh()}function S(d){matchMedia(io).matches&&(d?Ze(n,s):lo(n,kt(s)))}function y(d,m,w){Ze(n,d),m&&Ze(Object.getPrototypeOf(n),d),(w||!o.is(yt))&&e.emit($e,n)}return{setup:p,destroy:g,reduce:S,set:y}}var gn="Arrow",mn=gn+"Left",fn=gn+"Right",Zo=gn+"Up",Qo=gn+"Down",po="rtl",yn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Zo,fn],ArrowRight:[Qo,mn]};function bi(e,t,n){function o(s,i,c){c=c||n.direction;var p=c===po&&!i?1:c===yn?0:-1;return Sn[s]&&Sn[s][p]||s.replace(/width|left|right/i,function(g,u){var F=Sn[g.toLowerCase()][p]||g;return u>0?F.charAt(0).toUpperCase()+F.slice(1):F})}function r(s){return s*(n.direction===po?1:-1)}return{resolve:o,orient:r}}var Xe="role",vt="tabindex",xi="disabled",Pe="aria-",Dt=Pe+"controls",er=Pe+"current",uo=Pe+"selected",Le=Pe+"label",Xn=Pe+"labelledby",tr=Pe+"hidden",Kn=Pe+"orientation",Pt=Pe+"roledescription",go=Pe+"live",mo=Pe+"busy",fo=Pe+"atomic",Jn=[Xe,vt,xi,Dt,er,Le,Xn,tr,Kn,Pt],Ne=Bt+"__",it="is-",Cn=Bt,yo=Ne+"track",Si=Ne+"list",hn=Ne+"slide",nr=hn+"--clone",Ci=hn+"__container",Zn=Ne+"arrows",vn=Ne+"arrow",or=vn+"--prev",rr=vn+"--next",bn=Ne+"pagination",ir=bn+"__page",wi=Ne+"progress",Ti=wi+"__bar",_i=Ne+"toggle",$i=Ne+"spinner",Ai=Ne+"sr",Ii=it+"initialized",pt=it+"active",ar=it+"prev",lr=it+"next",kn=it+"visible",Rn=it+"loading",sr=it+"focus-in",cr=it+"overflow",Ei=[pt,kn,ar,lr,Rn,sr,cr],Li={slide:hn,clone:nr,arrows:Zn,arrow:vn,prev:or,next:rr,pagination:bn,page:ir,spinner:$i};function Fi(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ft(n,t);)n=n.parentElement;return n}var ki=5,ho=200,pr="touchstart mousedown",wn="touchmove mousemove",Tn="touchend touchcancel mouseup click";function Ri(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=e.root,c=n.i18n,p={},g=[],u=[],F=[],S,y,d;function m(){L(),G(),b()}function w(){r(Ce,v),r(Ce,m),r($e,b),s(document,pr+" keydown",function(x){d=x.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Ge(i,sr,!!d)})}function v(x){var R=Jn.concat("style");Ke(g),Ye(i,u),Ye(S,F),Ve([S,y],R),Ve(i,x?R:["style",Pt])}function b(){Ye(i,u),Ye(S,F),u=T(Cn),F=T(yo),He(i,u),He(S,F),re(i,Le,n.label),re(i,Xn,n.labelledby)}function L(){S=N("."+yo),y=jt(S,"."+Si),It(S&&y,"A track/list element is missing."),en(g,ko(y,"."+hn+":not(."+nr+")")),st({arrows:Zn,pagination:bn,prev:or,next:rr,bar:Ti,toggle:_i},function(x,R){p[R]=N("."+x)}),Rt(p,{root:i,track:S,list:y,slides:g})}function G(){var x=i.id||mi(Bt),R=n.role;i.id=x,S.id=S.id||x+"-track",y.id=y.id||x+"-list",!We(i,Xe)&&i.tagName!=="SECTION"&&R&&re(i,Xe,R),re(i,Pt,c.carousel),re(y,Xe,"presentation")}function N(x){var R=Wo(i,x);return R&&Fi(R,"."+Cn)===i?R:void 0}function T(x){return[x+"--"+n.type,x+"--"+n.direction,n.drag&&x+"--draggable",n.isNavigation&&x+"--nav",x===Cn&&pt]}return Rt(p,{setup:m,mount:w,destroy:v})}var Ct="slide",_t="loop",Ut="fade";function Mi(e,t,n,o){var r=ve(e),s=r.on,i=r.emit,c=r.bind,p=e.Components,g=e.root,u=e.options,F=u.isNavigation,S=u.updateOnMove,y=u.i18n,d=u.pagination,m=u.slideFocus,w=p.Direction.resolve,v=We(o,"style"),b=We(o,Le),L=n>-1,G=jt(o,"."+Ci),N;function T(){L||(o.id=g.id+"-slide"+jn(t+1),re(o,Xe,d?"tabpanel":"group"),re(o,Pt,y.slide),re(o,Le,b||Ln(y.slideLabel,[t+1,e.length]))),x()}function x(){c(o,"click",fe(i,Bn,E)),c(o,"keydown",fe(i,Ko,E)),s([Tt,Jo,ut],W),s(Un,C),S&&s(Je,O)}function R(){N=!0,r.destroy(),Ye(o,Ei),Ve(o,Jn),re(o,"style",v),re(o,Le,b||"")}function C(){var I=e.splides.map(function($){var k=$.splide.Components.Slides.getAt(t);return k?k.slide.id:""}).join(" ");re(o,Le,Ln(y.slideX,(L?n:t)+1)),re(o,Dt,I),re(o,Xe,m?"button":""),m&&Ve(o,Pt)}function O(){N||W()}function W(){if(!N){var I=e.index;V(),H(),Ge(o,ar,t===I-1),Ge(o,lr,t===I+1)}}function V(){var I=D();I!==so(o,pt)&&(Ge(o,pt,I),re(o,er,F&&I||""),i(I?Ho:Vo,E))}function H(){var I=f(),$=!I&&(!D()||L);if(e.state.is([wt,Ht])||re(o,tr,$||""),re(Nn(o,u.focusableNodes||""),vt,$?-1:""),m&&re(o,vt,$?-1:0),I!==so(o,kn)&&(Ge(o,kn,I),i(I?No:Oo,E)),!I&&document.activeElement===o){var k=p.Slides.getAt(e.index);k&&Ro(k.slide)}}function Y(I,$,k){Me(k&&G||o,I,$)}function D(){var I=e.index;return I===t||u.cloneStatus&&I===n}function f(){if(e.is(Ut))return D();var I=Ee(p.Elements.track),$=Ee(o),k=w("left",!0),J=w("right",!0);return an(I[k])<=Wt($[k])&&an($[J])<=Wt(I[J])}function M(I,$){var k=Ie(I-t);return!L&&(u.rewind||e.is(_t))&&(k=nt(k,e.length-k)),k<=$}var E={index:t,slideIndex:n,slide:o,container:G,isClone:L,mount:T,destroy:R,update:W,style:Y,isWithin:M};return E}function Wi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=t.Elements,p=c.slides,g=c.list,u=[];function F(){S(),r(Ce,y),r(Ce,S)}function S(){p.forEach(function(W,V){m(W,V,-1)})}function y(){N(function(W){W.destroy()}),Ke(u)}function d(){N(function(W){W.update()})}function m(W,V,H){var Y=Mi(e,V,H,W);Y.mount(),u.push(Y),u.sort(function(D,f){return D.index-f.index})}function w(W){return W?T(function(V){return!V.isClone}):u}function v(W){var V=t.Controller,H=V.toIndex(W),Y=V.hasFocus()?1:n.perPage;return T(function(D){return tn(D.index,H,H+Y-1)})}function b(W){return T(W)[0]}function L(W,V){Fe(W,function(H){if(tt(H)&&(H=Mo(H)),Fo(H)){var Y=p[V];Y?Vn(H,Y):Ot(g,H),He(H,n.classes.slide),R(H,fe(s,St))}}),s(Ce)}function G(W){ct(T(W).map(function(V){return V.slide})),s(Ce)}function N(W,V){w(V).forEach(W)}function T(W){return u.filter(Lo(W)?W:function(V){return tt(W)?Ft(V.slide,W):Hn(Nt(W),V.index)})}function x(W,V,H){N(function(Y){Y.style(W,V,H)})}function R(W,V){var H=Nn(W,"img"),Y=H.length;Y?H.forEach(function(D){i(D,"load error",function(){--Y||V()})}):V()}function C(W){return W?p.length:u.length}function O(){return u.length>n.perPage}return{mount:F,destroy:y,update:d,register:m,get:w,getIn:v,getAt:b,add:L,remove:G,forEach:N,filter:T,style:x,getLength:C,isEnough:O}}function Pi(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=t.Slides,p=t.Direction.resolve,g=t.Elements,u=g.root,F=g.track,S=g.list,y=c.getAt,d=c.style,m,w,v;function b(){L(),s(window,"resize load",hi(fe(i,St))),r([$e,Ce],L),r(St,G)}function L(){m=n.direction===yn,Me(u,"maxWidth",lt(n.width)),Me(F,p("paddingLeft"),N(!1)),Me(F,p("paddingRight"),N(!0)),G(!0)}function G(E){var I=Ee(u);(E||w.width!==I.width||w.height!==I.height)&&(Me(F,"height",T()),d(p("marginRight"),lt(n.gap)),d("width",R()),d("height",C(),!0),w=I,i(pn),v!==(v=M())&&(Ge(u,cr,v),i(fi,v)))}function N(E){var I=n.padding,$=p(E?"right":"left");return I&<(I[$]||(Lt(I)?0:I))||"0px"}function T(){var E="";return m&&(E=x(),It(E,"height or heightRatio is missing."),E="calc("+E+" - "+N(!1)+" - "+N(!0)+")"),E}function x(){return lt(n.height||Ee(S).width*n.heightRatio)}function R(){return n.autoWidth?null:lt(n.fixedWidth)||(m?"":O())}function C(){return lt(n.fixedHeight)||(m?n.autoHeight?null:O():x())}function O(){var E=lt(n.gap);return"calc((100%"+(E&&" + "+E)+")/"+(n.perPage||1)+(E&&" - "+E)+")"}function W(){return Ee(S)[p("width")]}function V(E,I){var $=y(E||0);return $?Ee($.slide)[p("width")]+(I?0:D()):0}function H(E,I){var $=y(E);if($){var k=Ee($.slide)[p("right")],J=Ee(S)[p("left")];return Ie(k-J)+(I?0:D())}return 0}function Y(E){return H(e.length-1)-H(0)+V(0,E)}function D(){var E=y(0);return E&&parseFloat(Me(E.slide,p("marginRight")))||0}function f(E){return parseFloat(Me(F,p("padding"+(E?"Right":"Left"))))||0}function M(){return e.is(Ut)||Y(!0)>W()}return{mount:b,resize:G,listSize:W,slideSize:V,sliderSize:Y,totalSize:H,getPadding:f,isOverflow:M}}var zi=2;function Hi(e,t,n){var o=ve(e),r=o.on,s=t.Elements,i=t.Slides,c=t.Direction.resolve,p=[],g;function u(){r(Ce,F),r([$e,St],y),(g=w())&&(d(g),t.Layout.resize(!0))}function F(){S(),u()}function S(){ct(p),Ke(p),o.destroy()}function y(){var v=w();g!==v&&(g<v||!v)&&o.emit(Ce)}function d(v){var b=i.get().slice(),L=b.length;if(L){for(;b.length<v;)en(b,b);en(b.slice(-v),b.slice(0,v)).forEach(function(G,N){var T=N<v,x=m(G.slide,N);T?Vn(x,b[0].slide):Ot(s.list,x),en(p,x),i.register(x,N-v+(T?0:L),G.index)})}}function m(v,b){var L=v.cloneNode(!0);return He(L,n.classes.clone),L.id=e.root.id+"-clone"+jn(b+1),L}function w(){var v=n.clones;if(!e.is(_t))v=0;else if(Vt(v)){var b=n[c("fixedWidth")]&&t.Layout.slideSize(0),L=b&&Wt(Ee(s.track)[c("width")]/b);v=L||n[c("autoWidth")]&&e.length||n.perPage*zi}return v}return{mount:u,destroy:S}}function Vi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=e.state.set,c=t.Layout,p=c.slideSize,g=c.getPadding,u=c.totalSize,F=c.listSize,S=c.sliderSize,y=t.Direction,d=y.resolve,m=y.orient,w=t.Elements,v=w.list,b=w.track,L;function G(){L=t.Transition,r([rt,pn,$e,Ce],N)}function N(){t.Controller.isBusy()||(t.Scroll.cancel(),x(e.index),t.Slides.update())}function T($,k,J,ae){$!==k&&E($>J)&&(W(),R(O(Y(),$>J),!0)),i(wt),s(Je,k,J,$),L.start(k,function(){i(xt),s(Tt,k,J,$),ae&&ae()})}function x($){R(H($,!0))}function R($,k){if(!e.is(Ut)){var J=k?$:C($);Me(v,"transform","translate"+d("X")+"("+J+"px)"),$!==J&&s(Jo)}}function C($){if(e.is(_t)){var k=V($),J=k>t.Controller.getEnd(),ae=k<0;(ae||J)&&($=O($,J))}return $}function O($,k){var J=$-M(k),ae=S();return $-=m(ae*(Wt(Ie(J)/ae)||1))*(k?1:-1),$}function W(){R(Y(),!0),L.cancel()}function V($){for(var k=t.Slides.get(),J=0,ae=1/0,ne=0;ne<k.length;ne++){var ie=k[ne].index,P=Ie(H(ie,!0)-$);if(P<=ae)ae=P,J=ie;else break}return J}function H($,k){var J=m(u($-1)-f($));return k?D(J):J}function Y(){var $=d("left");return Ee(v)[$]-Ee(b)[$]+m(g(!1))}function D($){return n.trimSpace&&e.is(Ct)&&($=mt($,0,m(S(!0)-F()))),$}function f($){var k=n.focus;return k==="center"?(F()-p($,!0))/2:+k*p($)||0}function M($){return H($?t.Controller.getEnd():0,!!n.trimSpace)}function E($){var k=m(O(Y(),$));return $?k>=0:k<=v[d("scrollWidth")]-Ee(b)[d("width")]}function I($,k){k=Vt(k)?Y():k;var J=$!==!0&&m(k)<m(M(!1)),ae=$!==!1&&m(k)>m(M(!0));return J||ae}return{mount:G,move:T,jump:x,translate:R,shift:O,cancel:W,toIndex:V,toPosition:H,getPosition:Y,getLimit:M,exceededLimit:I,reposition:N}}function Ni(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=t.Move,c=i.getPosition,p=i.getLimit,g=i.toPosition,u=t.Slides,F=u.isEnough,S=u.getLength,y=n.omitEnd,d=e.is(_t),m=e.is(Ct),w=fe(Y,!1),v=fe(Y,!0),b=n.start||0,L,G=b,N,T,x;function R(){C(),r([$e,Ce,ln],C),r(pn,O)}function C(){N=S(!0),T=n.perMove,x=n.perPage,L=E();var P=mt(b,0,y?L:N-1);P!==b&&(b=P,i.reposition())}function O(){L!==E()&&s(ln)}function W(P,ee,de){if(!ie()){var se=H(P),ge=M(se);ge>-1&&(ee||ge!==b)&&(J(ge),i.move(se,ge,G,de))}}function V(P,ee,de,se){t.Scroll.scroll(P,ee,de,function(){var ge=M(i.toIndex(c()));J(y?nt(ge,L):ge),se&&se()})}function H(P){var ee=b;if(tt(P)){var de=P.match(/([+\-<>])(\d+)?/)||[],se=de[1],ge=de[2];se==="+"||se==="-"?ee=D(b+ +(""+se+(+ge||1)),b):se===">"?ee=ge?I(+ge):w(!0):se==="<"&&(ee=v(!0))}else ee=d?P:mt(P,0,L);return ee}function Y(P,ee){var de=T||(ne()?1:x),se=D(b+de*(P?-1:1),b,!(T||ne()));return se===-1&&m&&!Po(c(),p(!P),1)?P?0:L:ee?se:M(se)}function D(P,ee,de){if(F()||ne()){var se=f(P);se!==P&&(ee=P,P=se,de=!1),P<0||P>L?!T&&(tn(0,P,ee,!0)||tn(L,ee,P,!0))?P=I($(P)):d?P=de?P<0?-(N%x||x):N:P:n.rewind?P=P<0?L:0:P=-1:de&&P!==ee&&(P=I($(ee)+(P<ee?-1:1)))}else P=-1;return P}function f(P){if(m&&n.trimSpace==="move"&&P!==b)for(var ee=c();ee===g(P,!0)&&tn(P,0,e.length-1,!n.rewind);)P<b?--P:++P;return P}function M(P){return d?(P+N)%N||0:P}function E(){for(var P=N-(ne()||d&&T?1:x);y&&P-- >0;)if(g(N-1,!0)!==g(P,!0)){P++;break}return mt(P,0,N-1)}function I(P){return mt(ne()?P:x*P,0,L)}function $(P){return ne()?nt(P,L):an((P>=L?N-1:P)/x)}function k(P){var ee=i.toIndex(P);return m?mt(ee,0,L):ee}function J(P){P!==b&&(G=b,b=P)}function ae(P){return P?G:b}function ne(){return!Vt(n.focus)||n.isNavigation}function ie(){return e.state.is([wt,Ht])&&!!n.waitForTransition}return{mount:R,go:W,scroll:V,getNext:w,getPrev:v,getAdjacent:Y,getEnd:E,setIndex:J,getIndex:ae,toIndex:I,toPage:$,toDest:k,hasFocus:ne,isBusy:ie}}var Oi="http://www.w3.org/2000/svg",ji="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",Yt=40;function Bi(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=n.classes,p=n.i18n,g=t.Elements,u=t.Controller,F=g.arrows,S=g.track,y=F,d=g.prev,m=g.next,w,v,b={};function L(){N(),r($e,G)}function G(){T(),L()}function N(){var V=n.arrows;V&&!(d&&m)&&C(),d&&m&&(Rt(b,{prev:d,next:m}),Mt(y,V?"":"none"),He(y,v=Zn+"--"+n.direction),V&&(x(),W(),re([d,m],Dt,S.id),i(Uo,d,m)))}function T(){o.destroy(),Ye(y,v),w?(ct(F?[d,m]:y),d=m=null):Ve([d,m],Jn)}function x(){r([rt,Tt,Ce,ut,ln],W),s(m,"click",fe(R,">")),s(d,"click",fe(R,"<"))}function R(V){u.go(V,!0)}function C(){y=F||ht("div",c.arrows),d=O(!0),m=O(!1),w=!0,Ot(y,[d,m]),!F&&Vn(y,S)}function O(V){var H='<button class="'+c.arrow+" "+(V?c.prev:c.next)+'" type="button"><svg xmlns="'+Oi+'" viewBox="0 0 '+Yt+" "+Yt+'" width="'+Yt+'" height="'+Yt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Mo(H)}function W(){if(d&&m){var V=e.index,H=u.getPrev(),Y=u.getNext(),D=H>-1&&V<H?p.last:p.prev,f=Y>-1&&V>Y?p.first:p.next;d.disabled=H<0,m.disabled=Y<0,re(d,Le,D),re(m,Le,f),i(qo,d,m,H,Y)}}return{arrows:b,mount:L,destroy:T,update:W}}var Di=On+"-interval";function Ui(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.emit,c=dn(n.interval,e.go.bind(e,">"),x),p=c.isPaused,g=t.Elements,u=t.Elements,F=u.root,S=u.toggle,y=n.autoplay,d,m,w=y==="pause";function v(){y&&(b(),S&&re(S,Dt,g.track.id),w||L(),T())}function b(){n.pauseOnHover&&s(F,"mouseenter mouseleave",function(C){d=C.type==="mouseenter",N()}),n.pauseOnFocus&&s(F,"focusin focusout",function(C){m=C.type==="focusin",N()}),S&&s(S,"click",function(){w?L():G(!0)}),r([Je,un,Ce],c.rewind),r(Je,R)}function L(){p()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=d=w=!1,T(),i(qn))}function G(C){C===void 0&&(C=!0),w=!!C,T(),p()||(c.pause(),i(Gn))}function N(){w||(d||m?G(!1):L())}function T(){S&&(Ge(S,pt,!w),re(S,Le,n.i18n[w?"play":"pause"]))}function x(C){var O=g.bar;O&&Me(O,"width",C*100+"%"),i(Xo,C)}function R(C){var O=t.Slides.getAt(C);c.set(O&&+We(O.slide,Di)||n.interval)}return{mount:v,destroy:c.cancel,play:L,pause:G,isPaused:p}}function qi(e,t,n){var o=ve(e),r=o.on;function s(){n.cover&&(r(Yn,fe(c,!0)),r([rt,$e,Ce],fe(i,!0)))}function i(p){t.Slides.forEach(function(g){var u=jt(g.container||g.slide,"img");u&&u.src&&c(p,u,g)})}function c(p,g,u){u.style("background",p?'center/cover no-repeat url("'+g.src+'")':"",!0),Mt(g,p?"none":"")}return{mount:s,destroy:fe(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Ji=800;function Zi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=e.state.set,c=t.Move,p=c.getPosition,g=c.getLimit,u=c.exceededLimit,F=c.translate,S=e.is(Ct),y,d,m=1;function w(){r(Je,G),r([$e,Ce],N)}function v(x,R,C,O,W){var V=p();if(G(),C&&(!S||!u())){var H=t.Layout.sliderSize(),Y=En(x)*H*an(Ie(x)/H)||0;x=c.toPosition(t.Controller.toDest(x%H))+Y}var D=Po(V,x,1);m=1,R=D?0:R||rn(Ie(x-V)/Ki,Ji),d=O,y=dn(R,b,fe(L,V,x,W),1),i(Ht),s(un),y.start()}function b(){i(xt),d&&d(),s(ut)}function L(x,R,C,O){var W=p(),V=x+(R-x)*T(O),H=(V-W)*m;F(W+H),S&&!C&&u()&&(m*=Xi,Ie(H)<Gi&&v(g(u(!0)),Yi,!1,d,!0))}function G(){y&&y.cancel()}function N(){y&&!y.isPaused()&&(G(),b())}function T(x){var R=n.easingFunc;return R?R(x):1-Math.pow(1-x,4)}return{mount:w,destroy:G,scroll:v,cancel:N}}var ft={passive:!1,capture:!0};function Qi(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=o.unbind,p=e.state,g=t.Move,u=t.Scroll,F=t.Controller,S=t.Elements.track,y=t.Media.reduce,d=t.Direction,m=d.resolve,w=d.orient,v=g.getPosition,b=g.exceededLimit,L,G,N,T,x,R=!1,C,O,W;function V(){i(S,wn,An,ft),i(S,Tn,An,ft),i(S,pr,Y,ft),i(S,"click",M,{capture:!0}),i(S,"dragstart",qe),r([rt,$e],H)}function H(){var U=n.drag;_e(!U),T=U==="free"}function Y(U){if(C=!1,!O){var a=ge(U);se(U.target)&&(a||!U.button)&&(F.isBusy()?qe(U,!0):(W=a?S:window,x=p.is([wt,Ht]),N=null,i(W,wn,D,ft),i(W,Tn,f,ft),g.cancel(),u.cancel(),E(U)))}}function D(U){if(p.is(Qt)||(p.set(Qt),s(jo)),U.cancelable)if(x){g.translate(L+de(ne(U)));var a=ie(U)>ho,h=R!==(R=b());(a||h)&&E(U),C=!0,s(Bo),qe(U)}else k(U)&&(x=$(U),qe(U))}function f(U){p.is(Qt)&&(p.set(xt),s(Do)),x&&(I(U),qe(U)),c(W,wn,D),c(W,Tn,f),x=!1}function M(U){!O&&C&&qe(U,!0)}function E(U){N=G,G=U,L=v()}function I(U){var a=J(U),h=ae(a),z=n.rewind&&n.rewindByDrag;y(!1),T?F.scroll(h,0,n.snap):e.is(Ut)?F.go(w(En(a))<0?z?"<":"-":z?">":"+"):e.is(Ct)&&R&&z?F.go(b(!0)?">":"<"):F.go(F.toDest(h),!0),y(!0)}function $(U){var a=n.dragMinThreshold,h=Lt(a),z=h&&a.mouse||0,j=(h?a.touch:+a)||10;return Ie(ne(U))>(ge(U)?j:z)}function k(U){return Ie(ne(U))>Ie(ne(U,!0))}function J(U){if(e.is(_t)||!R){var a=ie(U);if(a&&a<ho)return ne(U)/a}return 0}function ae(U){return v()+En(U)*nt(Ie(U)*(n.flickPower||600),T?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(U,a){return ee(U,a)-ee(P(U),a)}function ie(U){return In(U)-In(P(U))}function P(U){return G===U&&N||G}function ee(U,a){return(ge(U)?U.changedTouches[0]:U)["page"+m(a?"Y":"X")]}function de(U){return U/(R&&e.is(Ct)?ki:1)}function se(U){var a=n.noDrag;return!Ft(U,"."+ir+", ."+vn)&&(!a||!Ft(U,a))}function ge(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function ye(){return x}function _e(U){O=U}return{mount:V,disable:_e,isDragging:ye}}var ea={Spacebar:" ",Right:fn,Left:mn,Up:Zo,Down:Qo};function Qn(e){return e=tt(e)?e:e.key,ea[e]||e}var vo="keydown";function ta(e,t,n){var o=ve(e),r=o.on,s=o.bind,i=o.unbind,c=e.root,p=t.Direction.resolve,g,u;function F(){S(),r($e,y),r($e,S),r(Je,m)}function S(){var v=n.keyboard;v&&(g=v==="global"?window:c,s(g,vo,w))}function y(){i(g,vo)}function d(v){u=v}function m(){var v=u;u=!0,Eo(function(){u=v})}function w(v){if(!u){var b=Qn(v);b===p(mn)?e.go("<"):b===p(fn)&&e.go(">")}}return{mount:F,destroy:y,disable:d}}var Et=On+"-lazy",nn=Et+"-srcset",na="["+Et+"], ["+nn+"]";function oa(e,t,n){var o=ve(e),r=o.on,s=o.off,i=o.bind,c=o.emit,p=n.lazyLoad==="sequential",g=[Tt,ut],u=[];function F(){n.lazyLoad&&(S(),r(Ce,S))}function S(){Ke(u),y(),p?v():(s(g),r(g,d),d())}function y(){t.Slides.forEach(function(b){Nn(b.slide,na).forEach(function(L){var G=We(L,Et),N=We(L,nn);if(G!==L.src||N!==L.srcset){var T=n.classes.spinner,x=L.parentElement,R=jt(x,"."+T)||ht("span",T,x);u.push([L,b,R]),L.src||Mt(L,"none")}})})}function d(){u=u.filter(function(b){var L=n.perPage*((n.preloadPages||1)+1)-1;return b[1].isWithin(e.index,L)?m(b):!0}),u.length||s(g)}function m(b){var L=b[0];He(b[1].slide,Rn),i(L,"load error",fe(w,b)),re(L,"src",We(L,Et)),re(L,"srcset",We(L,nn)),Ve(L,Et),Ve(L,nn)}function w(b,L){var G=b[0],N=b[1];Ye(N.slide,Rn),L.type!=="error"&&(ct(b[2]),Mt(G,""),c(Yn,G,N),c(St)),p&&v()}function v(){u.length&&m(u.shift())}return{mount:F,destroy:fe(Ke,u),check:d}}function ra(e,t,n){var o=ve(e),r=o.on,s=o.emit,i=o.bind,c=t.Slides,p=t.Elements,g=t.Controller,u=g.hasFocus,F=g.getIndex,S=g.go,y=t.Direction.resolve,d=p.pagination,m=[],w,v;function b(){L(),r([$e,Ce,ln],b);var O=n.pagination;d&&Mt(d,O?"":"none"),O&&(r([Je,un,ut],C),G(),C(),s(Go,{list:w,items:m},R(e.index)))}function L(){w&&(ct(d?ot(w.children):w),Ye(w,v),Ke(m),w=null),o.destroy()}function G(){var O=e.length,W=n.classes,V=n.i18n,H=n.perPage,Y=u()?g.getEnd()+1:Wt(O/H);w=d||ht("ul",W.pagination,p.track.parentElement),He(w,v=bn+"--"+x()),re(w,Xe,"tablist"),re(w,Le,V.select),re(w,Kn,x()===yn?"vertical":"");for(var D=0;D<Y;D++){var f=ht("li",null,w),M=ht("button",{class:W.page,type:"button"},f),E=c.getIn(D).map(function($){return $.slide.id}),I=!u()&&H>1?V.pageX:V.slideX;i(M,"click",fe(N,D)),n.paginationKeyboard&&i(M,"keydown",fe(T,D)),re(f,Xe,"presentation"),re(M,Xe,"tab"),re(M,Dt,E.join(" ")),re(M,Le,Ln(I,D+1)),re(M,vt,-1),m.push({li:f,button:M,page:D})}}function N(O){S(">"+O,!0)}function T(O,W){var V=m.length,H=Qn(W),Y=x(),D=-1;H===y(fn,!1,Y)?D=++O%V:H===y(mn,!1,Y)?D=(--O+V)%V:H==="Home"?D=0:H==="End"&&(D=V-1);var f=m[D];f&&(Ro(f.button),S(">"+D),qe(W,!0))}function x(){return n.paginationDirection||n.direction}function R(O){return m[g.toPage(O)]}function C(){var O=R(F(!0)),W=R(F());if(O){var V=O.button;Ye(V,pt),Ve(V,uo),re(V,vt,-1)}if(W){var H=W.button;He(H,pt),re(H,uo,!0),re(H,vt,"")}s(Yo,{list:w,items:m},O,W)}return{items:m,mount:b,destroy:L,getAt:R,update:C}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(d){d.isParent||(g(e,d.splide),g(d.splide,e))}),o&&u()}function c(){s.forEach(function(d){d.destroy()}),Ke(s)}function p(){c(),i()}function g(d,m){var w=ve(d);w.on(Je,function(v,b,L){m.go(m.is(_t)?L:v)}),s.push(w)}function u(){var d=ve(e),m=d.on;m(Bn,S),m(Ko,y),m([rt,$e],F),s.push(d),d.emit(Un,e.splides)}function F(){re(t.Elements.list,Kn,n.direction===yn?"vertical":"")}function S(d){e.go(d.index)}function y(d,m){Hn(ia,Qn(m))&&(S(d),qe(m))}return{setup:fe(t.Media.set,{slideFocus:Vt(r)?o:r},!0),mount:i,destroy:c,remount:p}}function la(e,t,n){var o=ve(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",c,ft)}function c(g){if(g.cancelable){var u=g.deltaY,F=u<0,S=In(g),y=n.wheelMinThreshold||0,d=n.wheelSleep||0;Ie(u)>y&&S-s>d&&(e.go(F?"<":">"),s=S),p(F)&&qe(g)}}function p(g){return!n.releaseWheel||e.state.is(wt)||t.Controller.getAdjacent(g)!==-1}return{mount:i}}var sa=90;function ca(e,t,n){var o=ve(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,c=ht("span",Ai),p=dn(sa,fe(u,!1));function g(){i&&(S(!t.Autoplay.isPaused()),re(s,fo,!0),c.textContent="…",r(qn,fe(S,!0)),r(Gn,fe(S,!1)),r([Tt,ut],fe(u,!0)))}function u(y){re(s,mo,y),y?(Ot(s,c),p.start()):(ct(c),p.cancel())}function F(){Ve(s,[go,fo,mo]),ct(c)}function S(y){i&&re(s,go,y?"off":"polite")}return{mount:g,disable:S,destroy:F}}var pa=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Ri,Slides:Wi,Layout:Pi,Clones:Hi,Move:Vi,Controller:Ni,Arrows:Bi,Autoplay:Ui,Cover:qi,Scroll:Zi,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:la,Live:ca}),ua={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},da={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:ua,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ga(e,t,n){var o=t.Slides;function r(){ve(e).on([rt,Ce],s)}function s(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,p){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(p)}return{mount:r,start:i,cancel:An}}function ma(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,c=fe(Me,i,"transition"),p;function g(){ve(e).bind(i,"transitionend",function(y){y.target===i&&p&&(F(),p())})}function u(y,d){var m=o.toPosition(y,!0),w=o.getPosition(),v=S(y);Ie(m-w)>=1&&v>=1?n.useScroll?s.scroll(m,v,!1,d):(c("transform "+v+"ms "+n.easing),o.translate(m,!0),p=d):(o.jump(y),d())}function F(){c(""),s.cancel()}function S(y){var d=n.rewindSpeed;if(e.is(Ct)&&d){var m=r.getIndex(!0),w=r.getEnd();if(m===0&&y>=w||m>=w&&y===0)return d}return n.speed}return{mount:g,start:u,cancel:F}}var fa=(function(){function e(n,o){this.event=ve(),this.Components={},this.state=yi(yt),this.splides=[],this._o={},this._E={};var r=tt(n)?Wo(document,n):n;It(r,r+" is invalid."),this.root=r,o=Ze({label:We(r,Le)||"",labelledby:We(r,Xn)||""},da,e.defaults,o||{});try{Ze(o,JSON.parse(We(r,On)))}catch{It(!1,"Invalid JSON")}this._o=Object.create(Ze({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,c=this.Components;It(i.is([yt,on]),"Already mounted!"),i.set(yt),this._C=c,this._T=r||this._T||(this.is(Ut)?ga:ma),this._E=o||this._E;var p=Rt({},pa,this._E,{Transition:this._T});return st(p,function(g,u){var F=g(s,c,s._o);c[u]=F,F.setup&&F.setup()}),st(c,function(g){g.mount&&g.mount()}),this.emit(rt),He(this.root,Ii),i.set(xt),this.emit(Fn),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(xt)&&(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(ot(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(Ce),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(yt)?ve(this).on(Fn,this.destroy.bind(this,o)):(st(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Dn),r.destroy(),o&&Ke(this.splides),s.set(on)),this},ui(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),eo=fa;eo.defaults={};eo.STATES=gi;var bo=[[rt,"onMounted"],[Fn,"onReady"],[Je,"onMove"],[Tt,"onMoved"],[Bn,"onClick"],[Ho,"onActive"],[Vo,"onInactive"],[No,"onVisible"],[Oo,"onHidden"],[Ce,"onRefresh"],[$e,"onUpdated"],[St,"onResize"],[pn,"onResized"],[jo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[un,"onScroll"],[ut,"onScrolled"],[Dn,"onDestroy"],[Uo,"onArrowsMounted"],[qo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Un,"onNavigationMounted"],[qn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[Gn,"onAutoplayPause"],[Yn,"onLazyLoadLoaded"]];function to(...e){return e.filter(Boolean).join(" ")}function sn(e){return e!==null&&typeof e=="object"}function Mn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Mn(n,t[o]));if(sn(e)&&sn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Mn(e[r],t[r]))}return e===t}function ya(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ha(e,t){if(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&t(e[r],r)===!1)break}}return e}function Wn(e,t){const n=e;return ha(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():sn(o)?n[r]=Wn(sn(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>A.createElement("div",{className:to("splide__track",t),...n},A.createElement("ul",{className:"splide__list"},e)),ur=class extends A.Component{constructor(){super(...arguments),this.splideRef=A.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new eo(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Wn({},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&&!Mn(this.options,e)&&(this.splide.options=e,this.options=Wn({},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){bo.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 A.createElement(t,{className:to("splide",e),ref:this.splideRef,...this.omit(r,["options",...bo.map(s=>s[1])])},n?A.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>A.createElement("li",{className:to("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),w=require("react"),he=require("classnames"),$=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),yr=require("react-dom");function vr(e){return e.type==="object"&&e.version===1}const br="ControlSlider-module__wrapper___sHEkd",xr="ControlSlider-module__hoverArrow___A-dOH",Sr="ControlSlider-module__sliderItem___QQSkR",Cr="ControlSlider-module__sliderImage___9hRl-",wr="ControlSlider-module__arrow___05ghY",$r="ControlSlider-module__arrowVertical___tBfVN",Tr="ControlSlider-module__nextArrow___-30Yc",_r="ControlSlider-module__arrowInner___aEra3",Er="ControlSlider-module__arrowIcon___S4ztF",Ar="ControlSlider-module__arrowImg___2dwJW",Lr="ControlSlider-module__mirror___brd6U",kr="ControlSlider-module__pagination___bicLF",Ir="ControlSlider-module__paginationInner___bT-P-",Fr="ControlSlider-module__paginationVertical___zYqKw",Pr="ControlSlider-module__paginationItem___nTRbk",Mr="ControlSlider-module__dot___p1Qun",Rr="ControlSlider-module__activeDot___LHFaj",Wr="ControlSlider-module__paginationInsideBottom___R3FWn",Hr="ControlSlider-module__paginationInsideTop___V-qb-",Nr="ControlSlider-module__paginationOutsideBottom___14w8D",Vr="ControlSlider-module__paginationOutsideTop___SCLqB",jr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",zr="ControlSlider-module__paginationOutsideLeft___lahaw",Br="ControlSlider-module__paginationOutsideRight___EtuQa",Dr="ControlSlider-module__imgWrapper___UjEgB",qr="ControlSlider-module__captionBlock___dJ6-j",Ur="ControlSlider-module__captionTextWrapper___HFlpf",Gr="ControlSlider-module__captionText___uGBVc",Yr="ControlSlider-module__active___WZK4G",Xr="ControlSlider-module__withPointerEvents___t-18M",Kr="ControlSlider-module__topLeftAlignment___zjnGM",Zr="ControlSlider-module__topCenterAlignment___gD1xW",Jr="ControlSlider-module__topRightAlignment___NMapS",Qr="ControlSlider-module__middleLeftAlignment___OnUrY",ei="ControlSlider-module__middleCenterAlignment___Tdkl0",ti="ControlSlider-module__middleRightAlignment___wEbfX",ni="ControlSlider-module__bottomLeftAlignment___cTP2-",oi="ControlSlider-module__bottomCenterAlignment___c54fB",ri="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",si="ControlSlider-module__cover___KdDat",J={wrapper:br,hoverArrow:xr,sliderItem:Sr,sliderImage:Cr,arrow:wr,arrowVertical:$r,nextArrow:Tr,arrowInner:_r,arrowIcon:Er,arrowImg:Ar,mirror:Lr,pagination:kr,paginationInner:Ir,paginationVertical:Fr,paginationItem:Pr,dot:Mr,activeDot:Rr,paginationInsideBottom:Wr,paginationInsideTop:Hr,paginationOutsideBottom:Nr,paginationOutsideTop:Vr,paginationInsideLeft:jr,paginationInsideRight:Or,paginationOutsideLeft:zr,paginationOutsideRight:Br,imgWrapper:Dr,captionBlock:qr,captionTextWrapper:Ur,captionText:Gr,active:Yr,withPointerEvents:Xr,topLeftAlignment:Kr,topCenterAlignment:Zr,topRightAlignment:Jr,middleLeftAlignment:Qr,middleCenterAlignment:ei,middleRightAlignment:ti,bottomLeftAlignment:ni,bottomCenterAlignment:oi,bottomRightAlignment:ri,clickOverlay:ii,contain:ai,cover:si};function li(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 ci(e,t,n){return t&&li(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var no="(prefers-reduced-motion: reduce)",mt=1,ui=2,yt=3,xt=4,Rt=5,Kt=6,en=7,pi={CREATED:mt,MOUNTED:ui,IDLE:yt,MOVING:xt,SCROLLING:Rt,DRAGGING:Kt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Eo=setTimeout,$n=function(){};function oo(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Mn(e)&&an("object",e)}var Pn=Array.isArray,Ao=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Mn(e){return e===null}function Lo(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Pn(e)?e:[e]}function Le(e,t){Ht(e).forEach(t)}function Rn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function Be(e,t,n){e&&Le(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){Be(e,Ze(t)?t.split(" "):t,!0)}function Nt(e,t){Le(t,e.appendChild.bind(e))}function Wn(e,t){Le(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function At(e,t){return Lo(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function ko(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return At(o,t)}):n}function Vt(e,t){return t?ko(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 kt(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Xe(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Pn(n)?e[o]=n.slice():Et(n)?e[o]=Xe({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function ro(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 le(e,t,n){Et(t)?rt(t,function(o,r){le(e,r,o)}):Le(e,function(o){Mn(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):le(o,t)),n&&Nt(n,o),o}function Ie(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Mn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function Io(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function io(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 Fo(e){return Vt(new DOMParser().parseFromString(e,"text/html").body)}function ze(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Po(e,t){return e&&e.querySelector(t)}function Hn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){Be(e,t,!1)}function Tn(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var jt="splide",Nn="data-"+jt;function Tt(e,t){if(!e)throw new Error("["+jt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Mo(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),a=tn(t,n);return o?r<e&&e<a:r<=e&&e<=a}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function _n(e){return+(e>0)-+(e<0)}function En(e,t){return Le(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var ao={};function di(e){return""+e+Vn(ao[e]=(ao[e]||0)+1)}function Ro(){var e=[];function t(i,u,c,m){r(i,u,function(l,A,S){var g="addEventListener"in l,p=g?l.removeEventListener.bind(l,A,c,m):l.removeListener.bind(l,c);g?l.addEventListener(A,c,m):l.addListener(c),e.push([l,A,S,c,p])})}function n(i,u,c){r(i,u,function(m,l,A){e=e.filter(function(S){return S[0]===m&&S[1]===l&&S[2]===A&&(!c||S[3]===c)?(S[4](),!1):!0})})}function o(i,u,c){var m,l=!0;return typeof CustomEvent=="function"?m=new CustomEvent(u,{bubbles:l,detail:c}):(m=document.createEvent("CustomEvent"),m.initCustomEvent(u,l,!1,c)),i.dispatchEvent(m),m}function r(i,u,c){Le(i,function(m){m&&Le(u,function(l){l.split(" ").forEach(function(A){var S=A.split(".");c(m,S[0],S[1])})})})}function a(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:a}}var et="mounted",An="ready",Ge="move",St="moved",jn="click",Wo="active",Ho="inactive",No="visible",Vo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",jo="drag",Oo="dragging",zo="dragged",ln="scroll",st="scrolled",mi="overflow",On="destroy",Bo="arrows:mounted",Do="arrows:updated",qo="pagination:mounted",Uo="pagination:updated",zn="navigation:mounted",Bn="autoplay:play",Go="autoplay:playing",Dn="autoplay:pause",qn="lazyload:loaded",Yo="sk",Xo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ro();function o(a,i){n.bind(t,Ht(a).join(" "),function(u){i.apply(i,Pn(u.detail)?u.detail:[])})}function r(a){n.dispatch(t,a,Qe(arguments,1))}return e&&e.event.on(On,n.destroy),kt(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,a,i=0,u,c=!0,m=0;function l(){if(!c){if(i=e?Je((r()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=r(),o&&++m>=o))return S();u=oo(l)}}function A(h){h||p(),a=r()-(h?i*e:0),c=!1,u=oo(l)}function S(){c=!0}function g(){a=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,c=!0}function d(h){e=h}function x(){return c}return{start:A,rewind:g,pause:S,cancel:p,set:d,isPaused:x}}function gi(e){var t=e;function n(r){t=r}function o(r){return Rn(Ht(r),t)}return{set:n,is:o}}function fi(e,t){var n=cn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hi(e,t,n){var o=e.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Ro(),u=[];function c(){var p=n.mediaQuery==="min";Lt(r).sort(function(d,x){return p?+d-+x:+x-+d}).forEach(function(d){l(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),l(a,no),A()}function m(p){p&&i.destroy()}function l(p,d){var x=matchMedia(d);i.bind(x,"change",A),u.push([p,x])}function A(){var p=o.is(en),d=n.direction,x=u.reduce(function(h,y){return Xe(h,y[1].matches?y[0]:{})},{});ro(n),g(x),n.destroy?e.destroy(n.destroy==="completely"):p?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function S(p){matchMedia(no).matches&&(p?Xe(n,a):ro(n,Lt(a)))}function g(p,d,x){Xe(n,p),d&&Xe(Object.getPrototypeOf(n),p),(x||!o.is(mt))&&e.emit(Te,n)}return{setup:c,destroy:m,reduce:S,set:g}}var un="Arrow",pn=un+"Left",dn=un+"Right",Ko=un+"Up",Zo=un+"Down",so="rtl",mn="ttb",vn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Ko,dn],ArrowRight:[Zo,pn]};function yi(e,t,n){function o(a,i,u){u=u||n.direction;var c=u===so&&!i?1:u===mn?0:-1;return vn[a]&&vn[a][c]||a.replace(/width|left|right/i,function(m,l){var A=vn[m.toLowerCase()][c]||m;return l>0?A.charAt(0).toUpperCase()+A.slice(1):A})}function r(a){return a*(n.direction===so?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",vi="disabled",Pe="aria-",Ot=Pe+"controls",Jo=Pe+"current",lo=Pe+"selected",Ae=Pe+"label",Un=Pe+"labelledby",Qo=Pe+"hidden",Gn=Pe+"orientation",Pt=Pe+"roledescription",co=Pe+"live",uo=Pe+"busy",po=Pe+"atomic",Yn=[qe,ft,vi,Ot,Jo,Ae,Un,Qo,Gn,Pt],Ne=jt+"__",tt="is-",bn=jt,mo=Ne+"track",bi=Ne+"list",gn=Ne+"slide",er=gn+"--clone",xi=gn+"__container",Xn=Ne+"arrows",fn=Ne+"arrow",tr=fn+"--prev",nr=fn+"--next",hn=Ne+"pagination",or=hn+"__page",Si=Ne+"progress",Ci=Si+"__bar",wi=Ne+"toggle",$i=Ne+"spinner",Ti=Ne+"sr",_i=tt+"initialized",at=tt+"active",rr=tt+"prev",ir=tt+"next",Ln=tt+"visible",kn=tt+"loading",ar=tt+"focus-in",sr=tt+"overflow",Ei=[at,Ln,rr,ir,kn,ar,sr],Ai={slide:gn,clone:er,arrows:Xn,arrow:fn,prev:tr,next:nr,pagination:hn,page:or,spinner:$i};function Li(e,t){if(Ao(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!At(n,t);)n=n.parentElement;return n}var ki=5,go=200,lr="touchstart mousedown",xn="touchmove mousemove",Sn="touchend touchcancel mouseup click";function Ii(e,t,n){var o=be(e),r=o.on,a=o.bind,i=e.root,u=n.i18n,c={},m=[],l=[],A=[],S,g,p;function d(){_(),D(),y()}function x(){r(Se,h),r(Se,d),r(Te,y),a(document,lr+" keydown",function(b){p=b.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Be(i,ar,!!p)})}function h(b){var C=Yn.concat("style");Ue(m),De(i,l),De(S,A),He([S,g],C),He(i,b?C:["style",Pt])}function y(){De(i,l),De(S,A),l=E(bn),A=E(mo),We(i,l),We(S,A),le(i,Ae,n.label),le(i,Un,n.labelledby)}function _(){S=W("."+mo),g=Vt(S,"."+bi),Tt(S&&g,"A track/list element is missing."),Zt(m,ko(g,"."+gn+":not(."+er+")")),rt({arrows:Xn,pagination:hn,prev:tr,next:nr,bar:Ci,toggle:wi},function(b,C){c[C]=W("."+b)}),kt(c,{root:i,track:S,list:g,slides:m})}function D(){var b=i.id||di(jt),C=n.role;i.id=b,S.id=S.id||b+"-track",g.id=g.id||b+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&C&&le(i,qe,C),le(i,Pt,u.carousel),le(g,qe,"presentation")}function W(b){var C=Po(i,b);return C&&Li(C,"."+bn)===i?C:void 0}function E(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===bn&&at]}return kt(c,{setup:d,mount:x,destroy:h})}var bt="slide",Ct="loop",zt="fade";function Fi(e,t,n,o){var r=be(e),a=r.on,i=r.emit,u=r.bind,c=e.Components,m=e.root,l=e.options,A=l.isNavigation,S=l.updateOnMove,g=l.i18n,p=l.pagination,d=l.slideFocus,x=c.Direction.resolve,h=Fe(o,"style"),y=Fe(o,Ae),_=n>-1,D=Vt(o,"."+xi),W;function E(){_||(o.id=m.id+"-slide"+Vn(t+1),le(o,qe,p?"tabpanel":"group"),le(o,Pt,g.slide),le(o,Ae,y||En(g.slideLabel,[t+1,e.length]))),b()}function b(){u(o,"click",ve(i,jn,L)),u(o,"keydown",ve(i,Yo,L)),a([St,Xo,st],M),a(zn,F),S&&a(Ge,j)}function C(){W=!0,r.destroy(),De(o,Ei),He(o,Yn),le(o,"style",h),le(o,Ae,y||"")}function F(){var k=e.splides.map(function(T){var R=T.splide.Components.Slides.getAt(t);return R?R.slide.id:""}).join(" ");le(o,Ae,En(g.slideX,(_?n:t)+1)),le(o,Ot,k),le(o,qe,d?"button":""),d&&He(o,Pt)}function j(){W||M()}function M(){if(!W){var k=e.index;H(),V(),Be(o,rr,t===k-1),Be(o,ir,t===k+1)}}function H(){var k=U();k!==io(o,at)&&(Be(o,at,k),le(o,Jo,A&&k||""),i(k?Wo:Ho,L))}function V(){var k=f(),T=!k&&(!U()||_);if(e.state.is([xt,Rt])||le(o,Qo,T||""),le(Hn(o,l.focusableNodes||""),ft,T?-1:""),d&&le(o,ft,T?-1:0),k!==io(o,Ln)&&(Be(o,Ln,k),i(k?No:Vo,L)),!k&&document.activeElement===o){var R=c.Slides.getAt(e.index);R&&Io(R.slide)}}function B(k,T,R){Ie(R&&D||o,k,T)}function U(){var k=e.index;return k===t||l.cloneStatus&&k===n}function f(){if(e.is(zt))return U();var k=Ee(c.Elements.track),T=Ee(o),R=x("left",!0),Z=x("right",!0);return nn(k[R])<=Ft(T[R])&&nn(T[Z])<=Ft(k[Z])}function I(k,T){var R=_e(k-t);return!_&&(l.rewind||e.is(Ct))&&(R=Je(R,e.length-R)),R<=T}var L={index:t,slideIndex:n,slide:o,container:D,isClone:_,mount:E,destroy:C,update:M,style:B,isWithin:I};return L}function Pi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=o.bind,u=t.Elements,c=u.slides,m=u.list,l=[];function A(){S(),r(Se,g),r(Se,S)}function S(){c.forEach(function(M,H){d(M,H,-1)})}function g(){W(function(M){M.destroy()}),Ue(l)}function p(){W(function(M){M.update()})}function d(M,H,V){var B=Fi(e,H,V,M);B.mount(),l.push(B),l.sort(function(U,f){return U.index-f.index})}function x(M){return M?E(function(H){return!H.isClone}):l}function h(M){var H=t.Controller,V=H.toIndex(M),B=H.hasFocus()?1:n.perPage;return E(function(U){return Jt(U.index,V,V+B-1)})}function y(M){return E(M)[0]}function _(M,H){Le(M,function(V){if(Ze(V)&&(V=Fo(V)),Lo(V)){var B=c[H];B?Wn(V,B):Nt(m,V),We(V,n.classes.slide),C(V,ve(a,vt))}}),a(Se)}function D(M){it(E(M).map(function(H){return H.slide})),a(Se)}function W(M,H){x(H).forEach(M)}function E(M){return l.filter(Ao(M)?M:function(H){return Ze(M)?At(H.slide,M):Rn(Ht(M),H.index)})}function b(M,H,V){W(function(B){B.style(M,H,V)})}function C(M,H){var V=Hn(M,"img"),B=V.length;B?V.forEach(function(U){i(U,"load error",function(){--B||H()})}):H()}function F(M){return M?c.length:l.length}function j(){return l.length>n.perPage}return{mount:A,destroy:g,update:p,register:d,get:x,getIn:h,getAt:y,add:_,remove:D,forEach:W,filter:E,style:b,getLength:F,isEnough:j}}function Mi(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,l=m.root,A=m.track,S=m.list,g=u.getAt,p=u.style,d,x,h;function y(){_(),a(window,"resize load",fi(ve(i,vt))),r([Te,Se],_),r(vt,D)}function _(){d=n.direction===mn,Ie(l,"maxWidth",ot(n.width)),Ie(A,c("paddingLeft"),W(!1)),Ie(A,c("paddingRight"),W(!0)),D(!0)}function D(L){var k=Ee(l);(L||x.width!==k.width||x.height!==k.height)&&(Ie(A,"height",E()),p(c("marginRight"),ot(n.gap)),p("width",C()),p("height",F(),!0),x=k,i(sn),h!==(h=I())&&(Be(l,sr,h),i(mi,h)))}function W(L){var k=n.padding,T=c(L?"right":"left");return k&&ot(k[T]||(Et(k)?0:k))||"0px"}function E(){var L="";return d&&(L=b(),Tt(L,"height or heightRatio is missing."),L="calc("+L+" - "+W(!1)+" - "+W(!0)+")"),L}function b(){return ot(n.height||Ee(S).width*n.heightRatio)}function C(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":j())}function F(){return ot(n.fixedHeight)||(d?n.autoHeight?null:j():b())}function j(){var L=ot(n.gap);return"calc((100%"+(L&&" + "+L)+")/"+(n.perPage||1)+(L&&" - "+L)+")"}function M(){return Ee(S)[c("width")]}function H(L,k){var T=g(L||0);return T?Ee(T.slide)[c("width")]+(k?0:U()):0}function V(L,k){var T=g(L);if(T){var R=Ee(T.slide)[c("right")],Z=Ee(S)[c("left")];return _e(R-Z)+(k?0:U())}return 0}function B(L){return V(e.length-1)-V(0)+H(0,L)}function U(){var L=g(0);return L&&parseFloat(Ie(L.slide,c("marginRight")))||0}function f(L){return parseFloat(Ie(A,c("padding"+(L?"Right":"Left"))))||0}function I(){return e.is(zt)||B(!0)>M()}return{mount:y,resize:D,listSize:M,slideSize:H,sliderSize:B,totalSize:V,getPadding:f,isOverflow:I}}var Ri=2;function Wi(e,t,n){var o=be(e),r=o.on,a=t.Elements,i=t.Slides,u=t.Direction.resolve,c=[],m;function l(){r(Se,A),r([Te,vt],g),(m=x())&&(p(m),t.Layout.resize(!0))}function A(){S(),l()}function S(){it(c),Ue(c),o.destroy()}function g(){var h=x();m!==h&&(m<h||!h)&&o.emit(Se)}function p(h){var y=i.get().slice(),_=y.length;if(_){for(;y.length<h;)Zt(y,y);Zt(y.slice(-h),y.slice(0,h)).forEach(function(D,W){var E=W<h,b=d(D.slide,W);E?Wn(b,y[0].slide):Nt(a.list,b),Zt(c,b),i.register(b,W-h+(E?0:_),D.index)})}}function d(h,y){var _=h.cloneNode(!0);return We(_,n.classes.clone),_.id=e.root.id+"-clone"+Vn(y+1),_}function x(){var h=n.clones;if(!e.is(Ct))h=0;else if(Wt(h)){var y=n[u("fixedWidth")]&&t.Layout.slideSize(0),_=y&&Ft(Ee(a.track)[u("width")]/y);h=_||n[u("autoWidth")]&&e.length||n.perPage*Ri}return h}return{mount:l,destroy:S}}function Hi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,l=u.totalSize,A=u.listSize,S=u.sliderSize,g=t.Direction,p=g.resolve,d=g.orient,x=t.Elements,h=x.list,y=x.track,_;function D(){_=t.Transition,r([et,sn,Te,Se],W)}function W(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function E(T,R,Z,ae){T!==R&&L(T>Z)&&(M(),C(j(B(),T>Z),!0)),i(xt),a(Ge,R,Z,T),_.start(R,function(){i(yt),a(St,R,Z,T),ae&&ae()})}function b(T){C(V(T,!0))}function C(T,R){if(!e.is(zt)){var Z=R?T:F(T);Ie(h,"transform","translate"+p("X")+"("+Z+"px)"),T!==Z&&a(Xo)}}function F(T){if(e.is(Ct)){var R=H(T),Z=R>t.Controller.getEnd(),ae=R<0;(ae||Z)&&(T=j(T,Z))}return T}function j(T,R){var Z=T-I(R),ae=S();return T-=d(ae*(Ft(_e(Z)/ae)||1))*(R?1:-1),T}function M(){C(B(),!0),_.cancel()}function H(T){for(var R=t.Slides.get(),Z=0,ae=1/0,te=0;te<R.length;te++){var ce=R[te].index,P=_e(V(ce,!0)-T);if(P<=ae)ae=P,Z=ce;else break}return Z}function V(T,R){var Z=d(l(T-1)-f(T));return R?U(Z):Z}function B(){var T=p("left");return Ee(h)[T]-Ee(y)[T]+d(m(!1))}function U(T){return n.trimSpace&&e.is(bt)&&(T=pt(T,0,d(S(!0)-A()))),T}function f(T){var R=n.focus;return R==="center"?(A()-c(T,!0))/2:+R*c(T)||0}function I(T){return V(T?t.Controller.getEnd():0,!!n.trimSpace)}function L(T){var R=d(j(B(),T));return T?R>=0:R<=h[p("scrollWidth")]-Ee(y)[p("width")]}function k(T,R){R=Wt(R)?B():R;var Z=T!==!0&&d(R)<d(I(!1)),ae=T!==!1&&d(R)>d(I(!0));return Z||ae}return{mount:D,move:E,jump:b,translate:C,shift:j,cancel:M,toIndex:H,toPosition:V,getPosition:B,getLimit:I,exceededLimit:k,reposition:W}}function Ni(e,t,n){var o=be(e),r=o.on,a=o.emit,i=t.Move,u=i.getPosition,c=i.getLimit,m=i.toPosition,l=t.Slides,A=l.isEnough,S=l.getLength,g=n.omitEnd,p=e.is(Ct),d=e.is(bt),x=ve(B,!1),h=ve(B,!0),y=n.start||0,_,D=y,W,E,b;function C(){F(),r([Te,Se,on],F),r(sn,j)}function F(){W=S(!0),E=n.perMove,b=n.perPage,_=L();var P=pt(y,0,g?_:W-1);P!==y&&(y=P,i.reposition())}function j(){_!==L()&&a(on)}function M(P,ee,fe){if(!ce()){var de=V(P),ge=I(de);ge>-1&&(ee||ge!==y)&&(Z(ge),i.move(de,ge,D,fe))}}function H(P,ee,fe,de){t.Scroll.scroll(P,ee,fe,function(){var ge=I(i.toIndex(u()));Z(g?Je(ge,_):ge),de&&de()})}function V(P){var ee=y;if(Ze(P)){var fe=P.match(/([+\-<>])(\d+)?/)||[],de=fe[1],ge=fe[2];de==="+"||de==="-"?ee=U(y+ +(""+de+(+ge||1)),y):de===">"?ee=ge?k(+ge):x(!0):de==="<"&&(ee=h(!0))}else ee=p?P:pt(P,0,_);return ee}function B(P,ee){var fe=E||(te()?1:b),de=U(y+fe*(P?-1:1),y,!(E||te()));return de===-1&&d&&!Mo(u(),c(!P),1)?P?0:_:ee?de:I(de)}function U(P,ee,fe){if(A()||te()){var de=f(P);de!==P&&(ee=P,P=de,fe=!1),P<0||P>_?!E&&(Jt(0,P,ee,!0)||Jt(_,ee,P,!0))?P=k(T(P)):p?P=fe?P<0?-(W%b||b):W:P:n.rewind?P=P<0?_:0:P=-1:fe&&P!==ee&&(P=k(T(ee)+(P<ee?-1:1)))}else P=-1;return P}function f(P){if(d&&n.trimSpace==="move"&&P!==y)for(var ee=u();ee===m(P,!0)&&Jt(P,0,e.length-1,!n.rewind);)P<y?--P:++P;return P}function I(P){return p?(P+W)%W||0:P}function L(){for(var P=W-(te()||p&&E?1:b);g&&P-- >0;)if(m(W-1,!0)!==m(P,!0)){P++;break}return pt(P,0,W-1)}function k(P){return pt(te()?P:b*P,0,_)}function T(P){return te()?Je(P,_):nn((P>=_?W-1:P)/b)}function R(P){var ee=i.toIndex(P);return d?pt(ee,0,_):ee}function Z(P){P!==y&&(D=y,y=P)}function ae(P){return P?D:y}function te(){return!Wt(n.focus)||n.isNavigation}function ce(){return e.state.is([xt,Rt])&&!!n.waitForTransition}return{mount:C,go:M,scroll:H,getNext:x,getPrev:h,getAdjacent:B,getEnd:L,setIndex:Z,getIndex:ae,toIndex:k,toPage:T,toDest:R,hasFocus:te,isBusy:ce}}var Vi="http://www.w3.org/2000/svg",ji="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",qt=40;function Oi(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.emit,u=n.classes,c=n.i18n,m=t.Elements,l=t.Controller,A=m.arrows,S=m.track,g=A,p=m.prev,d=m.next,x,h,y={};function _(){W(),r(Te,D)}function D(){E(),_()}function W(){var H=n.arrows;H&&!(p&&d)&&F(),p&&d&&(kt(y,{prev:p,next:d}),It(g,H?"":"none"),We(g,h=Xn+"--"+n.direction),H&&(b(),M(),le([p,d],Ot,S.id),i(Bo,p,d)))}function E(){o.destroy(),De(g,h),x?(it(A?[p,d]:g),p=d=null):He([p,d],Yn)}function b(){r([et,St,Se,st,on],M),a(d,"click",ve(C,">")),a(p,"click",ve(C,"<"))}function C(H){l.go(H,!0)}function F(){g=A||gt("div",u.arrows),p=j(!0),d=j(!1),x=!0,Nt(g,[p,d]),!A&&Wn(g,S)}function j(H){var V='<button class="'+u.arrow+" "+(H?u.prev:u.next)+'" type="button"><svg xmlns="'+Vi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||ji)+'" />';return Fo(V)}function M(){if(p&&d){var H=e.index,V=l.getPrev(),B=l.getNext(),U=V>-1&&H<V?c.last:c.prev,f=B>-1&&H>B?c.first:c.next;p.disabled=V<0,d.disabled=B<0,le(p,Ae,U),le(d,Ae,f),i(Do,p,d,V,B)}}return{arrows:y,mount:_,destroy:E,update:M}}var zi=Nn+"-interval";function Bi(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),b),c=u.isPaused,m=t.Elements,l=t.Elements,A=l.root,S=l.toggle,g=n.autoplay,p,d,x=g==="pause";function h(){g&&(y(),S&&le(S,Ot,m.track.id),x||_(),E())}function y(){n.pauseOnHover&&a(A,"mouseenter mouseleave",function(F){p=F.type==="mouseenter",W()}),n.pauseOnFocus&&a(A,"focusin focusout",function(F){d=F.type==="focusin",W()}),S&&a(S,"click",function(){x?_():D(!0)}),r([Ge,ln,Se],u.rewind),r(Ge,C)}function _(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=x=!1,E(),i(Bn))}function D(F){F===void 0&&(F=!0),x=!!F,E(),c()||(u.pause(),i(Dn))}function W(){x||(p||d?D(!1):_())}function E(){S&&(Be(S,at,!x),le(S,Ae,n.i18n[x?"play":"pause"]))}function b(F){var j=m.bar;j&&Ie(j,"width",F*100+"%"),i(Go,F)}function C(F){var j=t.Slides.getAt(F);u.set(j&&+Fe(j.slide,zi)||n.interval)}return{mount:h,destroy:u.cancel,play:_,pause:D,isPaused:c}}function Di(e,t,n){var o=be(e),r=o.on;function a(){n.cover&&(r(qn,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(c){t.Slides.forEach(function(m){var l=Vt(m.container||m.slide,"img");l&&l.src&&u(c,l,m)})}function u(c,m,l){l.style("background",c?'center/cover no-repeat url("'+m.src+'")':"",!0),It(m,c?"none":"")}return{mount:a,destroy:ve(i,!1)}}var qi=10,Ui=600,Gi=.6,Yi=1.5,Xi=800;function Ki(e,t,n){var o=be(e),r=o.on,a=o.emit,i=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,l=u.exceededLimit,A=u.translate,S=e.is(bt),g,p,d=1;function x(){r(Ge,D),r([Te,Se],W)}function h(b,C,F,j,M){var H=c();if(D(),F&&(!S||!l())){var V=t.Layout.sliderSize(),B=_n(b)*V*nn(_e(b)/V)||0;b=u.toPosition(t.Controller.toDest(b%V))+B}var U=Mo(H,b,1);d=1,C=U?0:C||tn(_e(b-H)/Yi,Xi),p=j,g=cn(C,y,ve(_,H,b,M),1),i(Rt),a(ln),g.start()}function y(){i(yt),p&&p(),a(st)}function _(b,C,F,j){var M=c(),H=b+(C-b)*E(j),V=(H-M)*d;A(M+V),S&&!F&&l()&&(d*=Gi,_e(V)<qi&&h(m(l(!0)),Ui,!1,p,!0))}function D(){g&&g.cancel()}function W(){g&&!g.isPaused()&&(D(),y())}function E(b){var C=n.easingFunc;return C?C(b):1-Math.pow(1-b,4)}return{mount:x,destroy:D,scroll:h,cancel:W}}var dt={passive:!1,capture:!0};function Zi(e,t,n){var o=be(e),r=o.on,a=o.emit,i=o.bind,u=o.unbind,c=e.state,m=t.Move,l=t.Scroll,A=t.Controller,S=t.Elements.track,g=t.Media.reduce,p=t.Direction,d=p.resolve,x=p.orient,h=m.getPosition,y=m.exceededLimit,_,D,W,E,b,C=!1,F,j,M;function H(){i(S,xn,$n,dt),i(S,Sn,$n,dt),i(S,lr,B,dt),i(S,"click",I,{capture:!0}),i(S,"dragstart",ze),r([et,Te],V)}function V(){var N=n.drag;me(!N),E=N==="free"}function B(N){if(F=!1,!j){var v=ge(N);de(N.target)&&(v||!N.button)&&(A.isBusy()?ze(N,!0):(M=v?S:window,b=c.is([xt,Rt]),W=null,i(M,xn,U,dt),i(M,Sn,f,dt),m.cancel(),l.cancel(),L(N)))}}function U(N){if(c.is(Kt)||(c.set(Kt),a(jo)),N.cancelable)if(b){m.translate(_+fe(te(N)));var v=ce(N)>go,q=C!==(C=y());(v||q)&&L(N),F=!0,a(Oo),ze(N)}else R(N)&&(b=T(N),ze(N))}function f(N){c.is(Kt)&&(c.set(yt),a(zo)),b&&(k(N),ze(N)),u(M,xn,U),u(M,Sn,f),b=!1}function I(N){!j&&F&&ze(N,!0)}function L(N){W=D,D=N,_=h()}function k(N){var v=Z(N),q=ae(v),K=n.rewind&&n.rewindByDrag;g(!1),E?A.scroll(q,0,n.snap):e.is(zt)?A.go(x(_n(v))<0?K?"<":"-":K?">":"+"):e.is(bt)&&C&&K?A.go(y(!0)?">":"<"):A.go(A.toDest(q),!0),g(!0)}function T(N){var v=n.dragMinThreshold,q=Et(v),K=q&&v.mouse||0,Q=(q?v.touch:+v)||10;return _e(te(N))>(ge(N)?Q:K)}function R(N){return _e(te(N))>_e(te(N,!0))}function Z(N){if(e.is(Ct)||!C){var v=ce(N);if(v&&v<go)return te(N)/v}return 0}function ae(N){return h()+_n(N)*Je(_e(N)*(n.flickPower||600),E?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(N,v){return ee(N,v)-ee(P(N),v)}function ce(N){return Tn(N)-Tn(P(N))}function P(N){return D===N&&W||D}function ee(N,v){return(ge(N)?N.changedTouches[0]:N)["page"+d(v?"Y":"X")]}function fe(N){return N/(C&&e.is(bt)?ki:1)}function de(N){var v=n.noDrag;return!At(N,"."+or+", ."+fn)&&(!v||!At(N,v))}function ge(N){return typeof TouchEvent<"u"&&N instanceof TouchEvent}function G(){return b}function me(N){j=N}return{mount:H,disable:me,isDragging:G}}var Ji={Spacebar:" ",Right:dn,Left:pn,Up:Ko,Down:Zo};function Kn(e){return e=Ze(e)?e:e.key,Ji[e]||e}var fo="keydown";function Qi(e,t,n){var o=be(e),r=o.on,a=o.bind,i=o.unbind,u=e.root,c=t.Direction.resolve,m,l;function A(){S(),r(Te,g),r(Te,S),r(Ge,d)}function S(){var h=n.keyboard;h&&(m=h==="global"?window:u,a(m,fo,x))}function g(){i(m,fo)}function p(h){l=h}function d(){var h=l;l=!0,Eo(function(){l=h})}function x(h){if(!l){var y=Kn(h);y===c(pn)?e.go("<"):y===c(dn)&&e.go(">")}}return{mount:A,destroy:g,disable:p}}var _t=Nn+"-lazy",Qt=_t+"-srcset",ea="["+_t+"], ["+Qt+"]";function ta(e,t,n){var o=be(e),r=o.on,a=o.off,i=o.bind,u=o.emit,c=n.lazyLoad==="sequential",m=[St,st],l=[];function A(){n.lazyLoad&&(S(),r(Se,S))}function S(){Ue(l),g(),c?h():(a(m),r(m,p),p())}function g(){t.Slides.forEach(function(y){Hn(y.slide,ea).forEach(function(_){var D=Fe(_,_t),W=Fe(_,Qt);if(D!==_.src||W!==_.srcset){var E=n.classes.spinner,b=_.parentElement,C=Vt(b,"."+E)||gt("span",E,b);l.push([_,y,C]),_.src||It(_,"none")}})})}function p(){l=l.filter(function(y){var _=n.perPage*((n.preloadPages||1)+1)-1;return y[1].isWithin(e.index,_)?d(y):!0}),l.length||a(m)}function d(y){var _=y[0];We(y[1].slide,kn),i(_,"load error",ve(x,y)),le(_,"src",Fe(_,_t)),le(_,"srcset",Fe(_,Qt)),He(_,_t),He(_,Qt)}function x(y,_){var D=y[0],W=y[1];De(W.slide,kn),_.type!=="error"&&(it(y[2]),It(D,""),u(qn,D,W),u(vt)),c&&h()}function h(){l.length&&d(l.shift())}return{mount:A,destroy:ve(Ue,l),check:p}}function na(e,t,n){var o=be(e),r=o.on,a=o.emit,i=o.bind,u=t.Slides,c=t.Elements,m=t.Controller,l=m.hasFocus,A=m.getIndex,S=m.go,g=t.Direction.resolve,p=c.pagination,d=[],x,h;function y(){_(),r([Te,Se,on],y);var j=n.pagination;p&&It(p,j?"":"none"),j&&(r([Ge,ln,st],F),D(),F(),a(qo,{list:x,items:d},C(e.index)))}function _(){x&&(it(p?Qe(x.children):x),De(x,h),Ue(d),x=null),o.destroy()}function D(){var j=e.length,M=n.classes,H=n.i18n,V=n.perPage,B=l()?m.getEnd()+1:Ft(j/V);x=p||gt("ul",M.pagination,c.track.parentElement),We(x,h=hn+"--"+b()),le(x,qe,"tablist"),le(x,Ae,H.select),le(x,Gn,b()===mn?"vertical":"");for(var U=0;U<B;U++){var f=gt("li",null,x),I=gt("button",{class:M.page,type:"button"},f),L=u.getIn(U).map(function(T){return T.slide.id}),k=!l()&&V>1?H.pageX:H.slideX;i(I,"click",ve(W,U)),n.paginationKeyboard&&i(I,"keydown",ve(E,U)),le(f,qe,"presentation"),le(I,qe,"tab"),le(I,Ot,L.join(" ")),le(I,Ae,En(k,U+1)),le(I,ft,-1),d.push({li:f,button:I,page:U})}}function W(j){S(">"+j,!0)}function E(j,M){var H=d.length,V=Kn(M),B=b(),U=-1;V===g(dn,!1,B)?U=++j%H:V===g(pn,!1,B)?U=(--j+H)%H:V==="Home"?U=0:V==="End"&&(U=H-1);var f=d[U];f&&(Io(f.button),S(">"+U),ze(M,!0))}function b(){return n.paginationDirection||n.direction}function C(j){return d[m.toPage(j)]}function F(){var j=C(A(!0)),M=C(A());if(j){var H=j.button;De(H,at),He(H,lo),le(H,ft,-1)}if(M){var V=M.button;We(V,at),le(V,lo,!0),le(V,ft,"")}a(Uo,{list:x,items:d},j,M)}return{items:d,mount:y,destroy:_,getAt:C,update:F}}var oa=[" ","Enter"];function ra(e,t,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&l()}function u(){a.forEach(function(p){p.destroy()}),Ue(a)}function c(){u(),i()}function m(p,d){var x=be(p);x.on(Ge,function(h,y,_){d.go(d.is(Ct)?_:h)}),a.push(x)}function l(){var p=be(e),d=p.on;d(jn,S),d(Yo,g),d([et,Te],A),a.push(p),p.emit(zn,e.splides)}function A(){le(t.Elements.list,Gn,n.direction===mn?"vertical":"")}function S(p){e.go(p.index)}function g(p,d){Rn(oa,Kn(d))&&(S(p),ze(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:c}}function ia(e,t,n){var o=be(e),r=o.bind,a=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(m){if(m.cancelable){var l=m.deltaY,A=l<0,S=Tn(m),g=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(l)>g&&S-a>p&&(e.go(A?"<":">"),a=S),c(A)&&ze(m)}}function c(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var aa=90;function sa(e,t,n){var o=be(e),r=o.on,a=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",Ti),c=cn(aa,ve(l,!1));function m(){i&&(S(!t.Autoplay.isPaused()),le(a,po,!0),u.textContent="…",r(Bn,ve(S,!0)),r(Dn,ve(S,!1)),r([St,st],ve(l,!0)))}function l(g){le(a,uo,g),g?(Nt(a,u),c.start()):(it(u),c.cancel())}function A(){He(a,[co,po,uo]),it(u)}function S(g){i&&le(a,co,g?"off":"polite")}return{mount:m,disable:S,destroy:A}}var la=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:Ii,Slides:Pi,Layout:Mi,Clones:Wi,Move:Hi,Controller:Ni,Arrows:Oi,Autoplay:Bi,Cover:Di,Scroll:Ki,Drag:Zi,Keyboard:Qi,LazyLoad:ta,Pagination:na,Sync:ra,Wheel:ia,Live:sa}),ca={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"},ua={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:Ai,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],a)}function a(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Eo(c)}return{mount:r,start:i,cancel:$n}}function da(e,t,n){var o=t.Move,r=t.Controller,a=t.Scroll,i=t.Elements.list,u=ve(Ie,i,"transition"),c;function m(){be(e).bind(i,"transitionend",function(g){g.target===i&&c&&(A(),c())})}function l(g,p){var d=o.toPosition(g,!0),x=o.getPosition(),h=S(g);_e(d-x)>=1&&h>=1?n.useScroll?a.scroll(d,h,!1,p):(u("transform "+h+"ms "+n.easing),o.translate(d,!0),c=p):(o.jump(g),p())}function A(){u(""),a.cancel()}function S(g){var p=n.rewindSpeed;if(e.is(bt)&&p){var d=r.getIndex(!0),x=r.getEnd();if(d===0&&g>=x||d>=x&&g===0)return p}return n.speed}return{mount:m,start:l,cancel:A}}var ma=(function(){function e(n,o){this.event=be(),this.Components={},this.state=gi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Po(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Xe({label:Fe(r,Ae)||"",labelledby:Fe(r,Un)||""},ua,e.defaults,o||{});try{Xe(o,JSON.parse(Fe(r,Nn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Xe({},o))}var t=e.prototype;return t.mount=function(o,r){var a=this,i=this.state,u=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=u,this._T=r||this._T||(this.is(zt)?pa:da),this._E=o||this._E;var c=kt({},la,this._E,{Transition:this._T});return rt(c,function(m,l){var A=m(a,u,a._o);u[l]=A,A.setup&&A.setup()}),rt(u,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,_i),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,a=this.state;return a.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),a.set(en)),this},ci(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})(),Zn=ma;Zn.defaults={};Zn.STATES=pi;var ho=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[jn,"onClick"],[Wo,"onActive"],[Ho,"onInactive"],[No,"onVisible"],[Vo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[jo,"onDrag"],[Oo,"onDragging"],[zo,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[On,"onDestroy"],[Bo,"onArrowsMounted"],[Do,"onArrowsUpdated"],[qo,"onPaginationMounted"],[Uo,"onPaginationUpdated"],[zn,"onNavigationMounted"],[Bn,"onAutoplayPlay"],[Go,"onAutoplayPlaying"],[Dn,"onAutoplayPause"],[qn,"onLazyLoadLoaded"]];function Jn(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function In(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!In(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)||!In(e[r],t[r]))}return e===t}function ga(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function fa(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 Fn(e,t){const n=e;return fa(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Fn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var ha=({children:e,className:t,...n})=>w.createElement("div",{className:Jn("splide__track",t),...n},w.createElement("ul",{className:"splide__list"},e)),cr=class extends w.Component{constructor(){super(...arguments),this.splideRef=w.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Zn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Fn({},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&&!In(this.options,e)&&(this.splide.options=e,this.options=Fn({},e));const t=this.getSlides();ga(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){ho.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return w.createElement(t,{className:Jn("splide",e),ref:this.splideRef,...this.omit(r,["options",...ho.map(a=>a[1])])},n?w.createElement(ha,null,o):o)}},ur=({children:e,className:t,...n})=>w.createElement("li",{className:Jn("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 ba="RichTextRenderer-module__link___BWeZ2",xa={link:ba},zt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?l.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):l.jsx("span",{style:Sa(o),children:o.text},r));return l.jsx(l.Fragment,{children:e.map((n,o)=>{const r=n.children;return l.jsx("div",{children:t(r)},o)})})};function Sa(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Ca="SvgImage-module__svg___q3xE-",wa="SvgImage-module__img___VsTm-",xo={svg:Ca,img:wa},Ta=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},_a=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,et=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=A.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return A.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Ta(e)||!s?l.jsx("img",{src:e,alt:"",className:ue(xo.img,o),style:r}):l.jsx("span",{"data-supports-mask":s,className:ue(xo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},$a={"top-left":Z.topLeftAlignment,"top-center":Z.topCenterAlignment,"top-right":Z.topRightAlignment,"middle-left":Z.middleLeftAlignment,"middle-center":Z.middleCenterAlignment,"middle-right":Z.middleRightAlignment,"bottom-left":Z.bottomLeftAlignment,"bottom-center":Z.bottomCenterAlignment,"bottom-right":Z.bottomRightAlignment};function Aa({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=A.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:p,textAlign:g,wordSpacing:u,fontSizeLineHeight:F,textAppearance:S,color:y}=n.imageCaption,[d,m]=A.useState(void 0),[w,v]=A.useState(null),[b,L]=A.useState(0),[G,N]=A.useState(0),{direction:T,transition:x,controls:R,pagination:C,imageCaption:O,triggers:W}=e,V=A.useRef(x.type),{x:H,y:Y}=e.controls.offset,D=f=>{r&&r.go(f)};return A.useEffect(()=>{if(!w)return;const f=new ResizeObserver(M=>{if(!r)return;const[E]=M;m({width:Math.round(E.contentRect.width),height:Math.round(E.contentRect.height)})});return f.observe(w),()=>f.unobserve(w)},[w]),A.useEffect(()=>{!r||V.current===x.type||(N(f=>f+1),V.current=x.type)},[x.type]),l.jsx("div",{className:ue(Z.wrapper,{[Z.editor]:o}),ref:v,children:l.jsxs("div",{className:Z.sliderInner,style:{width:d?d.width:"100%",height:d?d.height:"100%",backgroundColor:x.backgroundColor&&x.type==="fade in"?x.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&l.jsx("div",{className:ue(Z.captionBlock),children:l.jsx("div",{className:Z.captionTextWrapper,children:t.map((f,M)=>l.jsx("div",{className:ue(Z.captionText,$a[O.alignment],{[Z.withPointerEvents]:M===b&&o,[Z.active]:M===b}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":_.scalingValue(i.width,o),letterSpacing:_.scalingValue(p,o),wordSpacing:_.scalingValue(u,o),textAlign:g,fontSize:_.scalingValue(F.fontSize,o),lineHeight:_.scalingValue(F.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:y,transitionDuration:x.duration?`${Math.round(parseInt(x.duration)/2)}ms`:"500ms"},children:l.jsx("div",{"data-styles":"imageCaption",className:Z.captionTextInner,style:{"--link-hover-color":O.linkHoverColor,"--link-color":O.linkColor,position:"relative",top:_.scalingValue(O.offset.y,o),left:_.scalingValue(O.offset.x,o)},children:l.jsx(zt,{content:f.imageCaption})})},M))})}),l.jsx(ur,{onMove:f=>{L(f.index)},ref:s,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:T==="horiz"||x.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:d?d.width:"100%",height:d?d.height:"100%",type:x.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,M)=>l.jsx(dr,{children:l.jsx("div",{className:Z.sliderItem,children:l.jsx("div",{className:Z.imgWrapper,children:l.jsx("img",{className:ue(Z.sliderImage,{[Z.contain]:f.image.objectFit==="contain",[Z.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},M))},G),R.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ue(Z.arrow,{[Z.arrowVertical]:T==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{onClick:()=>{D("-1")},className:Z.arrowInner,style:{transform:`translate(${_.scalingValue(H,o)}, ${_.scalingValue(Y*(T==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&l.jsx(et,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:ue(Z.arrowImg,Z.mirror)}),!R.arrowsImgUrl&&l.jsx(So,{color:R.color,className:ue(Z.arrowIcon,Z.arrowImg,Z.mirror)})]})}),l.jsx("div",{className:ue(Z.arrow,Z.nextArrow,{[Z.arrowVertical]:T==="vert",[Z.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:l.jsxs("button",{className:Z.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${_.scalingValue(H*(T==="horiz"?-1:1),o)}, ${_.scalingValue(Y,o)}) scale(${e.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&l.jsx(et,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Z.arrowImg}),!R.arrowsImgUrl&&l.jsx(So,{color:R.color,className:ue(Z.arrowIcon,Z.arrowImg)})]})})]}),W.triggersList.click&&l.jsx("div",{className:Z.clickOverlay,onClick:()=>{r&&r.go("+1")}}),C.isActive&&l.jsx("div",{className:ue(Z.pagination,{[Z.paginationInsideBottom]:C.position==="inside-1"&&T==="horiz",[Z.paginationInsideTop]:C.position==="inside-2"&&T==="horiz",[Z.paginationOutsideBottom]:C.position==="outside-1"&&T==="horiz",[Z.paginationOutsideTop]:C.position==="outside-2"&&T==="horiz",[Z.paginationInsideLeft]:C.position==="inside-1"&&T==="vert",[Z.paginationInsideRight]:C.position==="inside-2"&&T==="vert",[Z.paginationOutsideLeft]:C.position==="outside-1"&&T==="vert",[Z.paginationOutsideRight]:C.position==="outside-2"&&T==="vert",[Z.paginationVertical]:T==="vert"}),children:l.jsx("div",{className:Z.paginationInner,style:{backgroundColor:C.colors[2],transform:`scale(${C.scale/100}) translate(${_.scalingValue(C.offset.x,o)}, ${_.scalingValue(C.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:t.map((f,M)=>l.jsx("button",{onClick:()=>{r&&r.go(M)},className:ue(Z.paginationItem),children:l.jsx("div",{className:ue(Z.dot,{[Z.activeDot]:M===b}),style:{backgroundColor:M===b?C.colors[0]:C.colors[1],"--pagination-hover-color":C.hover}})},M))})})]})})}function So({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const 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"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",La="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",ka="ImageRevealSlider-module__cursor___2U03d",gt={imageRevealSlider:Ea,image:La,link:Fa,cursor:ka};function Co(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,c=s/2,p=i/2;if(e>=o.x-c&&e<=o.x+c&&t>=o.y-p&&t<=o.y+p)return!0}return!1}function _n(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ra(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await _n(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await _n(e);s=i.height/i.width*r}else{const i=await _n(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ma({settings:e,content:t,isEditor:n}){const[o,r]=A.useState(null),[s,i]=A.useState([]),[c,p]=A.useState(0),g=A.useRef(0),[u,F]=A.useState({x:0,y:0}),[S,y]=A.useState(1),[d,m]=A.useState("none"),w=A.useRef({x:0,y:0}),[v,b]=A.useState(!1),{sizeType:L,imageWidth:G,randomRangeImageWidth:N}=e.imageSize,{revealPosition:T,visible:x}=e.position,{cursorType:R,target:C,defaultCursorScale:O,defaultCursor:W,hoverCursorScale:V,hoverCursor:H}=e.cursor;A.useEffect(()=>{if(!o)return;const f=(I,$)=>{const k=o.getBoundingClientRect(),J=I-k.left,ae=$-k.top;if(F({x:J,y:ae}),R==="system"){m("none"),y(1);return}const ne=J,ie=ae,P=document.elementFromPoint(k.left+ne,k.top+ie);if(P&&P.closest("a")){m("none"),y(1);return}const ee=Co(ne,ie,s)||C==="area"?{img:H??"none",scale:V}:{img:W??"none",scale:O};m(ee.img),y(ee.scale)},M=I=>{I.stopPropagation(),w.current={x:I.clientX,y:I.clientY},f(I.clientX,I.clientY)},E=()=>{v&&f(w.current.x,w.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",E,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",E,!0)}},[o,v,u,R,C,H,W,V,O,s]),A.useEffect(()=>{v||(m("none"),y(0))},[v]);const Y=async(f,M,E,I={})=>{const{width:$,height:k,finalWidth:J}=await Ra(f.image.url,L,G,N);let ae=0,ne=0;T==="same"?(ae=M/2,ne=E/2):(ae=I.x??Math.random()*M,ne=I.y??Math.random()*E);const ie=Math.min(Math.max(ae,$/2),M-$/2),P=Math.min(Math.max(ne,k/2),E-k/2);return{id:g.current++,url:f.image.url,link:f.link,name:f.image.name,x:ie,y:P,width:J}};A.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),M=f.width,E=f.height,I=[];(async()=>{const k=t[0],J=await Y(k,M,E);I.push(J),i(I),p(1)})()},[L,G,N,T,o]),A.useEffect(()=>{x==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[x]);const D=async f=>{if(!o)return;const M=o.getBoundingClientRect(),E=f.clientX-M.left,I=f.clientY-M.top;if(C==="image"&&!Co(E,I,s))return;let $=0,k=0;T==="on Click"?($=E,k=I):T==="same"?($=M.width/2,k=M.height/2):($=Math.random()*M.width,k=Math.random()*M.height);const J=t[c],ae=await Y(J,M.width,M.height,{x:$,y:k});i(ne=>x==="all"?[...ne,ae]:[ae]),p(ne=>ne>=t.length-1?0:ne+1)};return l.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),className:gt.imageRevealSlider,style:{cursor:d==="none"?"default":"none"},children:[s.map(f=>l.jsx("div",{className:gt.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:d==="none"?"default":"none"},children:C==="area"&&f.link?l.jsx("a",{href:f.link,target:"_blank",className:gt.link,children:l.jsx("img",{src:f.url,alt:f.name,className:gt.image},f.id)}):l.jsx("img",{src:f.url,alt:f.name,className:gt.image},f.id)},f.id)),v&&l.jsx("div",{className:gt.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${d}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Wa={element:Ma,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/clickGalleryImg.png"},defaultSize:{width:"100%",height:"100%"},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.cursor.defaultCursor"},{path:"settings.cursor.hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{imageSize:{title:"IMG SIZE",icon:"size",tooltip:"IMG SIZE",type:"object",properties:{sizeType:{type:"string",display:{type:"ratio-group"},enum:["as Is","custom","random"]},imageWidth:{type:"number",label:"W",display:{type:"numeric-input",visible:!1}},randomRangeImageWidth:{type:"object",display:{type:"random-range-controls",visible:!1},properties:{min:{type:"number"},max:{type:"number"}}}}},cursor:{title:"cursor",icon:"cursor",tooltip:"cursor",type:"object",properties:{cursorType:{type:"string",display:{type:"ratio-group"},enum:["system","custom"]},target:{type:"string",title:"Target",display:{type:"ratio-group"},enum:["area","image"]},defaultCursor:{type:["string","null"],title:"Default",display:{type:"settings-image-input",visible:!1}},defaultCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}},hoverCursor:{type:["string","null"],title:"Hover",display:{type:"settings-image-input",visible:!1}},hoverCursorScale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control",visible:!1}}}},position:{title:"position",icon:"transition",tooltip:"Position",type:"object",properties:{revealPosition:{type:"string",display:{type:"ratio-group"},enum:["random","same","on Click"]},visible:{type:"string",title:"Visible",display:{type:"ratio-group"},enum:["all","last One"]}}}},default:{imageSize:{sizeType:"custom",imageWidth:500,randomRangeImageWidth:{min:100,max:1e3}},cursor:{cursorType:"system",target:"area",defaultCursor:null,defaultCursorScale:2,hoverCursor:null,hoverCursorScale:2},position:{revealPosition:"random",visible:"all"}},displayRules:[{if:{name:"imageSize.sizeType",value:"custom"},then:{name:"properties.imageSize.properties.imageWidth.display.visible",value:!0}},{if:{name:"imageSize.sizeType",value:"random"},then:{name:"properties.imageSize.properties.randomRangeImageWidth.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"}],then:{name:"properties.cursor.properties.defaultCursor.display.visible",value:!0}},{if:[{name:"cursor.target",value:"image"},{name:"cursor.cursorType",value:"custom"},{name:"cursor.defaultCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.defaultCursorScale.display.visible",value:!0}},{if:{name:"cursor.cursorType",value:"custom"},then:{name:"properties.cursor.properties.hoverCursor.display.visible",value:!0}},{if:[{name:"cursor.cursorType",value:"custom"},{name:"cursor.hoverCursor",value:null,isNotEqual:!0}],then:{name:"properties.cursor.properties.hoverCursorScale.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:""},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:""}]}}}},Pa="LightBox-module__hidden___9s-9x",za="LightBox-module__heroImage___sTxNF",Ha="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",Na="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Ba="LightBox-module__contain___8-yaS",Da="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",qa="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ya="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Ka="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Za="LightBox-module__arrowIcon___3VaFf",Qa="LightBox-module__arrowImg___pNV88",el="LightBox-module__mirror___pjeXc",tl="LightBox-module__thumbsWrapper___GB-nU",nl="LightBox-module__thumbsContainerVertical___wttk5",ol="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",il="LightBox-module__thumbsAlignCenter___Q4sUx",al="LightBox-module__thumbsAlignEnd___p4y9R",ll="LightBox-module__thumbItem___HvnF3",sl="LightBox-module__closeButton___g2khP",cl="LightBox-module__fadeIn___0m5GW",pl="LightBox-module__slideInLeft___gPYwC",ul="LightBox-module__slideInRight___S-pPp",dl="LightBox-module__slideInTop___DFdAj",gl="LightBox-module__slideInBottom___m27kZ",ml="LightBox-module__fadeOut___55qBR",fl="LightBox-module__slideOutLeft___NvU7P",yl="LightBox-module__slideOutRight___SK7eC",hl="LightBox-module__slideOutTop___Vgg0z",vl="LightBox-module__slideOutBottom___nJ0Ef",bl="LightBox-module__scaleSlide___vZriG",q={hidden:Pa,heroImage:za,background:Ha,editor:Va,contentStyle:Na,imageStyle:Oa,imgWrapper:ja,contain:Ba,cover:Da,caption:Ua,captionTextInner:qa,lightboxSplide:Ga,arrow:Ya,arrowVertical:Xa,nextArrow:Ka,arrowInner:Ja,arrowIcon:Za,arrowImg:Qa,mirror:el,thumbsWrapper:tl,thumbsContainerVertical:nl,thumbsContainer:ol,thumbsAlignStart:rl,thumbsAlignCenter:il,thumbsAlignEnd:al,thumbItem:ll,closeButton:sl,fadeIn:cl,slideInLeft:pl,slideInRight:ul,slideInTop:dl,slideInBottom:gl,fadeOut:ml,slideOutLeft:fl,slideOutRight:yl,slideOutTop:hl,slideOutBottom:vl,scaleSlide:bl},Xt=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), calc(-50% + ${_.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${_.scalingValue(t.x,n)}, calc(-50% + ${_.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${_.scalingValue(t.x,n)}), ${_.scalingValue(t.y,n)})`:o.transform=`translate(${_.scalingValue(t.x,n)}, ${_.scalingValue(t.y,n)})`,o};function gr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function wo(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,c=o/r,p=s/i;let g,u;p>c?(g=o,u=o/p):(u=r,g=r*p);const F=t.left+n.left,S=t.top+n.top,y=(o-g)/2+F,d=(r-u)/2+S;return{x:y,y:d,width:g,height:u}}function To(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 _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 xl(e,t){const n=(()=>{if(e==="fade in")return q.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return q.fadeIn;if(e==="slide in")switch(t){case"left":return q.slideInLeft;case"right":return q.slideInRight;case"top":return q.slideInTop;case"bottom":return q.slideInBottom;default:return q.slideInRight}return q.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return q.fadeOut;if(e==="slide in")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})(),s=(()=>{if(e==="fade in")return q.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return q.slideOutLeft;case"right":return q.slideOutRight;case"top":return q.slideOutTop;case"bottom":return q.slideOutBottom;default:return q.slideOutRight}return q.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Sl=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,c]=A.useState(!1),{url:p}=e.thumbnailBlock.cover;return A.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),l.jsxs(l.Fragment,{children:[l.jsx("img",{src:p,alt:"Cover",className:q.heroImage,onClick:()=>c(!0)}),l.jsx(Cl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},Cl=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:c})=>{var U;const[p,g]=A.useState(0),[u,F]=A.useState(0),[S,y]=A.useState(!1),[d,m]=A.useState(!1),[w,v]=A.useState({}),b=A.useRef(null),L=A.useRef(null),G=A.useRef(null),N=A.useRef(!1),T=A.useRef(null),x=A.useRef(null),R=A.useRef(null),C=A.useRef(null),O=A.useRef(!1),W=A.useRef(null),[V,H]=A.useState(!1),{appear:Y,triggers:D,slider:f,thumbnail:M,controls:E,area:I,caption:$,layout:k}=r.lightboxBlock,{appearClass:J,backdropAppearClass:ae,backdropDisappearClass:ne,disappearClass:ie}=xl(Y.type,Y.direction),P=(c==null?void 0:c.itemId)??null;A.useEffect(()=>{const a=()=>{setTimeout(()=>{var z,j;(j=(z=b.current)==null?void 0:z.splide)==null||j.refresh()},16)},h=()=>{F(z=>z+1)};return window.addEventListener("ArticleEditor.Layout:change",a),window.addEventListener("ArticleEditor.ComponentContent:change",h),()=>{window.removeEventListener("ArticleEditor.Layout:change",a),window.removeEventListener("ArticleEditor.ComponentContent:change",h)}},[]),A.useEffect(()=>{if(!e||!M.isActive){H(!1);return}const a=W.current;if(!a)return;const h=()=>{f.direction==="horiz"?H(a.scrollWidth>a.clientWidth):H(a.scrollHeight>a.clientHeight)};h();const z=new ResizeObserver(h);return z.observe(a),()=>z.disconnect()},[e,M.isActive,n.length,w,f.direction]);const ee=A.useCallback(()=>{const a=window.matchMedia("(max-width: 768px)").matches,h=_o(I.color);a&&!i&&h>.9&&(document.body.style.backgroundColor=""),y(!0),N.current=!0;const z=j=>{j.target===T.current&&j.animationName&&(T.current&&x.current&&T.current.removeEventListener("animationend",x.current),x.current=null,N.current&&(N.current=!1,t()),y(!1))};T.current&&(x.current=z,T.current.addEventListener("animationend",z))},[t,I.color,i]),de=(a,h,z)=>{var j,B;if(a){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&p===n.length-1?ee():(j=b.current)==null||j.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const X=a.getBoundingClientRect(),K=h-X.left,te=z-X.top,oe=X.width,le=X.height;let ce;f.direction==="horiz"?ce=K<oe/2?"-1":"+1":ce=te<le/2?"-1":"+1",(B=b.current)==null||B.go(ce)}}},se=a=>{if(O.current){O.current=!1;return}const h=n[p],z=(h==null?void 0:h.image.objectFit)==="cover";let j,B;if("changedTouches"in a&&a.changedTouches.length>0)j=a.changedTouches[0].clientX,B=a.changedTouches[0].clientY;else if("clientX"in a)j=a.clientX,B=a.clientY;else return;let X;if(z&&G.current){const K=To(G.current);X=j>=K.left&&j<=K.right&&B>=K.top&&B<=K.bottom}else{const K=G.current?wo(G.current):null;if(!K){a.target===a.currentTarget&&ee();return}X=j>=K.x&&j<=K.x+K.width&&B>=K.y&&B<=K.y+K.height}X?de(G.current,j,B):ee()},ge=a=>{const h=a.target;(h.classList.contains(q.thumbsWrapper)||h.classList.contains(q.thumbsContainer))&&se(a)};A.useEffect(()=>{if(!e)return;const a=h=>{var z,j;if(h.key==="Escape"){ee();return}if(h.key==="ArrowRight"){g(B=>(B+1)%Math.max(n.length,1)),(z=b.current)==null||z.go("+1");return}h.key==="ArrowLeft"&&(g(B=>(B-1+Math.max(n.length,1))%Math.max(n.length,1)),(j=b.current)==null||j.go("-1"))};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[e,ee,n.length]),A.useEffect(()=>{if(e){if(g(0),F(h=>h+1),N.current=!1,y(!1),m(!1),v({}),!P)return;const a=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(a)}return()=>{T.current&&x.current&&(T.current.removeEventListener("animationend",x.current),x.current=null),m(!1)}},[e,P]),A.useEffect(()=>{L.current!==null&&L.current!==f.type&&F(a=>a+1),L.current=f.type},[f.type]),A.useEffect(()=>{if(!e)return;const a=document.body.style.overflow,h=window.matchMedia("(max-width: 768px)").matches,z=_o(I.color);document.body.style.overflow="hidden",m(!1);const j=X=>{X.target===T.current&&!N.current&&X.animationName&&(h&&!i&&z>.9&&(document.body.style.backgroundColor=I.color),m(!0),T.current&&R.current&&T.current.removeEventListener("animationend",R.current),R.current=null)};T.current&&(R.current=j,T.current.addEventListener("animationend",j));const B=X=>{const K=X.target;K&&(K.closest(`.${q.thumbsWrapper}`)||K.closest(`.${q.thumbsContainer}`))||f.type!=="slide"&&X.preventDefault()};return document.addEventListener("touchmove",B,{passive:!1}),()=>{document.body.style.overflow=a,document.removeEventListener("touchmove",B),T.current&&R.current&&(T.current.removeEventListener("animationend",R.current),R.current=null),m(!1)}},[e,i,I.color,f.type]),A.useEffect(()=>{if(!e)return;const a=h=>{var j,B;if(N.current){h.stopPropagation();return}if(O.current){O.current=!1;return}const z=h.target;if(!(z&&(z.closest(`.${q.thumbsContainer}`)||z.closest(`.${q.thumbItem}`)))){if(f.type==="slide"&&D.type==="drag"&&((B=(j=b.current)==null?void 0:j.splide)!=null&&B.root)){const X=b.current.splide.root;if(z&&(X.contains(z)||X===z))return}if(h.touches.length===0&&h.changedTouches.length>0){const X=n[p],K=(X==null?void 0:X.image.objectFit)==="cover",te=h.changedTouches[0];let oe;if(K&&G.current){const le=To(G.current);oe=te.clientX>=le.left&&te.clientX<=le.right&&te.clientY>=le.top&&te.clientY<=le.bottom}else{const le=G.current?wo(G.current):null;if(!le)return;oe=te.clientX>=le.x&&te.clientX<=le.x+le.width&&te.clientY>=le.y&&te.clientY<=le.y+le.height}if(!oe){h.stopPropagation(),N.current=!0;const le=ce=>{ce.stopPropagation(),ce.preventDefault(),document.removeEventListener("click",le,!0)};document.addEventListener("click",le,!0),ee()}}}};return document.addEventListener("touchend",a,{passive:!0}),()=>{document.removeEventListener("touchend",a)}},[e,ee,p,n]);const ye=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&D.type==="drag";A.useEffect(()=>{var ce,Se;if(!e||!ye||!((Se=(ce=b.current)==null?void 0:ce.splide)!=null&&Se.root))return;const a=b.current.splide.root,h=30,z=(Q,pe)=>{if(C.current){const he=Math.abs(Q-C.current.x),Ae=Math.abs(pe-C.current.y);(he>0||Ae>0)&&(O.current=!0)}},j=Q=>{C.current&&(Q.preventDefault(),z(Q.clientX,Q.clientY))},B=Q=>{C.current&&Q.touches.length>0&&(Q.preventDefault(),z(Q.touches[0].clientX,Q.touches[0].clientY))},X=(Q,pe)=>{if(!C.current||!b.current){C.current=null;return}const he=Math.abs(Q-C.current.x),Ae=Math.abs(pe-C.current.y);Ae>h&&Ae>he&&b.current.go(pe<C.current.y?"+1":"-1"),C.current=null},K=Q=>{C.current&&X(Q.clientX,Q.clientY),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("pointermove",j)},te=Q=>{if(C.current){if(Q.changedTouches.length>0){const pe=Q.changedTouches[0];X(pe.clientX,pe.clientY)}document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),document.removeEventListener("touchmove",B)}},oe=Q=>{C.current={x:Q.clientX,y:Q.clientY},O.current=!1,document.addEventListener("pointermove",j,{passive:!1}),document.addEventListener("pointerup",K),document.addEventListener("pointercancel",K)},le=Q=>{Q.touches.length>0&&(C.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},O.current=!1,document.addEventListener("touchmove",B,{passive:!1}),document.addEventListener("touchend",te),document.addEventListener("touchcancel",te))};return a.addEventListener("pointerdown",oe),a.addEventListener("touchstart",le),()=>{a.removeEventListener("pointerdown",oe),a.removeEventListener("touchstart",le),document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",K),document.removeEventListener("pointercancel",K),document.removeEventListener("touchmove",B),document.removeEventListener("touchend",te),document.removeEventListener("touchcancel",te),C.current=null,O.current=!1}},[e,ye,u]);const _e={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:br.createPortal(l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:i?null:T,className:ue(q.background,S?ne:ae,{[q.editor]:i},{[q.hidden]:!e}),style:{..._e,...d&&!i&&!S?{position:"absolute"}:{}}}),l.jsxs("div",{ref:i?T:null,className:ue(q.contentStyle,S?ie:J,{[q.editor]:i},{[q.hidden]:!e}),style:{animationDuration:`${parseInt(Y.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[l.jsx(ur,{onMove:a=>g(a.index),ref:b,className:q.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!ye,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((a,h)=>{const z=Xt(k.position,k.offset,i),j=`${_.scalingValue(k.padding.top,i)} ${_.scalingValue(k.padding.right,i)} ${_.scalingValue(k.padding.bottom,i)} ${_.scalingValue(k.padding.left,i)}`,B=f.type==="scale"?(()=>{const{transform:X,...K}=z;return{...K,position:"absolute",padding:j,boxSizing:"border-box","--position-transform":X||"none"}})():{...z,position:"absolute",padding:j,boxSizing:"border-box"};return l.jsx(dr,{children:l.jsx("div",{className:q.imgWrapper,onClick:se,children:l.jsx("img",{ref:h===p?G:null,className:ue(q.imageStyle,{[q.contain]:a.image.objectFit==="contain",[q.cover]:a.image.objectFit==="cover",[q.scaleSlide]:f.type==="scale"}),src:a.image.url,alt:a.image.name??"",style:{...B,pointerEvents:a.image.objectFit==="contain"?"none":"auto"}})})},h)})},u),E.isActive&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:ue(q.arrow,{[q.arrowVertical]:f.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${_.scalingValue(E.offset.x,i)}, ${_.scalingValue(E.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${E.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var a;return(a=b.current)==null?void 0:a.go("-1")},"aria-label":"Previous",children:[E.arrowsImgUrl&&l.jsx(et,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:ue(q.arrowImg,q.mirror)}),!E.arrowsImgUrl&&l.jsx($o,{color:E.color,className:ue(q.arrowIcon,q.arrowImg,q.mirror)})]})}),l.jsx("div",{className:ue(q.arrow,q.nextArrow,{[q.arrowVertical]:f.direction==="vert"}),style:{color:E.color,"--arrow-hover-color":E.hover},children:l.jsxs("button",{className:q.arrowInner,style:{transform:`translate(${_.scalingValue(E.offset.x*(f.direction==="horiz"?-1:1),i)}, ${_.scalingValue(E.offset.y,i)}) scale(${E.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var a;return(a=b.current)==null?void 0:a.go("+1")},"aria-label":"Next",children:[E.arrowsImgUrl&&l.jsx(et,{url:E.arrowsImgUrl,fill:E.color,hoverFill:E.hover,className:q.arrowImg}),!E.arrowsImgUrl&&l.jsx($o,{color:E.color,className:ue(q.arrowIcon,q.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const a=Xt(I.closeIconAlign,I.closeIconOffset,i),h=`scale(${I.closeIconScale})`,z=a.transform?`${a.transform} ${h}`:h;return l.jsx("button",{className:q.closeButton,style:{...a,transform:z},onClick:ee,"aria-label":"Close lightbox",children:l.jsx(et,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),$&&$.isActive&&o.imageCaption&&((U=n[p])==null?void 0:U.imageCaption)&&(()=>{const{widthSettings:a,fontSettings:h,letterSpacing:z,textAlign:j,wordSpacing:B,fontSizeLineHeight:X,textAppearance:K,color:te}=o.imageCaption;return l.jsx("div",{className:q.caption,style:{...Xt($.alignment,$.offset,i),fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontStyle:h.fontStyle,width:a.sizing==="auto"?"max-content":_.scalingValue(a.width,i),letterSpacing:_.scalingValue(z,i),wordSpacing:_.scalingValue(B,i),textAlign:j,fontSize:_.scalingValue(X.fontSize,i),lineHeight:_.scalingValue(X.lineHeight,i),textTransform:K.textTransform??"none",textDecoration:K.textDecoration??"none",fontVariant:K.fontVariant??"normal",color:te},onClick:oe=>oe.stopPropagation(),children:l.jsx("div",{"data-styles":"imageCaption",className:q.captionTextInner,style:{"--link-color":$.linkColor,"--link-hover-color":$.linkHoverColor},children:l.jsx(zt,{content:n[p].imageCaption})})})})(),M.isActive&&(()=>{const[a,h]=M.position.split("-"),z=f.direction==="horiz"?`${a}-left`:M.position,j=Xt(z,M.offset,i),B=()=>{if(f.direction==="horiz"){if(h==="left")return"flex-start";if(h==="center")return"center";if(h==="right")return"flex-end"}else{if(a==="top")return"flex-start";if(a==="middle")return"center";if(a==="bottom")return"flex-end"}return"flex-start"};return l.jsx("div",{ref:W,className:q.thumbsWrapper,onClick:X=>ge(X),style:{position:i?"absolute":"fixed",...j,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:l.jsx("div",{className:ue(q.thumbsContainer,{[q.thumbsContainerVertical]:f.direction==="vert",[q.thumbsAlignStart]:M.align==="start",[q.thumbsAlignCenter]:M.align==="center",[q.thumbsAlignEnd]:M.align==="end"}),style:{gap:_.scalingValue(M.grid.gap,i),justifyContent:V?"flex-start":B()},children:n.map((X,K)=>{const te=K===p,oe=w[K],ce=M.grid.size*(te?M.activeState.scale:1),Se=()=>{if(M.fit!=="fit")return{};if(!oe)return f.direction==="horiz"?{height:_.scalingValue(ce,i)}:{width:_.scalingValue(ce,i)};const Q=oe.width/oe.height;if(f.direction==="horiz"){const pe=ce,he=pe*Q;return{width:_.scalingValue(he,i),height:_.scalingValue(pe,i)}}else{const pe=ce,he=pe/Q;return{width:_.scalingValue(pe,i),height:_.scalingValue(he,i)}}};return l.jsx("button",{className:q.thumbItem,style:{...f.direction==="horiz"&&M.fit!=="fit"?{height:_.scalingValue(ce,i)}:{},...f.direction==="vert"&&M.fit!=="fit"?{width:_.scalingValue(ce,i)}:{},...M.fit==="cover"?{width:_.scalingValue(ce,i),height:_.scalingValue(ce,i)}:{},...Se(),transition:te?"all 0.25s ease-out":"none",opacity:te?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:Q=>{var pe;Q.stopPropagation(),g(K),(pe=b.current)==null||pe.go(K)},onMouseEnter:()=>{var Q;M.triggers==="hov"&&((Q=b.current)==null||Q.go(K))},children:l.jsx("img",{src:X.image.url,alt:X.image.name??"",onLoad:Q=>{const pe=Q.currentTarget;pe.naturalWidth&&pe.naturalHeight&&v(he=>({...he,[K]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:M.fit==="cover"?"cover":"contain",...M.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...M.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${X.image.name}-${K}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return l.jsx("svg",{viewBox:"0 0 10 18",className:t,children:l.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:l.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const wl={element:Sl,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 bt(e){const{color:t,...n}=e;return n}function Qe(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:_.scalingValue(e.letterSpacing,t),wordSpacing:_.scalingValue(e.wordSpacing,t),fontSize:_.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?_.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Kt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Tl(e){return`
|
|
6
|
+
*/const ya="RichTextRenderer-module__link___BWeZ2",va={link:ya},Mt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?s.jsx("a",{className:va.link,href:o.value,target:o.target,children:t(o.children)},r):s.jsx("span",{style:ba(o),children:o.text},r));return s.jsx(s.Fragment,{children:e.map((n,o)=>{const r=n.children;return s.jsx("div",{children:t(r)},o)})})};function ba(e){return{...e.fontFamily&&{fontFamily: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 xa="SvgImage-module__svg___q3xE-",Sa="SvgImage-module__img___VsTm-",yo={svg:xa,img:Sa},Ca=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},wa=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,Ke=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[a,i]=w.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return w.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ca(e)||!a?s.jsx("img",{src:e,alt:"",className:he(yo.img,o),style:r}):s.jsx("span",{"data-supports-mask":a,className:he(yo.svg,o),style:{"--svg":wa(e),"--fill":t,"--hover-fill":n,...r??{}}})},$a={"top-left":J.topLeftAlignment,"top-center":J.topCenterAlignment,"top-right":J.topRightAlignment,"middle-left":J.middleLeftAlignment,"middle-center":J.middleCenterAlignment,"middle-right":J.middleRightAlignment,"bottom-left":J.bottomLeftAlignment,"bottom-center":J.bottomCenterAlignment,"bottom-right":J.bottomRightAlignment};function Ta({settings:e,content:t,styles:n,isEditor:o}){const[r,a]=w.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:l,fontSizeLineHeight:A,textAppearance:S,color:g}=n.imageCaption,[p,d]=w.useState(void 0),[x,h]=w.useState(null),[y,_]=w.useState(0),[D,W]=w.useState(0),{direction:E,transition:b,controls:C,pagination:F,imageCaption:j,triggers:M}=e,H=w.useRef(b.type),{x:V,y:B}=e.controls.offset,U=f=>{r&&r.go(f)};return w.useEffect(()=>{if(!x)return;const f=new ResizeObserver(I=>{if(!r)return;const[L]=I;d({width:Math.round(L.contentRect.width),height:Math.round(L.contentRect.height)})});return f.observe(x),()=>f.unobserve(x)},[x]),w.useEffect(()=>{!r||H.current===b.type||(W(f=>f+1),H.current=b.type)},[b.type]),s.jsx("div",{className:he(J.wrapper,{[J.editor]:o}),ref:h,children:s.jsxs("div",{className:J.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&s.jsx("div",{className:he(J.captionBlock),children:s.jsx("div",{className:J.captionTextWrapper,children:t.map((f,I)=>s.jsx("div",{className:he(J.captionText,$a[j.alignment],{[J.withPointerEvents]:I===y&&o,[J.active]:I===y}),style:{fontFamily:u.fontFamily,fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":$.scalingValue(i.width,o),letterSpacing:$.scalingValue(c,o),wordSpacing:$.scalingValue(l,o),textAlign:m,fontSize:$.scalingValue(A.fontSize,o),lineHeight:$.scalingValue(A.lineHeight,o),textTransform:S.textTransform??"none",textDecoration:S.textDecoration??"none",fontVariant:S.fontVariant??"normal",color:g,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:s.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-hover-color":j.linkHoverColor,"--link-color":j.linkColor,position:"relative",top:$.scalingValue(j.offset.y,o),left:$.scalingValue(j.offset.x,o)},children:s.jsx(Mt,{content:f.imageCaption})})},I))})}),s.jsx(cr,{onMove:f=>{_(f.index)},ref:a,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:M.autoPlay!==null,...M.autoPlay!==null&&{interval:parseInt(M.autoPlay)*1e3},direction:E==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:M.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((f,I)=>s.jsx(ur,{children:s.jsx("div",{className:J.sliderItem,children:s.jsx("div",{className:J.imgWrapper,children:s.jsx("img",{className:he(J.sliderImage,{[J.contain]:f.image.objectFit==="contain",[J.cover]:f.image.objectFit==="cover"}),src:f.image.url,alt:f.image.name??""})})})},I))},D),C.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:he(J.arrow,{[J.arrowVertical]:E==="vert",[J.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{onClick:()=>{U("-1")},className:J.arrowInner,style:{transform:`translate(${$.scalingValue(V,o)}, ${$.scalingValue(B*(E==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&s.jsx(Ke,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:he(J.arrowImg,J.mirror)}),!C.arrowsImgUrl&&s.jsx(vo,{color:C.color,className:he(J.arrowIcon,J.arrowImg,J.mirror)})]})}),s.jsx("div",{className:he(J.arrow,J.nextArrow,{[J.arrowVertical]:E==="vert",[J.hoverArrow]:C.show==="on hover"}),style:{color:C.color,"--arrow-hover-color":C.hover},children:s.jsxs("button",{className:J.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${$.scalingValue(V*(E==="horiz"?-1:1),o)}, ${$.scalingValue(B,o)}) scale(${e.controls.scale/100}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:[C.arrowsImgUrl&&s.jsx(Ke,{url:C.arrowsImgUrl,fill:C.color,hoverFill:C.hover,className:J.arrowImg}),!C.arrowsImgUrl&&s.jsx(vo,{color:C.color,className:he(J.arrowIcon,J.arrowImg)})]})})]}),M.triggersList.click&&s.jsx("div",{className:J.clickOverlay,onClick:()=>{r&&r.go("+1")}}),F.isActive&&s.jsx("div",{className:he(J.pagination,{[J.paginationInsideBottom]:F.position==="inside-1"&&E==="horiz",[J.paginationInsideTop]:F.position==="inside-2"&&E==="horiz",[J.paginationOutsideBottom]:F.position==="outside-1"&&E==="horiz",[J.paginationOutsideTop]:F.position==="outside-2"&&E==="horiz",[J.paginationInsideLeft]:F.position==="inside-1"&&E==="vert",[J.paginationInsideRight]:F.position==="inside-2"&&E==="vert",[J.paginationOutsideLeft]:F.position==="outside-1"&&E==="vert",[J.paginationOutsideRight]:F.position==="outside-2"&&E==="vert",[J.paginationVertical]:E==="vert"}),children:s.jsx("div",{className:J.paginationInner,style:{backgroundColor:F.colors[2],transform:`scale(${F.scale/100}) translate(${$.scalingValue(F.offset.x,o)}, ${$.scalingValue(F.offset.y,o)}) rotate(${E==="horiz"?"0deg":"90deg"})`},children:t.map((f,I)=>s.jsx("button",{onClick:()=>{r&&r.go(I)},className:he(J.paginationItem),children:s.jsx("div",{className:he(J.dot,{[J.activeDot]:I===y}),style:{backgroundColor:I===y?F.colors[0]:F.colors[1],"--pagination-hover-color":F.hover}})},I))})})]})})}function vo({color:e,className:t}){return s.jsx("svg",{viewBox:"0 0 10 18",className:t,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const _a={element:Ta,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"]}},Ea="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Aa="ImageRevealSlider-module__image___Qjt-e",La="ImageRevealSlider-module__link___N-iLG",ka="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:Ea,image:Aa,link:La,cursor:ka};function bo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,u=a/2,c=i/2;if(e>=o.x-u&&e<=o.x+u&&t>=o.y-c&&t<=o.y+c)return!0}return!1}function Cn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ia(e,t,n,o){let r,a;if(t==="custom"){r=n;const i=await Cn(e);a=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await Cn(e);a=i.height/i.width*r}else{const i=await Cn(e);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Fa({settings:e,content:t,isEditor:n}){const[o,r]=w.useState(null),[a,i]=w.useState([]),[u,c]=w.useState(0),m=w.useRef(0),[l,A]=w.useState({x:0,y:0}),[S,g]=w.useState(1),[p,d]=w.useState("none"),x=w.useRef({x:0,y:0}),[h,y]=w.useState(!1),{sizeType:_,imageWidth:D,randomRangeImageWidth:W}=e.imageSize,{revealPosition:E,visible:b}=e.position,{cursorType:C,target:F,defaultCursorScale:j,defaultCursor:M,hoverCursorScale:H,hoverCursor:V}=e.cursor;w.useEffect(()=>{if(!o)return;const f=(k,T)=>{const R=o.getBoundingClientRect(),Z=k-R.left,ae=T-R.top;if(A({x:Z,y:ae}),C==="system"){d("none"),g(1);return}const te=Z,ce=ae,P=document.elementFromPoint(R.left+te,R.top+ce);if(P&&P.closest("a")){d("none"),g(1);return}const ee=bo(te,ce,a)||F==="area"?{img:V??"none",scale:H}:{img:M??"none",scale:j};d(ee.img),g(ee.scale)},I=k=>{k.stopPropagation(),x.current={x:k.clientX,y:k.clientY},f(k.clientX,k.clientY)},L=()=>{h&&f(x.current.x,x.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",L,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",L,!0)}},[o,h,l,C,F,V,M,H,j,a]),w.useEffect(()=>{h||(d("none"),g(0))},[h]);const B=async(f,I,L,k={})=>{const{width:T,height:R,finalWidth:Z}=await Ia(f.image.url,_,D,W);let ae=0,te=0;E==="same"?(ae=I/2,te=L/2):(ae=k.x??Math.random()*I,te=k.y??Math.random()*L);const ce=Math.min(Math.max(ae,T/2),I-T/2),P=Math.min(Math.max(te,R/2),L-R/2);return{id:m.current++,url:f.image.url,link:f.link,name:f.image.name,x:ce,y:P,width:Z}};w.useEffect(()=>{if(!o||t.length===0)return;const f=o.getBoundingClientRect(),I=f.width,L=f.height,k=[];(async()=>{const R=t[0],Z=await B(R,I,L);k.push(Z),i(k),c(1)})()},[_,D,W,E,o]),w.useEffect(()=>{b==="last One"&&i(f=>f.length>0?[f[f.length-1]]:[])},[b]);const U=async f=>{if(!o)return;const I=o.getBoundingClientRect(),L=f.clientX-I.left,k=f.clientY-I.top;if(F==="image"&&!bo(L,k,a))return;let T=0,R=0;E==="on Click"?(T=L,R=k):E==="same"?(T=I.width/2,R=I.height/2):(T=Math.random()*I.width,R=Math.random()*I.height);const Z=t[u],ae=await B(Z,I.width,I.height,{x:T,y:R});i(te=>b==="all"?[...te,ae]:[ae]),c(te=>te>=t.length-1?0:te+1)};return s.jsxs("div",{ref:r,onClick:U,onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[a.map(f=>s.jsx("div",{className:ut.wrapper,style:{top:`${f.y}px`,left:`${f.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:f.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:F==="area"&&f.link?s.jsx("a",{href:f.link,target:"_blank",className:ut.link,children:s.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)}):s.jsx("img",{src:f.url,alt:f.name,className:ut.image},f.id)},f.id)),h&&s.jsx("div",{className:ut.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${S})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Pa={element:Fa,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:""}]}}}},Ma="LightBox-module__hidden___9s-9x",Ra="LightBox-module__heroImage___sTxNF",Wa="LightBox-module__background___rm9ml",Ha="LightBox-module__editor___4ACaY",Na="LightBox-module__contentStyle___Bgnsq",Va="LightBox-module__imageStyle___tLIlB",ja="LightBox-module__imgWrapper___LuFUp",Oa="LightBox-module__contain___8-yaS",za="LightBox-module__cover___hNvOG",Ba="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",qa="LightBox-module__lightboxSplide___XFuWC",Ua="LightBox-module__arrow___iz38X",Ga="LightBox-module__arrowVertical___Zfz81",Ya="LightBox-module__nextArrow___zkAQN",Xa="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Za="LightBox-module__arrowImg___pNV88",Ja="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",es="LightBox-module__thumbsContainerVertical___wttk5",ts="LightBox-module__thumbsContainer___osSma",ns="LightBox-module__thumbsAlignStart___MO6tY",os="LightBox-module__thumbsAlignCenter___Q4sUx",rs="LightBox-module__thumbsAlignEnd___p4y9R",is="LightBox-module__thumbItem___HvnF3",as="LightBox-module__closeButton___g2khP",ss="LightBox-module__fadeIn___0m5GW",ls="LightBox-module__slideInLeft___gPYwC",cs="LightBox-module__slideInRight___S-pPp",us="LightBox-module__slideInTop___DFdAj",ps="LightBox-module__slideInBottom___m27kZ",ds="LightBox-module__fadeOut___55qBR",ms="LightBox-module__slideOutLeft___NvU7P",gs="LightBox-module__slideOutRight___SK7eC",fs="LightBox-module__slideOutTop___Vgg0z",hs="LightBox-module__slideOutBottom___nJ0Ef",ys="LightBox-module__scaleSlide___vZriG",z={hidden:Ma,heroImage:Ra,background:Wa,editor:Ha,contentStyle:Na,imageStyle:Va,imgWrapper:ja,contain:Oa,cover:za,caption:Ba,captionTextInner:Da,lightboxSplide:qa,arrow:Ua,arrowVertical:Ga,nextArrow:Ya,arrowInner:Xa,arrowIcon:Ka,arrowImg:Za,mirror:Ja,thumbsWrapper:Qa,thumbsContainerVertical:es,thumbsContainer:ts,thumbsAlignStart:ns,thumbsAlignCenter:os,thumbsAlignEnd:rs,thumbItem:is,closeButton:as,fadeIn:ss,slideInLeft:ls,slideInRight:cs,slideInTop:us,slideInBottom:ps,fadeOut:ds,slideOutLeft:ms,slideOutRight:gs,slideOutTop:fs,slideOutBottom:hs,scaleSlide:ys},Ut=(e,t,n)=>{const o={},[r,a]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), calc(-50% + ${$.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${$.scalingValue(t.x,n)}, calc(-50% + ${$.scalingValue(t.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${$.scalingValue(t.x,n)}), ${$.scalingValue(t.y,n)})`:o.transform=`translate(${$.scalingValue(t.x,n)}, ${$.scalingValue(t.y,n)})`,o};function pr(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 xo(e){const t=e.getBoundingClientRect(),n=pr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,u=o/r,c=a/i;let m,l;c>u?(m=o,l=o/c):(l=r,m=r*c);const A=t.left+n.left,S=t.top+n.top,g=(o-m)/2+A,p=(r-l)/2+S;return{x:g,y:p,width:m,height:l}}function So(e){const t=e.getBoundingClientRect(),n=pr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function Co(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 vs(e,t){const n=(()=>{if(e==="fade in")return z.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return z.slideInLeft;case"right":return z.slideInRight;case"top":return z.slideInTop;case"bottom":return z.slideInBottom;default:return z.slideInRight}return z.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return z.fadeIn;if(e==="slide in")switch(t){case"left":return z.slideInLeft;case"right":return z.slideInRight;case"top":return z.slideInTop;case"bottom":return z.slideInBottom;default:return z.slideInRight}return z.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return z.fadeOut;if(e==="slide in")switch(t){case"left":return z.slideOutLeft;case"right":return z.slideOutRight;case"top":return z.slideOutTop;case"bottom":return z.slideOutBottom;default:return z.slideOutRight}return z.fadeOut})(),a=(()=>{if(e==="fade in")return z.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return z.slideOutLeft;case"right":return z.slideOutRight;case"top":return z.slideOutTop;case"bottom":return z.slideOutBottom;default:return z.slideOutRight}return z.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const bs=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,u]=w.useState(!1),{url:c}=e.thumbnailBlock.cover;return w.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),s.jsxs(s.Fragment,{children:[s.jsx("img",{src:c,alt:"Cover",className:z.heroImage,onClick:()=>u(!0)}),s.jsx(xs,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:a})]})},xs=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:u})=>{var N;const[c,m]=w.useState(0),[l,A]=w.useState(0),[S,g]=w.useState(!1),[p,d]=w.useState(!1),[x,h]=w.useState({}),y=w.useRef(null),_=w.useRef(null),D=w.useRef(null),W=w.useRef(!1),E=w.useRef(null),b=w.useRef(null),C=w.useRef(null),F=w.useRef(null),j=w.useRef(!1),M=w.useRef(null),[H,V]=w.useState(!1),{appear:B,triggers:U,slider:f,thumbnail:I,controls:L,area:k,caption:T,layout:R}=r.lightboxBlock,{appearClass:Z,backdropAppearClass:ae,backdropDisappearClass:te,disappearClass:ce}=vs(B.type,B.direction),P=(u==null?void 0:u.itemId)??null;w.useEffect(()=>{const v=()=>{setTimeout(()=>{var K,Q;(Q=(K=y.current)==null?void 0:K.splide)==null||Q.refresh()},16)},q=()=>{A(K=>K+1)};return window.addEventListener("ArticleEditor.Layout:change",v),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",v),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),w.useEffect(()=>{if(!e||!I.isActive){V(!1);return}const v=M.current;if(!v)return;const q=()=>{f.direction==="horiz"?V(v.scrollWidth>v.clientWidth):V(v.scrollHeight>v.clientHeight)};q();const K=new ResizeObserver(q);return K.observe(v),()=>K.disconnect()},[e,I.isActive,n.length,x,f.direction]);const ee=w.useCallback(()=>{const v=window.matchMedia("(max-width: 768px)").matches,q=Co(k.color);v&&!i&&q>.9&&(document.body.style.backgroundColor=""),g(!0),W.current=!0;const K=Q=>{Q.target===E.current&&Q.animationName&&(E.current&&b.current&&E.current.removeEventListener("animationend",b.current),b.current=null,W.current&&(W.current=!1,t()),g(!1))};E.current&&(b.current=K,E.current.addEventListener("animationend",K))},[t,k.color,i]),fe=(v,q,K)=>{var Q,ie;if(v){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&c===n.length-1?ee():(Q=y.current)==null||Q.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const re=v.getBoundingClientRect(),ne=q-re.left,ue=K-re.top,O=re.width,X=re.height;let Y;f.direction==="horiz"?Y=ne<O/2?"-1":"+1":Y=ue<X/2?"-1":"+1",(ie=y.current)==null||ie.go(Y)}}},de=v=>{if(j.current){j.current=!1;return}const q=n[c],K=(q==null?void 0:q.image.objectFit)==="cover";let Q,ie;if("changedTouches"in v&&v.changedTouches.length>0)Q=v.changedTouches[0].clientX,ie=v.changedTouches[0].clientY;else if("clientX"in v)Q=v.clientX,ie=v.clientY;else return;let re;if(K&&D.current){const ne=So(D.current);re=Q>=ne.left&&Q<=ne.right&&ie>=ne.top&&ie<=ne.bottom}else{const ne=D.current?xo(D.current):null;if(!ne){v.target===v.currentTarget&&ee();return}re=Q>=ne.x&&Q<=ne.x+ne.width&&ie>=ne.y&&ie<=ne.y+ne.height}re?fe(D.current,Q,ie):ee()},ge=v=>{const q=v.target;(q.classList.contains(z.thumbsWrapper)||q.classList.contains(z.thumbsContainer))&&de(v)};w.useEffect(()=>{if(!e)return;const v=q=>{var K,Q;if(q.key==="Escape"){ee();return}if(q.key==="ArrowRight"){m(ie=>(ie+1)%Math.max(n.length,1)),(K=y.current)==null||K.go("+1");return}q.key==="ArrowLeft"&&(m(ie=>(ie-1+Math.max(n.length,1))%Math.max(n.length,1)),(Q=y.current)==null||Q.go("-1"))};return window.addEventListener("keydown",v),()=>{window.removeEventListener("keydown",v)}},[e,ee,n.length]),w.useEffect(()=>{if(e){if(m(0),A(q=>q+1),W.current=!1,g(!1),d(!1),h({}),!P)return;const v=new CustomEvent("page-overlay",{detail:{itemId:P}});window.dispatchEvent(v)}return()=>{E.current&&b.current&&(E.current.removeEventListener("animationend",b.current),b.current=null),d(!1)}},[e,P]),w.useEffect(()=>{_.current!==null&&_.current!==f.type&&A(v=>v+1),_.current=f.type},[f.type]),w.useEffect(()=>{if(!e)return;const v=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,K=Co(k.color);document.body.style.overflow="hidden",d(!1);const Q=re=>{re.target===E.current&&!W.current&&re.animationName&&(q&&!i&&K>.9&&(document.body.style.backgroundColor=k.color),d(!0),E.current&&C.current&&E.current.removeEventListener("animationend",C.current),C.current=null)};E.current&&(C.current=Q,E.current.addEventListener("animationend",Q));const ie=re=>{const ne=re.target;ne&&(ne.closest(`.${z.thumbsWrapper}`)||ne.closest(`.${z.thumbsContainer}`))||f.type!=="slide"&&re.preventDefault()};return document.addEventListener("touchmove",ie,{passive:!1}),()=>{document.body.style.overflow=v,document.removeEventListener("touchmove",ie),E.current&&C.current&&(E.current.removeEventListener("animationend",C.current),C.current=null),d(!1)}},[e,i,k.color,f.type]),w.useEffect(()=>{if(!e)return;const v=q=>{var Q,ie;if(W.current){q.stopPropagation();return}if(j.current){j.current=!1;return}const K=q.target;if(!(K&&(K.closest(`.${z.thumbsContainer}`)||K.closest(`.${z.thumbItem}`)))){if(f.type==="slide"&&U.type==="drag"&&((ie=(Q=y.current)==null?void 0:Q.splide)!=null&&ie.root)){const re=y.current.splide.root;if(K&&(re.contains(K)||re===K))return}if(q.touches.length===0&&q.changedTouches.length>0){const re=n[c],ne=(re==null?void 0:re.image.objectFit)==="cover",ue=q.changedTouches[0];let O;if(ne&&D.current){const X=So(D.current);O=ue.clientX>=X.left&&ue.clientX<=X.right&&ue.clientY>=X.top&&ue.clientY<=X.bottom}else{const X=D.current?xo(D.current):null;if(!X)return;O=ue.clientX>=X.x&&ue.clientX<=X.x+X.width&&ue.clientY>=X.y&&ue.clientY<=X.y+X.height}if(!O){q.stopPropagation(),W.current=!0;const X=Y=>{Y.stopPropagation(),Y.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),ee()}}}};return document.addEventListener("touchend",v,{passive:!0}),()=>{document.removeEventListener("touchend",v)}},[e,ee,c,n]);const G=(f.type==="scale"||f.type==="fade")&&f.direction==="vert"&&U.type==="drag";w.useEffect(()=>{var Y,se;if(!e||!G||!((se=(Y=y.current)==null?void 0:Y.splide)!=null&&se.root))return;const v=y.current.splide.root,q=30,K=(oe,pe)=>{if(F.current){const we=Math.abs(oe-F.current.x),$e=Math.abs(pe-F.current.y);(we>0||$e>0)&&(j.current=!0)}},Q=oe=>{F.current&&(oe.preventDefault(),K(oe.clientX,oe.clientY))},ie=oe=>{F.current&&oe.touches.length>0&&(oe.preventDefault(),K(oe.touches[0].clientX,oe.touches[0].clientY))},re=(oe,pe)=>{if(!F.current||!y.current){F.current=null;return}const we=Math.abs(oe-F.current.x),$e=Math.abs(pe-F.current.y);$e>q&&$e>we&&y.current.go(pe<F.current.y?"+1":"-1"),F.current=null},ne=oe=>{F.current&&re(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",Q)},ue=oe=>{if(F.current){if(oe.changedTouches.length>0){const pe=oe.changedTouches[0];re(pe.clientX,pe.clientY)}document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),document.removeEventListener("touchmove",ie)}},O=oe=>{F.current={x:oe.clientX,y:oe.clientY},j.current=!1,document.addEventListener("pointermove",Q,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},X=oe=>{oe.touches.length>0&&(F.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},j.current=!1,document.addEventListener("touchmove",ie,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue))};return v.addEventListener("pointerdown",O),v.addEventListener("touchstart",X),()=>{v.removeEventListener("pointerdown",O),v.removeEventListener("touchstart",X),document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",ie),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),F.current=null,j.current=!1}},[e,G,l]);const me={backgroundColor:k.color,backdropFilter:`blur(${k.blur}px)`,animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:yr.createPortal(s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:i?null:E,className:he(z.background,S?te:ae,{[z.editor]:i},{[z.hidden]:!e}),style:{...me,...p&&!i&&!S?{position:"absolute"}:{}}}),s.jsxs("div",{ref:i?E:null,className:he(z.contentStyle,S?ce:Z,{[z.editor]:i},{[z.hidden]:!e}),style:{animationDuration:`${parseInt(B.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[s.jsx(cr,{onMove:v=>m(v.index),ref:y,className:z.lightboxSplide,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,direction:f.direction==="horiz"||f.type==="fade"||f.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!G,perPage:1,width:"100%",height:"100%",type:f.type==="fade"||f.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":f.duration},children:n.map((v,q)=>{const K=Ut(R.position,R.offset,i),Q=`${$.scalingValue(R.padding.top,i)} ${$.scalingValue(R.padding.right,i)} ${$.scalingValue(R.padding.bottom,i)} ${$.scalingValue(R.padding.left,i)}`,ie=f.type==="scale"?(()=>{const{transform:re,...ne}=K;return{...ne,position:"absolute",padding:Q,boxSizing:"border-box","--position-transform":re||"none"}})():{...K,position:"absolute",padding:Q,boxSizing:"border-box"};return s.jsx(ur,{children:s.jsx("div",{className:z.imgWrapper,onClick:de,children:s.jsx("img",{ref:q===c?D:null,className:he(z.imageStyle,{[z.contain]:v.image.objectFit==="contain",[z.cover]:v.image.objectFit==="cover",[z.scaleSlide]:f.type==="scale"}),src:v.image.url,alt:v.image.name??"",style:{...ie,pointerEvents:v.image.objectFit==="contain"?"none":"auto"}})})},q)})},l),L.isActive&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:he(z.arrow,{[z.arrowVertical]:f.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:s.jsxs("button",{className:z.arrowInner,style:{transform:`translate(${$.scalingValue(L.offset.x,i)}, ${$.scalingValue(L.offset.y*(f.direction==="horiz"?1:-1),i)}) scale(${L.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var v;return(v=y.current)==null?void 0:v.go("-1")},"aria-label":"Previous",children:[L.arrowsImgUrl&&s.jsx(Ke,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:he(z.arrowImg,z.mirror)}),!L.arrowsImgUrl&&s.jsx(wo,{color:L.color,className:he(z.arrowIcon,z.arrowImg,z.mirror)})]})}),s.jsx("div",{className:he(z.arrow,z.nextArrow,{[z.arrowVertical]:f.direction==="vert"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:s.jsxs("button",{className:z.arrowInner,style:{transform:`translate(${$.scalingValue(L.offset.x*(f.direction==="horiz"?-1:1),i)}, ${$.scalingValue(L.offset.y,i)}) scale(${L.scale}) rotate(${f.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var v;return(v=y.current)==null?void 0:v.go("+1")},"aria-label":"Next",children:[L.arrowsImgUrl&&s.jsx(Ke,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:z.arrowImg}),!L.arrowsImgUrl&&s.jsx(wo,{color:L.color,className:he(z.arrowIcon,z.arrowImg)})]})})]}),k.closeIconUrl&&(()=>{const v=Ut(k.closeIconAlign,k.closeIconOffset,i),q=`scale(${k.closeIconScale})`,K=v.transform?`${v.transform} ${q}`:q;return s.jsx("button",{className:z.closeButton,style:{...v,transform:K},onClick:ee,"aria-label":"Close lightbox",children:s.jsx(Ke,{url:k.closeIconUrl,fill:k.closeIconColor??"#000000",hoverFill:k.closeIconHover??"#cccccc"})})})(),T&&T.isActive&&o.imageCaption&&((N=n[c])==null?void 0:N.imageCaption)&&(()=>{const{widthSettings:v,fontSettings:q,letterSpacing:K,textAlign:Q,wordSpacing:ie,fontSizeLineHeight:re,textAppearance:ne,color:ue}=o.imageCaption;return s.jsx("div",{className:z.caption,style:{...Ut(T.alignment,T.offset,i),fontFamily:q.fontFamily,fontWeight:q.fontWeight,fontStyle:q.fontStyle,width:v.sizing==="auto"?"max-content":$.scalingValue(v.width,i),letterSpacing:$.scalingValue(K,i),wordSpacing:$.scalingValue(ie,i),textAlign:Q,fontSize:$.scalingValue(re.fontSize,i),lineHeight:$.scalingValue(re.lineHeight,i),textTransform:ne.textTransform??"none",textDecoration:ne.textDecoration??"none",fontVariant:ne.fontVariant??"normal",color:ue},onClick:O=>O.stopPropagation(),children:s.jsx("div",{"data-styles":"imageCaption",className:z.captionTextInner,style:{"--link-color":T.linkColor,"--link-hover-color":T.linkHoverColor},children:s.jsx(Mt,{content:n[c].imageCaption})})})})(),I.isActive&&(()=>{const[v,q]=I.position.split("-"),K=f.direction==="horiz"?`${v}-left`:I.position,Q=Ut(K,I.offset,i),ie=()=>{if(f.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if(v==="top")return"flex-start";if(v==="middle")return"center";if(v==="bottom")return"flex-end"}return"flex-start"};return s.jsx("div",{ref:M,className:z.thumbsWrapper,onClick:re=>ge(re),style:{position:i?"absolute":"fixed",...Q,...f.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:s.jsx("div",{className:he(z.thumbsContainer,{[z.thumbsContainerVertical]:f.direction==="vert",[z.thumbsAlignStart]:I.align==="start",[z.thumbsAlignCenter]:I.align==="center",[z.thumbsAlignEnd]:I.align==="end"}),style:{gap:$.scalingValue(I.grid.gap,i),justifyContent:H?"flex-start":ie()},children:n.map((re,ne)=>{const ue=ne===c,O=x[ne],Y=I.grid.size*(ue?I.activeState.scale:1),se=()=>{if(I.fit!=="fit")return{};if(!O)return f.direction==="horiz"?{height:$.scalingValue(Y,i)}:{width:$.scalingValue(Y,i)};const oe=O.width/O.height;if(f.direction==="horiz"){const pe=Y,we=pe*oe;return{width:$.scalingValue(we,i),height:$.scalingValue(pe,i)}}else{const pe=Y,we=pe/oe;return{width:$.scalingValue(pe,i),height:$.scalingValue(we,i)}}};return s.jsx("button",{className:z.thumbItem,style:{...f.direction==="horiz"&&I.fit!=="fit"?{height:$.scalingValue(Y,i)}:{},...f.direction==="vert"&&I.fit!=="fit"?{width:$.scalingValue(Y,i)}:{},...I.fit==="cover"?{width:$.scalingValue(Y,i),height:$.scalingValue(Y,i)}:{},...se(),transition:ue?"all 0.25s ease-out":"none",opacity:ue?I.activeState.opacity/100:I.opacity/100,"--thumb-hover":I.activeState.opacity/100},onClick:oe=>{var pe;oe.stopPropagation(),m(ne),(pe=y.current)==null||pe.go(ne)},onMouseEnter:()=>{var oe;I.triggers==="hov"&&((oe=y.current)==null||oe.go(ne))},children:s.jsx("img",{src:re.image.url,alt:re.image.name??"",onLoad:oe=>{const pe=oe.currentTarget;pe.naturalWidth&&pe.naturalHeight&&h(we=>({...we,[ne]:{width:pe.naturalWidth,height:pe.naturalHeight}}))},style:{objectFit:I.fit==="cover"?"cover":"contain",...I.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...I.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${re.image.name}-${ne}`)})})})})()]})]}),document.getElementById(a))};function wo({color:e,className:t}){return s.jsx("svg",{viewBox:"0 0 10 18",className:t,children:s.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:s.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ss={element:bs,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 ht(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:e.fontSettings.fontFamily,fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:$.scalingValue(e.letterSpacing,t),wordSpacing:$.scalingValue(e.wordSpacing,t),fontSize:$.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?$.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cs(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
width: 100%;
|
|
11
|
-
min-height: ${
|
|
11
|
+
min-height: ${Gt(48)};
|
|
12
12
|
}
|
|
13
13
|
.${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
|
|
14
14
|
.${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
min-width: 0;
|
|
33
33
|
}
|
|
34
34
|
.${e}-field-group.${e}-labeled {
|
|
35
|
-
gap: ${
|
|
35
|
+
gap: ${Gt(4)};
|
|
36
36
|
}
|
|
37
37
|
.${e}-field-label {
|
|
38
38
|
white-space: nowrap;
|
|
@@ -128,18 +128,18 @@
|
|
|
128
128
|
outline: none;
|
|
129
129
|
}
|
|
130
130
|
.${e}-success {
|
|
131
|
-
margin-top: ${
|
|
131
|
+
margin-top: ${Gt(8)};
|
|
132
132
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
133
133
|
}
|
|
134
134
|
.${e}-error {
|
|
135
|
-
margin-top: ${
|
|
135
|
+
margin-top: ${Gt(8)};
|
|
136
136
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
137
137
|
}
|
|
138
138
|
.${e}-overlay-anchor {
|
|
139
139
|
position: relative;
|
|
140
140
|
height: auto;
|
|
141
141
|
}
|
|
142
|
-
`}function
|
|
142
|
+
`}function ws({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=$.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:u=[],buttonLabel:c,gap:m,fieldsGap:l,buttonCorners:A,buttonStroke:S,buttonPadding:g,isButtonFullWidth:p,inputCorners:d,inputStroke:x,inputPadding:h,inputColor:y,inputTextColor:_,inputBorderColor:D,placeholderColor:W,buttonColor:E,buttonTextColor:b,buttonBorderColor:C,labelTextColor:F,successColor:j,errorColor:M,fontFamily:H,inputFontSettings:V,inputFontSize:B,inputLineHeight:U,inputLetterSpacing:f,inputWordSpacing:I,inputTextAppearance:L,buttonFontSettings:k,buttonFontSize:T,buttonLineHeight:R,buttonLetterSpacing:Z,buttonWordSpacing:ae,buttonTextAppearance:te,labelFontSettings:ce,labelFontSize:P,labelLineHeight:ee,labelLetterSpacing:fe,labelWordSpacing:de,labelTextAppearance:ge,statusFontSettings:G,statusFontSize:me,statusLineHeight:N,statusLetterSpacing:v,statusWordSpacing:q,statusTextAppearance:K,successMessage:Q,errorMessage:ie,stateOverrides:re}=e,ne=a==="B",ue=u.slice(0,Math.min(i,u.length)),O={fontSettings:{fontFamily:H,fontWeight:(V==null?void 0:V.fontWeight)??400,fontStyle:(V==null?void 0:V.fontStyle)??"normal"},fontSize:B??.01,lineHeight:U,letterSpacing:f??0,wordSpacing:I??0,textAppearance:L,color:_},X=ht(Re(O,t)),Y=$.scalingValue(x??0,t),se=$.scalingValue((U??B??.01)+((h==null?void 0:h.top)??0)+((h==null?void 0:h.bottom)??0)+(a==="C"?x??0:(x??0)*2),t),oe={...X,borderStyle:"solid",borderRadius:a==="C"?0:$.scalingValue(d??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:Y,borderLeftWidth:0}:{borderWidth:Y},paddingTop:$.scalingValue((h==null?void 0:h.top)??0,t),paddingRight:$.scalingValue((h==null?void 0:h.right)??0,t),paddingBottom:$.scalingValue((h==null?void 0:h.bottom)??0,t),paddingLeft:$.scalingValue((h==null?void 0:h.left)??0,t),height:se,minHeight:se},pe={fontSettings:{fontFamily:H,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:T??.01,lineHeight:R,letterSpacing:Z??0,wordSpacing:ae??0,textAppearance:te,color:b},we=ht(Re(pe,t)),$e=$.scalingValue(S??0,t),lt={fontSettings:{fontFamily:H,fontWeight:(ce==null?void 0:ce.fontWeight)??400,fontStyle:(ce==null?void 0:ce.fontStyle)??"normal"},fontSize:P??.01,lineHeight:ee,letterSpacing:fe??0,wordSpacing:de??0,textAppearance:ge,color:F},Ye=Re(lt,t),xe={fontSettings:{fontFamily:H,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:me??.01,lineHeight:N,letterSpacing:v??0,wordSpacing:q??0,textAppearance:K,color:j},Me=ht(Re(xe,t)),nt=$.buildColorVars(r,{inputColor:y,inputTextColor:_,inputBorderColor:D,placeholderColor:W!=null&&W.trim()?W:"#cccccc",buttonColor:E,buttonTextColor:b,buttonBorderColor:C,labelTextColor:F,successColor:j,errorColor:M},$s,Ts,re),[Ce,Ve]=w.useState(()=>Object.fromEntries(ue.map(ye=>[ye.name,""]))),[Qn,wt]=w.useState("idle"),[dr,Bt]=w.useState(null),yn=o==="success"?"success":o==="error"?"error":Qn,mr=o==="error"?ie:dr,Dt=o==="filled",$t=w.useMemo(()=>{if(!Dt)return Ce;let ye=null;for(const je of ue)(Ce[je.name]??"").trim().length>0||(ye=ye??{...Ce},ye[je.name]="Filled");return ye??Ce},[Ce,Dt,ue]),gr=yn==="error"?$.getFormFieldValidationError(ue,$t):null,fr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),eo=n==null?void 0:n.submitUrl,to=(ye,je)=>{Ve(Oe=>({...Oe,[ye]:je}))},hr=async ye=>{ye.preventDefault();const je=Object.fromEntries(ue.map(ke=>{var ct;return[ke.name,((ct=Ce[ke.name])==null?void 0:ct.trim())??""]}).filter(([,ke])=>ke));if(!eo){wt("error"),Bt("No integrations were found for this form.");return}if(Object.keys(je).length===0)return;const Oe=$.getFormFieldValidationError(ue,Ce);if(Oe){wt("error"),Bt(Oe);return}wt("submitting"),Bt(null);try{const ke=await fetch(eo,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(je)});if(!ke.ok){const ct=await ke.text();throw new Error(ct||`Request failed: ${ke.status}`)}wt("success"),Ve(Object.fromEntries(ue.map(ct=>[ct.name,""])))}catch(ke){wt("error"),Bt(ke instanceof Error?ke.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${fr}`.trim(),style:nt,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Cs(r)}}),s.jsxs("form",{onSubmit:hr,className:`${r}-form`,style:{gap:$.scalingValue(m??0,t)},children:[s.jsx("div",{className:`${r}-fields`,style:{gap:$.scalingValue(l??0,t)},children:ue.map((ye,je)=>s.jsxs("div",{className:`${r}-field-group${ne?` ${r}-labeled`:""}`,children:[ne&&s.jsx("span",{className:`${r}-field-label`,style:Ye?{...Ye,lineHeight:Ye.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?s.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Oe=>to(ye.name,Oe.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:oe,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):s.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Oe=>to(ye.name,Oe.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:oe,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},je))}),s.jsx("div",{className:`${r}-overlay-anchor`,children:s.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:$.scalingValue(A??0,t),borderWidth:$e,paddingTop:$.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:$.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:$.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:$.scalingValue((g==null?void 0:g.left)??0,t),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:s.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Qn==="submitting"?"...":c})})})]}),yn==="success"&&s.jsx("p",{className:`${r}-success`,style:{...Me},children:Q}),yn==="error"&&s.jsx("p",{className:`${r}-error`,style:{...Me},role:"alert",children:gr??mr??ie})]})}const $s={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},Ts=["hover","focus","filled","success","error"],_s=`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
|
-
`,El=[{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"}],Jt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ll=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fl={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:{...Jt.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:{...Jt.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:{...Jt.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:{...Jt.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:El,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:"cursor",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:[...Ll],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"]},kl={element:_l,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Fl,sourceCode:Il};function Zt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Rl(e){return`
|
|
743
|
+
`,Es=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Yt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},As=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Ls={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Yt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Yt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Yt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Yt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Es,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:"cursor",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:[...As],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"]},ks={element:ws,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:Ls,sourceCode:_s};function Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Is(e){return`
|
|
744
744
|
.${e}-wrapper {
|
|
745
745
|
display: flex;
|
|
746
746
|
flex-direction: column;
|
|
@@ -922,16 +922,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
922
922
|
align-items: center;
|
|
923
923
|
}
|
|
924
924
|
.${e}-success {
|
|
925
|
-
margin-top: ${
|
|
926
|
-
font-size: ${
|
|
925
|
+
margin-top: ${Xt(8)};
|
|
926
|
+
font-size: ${Xt(14)};
|
|
927
927
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
928
928
|
}
|
|
929
929
|
.${e}-error {
|
|
930
|
-
margin-top: ${
|
|
931
|
-
font-size: ${
|
|
930
|
+
margin-top: ${Xt(8)};
|
|
931
|
+
font-size: ${Xt(14)};
|
|
932
932
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
933
933
|
}
|
|
934
|
-
`}const
|
|
934
|
+
`}const Fs=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=$.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:c=1,fontFamily:m,inputFontSettings:l,inputFontSize:A,inputLineHeight:S,inputLetterSpacing:g,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:x,buttonFontSize:h,buttonLineHeight:y,buttonLetterSpacing:_,buttonWordSpacing:D,buttonTextAppearance:W,statusFontSettings:E,statusFontSize:b,statusLineHeight:C,statusLetterSpacing:F,statusWordSpacing:j,statusTextAppearance:M,iconMaxWidth:H,minHeight:V,corners:B,stroke:U,stateOverrides:f,inputPadding:I,buttonPadding:L,successMessage:k="Thanks for subscribing!",errorMessage:T="Please, fill all required fields."}=e,R=a.slice(0,Math.min(c,a.length)),[Z,ae]=w.useState(()=>Object.fromEntries(R.map(xe=>[xe.name,""]))),[te,ce]=w.useState("idle"),[P,ee]=w.useState(null),fe=o==="success"?"success":o==="error"?"error":te,de=o==="error"?T:P,ge=o==="filled",G=w.useMemo(()=>{if(!ge)return Z;let xe=null;for(const Me of R)(Z[Me.name]??"").trim().length>0||(xe=xe??{...Z},xe[Me.name]="Filled");return xe??Z},[ge,Z,R]),me=fe==="error"?$.getFormFieldValidationError(R,G):null,N=o&&o!=="default"?`${r}-state-${o}`:"",v=R.some(xe=>(G[xe.name]??"").trim().length>0),q=N!==`${r}-state-filled`&&v?`${r}-state-filled`:"",K=`${N} ${q}`.trim(),Q=n==null?void 0:n.submitUrl,ie=u??"",re=(i==null?void 0:i.icon)??"",ne=(i==null?void 0:i.mode)==="On",ue=ie||"Submit",O={fontSettings:{fontFamily:m,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:A??.01,lineHeight:S,letterSpacing:g??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:m,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:h??.01,lineHeight:y,letterSpacing:_??0,wordSpacing:D??0,textAppearance:W,color:e.buttonTextColor??"#ffffff"},Y={fontSettings:{fontFamily:m,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:b??.01,lineHeight:C,letterSpacing:F??0,wordSpacing:j??0,textAppearance:M,color:e.successColor??"#22c55e"},se=ht(Re(O,t)),oe=ht(Re(X,t)),pe=ht(Re(Y,t)),we=$.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(O==null?void 0:O.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},Ps,Ms,f),$e={borderRadius:$.scalingValue(B,t),borderWidth:$.scalingValue(U,t),borderStyle:"solid"},lt={borderLeftWidth:$.scalingValue(U,t)},Ye=async xe=>{xe.preventDefault();const Me=Object.fromEntries(R.map(Ce=>{var Ve;return[Ce.name,((Ve=Z[Ce.name])==null?void 0:Ve.trim())??""]}).filter(([,Ce])=>Ce));if(!Q){ce("error"),ee("No integrations were found for this form.");return}if(Object.keys(Me).length===0)return;const nt=$.getFormFieldValidationError(R,Z);if(nt){ce("error"),ee(nt);return}ce("submitting"),ee(null);try{const Ce=await fetch(Q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Me)});if(!Ce.ok){const Ve=await Ce.text();throw new Error(Ve||`Request failed: ${Ce.status}`)}ce("success"),ae(Object.fromEntries(R.map(Ve=>[Ve.name,""])))}catch(Ce){ce("error"),ee(Ce instanceof Error?Ce.message:"Something went wrong")}};return s.jsxs("div",{className:`${r}-wrapper ${K}`.trim(),style:we,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Is(r)}}),s.jsxs("form",{onSubmit:Ye,className:`${r}-form`,style:{...$e,height:$.scalingValue(V,t),minHeight:$.scalingValue(V,t)},children:[s.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:R.map(xe=>s.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:G[xe.name]??"",onChange:Me=>ae(nt=>({...nt,[xe.name]:Me.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...se,paddingRight:$.scalingValue(I.right,t),paddingLeft:$.scalingValue(I.left,t),paddingTop:$.scalingValue(I.top,t),paddingBottom:$.scalingValue(I.bottom,t)}},xe.name))}),s.jsx("div",{className:`${r}-overlayAnchor`,children:s.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":ue,style:{...oe,...lt,paddingRight:$.scalingValue(L.right,t),paddingLeft:$.scalingValue(L.left,t),paddingTop:$.scalingValue(L.top,t),paddingBottom:$.scalingValue(L.bottom,t)},children:te==="submitting"?"...":ne?re&&s.jsx(Ke,{url:re,className:`${r}-submitBtnIcon`,style:{maxWidth:$.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):ie})})]}),fe==="success"&&s.jsx("p",{className:`${r}-success`,style:{...pe},children:k}),fe==="error"&&s.jsx("p",{className:`${r}-error`,style:{...pe},role:"alert",children:me??de??T})]})},Ps={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"},Ms=["hover","focus","filled","success","error"],Rs=`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,13 +1503,192 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
|
|
|
1503
1503
|
};
|
|
1504
1504
|
|
|
1505
1505
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
1506
|
-
`,Hl="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>'),Vl=[{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"}}}},Nl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Ol={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:Vl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Hl},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:"cursor",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:[...Nl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},jl={element:Ml,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Ol,sourceCode:zl},Bl="TestimonialsGrid-module__marqueeWrapper___VC616",Dl="TestimonialsGrid-module__marqueeTrack___U0OTH",Ul="TestimonialsGrid-module__marqueeSet___L7ZdX",ql="TestimonialsGrid-module__wrapper___-JQKm",Gl="TestimonialsGrid-module__cover___3-r73",Yl="TestimonialsGrid-module__elementsOverlay___sSbJp",Xl="TestimonialsGrid-module__control___pD3e4",Ue={marqueeWrapper:Bl,marqueeTrack:Dl,marqueeSet:Ul,wrapper:ql,cover:Gl,elementsOverlay:Yl,control:Xl},Kl=30,Jl=e=>{if(typeof e=="number")return e;const t=parseFloat(String(e??""));return Number.isFinite(t)?t:0},Zl=e=>({fontSettings:{...e.fontSettings},letterSpacing:e.letterSpacing,wordSpacing:e.wordSpacing,fontSize:e.fontSizeLineHeight.fontSize,lineHeight:e.fontSizeLineHeight.lineHeight,textAppearance:e.textAppearance,color:e.color}),Ql=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{autoplay:r,align:s,speed:i,direction:c,pauseOnHover:p,gap:g,cardWidth:u,corners:F,stroke:S,strokeColor:y,bgColor:d,padding:m,logoMarginTop:w,logoWidth:v,logoHeight:b,textMinHeight:L,captionMinHeight:G,captionMarginTop:N}=e,T=r==="on",x=T&&!o,R=Math.max(0,Jl(i))*Kl,C=a=>_.scalingValue(a,n??!1),O=A.useRef(null),W=A.useRef(null),V=A.useRef(null),[H,Y]=A.useState(0),[D,f]=A.useState(0),M=A.useRef(0),E=A.useRef(!1),I=A.useRef(null),$=x&&p==="on",k=A.useMemo(()=>typeof c=="boolean"?c?"right":"left":String(c??"").trim().toLowerCase()==="right"?"right":"left",[c]),J=A.useRef(k),ae=a=>{var he;const h=(he=e==null?void 0:e.styles)==null?void 0:he[a];if(h)return h;const z=a==="text"?"text":"caption",j=e==null?void 0:e[`${z}FontFamily`],B=e==null?void 0:e[`${z}FontSettings`],X=e==null?void 0:e[`${z}LetterSpacing`],K=e==null?void 0:e[`${z}WordSpacing`],te=e==null?void 0:e[`${z}TextAlign`],oe=e==null?void 0:e[`${z}TextAppearance`],le=(e==null?void 0:e[`${z}Color`])??(a==="text"?e==null?void 0:e.textColor:void 0)??(a==="caption"?e==null?void 0:e.captionColor:void 0),ce=e==null?void 0:e[`${z}FontSize`],Se=e==null?void 0:e[`${z}LineHeight`];return typeof j=="string"||!!B||typeof X=="number"||typeof K=="number"||typeof te=="string"||!!oe||typeof le=="string"||typeof ce=="number"||typeof Se=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof j=="string"?j:"Arial",fontWeight:typeof(B==null?void 0:B.fontWeight)=="number"?B.fontWeight:400,fontStyle:typeof(B==null?void 0:B.fontStyle)=="string"?B.fontStyle:"normal"},letterSpacing:typeof X=="number"?X:0,wordSpacing:typeof K=="number"?K:0,textAlign:te==="left"||te==="center"||te==="right"?te:"left",fontSizeLineHeight:{fontSize:typeof ce=="number"?ce:.01,lineHeight:typeof Se=="number"?Se:.01},textAppearance:{textTransform:(oe==null?void 0:oe.textTransform)??"none",textDecoration:(oe==null?void 0:oe.textDecoration)??"none",fontVariant:(oe==null?void 0:oe.fontVariant)??"normal"},color:typeof le=="string"?le:"#000000"}:void 0},ne=ae("text"),ie=ae("caption"),P=A.useMemo(()=>!T||(t==null?void 0:t.length)===0?1:D<=0||H<=0?2:Math.max(2,Math.ceil(H/D)+1),[T,t==null?void 0:t.length,D,H]);A.useLayoutEffect(()=>{if(!T)return;const a=O.current,h=V.current;if(!a||!h)return;let z=0;const j=()=>{Y(a.getBoundingClientRect().width),f(h.getBoundingClientRect().width)},B=()=>{cancelAnimationFrame(z),z=requestAnimationFrame(j)};B();const X=new ResizeObserver(B);return X.observe(a),X.observe(h),()=>{cancelAnimationFrame(z),X.disconnect()}},[T,t==null?void 0:t.length]),A.useLayoutEffect(()=>{const a=W.current;if(!T||!a||!x)return;if(D<=0||R<=0){a.style.transform="translate3d(0, 0, 0)";return}J.current!==k&&(M.current=1-M.current,J.current=k);const h=D/R*1e3,z=k==="left"?-D:0,j=k==="left"?0:-D,B=a.animate([{transform:`translate3d(${z}px, 0, 0)`},{transform:`translate3d(${j}px, 0, 0)`}],{duration:h,iterations:1/0,easing:"linear"});return B.currentTime=M.current*h,E.current&&B.pause(),I.current=B,()=>{const X=typeof B.currentTime=="number"?B.currentTime:0;M.current=h>0?X/h%1:0,B.cancel(),I.current===B&&(I.current=null)}},[T,x,D,R,k]);const ee=()=>{var a;$&&(E.current=!0,(a=I.current)==null||a.pause())},de=()=>{var a;$&&(E.current=!1,(a=I.current)==null||a.play())},se=A.useMemo(()=>{switch(s){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[s]),ge=A.useMemo(()=>{switch(s){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[s]),ye=(a,h,z,j)=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[l.jsx("div",{"data-controls":j==null?void 0:j.controlsName,"data-controls-axis":"y",className:Ue.control,style:{width:"100%",height:C((j==null?void 0:j.marginTop)??0)}}),l.jsx("div",{style:{...Qe(Zl(a),n),textAlign:ge,pointerEvents:"auto",...j!=null&&j.minHeight?{minHeight:C(j.minHeight)}:{}},children:l.jsx(zt,{content:h})})]},z),_e=(a,h)=>{var z,j,B;return l.jsxs("div",{style:{padding:`${C(m.top)} ${C(m.right)} ${C(m.bottom)} ${C(m.left)}`,width:C(u+S*2),height:"100%",borderRadius:C(F),border:`${C(S)} solid ${y}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[l.jsx("div",{className:Ue.cover,style:{background:d,height:"100%"}}),l.jsxs("div",{className:Ue.elementsOverlay,style:{display:"flex",flexDirection:"column",pointerEvents:"none",alignItems:se,textAlign:ge},children:[ne&&a.text&&ye(ne,a.text,"text",{minHeight:L}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:se,width:"100%"},children:[l.jsx("div",{"data-controls":"logoMarginTop",className:Ue.control,style:{width:"100%",height:C(w)}}),l.jsx("div",{style:{width:C(v),height:C(b)},children:l.jsx("img",{src:(z=a.logo)==null?void 0:z.url,alt:(j=a.logo)==null?void 0:j.name,style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((B=a.logo)==null?void 0:B.objectFit)||"cover"}})})]},"logo"),ie&&a.caption&&ye(ie,a.caption,"caption",{controlsName:"captionMarginTop",marginTop:N,minHeight:G})]})]},h)},U=(a,h,z)=>l.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%"},children:[_e(a,`card-${h}`),n&&!z&&l.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(g)})`,width:C(g),height:"100%",pointerEvents:"auto",zIndex:2}})]},h);return T&&(t!=null&&t.length)&&t.length>0?l.jsx("div",{ref:O,className:ue(Ue.wrapper,Ue.marqueeWrapper),"aria-label":"Testimonials",children:l.jsx("div",{ref:W,className:Ue.marqueeTrack,onMouseEnter:ee,onMouseLeave:de,children:Array.from({length:P},(a,h)=>l.jsx("div",{ref:h===0?V:void 0,className:Ue.marqueeSet,style:{gap:C(g),paddingRight:C(g)},"aria-hidden":h>0,children:t==null?void 0:t.map((z,j)=>U(z,`${h}-${j}`,j===((t==null?void 0:t.length)??0)-1))},`set-${h}`))})}):l.jsx("div",{className:Ue.wrapper,children:l.jsx("div",{style:{display:"flex",flexDirection:"row",gap:C(g),justifyContent:"center",overflowX:"auto"},"aria-label":"Testimonials",children:t==null?void 0:t.map((a,h)=>U(a,h,h===((t==null?void 0:t.length)??0)-1))})})},es=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1506
|
+
`,Ws="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Hs=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],wn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ns=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vs={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:{...wn.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:{...wn.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:{...wn.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Hs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Ws},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:"cursor",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:[...Ns],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"]},js={element:Fs,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:Vs,sourceCode:Rs};function $o(e){return`
|
|
1507
|
+
.${e}-marquee-wrapper {
|
|
1508
|
+
overflow: hidden;
|
|
1509
|
+
width: 100%;
|
|
1510
|
+
height: auto;
|
|
1511
|
+
}
|
|
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
|
+
.${e}-marquee-track {
|
|
1524
|
+
display: flex;
|
|
1525
|
+
flex-direction: row;
|
|
1526
|
+
width: max-content;
|
|
1527
|
+
will-change: transform;
|
|
1528
|
+
backface-visibility: hidden;
|
|
1529
|
+
transform: translateZ(0);
|
|
1530
|
+
-webkit-backface-visibility: hidden;
|
|
1531
|
+
-webkit-transform: translateZ(0);
|
|
1532
|
+
perspective: 1000px;
|
|
1533
|
+
animation-duration: var(--marquee-duration);
|
|
1534
|
+
animation-timing-function: linear;
|
|
1535
|
+
animation-iteration-count: infinite;
|
|
1536
|
+
animation-play-state: var(--marquee-play-state, running);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.${e}-marquee-track[data-direction="left"] {
|
|
1540
|
+
animation-name: ${e}-marquee-left;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
.${e}-marquee-track[data-direction="right"] {
|
|
1544
|
+
animation-name: ${e}-marquee-right;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
.${e}-marquee-set {
|
|
1548
|
+
display: flex;
|
|
1549
|
+
flex-direction: row;
|
|
1550
|
+
flex: 0 0 auto;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
.${e}-wrapper {
|
|
1554
|
+
position: relative;
|
|
1555
|
+
width: 100%;
|
|
1556
|
+
height: 100%;
|
|
1557
|
+
order: 1;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
.${e}-cover {
|
|
1561
|
+
position: absolute;
|
|
1562
|
+
width: 100%;
|
|
1563
|
+
height: 100%;
|
|
1564
|
+
top: 0;
|
|
1565
|
+
left: 0;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
.${e}-elements-overlay {
|
|
1569
|
+
position: relative;
|
|
1570
|
+
inset: 0;
|
|
1571
|
+
display: flex;
|
|
1572
|
+
flex-direction: column;
|
|
1573
|
+
pointer-events: none;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
.${e}-control {
|
|
1577
|
+
position: relative;
|
|
1578
|
+
z-index: 2;
|
|
1579
|
+
width: 100%;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.${e}-control::before {
|
|
1583
|
+
content: "";
|
|
1584
|
+
position: absolute;
|
|
1585
|
+
top: 0;
|
|
1586
|
+
left: 0;
|
|
1587
|
+
width: 100%;
|
|
1588
|
+
height: 100%;
|
|
1589
|
+
min-height: 20px;
|
|
1590
|
+
pointer-events: auto;
|
|
1591
|
+
z-index: 10;
|
|
1592
|
+
}
|
|
1593
|
+
`}const Os=30,zs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),{autoplay:a,align:i,speed:u,direction:c,pauseOnHover:m,gap:l,cardWidth:A,corners:S,stroke:g,strokeColor:p,bgColor:d,padding:x,logoMarginTop:h,logoWidth:y,logoHeight:_,captionMarginTop:D}=e,W=a==="on"&&!o,E=W,b=Math.max(0,u)*Os,C=O=>$.scalingValue(O,n??!1),F=w.useRef(null),j=w.useRef(null),M=w.useRef(null),[H,V]=w.useState(0),[B,U]=w.useState(0),[f,I]=w.useState(0),L=E&&m==="on",[k,T]=w.useState(!1),R=w.useRef(null),[Z,ae]=w.useState(0),[te,ce]=w.useState(0),P=w.useRef(null),ee=O=>{var Y,se,oe,pe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${O}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${O}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${O}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((oe=e==null?void 0:e[`${O}TextAppearance`])==null?void 0:oe.textTransform)??"none",textDecoration:((pe=e==null?void 0:e[`${O}TextAppearance`])==null?void 0:pe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${O}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${O}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${O}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${O}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${O}LineHeight`])??.01,color:(e==null?void 0:e[`${O}Color`])??"#000000"}},fe=ee("text"),de=ee("caption"),ge=w.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(O=>{var X,Y;return(((X=O.text)==null?void 0:X.length)??0)>0||(((Y=O.caption)==null?void 0:Y.length)??0)>0}),[t]),G=w.useMemo(()=>!W||(t==null?void 0:t.length)===0?1:B<=0||H<=0?2:Math.max(2,Math.ceil(H/B)+1),[W,t==null?void 0:t.length,B,H]);w.useLayoutEffect(()=>{if(!W)return;const O=F.current,X=M.current;if(!O||!X)return;let Y=0;const se=()=>{const we=O.getBoundingClientRect().width,$e=X.getBoundingClientRect().width,lt=P.current,Ye=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(P.current=$e,V(we),typeof $e=="number"&&$e>0&&B<=0){U($e);return}Ye&&$e!==B?U($e):!Ye&&B<=0&&(cancelAnimationFrame(Y),Y=requestAnimationFrame(se))},oe=()=>{cancelAnimationFrame(Y),Y=requestAnimationFrame(se)};oe();const pe=new ResizeObserver(oe);return pe.observe(O),pe.observe(X),()=>{cancelAnimationFrame(Y),pe.disconnect()}},[W,B]),w.useLayoutEffect(()=>{const O=j.current;if(!W||!O||!E)return;const X=B>0?B:0,Y=X>0&&b>0?X/b*1e3:0,se=`${Math.max(0,Y)/1e3}s`;O.style.setProperty("--marquee-distance",`${X}px`),O.style.setProperty("--marquee-duration",se)},[W,E,b,B]),w.useLayoutEffect(()=>{if(!W){I(0);return}const O=j.current;if(!O)return;const X=()=>{const se=O.getBoundingClientRect().height;I(se>0?se:0)};X();const Y=new ResizeObserver(X);return Y.observe(O),()=>{Y.disconnect()}},[W,G,t,n,l,A,x,g,S,y,_]);const me=()=>{L&&T(!0)},N=()=>{L&&T(!1)},v=w.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),q=w.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),K=w.useCallback((O,X,Y,se)=>s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[s.jsx("div",{"data-controls":se==null?void 0:se.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:C((se==null?void 0:se.marginTop)??0)}}),s.jsx("div",{...se!=null&&se.dataMeasureKind?{"data-testimonial-measure":se.dataMeasureKind}:{},style:{...Re(O,n),textAlign:q,pointerEvents:"auto",...typeof(se==null?void 0:se.minHeightPx)=="number"&&se.minHeightPx>0?{minHeight:se.minHeightPx}:{}},children:s.jsx(Mt,{content:X})})]},Y),[v,q,n]),Q=w.useCallback((O,X,Y)=>{var se,oe,pe;return s.jsxs("div",{style:{padding:`${C(x.top)} ${C(x.right)} ${C(x.bottom)} ${C(x.left)}`,width:C(A+g*2),height:"100%",borderRadius:C(S),border:`${C(g)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[s.jsx("div",{className:`${r}-cover`,style:{background:d}}),s.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:v,textAlign:q},children:[O.text&&K(fe,O.text,"text",Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(Y==null?void 0:Y.textMinHeightPx)=="number"&&Y.textMinHeightPx>0?{minHeightPx:Y.textMinHeightPx}:void 0),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:v,width:"100%"},children:[s.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:C(h)}}),s.jsx("div",{style:{width:C(y),height:C(_)},children:((se=O.logo)==null?void 0:se.url)&&s.jsx("img",{src:O.logo.url,alt:((oe=O.logo)==null?void 0:oe.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((pe=O.logo)==null?void 0:pe.objectFit)||"contain"}})})]}),O.caption&&K(de,O.caption,"caption",{controlsName:"captionMarginTop",marginTop:D,...Y!=null&&Y.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(Y==null?void 0:Y.captionMinHeightPx)=="number"&&Y.captionMinHeightPx>0?{minHeightPx:Y.captionMinHeightPx}:{}})]})]},X)},[d,D,de,A,S,_,h,y,v,q,x.bottom,x.left,x.right,x.top,K,g,p,fe,n]),ie=w.useCallback(O=>{ae(O.maxTextPx),ce(O.maxCaptionPx)},[]);w.useLayoutEffect(()=>{if(!ge){ie({maxTextPx:0,maxCaptionPx:0});return}const O=R.current;if(!O)return;const X=()=>{$.readTestimonialTextMeasure(O,ie)};X();const Y=new ResizeObserver(X);return Y.observe(O),()=>{Y.disconnect()}},[ge,ie,t,Q]);const re=ge?{textMinHeightPx:Z,captionMinHeightPx:te}:void 0,ne=ge?s.jsx("div",{ref:R,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((O,X)=>Q(O,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,ue=(O,X)=>s.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[Q(O,`card-${X}`,re),n&&s.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${C(l)})`,width:C(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);return W&&((t==null?void 0:t.length)??0)>0?s.jsxs("div",{ref:F,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...f>0?{height:f}:{}},children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:$o(r)}}),ne,s.jsx("div",{ref:j,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:me,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",...L?{"--marquee-play-state":k?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:G},(O,X)=>s.jsx("div",{ref:X===0?M:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:C(l),paddingRight:C(l)},"aria-hidden":X>0,children:t==null?void 0:t.map((Y,se)=>ue(Y,`${X}-${se}`))},`set-${X}`))})]}):s.jsxs("div",{className:`${r}-wrapper`,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:$o(r)}}),ne,s.jsx("div",{style:{gap:C(l),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((O,X)=>ue(O,X))})]})},Bs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1507
1594
|
import cn from 'classnames';
|
|
1508
|
-
import classes from './TestimonialsGrid.module.scss';
|
|
1509
1595
|
import { CommonComponentProps } from '../props';
|
|
1510
1596
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
1511
1597
|
import { scalingValue } from '../utils/scalingValue';
|
|
1512
1598
|
import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
1599
|
+
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
1600
|
+
import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
|
|
1601
|
+
|
|
1602
|
+
function getCSS(P: string): string {
|
|
1603
|
+
return \`
|
|
1604
|
+
.\${P}-marquee-wrapper {
|
|
1605
|
+
overflow: hidden;
|
|
1606
|
+
width: 100%;
|
|
1607
|
+
height: auto;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
@keyframes \${P}-marquee-left {
|
|
1611
|
+
from { transform: translate3d(0, 0, 0); }
|
|
1612
|
+
to { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
@keyframes \${P}-marquee-right {
|
|
1616
|
+
from { transform: translate3d(calc(-1 * var(--marquee-distance)), 0, 0); }
|
|
1617
|
+
to { transform: translate3d(0, 0, 0); }
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
.\${P}-marquee-track {
|
|
1621
|
+
display: flex;
|
|
1622
|
+
flex-direction: row;
|
|
1623
|
+
width: max-content;
|
|
1624
|
+
will-change: transform;
|
|
1625
|
+
backface-visibility: hidden;
|
|
1626
|
+
transform: translateZ(0);
|
|
1627
|
+
-webkit-backface-visibility: hidden;
|
|
1628
|
+
-webkit-transform: translateZ(0);
|
|
1629
|
+
perspective: 1000px;
|
|
1630
|
+
animation-duration: var(--marquee-duration);
|
|
1631
|
+
animation-timing-function: linear;
|
|
1632
|
+
animation-iteration-count: infinite;
|
|
1633
|
+
animation-play-state: var(--marquee-play-state, running);
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
.\${P}-marquee-track[data-direction="left"] {
|
|
1637
|
+
animation-name: \${P}-marquee-left;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
.\${P}-marquee-track[data-direction="right"] {
|
|
1641
|
+
animation-name: \${P}-marquee-right;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.\${P}-marquee-set {
|
|
1645
|
+
display: flex;
|
|
1646
|
+
flex-direction: row;
|
|
1647
|
+
flex: 0 0 auto;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.\${P}-wrapper {
|
|
1651
|
+
position: relative;
|
|
1652
|
+
width: 100%;
|
|
1653
|
+
height: 100%;
|
|
1654
|
+
order: 1;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
.\${P}-cover {
|
|
1658
|
+
position: absolute;
|
|
1659
|
+
width: 100%;
|
|
1660
|
+
height: 100%;
|
|
1661
|
+
top: 0;
|
|
1662
|
+
left: 0;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.\${P}-elements-overlay {
|
|
1666
|
+
position: relative;
|
|
1667
|
+
inset: 0;
|
|
1668
|
+
display: flex;
|
|
1669
|
+
flex-direction: column;
|
|
1670
|
+
pointer-events: none;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
.\${P}-control {
|
|
1674
|
+
position: relative;
|
|
1675
|
+
z-index: 2;
|
|
1676
|
+
width: 100%;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
.\${P}-control::before {
|
|
1680
|
+
content: "";
|
|
1681
|
+
position: absolute;
|
|
1682
|
+
top: 0;
|
|
1683
|
+
left: 0;
|
|
1684
|
+
width: 100%;
|
|
1685
|
+
height: 100%;
|
|
1686
|
+
min-height: 20px;
|
|
1687
|
+
pointer-events: auto;
|
|
1688
|
+
z-index: 10;
|
|
1689
|
+
}
|
|
1690
|
+
\`;
|
|
1691
|
+
}
|
|
1513
1692
|
|
|
1514
1693
|
type TestimonialsProps = {
|
|
1515
1694
|
settings: TestimonialsSettings;
|
|
@@ -1518,146 +1697,100 @@ type TestimonialsProps = {
|
|
|
1518
1697
|
isPreviewMode?: boolean;
|
|
1519
1698
|
} & CommonComponentProps;
|
|
1520
1699
|
|
|
1521
|
-
type CaptionStyleFromFlatSettings = {
|
|
1522
|
-
fontSettings: {
|
|
1523
|
-
fontFamily: string;
|
|
1524
|
-
fontWeight: number;
|
|
1525
|
-
fontStyle: string;
|
|
1526
|
-
};
|
|
1527
|
-
widthSettings: {
|
|
1528
|
-
width: number;
|
|
1529
|
-
sizing: 'auto' | 'manual';
|
|
1530
|
-
};
|
|
1531
|
-
letterSpacing: number;
|
|
1532
|
-
textAlign: 'left' | 'center' | 'right';
|
|
1533
|
-
wordSpacing: number;
|
|
1534
|
-
fontSizeLineHeight: {
|
|
1535
|
-
fontSize: number;
|
|
1536
|
-
lineHeight: number;
|
|
1537
|
-
};
|
|
1538
|
-
textAppearance: {
|
|
1539
|
-
textTransform: 'none' | 'uppercase' | 'lowercase';
|
|
1540
|
-
textDecoration: 'none' | 'underline';
|
|
1541
|
-
fontVariant: 'normal' | 'small-caps';
|
|
1542
|
-
};
|
|
1543
|
-
color: string;
|
|
1544
|
-
};
|
|
1545
|
-
|
|
1546
1700
|
const PX_PER_SEC_PER_SPEED_UNIT = 30;
|
|
1547
1701
|
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1702
|
+
type RenderCardOpts = {
|
|
1703
|
+
textMinHeightPx?: number;
|
|
1704
|
+
captionMinHeightPx?: number;
|
|
1705
|
+
dataMeasureAttrs?: boolean;
|
|
1706
|
+
};
|
|
1707
|
+
|
|
1708
|
+
type RenderTextOpts = {
|
|
1709
|
+
controlsName?: string;
|
|
1710
|
+
marginTop?: number;
|
|
1711
|
+
minHeightPx?: number;
|
|
1712
|
+
dataMeasureKind?: 'text' | 'caption';
|
|
1552
1713
|
};
|
|
1553
1714
|
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
textAppearance: caption.textAppearance,
|
|
1561
|
-
color: caption.color,
|
|
1562
|
-
});
|
|
1563
|
-
|
|
1564
|
-
export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
|
|
1565
|
-
const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, textMinHeight, captionMinHeight, captionMarginTop } = settings;
|
|
1566
|
-
const isAutoplay = autoplay === 'on';
|
|
1567
|
-
const isAnimating = isAutoplay && !isPreviewMode;
|
|
1568
|
-
const pxPerSec = Math.max(0, parseSpeed(speed)) * PX_PER_SEC_PER_SPEED_UNIT;
|
|
1715
|
+
export const TestimonialGrid = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
|
|
1716
|
+
const { prefix: P } = useScopedStyles();
|
|
1717
|
+
const { autoplay, align, speed, direction, pauseOnHover, gap, cardWidth, corners, stroke, strokeColor, bgColor, padding, logoMarginTop, logoWidth, logoHeight, captionMarginTop } = settings;
|
|
1718
|
+
const autoplayEnabled = autoplay === 'on' && !isPreviewMode;
|
|
1719
|
+
const isAnimating = autoplayEnabled;
|
|
1720
|
+
const pxPerSec = Math.max(0, speed) * PX_PER_SEC_PER_SPEED_UNIT;
|
|
1569
1721
|
const scaled = (v: number) => scalingValue(v, isEditor ?? false);
|
|
1570
1722
|
const wrapperRef = useRef<HTMLDivElement | null>(null);
|
|
1571
1723
|
const trackRef = useRef<HTMLDivElement | null>(null);
|
|
1572
1724
|
const setRef = useRef<HTMLDivElement | null>(null);
|
|
1573
1725
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
1574
1726
|
const [setWidth, setSetWidth] = useState(0);
|
|
1575
|
-
const
|
|
1576
|
-
const hoveringRef = useRef(false);
|
|
1577
|
-
const animRef = useRef<Animation | null>(null);
|
|
1727
|
+
const [trackHeight, setTrackHeight] = useState(0);
|
|
1578
1728
|
const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
|
|
1729
|
+
const [isHovering, setIsHovering] = useState(false);
|
|
1730
|
+
const measureLayerRef = useRef<HTMLDivElement>(null);
|
|
1731
|
+
const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
|
|
1732
|
+
const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
|
|
1733
|
+
const stableCandidateRef = useRef<number | null>(null);
|
|
1579
1734
|
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1582
|
-
const d = String(direction ?? '').trim().toLowerCase();
|
|
1583
|
-
return d === 'right' ? 'right' : 'left';
|
|
1584
|
-
}, [direction]);
|
|
1585
|
-
|
|
1586
|
-
const lastDirectionRef = useRef<'left' | 'right'>(normalizedDirection);
|
|
1587
|
-
|
|
1588
|
-
const resolveCaptionStyle = (kind: 'text' | 'caption'): CaptionStyles | undefined => {
|
|
1589
|
-
const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
|
|
1590
|
-
if (fromNested) return fromNested;
|
|
1591
|
-
|
|
1592
|
-
const prefix = kind === 'text' ? 'text' : 'caption';
|
|
1593
|
-
const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
|
|
1594
|
-
const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
|
|
1595
|
-
const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
|
|
1596
|
-
const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
|
|
1597
|
-
const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
|
|
1598
|
-
const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
|
|
1599
|
-
const color =
|
|
1600
|
-
(settings as any)?.[\`\${prefix}Color\`] ??
|
|
1601
|
-
(kind === 'text' ? (settings as any)?.textColor : undefined) ??
|
|
1602
|
-
(kind === 'caption' ? (settings as any)?.captionColor : undefined);
|
|
1603
|
-
const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
|
|
1604
|
-
const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
|
|
1605
|
-
|
|
1606
|
-
const hasAnyFlat =
|
|
1607
|
-
typeof fontFamily === 'string' ||
|
|
1608
|
-
!!fontSettings ||
|
|
1609
|
-
typeof letterSpacing === 'number' ||
|
|
1610
|
-
typeof wordSpacing === 'number' ||
|
|
1611
|
-
typeof textAlign === 'string' ||
|
|
1612
|
-
!!textAppearance ||
|
|
1613
|
-
typeof color === 'string' ||
|
|
1614
|
-
typeof fontSize === 'number' ||
|
|
1615
|
-
typeof lineHeight === 'number';
|
|
1616
|
-
if (!hasAnyFlat) return undefined;
|
|
1617
|
-
|
|
1618
|
-
const flat: CaptionStyleFromFlatSettings = {
|
|
1619
|
-
widthSettings: { width: 0.13, sizing: 'manual' },
|
|
1735
|
+
const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
|
|
1736
|
+
const styles: TextStyles = {
|
|
1620
1737
|
fontSettings: {
|
|
1621
|
-
fontFamily:
|
|
1622
|
-
fontWeight:
|
|
1623
|
-
fontStyle:
|
|
1624
|
-
},
|
|
1625
|
-
letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
|
|
1626
|
-
wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
|
|
1627
|
-
textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
|
|
1628
|
-
fontSizeLineHeight: {
|
|
1629
|
-
fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
|
|
1630
|
-
lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
|
|
1738
|
+
fontFamily: (settings as any)?.[\`\${kind}FontFamily\`] ?? 'Arial',
|
|
1739
|
+
fontWeight: (settings as any)?.[\`\${kind}FontSettings\`]?.fontWeight ?? 400,
|
|
1740
|
+
fontStyle: (settings as any)?.[\`\${kind}FontSettings\`]?.fontStyle ?? 'normal',
|
|
1631
1741
|
},
|
|
1632
1742
|
textAppearance: {
|
|
1633
|
-
textTransform:
|
|
1634
|
-
textDecoration:
|
|
1635
|
-
fontVariant:
|
|
1743
|
+
textTransform: (settings as any)?.[\`\${kind}TextAppearance\`]?.textTransform ?? 'none',
|
|
1744
|
+
textDecoration: (settings as any)?.[\`\${kind}TextAppearance\`]?.textDecoration ?? 'none',
|
|
1745
|
+
fontVariant: (settings as any)?.[\`\${kind}TextAppearance\`]?.fontVariant ?? 'normal',
|
|
1636
1746
|
},
|
|
1637
|
-
|
|
1747
|
+
letterSpacing: (settings as any)?.[\`\${kind}LetterSpacing\`] ?? 0,
|
|
1748
|
+
wordSpacing: (settings as any)?.[\`\${kind}WordSpacing\`] ?? 0,
|
|
1749
|
+
fontSize: (settings as any)?.[\`\${kind}FontSize\`] ?? 0.01,
|
|
1750
|
+
lineHeight: (settings as any)?.[\`\${kind}LineHeight\`] ?? 0.01,
|
|
1751
|
+
color: (settings as any)?.[\`\${kind}Color\`] ?? '#000000',
|
|
1638
1752
|
};
|
|
1639
|
-
|
|
1640
|
-
return flat as CaptionStyles;
|
|
1753
|
+
return styles;
|
|
1641
1754
|
};
|
|
1642
1755
|
|
|
1643
|
-
const textStyle =
|
|
1644
|
-
const captionStyle =
|
|
1756
|
+
const textStyle = resolveTextStyle('text');
|
|
1757
|
+
const captionStyle = resolveTextStyle('caption');
|
|
1758
|
+
|
|
1759
|
+
const shouldMeasureTextExtents = useMemo(() =>
|
|
1760
|
+
(content?.length ?? 0) > 1 &&
|
|
1761
|
+
(content ?? []).some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0),
|
|
1762
|
+
[content]
|
|
1763
|
+
);
|
|
1645
1764
|
|
|
1646
1765
|
const copies = useMemo(() => {
|
|
1647
|
-
if (!
|
|
1766
|
+
if (!autoplayEnabled || content?.length === 0) return 1;
|
|
1648
1767
|
if (setWidth <= 0 || containerWidth <= 0) return 2;
|
|
1649
1768
|
return Math.max(2, Math.ceil(containerWidth / setWidth) + 1);
|
|
1650
|
-
}, [
|
|
1769
|
+
}, [autoplayEnabled, content?.length, setWidth, containerWidth]);
|
|
1651
1770
|
|
|
1652
1771
|
useLayoutEffect(() => {
|
|
1653
|
-
if (!
|
|
1772
|
+
if (!autoplayEnabled) return;
|
|
1654
1773
|
const wrapper = wrapperRef.current;
|
|
1655
1774
|
const set = setRef.current;
|
|
1656
1775
|
if (!wrapper || !set) return;
|
|
1657
1776
|
let raf = 0;
|
|
1658
1777
|
const measure = () => {
|
|
1659
|
-
|
|
1660
|
-
|
|
1778
|
+
const nextContainerWidth = wrapper.getBoundingClientRect().width;
|
|
1779
|
+
const nextRawSetWidth = set.getBoundingClientRect().width;
|
|
1780
|
+
const prevCandidate = stableCandidateRef.current;
|
|
1781
|
+
const isStableNow = typeof prevCandidate === 'number' && Math.abs(prevCandidate - nextRawSetWidth) <= 0.25;
|
|
1782
|
+
stableCandidateRef.current = nextRawSetWidth;
|
|
1783
|
+
setContainerWidth(nextContainerWidth);
|
|
1784
|
+
if (typeof nextRawSetWidth === 'number' && nextRawSetWidth > 0 && setWidth <= 0) {
|
|
1785
|
+
setSetWidth(nextRawSetWidth);
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
if (isStableNow && nextRawSetWidth !== setWidth) {
|
|
1789
|
+
setSetWidth(nextRawSetWidth);
|
|
1790
|
+
} else if (!isStableNow && setWidth <= 0) {
|
|
1791
|
+
cancelAnimationFrame(raf);
|
|
1792
|
+
raf = requestAnimationFrame(measure);
|
|
1793
|
+
}
|
|
1661
1794
|
};
|
|
1662
1795
|
const schedule = () => {
|
|
1663
1796
|
cancelAnimationFrame(raf);
|
|
@@ -1671,47 +1804,44 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
|
|
|
1671
1804
|
cancelAnimationFrame(raf);
|
|
1672
1805
|
ro.disconnect();
|
|
1673
1806
|
};
|
|
1674
|
-
}, [
|
|
1807
|
+
}, [autoplayEnabled, setWidth]);
|
|
1675
1808
|
|
|
1676
1809
|
useLayoutEffect(() => {
|
|
1677
1810
|
const track = trackRef.current;
|
|
1678
|
-
if (!
|
|
1679
|
-
|
|
1680
|
-
|
|
1811
|
+
if (!autoplayEnabled || !track || !isAnimating) return;
|
|
1812
|
+
const safeSetWidth = setWidth > 0 ? setWidth : 0;
|
|
1813
|
+
const durationMs = safeSetWidth > 0 && pxPerSec > 0 ? (safeSetWidth / pxPerSec) * 1000 : 0;
|
|
1814
|
+
const durationS = \`\${Math.max(0, durationMs) / 1000}s\`;
|
|
1815
|
+
track.style.setProperty('--marquee-distance', \`\${safeSetWidth}px\`);
|
|
1816
|
+
track.style.setProperty('--marquee-duration', durationS);
|
|
1817
|
+
}, [autoplayEnabled, isAnimating, pxPerSec, setWidth]);
|
|
1818
|
+
|
|
1819
|
+
useLayoutEffect(() => {
|
|
1820
|
+
if (!autoplayEnabled) {
|
|
1821
|
+
setTrackHeight(0);
|
|
1681
1822
|
return;
|
|
1682
1823
|
}
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
const
|
|
1691
|
-
|
|
1692
|
-
{ duration, iterations: Infinity, easing: 'linear' }
|
|
1693
|
-
);
|
|
1694
|
-
anim.currentTime = progressRef.current * duration;
|
|
1695
|
-
if (hoveringRef.current) anim.pause();
|
|
1696
|
-
animRef.current = anim;
|
|
1697
|
-
|
|
1824
|
+
const track = trackRef.current;
|
|
1825
|
+
if (!track) return;
|
|
1826
|
+
const measure = () => {
|
|
1827
|
+
const next = track.getBoundingClientRect().height;
|
|
1828
|
+
setTrackHeight(next > 0 ? next : 0);
|
|
1829
|
+
};
|
|
1830
|
+
measure();
|
|
1831
|
+
const ro = new ResizeObserver(measure);
|
|
1832
|
+
ro.observe(track);
|
|
1698
1833
|
return () => {
|
|
1699
|
-
|
|
1700
|
-
progressRef.current = duration > 0 ? (ct / duration) % 1 : 0;
|
|
1701
|
-
anim.cancel();
|
|
1702
|
-
if (animRef.current === anim) animRef.current = null;
|
|
1834
|
+
ro.disconnect();
|
|
1703
1835
|
};
|
|
1704
|
-
}, [
|
|
1836
|
+
}, [autoplayEnabled, copies, content, isEditor, gap, cardWidth, padding, stroke, corners, logoWidth, logoHeight]);
|
|
1705
1837
|
|
|
1706
1838
|
const onTrackEnter = () => {
|
|
1707
1839
|
if (!hoverPauseEnabled) return;
|
|
1708
|
-
|
|
1709
|
-
animRef.current?.pause();
|
|
1840
|
+
setIsHovering(true);
|
|
1710
1841
|
};
|
|
1711
1842
|
const onTrackLeave = () => {
|
|
1712
1843
|
if (!hoverPauseEnabled) return;
|
|
1713
|
-
|
|
1714
|
-
animRef.current?.play();
|
|
1844
|
+
setIsHovering(false);
|
|
1715
1845
|
};
|
|
1716
1846
|
|
|
1717
1847
|
const overlayAlignItems = useMemo(() => {
|
|
@@ -1738,116 +1868,190 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
|
|
|
1738
1868
|
}
|
|
1739
1869
|
}, [align]);
|
|
1740
1870
|
|
|
1741
|
-
const renderText = (
|
|
1742
|
-
style:
|
|
1743
|
-
content: any[],
|
|
1744
|
-
key: string,
|
|
1745
|
-
options?: {
|
|
1746
|
-
controlsName?: string;
|
|
1747
|
-
marginTop?: number;
|
|
1748
|
-
minHeight?: number;
|
|
1749
|
-
}
|
|
1750
|
-
) => (
|
|
1751
|
-
<div
|
|
1752
|
-
key={key}
|
|
1753
|
-
style={{
|
|
1754
|
-
display: 'flex',
|
|
1755
|
-
flexDirection: 'column',
|
|
1756
|
-
alignItems: overlayAlignItems,
|
|
1757
|
-
width: '100%',
|
|
1758
|
-
}}
|
|
1759
|
-
>
|
|
1760
|
-
<div
|
|
1761
|
-
data-controls={options?.controlsName}
|
|
1762
|
-
data-controls-axis="y"
|
|
1763
|
-
className={classes.control}
|
|
1764
|
-
style={{ width: '100%', height: scaled(options?.marginTop ?? 0) }}
|
|
1765
|
-
/>
|
|
1871
|
+
const renderText = useCallback(
|
|
1872
|
+
(style: TextStyles, richContent: any[], key: string, options?: RenderTextOpts) => (
|
|
1766
1873
|
<div
|
|
1874
|
+
key={key}
|
|
1767
1875
|
style={{
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1876
|
+
display: 'flex',
|
|
1877
|
+
flexDirection: 'column',
|
|
1878
|
+
alignItems: overlayAlignItems,
|
|
1879
|
+
width: '100%',
|
|
1772
1880
|
}}
|
|
1773
1881
|
>
|
|
1774
|
-
<
|
|
1882
|
+
<div
|
|
1883
|
+
data-controls={options?.controlsName}
|
|
1884
|
+
data-controls-axis="y"
|
|
1885
|
+
className={\`\${P}-control\`}
|
|
1886
|
+
style={{ height: scaled(options?.marginTop ?? 0) }}
|
|
1887
|
+
/>
|
|
1888
|
+
<div
|
|
1889
|
+
{...(options?.dataMeasureKind ? { 'data-testimonial-measure': options.dataMeasureKind } : {})}
|
|
1890
|
+
style={{
|
|
1891
|
+
...textStylesToCss(style, isEditor),
|
|
1892
|
+
textAlign: overlayTextAlign,
|
|
1893
|
+
pointerEvents: 'auto',
|
|
1894
|
+
...(typeof options?.minHeightPx === 'number' && options.minHeightPx > 0
|
|
1895
|
+
? { minHeight: options.minHeightPx }
|
|
1896
|
+
: {}),
|
|
1897
|
+
}}
|
|
1898
|
+
>
|
|
1899
|
+
<RichTextRenderer content={richContent} />
|
|
1900
|
+
</div>
|
|
1775
1901
|
</div>
|
|
1776
|
-
|
|
1902
|
+
),
|
|
1903
|
+
[overlayAlignItems, overlayTextAlign, isEditor]
|
|
1777
1904
|
);
|
|
1778
1905
|
|
|
1779
|
-
const renderCard = (
|
|
1780
|
-
|
|
1781
|
-
key={key}
|
|
1782
|
-
style={{
|
|
1783
|
-
padding: \`\${scaled(padding.top)} \${scaled(padding.right)} \${scaled(padding.bottom)} \${scaled(padding.left)}\`,
|
|
1784
|
-
width: scaled(cardWidth + stroke * 2),
|
|
1785
|
-
height: '100%',
|
|
1786
|
-
borderRadius: scaled(corners),
|
|
1787
|
-
border: \`\${scaled(stroke)} solid \${strokeColor}\`,
|
|
1788
|
-
boxSizing: 'border-box',
|
|
1789
|
-
position: 'relative',
|
|
1790
|
-
overflow: 'hidden',
|
|
1791
|
-
}}
|
|
1792
|
-
>
|
|
1793
|
-
<div
|
|
1794
|
-
className={classes.cover}
|
|
1795
|
-
style={{background: bgColor,height: '100%'}}
|
|
1796
|
-
/>
|
|
1906
|
+
const renderCard = useCallback(
|
|
1907
|
+
(item: TestimonialsItem, key: string | number, opts?: RenderCardOpts) => (
|
|
1797
1908
|
<div
|
|
1798
|
-
|
|
1909
|
+
key={key}
|
|
1799
1910
|
style={{
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1911
|
+
padding: \`\${scaled(padding.top)} \${scaled(padding.right)} \${scaled(padding.bottom)} \${scaled(padding.left)}\`,
|
|
1912
|
+
width: scaled(cardWidth + stroke * 2),
|
|
1913
|
+
height: '100%',
|
|
1914
|
+
borderRadius: scaled(corners),
|
|
1915
|
+
border: \`\${scaled(stroke)} solid \${strokeColor}\`,
|
|
1916
|
+
boxSizing: 'border-box',
|
|
1917
|
+
position: 'relative',
|
|
1918
|
+
overflow: 'hidden',
|
|
1805
1919
|
}}
|
|
1806
1920
|
>
|
|
1807
|
-
{
|
|
1921
|
+
<div className={\`\${P}-cover\`} style={{ background: bgColor }} />
|
|
1808
1922
|
<div
|
|
1809
|
-
|
|
1810
|
-
style={{
|
|
1811
|
-
display: 'flex',
|
|
1812
|
-
flexDirection: 'column',
|
|
1813
|
-
alignItems: overlayAlignItems,
|
|
1814
|
-
width: '100%',
|
|
1815
|
-
}}
|
|
1923
|
+
className={\`\${P}-elements-overlay\`}
|
|
1924
|
+
style={{ alignItems: overlayAlignItems, textAlign: overlayTextAlign }}
|
|
1816
1925
|
>
|
|
1926
|
+
{item.text && renderText(
|
|
1927
|
+
textStyle,
|
|
1928
|
+
item.text,
|
|
1929
|
+
'text',
|
|
1930
|
+
opts?.dataMeasureAttrs
|
|
1931
|
+
? { dataMeasureKind: 'text' }
|
|
1932
|
+
: typeof opts?.textMinHeightPx === 'number' && opts.textMinHeightPx > 0
|
|
1933
|
+
? { minHeightPx: opts.textMinHeightPx }
|
|
1934
|
+
: undefined
|
|
1935
|
+
)}
|
|
1817
1936
|
<div
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1937
|
+
style={{
|
|
1938
|
+
display: 'flex',
|
|
1939
|
+
flexDirection: 'column',
|
|
1940
|
+
alignItems: overlayAlignItems,
|
|
1941
|
+
width: '100%',
|
|
1942
|
+
}}
|
|
1943
|
+
>
|
|
1944
|
+
<div
|
|
1945
|
+
data-controls="logoMarginTop"
|
|
1946
|
+
className={\`\${P}-control\`}
|
|
1947
|
+
style={{ height: scaled(logoMarginTop) }}
|
|
1827
1948
|
/>
|
|
1949
|
+
<div style={{ width: scaled(logoWidth), height: scaled(logoHeight) }}>
|
|
1950
|
+
{item.logo?.url && (
|
|
1951
|
+
<img
|
|
1952
|
+
src={item.logo.url}
|
|
1953
|
+
alt={item.logo?.name ?? ''}
|
|
1954
|
+
style={{ pointerEvents: 'auto', width: '100%', height: '100%', objectFit: item.logo?.objectFit || 'contain' }}
|
|
1955
|
+
/>
|
|
1956
|
+
)}
|
|
1957
|
+
</div>
|
|
1828
1958
|
</div>
|
|
1959
|
+
{item.caption &&
|
|
1960
|
+
renderText(captionStyle, item.caption, 'caption', {
|
|
1961
|
+
controlsName: 'captionMarginTop',
|
|
1962
|
+
marginTop: captionMarginTop,
|
|
1963
|
+
...(opts?.dataMeasureAttrs
|
|
1964
|
+
? { dataMeasureKind: 'caption' as const }
|
|
1965
|
+
: typeof opts?.captionMinHeightPx === 'number' && opts.captionMinHeightPx > 0
|
|
1966
|
+
? { minHeightPx: opts.captionMinHeightPx }
|
|
1967
|
+
: {}),
|
|
1968
|
+
})}
|
|
1829
1969
|
</div>
|
|
1830
|
-
{captionStyle && item.caption &&
|
|
1831
|
-
renderText(captionStyle, item.caption, 'caption', {
|
|
1832
|
-
controlsName: 'captionMarginTop',
|
|
1833
|
-
marginTop: captionMarginTop,
|
|
1834
|
-
minHeight: captionMinHeight,
|
|
1835
|
-
})}
|
|
1836
1970
|
</div>
|
|
1837
|
-
|
|
1971
|
+
),
|
|
1972
|
+
[
|
|
1973
|
+
bgColor,
|
|
1974
|
+
captionMarginTop,
|
|
1975
|
+
captionStyle,
|
|
1976
|
+
cardWidth,
|
|
1977
|
+
corners,
|
|
1978
|
+
logoHeight,
|
|
1979
|
+
logoMarginTop,
|
|
1980
|
+
logoWidth,
|
|
1981
|
+
overlayAlignItems,
|
|
1982
|
+
overlayTextAlign,
|
|
1983
|
+
padding.bottom,
|
|
1984
|
+
padding.left,
|
|
1985
|
+
padding.right,
|
|
1986
|
+
padding.top,
|
|
1987
|
+
renderText,
|
|
1988
|
+
stroke,
|
|
1989
|
+
strokeColor,
|
|
1990
|
+
textStyle,
|
|
1991
|
+
isEditor,
|
|
1992
|
+
]
|
|
1838
1993
|
);
|
|
1839
1994
|
|
|
1840
|
-
const
|
|
1995
|
+
const onMeasuredExtents = useCallback((extents: { maxTextPx: number; maxCaptionPx: number }) => {
|
|
1996
|
+
setMeasuredTextMinPx(extents.maxTextPx);
|
|
1997
|
+
setMeasuredCaptionMinPx(extents.maxCaptionPx);
|
|
1998
|
+
}, []);
|
|
1999
|
+
|
|
2000
|
+
useLayoutEffect(() => {
|
|
2001
|
+
if (!shouldMeasureTextExtents) {
|
|
2002
|
+
onMeasuredExtents({ maxTextPx: 0, maxCaptionPx: 0 });
|
|
2003
|
+
return;
|
|
2004
|
+
}
|
|
2005
|
+
const root = measureLayerRef.current;
|
|
2006
|
+
if (!root) return;
|
|
2007
|
+
const readExtents = () => {
|
|
2008
|
+
readTestimonialTextMeasure(root, onMeasuredExtents);
|
|
2009
|
+
};
|
|
2010
|
+
readExtents();
|
|
2011
|
+
const ro = new ResizeObserver(readExtents);
|
|
2012
|
+
ro.observe(root);
|
|
2013
|
+
return () => {
|
|
2014
|
+
ro.disconnect();
|
|
2015
|
+
};
|
|
2016
|
+
}, [shouldMeasureTextExtents, onMeasuredExtents, content, renderCard]);
|
|
2017
|
+
|
|
2018
|
+
const visibleCardOpts: RenderCardOpts | undefined = shouldMeasureTextExtents
|
|
2019
|
+
? { textMinHeightPx: measuredTextMinPx, captionMinHeightPx: measuredCaptionMinPx }
|
|
2020
|
+
: undefined;
|
|
2021
|
+
|
|
2022
|
+
const measureLayerEl = shouldMeasureTextExtents ? (
|
|
2023
|
+
<div
|
|
2024
|
+
ref={measureLayerRef}
|
|
2025
|
+
aria-hidden
|
|
2026
|
+
style={{
|
|
2027
|
+
position: 'absolute',
|
|
2028
|
+
left: 0,
|
|
2029
|
+
top: 0,
|
|
2030
|
+
width: '100%',
|
|
2031
|
+
visibility: 'hidden',
|
|
2032
|
+
pointerEvents: 'none',
|
|
2033
|
+
zIndex: -1,
|
|
2034
|
+
}}
|
|
2035
|
+
>
|
|
2036
|
+
{(content ?? []).map((item, index) => renderCard(item, \`measure-\${index}\`, { dataMeasureAttrs: true }))}
|
|
2037
|
+
</div>
|
|
2038
|
+
) : null;
|
|
2039
|
+
|
|
2040
|
+
const renderCardWrapper = (item: TestimonialsItem, key: string | number) => (
|
|
1841
2041
|
<div
|
|
1842
2042
|
key={key}
|
|
1843
2043
|
style={{
|
|
1844
2044
|
position: 'relative',
|
|
1845
2045
|
flex: '0 0 auto',
|
|
1846
2046
|
height: '100%',
|
|
2047
|
+
transform: 'translateZ(0)',
|
|
2048
|
+
backfaceVisibility: 'hidden',
|
|
2049
|
+
WebkitBackfaceVisibility: 'hidden',
|
|
2050
|
+
willChange: 'transform',
|
|
1847
2051
|
}}
|
|
1848
2052
|
>
|
|
1849
|
-
{renderCard(item, \`card-\${key}
|
|
1850
|
-
{isEditor &&
|
|
2053
|
+
{renderCard(item, \`card-\${key}\`, visibleCardOpts)}
|
|
2054
|
+
{isEditor && (
|
|
1851
2055
|
<div
|
|
1852
2056
|
data-controls="gap"
|
|
1853
2057
|
data-controls-axis="x"
|
|
@@ -1865,25 +2069,58 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
|
|
|
1865
2069
|
</div>
|
|
1866
2070
|
);
|
|
1867
2071
|
|
|
1868
|
-
if (
|
|
2072
|
+
if (autoplayEnabled && (content?.length ?? 0) > 0) {
|
|
1869
2073
|
return (
|
|
1870
|
-
<div
|
|
2074
|
+
<div
|
|
2075
|
+
ref={wrapperRef}
|
|
2076
|
+
className={cn(\`\${P}-wrapper\`, \`\${P}-marquee-wrapper\`)}
|
|
2077
|
+
aria-label="Testimonials"
|
|
2078
|
+
style={{
|
|
2079
|
+
overflow: 'hidden',
|
|
2080
|
+
width: '100%',
|
|
2081
|
+
...(trackHeight > 0 ? { height: trackHeight } : {}),
|
|
2082
|
+
}}
|
|
2083
|
+
>
|
|
2084
|
+
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
2085
|
+
{measureLayerEl}
|
|
1871
2086
|
<div
|
|
1872
2087
|
ref={trackRef}
|
|
1873
|
-
className={
|
|
2088
|
+
className={\`\${P}-marquee-track\`}
|
|
2089
|
+
data-direction={direction}
|
|
1874
2090
|
onMouseEnter={onTrackEnter}
|
|
1875
2091
|
onMouseLeave={onTrackLeave}
|
|
2092
|
+
style={{
|
|
2093
|
+
display: 'flex',
|
|
2094
|
+
flexDirection: 'row',
|
|
2095
|
+
flexWrap: 'nowrap',
|
|
2096
|
+
width: 'max-content',
|
|
2097
|
+
willChange: 'transform',
|
|
2098
|
+
backfaceVisibility: 'hidden',
|
|
2099
|
+
WebkitBackfaceVisibility: 'hidden',
|
|
2100
|
+
transform: 'translateZ(0)',
|
|
2101
|
+
WebkitTransform: 'translateZ(0)',
|
|
2102
|
+
perspective: '1000px',
|
|
2103
|
+
...(hoverPauseEnabled
|
|
2104
|
+
? ({ '--marquee-play-state': isHovering ? 'paused' : 'running' } as React.CSSProperties)
|
|
2105
|
+
: ({ '--marquee-play-state': 'running' } as React.CSSProperties)),
|
|
2106
|
+
}}
|
|
1876
2107
|
>
|
|
1877
2108
|
{Array.from({ length: copies }, (_, copyIndex) => (
|
|
1878
2109
|
<div
|
|
1879
2110
|
key={\`set-\${copyIndex}\`}
|
|
1880
2111
|
ref={copyIndex === 0 ? setRef : undefined}
|
|
1881
|
-
className={
|
|
1882
|
-
style={{
|
|
2112
|
+
className={\`\${P}-marquee-set\`}
|
|
2113
|
+
style={{
|
|
2114
|
+
display: 'flex',
|
|
2115
|
+
flexDirection: 'row',
|
|
2116
|
+
flex: '0 0 auto',
|
|
2117
|
+
gap: scaled(gap),
|
|
2118
|
+
paddingRight: scaled(gap),
|
|
2119
|
+
}}
|
|
1883
2120
|
aria-hidden={copyIndex > 0}
|
|
1884
2121
|
>
|
|
1885
2122
|
{content?.map((item: TestimonialsItem, index: number) =>
|
|
1886
|
-
renderCardWrapper(item, \`\${copyIndex}-\${index}
|
|
2123
|
+
renderCardWrapper(item, \`\${copyIndex}-\${index}\`)
|
|
1887
2124
|
)}
|
|
1888
2125
|
</div>
|
|
1889
2126
|
))}
|
|
@@ -1893,19 +2130,21 @@ export const Testimonials = ({ settings, content, isEditor, isPreviewMode }: Tes
|
|
|
1893
2130
|
}
|
|
1894
2131
|
|
|
1895
2132
|
return (
|
|
1896
|
-
<div className={
|
|
2133
|
+
<div className={\`\${P}-wrapper\`}>
|
|
2134
|
+
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
2135
|
+
{measureLayerEl}
|
|
1897
2136
|
<div
|
|
1898
2137
|
style={{
|
|
1899
|
-
display: 'flex',
|
|
1900
|
-
flexDirection: 'row',
|
|
1901
2138
|
gap: scaled(gap),
|
|
1902
2139
|
justifyContent: 'center',
|
|
1903
2140
|
overflowX: 'auto',
|
|
2141
|
+
display: 'flex',
|
|
2142
|
+
flexDirection: 'row',
|
|
1904
2143
|
}}
|
|
1905
2144
|
aria-label="Testimonials"
|
|
1906
2145
|
>
|
|
1907
2146
|
{content?.map((item: TestimonialsItem, index: number) =>
|
|
1908
|
-
renderCardWrapper(item, index
|
|
2147
|
+
renderCardWrapper(item, index)
|
|
1909
2148
|
)}
|
|
1910
2149
|
</div>
|
|
1911
2150
|
</div>
|
|
@@ -1945,48 +2184,277 @@ type TestimonialsSettings = {
|
|
|
1945
2184
|
logoMarginTop: number;
|
|
1946
2185
|
logoWidth: number;
|
|
1947
2186
|
logoHeight: number;
|
|
1948
|
-
textMinHeight: number;
|
|
1949
|
-
captionMinHeight: number;
|
|
1950
2187
|
captionMarginTop: number;
|
|
1951
|
-
styles: TestimonialsStyles;
|
|
1952
2188
|
};
|
|
2189
|
+
`,To={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ds={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...To.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:{...To.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:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,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:"cursor",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:"Logo 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:"Logo",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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},qs={element:zs,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:Ds,sourceCode:Bs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Us(e){return`
|
|
2190
|
+
.${e}-container {
|
|
2191
|
+
position: relative;
|
|
2192
|
+
overflow-x: clip;
|
|
2193
|
+
display: flex;
|
|
2194
|
+
width: 100%;
|
|
2195
|
+
flex-direction: column;
|
|
2196
|
+
align-items: center;
|
|
2197
|
+
}
|
|
1953
2198
|
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
textAlign: 'left' | 'center' | 'right';
|
|
1966
|
-
wordSpacing: number;
|
|
1967
|
-
fontSizeLineHeight: {
|
|
1968
|
-
fontSize: number;
|
|
1969
|
-
lineHeight: number;
|
|
1970
|
-
};
|
|
1971
|
-
textAppearance: {
|
|
1972
|
-
textTransform: 'none' | 'uppercase' | 'lowercase';
|
|
1973
|
-
textDecoration: 'none' | 'underline';
|
|
1974
|
-
fontVariant: 'normal' | 'small-caps';
|
|
1975
|
-
};
|
|
1976
|
-
color: string;
|
|
1977
|
-
};
|
|
2199
|
+
.${e}-wrapper {
|
|
2200
|
+
position: relative;
|
|
2201
|
+
width: 100%;
|
|
2202
|
+
order: 1;
|
|
2203
|
+
display: flex;
|
|
2204
|
+
flex-direction: column;
|
|
2205
|
+
inset: 0;
|
|
2206
|
+
pointer-events: none;
|
|
2207
|
+
box-sizing: border-box;
|
|
2208
|
+
height: auto;
|
|
2209
|
+
}
|
|
1978
2210
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
`,Ao={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},ts={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:.5,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"switch-toggle-2",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"range-control"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"range-control"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"range-control"}},strokeColor:{type:"string",scope:"common",title:"Stroke color",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG color",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:100,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"range-control"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"range-control"}},textColor:{type:"string",scope:"common",title:"Text color",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Caption color",display:{type:"palette-color-picker"}},textMinHeight:{type:"number",scope:"layout",title:"Quote",min:0,max:300,display:{type:"range-control"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:300,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Caption",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"}},textFontFamily:{type:"string",scope:"common",title:"Text",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"}}},defaults:{autoplay:"off",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:3,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:0,logoWidth:.02,logoHeight:.02,textMinHeight:.01,captionMinHeight:.01,captionMarginTop:0,textFontSize:.01,textLineHeight:.01,captionFontSize:.01,captionLineHeight:.01},d:{speed:5,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.01,logoWidth:.05,logoHeight:.05,textMinHeight:.07,captionMinHeight:.01,captionMarginTop:.01,textFontSize:.01,textLineHeight:.01,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","textMinHeight","captionMarginTop"]},panels:[{id:"general",icon:"cursor",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:"Min Height",items:["textMinHeight","captionMinHeight"]},{type:"row",title:"Logo Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"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:"Logo",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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},ns={element:Ql,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:750,height:300},schema:ts,sourceCode:es,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"}]}},os="TestimonialSingle-module__container___YKr4M",rs="TestimonialSingle-module__wrapper___hUgOd",is="TestimonialSingle-module__wrapperAutoplayOff___dgrHY",as="TestimonialSingle-module__elementsOverlay___2QyBb",ls="TestimonialSingle-module__fadeStack___Ye77N",ss="TestimonialSingle-module__fadeItemPrev___dQn4-",cs="TestimonialSingle-module__fadeItemCurrent___intAh",ps="TestimonialSingle-module__fadeIn___mnR5D",us="TestimonialSingle-module__fadeOut___WiXP1",ds="TestimonialSingle-module__icon___qH8ha",gs="TestimonialSingle-module__controls___0dIZ-",ms="TestimonialSingle-module__arrow___sVKUw",fs="TestimonialSingle-module__nextArrow___U31Ty",ys="TestimonialSingle-module__arrowInner___tep0d",hs="TestimonialSingle-module__arrowImg___8JHHQ",vs="TestimonialSingle-module__mirror___kWPu-",bs="TestimonialSingle-module__control___RwzDc",xe={container:os,wrapper:rs,wrapperAutoplayOff:is,elementsOverlay:as,fadeStack:ls,fadeItemPrev:ss,fadeItemCurrent:cs,fadeIn:ps,fadeOut:us,icon:ds,controls:gs,arrow:ms,nextArrow:fs,arrowInner:ys,arrowImg:hs,mirror:vs,control:bs},xs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const r=t||[],{autoplay:s,delay:i,align:c,width:p,imageMarginTop:g,textMarginTop:u,captionMarginTop:F,imageWidth:S,imageHeight:y,controlsWidth:d,controlsColor:m,controlsHoverColor:w}=e,v=(()=>{const a=s;if(typeof a=="boolean")return a;if(typeof a=="string"){const h=a.trim().toLowerCase();return h==="on"||h==="true"}return!1})(),b=v&&!o,[L,G]=A.useState(0),[N,T]=A.useState(null),[x,R]=A.useState(!1),C=A.useRef(null),O=A.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=A.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);A.useEffect(()=>{G(0),T(null),R(!1)},[r.length]);const V=r[L],H=N===null?null:r[N],Y=a=>{var he;const h=(he=e==null?void 0:e.styles)==null?void 0:he[a];if(h)return h;const z=a==="text"?"text":"caption",j=e==null?void 0:e[`${z}FontFamily`],B=e==null?void 0:e[`${z}FontSettings`],X=e==null?void 0:e[`${z}LetterSpacing`],K=e==null?void 0:e[`${z}WordSpacing`],te=e==null?void 0:e[`${z}TextAlign`],oe=e==null?void 0:e[`${z}TextAppearance`],le=e==null?void 0:e[`${z}Color`],ce=e==null?void 0:e[`${z}FontSize`],Se=e==null?void 0:e[`${z}LineHeight`];return typeof j=="string"||!!B||typeof X=="number"||typeof K=="number"||typeof te=="string"||!!oe||typeof le=="string"||typeof ce=="number"||typeof Se=="number"?{widthSettings:{width:.13,sizing:"manual"},fontSettings:{fontFamily:typeof j=="string"?j:"Arial",fontWeight:typeof(B==null?void 0:B.fontWeight)=="number"?B.fontWeight:400,fontStyle:typeof(B==null?void 0:B.fontStyle)=="string"?B.fontStyle:"normal"},letterSpacing:typeof X=="number"?X:0,wordSpacing:typeof K=="number"?K:0,textAlign:te==="left"||te==="center"||te==="right"?te:"left",fontSizeLineHeight:{fontSize:typeof ce=="number"?ce:.01,lineHeight:typeof Se=="number"?Se:.01},textAppearance:{textTransform:(oe==null?void 0:oe.textTransform)??"none",textDecoration:(oe==null?void 0:oe.textDecoration)??"none",fontVariant:(oe==null?void 0:oe.fontVariant)??"normal"},color:typeof le=="string"?le:"#000000"}:void 0},D=Y("text"),f=Y("caption"),M=a=>_.scalingValue(a,n??!1),E=r.length>1&&(!!D||!!f),I=A.useRef(null),[$,k]=A.useState(0),[J,ae]=A.useState(0),ne=r.length>1,ie=A.useCallback((a,h)=>!ne||h===a?a:(C.current&&window.clearTimeout(C.current),T(a),R(!0),C.current=window.setTimeout(()=>{T(null),R(!1),C.current=null},300),h),[ne]);A.useCallback(a=>{G(h=>ie(h,a))},[ie]);const P=A.useCallback(()=>{ne&&G(a=>ie(a,(a-1+r.length)%r.length))},[ne,ie,r.length]),ee=A.useCallback(()=>{ne&&G(a=>ie(a,(a+1)%r.length))},[ne,ie,r.length]);A.useEffect(()=>{if(!b||!ne)return;const a=window.setInterval(()=>{G(h=>ie(h,(h+1)%r.length))},i);return()=>{window.clearInterval(a)}},[b,ne,ie,r.length,i]),A.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current)},[]);const de=e.controls??{mode:"Off",icon:null},se=de.mode==="On"?de.icon??null:null,ge=A.useMemo(()=>M(.01),[n]),ye=A.useMemo(()=>_.scalingValue(d??.02,n??!1),[d,n]),_e=A.useCallback((a,h)=>{var te,oe,le,ce,Se;const z=h==null?void 0:h.textMinHeightPx,j=h==null?void 0:h.captionMinHeightPx,B=h==null?void 0:h.dataMeasureAttrs;let X=null;if(D){const{fontSettings:Q,letterSpacing:pe,wordSpacing:he,fontSizeLineHeight:Ae,textAppearance:ke,color:Oe}=D;X=l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"textMarginTop",className:xe.control,style:{height:_.scalingValue(u??0,n??!1),width:"100%"}}),l.jsx("div",{...B?{"data-testimonial-measure":"text"}:{},style:{fontFamily:Q.fontFamily,fontWeight:Q.fontWeight,fontStyle:Q.fontStyle,...typeof z=="number"&&z>0?{minHeight:z}:{},letterSpacing:_.scalingValue(pe,n),wordSpacing:_.scalingValue(he,n),textAlign:W,fontSize:_.scalingValue(Ae.fontSize,n),lineHeight:_.scalingValue(Ae.lineHeight,n),textTransform:ke.textTransform??"none",textDecoration:ke.textDecoration??"none",fontVariant:ke.fontVariant??"normal",color:Oe,pointerEvents:"auto"},children:l.jsx(zt,{content:a.text??[]})})]},"text")}let K=null;if(f){const{fontSettings:Q,letterSpacing:pe,wordSpacing:he,fontSizeLineHeight:Ae,textAppearance:ke,color:Oe}=f;K=l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:[l.jsx("div",{"data-controls":"captionMarginTop",className:xe.control,style:{height:_.scalingValue(F??0,n??!1),width:"100%"}}),l.jsx("div",{...B?{"data-testimonial-measure":"caption"}:{},style:{fontFamily:Q.fontFamily,fontWeight:Q.fontWeight,fontStyle:Q.fontStyle,...typeof j=="number"&&j>0?{minHeight:j}:{},letterSpacing:_.scalingValue(pe,n),wordSpacing:_.scalingValue(he,n),textAlign:W,fontSize:_.scalingValue(Ae.fontSize,n),lineHeight:_.scalingValue(Ae.lineHeight,n),textTransform:ke.textTransform??"none",textDecoration:ke.textDecoration??"none",fontVariant:ke.fontVariant??"normal",color:Oe,pointerEvents:"auto"},children:l.jsx(zt,{content:a.caption})})]},"caption")}return l.jsxs(l.Fragment,{children:[X,l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:O,width:"100%"},children:l.jsxs("div",{style:{width:_.scalingValue(S??0,n??!1),height:_.scalingValue(y??0,n??!1)},children:[((te=a.image)==null?void 0:te.url)&&l.jsx("div",{"data-controls":"imageMarginTop",className:xe.control,style:{height:_.scalingValue(g??0,n??!1),width:"100%"}}),((oe=a.image)==null?void 0:oe.url)&&l.jsx("img",{src:(le=a.image)==null?void 0:le.url,alt:(ce=a.image)==null?void 0:ce.name,className:xe.icon,style:{pointerEvents:"auto",objectFit:((Se=a.image)==null?void 0:Se.objectFit)||"cover",width:"100%",height:"100%"}})]})},"image"),K]})},[F,f,g,S,y,n,O,W,u,D]);if(A.useLayoutEffect(()=>{if(!E){k(0),ae(0);return}const a=I.current;if(!a)return;const h=()=>{const j=Array.from(a.querySelectorAll('[data-testimonial-measure="text"]')).reduce((X,K)=>Math.max(X,K.getBoundingClientRect().height),0),B=Array.from(a.querySelectorAll('[data-testimonial-measure="caption"]')).reduce((X,K)=>Math.max(X,K.getBoundingClientRect().height),0);k(j),ae(B)};h();const z=new ResizeObserver(h);return z.observe(a),()=>{z.disconnect()}},[E,r,_e]),!V)return l.jsx(l.Fragment,{});const U=E?{textMinHeightPx:$,captionMinHeightPx:J}:void 0;return l.jsx(l.Fragment,{children:l.jsxs("div",{className:xe.container,style:{flexDirection:"column",alignItems:"center"},children:[l.jsxs("div",{className:ue(xe.elementsOverlay,xe.wrapper,!v&&xe.wrapperAutoplayOff),style:{width:_.scalingValue(p??0,n??!1),display:"flex",flexDirection:"column",alignItems:O,inset:0,pointerEvents:"none",height:"100%",boxSizing:"border-box",position:"relative"},children:[E&&l.jsx("div",{ref:I,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:r.map((a,h)=>l.jsx("div",{style:{width:"100%"},children:_e(a,{dataMeasureAttrs:!0})},h))}),l.jsxs("div",{className:xe.fadeStack,children:[H&&x&&l.jsx("div",{className:ue(xe.fadeItemPrev,xe.fadeOut),children:_e(H,U)}),l.jsx("div",{className:ue(xe.fadeItemCurrent,x?xe.fadeIn:void 0),children:_e(V,U)})]})]}),de.mode==="On"&&l.jsxs("div",{className:xe.controls,style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:ge,paddingRight:ge},children:[l.jsx("div",{className:xe.arrow,style:{pointerEvents:"auto",width:ye,height:ye,"--arrow-hover-color":w},children:l.jsx("button",{type:"button",className:xe.arrowInner,onClick:P,"aria-label":"Previous testimonial",style:{pointerEvents:"auto"},children:se&&l.jsx(et,{url:se,fill:m,hoverFill:w,className:ue(xe.arrowImg,xe.mirror)})})}),l.jsx("div",{className:ue(xe.arrow,xe.nextArrow),style:{pointerEvents:"auto",width:ye,height:ye,"--arrow-hover-color":w},children:l.jsx("button",{type:"button",className:xe.arrowInner,onClick:ee,"aria-label":"Next testimonial",style:{pointerEvents:"auto"},children:se&&l.jsx(et,{url:se,fill:m,hoverFill:w,className:xe.arrowImg})})})]})]})})},Ss=`import cn from 'classnames';
|
|
2211
|
+
.${e}-wrapper-autoplay-off {
|
|
2212
|
+
overflow-x: hidden;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
.${e}-fade-stack {
|
|
2216
|
+
position: relative;
|
|
2217
|
+
width: 100%;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
.${e}-fade-item-prev {
|
|
2221
|
+
position: absolute;
|
|
2222
|
+
inset: 0;
|
|
2223
|
+
width: 100%;
|
|
2224
|
+
height: 100%;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
.${e}-fade-item-current {
|
|
2228
|
+
position: relative;
|
|
2229
|
+
width: 100%;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
@keyframes ${e}-testimonial-fade-in {
|
|
2233
|
+
from { opacity: 0; }
|
|
2234
|
+
to { opacity: 1; }
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
@keyframes ${e}-testimonial-fade-out {
|
|
2238
|
+
from { opacity: 1; }
|
|
2239
|
+
to { opacity: 0; }
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
.${e}-fade-in {
|
|
2243
|
+
animation: ${e}-testimonial-fade-in 300ms ease-in forwards;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.${e}-fade-out {
|
|
2247
|
+
animation: ${e}-testimonial-fade-out 300ms ease-in forwards;
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
.${e}-controls {
|
|
2251
|
+
position: absolute;
|
|
2252
|
+
inset: 0;
|
|
2253
|
+
pointer-events: none;
|
|
2254
|
+
display: flex;
|
|
2255
|
+
width: 100%;
|
|
2256
|
+
align-items: center;
|
|
2257
|
+
justify-content: space-between;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
.${e}-arrow {
|
|
2261
|
+
pointer-events: auto;
|
|
2262
|
+
position: relative;
|
|
2263
|
+
display: flex;
|
|
2264
|
+
align-items: center;
|
|
2265
|
+
justify-content: center;
|
|
2266
|
+
border: none;
|
|
2267
|
+
background-color: transparent;
|
|
2268
|
+
z-index: 1;
|
|
2269
|
+
padding: 0;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
.${e}-next-arrow {
|
|
2273
|
+
left: unset;
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
.${e}-arrow-inner {
|
|
2277
|
+
all: unset;
|
|
2278
|
+
cursor: pointer;
|
|
2279
|
+
width: 100%;
|
|
2280
|
+
height: 100%;
|
|
2281
|
+
pointer-events: auto;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
.${e}-arrow-img {
|
|
2285
|
+
position: absolute;
|
|
2286
|
+
top: 50%;
|
|
2287
|
+
left: 50%;
|
|
2288
|
+
transform: translate(-50%, -50%);
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
.${e}-mirror {
|
|
2292
|
+
transform: translate(-50%, -50%) scaleX(-1) !important;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
.${e}-control {
|
|
2296
|
+
position: relative;
|
|
2297
|
+
z-index: 2;
|
|
2298
|
+
pointer-events: auto;
|
|
2299
|
+
width: 100%;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
.${e}-control::before {
|
|
2303
|
+
content: "";
|
|
2304
|
+
position: absolute;
|
|
2305
|
+
top: 0;
|
|
2306
|
+
left: 0;
|
|
2307
|
+
width: 100%;
|
|
2308
|
+
height: 100%;
|
|
2309
|
+
pointer-events: auto;
|
|
2310
|
+
z-index: 10;
|
|
2311
|
+
}
|
|
2312
|
+
.${e}-icon {
|
|
2313
|
+
pointer-events: auto;
|
|
2314
|
+
width: 100%;
|
|
2315
|
+
height: 100%;
|
|
2316
|
+
}
|
|
2317
|
+
`}const Gs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=$.useScopedStyles(),a=t||[],{autoplay:i,delay:u,align:c,width:m,imageMarginTop:l,textMarginTop:A,captionMarginTop:S,imageWidth:g,imageHeight:p,controlsWidth:d,controlsColor:x,controlsHoverColor:h}=e,y=i==="on"&&!o,[_,D]=w.useState(0),[W,E]=w.useState(null),[b,C]=w.useState(!1),F=w.useRef(null),j=w.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),M=w.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);w.useEffect(()=>{D(0),E(null),C(!1)},[a.length]);const H=a[_],V=W===null?null:a[W],B=G=>{var N,v,q,K,Q;return{fontSettings:{fontFamily:(e==null?void 0:e[`${G}FontFamily`])??"Arial",fontWeight:((N=e==null?void 0:e[`${G}FontSettings`])==null?void 0:N.fontWeight)??400,fontStyle:((v=e==null?void 0:e[`${G}FontSettings`])==null?void 0:v.fontStyle)??"normal"},textAppearance:{textTransform:((q=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:q.textTransform)??"none",textDecoration:((K=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:K.textDecoration)??"none",fontVariant:((Q=e==null?void 0:e[`${G}TextAppearance`])==null?void 0:Q.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${G}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${G}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${G}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${G}WordSpacing`])??0,color:(e==null?void 0:e[`${G}Color`])??"#000000"}},U=B("text"),f=B("caption"),I=a.length>1&&a.some(G=>{var me,N;return(((me=G.text)==null?void 0:me.length)??0)>0||(((N=G.caption)==null?void 0:N.length)??0)>0}),L=w.useRef(null),[k,T]=w.useState(0),[R,Z]=w.useState(0),ae=e.controls??{mode:"Off",icon:null},te=a.length>1,ce=w.useCallback((G,me)=>!te||me===G?G:(F.current&&window.clearTimeout(F.current),E(G),C(!0),F.current=window.setTimeout(()=>{E(null),C(!1),F.current=null},300),me),[te]),P=w.useCallback(()=>{te&&D(G=>ce(G,(G-1+a.length)%a.length))},[te,ce,a.length]),ee=w.useCallback(()=>{te&&D(G=>ce(G,(G+1)%a.length))},[te,ce,a.length]);w.useEffect(()=>{if(!y||!te)return;const G=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),me=window.setInterval(()=>{D(N=>ce(N,(N+1)%a.length))},G);return()=>{window.clearInterval(me)}},[y,te,ce,a.length,u]),w.useEffect(()=>()=>{F.current&&window.clearTimeout(F.current)},[]);const fe=(G,me)=>{var K,Q,ie,re;const N=me==null?void 0:me.textMinHeightPx,v=me==null?void 0:me.captionMinHeightPx,q=me==null?void 0:me.dataMeasureAttrs;return s.jsxs(s.Fragment,{children:[G.text&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:j,width:"100%"},children:[s.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:$.scalingValue(A??0,n??!1)}}),s.jsx("div",{...q&&{"data-testimonial-measure":"text"},style:{...Re(U,n),...N&&N>0?{minHeight:N}:{},textAlign:M,pointerEvents:"auto"},children:s.jsx(Mt,{content:G.text})})]}),s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:j,width:"100%"},children:[s.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:$.scalingValue(l??0,n??!1)}}),s.jsx("div",{style:{width:$.scalingValue(g??0,n??!1),height:$.scalingValue(p??0,n??!1)},children:((K=G.image)==null?void 0:K.url)&&s.jsx("img",{src:(Q=G.image)==null?void 0:Q.url,alt:((ie=G.image)==null?void 0:ie.name)??"",className:`${r}-icon`,style:{objectFit:((re=G.image)==null?void 0:re.objectFit)||"contain"}})})]}),G.caption&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:j,width:"100%"},children:[s.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:$.scalingValue(S??0,n??!1)}}),s.jsx("div",{...q?{"data-testimonial-measure":"caption"}:{},style:{...Re(f,n),...v&&v>0?{minHeight:v}:{},textAlign:M,pointerEvents:"auto"},children:s.jsx(Mt,{content:G.caption})})]})]})},de=w.useCallback(G=>{T(G.maxTextPx),Z(G.maxCaptionPx)},[]);if(w.useLayoutEffect(()=>{if(!I){de({maxTextPx:0,maxCaptionPx:0});return}const G=L.current;if(!G)return;const me=()=>{$.readTestimonialTextMeasure(G,de)};me();const N=new ResizeObserver(me);return N.observe(G),()=>{N.disconnect()}},[I,de,t]),!H)return s.jsx(s.Fragment,{});const ge=I?{textMinHeightPx:k,captionMinHeightPx:R}:void 0;return s.jsx(s.Fragment,{children:s.jsxs("div",{className:`${r}-container`,children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:Us(r)}}),s.jsxs("div",{className:he(`${r}-wrapper`,i==="off"&&`${r}-wrapper-autoplay-off`),style:{width:$.scalingValue(m??0,n??!1),alignItems:j},children:[I&&s.jsx("div",{ref:L,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((G,me)=>s.jsx("div",{style:{width:"100%"},children:fe(G,{dataMeasureAttrs:!0})},me))}),s.jsxs("div",{className:`${r}-fade-stack`,children:[V&&b&&s.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:fe(V,ge)}),s.jsx("div",{className:he(`${r}-fade-item-current`,b?`${r}-fade-in`:void 0),children:fe(H,ge)})]})]}),ae.mode==="On"&&s.jsxs("div",{className:`${r}-controls`,children:[s.jsx("div",{className:`${r}-arrow`,style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":h},children:s.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:P,disabled:!te,"aria-label":"Previous testimonial",children:ae.icon&&s.jsx(Ke,{url:ae.icon,fill:x,hoverFill:h,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),s.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:$.scalingValue(d??.02,n??!1),height:$.scalingValue(d??.02,n??!1),"--arrow-hover-color":h},children:s.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:ee,disabled:!te,"aria-label":"Next testimonial",children:ae.icon&&s.jsx(Ke,{url:ae.icon,fill:x,hoverFill:h,className:`${r}-arrow-img`})})})]})]})})},Ys=`import cn from 'classnames';
|
|
1984
2318
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1985
|
-
import classes from './TestimonialSingle.module.scss';
|
|
1986
2319
|
import { CommonComponentProps } from '../props';
|
|
1987
2320
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
1988
2321
|
import { scalingValue } from '../utils/scalingValue';
|
|
1989
2322
|
import { SvgImage } from '../helpers/SvgImage/SvgImage';
|
|
2323
|
+
import { useScopedStyles } from '../utils/useScopedStyles';
|
|
2324
|
+
import { readTestimonialTextMeasure } from '../utils/readTestimonialTextMeasure';
|
|
2325
|
+
import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
|
|
2326
|
+
|
|
2327
|
+
function getCSS(P: string): string {
|
|
2328
|
+
return \`
|
|
2329
|
+
.\${P}-container {
|
|
2330
|
+
position: relative;
|
|
2331
|
+
overflow-x: clip;
|
|
2332
|
+
display: flex;
|
|
2333
|
+
width: 100%;
|
|
2334
|
+
flex-direction: column;
|
|
2335
|
+
align-items: center;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
.\${P}-wrapper {
|
|
2339
|
+
position: relative;
|
|
2340
|
+
width: 100%;
|
|
2341
|
+
order: 1;
|
|
2342
|
+
display: flex;
|
|
2343
|
+
flex-direction: column;
|
|
2344
|
+
inset: 0;
|
|
2345
|
+
pointer-events: none;
|
|
2346
|
+
box-sizing: border-box;
|
|
2347
|
+
height: auto;
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
.\${P}-wrapper-autoplay-off {
|
|
2351
|
+
overflow-x: hidden;
|
|
2352
|
+
}
|
|
2353
|
+
|
|
2354
|
+
.\${P}-fade-stack {
|
|
2355
|
+
position: relative;
|
|
2356
|
+
width: 100%;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
.\${P}-fade-item-prev {
|
|
2360
|
+
position: absolute;
|
|
2361
|
+
inset: 0;
|
|
2362
|
+
width: 100%;
|
|
2363
|
+
height: 100%;
|
|
2364
|
+
}
|
|
2365
|
+
|
|
2366
|
+
.\${P}-fade-item-current {
|
|
2367
|
+
position: relative;
|
|
2368
|
+
width: 100%;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2371
|
+
@keyframes \${P}-testimonial-fade-in {
|
|
2372
|
+
from { opacity: 0; }
|
|
2373
|
+
to { opacity: 1; }
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
@keyframes \${P}-testimonial-fade-out {
|
|
2377
|
+
from { opacity: 1; }
|
|
2378
|
+
to { opacity: 0; }
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
.\${P}-fade-in {
|
|
2382
|
+
animation: \${P}-testimonial-fade-in 300ms ease-in forwards;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
.\${P}-fade-out {
|
|
2386
|
+
animation: \${P}-testimonial-fade-out 300ms ease-in forwards;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
.\${P}-controls {
|
|
2390
|
+
position: absolute;
|
|
2391
|
+
inset: 0;
|
|
2392
|
+
pointer-events: none;
|
|
2393
|
+
display: flex;
|
|
2394
|
+
width: 100%;
|
|
2395
|
+
align-items: center;
|
|
2396
|
+
justify-content: space-between;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
.\${P}-arrow {
|
|
2400
|
+
pointer-events: auto;
|
|
2401
|
+
position: relative;
|
|
2402
|
+
display: flex;
|
|
2403
|
+
align-items: center;
|
|
2404
|
+
justify-content: center;
|
|
2405
|
+
border: none;
|
|
2406
|
+
background-color: transparent;
|
|
2407
|
+
z-index: 1;
|
|
2408
|
+
padding: 0;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
.\${P}-next-arrow {
|
|
2412
|
+
left: unset;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
.\${P}-arrow-inner {
|
|
2416
|
+
all: unset;
|
|
2417
|
+
cursor: pointer;
|
|
2418
|
+
width: 100%;
|
|
2419
|
+
height: 100%;
|
|
2420
|
+
pointer-events: auto;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.\${P}-arrow-img {
|
|
2424
|
+
position: absolute;
|
|
2425
|
+
top: 50%;
|
|
2426
|
+
left: 50%;
|
|
2427
|
+
transform: translate(-50%, -50%);
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.\${P}-mirror {
|
|
2431
|
+
transform: translate(-50%, -50%) scaleX(-1) !important;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
.\${P}-control {
|
|
2435
|
+
position: relative;
|
|
2436
|
+
z-index: 2;
|
|
2437
|
+
pointer-events: auto;
|
|
2438
|
+
width: 100%;
|
|
2439
|
+
}
|
|
2440
|
+
|
|
2441
|
+
.\${P}-control::before {
|
|
2442
|
+
content: "";
|
|
2443
|
+
position: absolute;
|
|
2444
|
+
top: 0;
|
|
2445
|
+
left: 0;
|
|
2446
|
+
width: 100%;
|
|
2447
|
+
height: 100%;
|
|
2448
|
+
pointer-events: auto;
|
|
2449
|
+
z-index: 10;
|
|
2450
|
+
}
|
|
2451
|
+
.\${P}-icon {
|
|
2452
|
+
pointer-events: auto;
|
|
2453
|
+
width: 100%;
|
|
2454
|
+
height: 100%;
|
|
2455
|
+
}
|
|
2456
|
+
\`;
|
|
2457
|
+
}
|
|
1990
2458
|
|
|
1991
2459
|
type TestimonialsProps = {
|
|
1992
2460
|
settings: TestimonialsSettings;
|
|
@@ -2001,44 +2469,11 @@ type RenderItemContentOpts = {
|
|
|
2001
2469
|
dataMeasureAttrs?: boolean;
|
|
2002
2470
|
};
|
|
2003
2471
|
|
|
2004
|
-
type CaptionStyleFromFlatSettings = {
|
|
2005
|
-
fontSettings: {
|
|
2006
|
-
fontFamily: string;
|
|
2007
|
-
fontWeight: number;
|
|
2008
|
-
fontStyle: string;
|
|
2009
|
-
};
|
|
2010
|
-
widthSettings: {
|
|
2011
|
-
width: number;
|
|
2012
|
-
sizing: 'auto' | 'manual';
|
|
2013
|
-
};
|
|
2014
|
-
letterSpacing: number;
|
|
2015
|
-
textAlign: 'left' | 'center' | 'right';
|
|
2016
|
-
wordSpacing: number;
|
|
2017
|
-
fontSizeLineHeight: {
|
|
2018
|
-
fontSize: number;
|
|
2019
|
-
lineHeight: number;
|
|
2020
|
-
};
|
|
2021
|
-
textAppearance: {
|
|
2022
|
-
textTransform: 'none' | 'uppercase' | 'lowercase';
|
|
2023
|
-
textDecoration: 'none' | 'underline';
|
|
2024
|
-
fontVariant: 'normal' | 'small-caps';
|
|
2025
|
-
};
|
|
2026
|
-
color: string;
|
|
2027
|
-
};
|
|
2028
|
-
|
|
2029
2472
|
export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }: TestimonialsProps) => {
|
|
2473
|
+
const { prefix: P } = useScopedStyles();
|
|
2030
2474
|
const items = content || [];
|
|
2031
2475
|
const { autoplay, delay, align, width, imageMarginTop, textMarginTop, captionMarginTop, imageWidth, imageHeight, controlsWidth, controlsColor, controlsHoverColor } = settings;
|
|
2032
|
-
const
|
|
2033
|
-
const v = autoplay as unknown;
|
|
2034
|
-
if (typeof v === 'boolean') return v;
|
|
2035
|
-
if (typeof v === 'string') {
|
|
2036
|
-
const s = v.trim().toLowerCase();
|
|
2037
|
-
return s === 'on' || s === 'true';
|
|
2038
|
-
}
|
|
2039
|
-
return false;
|
|
2040
|
-
})();
|
|
2041
|
-
const isAnimating = isAutoplay && !isPreviewMode;
|
|
2476
|
+
const isAnimating = autoplay === 'on' && !isPreviewMode;
|
|
2042
2477
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
2043
2478
|
const [prevIndex, setPrevIndex] = useState<number | null>(null);
|
|
2044
2479
|
const [isFading, setIsFading] = useState(false);
|
|
@@ -2077,70 +2512,37 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
|
|
|
2077
2512
|
const currentItem = items[activeIndex];
|
|
2078
2513
|
const previousItem = prevIndex === null ? null : items[prevIndex];
|
|
2079
2514
|
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2082
|
-
): CaptionStyles | undefined => {
|
|
2083
|
-
const fromNested = (settings as any)?.styles?.[kind] as CaptionStyles | undefined;
|
|
2084
|
-
if (fromNested) return fromNested;
|
|
2085
|
-
|
|
2086
|
-
const prefix = kind === 'text' ? 'text' : 'caption';
|
|
2087
|
-
const fontFamily = (settings as any)?.[\`\${prefix}FontFamily\`];
|
|
2088
|
-
const fontSettings = (settings as any)?.[\`\${prefix}FontSettings\`];
|
|
2089
|
-
const letterSpacing = (settings as any)?.[\`\${prefix}LetterSpacing\`];
|
|
2090
|
-
const wordSpacing = (settings as any)?.[\`\${prefix}WordSpacing\`];
|
|
2091
|
-
const textAlign = (settings as any)?.[\`\${prefix}TextAlign\`];
|
|
2092
|
-
const textAppearance = (settings as any)?.[\`\${prefix}TextAppearance\`];
|
|
2093
|
-
const color = (settings as any)?.[\`\${prefix}Color\`];
|
|
2094
|
-
const fontSize = (settings as any)?.[\`\${prefix}FontSize\`];
|
|
2095
|
-
const lineHeight = (settings as any)?.[\`\${prefix}LineHeight\`];
|
|
2096
|
-
|
|
2097
|
-
const hasAnyFlat =
|
|
2098
|
-
typeof fontFamily === 'string' ||
|
|
2099
|
-
!!fontSettings ||
|
|
2100
|
-
typeof letterSpacing === 'number' ||
|
|
2101
|
-
typeof wordSpacing === 'number' ||
|
|
2102
|
-
typeof textAlign === 'string' ||
|
|
2103
|
-
!!textAppearance ||
|
|
2104
|
-
typeof color === 'string' ||
|
|
2105
|
-
typeof fontSize === 'number' ||
|
|
2106
|
-
typeof lineHeight === 'number';
|
|
2107
|
-
if (!hasAnyFlat) return undefined;
|
|
2108
|
-
|
|
2109
|
-
const flat: CaptionStyleFromFlatSettings = {
|
|
2110
|
-
widthSettings: { width: 0.13, sizing: 'manual' },
|
|
2515
|
+
const resolveTextStyle = (kind: 'text' | 'caption'): TextStyles => {
|
|
2516
|
+
const styles: TextStyles = {
|
|
2111
2517
|
fontSettings: {
|
|
2112
|
-
fontFamily:
|
|
2113
|
-
fontWeight:
|
|
2114
|
-
fontStyle:
|
|
2115
|
-
},
|
|
2116
|
-
letterSpacing: typeof letterSpacing === 'number' ? letterSpacing : 0,
|
|
2117
|
-
wordSpacing: typeof wordSpacing === 'number' ? wordSpacing : 0,
|
|
2118
|
-
textAlign: (textAlign === 'left' || textAlign === 'center' || textAlign === 'right') ? textAlign : 'left',
|
|
2119
|
-
fontSizeLineHeight: {
|
|
2120
|
-
fontSize: typeof fontSize === 'number' ? fontSize : 0.01,
|
|
2121
|
-
lineHeight: typeof lineHeight === 'number' ? lineHeight : 0.01,
|
|
2518
|
+
fontFamily: (settings as any)?.[\`\${kind}FontFamily\`] ?? 'Arial',
|
|
2519
|
+
fontWeight: (settings as any)?.[\`\${kind}FontSettings\`]?.fontWeight ?? 400,
|
|
2520
|
+
fontStyle: (settings as any)?.[\`\${kind}FontSettings\`]?.fontStyle ?? 'normal',
|
|
2122
2521
|
},
|
|
2123
2522
|
textAppearance: {
|
|
2124
|
-
textTransform:
|
|
2125
|
-
textDecoration:
|
|
2126
|
-
fontVariant:
|
|
2523
|
+
textTransform: (settings as any)?.[\`\${kind}TextAppearance\`]?.textTransform ?? 'none',
|
|
2524
|
+
textDecoration: (settings as any)?.[\`\${kind}TextAppearance\`]?.textDecoration ?? 'none',
|
|
2525
|
+
fontVariant: (settings as any)?.[\`\${kind}TextAppearance\`]?.fontVariant ?? 'normal',
|
|
2127
2526
|
},
|
|
2128
|
-
|
|
2527
|
+
fontSize: (settings as any)?.[\`\${kind}FontSize\`] ?? 0.01,
|
|
2528
|
+
lineHeight: (settings as any)?.[\`\${kind}LineHeight\`] ?? 0.01,
|
|
2529
|
+
letterSpacing: (settings as any)?.[\`\${kind}LetterSpacing\`] ?? 0,
|
|
2530
|
+
wordSpacing: (settings as any)?.[\`\${kind}WordSpacing\`] ?? 0,
|
|
2531
|
+
color: (settings as any)?.[\`\${kind}Color\`] ?? '#000000',
|
|
2129
2532
|
};
|
|
2130
|
-
|
|
2131
|
-
return flat as CaptionStyles;
|
|
2533
|
+
return styles;
|
|
2132
2534
|
};
|
|
2133
2535
|
|
|
2134
|
-
const textStyle =
|
|
2135
|
-
const captionStyle =
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2138
|
-
const shouldMeasureTextExtents = items.length > 1 && (!!textStyle || !!captionStyle);
|
|
2536
|
+
const textStyle = resolveTextStyle('text');
|
|
2537
|
+
const captionStyle = resolveTextStyle('caption');
|
|
2538
|
+
const shouldMeasureTextExtents =
|
|
2539
|
+
items.length > 1 && items.some((item) => (item.text?.length ?? 0) > 0 || (item.caption?.length ?? 0) > 0);
|
|
2139
2540
|
const measureLayerRef = useRef<HTMLDivElement>(null);
|
|
2140
2541
|
const [measuredTextMinPx, setMeasuredTextMinPx] = useState(0);
|
|
2141
2542
|
const [measuredCaptionMinPx, setMeasuredCaptionMinPx] = useState(0);
|
|
2142
|
-
|
|
2543
|
+
const controls: TestimonialsSettings['controls'] = settings.controls ?? { mode: 'Off', icon: null };
|
|
2143
2544
|
const canSwitch = items.length > 1;
|
|
2545
|
+
|
|
2144
2546
|
const commitTransition = useCallback((currentIndex: number, nextIndex: number) => {
|
|
2145
2547
|
if (!canSwitch) return currentIndex;
|
|
2146
2548
|
if (nextIndex === currentIndex) return currentIndex;
|
|
@@ -2155,10 +2557,6 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
|
|
|
2155
2557
|
return nextIndex;
|
|
2156
2558
|
}, [canSwitch]);
|
|
2157
2559
|
|
|
2158
|
-
const transitionToIndex = useCallback((nextIndex: number) => {
|
|
2159
|
-
setActiveIndex((currentIndex) => commitTransition(currentIndex, nextIndex));
|
|
2160
|
-
}, [commitTransition]);
|
|
2161
|
-
|
|
2162
2560
|
const goPrev = useCallback(() => {
|
|
2163
2561
|
if (!canSwitch) return;
|
|
2164
2562
|
setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex - 1 + items.length) % items.length));
|
|
@@ -2171,9 +2569,10 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
|
|
|
2171
2569
|
|
|
2172
2570
|
useEffect(() => {
|
|
2173
2571
|
if (!isAnimating || !canSwitch) return;
|
|
2572
|
+
const safeDelayMs = Math.max(300, Number.isFinite(delay * 1000) ? delay * 1000 : 0);
|
|
2174
2573
|
const id = window.setInterval(() => {
|
|
2175
2574
|
setActiveIndex((currentIndex) => commitTransition(currentIndex, (currentIndex + 1) % items.length));
|
|
2176
|
-
},
|
|
2575
|
+
}, safeDelayMs);
|
|
2177
2576
|
return () => {
|
|
2178
2577
|
window.clearInterval(id);
|
|
2179
2578
|
};
|
|
@@ -2185,186 +2584,96 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
|
|
|
2185
2584
|
};
|
|
2186
2585
|
}, []);
|
|
2187
2586
|
|
|
2188
|
-
const
|
|
2189
|
-
mode: 'Off',
|
|
2190
|
-
icon: null,
|
|
2191
|
-
};
|
|
2192
|
-
|
|
2193
|
-
const customArrowsUrl = controls.mode === 'On' ? (controls.icon ?? null) : null;
|
|
2194
|
-
const controlsInsetX = useMemo(() => scaled(0.01), [isEditor]);
|
|
2195
|
-
const controlsIconSize = useMemo(
|
|
2196
|
-
() => scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
|
|
2197
|
-
[controlsWidth, isEditor]
|
|
2198
|
-
);
|
|
2199
|
-
|
|
2200
|
-
const renderItemContent = useCallback((item: TestimonialsItem, opts?: RenderItemContentOpts) => {
|
|
2587
|
+
const renderItemContent = (item: TestimonialsItem, opts?: RenderItemContentOpts) => {
|
|
2201
2588
|
const textMinHeightPx = opts?.textMinHeightPx;
|
|
2202
2589
|
const captionMinHeightPx = opts?.captionMinHeightPx;
|
|
2203
2590
|
const dataMeasureAttrs = opts?.dataMeasureAttrs;
|
|
2204
|
-
let textSection = null;
|
|
2205
|
-
if (textStyle) {
|
|
2206
|
-
const { fontSettings, letterSpacing, wordSpacing, fontSizeLineHeight, textAppearance, color } = textStyle;
|
|
2207
|
-
textSection = (
|
|
2208
|
-
<div
|
|
2209
|
-
key="text"
|
|
2210
|
-
style={{
|
|
2211
|
-
display: 'flex',
|
|
2212
|
-
flexDirection: 'column',
|
|
2213
|
-
alignItems: overlayAlignItems,
|
|
2214
|
-
width: '100%',
|
|
2215
|
-
}}
|
|
2216
|
-
>
|
|
2217
|
-
<div
|
|
2218
|
-
data-controls="textMarginTop"
|
|
2219
|
-
className={classes.control}
|
|
2220
|
-
style={{ height: scalingValue(textMarginTop ?? 0, isEditor ?? false), width: '100%' }}
|
|
2221
|
-
/>
|
|
2222
|
-
<div
|
|
2223
|
-
{...(dataMeasureAttrs ? { 'data-testimonial-measure': 'text' as const } : {})}
|
|
2224
|
-
style={{
|
|
2225
|
-
fontFamily: fontSettings.fontFamily,
|
|
2226
|
-
fontWeight: fontSettings.fontWeight,
|
|
2227
|
-
fontStyle: fontSettings.fontStyle,
|
|
2228
|
-
...(typeof textMinHeightPx === 'number' && textMinHeightPx > 0 ? { minHeight: textMinHeightPx } : {}),
|
|
2229
|
-
letterSpacing: scalingValue(letterSpacing, isEditor),
|
|
2230
|
-
wordSpacing: scalingValue(wordSpacing, isEditor),
|
|
2231
|
-
textAlign: overlayTextAlign,
|
|
2232
|
-
fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
|
|
2233
|
-
lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
|
|
2234
|
-
textTransform: textAppearance.textTransform ?? 'none',
|
|
2235
|
-
textDecoration: textAppearance.textDecoration ?? 'none',
|
|
2236
|
-
fontVariant: textAppearance.fontVariant ?? 'normal',
|
|
2237
|
-
color,
|
|
2238
|
-
pointerEvents: 'auto',
|
|
2239
|
-
}}
|
|
2240
|
-
>
|
|
2241
|
-
<RichTextRenderer content={item.text ?? []} />
|
|
2242
|
-
</div>
|
|
2243
|
-
</div>
|
|
2244
|
-
);
|
|
2245
|
-
}
|
|
2246
2591
|
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2592
|
+
return (
|
|
2593
|
+
<>
|
|
2594
|
+
{item.text && (
|
|
2595
|
+
<div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
|
|
2596
|
+
<div
|
|
2597
|
+
data-controls="textMarginTop"
|
|
2598
|
+
className={\`\${P}-control\`}
|
|
2599
|
+
style={{ height: scalingValue(textMarginTop ?? 0, isEditor ?? false) }}
|
|
2600
|
+
/>
|
|
2601
|
+
<div
|
|
2602
|
+
{...(dataMeasureAttrs && { 'data-testimonial-measure': 'text' as const })}
|
|
2603
|
+
style={{
|
|
2604
|
+
...textStylesToCss(textStyle, isEditor),
|
|
2605
|
+
...(textMinHeightPx && textMinHeightPx > 0 ? { minHeight: textMinHeightPx } : {}),
|
|
2606
|
+
textAlign: overlayTextAlign,
|
|
2607
|
+
pointerEvents: 'auto',
|
|
2608
|
+
}}
|
|
2609
|
+
>
|
|
2610
|
+
<RichTextRenderer content={item.text} />
|
|
2611
|
+
</div>
|
|
2612
|
+
</div>
|
|
2613
|
+
)}
|
|
2614
|
+
<div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
|
|
2260
2615
|
<div
|
|
2261
|
-
data-controls="
|
|
2262
|
-
className={
|
|
2263
|
-
style={{ height: scalingValue(
|
|
2616
|
+
data-controls="imageMarginTop"
|
|
2617
|
+
className={\`\${P}-control\`}
|
|
2618
|
+
style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false) }}
|
|
2264
2619
|
/>
|
|
2265
|
-
<div
|
|
2266
|
-
{
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
textAlign: overlayTextAlign,
|
|
2275
|
-
fontSize: scalingValue(fontSizeLineHeight.fontSize, isEditor),
|
|
2276
|
-
lineHeight: scalingValue(fontSizeLineHeight.lineHeight, isEditor),
|
|
2277
|
-
textTransform: textAppearance.textTransform ?? 'none',
|
|
2278
|
-
textDecoration: textAppearance.textDecoration ?? 'none',
|
|
2279
|
-
fontVariant: textAppearance.fontVariant ?? 'normal',
|
|
2280
|
-
color,
|
|
2281
|
-
pointerEvents: 'auto',
|
|
2282
|
-
}}
|
|
2283
|
-
>
|
|
2284
|
-
<RichTextRenderer content={item.caption} />
|
|
2620
|
+
<div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
|
|
2621
|
+
{item.image?.url &&
|
|
2622
|
+
<img
|
|
2623
|
+
src={item.image?.url}
|
|
2624
|
+
alt={item.image?.name ?? ''}
|
|
2625
|
+
className={\`\${P}-icon\`}
|
|
2626
|
+
style={{ objectFit: item.image?.objectFit || 'contain' }}
|
|
2627
|
+
/>
|
|
2628
|
+
}
|
|
2285
2629
|
</div>
|
|
2286
2630
|
</div>
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
display: 'flex',
|
|
2297
|
-
flexDirection: 'column',
|
|
2298
|
-
alignItems: overlayAlignItems,
|
|
2299
|
-
width: '100%',
|
|
2300
|
-
}}
|
|
2301
|
-
>
|
|
2302
|
-
|
|
2303
|
-
<div style={{ width: scalingValue(imageWidth ?? 0, isEditor ?? false), height: scalingValue(imageHeight ?? 0, isEditor ?? false)}}>
|
|
2304
|
-
{item.image?.url && <div
|
|
2305
|
-
data-controls="imageMarginTop"
|
|
2306
|
-
className={classes.control}
|
|
2307
|
-
style={{ height: scalingValue(imageMarginTop ?? 0, isEditor ?? false), width: '100%' }}
|
|
2308
|
-
/>}
|
|
2309
|
-
{item.image?.url && <img
|
|
2310
|
-
src={item.image?.url}
|
|
2311
|
-
alt={item.image?.name}
|
|
2312
|
-
className={classes.icon}
|
|
2631
|
+
{item.caption && (
|
|
2632
|
+
<div style={{ display: 'flex', flexDirection: 'column', alignItems: overlayAlignItems, width: '100%' }}>
|
|
2633
|
+
<div
|
|
2634
|
+
data-controls="captionMarginTop"
|
|
2635
|
+
className={\`\${P}-control\`}
|
|
2636
|
+
style={{ height: scalingValue(captionMarginTop ?? 0, isEditor ?? false) }}
|
|
2637
|
+
/>
|
|
2638
|
+
<div
|
|
2639
|
+
{...(dataMeasureAttrs ? { 'data-testimonial-measure': 'caption' as const } : {})}
|
|
2313
2640
|
style={{
|
|
2641
|
+
...textStylesToCss(captionStyle, isEditor),
|
|
2642
|
+
...(captionMinHeightPx && captionMinHeightPx > 0 ? { minHeight: captionMinHeightPx } : {}),
|
|
2643
|
+
textAlign: overlayTextAlign,
|
|
2314
2644
|
pointerEvents: 'auto',
|
|
2315
|
-
objectFit: item.image?.objectFit || 'cover',
|
|
2316
|
-
width: '100%',
|
|
2317
|
-
height: '100%',
|
|
2318
2645
|
}}
|
|
2319
|
-
|
|
2646
|
+
>
|
|
2647
|
+
<RichTextRenderer content={item.caption} />
|
|
2648
|
+
</div>
|
|
2320
2649
|
</div>
|
|
2321
|
-
|
|
2322
|
-
{captionSection}
|
|
2650
|
+
)}
|
|
2323
2651
|
</>
|
|
2324
2652
|
);
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
isEditor,
|
|
2332
|
-
overlayAlignItems,
|
|
2333
|
-
overlayTextAlign,
|
|
2334
|
-
textMarginTop,
|
|
2335
|
-
textStyle,
|
|
2336
|
-
]);
|
|
2653
|
+
};
|
|
2654
|
+
|
|
2655
|
+
const onMeasuredExtents = useCallback((extents: { maxTextPx: number; maxCaptionPx: number }) => {
|
|
2656
|
+
setMeasuredTextMinPx(extents.maxTextPx);
|
|
2657
|
+
setMeasuredCaptionMinPx(extents.maxCaptionPx);
|
|
2658
|
+
}, []);
|
|
2337
2659
|
|
|
2338
2660
|
useLayoutEffect(() => {
|
|
2339
2661
|
if (!shouldMeasureTextExtents) {
|
|
2340
|
-
|
|
2341
|
-
setMeasuredCaptionMinPx(0);
|
|
2662
|
+
onMeasuredExtents({ maxTextPx: 0, maxCaptionPx: 0 });
|
|
2342
2663
|
return;
|
|
2343
2664
|
}
|
|
2344
|
-
|
|
2345
2665
|
const root = measureLayerRef.current;
|
|
2346
2666
|
if (!root) return;
|
|
2347
|
-
|
|
2348
2667
|
const readExtents = () => {
|
|
2349
|
-
|
|
2350
|
-
(acc, el) => Math.max(acc, el.getBoundingClientRect().height),
|
|
2351
|
-
0
|
|
2352
|
-
);
|
|
2353
|
-
const maxCaption = Array.from(root.querySelectorAll('[data-testimonial-measure="caption"]')).reduce(
|
|
2354
|
-
(acc, el) => Math.max(acc, el.getBoundingClientRect().height),
|
|
2355
|
-
0
|
|
2356
|
-
);
|
|
2357
|
-
setMeasuredTextMinPx(maxText);
|
|
2358
|
-
setMeasuredCaptionMinPx(maxCaption);
|
|
2668
|
+
readTestimonialTextMeasure(root, onMeasuredExtents);
|
|
2359
2669
|
};
|
|
2360
|
-
|
|
2361
2670
|
readExtents();
|
|
2362
2671
|
const ro = new ResizeObserver(readExtents);
|
|
2363
2672
|
ro.observe(root);
|
|
2364
2673
|
return () => {
|
|
2365
2674
|
ro.disconnect();
|
|
2366
2675
|
};
|
|
2367
|
-
}, [shouldMeasureTextExtents,
|
|
2676
|
+
}, [shouldMeasureTextExtents, onMeasuredExtents, content]);
|
|
2368
2677
|
|
|
2369
2678
|
if (!currentItem) return <></>;
|
|
2370
2679
|
|
|
@@ -2374,26 +2683,11 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
|
|
|
2374
2683
|
|
|
2375
2684
|
return (
|
|
2376
2685
|
<>
|
|
2377
|
-
<div
|
|
2378
|
-
|
|
2379
|
-
style={{
|
|
2380
|
-
flexDirection: 'column',
|
|
2381
|
-
alignItems: 'center'
|
|
2382
|
-
}}
|
|
2383
|
-
>
|
|
2686
|
+
<div className={\`\${P}-container\`}>
|
|
2687
|
+
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
2384
2688
|
<div
|
|
2385
|
-
className={cn(
|
|
2386
|
-
style={{
|
|
2387
|
-
width: scalingValue(width ?? 0, isEditor ?? false),
|
|
2388
|
-
display: 'flex',
|
|
2389
|
-
flexDirection: 'column',
|
|
2390
|
-
alignItems: overlayAlignItems,
|
|
2391
|
-
inset: 0,
|
|
2392
|
-
pointerEvents: 'none',
|
|
2393
|
-
height: '100%',
|
|
2394
|
-
boxSizing: 'border-box',
|
|
2395
|
-
position: 'relative',
|
|
2396
|
-
}}
|
|
2689
|
+
className={cn(\`\${P}-wrapper\`, autoplay === 'off' && \`\${P}-wrapper-autoplay-off\`)}
|
|
2690
|
+
style={{ width: scalingValue(width ?? 0, isEditor ?? false), alignItems: overlayAlignItems }}
|
|
2397
2691
|
>
|
|
2398
2692
|
{shouldMeasureTextExtents && (
|
|
2399
2693
|
<div
|
|
@@ -2416,79 +2710,65 @@ export const TestimonialSingle = ({ settings, content, isEditor, isPreviewMode }
|
|
|
2416
2710
|
))}
|
|
2417
2711
|
</div>
|
|
2418
2712
|
)}
|
|
2419
|
-
<div className={
|
|
2713
|
+
<div className={\`\${P}-fade-stack\`}>
|
|
2420
2714
|
{previousItem && isFading && (
|
|
2421
|
-
<div className={cn(
|
|
2715
|
+
<div className={cn(\`\${P}-fade-item-prev\`, \`\${P}-fade-out\`)}>
|
|
2422
2716
|
{renderItemContent(previousItem, visibleContentOpts)}
|
|
2423
2717
|
</div>
|
|
2424
2718
|
)}
|
|
2425
|
-
<div className={cn(
|
|
2719
|
+
<div className={cn(\`\${P}-fade-item-current\`, isFading ? \`\${P}-fade-in\` : undefined)}>
|
|
2426
2720
|
{renderItemContent(currentItem, visibleContentOpts)}
|
|
2427
2721
|
</div>
|
|
2428
2722
|
</div>
|
|
2429
2723
|
</div>
|
|
2430
2724
|
{controls.mode === 'On' && (
|
|
2431
|
-
<div
|
|
2432
|
-
className={classes.controls}
|
|
2433
|
-
style={{
|
|
2434
|
-
position: 'absolute',
|
|
2435
|
-
inset: 0,
|
|
2436
|
-
pointerEvents: 'none',
|
|
2437
|
-
display: 'flex',
|
|
2438
|
-
alignItems: 'center',
|
|
2439
|
-
justifyContent: 'space-between',
|
|
2440
|
-
paddingLeft: controlsInsetX,
|
|
2441
|
-
paddingRight: controlsInsetX,
|
|
2442
|
-
}}
|
|
2443
|
-
>
|
|
2725
|
+
<div className={\`\${P}-controls\`}>
|
|
2444
2726
|
<div
|
|
2445
|
-
className={
|
|
2727
|
+
className={\`\${P}-arrow\`}
|
|
2446
2728
|
style={{
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
height: controlsIconSize,
|
|
2729
|
+
width: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
|
|
2730
|
+
height: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
|
|
2450
2731
|
['--arrow-hover-color' as string]: controlsHoverColor,
|
|
2451
2732
|
}}
|
|
2452
2733
|
>
|
|
2453
2734
|
<button
|
|
2454
2735
|
type="button"
|
|
2455
|
-
className={
|
|
2736
|
+
className={\`\${P}-arrow-inner\`}
|
|
2456
2737
|
onClick={goPrev}
|
|
2738
|
+
disabled={!canSwitch}
|
|
2457
2739
|
aria-label="Previous testimonial"
|
|
2458
|
-
style={{ pointerEvents: 'auto' }}
|
|
2459
2740
|
>
|
|
2460
|
-
{
|
|
2741
|
+
{controls.icon && (
|
|
2461
2742
|
<SvgImage
|
|
2462
|
-
url={
|
|
2743
|
+
url={controls.icon }
|
|
2463
2744
|
fill={controlsColor}
|
|
2464
2745
|
hoverFill={controlsHoverColor}
|
|
2465
|
-
className={cn(
|
|
2746
|
+
className={cn(\`\${P}-arrow-img\`, \`\${P}-mirror\`)}
|
|
2466
2747
|
/>
|
|
2467
2748
|
)}
|
|
2468
2749
|
</button>
|
|
2469
2750
|
</div>
|
|
2470
2751
|
<div
|
|
2471
|
-
className={cn(
|
|
2752
|
+
className={cn(\`\${P}-arrow\`, \`\${P}-next-arrow\`)}
|
|
2472
2753
|
style={{
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
height: controlsIconSize,
|
|
2754
|
+
width: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
|
|
2755
|
+
height: scalingValue(controlsWidth ?? 0.02, isEditor ?? false),
|
|
2476
2756
|
['--arrow-hover-color' as string]: controlsHoverColor,
|
|
2477
2757
|
}}
|
|
2478
2758
|
>
|
|
2479
2759
|
<button
|
|
2480
2760
|
type="button"
|
|
2481
|
-
className={
|
|
2761
|
+
className={\`\${P}-arrow-inner\`}
|
|
2482
2762
|
onClick={goNext}
|
|
2763
|
+
disabled={!canSwitch}
|
|
2483
2764
|
aria-label="Next testimonial"
|
|
2484
|
-
style={{ pointerEvents: 'auto' }}
|
|
2485
2765
|
>
|
|
2486
|
-
{
|
|
2766
|
+
{controls.icon && (
|
|
2487
2767
|
<SvgImage
|
|
2488
|
-
url={
|
|
2768
|
+
url={controls.icon }
|
|
2489
2769
|
fill={controlsColor}
|
|
2490
2770
|
hoverFill={controlsHoverColor}
|
|
2491
|
-
className={
|
|
2771
|
+
className={\`\${P}-arrow-img\`}
|
|
2492
2772
|
/>
|
|
2493
2773
|
)}
|
|
2494
2774
|
</button>
|
|
@@ -2507,8 +2787,8 @@ export type TestimonialsItem = {
|
|
|
2507
2787
|
name?: string;
|
|
2508
2788
|
objectFit?: 'cover' | 'contain';
|
|
2509
2789
|
};
|
|
2510
|
-
text
|
|
2511
|
-
caption
|
|
2790
|
+
text?: any[];
|
|
2791
|
+
caption?: any[];
|
|
2512
2792
|
};
|
|
2513
2793
|
|
|
2514
2794
|
type TestimonialsSettings = {
|
|
@@ -2521,7 +2801,6 @@ type TestimonialsSettings = {
|
|
|
2521
2801
|
imageHeight?: number;
|
|
2522
2802
|
textMarginTop?: number;
|
|
2523
2803
|
captionMarginTop?: number;
|
|
2524
|
-
styles: TestimonialsStyles;
|
|
2525
2804
|
controlsColor: string;
|
|
2526
2805
|
controlsHoverColor: string;
|
|
2527
2806
|
controlsWidth?: number;
|
|
@@ -2530,33 +2809,4 @@ type TestimonialsSettings = {
|
|
|
2530
2809
|
icon?: string | null;
|
|
2531
2810
|
};
|
|
2532
2811
|
};
|
|
2533
|
-
|
|
2534
|
-
type CaptionStyles = {
|
|
2535
|
-
fontSettings: {
|
|
2536
|
-
fontFamily: string;
|
|
2537
|
-
fontWeight: number;
|
|
2538
|
-
fontStyle: string;
|
|
2539
|
-
};
|
|
2540
|
-
widthSettings: {
|
|
2541
|
-
width: number;
|
|
2542
|
-
sizing: 'auto' | 'manual';
|
|
2543
|
-
};
|
|
2544
|
-
letterSpacing: number;
|
|
2545
|
-
textAlign: 'left' | 'center' | 'right';
|
|
2546
|
-
wordSpacing: number;
|
|
2547
|
-
fontSizeLineHeight: {
|
|
2548
|
-
fontSize: number;
|
|
2549
|
-
lineHeight: number;
|
|
2550
|
-
};
|
|
2551
|
-
textAppearance: {
|
|
2552
|
-
textTransform: 'none' | 'uppercase' | 'lowercase';
|
|
2553
|
-
textDecoration: 'none' | 'underline';
|
|
2554
|
-
fontVariant: 'normal' | 'small-caps';
|
|
2555
|
-
};
|
|
2556
|
-
color: string;
|
|
2557
|
-
};
|
|
2558
|
-
|
|
2559
|
-
type TestimonialsStyles = {
|
|
2560
|
-
text: CaptionStyles;
|
|
2561
|
-
caption: CaptionStyles;
|
|
2562
|
-
};`,Cs="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>'),Io={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Te={fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"},ws={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:"common",title:"Delay(ms)",display:{type:"step-control"},step:500,min:1e3,max:5e3},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text",min:0,max:300,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:100,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Caption",display:{type:"font-family-select"}},captionFontSettings:{...Io.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"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Color"},textFontFamily:{type:"string",scope:"common",title:"Text",display:{type:"font-family-select"}},textFontSettings:{...Io.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"}},textTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"off",controls:{mode:"Off",icon:Cs},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:Te.fontSettings.fontFamily,textFontSettings:{fontWeight:Te.fontSettings.fontWeight,fontStyle:Te.fontSettings.fontStyle},textLetterSpacing:Te.letterSpacing,textWordSpacing:Te.wordSpacing,textTextAlign:Te.textAlign,textTextAppearance:Te.textAppearance,textColor:Te.color,captionFontFamily:Te.fontSettings.fontFamily,captionFontSettings:{fontWeight:Te.fontSettings.fontWeight,fontStyle:Te.fontSettings.fontStyle},captionLetterSpacing:Te.letterSpacing,captionWordSpacing:Te.wordSpacing,captionTextAlign:Te.textAlign,captionTextAppearance:Te.textAppearance,captionColor:Te.color},layoutDefaults:{m:{delay:2500,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMinHeight:.1,captionMarginTop:.01,textMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01},d:{delay:2500,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMarginTop:0,textMinHeight:.08,captionMarginTop:.01,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01}},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:"cursor",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:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]},"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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Ts={element:xs,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonialsSingle.png"},defaultSize:{width:700,height:300},schema:ws,sourceCode:Ss,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},_s=[Ia,Wa,wl,kl,jl,ns,Ts];exports.components=_s;exports.isSchemaV1=xr;
|
|
2812
|
+
`,Xs="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>'),_o={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ks={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:"common",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMinHeight:{type:"number",scope:"layout",title:"Text",min:0,max:300,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMinHeight:{type:"number",scope:"layout",title:"Caption",min:0,max:100,display:{type:"range-control"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{..._o.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Caption Align",enum:["left","center","right"]},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:{..._o.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textTextAlign:{display:{type:"text-align-control"},type:"string",scope:"common",title:"Text Align",enum:["left","center","right"]},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"off",controls:{mode:"Off",icon:Xs},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Arial",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAlign:"left",captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMinHeight:.1,captionMarginTop:.01,textMarginTop:0,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01},d:{delay:4,width:.15,height:.2,corners:.005,stroke:.001,imageMarginTop:.01,textMarginTop:0,textMinHeight:.08,captionMarginTop:.01,textFontSize:.01,captionFontSize:.01,textLineHeight:.01,captionLineHeight:.01,imageWidth:.05,imageHeight:.05,controlsWidth:.02,captionMinHeight:.01}},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:"cursor",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/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Innovative solutions redefine connectivity, enhancing user experience through seamless digital integration and efficiency."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"In the realm of digital innovation, transformative algorithms redefine connectivity, propelling unprecedented technological advancements."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/logo.png",name:""},text:[{type:"paragraph",children:[{text:"Harnessing innovative algorithms, this paradigm shift enhances computational efficiency and optimizes data processing frameworks."}]}],caption:[{type:"paragraph",children:[{text:"CEO @ Company"}]}]}]}},Zs={element:Gs,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:Ks,sourceCode:Ys,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},Js=[_a,Pa,Ss,ks,js,qs,Zs];exports.components=Js;exports.isSchemaV1=vr;
|