@cntrl-site/components 1.0.9-alpha.0 → 1.0.9-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +80 -39
- package/dist/index.mjs +1670 -1583
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),C=require("react"),he=require("classnames"),k=require("./readTestimonialTextMeasure-CB_Uq-fO.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",$r="ControlSlider-module__sliderImage___9hRl-",Tr="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",Er="ControlSlider-module__nextArrow___-30Yc",kr="ControlSlider-module__arrowInner___aEra3",Ar="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Ir="ControlSlider-module__mirror___brd6U",Fr="ControlSlider-module__pagination___bicLF",Mr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Rr="ControlSlider-module__paginationItem___nTRbk",Wr="ControlSlider-module__dot___p1Qun",Hr="ControlSlider-module__activeDot___LHFaj",Nr="ControlSlider-module__paginationInsideBottom___R3FWn",jr="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",zr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="ControlSlider-module__paginationInsideLeft___yOBRZ",Br="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",qr="ControlSlider-module__paginationOutsideRight___EtuQa",Ur="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",Zr="ControlSlider-module__withPointerEvents___t-18M",Jr="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",si="ControlSlider-module__clickOverlay___DZA28",li="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",J={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:$r,arrow:Tr,arrowVertical:_r,nextArrow:Er,arrowInner:kr,arrowIcon:Ar,arrowImg:Lr,mirror:Ir,pagination:Fr,paginationInner:Mr,paginationVertical:Pr,paginationItem:Rr,dot:Wr,activeDot:Hr,paginationInsideBottom:Nr,paginationInsideTop:jr,paginationOutsideBottom:Vr,paginationOutsideTop:zr,paginationInsideLeft:Or,paginationInsideRight:Br,paginationOutsideLeft:Dr,paginationOutsideRight:qr,imgWrapper:Ur,captionBlock:Gr,captionTextWrapper:Yr,captionText:Xr,active:Kr,withPointerEvents:Zr,topLeftAlignment:Jr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:si,contain:li,cover:ci};function ui(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 pi(e,t,n){return t&&ui(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,di=2,yt=3,xt=4,Rt=5,Kt=6,en=7,mi={CREATED:mt,MOUNTED:di,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 Ao=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Rn(e)&&an("object",e)}var Pn=Array.isArray,Lo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Rn(e){return e===null}function Io(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Pn(e)?e:[e]}function Ae(e,t){Ht(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function Be(e,t,n){e&&Ae(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){Ae(t,e.appendChild.bind(e))}function Hn(e,t){Ae(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Io(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fo(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Fo(e,t)[0]:e.firstElementChild}var At=Object.keys;function rt(e,t,n){return e&&(n?At(e).reverse():At(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Lt(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 io(e,t){Ae(t||At(e),function(n){delete e[n]})}function He(e,t){Ae(e,function(n){Ae(t,function(o){n&&n.removeAttribute(o)})})}function ce(e,t,n){Et(t)?rt(t,function(o,r){ce(e,r,o)}):Ae(e,function(o){Rn(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):ce(o,t)),n&&Nt(n,o),o}function Ie(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function Mo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function ao(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Ae(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function Oe(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ro(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){Be(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",jn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Wo(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function kn(e,t){return Ae(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var so={};function gi(e){return""+e+Vn(so[e]=(so[e]||0)+1)}function Ho(){var e=[];function t(i,u,c,m){r(i,u,function(l,I,f){var g="addEventListener"in l,p=g?l.removeEventListener.bind(l,I,c,m):l.removeListener.bind(l,c);g?l.addEventListener(I,c,m):l.addListener(c),e.push([l,I,f,c,p])})}function n(i,u,c){r(i,u,function(m,l,I){e=e.filter(function(f){return f[0]===m&&f[1]===l&&f[2]===I&&(!c||f[3]===c)?(f[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){Ae(i,function(m){m&&Ae(u,function(l){l.split(" ").forEach(function(I){var f=I.split(".");c(m,f[0],f[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",zn="click",No="active",jo="inactive",Vo="visible",zo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",Oo="drag",Bo="dragging",Do="dragged",ln="scroll",st="scrolled",fi="overflow",On="destroy",qo="arrows:mounted",Uo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",Bn="navigation:mounted",Dn="autoplay:play",Xo="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Ko="sk",Zo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ho();function o(s,i){n.bind(t,Ht(s).join(" "),function(u){i.apply(i,Pn(u.detail)?u.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(On,n.destroy),Lt(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,u,c=!0,m=0;function l(){if(!c){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++m>=o))return f();u=ro(l)}}function I(y){y||p(),s=r()-(y?i*e:0),c=!1,u=ro(l)}function f(){c=!0}function g(){s=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,c=!0}function d(y){e=y}function T(){return c}return{start:I,rewind:g,pause:f,cancel:p,set:d,isPaused:T}}function hi(e){var t=e;function n(r){t=r}function o(r){return Wn(Ht(r),t)}return{set:n,is:o}}function yi(e,t){var n=cn(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=Ho(),u=[];function c(){var p=n.mediaQuery==="min";At(r).sort(function(d,T){return p?+d-+T:+T-+d}).forEach(function(d){l(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),l(s,oo),I()}function m(p){p&&i.destroy()}function l(p,d){var T=matchMedia(d);i.bind(T,"change",I),u.push([p,T])}function I(){var p=o.is(en),d=n.direction,T=u.reduce(function(y,x){return Xe(y,x[1].matches?x[0]:{})},{});io(n),g(T),n.destroy?e.destroy(n.destroy==="completely"):p?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function f(p){matchMedia(oo).matches&&(p?Xe(n,s):io(n,At(s)))}function g(p,d,T){Xe(n,p),d&&Xe(Object.getPrototypeOf(n),p),(T||!o.is(mt))&&e.emit(Te,n)}return{setup:c,destroy:m,reduce:f,set:g}}var un="Arrow",pn=un+"Left",dn=un+"Right",Jo=un+"Up",Qo=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,dn],ArrowRight:[Qo,pn]};function bi(e,t,n){function o(s,i,u){u=u||n.direction;var c=u===lo&&!i?1:u===mn?0:-1;return bn[s]&&bn[s][c]||s.replace(/width|left|right/i,function(m,l){var I=bn[m.toLowerCase()][c]||m;return l>0?I.charAt(0).toUpperCase()+I.slice(1):I})}function r(s){return s*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",xi="disabled",Me="aria-",zt=Me+"controls",er=Me+"current",co=Me+"selected",ke=Me+"label",Gn=Me+"labelledby",tr=Me+"hidden",Yn=Me+"orientation",Mt=Me+"roledescription",uo=Me+"live",po=Me+"busy",mo=Me+"atomic",Xn=[qe,ft,xi,zt,er,ke,Gn,tr,Yn,Mt],Ne=Vt+"__",tt="is-",xn=Vt,go=Ne+"track",Si=Ne+"list",gn=Ne+"slide",nr=gn+"--clone",Ci=gn+"__container",Kn=Ne+"arrows",fn=Ne+"arrow",or=fn+"--prev",rr=fn+"--next",hn=Ne+"pagination",ir=hn+"__page",wi=Ne+"progress",$i=wi+"__bar",Ti=Ne+"toggle",_i=Ne+"spinner",Ei=Ne+"sr",ki=tt+"initialized",at=tt+"active",ar=tt+"prev",sr=tt+"next",Ln=tt+"visible",In=tt+"loading",lr=tt+"focus-in",cr=tt+"overflow",Ai=[at,Ln,ar,sr,In,lr,cr],Li={slide:gn,clone:nr,arrows:Kn,arrow:fn,prev:or,next:rr,pagination:hn,page:ir,spinner:_i};function Ii(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Fi=5,fo=200,ur="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Mi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,u=n.i18n,c={},m=[],l=[],I=[],f,g,p;function d(){A(),B(),x()}function T(){r(Se,y),r(Se,d),r(Te,x),s(document,ur+" keydown",function(w){p=w.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Be(i,lr,!!p)})}function y(w){var _=Xn.concat("style");Ue(m),De(i,l),De(f,I),He([f,g],_),He(i,w?_:["style",Mt])}function x(){De(i,l),De(f,I),l=L(xn),I=L(go),We(i,l),We(f,I),ce(i,ke,n.label),ce(i,Gn,n.labelledby)}function A(){f=F("."+go),g=jt(f,"."+Si),Tt(f&&g,"A track/list element is missing."),Zt(m,Fo(g,"."+gn+":not(."+nr+")")),rt({arrows:Kn,pagination:hn,prev:or,next:rr,bar:$i,toggle:Ti},function(w,_){c[_]=F("."+w)}),Lt(c,{root:i,track:f,list:g,slides:m})}function B(){var w=i.id||gi(Vt),_=n.role;i.id=w,f.id=f.id||w+"-track",g.id=g.id||w+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&_&&ce(i,qe,_),ce(i,Mt,u.carousel),ce(g,qe,"presentation")}function F(w){var _=Ro(i,w);return _&&Ii(_,"."+xn)===i?_:void 0}function L(w){return[w+"--"+n.type,w+"--"+n.direction,n.drag&&w+"--draggable",n.isNavigation&&w+"--nav",w===xn&&at]}return Lt(c,{setup:d,mount:T,destroy:y})}var bt="slide",Ct="loop",Ot="fade";function Pi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,u=r.bind,c=e.Components,m=e.root,l=e.options,I=l.isNavigation,f=l.updateOnMove,g=l.i18n,p=l.pagination,d=l.slideFocus,T=c.Direction.resolve,y=Fe(o,"style"),x=Fe(o,ke),A=n>-1,B=jt(o,"."+Ci),F;function L(){A||(o.id=m.id+"-slide"+Vn(t+1),ce(o,qe,p?"tabpanel":"group"),ce(o,Mt,g.slide),ce(o,ke,x||kn(g.slideLabel,[t+1,e.length]))),w()}function w(){u(o,"click",ve(i,zn,h)),u(o,"keydown",ve(i,Ko,h)),s([St,Zo,st],W),s(Bn,P),f&&s(Ge,V)}function _(){F=!0,r.destroy(),De(o,Ai),He(o,Xn),ce(o,"style",y),ce(o,ke,x||"")}function P(){var b=e.splides.map(function(S){var E=S.splide.Components.Slides.getAt(t);return E?E.slide.id:""}).join(" ");ce(o,ke,kn(g.slideX,(A?n:t)+1)),ce(o,zt,b),ce(o,qe,d?"button":""),d&&He(o,Mt)}function V(){F||W()}function W(){if(!F){var b=e.index;H(),N(),Be(o,ar,t===b-1),Be(o,sr,t===b+1)}}function H(){var b=U();b!==ao(o,at)&&(Be(o,at,b),ce(o,er,I&&b||""),i(b?No:jo,h))}function N(){var b=v(),S=!b&&(!U()||A);if(e.state.is([xt,Rt])||ce(o,tr,S||""),ce(Nn(o,l.focusableNodes||""),ft,S?-1:""),d&&ce(o,ft,S?-1:0),b!==ao(o,Ln)&&(Be(o,Ln,b),i(b?Vo:zo,h)),!b&&document.activeElement===o){var E=c.Slides.getAt(e.index);E&&Mo(E.slide)}}function O(b,S,E){Ie(E&&B||o,b,S)}function U(){var b=e.index;return b===t||l.cloneStatus&&b===n}function v(){if(e.is(Ot))return U();var b=Ee(c.Elements.track),S=Ee(o),E=T("left",!0),X=T("right",!0);return nn(b[E])<=Ft(S[E])&&nn(S[X])<=Ft(b[X])}function M(b,S){var E=_e(b-t);return!A&&(l.rewind||e.is(Ct))&&(E=Je(E,e.length-E)),E<=S}var h={index:t,slideIndex:n,slide:o,container:B,isClone:A,mount:L,destroy:_,update:W,style:O,isWithin:M};return h}function Ri(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Elements,c=u.slides,m=u.list,l=[];function I(){f(),r(Se,g),r(Se,f)}function f(){c.forEach(function(W,H){d(W,H,-1)})}function g(){F(function(W){W.destroy()}),Ue(l)}function p(){F(function(W){W.update()})}function d(W,H,N){var O=Pi(e,H,N,W);O.mount(),l.push(O),l.sort(function(U,v){return U.index-v.index})}function T(W){return W?L(function(H){return!H.isClone}):l}function y(W){var H=t.Controller,N=H.toIndex(W),O=H.hasFocus()?1:n.perPage;return L(function(U){return Jt(U.index,N,N+O-1)})}function x(W){return L(W)[0]}function A(W,H){Ae(W,function(N){if(Ze(N)&&(N=Po(N)),Io(N)){var O=c[H];O?Hn(N,O):Nt(m,N),We(N,n.classes.slide),_(N,ve(s,vt))}}),s(Se)}function B(W){it(L(W).map(function(H){return H.slide})),s(Se)}function F(W,H){T(H).forEach(W)}function L(W){return l.filter(Lo(W)?W:function(H){return Ze(W)?kt(H.slide,W):Wn(Ht(W),H.index)})}function w(W,H,N){F(function(O){O.style(W,H,N)})}function _(W,H){var N=Nn(W,"img"),O=N.length;O?N.forEach(function(U){i(U,"load error",function(){--O||H()})}):H()}function P(W){return W?c.length:l.length}function V(){return l.length>n.perPage}return{mount:I,destroy:g,update:p,register:d,get:T,getIn:y,getAt:x,add:A,remove:B,forEach:F,filter:L,style:w,getLength:P,isEnough:V}}function Wi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,l=m.root,I=m.track,f=m.list,g=u.getAt,p=u.style,d,T,y;function x(){A(),s(window,"resize load",yi(ve(i,vt))),r([Te,Se],A),r(vt,B)}function A(){d=n.direction===mn,Ie(l,"maxWidth",ot(n.width)),Ie(I,c("paddingLeft"),F(!1)),Ie(I,c("paddingRight"),F(!0)),B(!0)}function B(h){var b=Ee(l);(h||T.width!==b.width||T.height!==b.height)&&(Ie(I,"height",L()),p(c("marginRight"),ot(n.gap)),p("width",_()),p("height",P(),!0),T=b,i(sn),y!==(y=M())&&(Be(l,cr,y),i(fi,y)))}function F(h){var b=n.padding,S=c(h?"right":"left");return b&&ot(b[S]||(Et(b)?0:b))||"0px"}function L(){var h="";return d&&(h=w(),Tt(h,"height or heightRatio is missing."),h="calc("+h+" - "+F(!1)+" - "+F(!0)+")"),h}function w(){return ot(n.height||Ee(f).width*n.heightRatio)}function _(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":V())}function P(){return ot(n.fixedHeight)||(d?n.autoHeight?null:V():w())}function V(){var h=ot(n.gap);return"calc((100%"+(h&&" + "+h)+")/"+(n.perPage||1)+(h&&" - "+h)+")"}function W(){return Ee(f)[c("width")]}function H(h,b){var S=g(h||0);return S?Ee(S.slide)[c("width")]+(b?0:U()):0}function N(h,b){var S=g(h);if(S){var E=Ee(S.slide)[c("right")],X=Ee(f)[c("left")];return _e(E-X)+(b?0:U())}return 0}function O(h){return N(e.length-1)-N(0)+H(0,h)}function U(){var h=g(0);return h&&parseFloat(Ie(h.slide,c("marginRight")))||0}function v(h){return parseFloat(Ie(I,c("padding"+(h?"Right":"Left"))))||0}function M(){return e.is(Ot)||O(!0)>W()}return{mount:x,resize:B,listSize:W,slideSize:H,sliderSize:O,totalSize:N,getPadding:v,isOverflow:M}}var Hi=2;function Ni(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,u=t.Direction.resolve,c=[],m;function l(){r(Se,I),r([Te,vt],g),(m=T())&&(p(m),t.Layout.resize(!0))}function I(){f(),l()}function f(){it(c),Ue(c),o.destroy()}function g(){var y=T();m!==y&&(m<y||!y)&&o.emit(Se)}function p(y){var x=i.get().slice(),A=x.length;if(A){for(;x.length<y;)Zt(x,x);Zt(x.slice(-y),x.slice(0,y)).forEach(function(B,F){var L=F<y,w=d(B.slide,F);L?Hn(w,x[0].slide):Nt(s.list,w),Zt(c,w),i.register(w,F-y+(L?0:A),B.index)})}}function d(y,x){var A=y.cloneNode(!0);return We(A,n.classes.clone),A.id=e.root.id+"-clone"+Vn(x+1),A}function T(){var y=n.clones;if(!e.is(Ct))y=0;else if(Wt(y)){var x=n[u("fixedWidth")]&&t.Layout.slideSize(0),A=x&&Ft(Ee(s.track)[u("width")]/x);y=A||n[u("autoWidth")]&&e.length||n.perPage*Hi}return y}return{mount:l,destroy:f}}function ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,l=u.totalSize,I=u.listSize,f=u.sliderSize,g=t.Direction,p=g.resolve,d=g.orient,T=t.Elements,y=T.list,x=T.track,A;function B(){A=t.Transition,r([et,sn,Te,Se],F)}function F(){t.Controller.isBusy()||(t.Scroll.cancel(),w(e.index),t.Slides.update())}function L(S,E,X,re){S!==E&&h(S>X)&&(W(),_(V(O(),S>X),!0)),i(xt),s(Ge,E,X,S),A.start(E,function(){i(yt),s(St,E,X,S),re&&re()})}function w(S){_(N(S,!0))}function _(S,E){if(!e.is(Ot)){var X=E?S:P(S);Ie(y,"transform","translate"+p("X")+"("+X+"px)"),S!==X&&s(Zo)}}function P(S){if(e.is(Ct)){var E=H(S),X=E>t.Controller.getEnd(),re=E<0;(re||X)&&(S=V(S,X))}return S}function V(S,E){var X=S-M(E),re=f();return S-=d(re*(Ft(_e(X)/re)||1))*(E?1:-1),S}function W(){_(O(),!0),A.cancel()}function H(S){for(var E=t.Slides.get(),X=0,re=1/0,te=0;te<E.length;te++){var ie=E[te].index,R=_e(N(ie,!0)-S);if(R<=re)re=R,X=ie;else break}return X}function N(S,E){var X=d(l(S-1)-v(S));return E?U(X):X}function O(){var S=p("left");return Ee(y)[S]-Ee(x)[S]+d(m(!1))}function U(S){return n.trimSpace&&e.is(bt)&&(S=pt(S,0,d(f(!0)-I()))),S}function v(S){var E=n.focus;return E==="center"?(I()-c(S,!0))/2:+E*c(S)||0}function M(S){return N(S?t.Controller.getEnd():0,!!n.trimSpace)}function h(S){var E=d(V(O(),S));return S?E>=0:E<=y[p("scrollWidth")]-Ee(x)[p("width")]}function b(S,E){E=Wt(E)?O():E;var X=S!==!0&&d(E)<d(M(!1)),re=S!==!1&&d(E)>d(M(!0));return X||re}return{mount:B,move:L,jump:w,translate:_,shift:V,cancel:W,toIndex:H,toPosition:N,getPosition:O,getLimit:M,exceededLimit:b,reposition:F}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,u=i.getPosition,c=i.getLimit,m=i.toPosition,l=t.Slides,I=l.isEnough,f=l.getLength,g=n.omitEnd,p=e.is(Ct),d=e.is(bt),T=ve(O,!1),y=ve(O,!0),x=n.start||0,A,B=x,F,L,w;function _(){P(),r([Te,Se,on],P),r(sn,V)}function P(){F=f(!0),L=n.perMove,w=n.perPage,A=h();var R=pt(x,0,g?A:F-1);R!==x&&(x=R,i.reposition())}function V(){A!==h()&&s(on)}function W(R,Q,fe){if(!ie()){var de=N(R),ge=M(de);ge>-1&&(Q||ge!==x)&&(X(ge),i.move(de,ge,B,fe))}}function H(R,Q,fe,de){t.Scroll.scroll(R,Q,fe,function(){var ge=M(i.toIndex(u()));X(g?Je(ge,A):ge),de&&de()})}function N(R){var Q=x;if(Ze(R)){var fe=R.match(/([+\-<>])(\d+)?/)||[],de=fe[1],ge=fe[2];de==="+"||de==="-"?Q=U(x+ +(""+de+(+ge||1)),x):de===">"?Q=ge?b(+ge):T(!0):de==="<"&&(Q=y(!0))}else Q=p?R:pt(R,0,A);return Q}function O(R,Q){var fe=L||(te()?1:w),de=U(x+fe*(R?-1:1),x,!(L||te()));return de===-1&&d&&!Wo(u(),c(!R),1)?R?0:A:Q?de:M(de)}function U(R,Q,fe){if(I()||te()){var de=v(R);de!==R&&(Q=R,R=de,fe=!1),R<0||R>A?!L&&(Jt(0,R,Q,!0)||Jt(A,Q,R,!0))?R=b(S(R)):p?R=fe?R<0?-(F%w||w):F:R:n.rewind?R=R<0?A:0:R=-1:fe&&R!==Q&&(R=b(S(Q)+(R<Q?-1:1)))}else R=-1;return R}function v(R){if(d&&n.trimSpace==="move"&&R!==x)for(var Q=u();Q===m(R,!0)&&Jt(R,0,e.length-1,!n.rewind);)R<x?--R:++R;return R}function M(R){return p?(R+F)%F||0:R}function h(){for(var R=F-(te()||p&&L?1:w);g&&R-- >0;)if(m(F-1,!0)!==m(R,!0)){R++;break}return pt(R,0,F-1)}function b(R){return pt(te()?R:w*R,0,A)}function S(R){return te()?Je(R,A):nn((R>=A?F-1:R)/w)}function E(R){var Q=i.toIndex(R);return d?pt(Q,0,A):Q}function X(R){R!==x&&(B=x,x=R)}function re(R){return R?B:x}function te(){return!Wt(n.focus)||n.isNavigation}function ie(){return e.state.is([xt,Rt])&&!!n.waitForTransition}return{mount:_,go:W,scroll:H,getNext:T,getPrev:y,getAdjacent:O,getEnd:h,setIndex:X,getIndex:re,toIndex:b,toPage:S,toDest:E,hasFocus:te,isBusy:ie}}var zi="http://www.w3.org/2000/svg",Oi="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 Bi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=n.classes,c=n.i18n,m=t.Elements,l=t.Controller,I=m.arrows,f=m.track,g=I,p=m.prev,d=m.next,T,y,x={};function A(){F(),r(Te,B)}function B(){L(),A()}function F(){var H=n.arrows;H&&!(p&&d)&&P(),p&&d&&(Lt(x,{prev:p,next:d}),It(g,H?"":"none"),We(g,y=Kn+"--"+n.direction),H&&(w(),W(),ce([p,d],zt,f.id),i(qo,p,d)))}function L(){o.destroy(),De(g,y),T?(it(I?[p,d]:g),p=d=null):He([p,d],Xn)}function w(){r([et,St,Se,st,on],W),s(d,"click",ve(_,">")),s(p,"click",ve(_,"<"))}function _(H){l.go(H,!0)}function P(){g=I||gt("div",u.arrows),p=V(!0),d=V(!1),T=!0,Nt(g,[p,d]),!I&&Hn(g,f)}function V(H){var N='<button class="'+u.arrow+" "+(H?u.prev:u.next)+'" type="button"><svg xmlns="'+zi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Po(N)}function W(){if(p&&d){var H=e.index,N=l.getPrev(),O=l.getNext(),U=N>-1&&H<N?c.last:c.prev,v=O>-1&&H>O?c.first:c.next;p.disabled=N<0,d.disabled=O<0,ce(p,ke,U),ce(d,ke,v),i(Uo,p,d,N,O)}}return{arrows:x,mount:A,destroy:L,update:W}}var Di=jn+"-interval";function qi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),w),c=u.isPaused,m=t.Elements,l=t.Elements,I=l.root,f=l.toggle,g=n.autoplay,p,d,T=g==="pause";function y(){g&&(x(),f&&ce(f,zt,m.track.id),T||A(),L())}function x(){n.pauseOnHover&&s(I,"mouseenter mouseleave",function(P){p=P.type==="mouseenter",F()}),n.pauseOnFocus&&s(I,"focusin focusout",function(P){d=P.type==="focusin",F()}),f&&s(f,"click",function(){T?A():B(!0)}),r([Ge,ln,Se],u.rewind),r(Ge,_)}function A(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=T=!1,L(),i(Dn))}function B(P){P===void 0&&(P=!0),T=!!P,L(),c()||(u.pause(),i(qn))}function F(){T||(p||d?B(!1):A())}function L(){f&&(Be(f,at,!T),ce(f,ke,n.i18n[T?"play":"pause"]))}function w(P){var V=m.bar;V&&Ie(V,"width",P*100+"%"),i(Xo,P)}function _(P){var V=t.Slides.getAt(P);u.set(V&&+Fe(V.slide,Di)||n.interval)}return{mount:y,destroy:u.cancel,play:A,pause:B,isPaused:c}}function Ui(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Un,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(c){t.Slides.forEach(function(m){var l=jt(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:s,destroy:ve(i,!1)}}var Gi=10,Yi=600,Xi=.6,Ki=1.5,Zi=800;function Ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,l=u.exceededLimit,I=u.translate,f=e.is(bt),g,p,d=1;function T(){r(Ge,B),r([Te,Se],F)}function y(w,_,P,V,W){var H=c();if(B(),P&&(!f||!l())){var N=t.Layout.sliderSize(),O=En(w)*N*nn(_e(w)/N)||0;w=u.toPosition(t.Controller.toDest(w%N))+O}var U=Wo(H,w,1);d=1,_=U?0:_||tn(_e(w-H)/Ki,Zi),p=V,g=cn(_,x,ve(A,H,w,W),1),i(Rt),s(ln),g.start()}function x(){i(yt),p&&p(),s(st)}function A(w,_,P,V){var W=c(),H=w+(_-w)*L(V),N=(H-W)*d;I(W+N),f&&!P&&l()&&(d*=Xi,_e(N)<Gi&&y(m(l(!0)),Yi,!1,p,!0))}function B(){g&&g.cancel()}function F(){g&&!g.isPaused()&&(B(),x())}function L(w){var _=n.easingFunc;return _?_(w):1-Math.pow(1-w,4)}return{mount:T,destroy:B,scroll:y,cancel:F}}var dt={passive:!1,capture:!0};function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=o.unbind,c=e.state,m=t.Move,l=t.Scroll,I=t.Controller,f=t.Elements.track,g=t.Media.reduce,p=t.Direction,d=p.resolve,T=p.orient,y=m.getPosition,x=m.exceededLimit,A,B,F,L,w,_=!1,P,V,W;function H(){i(f,Sn,Tn,dt),i(f,Cn,Tn,dt),i(f,ur,O,dt),i(f,"click",M,{capture:!0}),i(f,"dragstart",Oe),r([et,Te],N)}function N(){var j=n.drag;me(!j),L=j==="free"}function O(j){if(P=!1,!V){var $=ge(j);de(j.target)&&($||!j.button)&&(I.isBusy()?Oe(j,!0):(W=$?f:window,w=c.is([xt,Rt]),F=null,i(W,Sn,U,dt),i(W,Cn,v,dt),m.cancel(),l.cancel(),h(j)))}}function U(j){if(c.is(Kt)||(c.set(Kt),s(Oo)),j.cancelable)if(w){m.translate(A+fe(te(j)));var $=ie(j)>fo,q=_!==(_=x());($||q)&&h(j),P=!0,s(Bo),Oe(j)}else E(j)&&(w=S(j),Oe(j))}function v(j){c.is(Kt)&&(c.set(yt),s(Do)),w&&(b(j),Oe(j)),u(W,Sn,U),u(W,Cn,v),w=!1}function M(j){!V&&P&&Oe(j,!0)}function h(j){F=B,B=j,A=y()}function b(j){var $=X(j),q=re($),Z=n.rewind&&n.rewindByDrag;g(!1),L?I.scroll(q,0,n.snap):e.is(Ot)?I.go(T(En($))<0?Z?"<":"-":Z?">":"+"):e.is(bt)&&_&&Z?I.go(x(!0)?">":"<"):I.go(I.toDest(q),!0),g(!0)}function S(j){var $=n.dragMinThreshold,q=Et($),Z=q&&$.mouse||0,ee=(q?$.touch:+$)||10;return _e(te(j))>(ge(j)?ee:Z)}function E(j){return _e(te(j))>_e(te(j,!0))}function X(j){if(e.is(Ct)||!_){var $=ie(j);if($&&$<fo)return te(j)/$}return 0}function re(j){return y()+En(j)*Je(_e(j)*(n.flickPower||600),L?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function te(j,$){return Q(j,$)-Q(R(j),$)}function ie(j){return _n(j)-_n(R(j))}function R(j){return B===j&&F||B}function Q(j,$){return(ge(j)?j.changedTouches[0]:j)["page"+d($?"Y":"X")]}function fe(j){return j/(_&&e.is(bt)?Fi:1)}function de(j){var $=n.noDrag;return!kt(j,"."+ir+", ."+fn)&&(!$||!kt(j,$))}function ge(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function G(){return w}function me(j){V=j}return{mount:H,disable:me,isDragging:G}}var ea={Spacebar:" ",Right:dn,Left:pn,Up:Jo,Down:Qo};function Zn(e){return e=Ze(e)?e:e.key,ea[e]||e}var ho="keydown";function ta(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,u=e.root,c=t.Direction.resolve,m,l;function I(){f(),r(Te,g),r(Te,f),r(Ge,d)}function f(){var y=n.keyboard;y&&(m=y==="global"?window:u,s(m,ho,T))}function g(){i(m,ho)}function p(y){l=y}function d(){var y=l;l=!0,Ao(function(){l=y})}function T(y){if(!l){var x=Zn(y);x===c(pn)?e.go("<"):x===c(dn)&&e.go(">")}}return{mount:I,destroy:g,disable:p}}var _t=jn+"-lazy",Qt=_t+"-srcset",na="["+_t+"], ["+Qt+"]";function oa(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,u=o.emit,c=n.lazyLoad==="sequential",m=[St,st],l=[];function I(){n.lazyLoad&&(f(),r(Se,f))}function f(){Ue(l),g(),c?y():(s(m),r(m,p),p())}function g(){t.Slides.forEach(function(x){Nn(x.slide,na).forEach(function(A){var B=Fe(A,_t),F=Fe(A,Qt);if(B!==A.src||F!==A.srcset){var L=n.classes.spinner,w=A.parentElement,_=jt(w,"."+L)||gt("span",L,w);l.push([A,x,_]),A.src||It(A,"none")}})})}function p(){l=l.filter(function(x){var A=n.perPage*((n.preloadPages||1)+1)-1;return x[1].isWithin(e.index,A)?d(x):!0}),l.length||s(m)}function d(x){var A=x[0];We(x[1].slide,In),i(A,"load error",ve(T,x)),ce(A,"src",Fe(A,_t)),ce(A,"srcset",Fe(A,Qt)),He(A,_t),He(A,Qt)}function T(x,A){var B=x[0],F=x[1];De(F.slide,In),A.type!=="error"&&(it(x[2]),It(B,""),u(Un,B,F),u(vt)),c&&y()}function y(){l.length&&d(l.shift())}return{mount:I,destroy:ve(Ue,l),check:p}}function ra(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Slides,c=t.Elements,m=t.Controller,l=m.hasFocus,I=m.getIndex,f=m.go,g=t.Direction.resolve,p=c.pagination,d=[],T,y;function x(){A(),r([Te,Se,on],x);var V=n.pagination;p&&It(p,V?"":"none"),V&&(r([Ge,ln,st],P),B(),P(),s(Go,{list:T,items:d},_(e.index)))}function A(){T&&(it(p?Qe(T.children):T),De(T,y),Ue(d),T=null),o.destroy()}function B(){var V=e.length,W=n.classes,H=n.i18n,N=n.perPage,O=l()?m.getEnd()+1:Ft(V/N);T=p||gt("ul",W.pagination,c.track.parentElement),We(T,y=hn+"--"+w()),ce(T,qe,"tablist"),ce(T,ke,H.select),ce(T,Yn,w()===mn?"vertical":"");for(var U=0;U<O;U++){var v=gt("li",null,T),M=gt("button",{class:W.page,type:"button"},v),h=u.getIn(U).map(function(S){return S.slide.id}),b=!l()&&N>1?H.pageX:H.slideX;i(M,"click",ve(F,U)),n.paginationKeyboard&&i(M,"keydown",ve(L,U)),ce(v,qe,"presentation"),ce(M,qe,"tab"),ce(M,zt,h.join(" ")),ce(M,ke,kn(b,U+1)),ce(M,ft,-1),d.push({li:v,button:M,page:U})}}function F(V){f(">"+V,!0)}function L(V,W){var H=d.length,N=Zn(W),O=w(),U=-1;N===g(dn,!1,O)?U=++V%H:N===g(pn,!1,O)?U=(--V+H)%H:N==="Home"?U=0:N==="End"&&(U=H-1);var v=d[U];v&&(Mo(v.button),f(">"+U),Oe(W,!0))}function w(){return n.paginationDirection||n.direction}function _(V){return d[m.toPage(V)]}function P(){var V=_(I(!0)),W=_(I());if(V){var H=V.button;De(H,at),He(H,co),ce(H,ft,-1)}if(W){var N=W.button;We(N,at),ce(N,co,!0),ce(N,ft,"")}s(Yo,{list:T,items:d},V,W)}return{items:d,mount:x,destroy:A,getAt:_,update:P}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&l()}function u(){s.forEach(function(p){p.destroy()}),Ue(s)}function c(){u(),i()}function m(p,d){var T=be(p);T.on(Ge,function(y,x,A){d.go(d.is(Ct)?A:y)}),s.push(T)}function l(){var p=be(e),d=p.on;d(zn,f),d(Ko,g),d([et,Te],I),s.push(p),p.emit(Bn,e.splides)}function I(){ce(t.Elements.list,Yn,n.direction===mn?"vertical":"")}function f(p){e.go(p.index)}function g(p,d){Wn(ia,Zn(d))&&(f(p),Oe(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:c}}function sa(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(m){if(m.cancelable){var l=m.deltaY,I=l<0,f=_n(m),g=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(l)>g&&f-s>p&&(e.go(I?"<":">"),s=f),c(I)&&Oe(m)}}function c(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var la=90;function ca(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",Ei),c=cn(la,ve(l,!1));function m(){i&&(f(!t.Autoplay.isPaused()),ce(s,mo,!0),u.textContent="…",r(Dn,ve(f,!0)),r(qn,ve(f,!1)),r([St,st],ve(l,!0)))}function l(g){ce(s,po,g),g?(Nt(s,u),c.start()):(it(u),c.cancel())}function I(){He(s,[uo,mo,po]),it(u)}function f(g){i&&ce(s,uo,g?"off":"polite")}return{mount:m,disable:f,destroy:I}}var ua=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Mi,Slides:Ri,Layout:Wi,Clones:Ni,Move:ji,Controller:Vi,Arrows:Bi,Autoplay:qi,Cover:Ui,Scroll:Ji,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:sa,Live:ca}),pa={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:pa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ma(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(c)}return{mount:r,start:i,cancel:Tn}}function ga(e,t,n){var o=t.Move,r=t.Controller,s=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&&(I(),c())})}function l(g,p){var d=o.toPosition(g,!0),T=o.getPosition(),y=f(g);_e(d-T)>=1&&y>=1?n.useScroll?s.scroll(d,y,!1,p):(u("transform "+y+"ms "+n.easing),o.translate(d,!0),c=p):(o.jump(g),p())}function I(){u(""),s.cancel()}function f(g){var p=n.rewindSpeed;if(e.is(bt)&&p){var d=r.getIndex(!0),T=r.getEnd();if(d===0&&g>=T||d>=T&&g===0)return p}return n.speed}return{mount:m,start:l,cancel:I}}var fa=(function(){function e(n,o){this.event=be(),this.Components={},this.state=hi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Ro(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Xe({label:Fe(r,ke)||"",labelledby:Fe(r,Gn)||""},da,e.defaults,o||{});try{Xe(o,JSON.parse(Fe(r,jn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Xe({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,u=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=u,this._T=r||this._T||(this.is(Ot)?ma:ga),this._E=o||this._E;var c=Lt({},ua,this._E,{Transition:this._T});return rt(c,function(m,l){var I=m(s,u,s._o);u[l]=I,I.setup&&I.setup()}),rt(u,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,ki),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Qe(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(An,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(On),r.destroy(),o&&Ue(this.splides),s.set(en)),this},pi(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Jn=fa;Jn.defaults={};Jn.STATES=mi;var yo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[zn,"onClick"],[No,"onActive"],[jo,"onInactive"],[Vo,"onVisible"],[zo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[Oo,"onDrag"],[Bo,"onDragging"],[Do,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[On,"onDestroy"],[qo,"onArrowsMounted"],[Uo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[Bn,"onNavigationMounted"],[Dn,"onAutoplayPlay"],[Xo,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Un,"onLazyLoadLoaded"]];function Qn(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function Fn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Fn(n,t[o]));if(rn(e)&&rn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Fn(e[r],t[r]))}return e===t}function ha(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ya(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 Mn(e,t){const n=e;return ya(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Mn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>C.createElement("div",{className:Qn("splide__track",t),...n},C.createElement("ul",{className:"splide__list"},e)),pr=class extends C.Component{constructor(){super(...arguments),this.splideRef=C.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Mn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Fn(this.options,e)&&(this.splide.options=e,this.options=Mn({},e));const t=this.getSlides();ha(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){yo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return C.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(s=>s[1])])},n?C.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>C.createElement("li",{className:Qn("splide__slide",t),...n},e);/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),b=require("react"),he=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.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",$r="ControlSlider-module__sliderImage___9hRl-",Tr="ControlSlider-module__arrow___05ghY",_r="ControlSlider-module__arrowVertical___tBfVN",Er="ControlSlider-module__nextArrow___-30Yc",kr="ControlSlider-module__arrowInner___aEra3",Ar="ControlSlider-module__arrowIcon___S4ztF",Lr="ControlSlider-module__arrowImg___2dwJW",Ir="ControlSlider-module__mirror___brd6U",Fr="ControlSlider-module__pagination___bicLF",Mr="ControlSlider-module__paginationInner___bT-P-",Pr="ControlSlider-module__paginationVertical___zYqKw",Rr="ControlSlider-module__paginationItem___nTRbk",Wr="ControlSlider-module__dot___p1Qun",Hr="ControlSlider-module__activeDot___LHFaj",Nr="ControlSlider-module__paginationInsideBottom___R3FWn",jr="ControlSlider-module__paginationInsideTop___V-qb-",Vr="ControlSlider-module__paginationOutsideBottom___14w8D",Br="ControlSlider-module__paginationOutsideTop___SCLqB",zr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",Dr="ControlSlider-module__paginationOutsideLeft___lahaw",qr="ControlSlider-module__paginationOutsideRight___EtuQa",Ur="ControlSlider-module__imgWrapper___UjEgB",Gr="ControlSlider-module__captionBlock___dJ6-j",Yr="ControlSlider-module__captionTextWrapper___HFlpf",Kr="ControlSlider-module__captionText___uGBVc",Xr="ControlSlider-module__active___WZK4G",Zr="ControlSlider-module__withPointerEvents___t-18M",Jr="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",si="ControlSlider-module__clickOverlay___DZA28",li="ControlSlider-module__contain___pLyq7",ci="ControlSlider-module__cover___KdDat",ee={wrapper:Sr,hoverArrow:Cr,sliderItem:wr,sliderImage:$r,arrow:Tr,arrowVertical:_r,nextArrow:Er,arrowInner:kr,arrowIcon:Ar,arrowImg:Lr,mirror:Ir,pagination:Fr,paginationInner:Mr,paginationVertical:Pr,paginationItem:Rr,dot:Wr,activeDot:Hr,paginationInsideBottom:Nr,paginationInsideTop:jr,paginationOutsideBottom:Vr,paginationOutsideTop:Br,paginationInsideLeft:zr,paginationInsideRight:Or,paginationOutsideLeft:Dr,paginationOutsideRight:qr,imgWrapper:Ur,captionBlock:Gr,captionTextWrapper:Yr,captionText:Kr,active:Xr,withPointerEvents:Zr,topLeftAlignment:Jr,topCenterAlignment:Qr,topRightAlignment:ei,middleLeftAlignment:ti,middleCenterAlignment:ni,middleRightAlignment:oi,bottomLeftAlignment:ri,bottomCenterAlignment:ii,bottomRightAlignment:ai,clickOverlay:si,contain:li,cover:ci};function ui(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 pi(e,t,n){return t&&ui(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var oo="(prefers-reduced-motion: reduce)",mt=1,di=2,yt=3,xt=4,Rt=5,Xt=6,en=7,mi={CREATED:mt,MOUNTED:di,IDLE:yt,MOVING:xt,SCROLLING:Rt,DRAGGING:Xt,DESTROYED:en};function Ue(e){e.length=0}function Qe(e,t,n){return Array.prototype.slice.call(e,t,n)}function ve(e){return e.bind.apply(e,[null].concat(Qe(arguments,1)))}var Ao=setTimeout,Tn=function(){};function ro(e){return requestAnimationFrame(e)}function an(e,t){return typeof t===e}function Et(e){return!Rn(e)&&an("object",e)}var Pn=Array.isArray,Lo=ve(an,"function"),Ze=ve(an,"string"),Wt=ve(an,"undefined");function Rn(e){return e===null}function Io(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Ht(e){return Pn(e)?e:[e]}function Ae(e,t){Ht(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Zt(e,t){return e.push.apply(e,Ht(t)),e}function Oe(e,t,n){e&&Ae(t,function(o){o&&e.classList[n?"add":"remove"](o)})}function We(e,t){Oe(e,Ze(t)?t.split(" "):t,!0)}function Nt(e,t){Ae(t,e.appendChild.bind(e))}function Hn(e,t){Ae(e,function(n){var o=(t||n).parentNode;o&&o.insertBefore(n,t)})}function kt(e,t){return Io(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fo(e,t){var n=e?Qe(e.children):[];return t?n.filter(function(o){return kt(o,t)}):n}function jt(e,t){return t?Fo(e,t)[0]:e.firstElementChild}var At=Object.keys;function rt(e,t,n){return e&&(n?At(e).reverse():At(e)).forEach(function(o){o!=="__proto__"&&t(e[o],o)}),e}function Lt(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){e[o]=t[o]})}),e}function Ke(e){return Qe(arguments,1).forEach(function(t){rt(t,function(n,o){Pn(n)?e[o]=n.slice():Et(n)?e[o]=Ke({},Et(e[o])?e[o]:{},n):e[o]=n})}),e}function io(e,t){Ae(t||At(e),function(n){delete e[n]})}function He(e,t){Ae(e,function(n){Ae(t,function(o){n&&n.removeAttribute(o)})})}function ce(e,t,n){Et(t)?rt(t,function(o,r){ce(e,r,o)}):Ae(e,function(o){Rn(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):ce(o,t)),n&&Nt(n,o),o}function Ie(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Rn(n)||(e.style[t]=""+n)}function It(e,t){Ie(e,"display",t)}function Mo(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Fe(e,t){return e.getAttribute(t)}function ao(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function it(e){Ae(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Po(e){return jt(new DOMParser().parseFromString(e,"text/html").body)}function ze(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Ro(e,t){return e&&e.querySelector(t)}function Nn(e,t){return t?Qe(e.querySelectorAll(t)):[]}function De(e,t){Oe(e,t,!1)}function _n(e){return e.timeStamp}function ot(e){return Ze(e)?e:e?e+"px":""}var Vt="splide",jn="data-"+Vt;function Tt(e,t){if(!e)throw new Error("["+Vt+"] "+(t||""))}var Je=Math.min,tn=Math.max,nn=Math.floor,Ft=Math.ceil,_e=Math.abs;function Wo(e,t,n){return _e(e-t)<n}function Jt(e,t,n,o){var r=Je(t,n),s=tn(t,n);return o?r<e&&e<s:r<=e&&e<=s}function pt(e,t,n){var o=Je(t,n),r=tn(t,n);return Je(tn(o,e),r)}function En(e){return+(e>0)-+(e<0)}function kn(e,t){return Ae(t,function(n){e=e.replace("%s",""+n)}),e}function Vn(e){return e<10?"0"+e:""+e}var so={};function gi(e){return""+e+Vn(so[e]=(so[e]||0)+1)}function Ho(){var e=[];function t(i,u,c,m){r(i,u,function(l,I,y){var f="addEventListener"in l,p=f?l.removeEventListener.bind(l,I,c,m):l.removeListener.bind(l,c);f?l.addEventListener(I,c,m):l.addListener(c),e.push([l,I,y,c,p])})}function n(i,u,c){r(i,u,function(m,l,I){e=e.filter(function(y){return y[0]===m&&y[1]===l&&y[2]===I&&(!c||y[3]===c)?(y[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){Ae(i,function(m){m&&Ae(u,function(l){l.split(" ").forEach(function(I){var y=I.split(".");c(m,y[0],y[1])})})})}function s(){e.forEach(function(i){i[4]()}),Ue(e)}return{bind:t,unbind:n,dispatch:o,destroy:s}}var et="mounted",An="ready",Ge="move",St="moved",Bn="click",No="active",jo="inactive",Vo="visible",Bo="hidden",Se="refresh",Te="updated",vt="resize",sn="resized",zo="drag",Oo="dragging",Do="dragged",ln="scroll",st="scrolled",fi="overflow",zn="destroy",qo="arrows:mounted",Uo="arrows:updated",Go="pagination:mounted",Yo="pagination:updated",On="navigation:mounted",Dn="autoplay:play",Ko="autoplay:playing",qn="autoplay:pause",Un="lazyload:loaded",Xo="sk",Zo="sh",on="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Ho();function o(s,i){n.bind(t,Ht(s).join(" "),function(u){i.apply(i,Pn(u.detail)?u.detail:[])})}function r(s){n.dispatch(t,s,Qe(arguments,1))}return e&&e.event.on(zn,n.destroy),Lt(n,{bus:t,on:o,off:ve(n.unbind,t),emit:r})}function cn(e,t,n,o){var r=Date.now,s,i=0,u,c=!0,m=0;function l(){if(!c){if(i=e?Je((r()-s)/e,1):1,n&&n(i),i>=1&&(t(),s=r(),o&&++m>=o))return y();u=ro(l)}}function I(v){v||p(),s=r()-(v?i*e:0),c=!1,u=ro(l)}function y(){c=!0}function f(){s=r(),i=0,n&&n(i)}function p(){u&&cancelAnimationFrame(u),i=0,u=0,c=!0}function d(v){e=v}function $(){return c}return{start:I,rewind:f,pause:y,cancel:p,set:d,isPaused:$}}function hi(e){var t=e;function n(r){t=r}function o(r){return Wn(Ht(r),t)}return{set:n,is:o}}function yi(e,t){var n=cn(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=Ho(),u=[];function c(){var p=n.mediaQuery==="min";At(r).sort(function(d,$){return p?+d-+$:+$-+d}).forEach(function(d){l(r[d],"("+(p?"min":"max")+"-width:"+d+"px)")}),l(s,oo),I()}function m(p){p&&i.destroy()}function l(p,d){var $=matchMedia(d);i.bind($,"change",I),u.push([p,$])}function I(){var p=o.is(en),d=n.direction,$=u.reduce(function(v,S){return Ke(v,S[1].matches?S[0]:{})},{});io(n),f($),n.destroy?e.destroy(n.destroy==="completely"):p?(m(!0),e.mount()):d!==n.direction&&e.refresh()}function y(p){matchMedia(oo).matches&&(p?Ke(n,s):io(n,At(s)))}function f(p,d,$){Ke(n,p),d&&Ke(Object.getPrototypeOf(n),p),($||!o.is(mt))&&e.emit(Te,n)}return{setup:c,destroy:m,reduce:y,set:f}}var un="Arrow",pn=un+"Left",dn=un+"Right",Jo=un+"Up",Qo=un+"Down",lo="rtl",mn="ttb",bn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jo,dn],ArrowRight:[Qo,pn]};function bi(e,t,n){function o(s,i,u){u=u||n.direction;var c=u===lo&&!i?1:u===mn?0:-1;return bn[s]&&bn[s][c]||s.replace(/width|left|right/i,function(m,l){var I=bn[m.toLowerCase()][c]||m;return l>0?I.charAt(0).toUpperCase()+I.slice(1):I})}function r(s){return s*(n.direction===lo?1:-1)}return{resolve:o,orient:r}}var qe="role",ft="tabindex",xi="disabled",Me="aria-",Bt=Me+"controls",er=Me+"current",co=Me+"selected",ke=Me+"label",Gn=Me+"labelledby",tr=Me+"hidden",Yn=Me+"orientation",Mt=Me+"roledescription",uo=Me+"live",po=Me+"busy",mo=Me+"atomic",Kn=[qe,ft,xi,Bt,er,ke,Gn,tr,Yn,Mt],Ne=Vt+"__",tt="is-",xn=Vt,go=Ne+"track",Si=Ne+"list",gn=Ne+"slide",nr=gn+"--clone",Ci=gn+"__container",Xn=Ne+"arrows",fn=Ne+"arrow",or=fn+"--prev",rr=fn+"--next",hn=Ne+"pagination",ir=hn+"__page",wi=Ne+"progress",$i=wi+"__bar",Ti=Ne+"toggle",_i=Ne+"spinner",Ei=Ne+"sr",ki=tt+"initialized",at=tt+"active",ar=tt+"prev",sr=tt+"next",Ln=tt+"visible",In=tt+"loading",lr=tt+"focus-in",cr=tt+"overflow",Ai=[at,Ln,ar,sr,In,lr,cr],Li={slide:gn,clone:nr,arrows:Xn,arrow:fn,prev:or,next:rr,pagination:hn,page:ir,spinner:_i};function Ii(e,t){if(Lo(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!kt(n,t);)n=n.parentElement;return n}var Fi=5,fo=200,ur="touchstart mousedown",Sn="touchmove mousemove",Cn="touchend touchcancel mouseup click";function Mi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=e.root,u=n.i18n,c={},m=[],l=[],I=[],y,f,p;function d(){k(),O(),S()}function $(){r(Se,v),r(Se,d),r(Te,S),s(document,ur+" keydown",function(C){p=C.type==="keydown"},{capture:!0}),s(i,"focusin",function(){Oe(i,lr,!!p)})}function v(C){var T=Kn.concat("style");Ue(m),De(i,l),De(y,I),He([y,f],T),He(i,C?T:["style",Mt])}function S(){De(i,l),De(y,I),l=L(xn),I=L(go),We(i,l),We(y,I),ce(i,ke,n.label),ce(i,Gn,n.labelledby)}function k(){y=M("."+go),f=jt(y,"."+Si),Tt(y&&f,"A track/list element is missing."),Zt(m,Fo(f,"."+gn+":not(."+nr+")")),rt({arrows:Xn,pagination:hn,prev:or,next:rr,bar:$i,toggle:Ti},function(C,T){c[T]=M("."+C)}),Lt(c,{root:i,track:y,list:f,slides:m})}function O(){var C=i.id||gi(Vt),T=n.role;i.id=C,y.id=y.id||C+"-track",f.id=f.id||C+"-list",!Fe(i,qe)&&i.tagName!=="SECTION"&&T&&ce(i,qe,T),ce(i,Mt,u.carousel),ce(f,qe,"presentation")}function M(C){var T=Ro(i,C);return T&&Ii(T,"."+xn)===i?T:void 0}function L(C){return[C+"--"+n.type,C+"--"+n.direction,n.drag&&C+"--draggable",n.isNavigation&&C+"--nav",C===xn&&at]}return Lt(c,{setup:d,mount:$,destroy:v})}var bt="slide",Ct="loop",zt="fade";function Pi(e,t,n,o){var r=be(e),s=r.on,i=r.emit,u=r.bind,c=e.Components,m=e.root,l=e.options,I=l.isNavigation,y=l.updateOnMove,f=l.i18n,p=l.pagination,d=l.slideFocus,$=c.Direction.resolve,v=Fe(o,"style"),S=Fe(o,ke),k=n>-1,O=jt(o,"."+Ci),M;function L(){k||(o.id=m.id+"-slide"+Vn(t+1),ce(o,qe,p?"tabpanel":"group"),ce(o,Mt,f.slide),ce(o,ke,S||kn(f.slideLabel,[t+1,e.length]))),C()}function C(){u(o,"click",ve(i,Bn,F)),u(o,"keydown",ve(i,Xo,F)),s([St,Zo,st],W),s(On,P),y&&s(Ge,V)}function T(){M=!0,r.destroy(),De(o,Ai),He(o,Kn),ce(o,"style",v),ce(o,ke,S||"")}function P(){var h=e.splides.map(function(g){var _=g.splide.Components.Slides.getAt(t);return _?_.slide.id:""}).join(" ");ce(o,ke,kn(f.slideX,(k?n:t)+1)),ce(o,Bt,h),ce(o,qe,d?"button":""),d&&He(o,Mt)}function V(){M||W()}function W(){if(!M){var h=e.index;H(),N(),Oe(o,ar,t===h-1),Oe(o,sr,t===h+1)}}function H(){var h=G();h!==ao(o,at)&&(Oe(o,at,h),ce(o,er,I&&h||""),i(h?No:jo,F))}function N(){var h=x(),g=!h&&(!G()||k);if(e.state.is([xt,Rt])||ce(o,tr,g||""),ce(Nn(o,l.focusableNodes||""),ft,g?-1:""),d&&ce(o,ft,g?-1:0),h!==ao(o,Ln)&&(Oe(o,Ln,h),i(h?Vo:Bo,F)),!h&&document.activeElement===o){var _=c.Slides.getAt(e.index);_&&Mo(_.slide)}}function z(h,g,_){Ie(_&&O||o,h,g)}function G(){var h=e.index;return h===t||l.cloneStatus&&h===n}function x(){if(e.is(zt))return G();var h=Ee(c.Elements.track),g=Ee(o),_=$("left",!0),q=$("right",!0);return nn(h[_])<=Ft(g[_])&&nn(g[q])<=Ft(h[q])}function R(h,g){var _=_e(h-t);return!k&&(l.rewind||e.is(Ct))&&(_=Je(_,e.length-_)),_<=g}var F={index:t,slideIndex:n,slide:o,container:O,isClone:k,mount:L,destroy:T,update:W,style:z,isWithin:R};return F}function Ri(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Elements,c=u.slides,m=u.list,l=[];function I(){y(),r(Se,f),r(Se,y)}function y(){c.forEach(function(W,H){d(W,H,-1)})}function f(){M(function(W){W.destroy()}),Ue(l)}function p(){M(function(W){W.update()})}function d(W,H,N){var z=Pi(e,H,N,W);z.mount(),l.push(z),l.sort(function(G,x){return G.index-x.index})}function $(W){return W?L(function(H){return!H.isClone}):l}function v(W){var H=t.Controller,N=H.toIndex(W),z=H.hasFocus()?1:n.perPage;return L(function(G){return Jt(G.index,N,N+z-1)})}function S(W){return L(W)[0]}function k(W,H){Ae(W,function(N){if(Ze(N)&&(N=Po(N)),Io(N)){var z=c[H];z?Hn(N,z):Nt(m,N),We(N,n.classes.slide),T(N,ve(s,vt))}}),s(Se)}function O(W){it(L(W).map(function(H){return H.slide})),s(Se)}function M(W,H){$(H).forEach(W)}function L(W){return l.filter(Lo(W)?W:function(H){return Ze(W)?kt(H.slide,W):Wn(Ht(W),H.index)})}function C(W,H,N){M(function(z){z.style(W,H,N)})}function T(W,H){var N=Nn(W,"img"),z=N.length;z?N.forEach(function(G){i(G,"load error",function(){--z||H()})}):H()}function P(W){return W?c.length:l.length}function V(){return l.length>n.perPage}return{mount:I,destroy:f,update:p,register:d,get:$,getIn:v,getAt:S,add:k,remove:O,forEach:M,filter:L,style:C,getLength:P,isEnough:V}}function Wi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=t.Slides,c=t.Direction.resolve,m=t.Elements,l=m.root,I=m.track,y=m.list,f=u.getAt,p=u.style,d,$,v;function S(){k(),s(window,"resize load",yi(ve(i,vt))),r([Te,Se],k),r(vt,O)}function k(){d=n.direction===mn,Ie(l,"maxWidth",ot(n.width)),Ie(I,c("paddingLeft"),M(!1)),Ie(I,c("paddingRight"),M(!0)),O(!0)}function O(F){var h=Ee(l);(F||$.width!==h.width||$.height!==h.height)&&(Ie(I,"height",L()),p(c("marginRight"),ot(n.gap)),p("width",T()),p("height",P(),!0),$=h,i(sn),v!==(v=R())&&(Oe(l,cr,v),i(fi,v)))}function M(F){var h=n.padding,g=c(F?"right":"left");return h&&ot(h[g]||(Et(h)?0:h))||"0px"}function L(){var F="";return d&&(F=C(),Tt(F,"height or heightRatio is missing."),F="calc("+F+" - "+M(!1)+" - "+M(!0)+")"),F}function C(){return ot(n.height||Ee(y).width*n.heightRatio)}function T(){return n.autoWidth?null:ot(n.fixedWidth)||(d?"":V())}function P(){return ot(n.fixedHeight)||(d?n.autoHeight?null:V():C())}function V(){var F=ot(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function W(){return Ee(y)[c("width")]}function H(F,h){var g=f(F||0);return g?Ee(g.slide)[c("width")]+(h?0:G()):0}function N(F,h){var g=f(F);if(g){var _=Ee(g.slide)[c("right")],q=Ee(y)[c("left")];return _e(_-q)+(h?0:G())}return 0}function z(F){return N(e.length-1)-N(0)+H(0,F)}function G(){var F=f(0);return F&&parseFloat(Ie(F.slide,c("marginRight")))||0}function x(F){return parseFloat(Ie(I,c("padding"+(F?"Right":"Left"))))||0}function R(){return e.is(zt)||z(!0)>W()}return{mount:S,resize:O,listSize:W,slideSize:H,sliderSize:z,totalSize:N,getPadding:x,isOverflow:R}}var Hi=2;function Ni(e,t,n){var o=be(e),r=o.on,s=t.Elements,i=t.Slides,u=t.Direction.resolve,c=[],m;function l(){r(Se,I),r([Te,vt],f),(m=$())&&(p(m),t.Layout.resize(!0))}function I(){y(),l()}function y(){it(c),Ue(c),o.destroy()}function f(){var v=$();m!==v&&(m<v||!v)&&o.emit(Se)}function p(v){var S=i.get().slice(),k=S.length;if(k){for(;S.length<v;)Zt(S,S);Zt(S.slice(-v),S.slice(0,v)).forEach(function(O,M){var L=M<v,C=d(O.slide,M);L?Hn(C,S[0].slide):Nt(s.list,C),Zt(c,C),i.register(C,M-v+(L?0:k),O.index)})}}function d(v,S){var k=v.cloneNode(!0);return We(k,n.classes.clone),k.id=e.root.id+"-clone"+Vn(S+1),k}function $(){var v=n.clones;if(!e.is(Ct))v=0;else if(Wt(v)){var S=n[u("fixedWidth")]&&t.Layout.slideSize(0),k=S&&Ft(Ee(s.track)[u("width")]/S);v=k||n[u("autoWidth")]&&e.length||n.perPage*Hi}return v}return{mount:l,destroy:y}}function ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Layout,c=u.slideSize,m=u.getPadding,l=u.totalSize,I=u.listSize,y=u.sliderSize,f=t.Direction,p=f.resolve,d=f.orient,$=t.Elements,v=$.list,S=$.track,k;function O(){k=t.Transition,r([et,sn,Te,Se],M)}function M(){t.Controller.isBusy()||(t.Scroll.cancel(),C(e.index),t.Slides.update())}function L(g,_,q,ne){g!==_&&F(g>q)&&(W(),T(V(z(),g>q),!0)),i(xt),s(Ge,_,q,g),k.start(_,function(){i(yt),s(St,_,q,g),ne&&ne()})}function C(g){T(N(g,!0))}function T(g,_){if(!e.is(zt)){var q=_?g:P(g);Ie(v,"transform","translate"+p("X")+"("+q+"px)"),g!==q&&s(Zo)}}function P(g){if(e.is(Ct)){var _=H(g),q=_>t.Controller.getEnd(),ne=_<0;(ne||q)&&(g=V(g,q))}return g}function V(g,_){var q=g-R(_),ne=y();return g-=d(ne*(Ft(_e(q)/ne)||1))*(_?1:-1),g}function W(){T(z(),!0),k.cancel()}function H(g){for(var _=t.Slides.get(),q=0,ne=1/0,Z=0;Z<_.length;Z++){var ae=_[Z].index,A=_e(N(ae,!0)-g);if(A<=ne)ne=A,q=ae;else break}return q}function N(g,_){var q=d(l(g-1)-x(g));return _?G(q):q}function z(){var g=p("left");return Ee(v)[g]-Ee(S)[g]+d(m(!1))}function G(g){return n.trimSpace&&e.is(bt)&&(g=pt(g,0,d(y(!0)-I()))),g}function x(g){var _=n.focus;return _==="center"?(I()-c(g,!0))/2:+_*c(g)||0}function R(g){return N(g?t.Controller.getEnd():0,!!n.trimSpace)}function F(g){var _=d(V(z(),g));return g?_>=0:_<=v[p("scrollWidth")]-Ee(S)[p("width")]}function h(g,_){_=Wt(_)?z():_;var q=g!==!0&&d(_)<d(R(!1)),ne=g!==!1&&d(_)>d(R(!0));return q||ne}return{mount:O,move:L,jump:C,translate:T,shift:V,cancel:W,toIndex:H,toPosition:N,getPosition:z,getLimit:R,exceededLimit:h,reposition:M}}function Vi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=t.Move,u=i.getPosition,c=i.getLimit,m=i.toPosition,l=t.Slides,I=l.isEnough,y=l.getLength,f=n.omitEnd,p=e.is(Ct),d=e.is(bt),$=ve(z,!1),v=ve(z,!0),S=n.start||0,k,O=S,M,L,C;function T(){P(),r([Te,Se,on],P),r(sn,V)}function P(){M=y(!0),L=n.perMove,C=n.perPage,k=F();var A=pt(S,0,f?k:M-1);A!==S&&(S=A,i.reposition())}function V(){k!==F()&&s(on)}function W(A,Q,fe){if(!ae()){var ue=N(A),me=R(ue);me>-1&&(Q||me!==S)&&(q(me),i.move(ue,me,O,fe))}}function H(A,Q,fe,ue){t.Scroll.scroll(A,Q,fe,function(){var me=R(i.toIndex(u()));q(f?Je(me,k):me),ue&&ue()})}function N(A){var Q=S;if(Ze(A)){var fe=A.match(/([+\-<>])(\d+)?/)||[],ue=fe[1],me=fe[2];ue==="+"||ue==="-"?Q=G(S+ +(""+ue+(+me||1)),S):ue===">"?Q=me?h(+me):$(!0):ue==="<"&&(Q=v(!0))}else Q=p?A:pt(A,0,k);return Q}function z(A,Q){var fe=L||(Z()?1:C),ue=G(S+fe*(A?-1:1),S,!(L||Z()));return ue===-1&&d&&!Wo(u(),c(!A),1)?A?0:k:Q?ue:R(ue)}function G(A,Q,fe){if(I()||Z()){var ue=x(A);ue!==A&&(Q=A,A=ue,fe=!1),A<0||A>k?!L&&(Jt(0,A,Q,!0)||Jt(k,Q,A,!0))?A=h(g(A)):p?A=fe?A<0?-(M%C||C):M:A:n.rewind?A=A<0?k:0:A=-1:fe&&A!==Q&&(A=h(g(Q)+(A<Q?-1:1)))}else A=-1;return A}function x(A){if(d&&n.trimSpace==="move"&&A!==S)for(var Q=u();Q===m(A,!0)&&Jt(A,0,e.length-1,!n.rewind);)A<S?--A:++A;return A}function R(A){return p?(A+M)%M||0:A}function F(){for(var A=M-(Z()||p&&L?1:C);f&&A-- >0;)if(m(M-1,!0)!==m(A,!0)){A++;break}return pt(A,0,M-1)}function h(A){return pt(Z()?A:C*A,0,k)}function g(A){return Z()?Je(A,k):nn((A>=k?M-1:A)/C)}function _(A){var Q=i.toIndex(A);return d?pt(Q,0,k):Q}function q(A){A!==S&&(O=S,S=A)}function ne(A){return A?O:S}function Z(){return!Wt(n.focus)||n.isNavigation}function ae(){return e.state.is([xt,Rt])&&!!n.waitForTransition}return{mount:T,go:W,scroll:H,getNext:$,getPrev:v,getAdjacent:z,getEnd:F,setIndex:q,getIndex:ne,toIndex:h,toPage:g,toDest:_,hasFocus:Z,isBusy:ae}}var Bi="http://www.w3.org/2000/svg",zi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",qt=40;function Oi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=n.classes,c=n.i18n,m=t.Elements,l=t.Controller,I=m.arrows,y=m.track,f=I,p=m.prev,d=m.next,$,v,S={};function k(){M(),r(Te,O)}function O(){L(),k()}function M(){var H=n.arrows;H&&!(p&&d)&&P(),p&&d&&(Lt(S,{prev:p,next:d}),It(f,H?"":"none"),We(f,v=Xn+"--"+n.direction),H&&(C(),W(),ce([p,d],Bt,y.id),i(qo,p,d)))}function L(){o.destroy(),De(f,v),$?(it(I?[p,d]:f),p=d=null):He([p,d],Kn)}function C(){r([et,St,Se,st,on],W),s(d,"click",ve(T,">")),s(p,"click",ve(T,"<"))}function T(H){l.go(H,!0)}function P(){f=I||gt("div",u.arrows),p=V(!0),d=V(!1),$=!0,Nt(f,[p,d]),!I&&Hn(f,y)}function V(H){var N='<button class="'+u.arrow+" "+(H?u.prev:u.next)+'" type="button"><svg xmlns="'+Bi+'" viewBox="0 0 '+qt+" "+qt+'" width="'+qt+'" height="'+qt+'" focusable="false"><path d="'+(n.arrowPath||zi)+'" />';return Po(N)}function W(){if(p&&d){var H=e.index,N=l.getPrev(),z=l.getNext(),G=N>-1&&H<N?c.last:c.prev,x=z>-1&&H>z?c.first:c.next;p.disabled=N<0,d.disabled=z<0,ce(p,ke,G),ce(d,ke,x),i(Uo,p,d,N,z)}}return{arrows:S,mount:k,destroy:L,update:W}}var Di=jn+"-interval";function qi(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.emit,u=cn(n.interval,e.go.bind(e,">"),C),c=u.isPaused,m=t.Elements,l=t.Elements,I=l.root,y=l.toggle,f=n.autoplay,p,d,$=f==="pause";function v(){f&&(S(),y&&ce(y,Bt,m.track.id),$||k(),L())}function S(){n.pauseOnHover&&s(I,"mouseenter mouseleave",function(P){p=P.type==="mouseenter",M()}),n.pauseOnFocus&&s(I,"focusin focusout",function(P){d=P.type==="focusin",M()}),y&&s(y,"click",function(){$?k():O(!0)}),r([Ge,ln,Se],u.rewind),r(Ge,T)}function k(){c()&&t.Slides.isEnough()&&(u.start(!n.resetProgress),d=p=$=!1,L(),i(Dn))}function O(P){P===void 0&&(P=!0),$=!!P,L(),c()||(u.pause(),i(qn))}function M(){$||(p||d?O(!1):k())}function L(){y&&(Oe(y,at,!$),ce(y,ke,n.i18n[$?"play":"pause"]))}function C(P){var V=m.bar;V&&Ie(V,"width",P*100+"%"),i(Ko,P)}function T(P){var V=t.Slides.getAt(P);u.set(V&&+Fe(V.slide,Di)||n.interval)}return{mount:v,destroy:u.cancel,play:k,pause:O,isPaused:c}}function Ui(e,t,n){var o=be(e),r=o.on;function s(){n.cover&&(r(Un,ve(u,!0)),r([et,Te,Se],ve(i,!0)))}function i(c){t.Slides.forEach(function(m){var l=jt(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:s,destroy:ve(i,!1)}}var Gi=10,Yi=600,Ki=.6,Xi=1.5,Zi=800;function Ji(e,t,n){var o=be(e),r=o.on,s=o.emit,i=e.state.set,u=t.Move,c=u.getPosition,m=u.getLimit,l=u.exceededLimit,I=u.translate,y=e.is(bt),f,p,d=1;function $(){r(Ge,O),r([Te,Se],M)}function v(C,T,P,V,W){var H=c();if(O(),P&&(!y||!l())){var N=t.Layout.sliderSize(),z=En(C)*N*nn(_e(C)/N)||0;C=u.toPosition(t.Controller.toDest(C%N))+z}var G=Wo(H,C,1);d=1,T=G?0:T||tn(_e(C-H)/Xi,Zi),p=V,f=cn(T,S,ve(k,H,C,W),1),i(Rt),s(ln),f.start()}function S(){i(yt),p&&p(),s(st)}function k(C,T,P,V){var W=c(),H=C+(T-C)*L(V),N=(H-W)*d;I(W+N),y&&!P&&l()&&(d*=Ki,_e(N)<Gi&&v(m(l(!0)),Yi,!1,p,!0))}function O(){f&&f.cancel()}function M(){f&&!f.isPaused()&&(O(),S())}function L(C){var T=n.easingFunc;return T?T(C):1-Math.pow(1-C,4)}return{mount:$,destroy:O,scroll:v,cancel:M}}var dt={passive:!1,capture:!0};function Qi(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=o.unbind,c=e.state,m=t.Move,l=t.Scroll,I=t.Controller,y=t.Elements.track,f=t.Media.reduce,p=t.Direction,d=p.resolve,$=p.orient,v=m.getPosition,S=m.exceededLimit,k,O,M,L,C,T=!1,P,V,W;function H(){i(y,Sn,Tn,dt),i(y,Cn,Tn,dt),i(y,ur,z,dt),i(y,"click",R,{capture:!0}),i(y,"dragstart",ze),r([et,Te],N)}function N(){var j=n.drag;ge(!j),L=j==="free"}function z(j){if(P=!1,!V){var w=me(j);ue(j.target)&&(w||!j.button)&&(I.isBusy()?ze(j,!0):(W=w?y:window,C=c.is([xt,Rt]),M=null,i(W,Sn,G,dt),i(W,Cn,x,dt),m.cancel(),l.cancel(),F(j)))}}function G(j){if(c.is(Xt)||(c.set(Xt),s(zo)),j.cancelable)if(C){m.translate(k+fe(Z(j)));var w=ae(j)>fo,U=T!==(T=S());(w||U)&&F(j),P=!0,s(Oo),ze(j)}else _(j)&&(C=g(j),ze(j))}function x(j){c.is(Xt)&&(c.set(yt),s(Do)),C&&(h(j),ze(j)),u(W,Sn,G),u(W,Cn,x),C=!1}function R(j){!V&&P&&ze(j,!0)}function F(j){M=O,O=j,k=v()}function h(j){var w=q(j),U=ne(w),J=n.rewind&&n.rewindByDrag;f(!1),L?I.scroll(U,0,n.snap):e.is(zt)?I.go($(En(w))<0?J?"<":"-":J?">":"+"):e.is(bt)&&T&&J?I.go(S(!0)?">":"<"):I.go(I.toDest(U),!0),f(!0)}function g(j){var w=n.dragMinThreshold,U=Et(w),J=U&&w.mouse||0,te=(U?w.touch:+w)||10;return _e(Z(j))>(me(j)?te:J)}function _(j){return _e(Z(j))>_e(Z(j,!0))}function q(j){if(e.is(Ct)||!T){var w=ae(j);if(w&&w<fo)return Z(j)/w}return 0}function ne(j){return v()+En(j)*Je(_e(j)*(n.flickPower||600),L?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function Z(j,w){return Q(j,w)-Q(A(j),w)}function ae(j){return _n(j)-_n(A(j))}function A(j){return O===j&&M||O}function Q(j,w){return(me(j)?j.changedTouches[0]:j)["page"+d(w?"Y":"X")]}function fe(j){return j/(T&&e.is(bt)?Fi:1)}function ue(j){var w=n.noDrag;return!kt(j,"."+ir+", ."+fn)&&(!w||!kt(j,w))}function me(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function Y(){return C}function ge(j){V=j}return{mount:H,disable:ge,isDragging:Y}}var ea={Spacebar:" ",Right:dn,Left:pn,Up:Jo,Down:Qo};function Zn(e){return e=Ze(e)?e:e.key,ea[e]||e}var ho="keydown";function ta(e,t,n){var o=be(e),r=o.on,s=o.bind,i=o.unbind,u=e.root,c=t.Direction.resolve,m,l;function I(){y(),r(Te,f),r(Te,y),r(Ge,d)}function y(){var v=n.keyboard;v&&(m=v==="global"?window:u,s(m,ho,$))}function f(){i(m,ho)}function p(v){l=v}function d(){var v=l;l=!0,Ao(function(){l=v})}function $(v){if(!l){var S=Zn(v);S===c(pn)?e.go("<"):S===c(dn)&&e.go(">")}}return{mount:I,destroy:f,disable:p}}var _t=jn+"-lazy",Qt=_t+"-srcset",na="["+_t+"], ["+Qt+"]";function oa(e,t,n){var o=be(e),r=o.on,s=o.off,i=o.bind,u=o.emit,c=n.lazyLoad==="sequential",m=[St,st],l=[];function I(){n.lazyLoad&&(y(),r(Se,y))}function y(){Ue(l),f(),c?v():(s(m),r(m,p),p())}function f(){t.Slides.forEach(function(S){Nn(S.slide,na).forEach(function(k){var O=Fe(k,_t),M=Fe(k,Qt);if(O!==k.src||M!==k.srcset){var L=n.classes.spinner,C=k.parentElement,T=jt(C,"."+L)||gt("span",L,C);l.push([k,S,T]),k.src||It(k,"none")}})})}function p(){l=l.filter(function(S){var k=n.perPage*((n.preloadPages||1)+1)-1;return S[1].isWithin(e.index,k)?d(S):!0}),l.length||s(m)}function d(S){var k=S[0];We(S[1].slide,In),i(k,"load error",ve($,S)),ce(k,"src",Fe(k,_t)),ce(k,"srcset",Fe(k,Qt)),He(k,_t),He(k,Qt)}function $(S,k){var O=S[0],M=S[1];De(M.slide,In),k.type!=="error"&&(it(S[2]),It(O,""),u(Un,O,M),u(vt)),c&&v()}function v(){l.length&&d(l.shift())}return{mount:I,destroy:ve(Ue,l),check:p}}function ra(e,t,n){var o=be(e),r=o.on,s=o.emit,i=o.bind,u=t.Slides,c=t.Elements,m=t.Controller,l=m.hasFocus,I=m.getIndex,y=m.go,f=t.Direction.resolve,p=c.pagination,d=[],$,v;function S(){k(),r([Te,Se,on],S);var V=n.pagination;p&&It(p,V?"":"none"),V&&(r([Ge,ln,st],P),O(),P(),s(Go,{list:$,items:d},T(e.index)))}function k(){$&&(it(p?Qe($.children):$),De($,v),Ue(d),$=null),o.destroy()}function O(){var V=e.length,W=n.classes,H=n.i18n,N=n.perPage,z=l()?m.getEnd()+1:Ft(V/N);$=p||gt("ul",W.pagination,c.track.parentElement),We($,v=hn+"--"+C()),ce($,qe,"tablist"),ce($,ke,H.select),ce($,Yn,C()===mn?"vertical":"");for(var G=0;G<z;G++){var x=gt("li",null,$),R=gt("button",{class:W.page,type:"button"},x),F=u.getIn(G).map(function(g){return g.slide.id}),h=!l()&&N>1?H.pageX:H.slideX;i(R,"click",ve(M,G)),n.paginationKeyboard&&i(R,"keydown",ve(L,G)),ce(x,qe,"presentation"),ce(R,qe,"tab"),ce(R,Bt,F.join(" ")),ce(R,ke,kn(h,G+1)),ce(R,ft,-1),d.push({li:x,button:R,page:G})}}function M(V){y(">"+V,!0)}function L(V,W){var H=d.length,N=Zn(W),z=C(),G=-1;N===f(dn,!1,z)?G=++V%H:N===f(pn,!1,z)?G=(--V+H)%H:N==="Home"?G=0:N==="End"&&(G=H-1);var x=d[G];x&&(Mo(x.button),y(">"+G),ze(W,!0))}function C(){return n.paginationDirection||n.direction}function T(V){return d[m.toPage(V)]}function P(){var V=T(I(!0)),W=T(I());if(V){var H=V.button;De(H,at),He(H,co),ce(H,ft,-1)}if(W){var N=W.button;We(N,at),ce(N,co,!0),ce(N,ft,"")}s(Yo,{list:$,items:d},V,W)}return{items:d,mount:S,destroy:k,getAt:T,update:P}}var ia=[" ","Enter"];function aa(e,t,n){var o=n.isNavigation,r=n.slideFocus,s=[];function i(){e.splides.forEach(function(p){p.isParent||(m(e,p.splide),m(p.splide,e))}),o&&l()}function u(){s.forEach(function(p){p.destroy()}),Ue(s)}function c(){u(),i()}function m(p,d){var $=be(p);$.on(Ge,function(v,S,k){d.go(d.is(Ct)?k:v)}),s.push($)}function l(){var p=be(e),d=p.on;d(Bn,y),d(Xo,f),d([et,Te],I),s.push(p),p.emit(On,e.splides)}function I(){ce(t.Elements.list,Yn,n.direction===mn?"vertical":"")}function y(p){e.go(p.index)}function f(p,d){Wn(ia,Zn(d))&&(y(p),ze(d))}return{setup:ve(t.Media.set,{slideFocus:Wt(r)?o:r},!0),mount:i,destroy:u,remount:c}}function sa(e,t,n){var o=be(e),r=o.bind,s=0;function i(){n.wheel&&r(t.Elements.track,"wheel",u,dt)}function u(m){if(m.cancelable){var l=m.deltaY,I=l<0,y=_n(m),f=n.wheelMinThreshold||0,p=n.wheelSleep||0;_e(l)>f&&y-s>p&&(e.go(I?"<":">"),s=y),c(I)&&ze(m)}}function c(m){return!n.releaseWheel||e.state.is(xt)||t.Controller.getAdjacent(m)!==-1}return{mount:i}}var la=90;function ca(e,t,n){var o=be(e),r=o.on,s=t.Elements.track,i=n.live&&!n.isNavigation,u=gt("span",Ei),c=cn(la,ve(l,!1));function m(){i&&(y(!t.Autoplay.isPaused()),ce(s,mo,!0),u.textContent="…",r(Dn,ve(y,!0)),r(qn,ve(y,!1)),r([St,st],ve(l,!0)))}function l(f){ce(s,po,f),f?(Nt(s,u),c.start()):(it(u),c.cancel())}function I(){He(s,[uo,mo,po]),it(u)}function y(f){i&&ce(s,uo,f?"off":"polite")}return{mount:m,disable:y,destroy:I}}var ua=Object.freeze({__proto__:null,Media:vi,Direction:bi,Elements:Mi,Slides:Ri,Layout:Wi,Clones:Ni,Move:ji,Controller:Vi,Arrows:Oi,Autoplay:qi,Cover:Ui,Scroll:Ji,Drag:Qi,Keyboard:ta,LazyLoad:oa,Pagination:ra,Sync:aa,Wheel:sa,Live:ca}),pa={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:pa,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ma(e,t,n){var o=t.Slides;function r(){be(e).on([et,Se],s)}function s(){o.forEach(function(u){u.style("transform","translateX(-"+100*u.index+"%)")})}function i(u,c){o.style("transition","opacity "+n.speed+"ms "+n.easing),Ao(c)}return{mount:r,start:i,cancel:Tn}}function ga(e,t,n){var o=t.Move,r=t.Controller,s=t.Scroll,i=t.Elements.list,u=ve(Ie,i,"transition"),c;function m(){be(e).bind(i,"transitionend",function(f){f.target===i&&c&&(I(),c())})}function l(f,p){var d=o.toPosition(f,!0),$=o.getPosition(),v=y(f);_e(d-$)>=1&&v>=1?n.useScroll?s.scroll(d,v,!1,p):(u("transform "+v+"ms "+n.easing),o.translate(d,!0),c=p):(o.jump(f),p())}function I(){u(""),s.cancel()}function y(f){var p=n.rewindSpeed;if(e.is(bt)&&p){var d=r.getIndex(!0),$=r.getEnd();if(d===0&&f>=$||d>=$&&f===0)return p}return n.speed}return{mount:m,start:l,cancel:I}}var fa=(function(){function e(n,o){this.event=be(),this.Components={},this.state=hi(mt),this.splides=[],this._o={},this._E={};var r=Ze(n)?Ro(document,n):n;Tt(r,r+" is invalid."),this.root=r,o=Ke({label:Fe(r,ke)||"",labelledby:Fe(r,Gn)||""},da,e.defaults,o||{});try{Ke(o,JSON.parse(Fe(r,jn)))}catch{Tt(!1,"Invalid JSON")}this._o=Object.create(Ke({},o))}var t=e.prototype;return t.mount=function(o,r){var s=this,i=this.state,u=this.Components;Tt(i.is([mt,en]),"Already mounted!"),i.set(mt),this._C=u,this._T=r||this._T||(this.is(zt)?ma:ga),this._E=o||this._E;var c=Lt({},ua,this._E,{Transition:this._T});return rt(c,function(m,l){var I=m(s,u,s._o);u[l]=I,I.setup&&I.setup()}),rt(u,function(m){m.mount&&m.mount()}),this.emit(et),We(this.root,ki),i.set(yt),this.emit(An),this},t.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(yt)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},t.go=function(o){return this._C.Controller.go(o),this},t.on=function(o,r){return this.event.on(o,r),this},t.off=function(o){return this.event.off(o),this},t.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(Qe(arguments,1))),this},t.add=function(o,r){return this._C.Slides.add(o,r),this},t.remove=function(o){return this._C.Slides.remove(o),this},t.is=function(o){return this._o.type===o},t.refresh=function(){return this.emit(Se),this},t.destroy=function(o){o===void 0&&(o=!0);var r=this.event,s=this.state;return s.is(mt)?be(this).on(An,this.destroy.bind(this,o)):(rt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(zn),r.destroy(),o&&Ue(this.splides),s.set(en)),this},pi(e,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Jn=fa;Jn.defaults={};Jn.STATES=mi;var yo=[[et,"onMounted"],[An,"onReady"],[Ge,"onMove"],[St,"onMoved"],[Bn,"onClick"],[No,"onActive"],[jo,"onInactive"],[Vo,"onVisible"],[Bo,"onHidden"],[Se,"onRefresh"],[Te,"onUpdated"],[vt,"onResize"],[sn,"onResized"],[zo,"onDrag"],[Oo,"onDragging"],[Do,"onDragged"],[ln,"onScroll"],[st,"onScrolled"],[zn,"onDestroy"],[qo,"onArrowsMounted"],[Uo,"onArrowsUpdated"],[Go,"onPaginationMounted"],[Yo,"onPaginationUpdated"],[On,"onNavigationMounted"],[Dn,"onAutoplayPlay"],[Ko,"onAutoplayPlaying"],[qn,"onAutoplayPause"],[Un,"onLazyLoadLoaded"]];function Qn(...e){return e.filter(Boolean).join(" ")}function rn(e){return e!==null&&typeof e=="object"}function Fn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,o)=>!Fn(n,t[o]));if(rn(e)&&rn(t)){const n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(t,r)||!Fn(e[r],t[r]))}return e===t}function ha(e,t){return e.length===t.length&&!e.some((n,o)=>n!==t[o])}function ya(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 Mn(e,t){const n=e;return ya(t,(o,r)=>{Array.isArray(o)?n[r]=o.slice():rn(o)?n[r]=Mn(rn(n[r])?n[r]:{},o):n[r]=o}),n}var va=({children:e,className:t,...n})=>b.createElement("div",{className:Qn("splide__track",t),...n},b.createElement("ul",{className:"splide__list"},e)),pr=class extends b.Component{constructor(){super(...arguments),this.splideRef=b.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Jn(o,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Mn({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!Fn(this.options,e)&&(this.splide.options=e,this.options=Mn({},e));const t=this.getSlides();ha(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){yo.forEach(([t,n])=>{const o=this.props[n];typeof o=="function"&&e.on(t,(...r)=>{o(e,...r)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:o,...r}=this.props;return b.createElement(t,{className:Qn("splide",e),ref:this.splideRef,...this.omit(r,["options",...yo.map(s=>s[1])])},n?b.createElement(va,null,o):o)}},dr=({children:e,className:t,...n})=>b.createElement("li",{className:Qn("splide__slide",t),...n},e);/*!
|
|
2
2
|
* Splide.js
|
|
3
3
|
* Version : 4.1.3
|
|
4
4
|
* License : MIT
|
|
5
5
|
* Copyright: 2022 Naotoshi Fujita
|
|
6
|
-
*/const ba="RichTextRenderer-module__link___BWeZ2",xa={link:ba},Sa=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Sa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:k.scalingValue(e.letterSpacing,t),wordSpacing:k.scalingValue(e.wordSpacing,t),fontSize:k.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?k.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}const Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:Ca(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function Ca(e){return{...e.fontFamily&&{fontFamily:yn(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const wa="SvgImage-module__svg___q3xE-",$a="SvgImage-module__img___VsTm-",vo={svg:wa,img:$a},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,'\\"')}")`,Ke=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=C.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return C.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ta(e)||!s?a.jsx("img",{src:e,alt:"",className:he(vo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(vo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},Ea={"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 ka({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=C.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:l,fontSizeLineHeight:I,textAppearance:f,color:g}=n.imageCaption,[p,d]=C.useState(void 0),[T,y]=C.useState(null),[x,A]=C.useState(0),[B,F]=C.useState(0),{direction:L,transition:w,controls:_,pagination:P,imageCaption:V,triggers:W}=e,H=C.useRef(w.type),{x:N,y:O}=e.controls.offset,U=v=>{r&&r.go(v)};return C.useEffect(()=>{if(!T)return;const v=new ResizeObserver(M=>{if(!r)return;const[h]=M;d({width:Math.round(h.contentRect.width),height:Math.round(h.contentRect.height)})});return v.observe(T),()=>v.unobserve(T)},[T]),C.useEffect(()=>{!r||H.current===w.type||(F(v=>v+1),H.current=w.type)},[w.type]),a.jsx("div",{className:he(J.wrapper,{[J.editor]:o}),ref:y,children:a.jsxs("div",{className:J.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:w.backgroundColor&&w.type==="fade in"?w.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(J.captionBlock),children:a.jsx("div",{className:J.captionTextWrapper,children:t.map((v,M)=>a.jsx("div",{className:he(J.captionText,Ea[V.alignment],{[J.withPointerEvents]:M===x&&o,[J.active]:M===x}),style:{fontFamily:yn(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":k.scalingValue(i.width,o),letterSpacing:k.scalingValue(c,o),wordSpacing:k.scalingValue(l,o),textAlign:m,fontSize:k.scalingValue(I.fontSize,o),lineHeight:k.scalingValue(I.lineHeight,o),textTransform:f.textTransform??"none",textDecoration:f.textDecoration??"none",fontVariant:f.fontVariant??"normal",color:g,transitionDuration:w.duration?`${Math.round(parseInt(w.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:J.captionTextInner,style:{"--link-hover-color":V.linkHoverColor,"--link-color":V.linkColor,position:"relative",top:k.scalingValue(V.offset.y,o),left:k.scalingValue(V.offset.x,o)},children:a.jsx(Pt,{content:v.imageCaption})})},M))})}),a.jsx(pr,{onMove:v=>{A(v.index)},ref:s,options:{arrows:!1,speed:w.duration?parseInt(w.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:L==="horiz"||w.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:w.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((v,M)=>a.jsx(dr,{children:a.jsx("div",{className:J.sliderItem,children:a.jsx("div",{className:J.imgWrapper,children:a.jsx("img",{className:he(J.sliderImage,{[J.contain]:v.image.objectFit==="contain",[J.cover]:v.image.objectFit==="cover"}),src:v.image.url,alt:v.image.name??""})})})},M))},B),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(J.arrow,{[J.arrowVertical]:L==="vert",[J.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{U("-1")},className:J.arrowInner,style:{transform:`translate(${k.scalingValue(N,o)}, ${k.scalingValue(O*(L==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(Ke,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:he(J.arrowImg,J.mirror)}),!_.arrowsImgUrl&&a.jsx(bo,{color:_.color,className:he(J.arrowIcon,J.arrowImg,J.mirror)})]})}),a.jsx("div",{className:he(J.arrow,J.nextArrow,{[J.arrowVertical]:L==="vert",[J.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:J.arrowInner,onClick:()=>U("+1"),style:{transform:`translate(${k.scalingValue(N*(L==="horiz"?-1:1),o)}, ${k.scalingValue(O,o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(Ke,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:J.arrowImg}),!_.arrowsImgUrl&&a.jsx(bo,{color:_.color,className:he(J.arrowIcon,J.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:J.clickOverlay,onClick:()=>{r&&r.go("+1")}}),P.isActive&&a.jsx("div",{className:he(J.pagination,{[J.paginationInsideBottom]:P.position==="inside-1"&&L==="horiz",[J.paginationInsideTop]:P.position==="inside-2"&&L==="horiz",[J.paginationOutsideBottom]:P.position==="outside-1"&&L==="horiz",[J.paginationOutsideTop]:P.position==="outside-2"&&L==="horiz",[J.paginationInsideLeft]:P.position==="inside-1"&&L==="vert",[J.paginationInsideRight]:P.position==="inside-2"&&L==="vert",[J.paginationOutsideLeft]:P.position==="outside-1"&&L==="vert",[J.paginationOutsideRight]:P.position==="outside-2"&&L==="vert",[J.paginationVertical]:L==="vert"}),children:a.jsx("div",{className:J.paginationInner,style:{backgroundColor:P.colors[2],transform:`scale(${P.scale/100}) translate(${k.scalingValue(P.offset.x,o)}, ${k.scalingValue(P.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:t.map((v,M)=>a.jsx("button",{onClick:()=>{r&&r.go(M)},className:he(J.paginationItem),children:a.jsx("div",{className:he(J.dot,{[J.activeDot]:M===x}),style:{backgroundColor:M===x?P.colors[0]:P.colors[1],"--pagination-hover-color":P.hover}})},M))})})]})})}function bo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Aa={element:ka,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ia="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",Ma="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:La,image:Ia,link:Fa,cursor:Ma};function xo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,u=s/2,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 wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ra({settings:e,content:t,isEditor:n}){const[o,r]=C.useState(null),[s,i]=C.useState([]),[u,c]=C.useState(0),m=C.useRef(0),[l,I]=C.useState({x:0,y:0}),[f,g]=C.useState(1),[p,d]=C.useState("none"),T=C.useRef({x:0,y:0}),[y,x]=C.useState(!1),{sizeType:A,imageWidth:B,randomRangeImageWidth:F}=e.imageSize,{revealPosition:L,visible:w}=e.position,{cursorType:_,target:P,defaultCursorScale:V,defaultCursor:W,hoverCursorScale:H,hoverCursor:N}=e.cursor;C.useEffect(()=>{if(!o)return;const v=(b,S)=>{const E=o.getBoundingClientRect(),X=b-E.left,re=S-E.top;if(I({x:X,y:re}),_==="system"){d("none"),g(1);return}const te=X,ie=re,R=document.elementFromPoint(E.left+te,E.top+ie);if(R&&R.closest("a")){d("none"),g(1);return}const Q=xo(te,ie,s)||P==="area"?{img:N??"none",scale:H}:{img:W??"none",scale:V};d(Q.img),g(Q.scale)},M=b=>{b.stopPropagation(),T.current={x:b.clientX,y:b.clientY},v(b.clientX,b.clientY)},h=()=>{y&&v(T.current.x,T.current.y)};return o.addEventListener("mousemove",M),window.addEventListener("scroll",h,!0),()=>{o.removeEventListener("mousemove",M),window.removeEventListener("scroll",h,!0)}},[o,y,l,_,P,N,W,H,V,s]),C.useEffect(()=>{y||(d("none"),g(0))},[y]);const O=async(v,M,h,b={})=>{const{width:S,height:E,finalWidth:X}=await Pa(v.image.url,A,B,F);let re=0,te=0;L==="same"?(re=M/2,te=h/2):(re=b.x??Math.random()*M,te=b.y??Math.random()*h);const ie=Math.min(Math.max(re,S/2),M-S/2),R=Math.min(Math.max(te,E/2),h-E/2);return{id:m.current++,url:v.image.url,link:v.link,name:v.image.name,x:ie,y:R,width:X}};C.useEffect(()=>{if(!o||t.length===0)return;const v=o.getBoundingClientRect(),M=v.width,h=v.height,b=[];(async()=>{const E=t[0],X=await O(E,M,h);b.push(X),i(b),c(1)})()},[A,B,F,L,o]),C.useEffect(()=>{w==="last One"&&i(v=>v.length>0?[v[v.length-1]]:[])},[w]);const U=async v=>{if(!o)return;const M=o.getBoundingClientRect(),h=v.clientX-M.left,b=v.clientY-M.top;if(P==="image"&&!xo(h,b,s))return;let S=0,E=0;L==="on Click"?(S=h,E=b):L==="same"?(S=M.width/2,E=M.height/2):(S=Math.random()*M.width,E=Math.random()*M.height);const X=t[u],re=await O(X,M.width,M.height,{x:S,y:E});i(te=>w==="all"?[...te,re]:[re]),c(te=>te>=t.length-1?0:te+1)};return a.jsxs("div",{ref:r,onClick:U,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(v=>a.jsx("div",{className:ut.wrapper,style:{top:`${v.y}px`,left:`${v.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:v.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:P==="area"&&v.link?a.jsx("a",{href:v.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)}):a.jsx("img",{src:v.url,alt:v.name,className:ut.image},v.id)},v.id)),y&&a.jsx("div",{className:ut.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${f})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Wa={element:Ra,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:""}]}}}},Ha="LightBox-module__hidden___9s-9x",Na="LightBox-module__heroImage___sTxNF",ja="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",za="LightBox-module__contentStyle___Bgnsq",Oa="LightBox-module__imageStyle___tLIlB",Ba="LightBox-module__imgWrapper___LuFUp",Da="LightBox-module__contain___8-yaS",qa="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",Ga="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Xa="LightBox-module__arrow___iz38X",Ka="LightBox-module__arrowVertical___Zfz81",Za="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Qa="LightBox-module__arrowIcon___3VaFf",es="LightBox-module__arrowImg___pNV88",ts="LightBox-module__mirror___pjeXc",ns="LightBox-module__thumbsWrapper___GB-nU",os="LightBox-module__thumbsContainerVertical___wttk5",rs="LightBox-module__thumbsContainer___osSma",is="LightBox-module__thumbsAlignStart___MO6tY",as="LightBox-module__thumbsAlignCenter___Q4sUx",ss="LightBox-module__thumbsAlignEnd___p4y9R",ls="LightBox-module__thumbItem___HvnF3",cs="LightBox-module__closeButton___g2khP",us="LightBox-module__fadeIn___0m5GW",ps="LightBox-module__slideInLeft___gPYwC",ds="LightBox-module__slideInRight___S-pPp",ms="LightBox-module__slideInTop___DFdAj",gs="LightBox-module__slideInBottom___m27kZ",fs="LightBox-module__fadeOut___55qBR",hs="LightBox-module__slideOutLeft___NvU7P",ys="LightBox-module__slideOutRight___SK7eC",vs="LightBox-module__slideOutTop___Vgg0z",bs="LightBox-module__slideOutBottom___nJ0Ef",xs="LightBox-module__scaleSlide___vZriG",D={hidden:Ha,heroImage:Na,background:ja,editor:Va,contentStyle:za,imageStyle:Oa,imgWrapper:Ba,contain:Da,cover:qa,caption:Ua,captionTextInner:Ga,lightboxSplide:Ya,arrow:Xa,arrowVertical:Ka,nextArrow:Za,arrowInner:Ja,arrowIcon:Qa,arrowImg:es,mirror:ts,thumbsWrapper:ns,thumbsContainerVertical:os,thumbsContainer:rs,thumbsAlignStart:is,thumbsAlignCenter:as,thumbsAlignEnd:ss,thumbItem:ls,closeButton:cs,fadeIn:us,slideInLeft:ps,slideInRight:ds,slideInTop:ms,slideInBottom:gs,fadeOut:fs,slideOutLeft:hs,slideOutRight:ys,slideOutTop:vs,slideOutBottom:bs,scaleSlide:xs},Ut=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), calc(-50% + ${k.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${k.scalingValue(t.x,n)}, calc(-50% + ${k.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${k.scalingValue(t.x,n)}), ${k.scalingValue(t.y,n)})`:o.transform=`translate(${k.scalingValue(t.x,n)}, ${k.scalingValue(t.y,n)})`,o};function mr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function So(e){const t=e.getBoundingClientRect(),n=mr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,u=o/r,c=s/i;let m,l;c>u?(m=o,l=o/c):(l=r,m=r*c);const I=t.left+n.left,f=t.top+n.top,g=(o-m)/2+I,p=(r-l)/2+f;return{x:g,y:p,width:m,height:l}}function Co(e){const t=e.getBoundingClientRect(),n=mr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function wo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Ss(e,t){const n=(()=>{if(e==="fade in")return D.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return D.fadeIn;if(e==="slide in")switch(t){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return D.fadeOut;if(e==="slide in")switch(t){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})(),s=(()=>{if(e==="fade in")return D.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Cs=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,u]=C.useState(!1),{url:c}=e.thumbnailBlock.cover;return C.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:c,alt:"Cover",className:D.heroImage,onClick:()=>u(!0)}),a.jsx(ws,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},ws=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:u})=>{var j;const[c,m]=C.useState(0),[l,I]=C.useState(0),[f,g]=C.useState(!1),[p,d]=C.useState(!1),[T,y]=C.useState({}),x=C.useRef(null),A=C.useRef(null),B=C.useRef(null),F=C.useRef(!1),L=C.useRef(null),w=C.useRef(null),_=C.useRef(null),P=C.useRef(null),V=C.useRef(!1),W=C.useRef(null),[H,N]=C.useState(!1),{appear:O,triggers:U,slider:v,thumbnail:M,controls:h,area:b,caption:S,layout:E}=r.lightboxBlock,{appearClass:X,backdropAppearClass:re,backdropDisappearClass:te,disappearClass:ie}=Ss(O.type,O.direction),R=(u==null?void 0:u.itemId)??null;C.useEffect(()=>{const $=()=>{setTimeout(()=>{var Z,ee;(ee=(Z=x.current)==null?void 0:Z.splide)==null||ee.refresh()},16)},q=()=>{I(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",$),window.addEventListener("ArticleEditor.ComponentContent:change",q),()=>{window.removeEventListener("ArticleEditor.Layout:change",$),window.removeEventListener("ArticleEditor.ComponentContent:change",q)}},[]),C.useEffect(()=>{if(!e||!M.isActive){N(!1);return}const $=W.current;if(!$)return;const q=()=>{v.direction==="horiz"?N($.scrollWidth>$.clientWidth):N($.scrollHeight>$.clientHeight)};q();const Z=new ResizeObserver(q);return Z.observe($),()=>Z.disconnect()},[e,M.isActive,n.length,T,v.direction]);const Q=C.useCallback(()=>{const $=window.matchMedia("(max-width: 768px)").matches,q=wo(b.color);$&&!i&&q>.9&&(document.body.style.backgroundColor=""),g(!0),F.current=!0;const Z=ee=>{ee.target===L.current&&ee.animationName&&(L.current&&w.current&&L.current.removeEventListener("animationend",w.current),w.current=null,F.current&&(F.current=!1,t()),g(!1))};L.current&&(w.current=Z,L.current.addEventListener("animationend",Z))},[t,b.color,i]),fe=($,q,Z)=>{var ee,se;if($){if(U.type==="click"&&U.switch==="image")U.repeat==="close"&&c===n.length-1?Q():(ee=x.current)==null||ee.go("+1");else if(U.type==="click"&&U.switch==="50/50"){const ae=$.getBoundingClientRect(),ne=q-ae.left,ue=Z-ae.top,z=ae.width,K=ae.height;let Y;v.direction==="horiz"?Y=ne<z/2?"-1":"+1":Y=ue<K/2?"-1":"+1",(se=x.current)==null||se.go(Y)}}},de=$=>{if(V.current){V.current=!1;return}const q=n[c],Z=(q==null?void 0:q.image.objectFit)==="cover";let ee,se;if("changedTouches"in $&&$.changedTouches.length>0)ee=$.changedTouches[0].clientX,se=$.changedTouches[0].clientY;else if("clientX"in $)ee=$.clientX,se=$.clientY;else return;let ae;if(Z&&B.current){const ne=Co(B.current);ae=ee>=ne.left&&ee<=ne.right&&se>=ne.top&&se<=ne.bottom}else{const ne=B.current?So(B.current):null;if(!ne){$.target===$.currentTarget&&Q();return}ae=ee>=ne.x&&ee<=ne.x+ne.width&&se>=ne.y&&se<=ne.y+ne.height}ae?fe(B.current,ee,se):Q()},ge=$=>{const q=$.target;(q.classList.contains(D.thumbsWrapper)||q.classList.contains(D.thumbsContainer))&&de($)};C.useEffect(()=>{if(!e)return;const $=q=>{var Z,ee;if(q.key==="Escape"){Q();return}if(q.key==="ArrowRight"){m(se=>(se+1)%Math.max(n.length,1)),(Z=x.current)==null||Z.go("+1");return}q.key==="ArrowLeft"&&(m(se=>(se-1+Math.max(n.length,1))%Math.max(n.length,1)),(ee=x.current)==null||ee.go("-1"))};return window.addEventListener("keydown",$),()=>{window.removeEventListener("keydown",$)}},[e,Q,n.length]),C.useEffect(()=>{if(e){if(m(0),I(q=>q+1),F.current=!1,g(!1),d(!1),y({}),!R)return;const $=new CustomEvent("page-overlay",{detail:{itemId:R}});window.dispatchEvent($)}return()=>{L.current&&w.current&&(L.current.removeEventListener("animationend",w.current),w.current=null),d(!1)}},[e,R]),C.useEffect(()=>{A.current!==null&&A.current!==v.type&&I($=>$+1),A.current=v.type},[v.type]),C.useEffect(()=>{if(!e)return;const $=document.body.style.overflow,q=window.matchMedia("(max-width: 768px)").matches,Z=wo(b.color);document.body.style.overflow="hidden",d(!1);const ee=ae=>{ae.target===L.current&&!F.current&&ae.animationName&&(q&&!i&&Z>.9&&(document.body.style.backgroundColor=b.color),d(!0),L.current&&_.current&&L.current.removeEventListener("animationend",_.current),_.current=null)};L.current&&(_.current=ee,L.current.addEventListener("animationend",ee));const se=ae=>{const ne=ae.target;ne&&(ne.closest(`.${D.thumbsWrapper}`)||ne.closest(`.${D.thumbsContainer}`))||v.type!=="slide"&&ae.preventDefault()};return document.addEventListener("touchmove",se,{passive:!1}),()=>{document.body.style.overflow=$,document.removeEventListener("touchmove",se),L.current&&_.current&&(L.current.removeEventListener("animationend",_.current),_.current=null),d(!1)}},[e,i,b.color,v.type]),C.useEffect(()=>{if(!e)return;const $=q=>{var ee,se;if(F.current){q.stopPropagation();return}if(V.current){V.current=!1;return}const Z=q.target;if(!(Z&&(Z.closest(`.${D.thumbsContainer}`)||Z.closest(`.${D.thumbItem}`)))){if(v.type==="slide"&&U.type==="drag"&&((se=(ee=x.current)==null?void 0:ee.splide)!=null&&se.root)){const ae=x.current.splide.root;if(Z&&(ae.contains(Z)||ae===Z))return}if(q.touches.length===0&&q.changedTouches.length>0){const ae=n[c],ne=(ae==null?void 0:ae.image.objectFit)==="cover",ue=q.changedTouches[0];let z;if(ne&&B.current){const K=Co(B.current);z=ue.clientX>=K.left&&ue.clientX<=K.right&&ue.clientY>=K.top&&ue.clientY<=K.bottom}else{const K=B.current?So(B.current):null;if(!K)return;z=ue.clientX>=K.x&&ue.clientX<=K.x+K.width&&ue.clientY>=K.y&&ue.clientY<=K.y+K.height}if(!z){q.stopPropagation(),F.current=!0;const K=Y=>{Y.stopPropagation(),Y.preventDefault(),document.removeEventListener("click",K,!0)};document.addEventListener("click",K,!0),Q()}}}};return document.addEventListener("touchend",$,{passive:!0}),()=>{document.removeEventListener("touchend",$)}},[e,Q,c,n]);const G=(v.type==="scale"||v.type==="fade")&&v.direction==="vert"&&U.type==="drag";C.useEffect(()=>{var Y,le;if(!e||!G||!((le=(Y=x.current)==null?void 0:Y.splide)!=null&&le.root))return;const $=x.current.splide.root,q=30,Z=(oe,pe)=>{if(P.current){const we=Math.abs(oe-P.current.x),$e=Math.abs(pe-P.current.y);(we>0||$e>0)&&(V.current=!0)}},ee=oe=>{P.current&&(oe.preventDefault(),Z(oe.clientX,oe.clientY))},se=oe=>{P.current&&oe.touches.length>0&&(oe.preventDefault(),Z(oe.touches[0].clientX,oe.touches[0].clientY))},ae=(oe,pe)=>{if(!P.current||!x.current){P.current=null;return}const we=Math.abs(oe-P.current.x),$e=Math.abs(pe-P.current.y);$e>q&&$e>we&&x.current.go(pe<P.current.y?"+1":"-1"),P.current=null},ne=oe=>{P.current&&ae(oe.clientX,oe.clientY),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("pointermove",ee)},ue=oe=>{if(P.current){if(oe.changedTouches.length>0){const pe=oe.changedTouches[0];ae(pe.clientX,pe.clientY)}document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),document.removeEventListener("touchmove",se)}},z=oe=>{P.current={x:oe.clientX,y:oe.clientY},V.current=!1,document.addEventListener("pointermove",ee,{passive:!1}),document.addEventListener("pointerup",ne),document.addEventListener("pointercancel",ne)},K=oe=>{oe.touches.length>0&&(P.current={x:oe.touches[0].clientX,y:oe.touches[0].clientY},V.current=!1,document.addEventListener("touchmove",se,{passive:!1}),document.addEventListener("touchend",ue),document.addEventListener("touchcancel",ue))};return $.addEventListener("pointerdown",z),$.addEventListener("touchstart",K),()=>{$.removeEventListener("pointerdown",z),$.removeEventListener("touchstart",K),document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ne),document.removeEventListener("pointercancel",ne),document.removeEventListener("touchmove",se),document.removeEventListener("touchend",ue),document.removeEventListener("touchcancel",ue),P.current=null,V.current=!1}},[e,G,l]);const me={backgroundColor:b.color,backdropFilter:`blur(${b.blur}px)`,animationDuration:`${parseInt(O.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:br.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:L,className:he(D.background,f?te:re,{[D.editor]:i},{[D.hidden]:!e}),style:{...me,...p&&!i&&!f?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?L:null,className:he(D.contentStyle,f?ie:X,{[D.editor]:i},{[D.hidden]:!e}),style:{animationDuration:`${parseInt(O.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(pr,{onMove:$=>m($.index),ref:x,className:D.lightboxSplide,options:{arrows:!1,speed:v.duration?parseInt(v.duration):500,direction:v.direction==="horiz"||v.type==="fade"||v.type==="scale"?"ltr":"ttb",pagination:!1,drag:U.type==="drag"&&!G,perPage:1,width:"100%",height:"100%",type:v.type==="fade"||v.type==="scale"?"fade":"loop",padding:0,rewind:U.repeat!=="close",start:0},style:{"--splide-speed":v.duration},children:n.map(($,q)=>{const Z=Ut(E.position,E.offset,i),ee=`${k.scalingValue(E.padding.top,i)} ${k.scalingValue(E.padding.right,i)} ${k.scalingValue(E.padding.bottom,i)} ${k.scalingValue(E.padding.left,i)}`,se=v.type==="scale"?(()=>{const{transform:ae,...ne}=Z;return{...ne,position:"absolute",padding:ee,boxSizing:"border-box","--position-transform":ae||"none"}})():{...Z,position:"absolute",padding:ee,boxSizing:"border-box"};return a.jsx(dr,{children:a.jsx("div",{className:D.imgWrapper,onClick:de,children:a.jsx("img",{ref:q===c?B:null,className:he(D.imageStyle,{[D.contain]:$.image.objectFit==="contain",[D.cover]:$.image.objectFit==="cover",[D.scaleSlide]:v.type==="scale"}),src:$.image.url,alt:$.image.name??"",style:{...se,pointerEvents:$.image.objectFit==="contain"?"none":"auto"}})})},q)})},l),h.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(D.arrow,{[D.arrowVertical]:v.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${k.scalingValue(h.offset.x,i)}, ${k.scalingValue(h.offset.y*(v.direction==="horiz"?1:-1),i)}) scale(${h.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var $;return($=x.current)==null?void 0:$.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&a.jsx(Ke,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:he(D.arrowImg,D.mirror)}),!h.arrowsImgUrl&&a.jsx($o,{color:h.color,className:he(D.arrowIcon,D.arrowImg,D.mirror)})]})}),a.jsx("div",{className:he(D.arrow,D.nextArrow,{[D.arrowVertical]:v.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:a.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${k.scalingValue(h.offset.x*(v.direction==="horiz"?-1:1),i)}, ${k.scalingValue(h.offset.y,i)}) scale(${h.scale}) rotate(${v.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var $;return($=x.current)==null?void 0:$.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&a.jsx(Ke,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:D.arrowImg}),!h.arrowsImgUrl&&a.jsx($o,{color:h.color,className:he(D.arrowIcon,D.arrowImg)})]})})]}),b.closeIconUrl&&(()=>{const $=Ut(b.closeIconAlign,b.closeIconOffset,i),q=`scale(${b.closeIconScale})`,Z=$.transform?`${$.transform} ${q}`:q;return a.jsx("button",{className:D.closeButton,style:{...$,transform:Z},onClick:Q,"aria-label":"Close lightbox",children:a.jsx(Ke,{url:b.closeIconUrl,fill:b.closeIconColor??"#000000",hoverFill:b.closeIconHover??"#cccccc"})})})(),S&&S.isActive&&o.imageCaption&&((j=n[c])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:$,fontSettings:q,letterSpacing:Z,textAlign:ee,wordSpacing:se,fontSizeLineHeight:ae,textAppearance:ne,color:ue}=o.imageCaption;return a.jsx("div",{className:D.caption,style:{...Ut(S.alignment,S.offset,i),fontFamily:yn(q.fontFamily),fontWeight:q.fontWeight,fontStyle:q.fontStyle,width:$.sizing==="auto"?"max-content":k.scalingValue($.width,i),letterSpacing:k.scalingValue(Z,i),wordSpacing:k.scalingValue(se,i),textAlign:ee,fontSize:k.scalingValue(ae.fontSize,i),lineHeight:k.scalingValue(ae.lineHeight,i),textTransform:ne.textTransform??"none",textDecoration:ne.textDecoration??"none",fontVariant:ne.fontVariant??"normal",color:ue},onClick:z=>z.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:D.captionTextInner,style:{"--link-color":S.linkColor,"--link-hover-color":S.linkHoverColor},children:a.jsx(Pt,{content:n[c].imageCaption})})})})(),M.isActive&&(()=>{const[$,q]=M.position.split("-"),Z=v.direction==="horiz"?`${$}-left`:M.position,ee=Ut(Z,M.offset,i),se=()=>{if(v.direction==="horiz"){if(q==="left")return"flex-start";if(q==="center")return"center";if(q==="right")return"flex-end"}else{if($==="top")return"flex-start";if($==="middle")return"center";if($==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:D.thumbsWrapper,onClick:ae=>ge(ae),style:{position:i?"absolute":"fixed",...ee,...v.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(D.thumbsContainer,{[D.thumbsContainerVertical]:v.direction==="vert",[D.thumbsAlignStart]:M.align==="start",[D.thumbsAlignCenter]:M.align==="center",[D.thumbsAlignEnd]:M.align==="end"}),style:{gap:k.scalingValue(M.grid.gap,i),justifyContent:H?"flex-start":se()},children:n.map((ae,ne)=>{const ue=ne===c,z=T[ne],Y=M.grid.size*(ue?M.activeState.scale:1),le=()=>{if(M.fit!=="fit")return{};if(!z)return v.direction==="horiz"?{height:k.scalingValue(Y,i)}:{width:k.scalingValue(Y,i)};const oe=z.width/z.height;if(v.direction==="horiz"){const pe=Y,we=pe*oe;return{width:k.scalingValue(we,i),height:k.scalingValue(pe,i)}}else{const pe=Y,we=pe/oe;return{width:k.scalingValue(pe,i),height:k.scalingValue(we,i)}}};return a.jsx("button",{className:D.thumbItem,style:{...v.direction==="horiz"&&M.fit!=="fit"?{height:k.scalingValue(Y,i)}:{},...v.direction==="vert"&&M.fit!=="fit"?{width:k.scalingValue(Y,i)}:{},...M.fit==="cover"?{width:k.scalingValue(Y,i),height:k.scalingValue(Y,i)}:{},...le(),transition:ue?"all 0.25s ease-out":"none",opacity:ue?M.activeState.opacity/100:M.opacity/100,"--thumb-hover":M.activeState.opacity/100},onClick:oe=>{var pe;oe.stopPropagation(),m(ne),(pe=x.current)==null||pe.go(ne)},onMouseEnter:()=>{var oe;M.triggers==="hov"&&((oe=x.current)==null||oe.go(ne))},children:a.jsx("img",{src:ae.image.url,alt:ae.image.name??"",onLoad:oe=>{const pe=oe.currentTarget;pe.naturalWidth&&pe.naturalHeight&&y(we=>({...we,[ne]:{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%"}:{}}})},`${ae.image.name}-${ne}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const $s={element:Cs,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ts(e){return`
|
|
6
|
+
*/const ba="RichTextRenderer-module__link___BWeZ2",xa={link:ba},Sa=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(o=>/^\d/.test(o))},yn=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Sa(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function ht(e){const{color:t,...n}=e;return n}function Re(e,t){var n,o,r;return{fontFamily:yn(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(e.fontSize,t),lineHeight:e.lineHeight!==void 0?E.scalingValue(e.lineHeight,t):void 0,textTransform:(n=e.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=e.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=e.textAppearance)==null?void 0:r.fontVariant,color:e.color}}const Pt=({content:e})=>{const t=n=>n.map((o,r)=>o.type==="link"?a.jsx("a",{className:xa.link,href:o.value,target:o.target,children:t(o.children)},r):a.jsx("span",{style:Ca(o),children:o.text},r));return a.jsx(a.Fragment,{children:e.map((n,o)=>{const r=n.children;return a.jsx("div",{children:t(r)},o)})})};function Ca(e){return{...e.fontFamily&&{fontFamily:yn(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const wa="SvgImage-module__svg___q3xE-",$a="SvgImage-module__img___VsTm-",vo={svg:wa,img:$a},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,'\\"')}")`,Xe=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:o="",style:r})=>{const[s,i]=b.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return b.useEffect(()=>{if(typeof window<"u"&&window.CSS){const u=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(u)}},[]),!Ta(e)||!s?a.jsx("img",{src:e,alt:"",className:he(vo.img,o),style:r}):a.jsx("span",{"data-supports-mask":s,className:he(vo.svg,o),style:{"--svg":_a(e),"--fill":t,"--hover-fill":n,...r??{}}})},Ea={"top-left":ee.topLeftAlignment,"top-center":ee.topCenterAlignment,"top-right":ee.topRightAlignment,"middle-left":ee.middleLeftAlignment,"middle-center":ee.middleCenterAlignment,"middle-right":ee.middleRightAlignment,"bottom-left":ee.bottomLeftAlignment,"bottom-center":ee.bottomCenterAlignment,"bottom-right":ee.bottomRightAlignment};function ka({settings:e,content:t,styles:n,isEditor:o}){const[r,s]=b.useState(null),{widthSettings:i,fontSettings:u,letterSpacing:c,textAlign:m,wordSpacing:l,fontSizeLineHeight:I,textAppearance:y,color:f}=n.imageCaption,[p,d]=b.useState(void 0),[$,v]=b.useState(null),[S,k]=b.useState(0),[O,M]=b.useState(0),{direction:L,transition:C,controls:T,pagination:P,imageCaption:V,triggers:W}=e,H=b.useRef(C.type),{x:N,y:z}=e.controls.offset,G=x=>{r&&r.go(x)};return b.useEffect(()=>{if(!$)return;const x=new ResizeObserver(R=>{if(!r)return;const[F]=R;d({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return x.observe($),()=>x.unobserve($)},[$]),b.useEffect(()=>{!r||H.current===C.type||(M(x=>x+1),H.current=C.type)},[C.type]),a.jsx("div",{className:he(ee.wrapper,{[ee.editor]:o}),ref:v,children:a.jsxs("div",{className:ee.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:C.backgroundColor&&C.type==="fade in"?C.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:he(ee.captionBlock),children:a.jsx("div",{className:ee.captionTextWrapper,children:t.map((x,R)=>a.jsx("div",{className:he(ee.captionText,Ea[V.alignment],{[ee.withPointerEvents]:R===S&&o,[ee.active]:R===S}),style:{fontFamily:yn(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,o),letterSpacing:E.scalingValue(c,o),wordSpacing:E.scalingValue(l,o),textAlign:m,fontSize:E.scalingValue(I.fontSize,o),lineHeight:E.scalingValue(I.lineHeight,o),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:f,transitionDuration:C.duration?`${Math.round(parseInt(C.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:ee.captionTextInner,style:{"--link-hover-color":V.linkHoverColor,"--link-color":V.linkColor,position:"relative",top:E.scalingValue(V.offset.y,o),left:E.scalingValue(V.offset.x,o)},children:a.jsx(Pt,{content:x.imageCaption})})},R))})}),a.jsx(pr,{onMove:x=>{k(x.index)},ref:s,options:{arrows:!1,speed:C.duration?parseInt(C.duration):500,autoplay:W.autoPlay!==null,...W.autoPlay!==null&&{interval:parseInt(W.autoPlay)*1e3},direction:L==="horiz"||C.type==="fade in"?"ltr":"ttb",pagination:!1,drag:W.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:C.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((x,R)=>a.jsx(dr,{children:a.jsx("div",{className:ee.sliderItem,children:a.jsx("div",{className:ee.imgWrapper,children:a.jsx("img",{className:he(ee.sliderImage,{[ee.contain]:x.image.objectFit==="contain",[ee.cover]:x.image.objectFit==="cover"}),src:x.image.url,alt:x.image.name??""})})})},R))},O),T.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(ee.arrow,{[ee.arrowVertical]:L==="vert",[ee.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{onClick:()=>{G("-1")},className:ee.arrowInner,style:{transform:`translate(${E.scalingValue(N,o)}, ${E.scalingValue(z*(L==="horiz"?1:-1),o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(Xe,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:he(ee.arrowImg,ee.mirror)}),!T.arrowsImgUrl&&a.jsx(bo,{color:T.color,className:he(ee.arrowIcon,ee.arrowImg,ee.mirror)})]})}),a.jsx("div",{className:he(ee.arrow,ee.nextArrow,{[ee.arrowVertical]:L==="vert",[ee.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:a.jsxs("button",{className:ee.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${E.scalingValue(N*(L==="horiz"?-1:1),o)}, ${E.scalingValue(z,o)}) scale(${e.controls.scale/100}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&a.jsx(Xe,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:ee.arrowImg}),!T.arrowsImgUrl&&a.jsx(bo,{color:T.color,className:he(ee.arrowIcon,ee.arrowImg)})]})})]}),W.triggersList.click&&a.jsx("div",{className:ee.clickOverlay,onClick:()=>{r&&r.go("+1")}}),P.isActive&&a.jsx("div",{className:he(ee.pagination,{[ee.paginationInsideBottom]:P.position==="inside-1"&&L==="horiz",[ee.paginationInsideTop]:P.position==="inside-2"&&L==="horiz",[ee.paginationOutsideBottom]:P.position==="outside-1"&&L==="horiz",[ee.paginationOutsideTop]:P.position==="outside-2"&&L==="horiz",[ee.paginationInsideLeft]:P.position==="inside-1"&&L==="vert",[ee.paginationInsideRight]:P.position==="inside-2"&&L==="vert",[ee.paginationOutsideLeft]:P.position==="outside-1"&&L==="vert",[ee.paginationOutsideRight]:P.position==="outside-2"&&L==="vert",[ee.paginationVertical]:L==="vert"}),children:a.jsx("div",{className:ee.paginationInner,style:{backgroundColor:P.colors[2],transform:`scale(${P.scale/100}) translate(${E.scalingValue(P.offset.x,o)}, ${E.scalingValue(P.offset.y,o)}) rotate(${L==="horiz"?"0deg":"90deg"})`},children:t.map((x,R)=>a.jsx("button",{onClick:()=>{r&&r.go(R)},className:he(ee.paginationItem),children:a.jsx("div",{className:he(ee.dot,{[ee.activeDot]:R===S}),style:{backgroundColor:R===S?P.colors[0]:P.colors[1],"--pagination-hover-color":P.hover}})},R))})})]})})}function bo({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Aa={element:ka,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/sliderImg.png"},defaultSize:{width:400,height:400},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.arrowsImgUrl"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},schema:{type:"object",properties:{settings:{type:"object",display:{type:"settings-block"},properties:{triggers:{title:"triggers",icon:"target",tooltip:"Triggers",type:"object",properties:{triggersList:{type:"object",display:{type:"toggle-ratio-group"},properties:{click:{type:"boolean"},drag:{type:"boolean"}}},autoPlay:{type:["string","null"],label:"Auto",display:{type:"step-selector"},enum:[null,"1s","2s","3s","4s","5s"]}}},direction:{icon:"horizontal-resize",tooltip:"Direction",type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},transition:{title:"transit",icon:"transition",tooltip:"Transition",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade in"]},backgroundColor:{type:["string","null"],title:"BG Color",display:{visible:!1,type:"settings-color-picker",format:"single"}},duration:{type:"string",label:"icon:hourglass",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},controls:{title:"controls",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:50,max:600,display:{type:"range-control"}},color:{title:"color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}},show:{title:"Show",type:"string",display:{type:"ratio-group"},enum:["always","on hover"]}}},pagination:{title:"nav",icon:"pagination",tooltip:"Navigation",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"socket",direction:"horizontal"},type:"string",enum:["outside-1","outside-2","inside-1","inside-2"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"scale",min:10,max:400,display:{type:"range-control"}},colors:{display:{type:"settings-color-picker",format:"multiple"},title:"color",type:"array",items:{type:"string"}},hover:{title:"hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},imageCaption:{title:"Caption",icon:"text-icon",tooltip:"Caption",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}},default:{triggers:{triggersList:{click:!1,drag:!0},autoPlay:null},controls:{isActive:!0,arrowsImgUrl:null,offset:{x:0,y:0},scale:100,color:"#000000",hover:"#cccccc",show:"always"},transition:{type:"slide",duration:"500ms",backgroundColor:null},pagination:{isActive:!0,scale:50,position:"outside-1",offset:{x:0,y:0},colors:["#cccccc","#cccccc","#000000"],hover:"#cccccc"},direction:"horiz",imageCaption:{offset:{x:0,y:0},isActive:!0,alignment:"middle-center",linkColor:"#cccccc",linkHoverColor:"#cccccc"}},displayRules:[{if:{name:"direction",value:"vert"},then:{name:"properties.pagination.properties.position.display.direction",value:"vertical"}},{if:{name:"transition.type",value:"fade in"},then:{name:"properties.transition.properties.backgroundColor.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{placeholder:"Add Caption...",label:"Description",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}},La="ImageRevealSlider-module__imageRevealSlider___UE5Ob",Ia="ImageRevealSlider-module__image___Qjt-e",Fa="ImageRevealSlider-module__link___N-iLG",Ma="ImageRevealSlider-module__cursor___2U03d",ut={imageRevealSlider:La,image:Ia,link:Fa,cursor:Ma};function xo(e,t,n){for(const o of n){const r=new Image;r.src=o.url;const s=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*s,u=s/2,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 wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Pa(e,t,n,o){let r,s;if(t==="custom"){r=n;const i=await wn(e);s=i.height/i.width*r}else if(t==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await wn(e);s=i.height/i.width*r}else{const i=await wn(e);r=i.width,s=i.height}return{width:r,height:s,finalWidth:`${r}px`}}function Ra({settings:e,content:t,isEditor:n}){const[o,r]=b.useState(null),[s,i]=b.useState([]),[u,c]=b.useState(0),m=b.useRef(0),[l,I]=b.useState({x:0,y:0}),[y,f]=b.useState(1),[p,d]=b.useState("none"),$=b.useRef({x:0,y:0}),[v,S]=b.useState(!1),{sizeType:k,imageWidth:O,randomRangeImageWidth:M}=e.imageSize,{revealPosition:L,visible:C}=e.position,{cursorType:T,target:P,defaultCursorScale:V,defaultCursor:W,hoverCursorScale:H,hoverCursor:N}=e.cursor;b.useEffect(()=>{if(!o)return;const x=(h,g)=>{const _=o.getBoundingClientRect(),q=h-_.left,ne=g-_.top;if(I({x:q,y:ne}),T==="system"){d("none"),f(1);return}const Z=q,ae=ne,A=document.elementFromPoint(_.left+Z,_.top+ae);if(A&&A.closest("a")){d("none"),f(1);return}const Q=xo(Z,ae,s)||P==="area"?{img:N??"none",scale:H}:{img:W??"none",scale:V};d(Q.img),f(Q.scale)},R=h=>{h.stopPropagation(),$.current={x:h.clientX,y:h.clientY},x(h.clientX,h.clientY)},F=()=>{v&&x($.current.x,$.current.y)};return o.addEventListener("mousemove",R),window.addEventListener("scroll",F,!0),()=>{o.removeEventListener("mousemove",R),window.removeEventListener("scroll",F,!0)}},[o,v,l,T,P,N,W,H,V,s]),b.useEffect(()=>{v||(d("none"),f(0))},[v]);const z=async(x,R,F,h={})=>{const{width:g,height:_,finalWidth:q}=await Pa(x.image.url,k,O,M);let ne=0,Z=0;L==="same"?(ne=R/2,Z=F/2):(ne=h.x??Math.random()*R,Z=h.y??Math.random()*F);const ae=Math.min(Math.max(ne,g/2),R-g/2),A=Math.min(Math.max(Z,_/2),F-_/2);return{id:m.current++,url:x.image.url,link:x.link,name:x.image.name,x:ae,y:A,width:q}};b.useEffect(()=>{if(!o||t.length===0)return;const x=o.getBoundingClientRect(),R=x.width,F=x.height,h=[];(async()=>{const _=t[0],q=await z(_,R,F);h.push(q),i(h),c(1)})()},[k,O,M,L,o]),b.useEffect(()=>{C==="last One"&&i(x=>x.length>0?[x[x.length-1]]:[])},[C]);const G=async x=>{if(!o)return;const R=o.getBoundingClientRect(),F=x.clientX-R.left,h=x.clientY-R.top;if(P==="image"&&!xo(F,h,s))return;let g=0,_=0;L==="on Click"?(g=F,_=h):L==="same"?(g=R.width/2,_=R.height/2):(g=Math.random()*R.width,_=Math.random()*R.height);const q=t[u],ne=await z(q,R.width,R.height,{x:g,y:_});i(Z=>C==="all"?[...Z,ne]:[ne]),c(Z=>Z>=t.length-1?0:Z+1)};return a.jsxs("div",{ref:r,onClick:G,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),className:ut.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[s.map(x=>a.jsx("div",{className:ut.wrapper,style:{top:`${x.y}px`,left:`${x.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:x.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:P==="area"&&x.link?a.jsx("a",{href:x.link,target:"_blank",className:ut.link,children:a.jsx("img",{src:x.url,alt:x.name,className:ut.image},x.id)}):a.jsx("img",{src:x.url,alt:x.name,className:ut.image},x.id)},x.id)),v&&a.jsx("div",{className:ut.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Wa={element:Ra,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:""}]}}}},Ha="LightBox-module__hidden___9s-9x",Na="LightBox-module__heroImage___sTxNF",ja="LightBox-module__background___rm9ml",Va="LightBox-module__editor___4ACaY",Ba="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Da="LightBox-module__contain___8-yaS",qa="LightBox-module__cover___hNvOG",Ua="LightBox-module__caption___b6L2I",Ga="LightBox-module__captionTextInner___rCGNH",Ya="LightBox-module__lightboxSplide___XFuWC",Ka="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",Za="LightBox-module__nextArrow___zkAQN",Ja="LightBox-module__arrowInner___p48sW",Qa="LightBox-module__arrowIcon___3VaFf",es="LightBox-module__arrowImg___pNV88",ts="LightBox-module__mirror___pjeXc",ns="LightBox-module__thumbsWrapper___GB-nU",os="LightBox-module__thumbsContainerVertical___wttk5",rs="LightBox-module__thumbsContainer___osSma",is="LightBox-module__thumbsAlignStart___MO6tY",as="LightBox-module__thumbsAlignCenter___Q4sUx",ss="LightBox-module__thumbsAlignEnd___p4y9R",ls="LightBox-module__thumbItem___HvnF3",cs="LightBox-module__closeButton___g2khP",us="LightBox-module__fadeIn___0m5GW",ps="LightBox-module__slideInLeft___gPYwC",ds="LightBox-module__slideInRight___S-pPp",ms="LightBox-module__slideInTop___DFdAj",gs="LightBox-module__slideInBottom___m27kZ",fs="LightBox-module__fadeOut___55qBR",hs="LightBox-module__slideOutLeft___NvU7P",ys="LightBox-module__slideOutRight___SK7eC",vs="LightBox-module__slideOutTop___Vgg0z",bs="LightBox-module__slideOutBottom___nJ0Ef",xs="LightBox-module__scaleSlide___vZriG",D={hidden:Ha,heroImage:Na,background:ja,editor:Va,contentStyle:Ba,imageStyle:za,imgWrapper:Oa,contain:Da,cover:qa,caption:Ua,captionTextInner:Ga,lightboxSplide:Ya,arrow:Ka,arrowVertical:Xa,nextArrow:Za,arrowInner:Ja,arrowIcon:Qa,arrowImg:es,mirror:ts,thumbsWrapper:ns,thumbsContainerVertical:os,thumbsContainer:rs,thumbsAlignStart:is,thumbsAlignCenter:as,thumbsAlignEnd:ss,thumbItem:ls,closeButton:cs,fadeIn:us,slideInLeft:ps,slideInRight:ds,slideInTop:ms,slideInBottom:gs,fadeOut:fs,slideOutLeft:hs,slideOutRight:ys,slideOutTop:vs,slideOutBottom:bs,scaleSlide:xs},Ut=(e,t,n)=>{const o={},[r,s]=e.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),s==="left"?(o.left="0",o.right="auto"):s==="center"?(o.left="50%",o.right="auto"):s==="right"&&(o.left="auto",o.right="0"),r==="middle"&&s==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:r==="middle"?o.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:s==="center"?o.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:o.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,o};function mr(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function So(e){const t=e.getBoundingClientRect(),n=mr(e),o=Math.max(0,t.width-n.left-n.right),r=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,i=e.naturalHeight,u=o/r,c=s/i;let m,l;c>u?(m=o,l=o/c):(l=r,m=r*c);const I=t.left+n.left,y=t.top+n.top,f=(o-m)/2+I,p=(r-l)/2+y;return{x:f,y:p,width:m,height:l}}function Co(e){const t=e.getBoundingClientRect(),n=mr(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function wo(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const o=t[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Ss(e,t){const n=(()=>{if(e==="fade in")return D.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return D.fadeIn;if(e==="slide in")switch(t){case"left":return D.slideInLeft;case"right":return D.slideInRight;case"top":return D.slideInTop;case"bottom":return D.slideInBottom;default:return D.slideInRight}return D.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return D.fadeOut;if(e==="slide in")switch(t){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})(),s=(()=>{if(e==="fade in")return D.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return D.slideOutLeft;case"right":return D.slideOutRight;case"top":return D.slideOutTop;case"bottom":return D.slideOutBottom;default:return D.slideOutRight}return D.fadeOut})();return{appearClass:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:s}}const Cs=({settings:e,content:t,styles:n,portalId:o,activeEvent:r,isEditor:s})=>{const[i,u]=b.useState(!1),{url:c}=e.thumbnailBlock.cover;return b.useEffect(()=>{r==="close"&&u(!1),r==="open"&&u(!0)},[r]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:c,alt:"Cover",className:D.heroImage,onClick:()=>u(!0)}),a.jsx(ws,{isOpen:i,onClose:()=>u(!1),content:t,settings:e,lightboxStyles:n,portalId:o,isEditor:s})]})},ws=({isOpen:e,onClose:t,content:n,lightboxStyles:o,settings:r,portalId:s,isEditor:i,metadata:u})=>{var j;const[c,m]=b.useState(0),[l,I]=b.useState(0),[y,f]=b.useState(!1),[p,d]=b.useState(!1),[$,v]=b.useState({}),S=b.useRef(null),k=b.useRef(null),O=b.useRef(null),M=b.useRef(!1),L=b.useRef(null),C=b.useRef(null),T=b.useRef(null),P=b.useRef(null),V=b.useRef(!1),W=b.useRef(null),[H,N]=b.useState(!1),{appear:z,triggers:G,slider:x,thumbnail:R,controls:F,area:h,caption:g,layout:_}=r.lightboxBlock,{appearClass:q,backdropAppearClass:ne,backdropDisappearClass:Z,disappearClass:ae}=Ss(z.type,z.direction),A=(u==null?void 0:u.itemId)??null;b.useEffect(()=>{const w=()=>{setTimeout(()=>{var J,te;(te=(J=S.current)==null?void 0:J.splide)==null||te.refresh()},16)},U=()=>{I(J=>J+1)};return window.addEventListener("ArticleEditor.Layout:change",w),window.addEventListener("ArticleEditor.ComponentContent:change",U),()=>{window.removeEventListener("ArticleEditor.Layout:change",w),window.removeEventListener("ArticleEditor.ComponentContent:change",U)}},[]),b.useEffect(()=>{if(!e||!R.isActive){N(!1);return}const w=W.current;if(!w)return;const U=()=>{x.direction==="horiz"?N(w.scrollWidth>w.clientWidth):N(w.scrollHeight>w.clientHeight)};U();const J=new ResizeObserver(U);return J.observe(w),()=>J.disconnect()},[e,R.isActive,n.length,$,x.direction]);const Q=b.useCallback(()=>{const w=window.matchMedia("(max-width: 768px)").matches,U=wo(h.color);w&&!i&&U>.9&&(document.body.style.backgroundColor=""),f(!0),M.current=!0;const J=te=>{te.target===L.current&&te.animationName&&(L.current&&C.current&&L.current.removeEventListener("animationend",C.current),C.current=null,M.current&&(M.current=!1,t()),f(!1))};L.current&&(C.current=J,L.current.addEventListener("animationend",J))},[t,h.color,i]),fe=(w,U,J)=>{var te,se;if(w){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&c===n.length-1?Q():(te=S.current)==null||te.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const ie=w.getBoundingClientRect(),oe=U-ie.left,pe=J-ie.top,B=ie.width,X=ie.height;let K;x.direction==="horiz"?K=oe<B/2?"-1":"+1":K=pe<X/2?"-1":"+1",(se=S.current)==null||se.go(K)}}},ue=w=>{if(V.current){V.current=!1;return}const U=n[c],J=(U==null?void 0:U.image.objectFit)==="cover";let te,se;if("changedTouches"in w&&w.changedTouches.length>0)te=w.changedTouches[0].clientX,se=w.changedTouches[0].clientY;else if("clientX"in w)te=w.clientX,se=w.clientY;else return;let ie;if(J&&O.current){const oe=Co(O.current);ie=te>=oe.left&&te<=oe.right&&se>=oe.top&&se<=oe.bottom}else{const oe=O.current?So(O.current):null;if(!oe){w.target===w.currentTarget&&Q();return}ie=te>=oe.x&&te<=oe.x+oe.width&&se>=oe.y&&se<=oe.y+oe.height}ie?fe(O.current,te,se):Q()},me=w=>{const U=w.target;(U.classList.contains(D.thumbsWrapper)||U.classList.contains(D.thumbsContainer))&&ue(w)};b.useEffect(()=>{if(!e)return;const w=U=>{var J,te;if(U.key==="Escape"){Q();return}if(U.key==="ArrowRight"){m(se=>(se+1)%Math.max(n.length,1)),(J=S.current)==null||J.go("+1");return}U.key==="ArrowLeft"&&(m(se=>(se-1+Math.max(n.length,1))%Math.max(n.length,1)),(te=S.current)==null||te.go("-1"))};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[e,Q,n.length]),b.useEffect(()=>{if(e){if(m(0),I(U=>U+1),M.current=!1,f(!1),d(!1),v({}),!A)return;const w=new CustomEvent("page-overlay",{detail:{itemId:A}});window.dispatchEvent(w)}return()=>{L.current&&C.current&&(L.current.removeEventListener("animationend",C.current),C.current=null),d(!1)}},[e,A]),b.useEffect(()=>{k.current!==null&&k.current!==x.type&&I(w=>w+1),k.current=x.type},[x.type]),b.useEffect(()=>{if(!e)return;const w=document.body.style.overflow,U=window.matchMedia("(max-width: 768px)").matches,J=wo(h.color);document.body.style.overflow="hidden",d(!1);const te=ie=>{ie.target===L.current&&!M.current&&ie.animationName&&(U&&!i&&J>.9&&(document.body.style.backgroundColor=h.color),d(!0),L.current&&T.current&&L.current.removeEventListener("animationend",T.current),T.current=null)};L.current&&(T.current=te,L.current.addEventListener("animationend",te));const se=ie=>{const oe=ie.target;oe&&(oe.closest(`.${D.thumbsWrapper}`)||oe.closest(`.${D.thumbsContainer}`))||x.type!=="slide"&&ie.preventDefault()};return document.addEventListener("touchmove",se,{passive:!1}),()=>{document.body.style.overflow=w,document.removeEventListener("touchmove",se),L.current&&T.current&&(L.current.removeEventListener("animationend",T.current),T.current=null),d(!1)}},[e,i,h.color,x.type]),b.useEffect(()=>{if(!e)return;const w=U=>{var te,se;if(M.current){U.stopPropagation();return}if(V.current){V.current=!1;return}const J=U.target;if(!(J&&(J.closest(`.${D.thumbsContainer}`)||J.closest(`.${D.thumbItem}`)))){if(x.type==="slide"&&G.type==="drag"&&((se=(te=S.current)==null?void 0:te.splide)!=null&&se.root)){const ie=S.current.splide.root;if(J&&(ie.contains(J)||ie===J))return}if(U.touches.length===0&&U.changedTouches.length>0){const ie=n[c],oe=(ie==null?void 0:ie.image.objectFit)==="cover",pe=U.changedTouches[0];let B;if(oe&&O.current){const X=Co(O.current);B=pe.clientX>=X.left&&pe.clientX<=X.right&&pe.clientY>=X.top&&pe.clientY<=X.bottom}else{const X=O.current?So(O.current):null;if(!X)return;B=pe.clientX>=X.x&&pe.clientX<=X.x+X.width&&pe.clientY>=X.y&&pe.clientY<=X.y+X.height}if(!B){U.stopPropagation(),M.current=!0;const X=K=>{K.stopPropagation(),K.preventDefault(),document.removeEventListener("click",X,!0)};document.addEventListener("click",X,!0),Q()}}}};return document.addEventListener("touchend",w,{passive:!0}),()=>{document.removeEventListener("touchend",w)}},[e,Q,c,n]);const Y=(x.type==="scale"||x.type==="fade")&&x.direction==="vert"&&G.type==="drag";b.useEffect(()=>{var K,le;if(!e||!Y||!((le=(K=S.current)==null?void 0:K.splide)!=null&&le.root))return;const w=S.current.splide.root,U=30,J=(re,de)=>{if(P.current){const we=Math.abs(re-P.current.x),$e=Math.abs(de-P.current.y);(we>0||$e>0)&&(V.current=!0)}},te=re=>{P.current&&(re.preventDefault(),J(re.clientX,re.clientY))},se=re=>{P.current&&re.touches.length>0&&(re.preventDefault(),J(re.touches[0].clientX,re.touches[0].clientY))},ie=(re,de)=>{if(!P.current||!S.current){P.current=null;return}const we=Math.abs(re-P.current.x),$e=Math.abs(de-P.current.y);$e>U&&$e>we&&S.current.go(de<P.current.y?"+1":"-1"),P.current=null},oe=re=>{P.current&&ie(re.clientX,re.clientY),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("pointermove",te)},pe=re=>{if(P.current){if(re.changedTouches.length>0){const de=re.changedTouches[0];ie(de.clientX,de.clientY)}document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),document.removeEventListener("touchmove",se)}},B=re=>{P.current={x:re.clientX,y:re.clientY},V.current=!1,document.addEventListener("pointermove",te,{passive:!1}),document.addEventListener("pointerup",oe),document.addEventListener("pointercancel",oe)},X=re=>{re.touches.length>0&&(P.current={x:re.touches[0].clientX,y:re.touches[0].clientY},V.current=!1,document.addEventListener("touchmove",se,{passive:!1}),document.addEventListener("touchend",pe),document.addEventListener("touchcancel",pe))};return w.addEventListener("pointerdown",B),w.addEventListener("touchstart",X),()=>{w.removeEventListener("pointerdown",B),w.removeEventListener("touchstart",X),document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",oe),document.removeEventListener("pointercancel",oe),document.removeEventListener("touchmove",se),document.removeEventListener("touchend",pe),document.removeEventListener("touchcancel",pe),P.current=null,V.current=!1}},[e,Y,l]);const ge={backgroundColor:h.color,backdropFilter:`blur(${h.blur}px)`,animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:br.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:i?null:L,className:he(D.background,y?Z:ne,{[D.editor]:i},{[D.hidden]:!e}),style:{...ge,...p&&!i&&!y?{position:"absolute"}:{}}}),a.jsxs("div",{ref:i?L:null,className:he(D.contentStyle,y?ae:q,{[D.editor]:i},{[D.hidden]:!e}),style:{animationDuration:`${parseInt(z.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(pr,{onMove:w=>m(w.index),ref:S,className:D.lightboxSplide,options:{arrows:!1,speed:x.duration?parseInt(x.duration):500,direction:x.direction==="horiz"||x.type==="fade"||x.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!Y,perPage:1,width:"100%",height:"100%",type:x.type==="fade"||x.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":x.duration},children:n.map((w,U)=>{const J=Ut(_.position,_.offset,i),te=`${E.scalingValue(_.padding.top,i)} ${E.scalingValue(_.padding.right,i)} ${E.scalingValue(_.padding.bottom,i)} ${E.scalingValue(_.padding.left,i)}`,se=x.type==="scale"?(()=>{const{transform:ie,...oe}=J;return{...oe,position:"absolute",padding:te,boxSizing:"border-box","--position-transform":ie||"none"}})():{...J,position:"absolute",padding:te,boxSizing:"border-box"};return a.jsx(dr,{children:a.jsx("div",{className:D.imgWrapper,onClick:ue,children:a.jsx("img",{ref:U===c?O:null,className:he(D.imageStyle,{[D.contain]:w.image.objectFit==="contain",[D.cover]:w.image.objectFit==="cover",[D.scaleSlide]:x.type==="scale"}),src:w.image.url,alt:w.image.name??"",style:{...se,pointerEvents:w.image.objectFit==="contain"?"none":"auto"}})})},U)})},l),F.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:he(D.arrow,{[D.arrowVertical]:x.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x,i)}, ${E.scalingValue(F.offset.y*(x.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${x.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=S.current)==null?void 0:w.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&a.jsx(Xe,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:he(D.arrowImg,D.mirror)}),!F.arrowsImgUrl&&a.jsx($o,{color:F.color,className:he(D.arrowIcon,D.arrowImg,D.mirror)})]})}),a.jsx("div",{className:he(D.arrow,D.nextArrow,{[D.arrowVertical]:x.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:a.jsxs("button",{className:D.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x*(x.direction==="horiz"?-1:1),i)}, ${E.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${x.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var w;return(w=S.current)==null?void 0:w.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&a.jsx(Xe,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:D.arrowImg}),!F.arrowsImgUrl&&a.jsx($o,{color:F.color,className:he(D.arrowIcon,D.arrowImg)})]})})]}),h.closeIconUrl&&(()=>{const w=Ut(h.closeIconAlign,h.closeIconOffset,i),U=`scale(${h.closeIconScale})`,J=w.transform?`${w.transform} ${U}`:U;return a.jsx("button",{className:D.closeButton,style:{...w,transform:J},onClick:Q,"aria-label":"Close lightbox",children:a.jsx(Xe,{url:h.closeIconUrl,fill:h.closeIconColor??"#000000",hoverFill:h.closeIconHover??"#cccccc"})})})(),g&&g.isActive&&o.imageCaption&&((j=n[c])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:w,fontSettings:U,letterSpacing:J,textAlign:te,wordSpacing:se,fontSizeLineHeight:ie,textAppearance:oe,color:pe}=o.imageCaption;return a.jsx("div",{className:D.caption,style:{...Ut(g.alignment,g.offset,i),fontFamily:yn(U.fontFamily),fontWeight:U.fontWeight,fontStyle:U.fontStyle,width:w.sizing==="auto"?"max-content":E.scalingValue(w.width,i),letterSpacing:E.scalingValue(J,i),wordSpacing:E.scalingValue(se,i),textAlign:te,fontSize:E.scalingValue(ie.fontSize,i),lineHeight:E.scalingValue(ie.lineHeight,i),textTransform:oe.textTransform??"none",textDecoration:oe.textDecoration??"none",fontVariant:oe.fontVariant??"normal",color:pe},onClick:B=>B.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:D.captionTextInner,style:{"--link-color":g.linkColor,"--link-hover-color":g.linkHoverColor},children:a.jsx(Pt,{content:n[c].imageCaption})})})})(),R.isActive&&(()=>{const[w,U]=R.position.split("-"),J=x.direction==="horiz"?`${w}-left`:R.position,te=Ut(J,R.offset,i),se=()=>{if(x.direction==="horiz"){if(U==="left")return"flex-start";if(U==="center")return"center";if(U==="right")return"flex-end"}else{if(w==="top")return"flex-start";if(w==="middle")return"center";if(w==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:W,className:D.thumbsWrapper,onClick:ie=>me(ie),style:{position:i?"absolute":"fixed",...te,...x.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:he(D.thumbsContainer,{[D.thumbsContainerVertical]:x.direction==="vert",[D.thumbsAlignStart]:R.align==="start",[D.thumbsAlignCenter]:R.align==="center",[D.thumbsAlignEnd]:R.align==="end"}),style:{gap:E.scalingValue(R.grid.gap,i),justifyContent:H?"flex-start":se()},children:n.map((ie,oe)=>{const pe=oe===c,B=$[oe],K=R.grid.size*(pe?R.activeState.scale:1),le=()=>{if(R.fit!=="fit")return{};if(!B)return x.direction==="horiz"?{height:E.scalingValue(K,i)}:{width:E.scalingValue(K,i)};const re=B.width/B.height;if(x.direction==="horiz"){const de=K,we=de*re;return{width:E.scalingValue(we,i),height:E.scalingValue(de,i)}}else{const de=K,we=de/re;return{width:E.scalingValue(de,i),height:E.scalingValue(we,i)}}};return a.jsx("button",{className:D.thumbItem,style:{...x.direction==="horiz"&&R.fit!=="fit"?{height:E.scalingValue(K,i)}:{},...x.direction==="vert"&&R.fit!=="fit"?{width:E.scalingValue(K,i)}:{},...R.fit==="cover"?{width:E.scalingValue(K,i),height:E.scalingValue(K,i)}:{},...le(),transition:pe?"all 0.25s ease-out":"none",opacity:pe?R.activeState.opacity/100:R.opacity/100,"--thumb-hover":R.activeState.opacity/100},onClick:re=>{var de;re.stopPropagation(),m(oe),(de=S.current)==null||de.go(oe)},onMouseEnter:()=>{var re;R.triggers==="hov"&&((re=S.current)==null||re.go(oe))},children:a.jsx("img",{src:ie.image.url,alt:ie.image.name??"",onLoad:re=>{const de=re.currentTarget;de.naturalWidth&&de.naturalHeight&&v(we=>({...we,[oe]:{width:de.naturalWidth,height:de.naturalHeight}}))},style:{objectFit:R.fit==="cover"?"cover":"contain",...R.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...R.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ie.image.name}-${oe}`)})})})})()]})]}),document.getElementById(s))};function $o({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const $s={element:Cs,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/lightboxImg.png"},defaultSize:{width:440,height:550},fontSettingsPaths:{content:[],parameters:[{path:"styles.imageCaption.fontSettings"}]},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.thumbnailBlock.cover.url",placeholderEnabled:!0},{path:"settings.controls.arrowsImgUrl"},{path:"settings.area.closeIconUrl"}]},schema:{type:"object",properties:{settings:{type:"object",properties:{thumbnailBlock:{display:{type:"settings-block",triggerEvent:"close"},type:"object",properties:{cover:{title:"COVER",icon:"cover",tooltip:"Cover Image",type:"object",properties:{url:{type:"string",display:{type:"cover-image-input"}}}}}},lightboxBlock:{display:{type:"settings-block",triggerEvent:"open"},type:"object",properties:{appear:{title:"APPEAR",icon:"transition",tooltip:"Appearance",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide in","fade in","mix"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]},direction:{type:"string",title:"From",display:{type:"direction-control"},enum:["top","left","right","bottom"]}}},triggers:{title:"TRIGGERS",icon:"target",tooltip:"Triggers",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["click","drag"]},switch:{type:"string",display:{type:"ratio-group"},enum:["image","50/50"]},repeat:{type:"string",title:"Repeat",display:{visible:!1,type:"ratio-group"},enum:["close","loop"]}}},slider:{title:"SLIDER",icon:"horizontal-resize",tooltip:"Slider",type:"object",properties:{type:{type:"string",display:{type:"ratio-group"},enum:["slide","fade","scale"]},direction:{type:"string",display:{type:"ratio-group"},enum:["horiz","vert"]},duration:{type:"string",label:"T",display:{type:"step-selector"},enum:["100ms","250ms","500ms","1000ms","1500ms","2000ms"]}}},thumbnail:{title:"THUMB",icon:"thumbnail",tooltip:"Thumbnail",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},fit:{type:"string",display:{type:"ratio-group"},enum:["cover","fit"]},align:{type:"string",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},triggers:{type:"string",title:"Triggers",display:{type:"ratio-group",direction:"horizontal"},enum:["clk","hov"]},grid:{type:"object",title:"Grid",display:{type:"group"},properties:{size:{type:"number",label:"Box",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},gap:{type:"number",label:"Gap",scalingEnabled:!0,min:0,display:{type:"numeric-input"}}}},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}},activeState:{type:"object",title:"ACTIVE",display:{type:"group"},properties:{scale:{type:"number",title:"Scale",min:1,max:5,step:.1,display:{type:"range-control"}},opacity:{type:"number",title:"Opacity",label:"icon:opacity",min:0,max:100,step:1,display:{type:"numeric-input"}}}}}},layout:{title:"LAYOUT",icon:"layout",tooltip:"Layout",type:"object",properties:{position:{display:{type:"align-grid"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},padding:{type:"object",title:"Padding",display:{type:"padding-controls"},properties:{top:{min:0,step:1,type:"number"},left:{min:0,step:1,type:"number"},right:{min:0,step:1,type:"number"},bottom:{min:0,step:1,type:"number"}}}}},controls:{title:"CONTROLS",icon:"controls",tooltip:"Controls",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},arrowsImgUrl:{type:["string","null"],display:{type:"settings-image-input"}},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},scale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},color:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},hover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},area:{title:"AREA",icon:"area",tooltip:"Area",type:"object",properties:{color:{type:"string",display:{type:"settings-color-picker",format:"single"}},blur:{type:"number",label:"icon:blur",display:{type:"numeric-input"}},closeIconUrl:{type:["string","null"],title:"Close Icon",display:{type:"settings-image-input"}},closeIconAlign:{display:{type:"align-grid",direction:"horizontal"},type:"string",enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},closeIconScale:{type:"number",title:"Scale",min:.5,max:5,step:.1,display:{type:"range-control"}},closeIconOffset:{type:"object",title:"Offset",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},closeIconColor:{title:"Color",type:"string",display:{type:"settings-color-picker",format:"single"}},closeIconHover:{title:"Hover",type:"string",display:{type:"settings-color-picker",format:"single"}}}},caption:{title:"DESC",icon:"text-icon",tooltip:"Description",type:"object",properties:{isActive:{type:"boolean",display:{type:"setting-toggle"}},alignment:{type:"string",display:{type:"align-grid"},enum:["top-left","top-center","top-right","middle-left","middle-center","middle-right","bottom-left","bottom-center","bottom-right"]},offset:{title:"Offset",type:"object",display:{type:"group"},properties:{x:{type:"number",label:"X",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}},y:{type:"number",label:"Y",scalingEnabled:!0,display:{type:"numeric-input",visible:!0}}}},linkColor:{title:"Link",type:"string",display:{type:"settings-color-picker",format:"single"}},linkHoverColor:{title:"Link Hov",type:"string",display:{type:"settings-color-picker",format:"single"}}}}}}},default:{d:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"slide in",duration:"1000ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.01,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:0,bottom:.06,left:0}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},linkColor:"#cccccc",linkHoverColor:"#cccccc"}}},m:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"horiz",duration:"1000ms"},thumbnail:{isActive:!0,position:"bottom-center",fit:"fit",align:"start",triggers:"hov",grid:{size:.1,gap:.05},offset:{x:.01,y:-.05},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.05,bottom:.06,left:.05}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}},t:{thumbnailBlock:{cover:{url:"https://cdn.cntrl.site/component-assets/Cover.jpg"}},lightboxBlock:{appear:{type:"fade in",duration:"500ms",direction:"bottom"},triggers:{type:"click",switch:"image",repeat:"loop"},slider:{type:"slide",direction:"vert",duration:"1000ms"},thumbnail:{isActive:!0,position:"middle-left",fit:"fit",align:"start",triggers:"hov",grid:{size:.05,gap:.01},offset:{x:.03,y:0},opacity:50,activeState:{scale:1,opacity:100}},layout:{position:"middle-center",offset:{x:0,y:0},padding:{top:.06,right:.1,bottom:.06,left:.1}},controls:{isActive:!1,arrowsImgUrl:null,offset:{x:0,y:0},scale:1,color:"#000000",hover:"#cccccc"},area:{color:"rgba(28,31,34,0.9)",blur:0,closeIconUrl:null,closeIconColor:"#000000",closeIconHover:"#cccccc",closeIconAlign:"top-right",closeIconOffset:{x:0,y:0},closeIconScale:1},caption:{isActive:!0,alignment:"middle-center",offset:{x:0,y:0},hover:"#cccccc"}}}},displayRules:[{if:{name:"lightboxBlock.appear.type",value:"slide in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.slider.direction",value:"vert"},then:{name:"properties.lightboxBlock.properties.thumbnail.properties.align.display.direction",value:"vertical"}},{if:{name:"lightboxBlock.appear.type",value:"mix"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!0}},{if:{name:"lightboxBlock.appear.type",value:"fade in"},then:{name:"properties.lightboxBlock.properties.appear.properties.direction.display.visible",value:!1}},{if:[{name:"lightboxBlock.triggers.type",value:"click"},{name:"lightboxBlock.triggers.switch",value:"image"}],then:{name:"properties.lightboxBlock.properties.triggers.properties.repeat.display.visible",value:!0}}]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},imageCaption:{label:"Description",placeholder:"Add Caption...",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/2.jpg",name:"Slider-1.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/3.jpg",name:"Slider-2.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/4.jpg",name:"Slider-3.png"},imageCaption:[{type:"paragraph",children:[{text:""}]}]}]},styles:{type:"object",properties:{imageCaption:{dataName:"caption",type:"object",properties:{fontSettings:{type:"object",display:{type:"font-settings"},properties:{fontFamily:{type:"string"},fontWeight:{type:"number"},fontStyle:{type:"string"}}},widthSettings:{display:{type:"text-width-control"},type:"object",properties:{width:{type:"number"},sizing:{type:"string",enum:["auto","manual"]}}},fontSizeLineHeight:{type:"object",display:{type:"font-size-line-height"},properties:{fontSize:{type:"number"},lineHeight:{type:"number"}}},letterSpacing:{display:{type:"letter-spacing-input"},type:"number"},wordSpacing:{display:{type:"word-spacing-input"},type:"number"},textAlign:{display:{type:"text-align-control"},type:"string",enum:["left","center","right","justify"]},textAppearance:{display:{type:"text-appearance"},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}},color:{display:{type:"style-panel-color-picker"},type:"string"}}}},default:{imageCaption:{widthSettings:{width:.13,sizing:"auto"},fontSettings:{fontFamily:"Arial",fontWeight:400,fontStyle:"normal"},fontSizeLineHeight:{fontSize:.02,lineHeight:.02},letterSpacing:0,wordSpacing:0,textAlign:"left",textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},color:"#000000"}}}},required:["settings","content","styles"]}};function Gt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ts(e){return`
|
|
7
7
|
.${e}-wrapper {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
position: relative;
|
|
140
140
|
height: auto;
|
|
141
141
|
}
|
|
142
|
-
`}function _s({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=
|
|
142
|
+
`}function _s({settings:e,isEditor:t,metadata:n,activeEvent:o}){const{prefix:r}=E.useScopedStyles(),{type:s="A",fieldsToShow:i=2,fields:u=[],buttonLabel:c,gap:m,fieldsGap:l,buttonCorners:I,buttonStroke:y,buttonPadding:f,isButtonFullWidth:p,inputCorners:d,inputStroke:$,inputPadding:v,inputColor:S,inputTextColor:k,inputBorderColor:O,placeholderColor:M,buttonColor:L,buttonTextColor:C,buttonBorderColor:T,labelTextColor:P,successColor:V,errorColor:W,fontFamily:H,inputFontSettings:N,inputFontSize:z,inputLineHeight:G,inputLetterSpacing:x,inputWordSpacing:R,inputTextAppearance:F,buttonFontSettings:h,buttonFontSize:g,buttonLineHeight:_,buttonLetterSpacing:q,buttonWordSpacing:ne,buttonTextAppearance:Z,labelFontSettings:ae,labelFontSize:A,labelLineHeight:Q,labelLetterSpacing:fe,labelWordSpacing:ue,labelTextAppearance:me,statusFontSettings:Y,statusFontSize:ge,statusLineHeight:j,statusLetterSpacing:w,statusWordSpacing:U,statusTextAppearance:J,successMessage:te,errorMessage:se,stateOverrides:ie}=e,oe=s==="B",pe=u.slice(0,Math.min(i,u.length)),B={fontSettings:{fontFamily:H,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:z??.01,lineHeight:G,letterSpacing:x??0,wordSpacing:R??0,textAppearance:F,color:k},X=ht(Re(B,t)),K=E.scalingValue($??0,t),le=E.scalingValue((G??z??.01)+((v==null?void 0:v.top)??0)+((v==null?void 0:v.bottom)??0)+(s==="C"?$??0:($??0)*2),t),re={...X,borderStyle:"solid",borderRadius:s==="C"?0:E.scalingValue(d??0,t),...s==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:K,borderLeftWidth:0}:{borderWidth:K},paddingTop:E.scalingValue((v==null?void 0:v.top)??0,t),paddingRight:E.scalingValue((v==null?void 0:v.right)??0,t),paddingBottom:E.scalingValue((v==null?void 0:v.bottom)??0,t),paddingLeft:E.scalingValue((v==null?void 0:v.left)??0,t),height:le,minHeight:le},de={fontSettings:{fontFamily:H,fontWeight:(h==null?void 0:h.fontWeight)??400,fontStyle:(h==null?void 0:h.fontStyle)??"normal"},fontSize:g??.01,lineHeight:_,letterSpacing:q??0,wordSpacing:ne??0,textAppearance:Z,color:C},we=ht(Re(de,t)),$e=E.scalingValue(y??0,t),lt={fontSettings:{fontFamily:H,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:A??.01,lineHeight:Q,letterSpacing:fe??0,wordSpacing:ue??0,textAppearance:me,color:P},Ye=Re(lt,t),xe={fontSettings:{fontFamily:H,fontWeight:(Y==null?void 0:Y.fontWeight)??400,fontStyle:(Y==null?void 0:Y.fontStyle)??"normal"},fontSize:ge??.01,lineHeight:j,letterSpacing:w??0,wordSpacing:U??0,textAppearance:J,color:V},Pe=ht(Re(xe,t)),nt=E.buildColorVars(r,{inputColor:S,inputTextColor:k,inputBorderColor:O,placeholderColor:M!=null&&M.trim()?M:"#cccccc",buttonColor:L,buttonTextColor:C,buttonBorderColor:T,labelTextColor:P,successColor:V,errorColor:W},Es,ks,ie),[Ce,je]=b.useState(()=>Object.fromEntries(pe.map(ye=>[ye.name,""]))),[eo,wt]=b.useState("idle"),[gr,Ot]=b.useState(null),vn=o==="success"?"success":o==="error"?"error":eo,fr=o==="error"?se:gr,Dt=o==="filled",$t=b.useMemo(()=>{if(!Dt)return Ce;let ye=null;for(const Ve of pe)(Ce[Ve.name]??"").trim().length>0||(ye=ye??{...Ce},ye[Ve.name]="Filled");return ye??Ce},[Ce,Dt,pe]),hr=vn==="error"?E.getFormFieldValidationError(pe,$t):null,yr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),to=n==null?void 0:n.submitUrl,no=(ye,Ve)=>{je(Be=>({...Be,[ye]:Ve}))},vr=async ye=>{ye.preventDefault();const Ve=Object.fromEntries(pe.map(Le=>{var ct;return[Le.name,((ct=Ce[Le.name])==null?void 0:ct.trim())??""]}).filter(([,Le])=>Le));if(!to){wt("error"),Ot("No integrations were found for this form.");return}if(Object.keys(Ve).length===0)return;const Be=E.getFormFieldValidationError(pe,Ce);if(Be){wt("error"),Ot(Be);return}wt("submitting"),Ot(null);try{const Le=await fetch(to,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ve)});if(!Le.ok){const ct=await Le.text();throw new Error(ct||`Request failed: ${Le.status}`)}wt("success"),je(Object.fromEntries(pe.map(ct=>[ct.name,""])))}catch(Le){wt("error"),Ot(Le instanceof Error?Le.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${r}-type-${s} ${yr}`.trim(),style:nt,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ts(r)}}),a.jsxs("form",{onSubmit:vr,className:`${r}-form`,style:{gap:E.scalingValue(m??0,t)},children:[a.jsx("div",{className:`${r}-fields`,style:{gap:E.scalingValue(l??0,t)},children:pe.map((ye,Ve)=>a.jsxs("div",{className:`${r}-field-group${oe?` ${r}-labeled`:""}`,children:[oe&&a.jsx("span",{className:`${r}-field-label`,style:Ye?{...Ye,lineHeight:Ye.fontSize}:void 0,children:ye.label||ye.name}),ye.type==="textarea"?a.jsx("textarea",{name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,className:`${r}-input`,style:re,rows:1,"data-filled":Dt||($t[ye.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:ye.type==="phone"?"tel":ye.type==="email"?"email":"text",name:ye.name,autoComplete:"off",value:$t[ye.name]??"",onChange:Be=>no(ye.name,Be.target.value),placeholder:ye.placeholder,required:ye.isRequired??ye.type==="email",className:`${r}-input`,style:re,"data-filled":Dt||($t[ye.name]??"").trim().length>0})]},Ve))}),a.jsx("div",{className:`${r}-overlay-anchor`,children:a.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(I??0,t),borderWidth:$e,paddingTop:E.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:E.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:E.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:E.scalingValue((f==null?void 0:f.left)??0,t),...we,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${r}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:eo==="submitting"?"...":c})})})]}),vn==="success"&&a.jsx("p",{className:`${r}-success`,style:{...Pe},children:te}),vn==="error"&&a.jsx("p",{className:`${r}-error`,style:{...Pe},role:"alert",children:hr??fr??se})]})}const Es={inputColor:"input-color",inputTextColor:"input-text-color",inputBorderColor:"input-border-color",placeholderColor:"placeholder-color",buttonColor:"button-color",buttonTextColor:"button-text-color",buttonBorderColor:"button-border-color",labelTextColor:"label-text-color",successColor:"success-color",errorColor:"error-color"},ks=["hover","focus","filled","success","error"],As=`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
|
-
`,Ls=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Yt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Is=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"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:Ls,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Is],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ms={element:_s,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Fs,sourceCode:As};function Xt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ps(e){return`
|
|
743
|
+
`,Ls=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Yt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Is=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Fs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"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:Ls,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Is],panelIds:["general","typeStyle"],stateItems:{default:["placeholderColor","inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor","labelTextColor"],hover:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],focus:["inputColor","inputBorderColor","buttonTextColor","buttonColor","buttonBorderColor"],filled:["inputTextColor","inputColor","inputBorderColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Ms={element:_s,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},defaultSize:{width:300,height:42},schema:Fs,sourceCode:As};function Kt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Ps(e){return`
|
|
744
744
|
.${e}-wrapper {
|
|
745
745
|
display: flex;
|
|
746
746
|
flex-direction: column;
|
|
@@ -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: ${Kt(8)};
|
|
926
|
+
font-size: ${Kt(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: ${Kt(8)};
|
|
931
|
+
font-size: ${Kt(14)};
|
|
932
932
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
933
933
|
}
|
|
934
|
-
`}const Rs=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=
|
|
934
|
+
`}const Rs=({settings:e,isEditor:t,metadata:n,activeEvent:o})=>{const{prefix:r}=E.useScopedStyles(),{fields:s=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:u,fieldsToShow:c=1,fontFamily:m,inputFontSettings:l,inputFontSize:I,inputLineHeight:y,inputLetterSpacing:f,inputWordSpacing:p,inputTextAppearance:d,buttonFontSettings:$,buttonFontSize:v,buttonLineHeight:S,buttonLetterSpacing:k,buttonWordSpacing:O,buttonTextAppearance:M,statusFontSettings:L,statusFontSize:C,statusLineHeight:T,statusLetterSpacing:P,statusWordSpacing:V,statusTextAppearance:W,iconMaxWidth:H,minHeight:N,corners:z,stroke:G,stateOverrides:x,inputPadding:R,buttonPadding:F,successMessage:h="Thanks for subscribing!",errorMessage:g="Please, fill all required fields."}=e,_=s.slice(0,Math.min(c,s.length)),[q,ne]=b.useState(()=>Object.fromEntries(_.map(xe=>[xe.name,""]))),[Z,ae]=b.useState("idle"),[A,Q]=b.useState(null),fe=o==="success"?"success":o==="error"?"error":Z,ue=o==="error"?g:A,me=o==="filled",Y=b.useMemo(()=>{if(!me)return q;let xe=null;for(const Pe of _)(q[Pe.name]??"").trim().length>0||(xe=xe??{...q},xe[Pe.name]="Filled");return xe??q},[me,q,_]),ge=fe==="error"?E.getFormFieldValidationError(_,Y):null,j=o&&o!=="default"?`${r}-state-${o}`:"",w=_.some(xe=>(Y[xe.name]??"").trim().length>0),U=j!==`${r}-state-filled`&&w?`${r}-state-filled`:"",J=`${j} ${U}`.trim(),te=n==null?void 0:n.submitUrl,se=u??"",ie=(i==null?void 0:i.icon)??"",oe=(i==null?void 0:i.mode)==="On",pe=se||"Submit",B={fontSettings:{fontFamily:m,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:I??.01,lineHeight:y,letterSpacing:f??0,wordSpacing:p??0,textAppearance:d,color:e.inputTextColor??"#111111"},X={fontSettings:{fontFamily:m,fontWeight:($==null?void 0:$.fontWeight)??400,fontStyle:($==null?void 0:$.fontStyle)??"normal"},fontSize:v??.01,lineHeight:S,letterSpacing:k??0,wordSpacing:O??0,textAppearance:M,color:e.buttonTextColor??"#ffffff"},K={fontSettings:{fontFamily:m,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:C??.01,lineHeight:T,letterSpacing:P??0,wordSpacing:V??0,textAppearance:W,color:e.successColor??"#22c55e"},le=ht(Re(B,t)),re=ht(Re(X,t)),de=ht(Re(K,t)),we=E.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(B==null?void 0:B.color)??"#111111",buttonTextColor:e.buttonTextColor??(X==null?void 0:X.color)??"#ffffff"},Ws,Hs,x),$e={borderRadius:E.scalingValue(z,t),borderWidth:E.scalingValue(G,t),borderStyle:"solid"},lt={borderLeftWidth:E.scalingValue(G,t)},Ye=async xe=>{xe.preventDefault();const Pe=Object.fromEntries(_.map(Ce=>{var je;return[Ce.name,((je=q[Ce.name])==null?void 0:je.trim())??""]}).filter(([,Ce])=>Ce));if(!te){ae("error"),Q("No integrations were found for this form.");return}if(Object.keys(Pe).length===0)return;const nt=E.getFormFieldValidationError(_,q);if(nt){ae("error"),Q(nt);return}ae("submitting"),Q(null);try{const Ce=await fetch(te,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Pe)});if(!Ce.ok){const je=await Ce.text();throw new Error(je||`Request failed: ${Ce.status}`)}ae("success"),ne(Object.fromEntries(_.map(je=>[je.name,""])))}catch(Ce){ae("error"),Q(Ce instanceof Error?Ce.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${J}`.trim(),style:we,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ps(r)}}),a.jsxs("form",{onSubmit:Ye,className:`${r}-form`,style:{...$e,height:E.scalingValue(N,t),minHeight:E.scalingValue(N,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:_.map(xe=>a.jsx("input",{type:xe.type==="email"?"email":xe.type==="phone"?"tel":"text",name:xe.name,autoComplete:"off",value:Y[xe.name]??"",onChange:Pe=>ne(nt=>({...nt,[xe.name]:Pe.target.value})),placeholder:xe.placeholder,required:xe.isRequired??xe.type==="email",className:`${r}-input`,style:{...le,paddingRight:E.scalingValue(R.right,t),paddingLeft:E.scalingValue(R.left,t),paddingTop:E.scalingValue(R.top,t),paddingBottom:E.scalingValue(R.bottom,t)}},xe.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":pe,style:{...re,...lt,paddingRight:E.scalingValue(F.right,t),paddingLeft:E.scalingValue(F.left,t),paddingTop:E.scalingValue(F.top,t),paddingBottom:E.scalingValue(F.bottom,t)},children:Z==="submitting"?"...":oe?ie&&a.jsx(Xe,{url:ie,className:`${r}-submitBtnIcon`,style:{maxWidth:E.scalingValue(H??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):se})})]}),fe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...de},children:h}),fe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...de},role:"alert",children:ge??ue??g})]})},Ws={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"},Hs=["hover","focus","filled","success","error"],Ns=`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,7 +1503,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
|
|
|
1503
1503
|
};
|
|
1504
1504
|
|
|
1505
1505
|
const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
1506
|
-
`,js="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Vs=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$n={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Os={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:Vs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:js},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...zs],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Bs={element:Rs,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:Os,sourceCode:Ns};function To(e){return`
|
|
1506
|
+
`,js="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Vs=[{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"}}}},Bs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],zs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonIcon:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},iconMaxWidth:{type:"number",scope:"common",title:"Icon Max Width",display:{type:"full-width-input"},min:0,max:1},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},buttonPadding:{type:"object",scope:"layout",title:"",display:{type:"padding-controls"}},minHeight:{type:"number",scope:"layout",title:"min Height",display:{type:"range-control"},min:0,max:200},corners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control"},min:0,max:100},stroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},strokeColor:{type:"string",scope:"common",title:"Stroke",display:{type:"palette-color-picker"}},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},stateOverrides:{type:"object",scope:"common"},inputFontSettings:{...$n.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$n.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$n.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Vs,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:js},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","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:[...Bs],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"]},Os={element:Rs,id:"oneliner-form",name:"Newsletter Single Line",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:zs,sourceCode:Ns};function To(e){return`
|
|
1507
1507
|
.${e}-marquee-wrapper {
|
|
1508
1508
|
overflow: hidden;
|
|
1509
1509
|
width: 100%;
|
|
@@ -1529,7 +1529,6 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1529
1529
|
transform: translateZ(0);
|
|
1530
1530
|
-webkit-backface-visibility: hidden;
|
|
1531
1531
|
-webkit-transform: translateZ(0);
|
|
1532
|
-
perspective: 1000px;
|
|
1533
1532
|
animation-duration: var(--marquee-duration);
|
|
1534
1533
|
animation-timing-function: linear;
|
|
1535
1534
|
animation-iteration-count: infinite;
|
|
@@ -1548,6 +1547,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1548
1547
|
display: flex;
|
|
1549
1548
|
flex-direction: row;
|
|
1550
1549
|
flex: 0 0 auto;
|
|
1550
|
+
align-items: center;
|
|
1551
1551
|
}
|
|
1552
1552
|
|
|
1553
1553
|
.${e}-wrapper {
|
|
@@ -1590,7 +1590,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
1590
1590
|
pointer-events: auto;
|
|
1591
1591
|
z-index: 10;
|
|
1592
1592
|
}
|
|
1593
|
-
`}const Ds=30,qs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=
|
|
1593
|
+
`}const Ds=30,qs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),{autoplay:s,speed:i,direction:u,pauseOnHover:c,gap:m,imageMaxWidth:l,imageMaxHeight:I}=e,y=s==="on"&&!o,f=y,p=Math.max(0,i)*Ds,d=h=>E.scalingValue(h,n??!1),$=b.useRef(null),v=b.useRef(null),S=b.useRef(null),[k,O]=b.useState(0),[M,L]=b.useState(0),[C,T]=b.useState(0),P=f&&c==="on",[V,W]=b.useState(!1),H=b.useRef(null),N=b.useRef(0);b.useLayoutEffect(()=>{N.current=M},[M]);const z=b.useMemo(()=>!y||(t==null?void 0:t.length)===0?1:M<=0||k<=0?2:Math.max(2,Math.ceil(k/M)+1),[y,t==null?void 0:t.length,M,k]);b.useLayoutEffect(()=>{if(!y)return;const h=$.current,g=S.current;if(!h||!g)return;let _=0;const q=()=>{const ae=h.getBoundingClientRect().width,A=g.getBoundingClientRect().width,Q=H.current,fe=typeof Q=="number"&&Math.abs(Q-A)<=.25;H.current=A;const ue=N.current;if(O(me=>me>0&&Math.abs(me-ae)<.5?me:ae),typeof A=="number"&&A>0&&ue<=0){L(A);return}fe&&Math.abs(A-ue)>.5?L(A):!fe&&ue<=0&&(cancelAnimationFrame(_),_=requestAnimationFrame(q))},ne=()=>{cancelAnimationFrame(_),_=requestAnimationFrame(q)};ne();const Z=new ResizeObserver(ne);return Z.observe(h),Z.observe(g),()=>{cancelAnimationFrame(_),Z.disconnect()}},[y]),b.useLayoutEffect(()=>{const h=v.current;if(!y||!h||!f)return;const g=M>0?M:0,_=g>0&&p>0?g/p*1e3:0,q=`${Math.max(0,_)/1e3}s`;h.style.setProperty("--marquee-distance",`${g}px`),h.style.setProperty("--marquee-duration",q)},[y,f,p,M]),b.useLayoutEffect(()=>{if(!y){T(0);return}const h=v.current;if(!h)return;const g=()=>{const q=h.getBoundingClientRect().height,ne=q>0?q:0;T(Z=>Z>0&&Math.abs(Z-ne)<.5?Z:ne)};g();const _=new ResizeObserver(g);return _.observe(h),()=>{_.disconnect()}},[y,z,t,n,m,l,I]);const G=()=>{P&&W(!0)},x=()=>{P&&W(!1)},R=(h,g)=>{var Z,ae,A,Q;const _=d(l),q=d(I),ne=((Z=h.image)==null?void 0:Z.objectFit)||"contain";return(ae=h.image)!=null&&ae.url?ne==="cover"?a.jsx("div",{style:{width:_,height:q,flexShrink:0,lineHeight:0},children:a.jsx("img",{src:h.image.url,alt:((A=h.image)==null?void 0:A.name)??"",style:{display:"block",pointerEvents:"auto",width:"100%",height:"100%",objectFit:"cover"}})},g):a.jsx("div",{style:{display:"flex",maxWidth:_,maxHeight:q,lineHeight:0,flexShrink:0},children:a.jsx("img",{src:h.image.url,alt:((Q=h.image)==null?void 0:Q.name)??"",style:{display:"block",pointerEvents:"auto",maxWidth:_,maxHeight:q,width:"auto",height:"auto"}})},g):a.jsx("div",{style:{width:_,height:q,flexShrink:0}},g)},F=(h,g)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[R(h,`card-${g}`),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${d(m)})`,width:d(m),height:"100%",pointerEvents:"auto",zIndex:2}})]},g);return y&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:$,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:{overflow:"hidden",width:"100%",...C>0?{height:C}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{ref:v,className:`${r}-marquee-track`,"data-direction":u,onMouseEnter:G,onMouseLeave:x,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",...P?{"--marquee-play-state":V?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:z},(h,g)=>a.jsx("div",{ref:g===0?S:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:d(m),paddingRight:d(m)},"aria-hidden":g>0,children:t==null?void 0:t.map((_,q)=>F(_,`${g}-${q}`))},`set-${g}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:To(r)}}),a.jsx("div",{style:{gap:d(m),justifyContent:"center",alignItems:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Marquee",children:t==null?void 0:t.map((h,g)=>F(h,g))})]})},Us=`import { useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
1594
1594
|
import cn from 'classnames';
|
|
1595
1595
|
import { CommonComponentProps } from '../props';
|
|
1596
1596
|
import { scalingValue } from '../utils/scalingValue';
|
|
@@ -1623,7 +1623,6 @@ function getCSS(P: string): string {
|
|
|
1623
1623
|
transform: translateZ(0);
|
|
1624
1624
|
-webkit-backface-visibility: hidden;
|
|
1625
1625
|
-webkit-transform: translateZ(0);
|
|
1626
|
-
perspective: 1000px;
|
|
1627
1626
|
animation-duration: var(--marquee-duration);
|
|
1628
1627
|
animation-timing-function: linear;
|
|
1629
1628
|
animation-iteration-count: infinite;
|
|
@@ -1642,6 +1641,7 @@ function getCSS(P: string): string {
|
|
|
1642
1641
|
display: flex;
|
|
1643
1642
|
flex-direction: row;
|
|
1644
1643
|
flex: 0 0 auto;
|
|
1644
|
+
align-items: center;
|
|
1645
1645
|
}
|
|
1646
1646
|
|
|
1647
1647
|
.\${P}-wrapper {
|
|
@@ -1712,6 +1712,11 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1712
1712
|
const hoverPauseEnabled = isAnimating && pauseOnHover === 'on';
|
|
1713
1713
|
const [isHovering, setIsHovering] = useState(false);
|
|
1714
1714
|
const stableCandidateRef = useRef<number | null>(null);
|
|
1715
|
+
const setWidthRef = useRef(0);
|
|
1716
|
+
|
|
1717
|
+
useLayoutEffect(() => {
|
|
1718
|
+
setWidthRef.current = setWidth;
|
|
1719
|
+
}, [setWidth]);
|
|
1715
1720
|
|
|
1716
1721
|
const copies = useMemo(() => {
|
|
1717
1722
|
if (!autoplayEnabled || content?.length === 0) return 1;
|
|
@@ -1731,14 +1736,17 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1731
1736
|
const prevCandidate = stableCandidateRef.current;
|
|
1732
1737
|
const isStableNow = typeof prevCandidate === 'number' && Math.abs(prevCandidate - nextRawSetWidth) <= 0.25;
|
|
1733
1738
|
stableCandidateRef.current = nextRawSetWidth;
|
|
1734
|
-
|
|
1735
|
-
|
|
1739
|
+
const sw = setWidthRef.current;
|
|
1740
|
+
setContainerWidth((prev) =>
|
|
1741
|
+
prev > 0 && Math.abs(prev - nextContainerWidth) < 0.5 ? prev : nextContainerWidth
|
|
1742
|
+
);
|
|
1743
|
+
if (typeof nextRawSetWidth === 'number' && nextRawSetWidth > 0 && sw <= 0) {
|
|
1736
1744
|
setSetWidth(nextRawSetWidth);
|
|
1737
1745
|
return;
|
|
1738
1746
|
}
|
|
1739
|
-
if (isStableNow && nextRawSetWidth
|
|
1747
|
+
if (isStableNow && Math.abs(nextRawSetWidth - sw) > 0.5) {
|
|
1740
1748
|
setSetWidth(nextRawSetWidth);
|
|
1741
|
-
} else if (!isStableNow &&
|
|
1749
|
+
} else if (!isStableNow && sw <= 0) {
|
|
1742
1750
|
cancelAnimationFrame(raf);
|
|
1743
1751
|
raf = requestAnimationFrame(measure);
|
|
1744
1752
|
}
|
|
@@ -1755,7 +1763,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1755
1763
|
cancelAnimationFrame(raf);
|
|
1756
1764
|
ro.disconnect();
|
|
1757
1765
|
};
|
|
1758
|
-
}, [autoplayEnabled
|
|
1766
|
+
}, [autoplayEnabled]);
|
|
1759
1767
|
|
|
1760
1768
|
useLayoutEffect(() => {
|
|
1761
1769
|
const track = trackRef.current;
|
|
@@ -1776,7 +1784,8 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1776
1784
|
if (!track) return;
|
|
1777
1785
|
const measure = () => {
|
|
1778
1786
|
const next = track.getBoundingClientRect().height;
|
|
1779
|
-
|
|
1787
|
+
const useH = next > 0 ? next : 0;
|
|
1788
|
+
setTrackHeight((prev) => (prev > 0 && Math.abs(prev - useH) < 0.5 ? prev : useH));
|
|
1780
1789
|
};
|
|
1781
1790
|
measure();
|
|
1782
1791
|
const ro = new ResizeObserver(measure);
|
|
@@ -1795,22 +1804,59 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1795
1804
|
setIsHovering(false);
|
|
1796
1805
|
};
|
|
1797
1806
|
|
|
1798
|
-
const renderCard = (item: MarqueeItem, key: string | number) =>
|
|
1799
|
-
|
|
1800
|
-
|
|
1807
|
+
const renderCard = (item: MarqueeItem, key: string | number) => {
|
|
1808
|
+
const maxW = scaled(imageMaxWidth);
|
|
1809
|
+
const maxH = scaled(imageMaxHeight);
|
|
1810
|
+
const objectFit = item.image?.objectFit || 'contain';
|
|
1811
|
+
|
|
1812
|
+
if (!item.image?.url) {
|
|
1813
|
+
return <div key={key} style={{ width: maxW, height: maxH, flexShrink: 0 }} />;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
if (objectFit === 'cover') {
|
|
1817
|
+
return (
|
|
1818
|
+
<div key={key} style={{ width: maxW, height: maxH, flexShrink: 0, lineHeight: 0 }}>
|
|
1819
|
+
<img
|
|
1820
|
+
src={item.image.url}
|
|
1821
|
+
alt={item.image?.name ?? ''}
|
|
1822
|
+
style={{
|
|
1823
|
+
display: 'block',
|
|
1824
|
+
pointerEvents: 'auto',
|
|
1825
|
+
width: '100%',
|
|
1826
|
+
height: '100%',
|
|
1827
|
+
objectFit: 'cover',
|
|
1828
|
+
}}
|
|
1829
|
+
/>
|
|
1830
|
+
</div>
|
|
1831
|
+
);
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
return (
|
|
1835
|
+
<div
|
|
1836
|
+
key={key}
|
|
1837
|
+
style={{
|
|
1838
|
+
display: 'flex',
|
|
1839
|
+
maxWidth: maxW,
|
|
1840
|
+
maxHeight: maxH,
|
|
1841
|
+
lineHeight: 0,
|
|
1842
|
+
flexShrink: 0,
|
|
1843
|
+
}}
|
|
1844
|
+
>
|
|
1801
1845
|
<img
|
|
1802
1846
|
src={item.image.url}
|
|
1803
1847
|
alt={item.image?.name ?? ''}
|
|
1804
1848
|
style={{
|
|
1849
|
+
display: 'block',
|
|
1805
1850
|
pointerEvents: 'auto',
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1851
|
+
maxWidth: maxW,
|
|
1852
|
+
maxHeight: maxH,
|
|
1853
|
+
width: 'auto',
|
|
1854
|
+
height: 'auto',
|
|
1809
1855
|
}}
|
|
1810
1856
|
/>
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1857
|
+
</div>
|
|
1858
|
+
);
|
|
1859
|
+
};
|
|
1814
1860
|
|
|
1815
1861
|
const renderCardWrapper = (item: MarqueeItem, key: string | number) => (
|
|
1816
1862
|
<div
|
|
@@ -1818,11 +1864,6 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1818
1864
|
style={{
|
|
1819
1865
|
position: 'relative',
|
|
1820
1866
|
flex: '0 0 auto',
|
|
1821
|
-
height: '100%',
|
|
1822
|
-
transform: 'translateZ(0)',
|
|
1823
|
-
backfaceVisibility: 'hidden',
|
|
1824
|
-
WebkitBackfaceVisibility: 'hidden',
|
|
1825
|
-
willChange: 'transform',
|
|
1826
1867
|
}}
|
|
1827
1868
|
>
|
|
1828
1869
|
{renderCard(item, \`card-\${key}\`)}
|
|
@@ -1873,7 +1914,6 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1873
1914
|
WebkitBackfaceVisibility: 'hidden',
|
|
1874
1915
|
transform: 'translateZ(0)',
|
|
1875
1916
|
WebkitTransform: 'translateZ(0)',
|
|
1876
|
-
perspective: '1000px',
|
|
1877
1917
|
...(hoverPauseEnabled
|
|
1878
1918
|
? ({ '--marquee-play-state': isHovering ? 'paused' : 'running' } as React.CSSProperties)
|
|
1879
1919
|
: ({ '--marquee-play-state': 'running' } as React.CSSProperties)),
|
|
@@ -1910,6 +1950,7 @@ export const Marquee = ({ settings, content, isEditor, isPreviewMode }: MarqueeP
|
|
|
1910
1950
|
style={{
|
|
1911
1951
|
gap: scaled(gap),
|
|
1912
1952
|
justifyContent: 'center',
|
|
1953
|
+
alignItems: 'center',
|
|
1913
1954
|
overflowX: 'auto',
|
|
1914
1955
|
display: 'flex',
|
|
1915
1956
|
flexDirection: 'row',
|
|
@@ -1941,7 +1982,7 @@ export type MarqueeSettings = {
|
|
|
1941
1982
|
imageMaxWidth: number;
|
|
1942
1983
|
imageMaxHeight: number;
|
|
1943
1984
|
};
|
|
1944
|
-
`,Gs={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"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:0,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:0,max:400,display:{type:"range-control"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.
|
|
1985
|
+
`,Gs={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"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:0,max:400,display:{type:"range-control"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:0,max:400,display:{type:"range-control"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off"},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.21},d:{speed:1.64,gap:.02,imageMaxWidth:.15,imageMaxHeight:.1}},displayRules:[],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","imageMaxWidth","imageMaxHeight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["imageMaxWidth","speed"]},{type:"row",items:["imageMaxHeight","pauseOnHover"]},{type:"row",items:["direction"]}]}],paletteBookmark:{items:[],panelIds:["general"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}}}},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZNCQFC3T744H0KX6R3FR.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7RZRTSS60YBFT6Y37ZX00T.jpeg",name:""}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ9M9YJPQ5JWKCHDEW5M1GJD.jpeg",name:""}},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S04EHBXQS1T4KVAMZNZQM.jpeg",name:""}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01KM5KBNFNRT3D0JP64K5EY92A/articles-assets/01KQ7S08Q40WHD39024VNDWF2Q.jpeg",name:""}}]}},Ys={element:qs,id:"marquee",name:"Marquee",category:"galleries",version:1,defaultSize:{width:"100%",height:200},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/marquee.png"},schema:Gs,sourceCode:Us,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function _o(e){return`
|
|
1945
1986
|
.${e}-marquee-wrapper {
|
|
1946
1987
|
overflow: hidden;
|
|
1947
1988
|
width: 100%;
|
|
@@ -2028,7 +2069,7 @@ export type MarqueeSettings = {
|
|
|
2028
2069
|
pointer-events: auto;
|
|
2029
2070
|
z-index: 10;
|
|
2030
2071
|
}
|
|
2031
|
-
`}const
|
|
2072
|
+
`}const Ks=30,Xs=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),{autoplay:s,align:i,speed:u,direction:c,pauseOnHover:m,gap:l,cardWidth:I,corners:y,stroke:f,strokeColor:p,bgColor:d,padding:$,logoMarginTop:v,logoWidth:S,logoHeight:k,captionMarginTop:O}=e,M=s==="on"&&!o,L=M,C=Math.max(0,u)*Ks,T=B=>E.scalingValue(B,n??!1),P=b.useRef(null),V=b.useRef(null),W=b.useRef(null),[H,N]=b.useState(0),[z,G]=b.useState(0),[x,R]=b.useState(0),F=L&&m==="on",[h,g]=b.useState(!1),_=b.useRef(null),[q,ne]=b.useState(0),[Z,ae]=b.useState(0),A=b.useRef(null),Q=B=>{var K,le,re,de,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${B}FontFamily`])??"Arial",fontWeight:((K=e==null?void 0:e[`${B}FontSettings`])==null?void 0:K.fontWeight)??400,fontStyle:((le=e==null?void 0:e[`${B}FontSettings`])==null?void 0:le.fontStyle)??"normal"},textAppearance:{textTransform:((re=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:re.textTransform)??"none",textDecoration:((de=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:de.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${B}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${B}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${B}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${B}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${B}LineHeight`])??.01,color:(e==null?void 0:e[`${B}Color`])??"#000000"}},fe=Q("text"),ue=Q("caption"),me=b.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(B=>{var X,K;return(((X=B.text)==null?void 0:X.length)??0)>0||(((K=B.caption)==null?void 0:K.length)??0)>0}),[t]),Y=b.useMemo(()=>!M||(t==null?void 0:t.length)===0?1:z<=0||H<=0?2:Math.max(2,Math.ceil(H/z)+1),[M,t==null?void 0:t.length,z,H]);b.useLayoutEffect(()=>{if(!M)return;const B=P.current,X=W.current;if(!B||!X)return;let K=0;const le=()=>{const we=B.getBoundingClientRect().width,$e=X.getBoundingClientRect().width,lt=A.current,Ye=typeof lt=="number"&&Math.abs(lt-$e)<=.25;if(A.current=$e,N(we),typeof $e=="number"&&$e>0&&z<=0){G($e);return}Ye&&$e!==z?G($e):!Ye&&z<=0&&(cancelAnimationFrame(K),K=requestAnimationFrame(le))},re=()=>{cancelAnimationFrame(K),K=requestAnimationFrame(le)};re();const de=new ResizeObserver(re);return de.observe(B),de.observe(X),()=>{cancelAnimationFrame(K),de.disconnect()}},[M,z]),b.useLayoutEffect(()=>{const B=V.current;if(!M||!B||!L)return;const X=z>0?z:0,K=X>0&&C>0?X/C*1e3:0,le=`${Math.max(0,K)/1e3}s`;B.style.setProperty("--marquee-distance",`${X}px`),B.style.setProperty("--marquee-duration",le)},[M,L,C,z]),b.useLayoutEffect(()=>{if(!M){R(0);return}const B=V.current;if(!B)return;const X=()=>{const le=B.getBoundingClientRect().height;R(le>0?le:0)};X();const K=new ResizeObserver(X);return K.observe(B),()=>{K.disconnect()}},[M,Y,t,n,l,I,$,f,y,S,k]);const ge=()=>{F&&g(!0)},j=()=>{F&&g(!1)},w=b.useMemo(()=>{switch(i){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[i]),U=b.useMemo(()=>{switch(i){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[i]),J=b.useCallback((B,X,K,le)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[a.jsx("div",{"data-controls":le==null?void 0:le.controlsName,"data-controls-axis":"y",className:`${r}-control`,style:{height:T((le==null?void 0:le.marginTop)??0)}}),a.jsx("div",{...le!=null&&le.dataMeasureKind?{"data-testimonial-measure":le.dataMeasureKind}:{},style:{...Re(B,n),textAlign:U,pointerEvents:"auto",...typeof(le==null?void 0:le.minHeightPx)=="number"&&le.minHeightPx>0?{minHeight:le.minHeightPx}:{}},children:a.jsx(Pt,{content:X})})]},K),[w,U,n]),te=b.useCallback((B,X,K)=>{var le,re,de;return a.jsxs("div",{style:{padding:`${T($.top)} ${T($.right)} ${T($.bottom)} ${T($.left)}`,width:T(I+f*2),height:"100%",borderRadius:T(y),border:`${T(f)} solid ${p}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:d}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:w,textAlign:U},children:[B.text&&J(fe,B.text,"text",K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(K==null?void 0:K.textMinHeightPx)=="number"&&K.textMinHeightPx>0?{minHeightPx:K.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:w,width:"100%"},children:[a.jsx("div",{"data-controls":"logoMarginTop",className:`${r}-control`,style:{height:T(v)}}),a.jsx("div",{style:{width:T(S),height:T(k)},children:((le=B.logo)==null?void 0:le.url)&&a.jsx("img",{src:B.logo.url,alt:((re=B.logo)==null?void 0:re.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((de=B.logo)==null?void 0:de.objectFit)||"contain"}})})]}),B.caption&&J(ue,B.caption,"caption",{controlsName:"captionMarginTop",marginTop:O,...K!=null&&K.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(K==null?void 0:K.captionMinHeightPx)=="number"&&K.captionMinHeightPx>0?{minHeightPx:K.captionMinHeightPx}:{}})]})]},X)},[d,O,ue,I,y,k,v,S,w,U,$.bottom,$.left,$.right,$.top,J,f,p,fe,n]),se=b.useCallback(B=>{ne(B.maxTextPx),ae(B.maxCaptionPx)},[]);b.useLayoutEffect(()=>{if(!me){se({maxTextPx:0,maxCaptionPx:0});return}const B=_.current;if(!B)return;const X=()=>{E.readTestimonialTextMeasure(B,se)};X();const K=new ResizeObserver(X);return K.observe(B),()=>{K.disconnect()}},[me,se,t,te]);const ie=me?{textMinHeightPx:q,captionMinHeightPx:Z}:void 0,oe=me?a.jsx("div",{ref:_,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((B,X)=>te(B,`measure-${X}`,{dataMeasureAttrs:!0}))}):null,pe=(B,X)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[te(B,`card-${X}`,ie),n&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${T(l)})`,width:T(l),height:"100%",pointerEvents:"auto",zIndex:2}})]},X);return M&&((t==null?void 0:t.length)??0)>0?a.jsxs("div",{ref:P,className:he(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...x>0?{height:x}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),oe,a.jsx("div",{ref:V,className:`${r}-marquee-track`,"data-direction":c,onMouseEnter:ge,onMouseLeave:j,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",...F?{"--marquee-play-state":h?"paused":"running"}:{"--marquee-play-state":"running"}},children:Array.from({length:Y},(B,X)=>a.jsx("div",{ref:X===0?W:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:T(l),paddingRight:T(l)},"aria-hidden":X>0,children:t==null?void 0:t.map((K,le)=>pe(K,`${X}-${le}`))},`set-${X}`))})]}):a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_o(r)}}),oe,a.jsx("div",{style:{gap:T(l),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((B,X)=>pe(B,X))})]})},Zs=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2032
2073
|
import cn from 'classnames';
|
|
2033
2074
|
import { CommonComponentProps } from '../props';
|
|
2034
2075
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -2624,7 +2665,7 @@ type TestimonialsSettings = {
|
|
|
2624
2665
|
logoHeight: number;
|
|
2625
2666
|
captionMarginTop: number;
|
|
2626
2667
|
};
|
|
2627
|
-
`,Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Js={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:{...Eo.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:{...Eo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Qs={element:
|
|
2668
|
+
`,Eo={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Js={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:{...Eo.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:{...Eo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{autoplay:"on",direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","autoplay","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",items:["align","direction"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners","stroke"]},{type:"group",title:"",items:["padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Qs={element:Xs,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/testimonials.png"},defaultSize:{width:"100%",height:320},schema:Js,sourceCode:Zs,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function el(e){return`
|
|
2628
2669
|
.${e}-container {
|
|
2629
2670
|
position: relative;
|
|
2630
2671
|
overflow-x: clip;
|
|
@@ -2748,7 +2789,7 @@ type TestimonialsSettings = {
|
|
|
2748
2789
|
width: 100%;
|
|
2749
2790
|
height: 100%;
|
|
2750
2791
|
}
|
|
2751
|
-
`}const tl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=
|
|
2792
|
+
`}const tl=({settings:e,content:t,isEditor:n,isPreviewMode:o})=>{const{prefix:r}=E.useScopedStyles(),s=t||[],{autoplay:i,delay:u,align:c,width:m,imageMarginTop:l,textMarginTop:I,captionMarginTop:y,imageWidth:f,imageHeight:p,controlsWidth:d,controlsColor:$,controlsHoverColor:v}=e,S=i==="on"&&!o,[k,O]=b.useState(0),[M,L]=b.useState(null),[C,T]=b.useState(!1),P=b.useRef(null),V=b.useMemo(()=>{switch(c){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[c]),W=b.useMemo(()=>{switch(c){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[c]);b.useEffect(()=>{O(0),L(null),T(!1)},[s.length]);const H=s[k],N=M===null?null:s[M],z=Y=>{var j,w,U,J,te;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Y}FontFamily`])??"Arial",fontWeight:((j=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:j.fontWeight)??400,fontStyle:((w=e==null?void 0:e[`${Y}FontSettings`])==null?void 0:w.fontStyle)??"normal"},textAppearance:{textTransform:((U=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:U.textTransform)??"none",textDecoration:((J=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:J.textDecoration)??"none",fontVariant:((te=e==null?void 0:e[`${Y}TextAppearance`])==null?void 0:te.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Y}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Y}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Y}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Y}WordSpacing`])??0,color:(e==null?void 0:e[`${Y}Color`])??"#000000"}},G=z("text"),x=z("caption"),R=s.length>1&&s.some(Y=>{var ge,j;return(((ge=Y.text)==null?void 0:ge.length)??0)>0||(((j=Y.caption)==null?void 0:j.length)??0)>0}),F=b.useRef(null),[h,g]=b.useState(0),[_,q]=b.useState(0),ne=e.controls??{mode:"Off",icon:null},Z=s.length>1,ae=b.useCallback((Y,ge)=>!Z||ge===Y?Y:(P.current&&window.clearTimeout(P.current),L(Y),T(!0),P.current=window.setTimeout(()=>{L(null),T(!1),P.current=null},300),ge),[Z]),A=b.useCallback(()=>{Z&&O(Y=>ae(Y,(Y-1+s.length)%s.length))},[Z,ae,s.length]),Q=b.useCallback(()=>{Z&&O(Y=>ae(Y,(Y+1)%s.length))},[Z,ae,s.length]);b.useEffect(()=>{if(!S||!Z)return;const Y=Math.max(300,Number.isFinite(u*1e3)?u*1e3:0),ge=window.setInterval(()=>{O(j=>ae(j,(j+1)%s.length))},Y);return()=>{window.clearInterval(ge)}},[S,Z,ae,s.length,u]),b.useEffect(()=>()=>{P.current&&window.clearTimeout(P.current)},[]);const fe=(Y,ge)=>{var J,te,se,ie;const j=ge==null?void 0:ge.textMinHeightPx,w=ge==null?void 0:ge.captionMinHeightPx,U=ge==null?void 0:ge.dataMeasureAttrs;return a.jsxs(a.Fragment,{children:[Y.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[a.jsx("div",{"data-controls":"textMarginTop",className:`${r}-control`,style:{height:E.scalingValue(I??0,n??!1)}}),a.jsx("div",{...U&&{"data-testimonial-measure":"text"},style:{...Re(G,n),...j&&j>0?{minHeight:j}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(Pt,{content:Y.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[a.jsx("div",{"data-controls":"imageMarginTop",className:`${r}-control`,style:{height:E.scalingValue(l??0,n??!1)}}),a.jsx("div",{style:{width:E.scalingValue(f??0,n??!1),height:E.scalingValue(p??0,n??!1)},children:((J=Y.image)==null?void 0:J.url)&&a.jsx("img",{src:(te=Y.image)==null?void 0:te.url,alt:((se=Y.image)==null?void 0:se.name)??"",className:`${r}-icon`,style:{objectFit:((ie=Y.image)==null?void 0:ie.objectFit)||"contain"}})})]}),Y.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:V,width:"100%"},children:[a.jsx("div",{"data-controls":"captionMarginTop",className:`${r}-control`,style:{height:E.scalingValue(y??0,n??!1)}}),a.jsx("div",{...U?{"data-testimonial-measure":"caption"}:{},style:{...Re(x,n),...w&&w>0?{minHeight:w}:{},textAlign:W,pointerEvents:"auto"},children:a.jsx(Pt,{content:Y.caption})})]})]})},ue=b.useCallback(Y=>{g(Y.maxTextPx),q(Y.maxCaptionPx)},[]);if(b.useLayoutEffect(()=>{if(!R){ue({maxTextPx:0,maxCaptionPx:0});return}const Y=F.current;if(!Y)return;const ge=()=>{E.readTestimonialTextMeasure(Y,ue)};ge();const j=new ResizeObserver(ge);return j.observe(Y),()=>{j.disconnect()}},[R,ue,t]),!H)return a.jsx(a.Fragment,{});const me=R?{textMinHeightPx:h,captionMinHeightPx:_}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:el(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:E.scalingValue(m??0,n??!1),alignItems:V},children:[R&&a.jsx("div",{ref:F,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:s.map((Y,ge)=>a.jsx("div",{style:{width:"100%"},children:fe(Y,{dataMeasureAttrs:!0})},ge))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[N&&C&&a.jsx("div",{className:he(`${r}-fade-item-prev`,`${r}-fade-out`),children:fe(N,me)}),a.jsx("div",{className:he(`${r}-fade-item-current`,C?`${r}-fade-in`:void 0),children:fe(H,me)})]})]}),ne.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:E.scalingValue(d??.02,n??!1),height:E.scalingValue(d??.02,n??!1),"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:A,disabled:!Z,"aria-label":"Previous testimonial",children:ne.icon&&a.jsx(Xe,{url:ne.icon,fill:$,hoverFill:v,className:he(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:he(`${r}-arrow`,`${r}-next-arrow`),style:{width:E.scalingValue(d??.02,n??!1),height:E.scalingValue(d??.02,n??!1),"--arrow-hover-color":v},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:Q,disabled:!Z,"aria-label":"Next testimonial",children:ne.icon&&a.jsx(Xe,{url:ne.icon,fill:$,hoverFill:v,className:`${r}-arrow-img`})})})]})]})})},nl=`import cn from 'classnames';
|
|
2752
2793
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
2753
2794
|
import { CommonComponentProps } from '../props';
|
|
2754
2795
|
import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
|
|
@@ -3240,4 +3281,4 @@ type TestimonialsSettings = {
|
|
|
3240
3281
|
icon?: string | null;
|
|
3241
3282
|
};
|
|
3242
3283
|
};
|
|
3243
|
-
`,ol="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>'),ko={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},rl={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},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:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"on",controls:{mode:"On",icon:ol},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Charter",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},il={element:tl,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:rl,sourceCode:nl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},al=[Aa,Wa,$s,Ms,
|
|
3284
|
+
`,ol="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>'),ko={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},rl={type:"object",version:1,settings:{sizing:"auto manual",properties:{autoplay:{type:"string",scope:"common",title:"Autoplay",display:{type:"switch-control"},enum:["on","off"]},delay:{type:"number",scope:"layout",title:"Delay(s)",display:{type:"step-control"},step:1,min:1,max:8},align:{type:"string",scope:"common",title:"Align",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"range-control"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"range-control"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"range-control"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:100,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:100,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"range-control"}},controlsColor:{type:"string",scope:"common",title:"Controls Color",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},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:{...ko.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"}},defaults:{autoplay:"on",controls:{mode:"On",icon:ol},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Charter",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{delay:3,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{delay:3,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},displayRules:[{if:{name:"autoplay",value:"off"},then:{name:"properties.delay.display.enabled",value:!1}}],layout:["__componentName__","autoplay","delay","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","autoplay"]},{type:"row",items:["controls",{type:"group",title:"",items:["delay","width"]}]},{type:"row",items:["controlsWidth","align"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},il={element:tl,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:rl,sourceCode:nl,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}},al=[Aa,Wa,$s,Ms,Os,Ys,Qs,il];exports.components=al;exports.isSchemaV1=xr;
|