@cntrl-site/components 1.0.7-0 → 1.0.7-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,145 +1,145 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),z=require("react"),ft=require("classnames"),E=require("./useScopedStyles-DpVdqfXj.js"),Ln=require("react-dom");function bo(t){return t.type==="object"&&t.version===1}const vo="ControlSlider-module__wrapper___sHEkd",So="ControlSlider-module__hoverArrow___A-dOH",xo="ControlSlider-module__sliderItem___QQSkR",Co="ControlSlider-module__sliderImage___9hRl-",$o="ControlSlider-module__arrow___05ghY",wo="ControlSlider-module__arrowVertical___tBfVN",_o="ControlSlider-module__nextArrow___-30Yc",To="ControlSlider-module__arrowInner___aEra3",Lo="ControlSlider-module__arrowIcon___S4ztF",Eo="ControlSlider-module__arrowImg___2dwJW",Ao="ControlSlider-module__mirror___brd6U",Io="ControlSlider-module__pagination___bicLF",Fo="ControlSlider-module__paginationInner___bT-P-",ko="ControlSlider-module__paginationVertical___zYqKw",Ro="ControlSlider-module__paginationItem___nTRbk",Oo="ControlSlider-module__dot___p1Qun",Po="ControlSlider-module__activeDot___LHFaj",Bo="ControlSlider-module__paginationInsideBottom___R3FWn",Wo="ControlSlider-module__paginationInsideTop___V-qb-",zo="ControlSlider-module__paginationOutsideBottom___14w8D",Vo="ControlSlider-module__paginationOutsideTop___SCLqB",No="ControlSlider-module__paginationInsideLeft___yOBRZ",jo="ControlSlider-module__paginationInsideRight___Rtt3o",Mo="ControlSlider-module__paginationOutsideLeft___lahaw",Ho="ControlSlider-module__paginationOutsideRight___EtuQa",Do="ControlSlider-module__imgWrapper___UjEgB",Go="ControlSlider-module__captionBlock___dJ6-j",Uo="ControlSlider-module__captionTextWrapper___HFlpf",Xo="ControlSlider-module__captionText___uGBVc",qo="ControlSlider-module__active___WZK4G",Yo="ControlSlider-module__withPointerEvents___t-18M",Ko="ControlSlider-module__topLeftAlignment___zjnGM",Jo="ControlSlider-module__topCenterAlignment___gD1xW",Zo="ControlSlider-module__topRightAlignment___NMapS",Qo="ControlSlider-module__middleLeftAlignment___OnUrY",ti="ControlSlider-module__middleCenterAlignment___Tdkl0",ei="ControlSlider-module__middleRightAlignment___wEbfX",ri="ControlSlider-module__bottomLeftAlignment___cTP2-",ni="ControlSlider-module__bottomCenterAlignment___c54fB",oi="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",U={wrapper:vo,hoverArrow:So,sliderItem:xo,sliderImage:Co,arrow:$o,arrowVertical:wo,nextArrow:_o,arrowInner:To,arrowIcon:Lo,arrowImg:Eo,mirror:Ao,pagination:Io,paginationInner:Fo,paginationVertical:ko,paginationItem:Ro,dot:Oo,activeDot:Po,paginationInsideBottom:Bo,paginationInsideTop:Wo,paginationOutsideBottom:zo,paginationOutsideTop:Vo,paginationInsideLeft:No,paginationInsideRight:jo,paginationOutsideLeft:Mo,paginationOutsideRight:Ho,imgWrapper:Do,captionBlock:Go,captionTextWrapper:Uo,captionText:Xo,active:qo,withPointerEvents:Yo,topLeftAlignment:Ko,topCenterAlignment:Jo,topRightAlignment:Zo,middleLeftAlignment:Qo,middleCenterAlignment:ti,middleRightAlignment:ei,bottomLeftAlignment:ri,bottomCenterAlignment:ni,bottomRightAlignment:oi,clickOverlay:ii,contain:ai,cover:li};function si(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ci(t,e,r){return e&&si(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var on="(prefers-reduced-motion: reduce)",ge=1,ui=2,ye=3,Se=4,Pe=5,Ke=6,tr=7,pi={CREATED:ge,MOUNTED:ui,IDLE:ye,MOVING:Se,SCROLLING:Pe,DRAGGING:Ke,DESTROYED:tr};function Gt(t){t.length=0}function Qt(t,e,r){return Array.prototype.slice.call(t,e,r)}function gt(t){return t.bind.apply(t,[null].concat(Qt(arguments,1)))}var En=setTimeout,wr=function(){};function an(t){return requestAnimationFrame(t)}function ir(t,e){return typeof e===t}function Ee(t){return!Or(t)&&ir("object",t)}var Rr=Array.isArray,An=gt(ir,"function"),Jt=gt(ir,"string"),Be=gt(ir,"undefined");function Or(t){return t===null}function In(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function We(t){return Rr(t)?t:[t]}function Lt(t,e){We(t).forEach(e)}function Pr(t,e){return t.indexOf(e)>-1}function Je(t,e){return t.push.apply(t,We(e)),t}function jt(t,e,r){t&&Lt(e,function(n){n&&t.classList[r?"add":"remove"](n)})}function Ot(t,e){jt(t,Jt(e)?e.split(" "):e,!0)}function ze(t,e){Lt(e,t.appendChild.bind(t))}function Br(t,e){Lt(t,function(r){var n=(e||r).parentNode;n&&n.insertBefore(r,e)})}function Ae(t,e){return In(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function Fn(t,e){var r=t?Qt(t.children):[];return e?r.filter(function(n){return Ae(n,e)}):r}function Ve(t,e){return e?Fn(t,e)[0]:t.firstElementChild}var Ie=Object.keys;function ie(t,e,r){return t&&(r?Ie(t).reverse():Ie(t)).forEach(function(n){n!=="__proto__"&&e(t[n],n)}),t}function Fe(t){return Qt(arguments,1).forEach(function(e){ie(e,function(r,n){t[n]=e[n]})}),t}function Yt(t){return Qt(arguments,1).forEach(function(e){ie(e,function(r,n){Rr(r)?t[n]=r.slice():Ee(r)?t[n]=Yt({},Ee(t[n])?t[n]:{},r):t[n]=r})}),t}function ln(t,e){Lt(e||Ie(t),function(r){delete t[r]})}function Pt(t,e){Lt(t,function(r){Lt(e,function(n){r&&r.removeAttribute(n)})})}function tt(t,e,r){Ee(e)?ie(e,function(n,o){tt(t,o,n)}):Lt(t,function(n){Or(r)||r===""?Pt(n,e):n.setAttribute(e,String(r))})}function me(t,e,r){var n=document.createElement(t);return e&&(Jt(e)?Ot(n,e):tt(n,e)),r&&ze(r,n),n}function At(t,e,r){if(Be(r))return getComputedStyle(t)[e];Or(r)||(t.style[e]=""+r)}function ke(t,e){At(t,"display",e)}function kn(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function It(t,e){return t.getAttribute(e)}function sn(t,e){return t&&t.classList.contains(e)}function _t(t){return t.getBoundingClientRect()}function ae(t){Lt(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Rn(t){return Ve(new DOMParser().parseFromString(t,"text/html").body)}function Nt(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function On(t,e){return t&&t.querySelector(e)}function Wr(t,e){return e?Qt(t.querySelectorAll(e)):[]}function Mt(t,e){jt(t,e,!1)}function _r(t){return t.timeStamp}function ne(t){return Jt(t)?t:t?t+"px":""}var Ne="splide",zr="data-"+Ne;function Te(t,e){if(!t)throw new Error("["+Ne+"] "+(e||""))}var Zt=Math.min,er=Math.max,rr=Math.floor,Re=Math.ceil,$t=Math.abs;function Pn(t,e,r){return $t(t-e)<r}function Ze(t,e,r,n){var o=Zt(e,r),a=er(e,r);return n?o<t&&t<a:o<=t&&t<=a}function pe(t,e,r){var n=Zt(e,r),o=er(e,r);return Zt(er(n,t),o)}function Tr(t){return+(t>0)-+(t<0)}function Lr(t,e){return Lt(e,function(r){t=t.replace("%s",""+r)}),t}function Vr(t){return t<10?"0"+t:""+t}var cn={};function di(t){return""+t+Vr(cn[t]=(cn[t]||0)+1)}function Bn(){var t=[];function e(i,s,c,l){o(i,s,function(u,C,v){var m="addEventListener"in u,p=m?u.removeEventListener.bind(u,C,c,l):u.removeListener.bind(u,c);m?u.addEventListener(C,c,l):u.addListener(c),t.push([u,C,v,c,p])})}function r(i,s,c){o(i,s,function(l,u,C){t=t.filter(function(v){return v[0]===l&&v[1]===u&&v[2]===C&&(!c||v[3]===c)?(v[4](),!1):!0})})}function n(i,s,c){var l,u=!0;return typeof CustomEvent=="function"?l=new CustomEvent(s,{bubbles:u,detail:c}):(l=document.createEvent("CustomEvent"),l.initCustomEvent(s,u,!1,c)),i.dispatchEvent(l),l}function o(i,s,c){Lt(i,function(l){l&&Lt(s,function(u){u.split(" ").forEach(function(C){var v=C.split(".");c(l,v[0],v[1])})})})}function a(){t.forEach(function(i){i[4]()}),Gt(t)}return{bind:e,unbind:r,dispatch:n,destroy:a}}var te="mounted",Er="ready",Ut="move",xe="moved",Nr="click",Wn="active",zn="inactive",Vn="visible",Nn="hidden",vt="refresh",Ct="updated",be="resize",ar="resized",jn="drag",Mn="dragging",Hn="dragged",lr="scroll",se="scrolled",gi="overflow",jr="destroy",Dn="arrows:mounted",Gn="arrows:updated",Un="pagination:mounted",Xn="pagination:updated",Mr="navigation:mounted",Hr="autoplay:play",qn="autoplay:playing",Dr="autoplay:pause",Gr="lazyload:loaded",Yn="sk",Kn="sh",nr="ei";function ht(t){var e=t?t.event.bus:document.createDocumentFragment(),r=Bn();function n(a,i){r.bind(e,We(a).join(" "),function(s){i.apply(i,Rr(s.detail)?s.detail:[])})}function o(a){r.dispatch(e,a,Qt(arguments,1))}return t&&t.event.on(jr,r.destroy),Fe(r,{bus:e,on:n,off:gt(r.unbind,e),emit:o})}function sr(t,e,r,n){var o=Date.now,a,i=0,s,c=!0,l=0;function u(){if(!c){if(i=t?Zt((o()-a)/t,1):1,r&&r(i),i>=1&&(e(),a=o(),n&&++l>=n))return v();s=an(u)}}function C(h){h||p(),a=o()-(h?i*t:0),c=!1,s=an(u)}function v(){c=!0}function m(){a=o(),i=0,r&&r(i)}function p(){s&&cancelAnimationFrame(s),i=0,s=0,c=!0}function g(h){t=h}function S(){return c}return{start:C,rewind:m,pause:v,cancel:p,set:g,isPaused:S}}function mi(t){var e=t;function r(o){e=o}function n(o){return Pr(We(o),e)}return{set:r,is:n}}function fi(t,e){var r=sr(0,t,null,1);return function(){r.isPaused()&&r.start()}}function hi(t,e,r){var n=t.state,o=r.breakpoints||{},a=r.reducedMotion||{},i=Bn(),s=[];function c(){var p=r.mediaQuery==="min";Ie(o).sort(function(g,S){return p?+g-+S:+S-+g}).forEach(function(g){u(o[g],"("+(p?"min":"max")+"-width:"+g+"px)")}),u(a,on),C()}function l(p){p&&i.destroy()}function u(p,g){var S=matchMedia(g);i.bind(S,"change",C),s.push([p,S])}function C(){var p=n.is(tr),g=r.direction,S=s.reduce(function(h,f){return Yt(h,f[1].matches?f[0]:{})},{});ln(r),m(S),r.destroy?t.destroy(r.destroy==="completely"):p?(l(!0),t.mount()):g!==r.direction&&t.refresh()}function v(p){matchMedia(on).matches&&(p?Yt(r,a):ln(r,Ie(a)))}function m(p,g,S){Yt(r,p),g&&Yt(Object.getPrototypeOf(r),p),(S||!n.is(ge))&&t.emit(Ct,r)}return{setup:c,destroy:l,reduce:v,set:m}}var cr="Arrow",ur=cr+"Left",pr=cr+"Right",Jn=cr+"Up",Zn=cr+"Down",un="rtl",dr="ttb",br={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jn,pr],ArrowRight:[Zn,ur]};function yi(t,e,r){function n(a,i,s){s=s||r.direction;var c=s===un&&!i?1:s===dr?0:-1;return br[a]&&br[a][c]||a.replace(/width|left|right/i,function(l,u){var C=br[l.toLowerCase()][c]||l;return u>0?C.charAt(0).toUpperCase()+C.slice(1):C})}function o(a){return a*(r.direction===un?1:-1)}return{resolve:n,orient:o}}var Dt="role",fe="tabindex",bi="disabled",Ft="aria-",je=Ft+"controls",Qn=Ft+"current",pn=Ft+"selected",Tt=Ft+"label",Ur=Ft+"labelledby",to=Ft+"hidden",Xr=Ft+"orientation",Oe=Ft+"roledescription",dn=Ft+"live",gn=Ft+"busy",mn=Ft+"atomic",qr=[Dt,fe,bi,je,Qn,Tt,Ur,to,Xr,Oe],Bt=Ne+"__",ee="is-",vr=Ne,fn=Bt+"track",vi=Bt+"list",gr=Bt+"slide",eo=gr+"--clone",Si=gr+"__container",Yr=Bt+"arrows",mr=Bt+"arrow",ro=mr+"--prev",no=mr+"--next",fr=Bt+"pagination",oo=fr+"__page",xi=Bt+"progress",Ci=xi+"__bar",$i=Bt+"toggle",wi=Bt+"spinner",_i=Bt+"sr",Ti=ee+"initialized",le=ee+"active",io=ee+"prev",ao=ee+"next",Ar=ee+"visible",Ir=ee+"loading",lo=ee+"focus-in",so=ee+"overflow",Li=[le,Ar,io,ao,Ir,lo,so],Ei={slide:gr,clone:eo,arrows:Yr,arrow:mr,prev:ro,next:no,pagination:fr,page:oo,spinner:wi};function Ai(t,e){if(An(t.closest))return t.closest(e);for(var r=t;r&&r.nodeType===1&&!Ae(r,e);)r=r.parentElement;return r}var Ii=5,hn=200,co="touchstart mousedown",Sr="touchmove mousemove",xr="touchend touchcancel mouseup click";function Fi(t,e,r){var n=ht(t),o=n.on,a=n.bind,i=t.root,s=r.i18n,c={},l=[],u=[],C=[],v,m,p;function g(){$(),M(),f()}function S(){o(vt,h),o(vt,g),o(Ct,f),a(document,co+" keydown",function(y){p=y.type==="keydown"},{capture:!0}),a(i,"focusin",function(){jt(i,lo,!!p)})}function h(y){var L=qr.concat("style");Gt(l),Mt(i,u),Mt(v,C),Pt([v,m],L),Pt(i,y?L:["style",Oe])}function f(){Mt(i,u),Mt(v,C),u=w(vr),C=w(fn),Ot(i,u),Ot(v,C),tt(i,Tt,r.label),tt(i,Ur,r.labelledby)}function $(){v=T("."+fn),m=Ve(v,"."+vi),Te(v&&m,"A track/list element is missing."),Je(l,Fn(m,"."+gr+":not(."+eo+")")),ie({arrows:Yr,pagination:fr,prev:ro,next:no,bar:Ci,toggle:$i},function(y,L){c[L]=T("."+y)}),Fe(c,{root:i,track:v,list:m,slides:l})}function M(){var y=i.id||di(Ne),L=r.role;i.id=y,v.id=v.id||y+"-track",m.id=m.id||y+"-list",!It(i,Dt)&&i.tagName!=="SECTION"&&L&&tt(i,Dt,L),tt(i,Oe,s.carousel),tt(m,Dt,"presentation")}function T(y){var L=On(i,y);return L&&Ai(L,"."+vr)===i?L:void 0}function w(y){return[y+"--"+r.type,y+"--"+r.direction,r.drag&&y+"--draggable",r.isNavigation&&y+"--nav",y===vr&&le]}return Fe(c,{setup:g,mount:S,destroy:h})}var ve="slide",Ce="loop",Me="fade";function ki(t,e,r,n){var o=ht(t),a=o.on,i=o.emit,s=o.bind,c=t.Components,l=t.root,u=t.options,C=u.isNavigation,v=u.updateOnMove,m=u.i18n,p=u.pagination,g=u.slideFocus,S=c.Direction.resolve,h=It(n,"style"),f=It(n,Tt),$=r>-1,M=Ve(n,"."+Si),T;function w(){$||(n.id=l.id+"-slide"+Vr(e+1),tt(n,Dt,p?"tabpanel":"group"),tt(n,Oe,m.slide),tt(n,Tt,f||Lr(m.slideLabel,[e+1,t.length]))),y()}function y(){s(n,"click",gt(i,Nr,k)),s(n,"keydown",gt(i,Yn,k)),a([xe,Kn,se],R),a(Mr,I),v&&a(Ut,V)}function L(){T=!0,o.destroy(),Mt(n,Li),Pt(n,qr),tt(n,"style",h),tt(n,Tt,f||"")}function I(){var A=t.splides.map(function(_){var B=_.splide.Components.Slides.getAt(e);return B?B.slide.id:""}).join(" ");tt(n,Tt,Lr(m.slideX,($?r:e)+1)),tt(n,je,A),tt(n,Dt,g?"button":""),g&&Pt(n,Oe)}function V(){T||R()}function R(){if(!T){var A=t.index;F(),W(),jt(n,io,e===A-1),jt(n,ao,e===A+1)}}function F(){var A=G();A!==sn(n,le)&&(jt(n,le,A),tt(n,Qn,C&&A||""),i(A?Wn:zn,k))}function W(){var A=b(),_=!A&&(!G()||$);if(t.state.is([Se,Pe])||tt(n,to,_||""),tt(Wr(n,u.focusableNodes||""),fe,_?-1:""),g&&tt(n,fe,_?-1:0),A!==sn(n,Ar)&&(jt(n,Ar,A),i(A?Vn:Nn,k)),!A&&document.activeElement===n){var B=c.Slides.getAt(t.index);B&&kn(B.slide)}}function H(A,_,B){At(B&&M||n,A,_)}function G(){var A=t.index;return A===e||u.cloneStatus&&A===r}function b(){if(t.is(Me))return G();var A=_t(c.Elements.track),_=_t(n),B=S("left",!0),X=S("right",!0);return rr(A[B])<=Re(_[B])&&rr(_[X])<=Re(A[X])}function P(A,_){var B=$t(A-e);return!$&&(u.rewind||t.is(Ce))&&(B=Zt(B,t.length-B)),B<=_}var k={index:e,slideIndex:r,slide:n,container:M,isClone:$,mount:w,destroy:L,update:R,style:H,isWithin:P};return k}function Ri(t,e,r){var n=ht(t),o=n.on,a=n.emit,i=n.bind,s=e.Elements,c=s.slides,l=s.list,u=[];function C(){v(),o(vt,m),o(vt,v)}function v(){c.forEach(function(R,F){g(R,F,-1)})}function m(){T(function(R){R.destroy()}),Gt(u)}function p(){T(function(R){R.update()})}function g(R,F,W){var H=ki(t,F,W,R);H.mount(),u.push(H),u.sort(function(G,b){return G.index-b.index})}function S(R){return R?w(function(F){return!F.isClone}):u}function h(R){var F=e.Controller,W=F.toIndex(R),H=F.hasFocus()?1:r.perPage;return w(function(G){return Ze(G.index,W,W+H-1)})}function f(R){return w(R)[0]}function $(R,F){Lt(R,function(W){if(Jt(W)&&(W=Rn(W)),In(W)){var H=c[F];H?Br(W,H):ze(l,W),Ot(W,r.classes.slide),L(W,gt(a,be))}}),a(vt)}function M(R){ae(w(R).map(function(F){return F.slide})),a(vt)}function T(R,F){S(F).forEach(R)}function w(R){return u.filter(An(R)?R:function(F){return Jt(R)?Ae(F.slide,R):Pr(We(R),F.index)})}function y(R,F,W){T(function(H){H.style(R,F,W)})}function L(R,F){var W=Wr(R,"img"),H=W.length;H?W.forEach(function(G){i(G,"load error",function(){--H||F()})}):F()}function I(R){return R?c.length:u.length}function V(){return u.length>r.perPage}return{mount:C,destroy:m,update:p,register:g,get:S,getIn:h,getAt:f,add:$,remove:M,forEach:T,filter:w,style:y,getLength:I,isEnough:V}}function Oi(t,e,r){var n=ht(t),o=n.on,a=n.bind,i=n.emit,s=e.Slides,c=e.Direction.resolve,l=e.Elements,u=l.root,C=l.track,v=l.list,m=s.getAt,p=s.style,g,S,h;function f(){$(),a(window,"resize load",fi(gt(i,be))),o([Ct,vt],$),o(be,M)}function $(){g=r.direction===dr,At(u,"maxWidth",ne(r.width)),At(C,c("paddingLeft"),T(!1)),At(C,c("paddingRight"),T(!0)),M(!0)}function M(k){var A=_t(u);(k||S.width!==A.width||S.height!==A.height)&&(At(C,"height",w()),p(c("marginRight"),ne(r.gap)),p("width",L()),p("height",I(),!0),S=A,i(ar),h!==(h=P())&&(jt(u,so,h),i(gi,h)))}function T(k){var A=r.padding,_=c(k?"right":"left");return A&&ne(A[_]||(Ee(A)?0:A))||"0px"}function w(){var k="";return g&&(k=y(),Te(k,"height or heightRatio is missing."),k="calc("+k+" - "+T(!1)+" - "+T(!0)+")"),k}function y(){return ne(r.height||_t(v).width*r.heightRatio)}function L(){return r.autoWidth?null:ne(r.fixedWidth)||(g?"":V())}function I(){return ne(r.fixedHeight)||(g?r.autoHeight?null:V():y())}function V(){var k=ne(r.gap);return"calc((100%"+(k&&" + "+k)+")/"+(r.perPage||1)+(k&&" - "+k)+")"}function R(){return _t(v)[c("width")]}function F(k,A){var _=m(k||0);return _?_t(_.slide)[c("width")]+(A?0:G()):0}function W(k,A){var _=m(k);if(_){var B=_t(_.slide)[c("right")],X=_t(v)[c("left")];return $t(B-X)+(A?0:G())}return 0}function H(k){return W(t.length-1)-W(0)+F(0,k)}function G(){var k=m(0);return k&&parseFloat(At(k.slide,c("marginRight")))||0}function b(k){return parseFloat(At(C,c("padding"+(k?"Right":"Left"))))||0}function P(){return t.is(Me)||H(!0)>R()}return{mount:f,resize:M,listSize:R,slideSize:F,sliderSize:H,totalSize:W,getPadding:b,isOverflow:P}}var Pi=2;function Bi(t,e,r){var n=ht(t),o=n.on,a=e.Elements,i=e.Slides,s=e.Direction.resolve,c=[],l;function u(){o(vt,C),o([Ct,be],m),(l=S())&&(p(l),e.Layout.resize(!0))}function C(){v(),u()}function v(){ae(c),Gt(c),n.destroy()}function m(){var h=S();l!==h&&(l<h||!h)&&n.emit(vt)}function p(h){var f=i.get().slice(),$=f.length;if($){for(;f.length<h;)Je(f,f);Je(f.slice(-h),f.slice(0,h)).forEach(function(M,T){var w=T<h,y=g(M.slide,T);w?Br(y,f[0].slide):ze(a.list,y),Je(c,y),i.register(y,T-h+(w?0:$),M.index)})}}function g(h,f){var $=h.cloneNode(!0);return Ot($,r.classes.clone),$.id=t.root.id+"-clone"+Vr(f+1),$}function S(){var h=r.clones;if(!t.is(Ce))h=0;else if(Be(h)){var f=r[s("fixedWidth")]&&e.Layout.slideSize(0),$=f&&Re(_t(a.track)[s("width")]/f);h=$||r[s("autoWidth")]&&t.length||r.perPage*Pi}return h}return{mount:u,destroy:v}}function Wi(t,e,r){var n=ht(t),o=n.on,a=n.emit,i=t.state.set,s=e.Layout,c=s.slideSize,l=s.getPadding,u=s.totalSize,C=s.listSize,v=s.sliderSize,m=e.Direction,p=m.resolve,g=m.orient,S=e.Elements,h=S.list,f=S.track,$;function M(){$=e.Transition,o([te,ar,Ct,vt],T)}function T(){e.Controller.isBusy()||(e.Scroll.cancel(),y(t.index),e.Slides.update())}function w(_,B,X,ot){_!==B&&k(_>X)&&(R(),L(V(H(),_>X),!0)),i(Se),a(Ut,B,X,_),$.start(B,function(){i(ye),a(xe,B,X,_),ot&&ot()})}function y(_){L(W(_,!0))}function L(_,B){if(!t.is(Me)){var X=B?_:I(_);At(h,"transform","translate"+p("X")+"("+X+"px)"),_!==X&&a(Kn)}}function I(_){if(t.is(Ce)){var B=F(_),X=B>e.Controller.getEnd(),ot=B<0;(ot||X)&&(_=V(_,X))}return _}function V(_,B){var X=_-P(B),ot=v();return _-=g(ot*(Re($t(X)/ot)||1))*(B?1:-1),_}function R(){L(H(),!0),$.cancel()}function F(_){for(var B=e.Slides.get(),X=0,ot=1/0,rt=0;rt<B.length;rt++){var st=B[rt].index,O=$t(W(st,!0)-_);if(O<=ot)ot=O,X=st;else break}return X}function W(_,B){var X=g(u(_-1)-b(_));return B?G(X):X}function H(){var _=p("left");return _t(h)[_]-_t(f)[_]+g(l(!1))}function G(_){return r.trimSpace&&t.is(ve)&&(_=pe(_,0,g(v(!0)-C()))),_}function b(_){var B=r.focus;return B==="center"?(C()-c(_,!0))/2:+B*c(_)||0}function P(_){return W(_?e.Controller.getEnd():0,!!r.trimSpace)}function k(_){var B=g(V(H(),_));return _?B>=0:B<=h[p("scrollWidth")]-_t(f)[p("width")]}function A(_,B){B=Be(B)?H():B;var X=_!==!0&&g(B)<g(P(!1)),ot=_!==!1&&g(B)>g(P(!0));return X||ot}return{mount:M,move:w,jump:y,translate:L,shift:V,cancel:R,toIndex:F,toPosition:W,getPosition:H,getLimit:P,exceededLimit:A,reposition:T}}function zi(t,e,r){var n=ht(t),o=n.on,a=n.emit,i=e.Move,s=i.getPosition,c=i.getLimit,l=i.toPosition,u=e.Slides,C=u.isEnough,v=u.getLength,m=r.omitEnd,p=t.is(Ce),g=t.is(ve),S=gt(H,!1),h=gt(H,!0),f=r.start||0,$,M=f,T,w,y;function L(){I(),o([Ct,vt,nr],I),o(ar,V)}function I(){T=v(!0),w=r.perMove,y=r.perPage,$=k();var O=pe(f,0,m?$:T-1);O!==f&&(f=O,i.reposition())}function V(){$!==k()&&a(nr)}function R(O,K,mt){if(!st()){var ct=W(O),dt=P(ct);dt>-1&&(K||dt!==f)&&(X(dt),i.move(ct,dt,M,mt))}}function F(O,K,mt,ct){e.Scroll.scroll(O,K,mt,function(){var dt=P(i.toIndex(s()));X(m?Zt(dt,$):dt),ct&&ct()})}function W(O){var K=f;if(Jt(O)){var mt=O.match(/([+\-<>])(\d+)?/)||[],ct=mt[1],dt=mt[2];ct==="+"||ct==="-"?K=G(f+ +(""+ct+(+dt||1)),f):ct===">"?K=dt?A(+dt):S(!0):ct==="<"&&(K=h(!0))}else K=p?O:pe(O,0,$);return K}function H(O,K){var mt=w||(rt()?1:y),ct=G(f+mt*(O?-1:1),f,!(w||rt()));return ct===-1&&g&&!Pn(s(),c(!O),1)?O?0:$:K?ct:P(ct)}function G(O,K,mt){if(C()||rt()){var ct=b(O);ct!==O&&(K=O,O=ct,mt=!1),O<0||O>$?!w&&(Ze(0,O,K,!0)||Ze($,K,O,!0))?O=A(_(O)):p?O=mt?O<0?-(T%y||y):T:O:r.rewind?O=O<0?$:0:O=-1:mt&&O!==K&&(O=A(_(K)+(O<K?-1:1)))}else O=-1;return O}function b(O){if(g&&r.trimSpace==="move"&&O!==f)for(var K=s();K===l(O,!0)&&Ze(O,0,t.length-1,!r.rewind);)O<f?--O:++O;return O}function P(O){return p?(O+T)%T||0:O}function k(){for(var O=T-(rt()||p&&w?1:y);m&&O-- >0;)if(l(T-1,!0)!==l(O,!0)){O++;break}return pe(O,0,T-1)}function A(O){return pe(rt()?O:y*O,0,$)}function _(O){return rt()?Zt(O,$):rr((O>=$?T-1:O)/y)}function B(O){var K=i.toIndex(O);return g?pe(K,0,$):K}function X(O){O!==f&&(M=f,f=O)}function ot(O){return O?M:f}function rt(){return!Be(r.focus)||r.isNavigation}function st(){return t.state.is([Se,Pe])&&!!r.waitForTransition}return{mount:L,go:R,scroll:F,getNext:S,getPrev:h,getAdjacent:H,getEnd:k,setIndex:X,getIndex:ot,toIndex:A,toPage:_,toDest:B,hasFocus:rt,isBusy:st}}var Vi="http://www.w3.org/2000/svg",Ni="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",Ge=40;function ji(t,e,r){var n=ht(t),o=n.on,a=n.bind,i=n.emit,s=r.classes,c=r.i18n,l=e.Elements,u=e.Controller,C=l.arrows,v=l.track,m=C,p=l.prev,g=l.next,S,h,f={};function $(){T(),o(Ct,M)}function M(){w(),$()}function T(){var F=r.arrows;F&&!(p&&g)&&I(),p&&g&&(Fe(f,{prev:p,next:g}),ke(m,F?"":"none"),Ot(m,h=Yr+"--"+r.direction),F&&(y(),R(),tt([p,g],je,v.id),i(Dn,p,g)))}function w(){n.destroy(),Mt(m,h),S?(ae(C?[p,g]:m),p=g=null):Pt([p,g],qr)}function y(){o([te,xe,vt,se,nr],R),a(g,"click",gt(L,">")),a(p,"click",gt(L,"<"))}function L(F){u.go(F,!0)}function I(){m=C||me("div",s.arrows),p=V(!0),g=V(!1),S=!0,ze(m,[p,g]),!C&&Br(m,v)}function V(F){var W='<button class="'+s.arrow+" "+(F?s.prev:s.next)+'" type="button"><svg xmlns="'+Vi+'" viewBox="0 0 '+Ge+" "+Ge+'" width="'+Ge+'" height="'+Ge+'" focusable="false"><path d="'+(r.arrowPath||Ni)+'" />';return Rn(W)}function R(){if(p&&g){var F=t.index,W=u.getPrev(),H=u.getNext(),G=W>-1&&F<W?c.last:c.prev,b=H>-1&&F>H?c.first:c.next;p.disabled=W<0,g.disabled=H<0,tt(p,Tt,G),tt(g,Tt,b),i(Gn,p,g,W,H)}}return{arrows:f,mount:$,destroy:w,update:R}}var Mi=zr+"-interval";function Hi(t,e,r){var n=ht(t),o=n.on,a=n.bind,i=n.emit,s=sr(r.interval,t.go.bind(t,">"),y),c=s.isPaused,l=e.Elements,u=e.Elements,C=u.root,v=u.toggle,m=r.autoplay,p,g,S=m==="pause";function h(){m&&(f(),v&&tt(v,je,l.track.id),S||$(),w())}function f(){r.pauseOnHover&&a(C,"mouseenter mouseleave",function(I){p=I.type==="mouseenter",T()}),r.pauseOnFocus&&a(C,"focusin focusout",function(I){g=I.type==="focusin",T()}),v&&a(v,"click",function(){S?$():M(!0)}),o([Ut,lr,vt],s.rewind),o(Ut,L)}function $(){c()&&e.Slides.isEnough()&&(s.start(!r.resetProgress),g=p=S=!1,w(),i(Hr))}function M(I){I===void 0&&(I=!0),S=!!I,w(),c()||(s.pause(),i(Dr))}function T(){S||(p||g?M(!1):$())}function w(){v&&(jt(v,le,!S),tt(v,Tt,r.i18n[S?"play":"pause"]))}function y(I){var V=l.bar;V&&At(V,"width",I*100+"%"),i(qn,I)}function L(I){var V=e.Slides.getAt(I);s.set(V&&+It(V.slide,Mi)||r.interval)}return{mount:h,destroy:s.cancel,play:$,pause:M,isPaused:c}}function Di(t,e,r){var n=ht(t),o=n.on;function a(){r.cover&&(o(Gr,gt(s,!0)),o([te,Ct,vt],gt(i,!0)))}function i(c){e.Slides.forEach(function(l){var u=Ve(l.container||l.slide,"img");u&&u.src&&s(c,u,l)})}function s(c,l,u){u.style("background",c?'center/cover no-repeat url("'+l.src+'")':"",!0),ke(l,c?"none":"")}return{mount:a,destroy:gt(i,!1)}}var Gi=10,Ui=600,Xi=.6,qi=1.5,Yi=800;function Ki(t,e,r){var n=ht(t),o=n.on,a=n.emit,i=t.state.set,s=e.Move,c=s.getPosition,l=s.getLimit,u=s.exceededLimit,C=s.translate,v=t.is(ve),m,p,g=1;function S(){o(Ut,M),o([Ct,vt],T)}function h(y,L,I,V,R){var F=c();if(M(),I&&(!v||!u())){var W=e.Layout.sliderSize(),H=Tr(y)*W*rr($t(y)/W)||0;y=s.toPosition(e.Controller.toDest(y%W))+H}var G=Pn(F,y,1);g=1,L=G?0:L||er($t(y-F)/qi,Yi),p=V,m=sr(L,f,gt($,F,y,R),1),i(Pe),a(lr),m.start()}function f(){i(ye),p&&p(),a(se)}function $(y,L,I,V){var R=c(),F=y+(L-y)*w(V),W=(F-R)*g;C(R+W),v&&!I&&u()&&(g*=Xi,$t(W)<Gi&&h(l(u(!0)),Ui,!1,p,!0))}function M(){m&&m.cancel()}function T(){m&&!m.isPaused()&&(M(),f())}function w(y){var L=r.easingFunc;return L?L(y):1-Math.pow(1-y,4)}return{mount:S,destroy:M,scroll:h,cancel:T}}var de={passive:!1,capture:!0};function Ji(t,e,r){var n=ht(t),o=n.on,a=n.emit,i=n.bind,s=n.unbind,c=t.state,l=e.Move,u=e.Scroll,C=e.Controller,v=e.Elements.track,m=e.Media.reduce,p=e.Direction,g=p.resolve,S=p.orient,h=l.getPosition,f=l.exceededLimit,$,M,T,w,y,L=!1,I,V,R;function F(){i(v,Sr,wr,de),i(v,xr,wr,de),i(v,co,H,de),i(v,"click",P,{capture:!0}),i(v,"dragstart",Nt),o([te,Ct],W)}function W(){var j=r.drag;kt(!j),w=j==="free"}function H(j){if(I=!1,!V){var x=dt(j);ct(j.target)&&(x||!j.button)&&(C.isBusy()?Nt(j,!0):(R=x?v:window,y=c.is([Se,Pe]),T=null,i(R,Sr,G,de),i(R,xr,b,de),l.cancel(),u.cancel(),k(j)))}}function G(j){if(c.is(Ke)||(c.set(Ke),a(jn)),j.cancelable)if(y){l.translate($+mt(rt(j)));var x=st(j)>hn,D=L!==(L=f());(x||D)&&k(j),I=!0,a(Mn),Nt(j)}else B(j)&&(y=_(j),Nt(j))}function b(j){c.is(Ke)&&(c.set(ye),a(Hn)),y&&(A(j),Nt(j)),s(R,Sr,G),s(R,xr,b),y=!1}function P(j){!V&&I&&Nt(j,!0)}function k(j){T=M,M=j,$=h()}function A(j){var x=X(j),D=ot(x),q=r.rewind&&r.rewindByDrag;m(!1),w?C.scroll(D,0,r.snap):t.is(Me)?C.go(S(Tr(x))<0?q?"<":"-":q?">":"+"):t.is(ve)&&L&&q?C.go(f(!0)?">":"<"):C.go(C.toDest(D),!0),m(!0)}function _(j){var x=r.dragMinThreshold,D=Ee(x),q=D&&x.mouse||0,J=(D?x.touch:+x)||10;return $t(rt(j))>(dt(j)?J:q)}function B(j){return $t(rt(j))>$t(rt(j,!0))}function X(j){if(t.is(Ce)||!L){var x=st(j);if(x&&x<hn)return rt(j)/x}return 0}function ot(j){return h()+Tr(j)*Zt($t(j)*(r.flickPower||600),w?1/0:e.Layout.listSize()*(r.flickMaxPages||1))}function rt(j,x){return K(j,x)-K(O(j),x)}function st(j){return _r(j)-_r(O(j))}function O(j){return M===j&&T||M}function K(j,x){return(dt(j)?j.changedTouches[0]:j)["page"+g(x?"Y":"X")]}function mt(j){return j/(L&&t.is(ve)?Ii:1)}function ct(j){var x=r.noDrag;return!Ae(j,"."+oo+", ."+mr)&&(!x||!Ae(j,x))}function dt(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function xt(){return y}function kt(j){V=j}return{mount:F,disable:kt,isDragging:xt}}var Zi={Spacebar:" ",Right:pr,Left:ur,Up:Jn,Down:Zn};function Kr(t){return t=Jt(t)?t:t.key,Zi[t]||t}var yn="keydown";function Qi(t,e,r){var n=ht(t),o=n.on,a=n.bind,i=n.unbind,s=t.root,c=e.Direction.resolve,l,u;function C(){v(),o(Ct,m),o(Ct,v),o(Ut,g)}function v(){var h=r.keyboard;h&&(l=h==="global"?window:s,a(l,yn,S))}function m(){i(l,yn)}function p(h){u=h}function g(){var h=u;u=!0,En(function(){u=h})}function S(h){if(!u){var f=Kr(h);f===c(ur)?t.go("<"):f===c(pr)&&t.go(">")}}return{mount:C,destroy:m,disable:p}}var Le=zr+"-lazy",Qe=Le+"-srcset",ta="["+Le+"], ["+Qe+"]";function ea(t,e,r){var n=ht(t),o=n.on,a=n.off,i=n.bind,s=n.emit,c=r.lazyLoad==="sequential",l=[xe,se],u=[];function C(){r.lazyLoad&&(v(),o(vt,v))}function v(){Gt(u),m(),c?h():(a(l),o(l,p),p())}function m(){e.Slides.forEach(function(f){Wr(f.slide,ta).forEach(function($){var M=It($,Le),T=It($,Qe);if(M!==$.src||T!==$.srcset){var w=r.classes.spinner,y=$.parentElement,L=Ve(y,"."+w)||me("span",w,y);u.push([$,f,L]),$.src||ke($,"none")}})})}function p(){u=u.filter(function(f){var $=r.perPage*((r.preloadPages||1)+1)-1;return f[1].isWithin(t.index,$)?g(f):!0}),u.length||a(l)}function g(f){var $=f[0];Ot(f[1].slide,Ir),i($,"load error",gt(S,f)),tt($,"src",It($,Le)),tt($,"srcset",It($,Qe)),Pt($,Le),Pt($,Qe)}function S(f,$){var M=f[0],T=f[1];Mt(T.slide,Ir),$.type!=="error"&&(ae(f[2]),ke(M,""),s(Gr,M,T),s(be)),c&&h()}function h(){u.length&&g(u.shift())}return{mount:C,destroy:gt(Gt,u),check:p}}function ra(t,e,r){var n=ht(t),o=n.on,a=n.emit,i=n.bind,s=e.Slides,c=e.Elements,l=e.Controller,u=l.hasFocus,C=l.getIndex,v=l.go,m=e.Direction.resolve,p=c.pagination,g=[],S,h;function f(){$(),o([Ct,vt,nr],f);var V=r.pagination;p&&ke(p,V?"":"none"),V&&(o([Ut,lr,se],I),M(),I(),a(Un,{list:S,items:g},L(t.index)))}function $(){S&&(ae(p?Qt(S.children):S),Mt(S,h),Gt(g),S=null),n.destroy()}function M(){var V=t.length,R=r.classes,F=r.i18n,W=r.perPage,H=u()?l.getEnd()+1:Re(V/W);S=p||me("ul",R.pagination,c.track.parentElement),Ot(S,h=fr+"--"+y()),tt(S,Dt,"tablist"),tt(S,Tt,F.select),tt(S,Xr,y()===dr?"vertical":"");for(var G=0;G<H;G++){var b=me("li",null,S),P=me("button",{class:R.page,type:"button"},b),k=s.getIn(G).map(function(_){return _.slide.id}),A=!u()&&W>1?F.pageX:F.slideX;i(P,"click",gt(T,G)),r.paginationKeyboard&&i(P,"keydown",gt(w,G)),tt(b,Dt,"presentation"),tt(P,Dt,"tab"),tt(P,je,k.join(" ")),tt(P,Tt,Lr(A,G+1)),tt(P,fe,-1),g.push({li:b,button:P,page:G})}}function T(V){v(">"+V,!0)}function w(V,R){var F=g.length,W=Kr(R),H=y(),G=-1;W===m(pr,!1,H)?G=++V%F:W===m(ur,!1,H)?G=(--V+F)%F:W==="Home"?G=0:W==="End"&&(G=F-1);var b=g[G];b&&(kn(b.button),v(">"+G),Nt(R,!0))}function y(){return r.paginationDirection||r.direction}function L(V){return g[l.toPage(V)]}function I(){var V=L(C(!0)),R=L(C());if(V){var F=V.button;Mt(F,le),Pt(F,pn),tt(F,fe,-1)}if(R){var W=R.button;Ot(W,le),tt(W,pn,!0),tt(W,fe,"")}a(Xn,{list:S,items:g},V,R)}return{items:g,mount:f,destroy:$,getAt:L,update:I}}var na=[" ","Enter"];function oa(t,e,r){var n=r.isNavigation,o=r.slideFocus,a=[];function i(){t.splides.forEach(function(p){p.isParent||(l(t,p.splide),l(p.splide,t))}),n&&u()}function s(){a.forEach(function(p){p.destroy()}),Gt(a)}function c(){s(),i()}function l(p,g){var S=ht(p);S.on(Ut,function(h,f,$){g.go(g.is(Ce)?$:h)}),a.push(S)}function u(){var p=ht(t),g=p.on;g(Nr,v),g(Yn,m),g([te,Ct],C),a.push(p),p.emit(Mr,t.splides)}function C(){tt(e.Elements.list,Xr,r.direction===dr?"vertical":"")}function v(p){t.go(p.index)}function m(p,g){Pr(na,Kr(g))&&(v(p),Nt(g))}return{setup:gt(e.Media.set,{slideFocus:Be(o)?n:o},!0),mount:i,destroy:s,remount:c}}function ia(t,e,r){var n=ht(t),o=n.bind,a=0;function i(){r.wheel&&o(e.Elements.track,"wheel",s,de)}function s(l){if(l.cancelable){var u=l.deltaY,C=u<0,v=_r(l),m=r.wheelMinThreshold||0,p=r.wheelSleep||0;$t(u)>m&&v-a>p&&(t.go(C?"<":">"),a=v),c(C)&&Nt(l)}}function c(l){return!r.releaseWheel||t.state.is(Se)||e.Controller.getAdjacent(l)!==-1}return{mount:i}}var aa=90;function la(t,e,r){var n=ht(t),o=n.on,a=e.Elements.track,i=r.live&&!r.isNavigation,s=me("span",_i),c=sr(aa,gt(u,!1));function l(){i&&(v(!e.Autoplay.isPaused()),tt(a,mn,!0),s.textContent="…",o(Hr,gt(v,!0)),o(Dr,gt(v,!1)),o([xe,se],gt(u,!0)))}function u(m){tt(a,gn,m),m?(ze(a,s),c.start()):(ae(s),c.cancel())}function C(){Pt(a,[dn,mn,gn]),ae(s)}function v(m){i&&tt(a,dn,m?"off":"polite")}return{mount:l,disable:v,destroy:C}}var sa=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:Fi,Slides:Ri,Layout:Oi,Clones:Bi,Move:Wi,Controller:zi,Arrows:ji,Autoplay:Hi,Cover:Di,Scroll:Ki,Drag:Ji,Keyboard:Qi,LazyLoad:ea,Pagination:ra,Sync:oa,Wheel:ia,Live:la}),ca={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ua={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Ei,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(t,e,r){var n=e.Slides;function o(){ht(t).on([te,vt],a)}function a(){n.forEach(function(s){s.style("transform","translateX(-"+100*s.index+"%)")})}function i(s,c){n.style("transition","opacity "+r.speed+"ms "+r.easing),En(c)}return{mount:o,start:i,cancel:wr}}function da(t,e,r){var n=e.Move,o=e.Controller,a=e.Scroll,i=e.Elements.list,s=gt(At,i,"transition"),c;function l(){ht(t).bind(i,"transitionend",function(m){m.target===i&&c&&(C(),c())})}function u(m,p){var g=n.toPosition(m,!0),S=n.getPosition(),h=v(m);$t(g-S)>=1&&h>=1?r.useScroll?a.scroll(g,h,!1,p):(s("transform "+h+"ms "+r.easing),n.translate(g,!0),c=p):(n.jump(m),p())}function C(){s(""),a.cancel()}function v(m){var p=r.rewindSpeed;if(t.is(ve)&&p){var g=o.getIndex(!0),S=o.getEnd();if(g===0&&m>=S||g>=S&&m===0)return p}return r.speed}return{mount:l,start:u,cancel:C}}var ga=(function(){function t(r,n){this.event=ht(),this.Components={},this.state=mi(ge),this.splides=[],this._o={},this._E={};var o=Jt(r)?On(document,r):r;Te(o,o+" is invalid."),this.root=o,n=Yt({label:It(o,Tt)||"",labelledby:It(o,Ur)||""},ua,t.defaults,n||{});try{Yt(n,JSON.parse(It(o,zr)))}catch{Te(!1,"Invalid JSON")}this._o=Object.create(Yt({},n))}var e=t.prototype;return e.mount=function(n,o){var a=this,i=this.state,s=this.Components;Te(i.is([ge,tr]),"Already mounted!"),i.set(ge),this._C=s,this._T=o||this._T||(this.is(Me)?pa:da),this._E=n||this._E;var c=Fe({},sa,this._E,{Transition:this._T});return ie(c,function(l,u){var C=l(a,s,a._o);s[u]=C,C.setup&&C.setup()}),ie(s,function(l){l.mount&&l.mount()}),this.emit(te),Ot(this.root,Ti),i.set(ye),this.emit(Er),this},e.sync=function(n){return this.splides.push({splide:n}),n.splides.push({splide:this,isParent:!0}),this.state.is(ye)&&(this._C.Sync.remount(),n.Components.Sync.remount()),this},e.go=function(n){return this._C.Controller.go(n),this},e.on=function(n,o){return this.event.on(n,o),this},e.off=function(n){return this.event.off(n),this},e.emit=function(n){var o;return(o=this.event).emit.apply(o,[n].concat(Qt(arguments,1))),this},e.add=function(n,o){return this._C.Slides.add(n,o),this},e.remove=function(n){return this._C.Slides.remove(n),this},e.is=function(n){return this._o.type===n},e.refresh=function(){return this.emit(vt),this},e.destroy=function(n){n===void 0&&(n=!0);var o=this.event,a=this.state;return a.is(ge)?ht(this).on(Er,this.destroy.bind(this,n)):(ie(this._C,function(i){i.destroy&&i.destroy(n)},!0),o.emit(jr),o.destroy(),n&&Gt(this.splides),a.set(tr)),this},ci(t,[{key:"options",get:function(){return this._o},set:function(n){this._C.Media.set(n,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t})(),Jr=ga;Jr.defaults={};Jr.STATES=pi;var bn=[[te,"onMounted"],[Er,"onReady"],[Ut,"onMove"],[xe,"onMoved"],[Nr,"onClick"],[Wn,"onActive"],[zn,"onInactive"],[Vn,"onVisible"],[Nn,"onHidden"],[vt,"onRefresh"],[Ct,"onUpdated"],[be,"onResize"],[ar,"onResized"],[jn,"onDrag"],[Mn,"onDragging"],[Hn,"onDragged"],[lr,"onScroll"],[se,"onScrolled"],[jr,"onDestroy"],[Dn,"onArrowsMounted"],[Gn,"onArrowsUpdated"],[Un,"onPaginationMounted"],[Xn,"onPaginationUpdated"],[Mr,"onNavigationMounted"],[Hr,"onAutoplayPlay"],[qn,"onAutoplayPlaying"],[Dr,"onAutoplayPause"],[Gr,"onLazyLoadLoaded"]];function Zr(...t){return t.filter(Boolean).join(" ")}function or(t){return t!==null&&typeof t=="object"}function Fr(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((r,n)=>!Fr(r,e[n]));if(or(t)&&or(e)){const r=Object.keys(t),n=Object.keys(e);return r.length===n.length&&!r.some(o=>!Object.prototype.hasOwnProperty.call(e,o)||!Fr(t[o],e[o]))}return t===e}function ma(t,e){return t.length===e.length&&!t.some((r,n)=>r!==e[n])}function fa(t,e){if(t){const r=Object.keys(t);for(let n=0;n<r.length;n++){const o=r[n];if(o!=="__proto__"&&e(t[o],o)===!1)break}}return t}function kr(t,e){const r=t;return fa(e,(n,o)=>{Array.isArray(n)?r[o]=n.slice():or(n)?r[o]=kr(or(r[o])?r[o]:{},n):r[o]=n}),r}var ha=({children:t,className:e,...r})=>z.createElement("div",{className:Zr("splide__track",e),...r},z.createElement("ul",{className:"splide__list"},t)),Qr=class extends z.Component{constructor(){super(...arguments),this.splideRef=z.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:r}=this.props,{current:n}=this.splideRef;n&&(this.splide=new Jr(n,t),this.bind(this.splide),this.splide.mount(e,r),this.options=kr({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!Fr(this.options,t)&&(this.splide.options=t,this.options=kr({},t));const e=this.getSlides();ma(this.slides,e)||(this.splide.refresh(),this.slides=e)}sync(t){var e;(e=this.splide)==null||e.sync(t)}go(t){var e;(e=this.splide)==null||e.go(t)}getSlides(){var t;if(this.splide){const e=(t=this.splide.Components.Elements)==null?void 0:t.list.children;return e&&Array.prototype.slice.call(e)||[]}return[]}bind(t){bn.forEach(([e,r])=>{const n=this.props[r];typeof n=="function"&&t.on(e,(...o)=>{n(t,...o)})})}omit(t,e){return e.forEach(r=>{Object.prototype.hasOwnProperty.call(t,r)&&delete t[r]}),t}render(){const{className:t,tag:e="div",hasTrack:r=!0,children:n,...o}=this.props;return z.createElement(e,{className:Zr("splide",t),ref:this.splideRef,...this.omit(o,["options",...bn.map(a=>a[1])])},r?z.createElement(ha,null,n):n)}},tn=({children:t,className:e,...r})=>z.createElement("li",{className:Zr("splide__slide",e),...r},t);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),V=require("react"),ye=require("classnames"),E=require("./useScopedStyles-DpVdqfXj.js"),Lr=require("react-dom");function bo(e){return e.type==="object"&&e.version===1}const vo="ControlSlider-module__wrapper___sHEkd",So="ControlSlider-module__hoverArrow___A-dOH",xo="ControlSlider-module__sliderItem___QQSkR",Co="ControlSlider-module__sliderImage___9hRl-",$o="ControlSlider-module__arrow___05ghY",wo="ControlSlider-module__arrowVertical___tBfVN",_o="ControlSlider-module__nextArrow___-30Yc",To="ControlSlider-module__arrowInner___aEra3",Lo="ControlSlider-module__arrowIcon___S4ztF",Eo="ControlSlider-module__arrowImg___2dwJW",Ao="ControlSlider-module__mirror___brd6U",Io="ControlSlider-module__pagination___bicLF",Fo="ControlSlider-module__paginationInner___bT-P-",ko="ControlSlider-module__paginationVertical___zYqKw",Ro="ControlSlider-module__paginationItem___nTRbk",Oo="ControlSlider-module__dot___p1Qun",Bo="ControlSlider-module__activeDot___LHFaj",Po="ControlSlider-module__paginationInsideBottom___R3FWn",Wo="ControlSlider-module__paginationInsideTop___V-qb-",Vo="ControlSlider-module__paginationOutsideBottom___14w8D",zo="ControlSlider-module__paginationOutsideTop___SCLqB",No="ControlSlider-module__paginationInsideLeft___yOBRZ",jo="ControlSlider-module__paginationInsideRight___Rtt3o",Mo="ControlSlider-module__paginationOutsideLeft___lahaw",Ho="ControlSlider-module__paginationOutsideRight___EtuQa",Do="ControlSlider-module__imgWrapper___UjEgB",Go="ControlSlider-module__captionBlock___dJ6-j",Uo="ControlSlider-module__captionTextWrapper___HFlpf",Xo="ControlSlider-module__captionText___uGBVc",qo="ControlSlider-module__active___WZK4G",Yo="ControlSlider-module__withPointerEvents___t-18M",Ko="ControlSlider-module__topLeftAlignment___zjnGM",Jo="ControlSlider-module__topCenterAlignment___gD1xW",Zo="ControlSlider-module__topRightAlignment___NMapS",Qo="ControlSlider-module__middleLeftAlignment___OnUrY",ei="ControlSlider-module__middleCenterAlignment___Tdkl0",ti="ControlSlider-module__middleRightAlignment___wEbfX",ni="ControlSlider-module__bottomLeftAlignment___cTP2-",ri="ControlSlider-module__bottomCenterAlignment___c54fB",oi="ControlSlider-module__bottomRightAlignment___kEwrz",ii="ControlSlider-module__clickOverlay___DZA28",ai="ControlSlider-module__contain___pLyq7",li="ControlSlider-module__cover___KdDat",U={wrapper:vo,hoverArrow:So,sliderItem:xo,sliderImage:Co,arrow:$o,arrowVertical:wo,nextArrow:_o,arrowInner:To,arrowIcon:Lo,arrowImg:Eo,mirror:Ao,pagination:Io,paginationInner:Fo,paginationVertical:ko,paginationItem:Ro,dot:Oo,activeDot:Bo,paginationInsideBottom:Po,paginationInsideTop:Wo,paginationOutsideBottom:Vo,paginationOutsideTop:zo,paginationInsideLeft:No,paginationInsideRight:jo,paginationOutsideLeft:Mo,paginationOutsideRight:Ho,imgWrapper:Do,captionBlock:Go,captionTextWrapper:Uo,captionText:Xo,active:qo,withPointerEvents:Yo,topLeftAlignment:Ko,topCenterAlignment:Jo,topRightAlignment:Zo,middleLeftAlignment:Qo,middleCenterAlignment:ei,middleRightAlignment:ti,bottomLeftAlignment:ni,bottomCenterAlignment:ri,bottomRightAlignment:oi,clickOverlay:ii,contain:ai,cover:li};function si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ci(e,t,n){return t&&si(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var ir="(prefers-reduced-motion: reduce)",ft=1,ui=2,vt=3,Ct=4,Pt=5,Zt=6,nn=7,pi={CREATED:ft,MOUNTED:ui,IDLE:vt,MOVING:Ct,SCROLLING:Pt,DRAGGING:Zt,DESTROYED:nn};function Xe(e){e.length=0}function tt(e,t,n){return Array.prototype.slice.call(e,t,n)}function me(e){return e.bind.apply(e,[null].concat(tt(arguments,1)))}var Er=setTimeout,Tn=function(){};function ar(e){return requestAnimationFrame(e)}function sn(e,t){return typeof t===e}function At(e){return!Pn(e)&&sn("object",e)}var Bn=Array.isArray,Ar=me(sn,"function"),Qe=me(sn,"string"),Wt=me(sn,"undefined");function Pn(e){return e===null}function Ir(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Vt(e){return Bn(e)?e:[e]}function Ie(e,t){Vt(e).forEach(t)}function Wn(e,t){return e.indexOf(t)>-1}function Qt(e,t){return e.push.apply(e,Vt(t)),e}function He(e,t,n){e&&Ie(t,function(r){r&&e.classList[n?"add":"remove"](r)})}function We(e,t){He(e,Qe(t)?t.split(" "):t,!0)}function zt(e,t){Ie(t,e.appendChild.bind(e))}function Vn(e,t){Ie(e,function(n){var r=(t||n).parentNode;r&&r.insertBefore(n,t)})}function It(e,t){return Ir(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Fr(e,t){var n=e?tt(e.children):[];return t?n.filter(function(r){return It(r,t)}):n}function Nt(e,t){return t?Fr(e,t)[0]:e.firstElementChild}var Ft=Object.keys;function lt(e,t,n){return e&&(n?Ft(e).reverse():Ft(e)).forEach(function(r){r!=="__proto__"&&t(e[r],r)}),e}function kt(e){return tt(arguments,1).forEach(function(t){lt(t,function(n,r){e[r]=t[r]})}),e}function Je(e){return tt(arguments,1).forEach(function(t){lt(t,function(n,r){Bn(n)?e[r]=n.slice():At(n)?e[r]=Je({},At(e[r])?e[r]:{},n):e[r]=n})}),e}function lr(e,t){Ie(t||Ft(e),function(n){delete e[n]})}function Ve(e,t){Ie(e,function(n){Ie(t,function(r){n&&n.removeAttribute(r)})})}function ee(e,t,n){At(t)?lt(t,function(r,o){ee(e,o,r)}):Ie(e,function(r){Pn(n)||n===""?Ve(r,t):r.setAttribute(t,String(n))})}function ht(e,t,n){var r=document.createElement(e);return t&&(Qe(t)?We(r,t):ee(r,t)),n&&zt(n,r),r}function ke(e,t,n){if(Wt(n))return getComputedStyle(e)[t];Pn(n)||(e.style[t]=""+n)}function Rt(e,t){ke(e,"display",t)}function kr(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function Re(e,t){return e.getAttribute(t)}function sr(e,t){return e&&e.classList.contains(t)}function Ee(e){return e.getBoundingClientRect()}function st(e){Ie(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function Rr(e){return Nt(new DOMParser().parseFromString(e,"text/html").body)}function Me(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function Or(e,t){return e&&e.querySelector(t)}function zn(e,t){return t?tt(e.querySelectorAll(t)):[]}function De(e,t){He(e,t,!1)}function Ln(e){return e.timeStamp}function it(e){return Qe(e)?e:e?e+"px":""}var jt="splide",Nn="data-"+jt;function Lt(e,t){if(!e)throw new Error("["+jt+"] "+(t||""))}var et=Math.min,rn=Math.max,on=Math.floor,Ot=Math.ceil,Te=Math.abs;function Br(e,t,n){return Te(e-t)<n}function en(e,t,n,r){var o=et(t,n),a=rn(t,n);return r?o<e&&e<a:o<=e&&e<=a}function gt(e,t,n){var r=et(t,n),o=rn(t,n);return et(rn(r,e),o)}function En(e){return+(e>0)-+(e<0)}function An(e,t){return Ie(t,function(n){e=e.replace("%s",""+n)}),e}function jn(e){return e<10?"0"+e:""+e}var cr={};function di(e){return""+e+jn(cr[e]=(cr[e]||0)+1)}function Pr(){var e=[];function t(i,c,s,d){o(i,c,function(l,C,b){var g="addEventListener"in l,u=g?l.removeEventListener.bind(l,C,s,d):l.removeListener.bind(l,s);g?l.addEventListener(C,s,d):l.addListener(s),e.push([l,C,b,s,u])})}function n(i,c,s){o(i,c,function(d,l,C){e=e.filter(function(b){return b[0]===d&&b[1]===l&&b[2]===C&&(!s||b[3]===s)?(b[4](),!1):!0})})}function r(i,c,s){var d,l=!0;return typeof CustomEvent=="function"?d=new CustomEvent(c,{bubbles:l,detail:s}):(d=document.createEvent("CustomEvent"),d.initCustomEvent(c,l,!1,s)),i.dispatchEvent(d),d}function o(i,c,s){Ie(i,function(d){d&&Ie(c,function(l){l.split(" ").forEach(function(C){var b=C.split(".");s(d,b[0],b[1])})})})}function a(){e.forEach(function(i){i[4]()}),Xe(e)}return{bind:t,unbind:n,dispatch:r,destroy:a}}var nt="mounted",In="ready",qe="move",$t="moved",Mn="click",Wr="active",Vr="inactive",zr="visible",Nr="hidden",ve="refresh",$e="updated",St="resize",cn="resized",jr="drag",Mr="dragging",Hr="dragged",un="scroll",ut="scrolled",gi="overflow",Hn="destroy",Dr="arrows:mounted",Gr="arrows:updated",Ur="pagination:mounted",Xr="pagination:updated",Dn="navigation:mounted",Gn="autoplay:play",qr="autoplay:playing",Un="autoplay:pause",Xn="lazyload:loaded",Yr="sk",Kr="sh",an="ei";function be(e){var t=e?e.event.bus:document.createDocumentFragment(),n=Pr();function r(a,i){n.bind(t,Vt(a).join(" "),function(c){i.apply(i,Bn(c.detail)?c.detail:[])})}function o(a){n.dispatch(t,a,tt(arguments,1))}return e&&e.event.on(Hn,n.destroy),kt(n,{bus:t,on:r,off:me(n.unbind,t),emit:o})}function pn(e,t,n,r){var o=Date.now,a,i=0,c,s=!0,d=0;function l(){if(!s){if(i=e?et((o()-a)/e,1):1,n&&n(i),i>=1&&(t(),a=o(),r&&++d>=r))return b();c=ar(l)}}function C(y){y||u(),a=o()-(y?i*e:0),s=!1,c=ar(l)}function b(){s=!0}function g(){a=o(),i=0,n&&n(i)}function u(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function m(y){e=y}function S(){return s}return{start:C,rewind:g,pause:b,cancel:u,set:m,isPaused:S}}function mi(e){var t=e;function n(o){t=o}function r(o){return Wn(Vt(o),t)}return{set:n,is:r}}function fi(e,t){var n=pn(0,e,null,1);return function(){n.isPaused()&&n.start()}}function hi(e,t,n){var r=e.state,o=n.breakpoints||{},a=n.reducedMotion||{},i=Pr(),c=[];function s(){var u=n.mediaQuery==="min";Ft(o).sort(function(m,S){return u?+m-+S:+S-+m}).forEach(function(m){l(o[m],"("+(u?"min":"max")+"-width:"+m+"px)")}),l(a,ir),C()}function d(u){u&&i.destroy()}function l(u,m){var S=matchMedia(m);i.bind(S,"change",C),c.push([u,S])}function C(){var u=r.is(nn),m=n.direction,S=c.reduce(function(y,v){return Je(y,v[1].matches?v[0]:{})},{});lr(n),g(S),n.destroy?e.destroy(n.destroy==="completely"):u?(d(!0),e.mount()):m!==n.direction&&e.refresh()}function b(u){matchMedia(ir).matches&&(u?Je(n,a):lr(n,Ft(a)))}function g(u,m,S){Je(n,u),m&&Je(Object.getPrototypeOf(n),u),(S||!r.is(ft))&&e.emit($e,n)}return{setup:s,destroy:d,reduce:b,set:g}}var dn="Arrow",gn=dn+"Left",mn=dn+"Right",Jr=dn+"Up",Zr=dn+"Down",ur="rtl",fn="ttb",Sn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Jr,mn],ArrowRight:[Zr,gn]};function yi(e,t,n){function r(a,i,c){c=c||n.direction;var s=c===ur&&!i?1:c===fn?0:-1;return Sn[a]&&Sn[a][s]||a.replace(/width|left|right/i,function(d,l){var C=Sn[d.toLowerCase()][s]||d;return l>0?C.charAt(0).toUpperCase()+C.slice(1):C})}function o(a){return a*(n.direction===ur?1:-1)}return{resolve:r,orient:o}}var Ue="role",yt="tabindex",bi="disabled",Oe="aria-",Mt=Oe+"controls",Qr=Oe+"current",pr=Oe+"selected",Ae=Oe+"label",qn=Oe+"labelledby",eo=Oe+"hidden",Yn=Oe+"orientation",Bt=Oe+"roledescription",dr=Oe+"live",gr=Oe+"busy",mr=Oe+"atomic",Kn=[Ue,yt,bi,Mt,Qr,Ae,qn,eo,Yn,Bt],ze=jt+"__",rt="is-",xn=jt,fr=ze+"track",vi=ze+"list",hn=ze+"slide",to=hn+"--clone",Si=hn+"__container",Jn=ze+"arrows",yn=ze+"arrow",no=yn+"--prev",ro=yn+"--next",bn=ze+"pagination",oo=bn+"__page",xi=ze+"progress",Ci=xi+"__bar",$i=ze+"toggle",wi=ze+"spinner",_i=ze+"sr",Ti=rt+"initialized",ct=rt+"active",io=rt+"prev",ao=rt+"next",Fn=rt+"visible",kn=rt+"loading",lo=rt+"focus-in",so=rt+"overflow",Li=[ct,Fn,io,ao,kn,lo,so],Ei={slide:hn,clone:to,arrows:Jn,arrow:yn,prev:no,next:ro,pagination:bn,page:oo,spinner:wi};function Ai(e,t){if(Ar(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!It(n,t);)n=n.parentElement;return n}var Ii=5,hr=200,co="touchstart mousedown",Cn="touchmove mousemove",$n="touchend touchcancel mouseup click";function Fi(e,t,n){var r=be(e),o=r.on,a=r.bind,i=e.root,c=n.i18n,s={},d=[],l=[],C=[],b,g,u;function m(){$(),M(),v()}function S(){o(ve,y),o(ve,m),o($e,v),a(document,co+" keydown",function(f){u=f.type==="keydown"},{capture:!0}),a(i,"focusin",function(){He(i,lo,!!u)})}function y(f){var T=Kn.concat("style");Xe(d),De(i,l),De(b,C),Ve([b,g],T),Ve(i,f?T:["style",Bt])}function v(){De(i,l),De(b,C),l=w(xn),C=w(fr),We(i,l),We(b,C),ee(i,Ae,n.label),ee(i,qn,n.labelledby)}function $(){b=P("."+fr),g=Nt(b,"."+vi),Lt(b&&g,"A track/list element is missing."),Qt(d,Fr(g,"."+hn+":not(."+to+")")),lt({arrows:Jn,pagination:bn,prev:no,next:ro,bar:Ci,toggle:$i},function(f,T){s[T]=P("."+f)}),kt(s,{root:i,track:b,list:g,slides:d})}function M(){var f=i.id||di(jt),T=n.role;i.id=f,b.id=b.id||f+"-track",g.id=g.id||f+"-list",!Re(i,Ue)&&i.tagName!=="SECTION"&&T&&ee(i,Ue,T),ee(i,Bt,c.carousel),ee(g,Ue,"presentation")}function P(f){var T=Or(i,f);return T&&Ai(T,"."+xn)===i?T:void 0}function w(f){return[f+"--"+n.type,f+"--"+n.direction,n.drag&&f+"--draggable",n.isNavigation&&f+"--nav",f===xn&&ct]}return kt(s,{setup:m,mount:S,destroy:y})}var xt="slide",wt="loop",Ht="fade";function ki(e,t,n,r){var o=be(e),a=o.on,i=o.emit,c=o.bind,s=e.Components,d=e.root,l=e.options,C=l.isNavigation,b=l.updateOnMove,g=l.i18n,u=l.pagination,m=l.slideFocus,S=s.Direction.resolve,y=Re(r,"style"),v=Re(r,Ae),$=n>-1,M=Nt(r,"."+Si),P;function w(){$||(r.id=d.id+"-slide"+jn(t+1),ee(r,Ue,u?"tabpanel":"group"),ee(r,Bt,g.slide),ee(r,Ae,v||An(g.slideLabel,[t+1,e.length]))),f()}function f(){c(r,"click",me(i,Mn,F)),c(r,"keydown",me(i,Yr,F)),a([$t,Kr,ut],L),a(Dn,A),b&&a(qe,z)}function T(){P=!0,o.destroy(),De(r,Li),Ve(r,Kn),ee(r,"style",y),ee(r,Ae,v||"")}function A(){var I=e.splides.map(function(_){var B=_.splide.Components.Slides.getAt(t);return B?B.slide.id:""}).join(" ");ee(r,Ae,An(g.slideX,($?n:t)+1)),ee(r,Mt,I),ee(r,Ue,m?"button":""),m&&Ve(r,Bt)}function z(){P||L()}function L(){if(!P){var I=e.index;k(),W(),He(r,io,t===I-1),He(r,ao,t===I+1)}}function k(){var I=H();I!==sr(r,ct)&&(He(r,ct,I),ee(r,Qr,C&&I||""),i(I?Wr:Vr,F))}function W(){var I=h(),_=!I&&(!H()||$);if(e.state.is([Ct,Pt])||ee(r,eo,_||""),ee(zn(r,l.focusableNodes||""),yt,_?-1:""),m&&ee(r,yt,_?-1:0),I!==sr(r,Fn)&&(He(r,Fn,I),i(I?zr:Nr,F)),!I&&document.activeElement===r){var B=s.Slides.getAt(e.index);B&&kr(B.slide)}}function D(I,_,B){ke(B&&M||r,I,_)}function H(){var I=e.index;return I===t||l.cloneStatus&&I===n}function h(){if(e.is(Ht))return H();var I=Ee(s.Elements.track),_=Ee(r),B=S("left",!0),X=S("right",!0);return on(I[B])<=Ot(_[B])&&on(_[X])<=Ot(I[X])}function O(I,_){var B=Te(I-t);return!$&&(l.rewind||e.is(wt))&&(B=et(B,e.length-B)),B<=_}var F={index:t,slideIndex:n,slide:r,container:M,isClone:$,mount:w,destroy:T,update:L,style:D,isWithin:O};return F}function Ri(e,t,n){var r=be(e),o=r.on,a=r.emit,i=r.bind,c=t.Elements,s=c.slides,d=c.list,l=[];function C(){b(),o(ve,g),o(ve,b)}function b(){s.forEach(function(L,k){m(L,k,-1)})}function g(){P(function(L){L.destroy()}),Xe(l)}function u(){P(function(L){L.update()})}function m(L,k,W){var D=ki(e,k,W,L);D.mount(),l.push(D),l.sort(function(H,h){return H.index-h.index})}function S(L){return L?w(function(k){return!k.isClone}):l}function y(L){var k=t.Controller,W=k.toIndex(L),D=k.hasFocus()?1:n.perPage;return w(function(H){return en(H.index,W,W+D-1)})}function v(L){return w(L)[0]}function $(L,k){Ie(L,function(W){if(Qe(W)&&(W=Rr(W)),Ir(W)){var D=s[k];D?Vn(W,D):zt(d,W),We(W,n.classes.slide),T(W,me(a,St))}}),a(ve)}function M(L){st(w(L).map(function(k){return k.slide})),a(ve)}function P(L,k){S(k).forEach(L)}function w(L){return l.filter(Ar(L)?L:function(k){return Qe(L)?It(k.slide,L):Wn(Vt(L),k.index)})}function f(L,k,W){P(function(D){D.style(L,k,W)})}function T(L,k){var W=zn(L,"img"),D=W.length;D?W.forEach(function(H){i(H,"load error",function(){--D||k()})}):k()}function A(L){return L?s.length:l.length}function z(){return l.length>n.perPage}return{mount:C,destroy:g,update:u,register:m,get:S,getIn:y,getAt:v,add:$,remove:M,forEach:P,filter:w,style:f,getLength:A,isEnough:z}}function Oi(e,t,n){var r=be(e),o=r.on,a=r.bind,i=r.emit,c=t.Slides,s=t.Direction.resolve,d=t.Elements,l=d.root,C=d.track,b=d.list,g=c.getAt,u=c.style,m,S,y;function v(){$(),a(window,"resize load",fi(me(i,St))),o([$e,ve],$),o(St,M)}function $(){m=n.direction===fn,ke(l,"maxWidth",it(n.width)),ke(C,s("paddingLeft"),P(!1)),ke(C,s("paddingRight"),P(!0)),M(!0)}function M(F){var I=Ee(l);(F||S.width!==I.width||S.height!==I.height)&&(ke(C,"height",w()),u(s("marginRight"),it(n.gap)),u("width",T()),u("height",A(),!0),S=I,i(cn),y!==(y=O())&&(He(l,so,y),i(gi,y)))}function P(F){var I=n.padding,_=s(F?"right":"left");return I&&it(I[_]||(At(I)?0:I))||"0px"}function w(){var F="";return m&&(F=f(),Lt(F,"height or heightRatio is missing."),F="calc("+F+" - "+P(!1)+" - "+P(!0)+")"),F}function f(){return it(n.height||Ee(b).width*n.heightRatio)}function T(){return n.autoWidth?null:it(n.fixedWidth)||(m?"":z())}function A(){return it(n.fixedHeight)||(m?n.autoHeight?null:z():f())}function z(){var F=it(n.gap);return"calc((100%"+(F&&" + "+F)+")/"+(n.perPage||1)+(F&&" - "+F)+")"}function L(){return Ee(b)[s("width")]}function k(F,I){var _=g(F||0);return _?Ee(_.slide)[s("width")]+(I?0:H()):0}function W(F,I){var _=g(F);if(_){var B=Ee(_.slide)[s("right")],X=Ee(b)[s("left")];return Te(B-X)+(I?0:H())}return 0}function D(F){return W(e.length-1)-W(0)+k(0,F)}function H(){var F=g(0);return F&&parseFloat(ke(F.slide,s("marginRight")))||0}function h(F){return parseFloat(ke(C,s("padding"+(F?"Right":"Left"))))||0}function O(){return e.is(Ht)||D(!0)>L()}return{mount:v,resize:M,listSize:L,slideSize:k,sliderSize:D,totalSize:W,getPadding:h,isOverflow:O}}var Bi=2;function Pi(e,t,n){var r=be(e),o=r.on,a=t.Elements,i=t.Slides,c=t.Direction.resolve,s=[],d;function l(){o(ve,C),o([$e,St],g),(d=S())&&(u(d),t.Layout.resize(!0))}function C(){b(),l()}function b(){st(s),Xe(s),r.destroy()}function g(){var y=S();d!==y&&(d<y||!y)&&r.emit(ve)}function u(y){var v=i.get().slice(),$=v.length;if($){for(;v.length<y;)Qt(v,v);Qt(v.slice(-y),v.slice(0,y)).forEach(function(M,P){var w=P<y,f=m(M.slide,P);w?Vn(f,v[0].slide):zt(a.list,f),Qt(s,f),i.register(f,P-y+(w?0:$),M.index)})}}function m(y,v){var $=y.cloneNode(!0);return We($,n.classes.clone),$.id=e.root.id+"-clone"+jn(v+1),$}function S(){var y=n.clones;if(!e.is(wt))y=0;else if(Wt(y)){var v=n[c("fixedWidth")]&&t.Layout.slideSize(0),$=v&&Ot(Ee(a.track)[c("width")]/v);y=$||n[c("autoWidth")]&&e.length||n.perPage*Bi}return y}return{mount:l,destroy:b}}function Wi(e,t,n){var r=be(e),o=r.on,a=r.emit,i=e.state.set,c=t.Layout,s=c.slideSize,d=c.getPadding,l=c.totalSize,C=c.listSize,b=c.sliderSize,g=t.Direction,u=g.resolve,m=g.orient,S=t.Elements,y=S.list,v=S.track,$;function M(){$=t.Transition,o([nt,cn,$e,ve],P)}function P(){t.Controller.isBusy()||(t.Scroll.cancel(),f(e.index),t.Slides.update())}function w(_,B,X,ie){_!==B&&F(_>X)&&(L(),T(z(D(),_>X),!0)),i(Ct),a(qe,B,X,_),$.start(B,function(){i(vt),a($t,B,X,_),ie&&ie()})}function f(_){T(W(_,!0))}function T(_,B){if(!e.is(Ht)){var X=B?_:A(_);ke(y,"transform","translate"+u("X")+"("+X+"px)"),_!==X&&a(Kr)}}function A(_){if(e.is(wt)){var B=k(_),X=B>t.Controller.getEnd(),ie=B<0;(ie||X)&&(_=z(_,X))}return _}function z(_,B){var X=_-O(B),ie=b();return _-=m(ie*(Ot(Te(X)/ie)||1))*(B?1:-1),_}function L(){T(D(),!0),$.cancel()}function k(_){for(var B=t.Slides.get(),X=0,ie=1/0,ne=0;ne<B.length;ne++){var se=B[ne].index,R=Te(W(se,!0)-_);if(R<=ie)ie=R,X=se;else break}return X}function W(_,B){var X=m(l(_-1)-h(_));return B?H(X):X}function D(){var _=u("left");return Ee(y)[_]-Ee(v)[_]+m(d(!1))}function H(_){return n.trimSpace&&e.is(xt)&&(_=gt(_,0,m(b(!0)-C()))),_}function h(_){var B=n.focus;return B==="center"?(C()-s(_,!0))/2:+B*s(_)||0}function O(_){return W(_?t.Controller.getEnd():0,!!n.trimSpace)}function F(_){var B=m(z(D(),_));return _?B>=0:B<=y[u("scrollWidth")]-Ee(v)[u("width")]}function I(_,B){B=Wt(B)?D():B;var X=_!==!0&&m(B)<m(O(!1)),ie=_!==!1&&m(B)>m(O(!0));return X||ie}return{mount:M,move:w,jump:f,translate:T,shift:z,cancel:L,toIndex:k,toPosition:W,getPosition:D,getLimit:O,exceededLimit:I,reposition:P}}function Vi(e,t,n){var r=be(e),o=r.on,a=r.emit,i=t.Move,c=i.getPosition,s=i.getLimit,d=i.toPosition,l=t.Slides,C=l.isEnough,b=l.getLength,g=n.omitEnd,u=e.is(wt),m=e.is(xt),S=me(D,!1),y=me(D,!0),v=n.start||0,$,M=v,P,w,f;function T(){A(),o([$e,ve,an],A),o(cn,z)}function A(){P=b(!0),w=n.perMove,f=n.perPage,$=F();var R=gt(v,0,g?$:P-1);R!==v&&(v=R,i.reposition())}function z(){$!==F()&&a(an)}function L(R,K,fe){if(!se()){var ce=W(R),de=O(ce);de>-1&&(K||de!==v)&&(X(de),i.move(ce,de,M,fe))}}function k(R,K,fe,ce){t.Scroll.scroll(R,K,fe,function(){var de=O(i.toIndex(c()));X(g?et(de,$):de),ce&&ce()})}function W(R){var K=v;if(Qe(R)){var fe=R.match(/([+\-<>])(\d+)?/)||[],ce=fe[1],de=fe[2];ce==="+"||ce==="-"?K=H(v+ +(""+ce+(+de||1)),v):ce===">"?K=de?I(+de):S(!0):ce==="<"&&(K=y(!0))}else K=u?R:gt(R,0,$);return K}function D(R,K){var fe=w||(ne()?1:f),ce=H(v+fe*(R?-1:1),v,!(w||ne()));return ce===-1&&m&&!Br(c(),s(!R),1)?R?0:$:K?ce:O(ce)}function H(R,K,fe){if(C()||ne()){var ce=h(R);ce!==R&&(K=R,R=ce,fe=!1),R<0||R>$?!w&&(en(0,R,K,!0)||en($,K,R,!0))?R=I(_(R)):u?R=fe?R<0?-(P%f||f):P:R:n.rewind?R=R<0?$:0:R=-1:fe&&R!==K&&(R=I(_(K)+(R<K?-1:1)))}else R=-1;return R}function h(R){if(m&&n.trimSpace==="move"&&R!==v)for(var K=c();K===d(R,!0)&&en(R,0,e.length-1,!n.rewind);)R<v?--R:++R;return R}function O(R){return u?(R+P)%P||0:R}function F(){for(var R=P-(ne()||u&&w?1:f);g&&R-- >0;)if(d(P-1,!0)!==d(R,!0)){R++;break}return gt(R,0,P-1)}function I(R){return gt(ne()?R:f*R,0,$)}function _(R){return ne()?et(R,$):on((R>=$?P-1:R)/f)}function B(R){var K=i.toIndex(R);return m?gt(K,0,$):K}function X(R){R!==v&&(M=v,v=R)}function ie(R){return R?M:v}function ne(){return!Wt(n.focus)||n.isNavigation}function se(){return e.state.is([Ct,Pt])&&!!n.waitForTransition}return{mount:T,go:L,scroll:k,getNext:S,getPrev:y,getAdjacent:D,getEnd:F,setIndex:X,getIndex:ie,toIndex:I,toPage:_,toDest:B,hasFocus:ne,isBusy:se}}var zi="http://www.w3.org/2000/svg",Ni="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",Xt=40;function ji(e,t,n){var r=be(e),o=r.on,a=r.bind,i=r.emit,c=n.classes,s=n.i18n,d=t.Elements,l=t.Controller,C=d.arrows,b=d.track,g=C,u=d.prev,m=d.next,S,y,v={};function $(){P(),o($e,M)}function M(){w(),$()}function P(){var k=n.arrows;k&&!(u&&m)&&A(),u&&m&&(kt(v,{prev:u,next:m}),Rt(g,k?"":"none"),We(g,y=Jn+"--"+n.direction),k&&(f(),L(),ee([u,m],Mt,b.id),i(Dr,u,m)))}function w(){r.destroy(),De(g,y),S?(st(C?[u,m]:g),u=m=null):Ve([u,m],Kn)}function f(){o([nt,$t,ve,ut,an],L),a(m,"click",me(T,">")),a(u,"click",me(T,"<"))}function T(k){l.go(k,!0)}function A(){g=C||ht("div",c.arrows),u=z(!0),m=z(!1),S=!0,zt(g,[u,m]),!C&&Vn(g,b)}function z(k){var W='<button class="'+c.arrow+" "+(k?c.prev:c.next)+'" type="button"><svg xmlns="'+zi+'" viewBox="0 0 '+Xt+" "+Xt+'" width="'+Xt+'" height="'+Xt+'" focusable="false"><path d="'+(n.arrowPath||Ni)+'" />';return Rr(W)}function L(){if(u&&m){var k=e.index,W=l.getPrev(),D=l.getNext(),H=W>-1&&k<W?s.last:s.prev,h=D>-1&&k>D?s.first:s.next;u.disabled=W<0,m.disabled=D<0,ee(u,Ae,H),ee(m,Ae,h),i(Gr,u,m,W,D)}}return{arrows:v,mount:$,destroy:w,update:L}}var Mi=Nn+"-interval";function Hi(e,t,n){var r=be(e),o=r.on,a=r.bind,i=r.emit,c=pn(n.interval,e.go.bind(e,">"),f),s=c.isPaused,d=t.Elements,l=t.Elements,C=l.root,b=l.toggle,g=n.autoplay,u,m,S=g==="pause";function y(){g&&(v(),b&&ee(b,Mt,d.track.id),S||$(),w())}function v(){n.pauseOnHover&&a(C,"mouseenter mouseleave",function(A){u=A.type==="mouseenter",P()}),n.pauseOnFocus&&a(C,"focusin focusout",function(A){m=A.type==="focusin",P()}),b&&a(b,"click",function(){S?$():M(!0)}),o([qe,un,ve],c.rewind),o(qe,T)}function $(){s()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),m=u=S=!1,w(),i(Gn))}function M(A){A===void 0&&(A=!0),S=!!A,w(),s()||(c.pause(),i(Un))}function P(){S||(u||m?M(!1):$())}function w(){b&&(He(b,ct,!S),ee(b,Ae,n.i18n[S?"play":"pause"]))}function f(A){var z=d.bar;z&&ke(z,"width",A*100+"%"),i(qr,A)}function T(A){var z=t.Slides.getAt(A);c.set(z&&+Re(z.slide,Mi)||n.interval)}return{mount:y,destroy:c.cancel,play:$,pause:M,isPaused:s}}function Di(e,t,n){var r=be(e),o=r.on;function a(){n.cover&&(o(Xn,me(c,!0)),o([nt,$e,ve],me(i,!0)))}function i(s){t.Slides.forEach(function(d){var l=Nt(d.container||d.slide,"img");l&&l.src&&c(s,l,d)})}function c(s,d,l){l.style("background",s?'center/cover no-repeat url("'+d.src+'")':"",!0),Rt(d,s?"none":"")}return{mount:a,destroy:me(i,!1)}}var Gi=10,Ui=600,Xi=.6,qi=1.5,Yi=800;function Ki(e,t,n){var r=be(e),o=r.on,a=r.emit,i=e.state.set,c=t.Move,s=c.getPosition,d=c.getLimit,l=c.exceededLimit,C=c.translate,b=e.is(xt),g,u,m=1;function S(){o(qe,M),o([$e,ve],P)}function y(f,T,A,z,L){var k=s();if(M(),A&&(!b||!l())){var W=t.Layout.sliderSize(),D=En(f)*W*on(Te(f)/W)||0;f=c.toPosition(t.Controller.toDest(f%W))+D}var H=Br(k,f,1);m=1,T=H?0:T||rn(Te(f-k)/qi,Yi),u=z,g=pn(T,v,me($,k,f,L),1),i(Pt),a(un),g.start()}function v(){i(vt),u&&u(),a(ut)}function $(f,T,A,z){var L=s(),k=f+(T-f)*w(z),W=(k-L)*m;C(L+W),b&&!A&&l()&&(m*=Xi,Te(W)<Gi&&y(d(l(!0)),Ui,!1,u,!0))}function M(){g&&g.cancel()}function P(){g&&!g.isPaused()&&(M(),v())}function w(f){var T=n.easingFunc;return T?T(f):1-Math.pow(1-f,4)}return{mount:S,destroy:M,scroll:y,cancel:P}}var mt={passive:!1,capture:!0};function Ji(e,t,n){var r=be(e),o=r.on,a=r.emit,i=r.bind,c=r.unbind,s=e.state,d=t.Move,l=t.Scroll,C=t.Controller,b=t.Elements.track,g=t.Media.reduce,u=t.Direction,m=u.resolve,S=u.orient,y=d.getPosition,v=d.exceededLimit,$,M,P,w,f,T=!1,A,z,L;function k(){i(b,Cn,Tn,mt),i(b,$n,Tn,mt),i(b,co,D,mt),i(b,"click",O,{capture:!0}),i(b,"dragstart",Me),o([nt,$e],W)}function W(){var j=n.drag;Be(!j),w=j==="free"}function D(j){if(A=!1,!z){var x=de(j);ce(j.target)&&(x||!j.button)&&(C.isBusy()?Me(j,!0):(L=x?b:window,f=s.is([Ct,Pt]),P=null,i(L,Cn,H,mt),i(L,$n,h,mt),d.cancel(),l.cancel(),F(j)))}}function H(j){if(s.is(Zt)||(s.set(Zt),a(jr)),j.cancelable)if(f){d.translate($+fe(ne(j)));var x=se(j)>hr,G=T!==(T=v());(x||G)&&F(j),A=!0,a(Mr),Me(j)}else B(j)&&(f=_(j),Me(j))}function h(j){s.is(Zt)&&(s.set(vt),a(Hr)),f&&(I(j),Me(j)),c(L,Cn,H),c(L,$n,h),f=!1}function O(j){!z&&A&&Me(j,!0)}function F(j){P=M,M=j,$=y()}function I(j){var x=X(j),G=ie(x),q=n.rewind&&n.rewindByDrag;g(!1),w?C.scroll(G,0,n.snap):e.is(Ht)?C.go(S(En(x))<0?q?"<":"-":q?">":"+"):e.is(xt)&&T&&q?C.go(v(!0)?">":"<"):C.go(C.toDest(G),!0),g(!0)}function _(j){var x=n.dragMinThreshold,G=At(x),q=G&&x.mouse||0,J=(G?x.touch:+x)||10;return Te(ne(j))>(de(j)?J:q)}function B(j){return Te(ne(j))>Te(ne(j,!0))}function X(j){if(e.is(wt)||!T){var x=se(j);if(x&&x<hr)return ne(j)/x}return 0}function ie(j){return y()+En(j)*et(Te(j)*(n.flickPower||600),w?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function ne(j,x){return K(j,x)-K(R(j),x)}function se(j){return Ln(j)-Ln(R(j))}function R(j){return M===j&&P||M}function K(j,x){return(de(j)?j.changedTouches[0]:j)["page"+m(x?"Y":"X")]}function fe(j){return j/(T&&e.is(xt)?Ii:1)}function ce(j){var x=n.noDrag;return!It(j,"."+oo+", ."+yn)&&(!x||!It(j,x))}function de(j){return typeof TouchEvent<"u"&&j instanceof TouchEvent}function Se(){return f}function Be(j){z=j}return{mount:k,disable:Be,isDragging:Se}}var Zi={Spacebar:" ",Right:mn,Left:gn,Up:Jr,Down:Zr};function Zn(e){return e=Qe(e)?e:e.key,Zi[e]||e}var yr="keydown";function Qi(e,t,n){var r=be(e),o=r.on,a=r.bind,i=r.unbind,c=e.root,s=t.Direction.resolve,d,l;function C(){b(),o($e,g),o($e,b),o(qe,m)}function b(){var y=n.keyboard;y&&(d=y==="global"?window:c,a(d,yr,S))}function g(){i(d,yr)}function u(y){l=y}function m(){var y=l;l=!0,Er(function(){l=y})}function S(y){if(!l){var v=Zn(y);v===s(gn)?e.go("<"):v===s(mn)&&e.go(">")}}return{mount:C,destroy:g,disable:u}}var Et=Nn+"-lazy",tn=Et+"-srcset",ea="["+Et+"], ["+tn+"]";function ta(e,t,n){var r=be(e),o=r.on,a=r.off,i=r.bind,c=r.emit,s=n.lazyLoad==="sequential",d=[$t,ut],l=[];function C(){n.lazyLoad&&(b(),o(ve,b))}function b(){Xe(l),g(),s?y():(a(d),o(d,u),u())}function g(){t.Slides.forEach(function(v){zn(v.slide,ea).forEach(function($){var M=Re($,Et),P=Re($,tn);if(M!==$.src||P!==$.srcset){var w=n.classes.spinner,f=$.parentElement,T=Nt(f,"."+w)||ht("span",w,f);l.push([$,v,T]),$.src||Rt($,"none")}})})}function u(){l=l.filter(function(v){var $=n.perPage*((n.preloadPages||1)+1)-1;return v[1].isWithin(e.index,$)?m(v):!0}),l.length||a(d)}function m(v){var $=v[0];We(v[1].slide,kn),i($,"load error",me(S,v)),ee($,"src",Re($,Et)),ee($,"srcset",Re($,tn)),Ve($,Et),Ve($,tn)}function S(v,$){var M=v[0],P=v[1];De(P.slide,kn),$.type!=="error"&&(st(v[2]),Rt(M,""),c(Xn,M,P),c(St)),s&&y()}function y(){l.length&&m(l.shift())}return{mount:C,destroy:me(Xe,l),check:u}}function na(e,t,n){var r=be(e),o=r.on,a=r.emit,i=r.bind,c=t.Slides,s=t.Elements,d=t.Controller,l=d.hasFocus,C=d.getIndex,b=d.go,g=t.Direction.resolve,u=s.pagination,m=[],S,y;function v(){$(),o([$e,ve,an],v);var z=n.pagination;u&&Rt(u,z?"":"none"),z&&(o([qe,un,ut],A),M(),A(),a(Ur,{list:S,items:m},T(e.index)))}function $(){S&&(st(u?tt(S.children):S),De(S,y),Xe(m),S=null),r.destroy()}function M(){var z=e.length,L=n.classes,k=n.i18n,W=n.perPage,D=l()?d.getEnd()+1:Ot(z/W);S=u||ht("ul",L.pagination,s.track.parentElement),We(S,y=bn+"--"+f()),ee(S,Ue,"tablist"),ee(S,Ae,k.select),ee(S,Yn,f()===fn?"vertical":"");for(var H=0;H<D;H++){var h=ht("li",null,S),O=ht("button",{class:L.page,type:"button"},h),F=c.getIn(H).map(function(_){return _.slide.id}),I=!l()&&W>1?k.pageX:k.slideX;i(O,"click",me(P,H)),n.paginationKeyboard&&i(O,"keydown",me(w,H)),ee(h,Ue,"presentation"),ee(O,Ue,"tab"),ee(O,Mt,F.join(" ")),ee(O,Ae,An(I,H+1)),ee(O,yt,-1),m.push({li:h,button:O,page:H})}}function P(z){b(">"+z,!0)}function w(z,L){var k=m.length,W=Zn(L),D=f(),H=-1;W===g(mn,!1,D)?H=++z%k:W===g(gn,!1,D)?H=(--z+k)%k:W==="Home"?H=0:W==="End"&&(H=k-1);var h=m[H];h&&(kr(h.button),b(">"+H),Me(L,!0))}function f(){return n.paginationDirection||n.direction}function T(z){return m[d.toPage(z)]}function A(){var z=T(C(!0)),L=T(C());if(z){var k=z.button;De(k,ct),Ve(k,pr),ee(k,yt,-1)}if(L){var W=L.button;We(W,ct),ee(W,pr,!0),ee(W,yt,"")}a(Xr,{list:S,items:m},z,L)}return{items:m,mount:v,destroy:$,getAt:T,update:A}}var ra=[" ","Enter"];function oa(e,t,n){var r=n.isNavigation,o=n.slideFocus,a=[];function i(){e.splides.forEach(function(u){u.isParent||(d(e,u.splide),d(u.splide,e))}),r&&l()}function c(){a.forEach(function(u){u.destroy()}),Xe(a)}function s(){c(),i()}function d(u,m){var S=be(u);S.on(qe,function(y,v,$){m.go(m.is(wt)?$:y)}),a.push(S)}function l(){var u=be(e),m=u.on;m(Mn,b),m(Yr,g),m([nt,$e],C),a.push(u),u.emit(Dn,e.splides)}function C(){ee(t.Elements.list,Yn,n.direction===fn?"vertical":"")}function b(u){e.go(u.index)}function g(u,m){Wn(ra,Zn(m))&&(b(u),Me(m))}return{setup:me(t.Media.set,{slideFocus:Wt(o)?r:o},!0),mount:i,destroy:c,remount:s}}function ia(e,t,n){var r=be(e),o=r.bind,a=0;function i(){n.wheel&&o(t.Elements.track,"wheel",c,mt)}function c(d){if(d.cancelable){var l=d.deltaY,C=l<0,b=Ln(d),g=n.wheelMinThreshold||0,u=n.wheelSleep||0;Te(l)>g&&b-a>u&&(e.go(C?"<":">"),a=b),s(C)&&Me(d)}}function s(d){return!n.releaseWheel||e.state.is(Ct)||t.Controller.getAdjacent(d)!==-1}return{mount:i}}var aa=90;function la(e,t,n){var r=be(e),o=r.on,a=t.Elements.track,i=n.live&&!n.isNavigation,c=ht("span",_i),s=pn(aa,me(l,!1));function d(){i&&(b(!t.Autoplay.isPaused()),ee(a,mr,!0),c.textContent="…",o(Gn,me(b,!0)),o(Un,me(b,!1)),o([$t,ut],me(l,!0)))}function l(g){ee(a,gr,g),g?(zt(a,c),s.start()):(st(c),s.cancel())}function C(){Ve(a,[dr,mr,gr]),st(c)}function b(g){i&&ee(a,dr,g?"off":"polite")}return{mount:d,disable:b,destroy:C}}var sa=Object.freeze({__proto__:null,Media:hi,Direction:yi,Elements:Fi,Slides:Ri,Layout:Oi,Clones:Pi,Move:Wi,Controller:Vi,Arrows:ji,Autoplay:Hi,Cover:Di,Scroll:Ki,Drag:Ji,Keyboard:Qi,LazyLoad:ta,Pagination:na,Sync:oa,Wheel:ia,Live:la}),ca={prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},ua={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Ei,i18n:ca,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function pa(e,t,n){var r=t.Slides;function o(){be(e).on([nt,ve],a)}function a(){r.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){r.style("transition","opacity "+n.speed+"ms "+n.easing),Er(s)}return{mount:o,start:i,cancel:Tn}}function da(e,t,n){var r=t.Move,o=t.Controller,a=t.Scroll,i=t.Elements.list,c=me(ke,i,"transition"),s;function d(){be(e).bind(i,"transitionend",function(g){g.target===i&&s&&(C(),s())})}function l(g,u){var m=r.toPosition(g,!0),S=r.getPosition(),y=b(g);Te(m-S)>=1&&y>=1?n.useScroll?a.scroll(m,y,!1,u):(c("transform "+y+"ms "+n.easing),r.translate(m,!0),s=u):(r.jump(g),u())}function C(){c(""),a.cancel()}function b(g){var u=n.rewindSpeed;if(e.is(xt)&&u){var m=o.getIndex(!0),S=o.getEnd();if(m===0&&g>=S||m>=S&&g===0)return u}return n.speed}return{mount:d,start:l,cancel:C}}var ga=(function(){function e(n,r){this.event=be(),this.Components={},this.state=mi(ft),this.splides=[],this._o={},this._E={};var o=Qe(n)?Or(document,n):n;Lt(o,o+" is invalid."),this.root=o,r=Je({label:Re(o,Ae)||"",labelledby:Re(o,qn)||""},ua,e.defaults,r||{});try{Je(r,JSON.parse(Re(o,Nn)))}catch{Lt(!1,"Invalid JSON")}this._o=Object.create(Je({},r))}var t=e.prototype;return t.mount=function(r,o){var a=this,i=this.state,c=this.Components;Lt(i.is([ft,nn]),"Already mounted!"),i.set(ft),this._C=c,this._T=o||this._T||(this.is(Ht)?pa:da),this._E=r||this._E;var s=kt({},sa,this._E,{Transition:this._T});return lt(s,function(d,l){var C=d(a,c,a._o);c[l]=C,C.setup&&C.setup()}),lt(c,function(d){d.mount&&d.mount()}),this.emit(nt),We(this.root,Ti),i.set(vt),this.emit(In),this},t.sync=function(r){return this.splides.push({splide:r}),r.splides.push({splide:this,isParent:!0}),this.state.is(vt)&&(this._C.Sync.remount(),r.Components.Sync.remount()),this},t.go=function(r){return this._C.Controller.go(r),this},t.on=function(r,o){return this.event.on(r,o),this},t.off=function(r){return this.event.off(r),this},t.emit=function(r){var o;return(o=this.event).emit.apply(o,[r].concat(tt(arguments,1))),this},t.add=function(r,o){return this._C.Slides.add(r,o),this},t.remove=function(r){return this._C.Slides.remove(r),this},t.is=function(r){return this._o.type===r},t.refresh=function(){return this.emit(ve),this},t.destroy=function(r){r===void 0&&(r=!0);var o=this.event,a=this.state;return a.is(ft)?be(this).on(In,this.destroy.bind(this,r)):(lt(this._C,function(i){i.destroy&&i.destroy(r)},!0),o.emit(Hn),o.destroy(),r&&Xe(this.splides),a.set(nn)),this},ci(e,[{key:"options",get:function(){return this._o},set:function(r){this._C.Media.set(r,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Qn=ga;Qn.defaults={};Qn.STATES=pi;var br=[[nt,"onMounted"],[In,"onReady"],[qe,"onMove"],[$t,"onMoved"],[Mn,"onClick"],[Wr,"onActive"],[Vr,"onInactive"],[zr,"onVisible"],[Nr,"onHidden"],[ve,"onRefresh"],[$e,"onUpdated"],[St,"onResize"],[cn,"onResized"],[jr,"onDrag"],[Mr,"onDragging"],[Hr,"onDragged"],[un,"onScroll"],[ut,"onScrolled"],[Hn,"onDestroy"],[Dr,"onArrowsMounted"],[Gr,"onArrowsUpdated"],[Ur,"onPaginationMounted"],[Xr,"onPaginationUpdated"],[Dn,"onNavigationMounted"],[Gn,"onAutoplayPlay"],[qr,"onAutoplayPlaying"],[Un,"onAutoplayPause"],[Xn,"onLazyLoadLoaded"]];function er(...e){return e.filter(Boolean).join(" ")}function ln(e){return e!==null&&typeof e=="object"}function Rn(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,r)=>!Rn(n,t[r]));if(ln(e)&&ln(t)){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Rn(e[o],t[o]))}return e===t}function ma(e,t){return e.length===t.length&&!e.some((n,r)=>n!==t[r])}function fa(e,t){if(e){const n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function On(e,t){const n=e;return fa(t,(r,o)=>{Array.isArray(r)?n[o]=r.slice():ln(r)?n[o]=On(ln(n[o])?n[o]:{},r):n[o]=r}),n}var ha=({children:e,className:t,...n})=>V.createElement("div",{className:er("splide__track",t),...n},V.createElement("ul",{className:"splide__list"},e)),tr=class extends V.Component{constructor(){super(...arguments),this.splideRef=V.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:r}=this.splideRef;r&&(this.splide=new Qn(r,e),this.bind(this.splide),this.splide.mount(t,n),this.options=On({},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&&!Rn(this.options,e)&&(this.splide.options=e,this.options=On({},e));const t=this.getSlides();ma(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){br.forEach(([t,n])=>{const r=this.props[n];typeof r=="function"&&e.on(t,(...o)=>{r(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:r,...o}=this.props;return V.createElement(t,{className:er("splide",e),ref:this.splideRef,...this.omit(o,["options",...br.map(a=>a[1])])},n?V.createElement(ha,null,r):r)}},nr=({children:e,className:t,...n})=>V.createElement("li",{className:er("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 ya="RichTextRenderer-module__link___BWeZ2",ba={link:ya},uo=({content:t})=>{const e=r=>r.map((n,o)=>n.type==="link"?d.jsx("a",{className:ba.link,href:n.value,target:n.target,children:e(n.children)},o):d.jsx("span",{style:va(n),children:n.text},o));return d.jsx(d.Fragment,{children:t.map((r,n)=>{const o=r.children;return d.jsx("div",{children:e(o)},n)})})};function va(t){return{...t.fontFamily&&{fontFamily:t.fontFamily},...t.fontWeight&&{fontWeight:t.fontWeight},...t.fontStyle&&{fontStyle:t.fontStyle},...t.textDecoration&&{textDecoration:t.textDecoration},...t.textTransform&&{textTransform:t.textTransform},...t.fontVariant&&{fontVariant:t.fontVariant},...t.verticalAlign&&{verticalAlign:t.verticalAlign,lineHeight:"0px"}}}const Sa="SvgImage-module__svg___q3xE-",xa="SvgImage-module__img___VsTm-",vn={svg:Sa,img:xa},Ca=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},$a=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,he=({url:t,fill:e="#000000",hoverFill:r="#CCCCCC",className:n="",style:o})=>{const[a,i]=z.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return z.useEffect(()=>{if(typeof window<"u"&&window.CSS){const s=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(s)}},[]),!Ca(t)||!a?d.jsx("img",{src:t,alt:"",className:ft(vn.img,n),style:o}):d.jsx("span",{"data-supports-mask":a,className:ft(vn.svg,n),style:{"--svg":$a(t),"--fill":e,"--hover-fill":r,...o??{}}})},wa={"top-left":U.topLeftAlignment,"top-center":U.topCenterAlignment,"top-right":U.topRightAlignment,"middle-left":U.middleLeftAlignment,"middle-center":U.middleCenterAlignment,"middle-right":U.middleRightAlignment,"bottom-left":U.bottomLeftAlignment,"bottom-center":U.bottomCenterAlignment,"bottom-right":U.bottomRightAlignment};function _a({settings:t,content:e,styles:r,isEditor:n}){const[o,a]=z.useState(null),{widthSettings:i,fontSettings:s,letterSpacing:c,textAlign:l,wordSpacing:u,fontSizeLineHeight:C,textAppearance:v,color:m}=r.imageCaption,[p,g]=z.useState(void 0),[S,h]=z.useState(null),[f,$]=z.useState(0),[M,T]=z.useState(0),{direction:w,transition:y,controls:L,pagination:I,imageCaption:V,triggers:R}=t,F=z.useRef(y.type),{x:W,y:H}=t.controls.offset,G=b=>{o&&o.go(b)};return z.useEffect(()=>{if(!S)return;const b=new ResizeObserver(P=>{if(!o)return;const[k]=P;g({width:Math.round(k.contentRect.width),height:Math.round(k.contentRect.height)})});return b.observe(S),()=>b.unobserve(S)},[S]),z.useEffect(()=>{!o||F.current===y.type||(T(b=>b+1),F.current=y.type)},[y.type]),d.jsx("div",{className:ft(U.wrapper,{[U.editor]:n}),ref:h,children:d.jsxs("div",{className:U.sliderInner,style:{width:p?p.width:"100%",height:p?p.height:"100%",backgroundColor:y.backgroundColor&&y.type==="fade in"?y.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&d.jsx("div",{className:ft(U.captionBlock),children:d.jsx("div",{className:U.captionTextWrapper,children:e.map((b,P)=>d.jsx("div",{className:ft(U.captionText,wa[V.alignment],{[U.withPointerEvents]:P===f&&n,[U.active]:P===f}),style:{fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontStyle:s.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,n),letterSpacing:E.scalingValue(c,n),wordSpacing:E.scalingValue(u,n),textAlign:l,fontSize:E.scalingValue(C.fontSize,n),lineHeight:E.scalingValue(C.lineHeight,n),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:m,transitionDuration:y.duration?`${Math.round(parseInt(y.duration)/2)}ms`:"500ms"},children:d.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-hover-color":V.linkHoverColor,"--link-color":V.linkColor,position:"relative",top:E.scalingValue(V.offset.y,n),left:E.scalingValue(V.offset.x,n)},children:d.jsx(uo,{content:b.imageCaption})})},P))})}),d.jsx(Qr,{onMove:b=>{$(b.index)},ref:a,options:{arrows:!1,speed:y.duration?parseInt(y.duration):500,autoplay:R.autoPlay!==null,...R.autoPlay!==null&&{interval:parseInt(R.autoPlay)*1e3},direction:w==="horiz"||y.type==="fade in"?"ltr":"ttb",pagination:!1,drag:R.triggersList.drag,perPage:1,width:p?p.width:"100%",height:p?p.height:"100%",type:y.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((b,P)=>d.jsx(tn,{children:d.jsx("div",{className:U.sliderItem,children:d.jsx("div",{className:U.imgWrapper,children:d.jsx("img",{className:ft(U.sliderImage,{[U.contain]:b.image.objectFit==="contain",[U.cover]:b.image.objectFit==="cover"}),src:b.image.url,alt:b.image.name??""})})})},P))},M),L.isActive&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:ft(U.arrow,{[U.arrowVertical]:w==="vert",[U.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:d.jsxs("button",{onClick:()=>{G("-1")},className:U.arrowInner,style:{transform:`translate(${E.scalingValue(W,n)}, ${E.scalingValue(H*(w==="horiz"?1:-1),n)}) scale(${t.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&d.jsx(he,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:ft(U.arrowImg,U.mirror)}),!L.arrowsImgUrl&&d.jsx(Sn,{color:L.color,className:ft(U.arrowIcon,U.arrowImg,U.mirror)})]})}),d.jsx("div",{className:ft(U.arrow,U.nextArrow,{[U.arrowVertical]:w==="vert",[U.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:d.jsxs("button",{className:U.arrowInner,onClick:()=>G("+1"),style:{transform:`translate(${E.scalingValue(W*(w==="horiz"?-1:1),n)}, ${E.scalingValue(H,n)}) scale(${t.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&d.jsx(he,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:U.arrowImg}),!L.arrowsImgUrl&&d.jsx(Sn,{color:L.color,className:ft(U.arrowIcon,U.arrowImg)})]})})]}),R.triggersList.click&&d.jsx("div",{className:U.clickOverlay,onClick:()=>{o&&o.go("+1")}}),I.isActive&&d.jsx("div",{className:ft(U.pagination,{[U.paginationInsideBottom]:I.position==="inside-1"&&w==="horiz",[U.paginationInsideTop]:I.position==="inside-2"&&w==="horiz",[U.paginationOutsideBottom]:I.position==="outside-1"&&w==="horiz",[U.paginationOutsideTop]:I.position==="outside-2"&&w==="horiz",[U.paginationInsideLeft]:I.position==="inside-1"&&w==="vert",[U.paginationInsideRight]:I.position==="inside-2"&&w==="vert",[U.paginationOutsideLeft]:I.position==="outside-1"&&w==="vert",[U.paginationOutsideRight]:I.position==="outside-2"&&w==="vert",[U.paginationVertical]:w==="vert"}),children:d.jsx("div",{className:U.paginationInner,style:{backgroundColor:I.colors[2],transform:`scale(${I.scale/100}) translate(${E.scalingValue(I.offset.x,n)}, ${E.scalingValue(I.offset.y,n)}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:e.map((b,P)=>d.jsx("button",{onClick:()=>{o&&o.go(P)},className:ft(U.paginationItem),children:d.jsx("div",{className:ft(U.dot,{[U.activeDot]:P===f}),style:{backgroundColor:P===f?I.colors[0]:I.colors[1],"--pagination-hover-color":I.hover}})},P))})})]})})}function Sn({color:t,className:e}){return d.jsx("svg",{viewBox:"0 0 10 18",className:e,children:d.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:d.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Ta={element:_a,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",Ea="ImageRevealSlider-module__image___Qjt-e",Aa="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",ue={imageRevealSlider:La,image:Ea,link:Aa,cursor:Ia};function xn(t,e,r){for(const n of r){const o=new Image;o.src=n.url;const a=n.width?Number.parseFloat(n.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*a,s=a/2,c=i/2;if(t>=n.x-s&&t<=n.x+s&&e>=n.y-c&&e<=n.y+c)return!0}return!1}function Cr(t){return new Promise(e=>{const r=new Image;r.src=t,r.onload=()=>{e({width:r.naturalWidth,height:r.naturalHeight})}})}async function Fa(t,e,r,n){let o,a;if(e==="custom"){o=r;const i=await Cr(t);a=i.height/i.width*o}else if(e==="random"){o=Math.random()*(n.max-n.min)+n.min;const i=await Cr(t);a=i.height/i.width*o}else{const i=await Cr(t);o=i.width,a=i.height}return{width:o,height:a,finalWidth:`${o}px`}}function ka({settings:t,content:e,isEditor:r}){const[n,o]=z.useState(null),[a,i]=z.useState([]),[s,c]=z.useState(0),l=z.useRef(0),[u,C]=z.useState({x:0,y:0}),[v,m]=z.useState(1),[p,g]=z.useState("none"),S=z.useRef({x:0,y:0}),[h,f]=z.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:T}=t.imageSize,{revealPosition:w,visible:y}=t.position,{cursorType:L,target:I,defaultCursorScale:V,defaultCursor:R,hoverCursorScale:F,hoverCursor:W}=t.cursor;z.useEffect(()=>{if(!n)return;const b=(A,_)=>{const B=n.getBoundingClientRect(),X=A-B.left,ot=_-B.top;if(C({x:X,y:ot}),L==="system"){g("none"),m(1);return}const rt=X,st=ot,O=document.elementFromPoint(B.left+rt,B.top+st);if(O&&O.closest("a")){g("none"),m(1);return}const K=xn(rt,st,a)||I==="area"?{img:W??"none",scale:F}:{img:R??"none",scale:V};g(K.img),m(K.scale)},P=A=>{A.stopPropagation(),S.current={x:A.clientX,y:A.clientY},b(A.clientX,A.clientY)},k=()=>{h&&b(S.current.x,S.current.y)};return n.addEventListener("mousemove",P),window.addEventListener("scroll",k,!0),()=>{n.removeEventListener("mousemove",P),window.removeEventListener("scroll",k,!0)}},[n,h,u,L,I,W,R,F,V,a]),z.useEffect(()=>{h||(g("none"),m(0))},[h]);const H=async(b,P,k,A={})=>{const{width:_,height:B,finalWidth:X}=await Fa(b.image.url,$,M,T);let ot=0,rt=0;w==="same"?(ot=P/2,rt=k/2):(ot=A.x??Math.random()*P,rt=A.y??Math.random()*k);const st=Math.min(Math.max(ot,_/2),P-_/2),O=Math.min(Math.max(rt,B/2),k-B/2);return{id:l.current++,url:b.image.url,link:b.link,name:b.image.name,x:st,y:O,width:X}};z.useEffect(()=>{if(!n||e.length===0)return;const b=n.getBoundingClientRect(),P=b.width,k=b.height,A=[];(async()=>{const B=e[0],X=await H(B,P,k);A.push(X),i(A),c(1)})()},[$,M,T,w,n]),z.useEffect(()=>{y==="last One"&&i(b=>b.length>0?[b[b.length-1]]:[])},[y]);const G=async b=>{if(!n)return;const P=n.getBoundingClientRect(),k=b.clientX-P.left,A=b.clientY-P.top;if(I==="image"&&!xn(k,A,a))return;let _=0,B=0;w==="on Click"?(_=k,B=A):w==="same"?(_=P.width/2,B=P.height/2):(_=Math.random()*P.width,B=Math.random()*P.height);const X=e[s],ot=await H(X,P.width,P.height,{x:_,y:B});i(rt=>y==="all"?[...rt,ot]:[ot]),c(rt=>rt>=e.length-1?0:rt+1)};return d.jsxs("div",{ref:o,onClick:G,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:ue.imageRevealSlider,style:{cursor:p==="none"?"default":"none"},children:[a.map(b=>d.jsx("div",{className:ue.wrapper,style:{top:`${b.y}px`,left:`${b.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:b.width??"auto",height:"auto",cursor:p==="none"?"default":"none"},children:I==="area"&&b.link?d.jsx("a",{href:b.link,target:"_blank",className:ue.link,children:d.jsx("img",{src:b.url,alt:b.name,className:ue.image},b.id)}):d.jsx("img",{src:b.url,alt:b.name,className:ue.image},b.id)},b.id)),h&&d.jsx("div",{className:ue.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${p}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ra={element:ka,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:""}]}}}},Oa="LightBox-module__hidden___9s-9x",Pa="LightBox-module__heroImage___sTxNF",Ba="LightBox-module__background___rm9ml",Wa="LightBox-module__editor___4ACaY",za="LightBox-module__contentStyle___Bgnsq",Va="LightBox-module__imageStyle___tLIlB",Na="LightBox-module__imgWrapper___LuFUp",ja="LightBox-module__contain___8-yaS",Ma="LightBox-module__cover___hNvOG",Ha="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ua="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",qa="LightBox-module__nextArrow___zkAQN",Ya="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Ja="LightBox-module__arrowImg___pNV88",Za="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",tl="LightBox-module__thumbsContainerVertical___wttk5",el="LightBox-module__thumbsContainer___osSma",rl="LightBox-module__thumbsAlignStart___MO6tY",nl="LightBox-module__thumbsAlignCenter___Q4sUx",ol="LightBox-module__thumbsAlignEnd___p4y9R",il="LightBox-module__thumbItem___HvnF3",al="LightBox-module__closeButton___g2khP",ll="LightBox-module__fadeIn___0m5GW",sl="LightBox-module__slideInLeft___gPYwC",cl="LightBox-module__slideInRight___S-pPp",ul="LightBox-module__slideInTop___DFdAj",pl="LightBox-module__slideInBottom___m27kZ",dl="LightBox-module__fadeOut___55qBR",gl="LightBox-module__slideOutLeft___NvU7P",ml="LightBox-module__slideOutRight___SK7eC",fl="LightBox-module__slideOutTop___Vgg0z",hl="LightBox-module__slideOutBottom___nJ0Ef",yl="LightBox-module__scaleSlide___vZriG",N={hidden:Oa,heroImage:Pa,background:Ba,editor:Wa,contentStyle:za,imageStyle:Va,imgWrapper:Na,contain:ja,cover:Ma,caption:Ha,captionTextInner:Da,lightboxSplide:Ga,arrow:Ua,arrowVertical:Xa,nextArrow:qa,arrowInner:Ya,arrowIcon:Ka,arrowImg:Ja,mirror:Za,thumbsWrapper:Qa,thumbsContainerVertical:tl,thumbsContainer:el,thumbsAlignStart:rl,thumbsAlignCenter:nl,thumbsAlignEnd:ol,thumbItem:il,closeButton:al,fadeIn:ll,slideInLeft:sl,slideInRight:cl,slideInTop:ul,slideInBottom:pl,fadeOut:dl,slideOutLeft:gl,slideOutRight:ml,slideOutTop:fl,slideOutBottom:hl,scaleSlide:yl},Ue=(t,e,r)=>{const n={},[o,a]=t.split("-");return o==="top"?(n.top="0",n.bottom="auto"):o==="middle"?(n.top="50%",n.bottom="auto"):o==="bottom"&&(n.top="auto",n.bottom="0"),a==="left"?(n.left="0",n.right="auto"):a==="center"?(n.left="50%",n.right="auto"):a==="right"&&(n.left="auto",n.right="0"),o==="middle"&&a==="center"?n.transform=`translate(calc(-50% + ${E.scalingValue(e.x,r)}), calc(-50% + ${E.scalingValue(e.y,r)}))`:o==="middle"?n.transform=`translate(${E.scalingValue(e.x,r)}, calc(-50% + ${E.scalingValue(e.y,r)}))`:a==="center"?n.transform=`translate(calc(-50% + ${E.scalingValue(e.x,r)}), ${E.scalingValue(e.y,r)})`:n.transform=`translate(${E.scalingValue(e.x,r)}, ${E.scalingValue(e.y,r)})`,n};function po(t){const e=window.getComputedStyle(t);return{top:parseFloat(e.paddingTop)||0,right:parseFloat(e.paddingRight)||0,bottom:parseFloat(e.paddingBottom)||0,left:parseFloat(e.paddingLeft)||0}}function Cn(t){const e=t.getBoundingClientRect(),r=po(t),n=Math.max(0,e.width-r.left-r.right),o=Math.max(0,e.height-r.top-r.bottom),a=t.naturalWidth,i=t.naturalHeight,s=n/o,c=a/i;let l,u;c>s?(l=n,u=n/c):(u=o,l=o*c);const C=e.left+r.left,v=e.top+r.top,m=(n-l)/2+C,p=(o-u)/2+v;return{x:m,y:p,width:l,height:u}}function $n(t){const e=t.getBoundingClientRect(),r=po(t);return{left:e.left+r.left,right:e.right-r.right,top:e.top+r.top,bottom:e.bottom-r.bottom}}function wn(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const n=e[1].split(",").map(o=>parseFloat(o.trim()));return n.length===4?n[3]:1}const r=t.match(/^#([0-9a-fA-F]{8})$/);if(r){const n=r[1].substring(6,8);return parseInt(n,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function bl(t,e){const r=(()=>{if(t==="fade in")return N.fadeIn;if(t==="slide in"||t==="mix")switch(e){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),n=(()=>{if(t==="fade in"||t==="mix")return N.fadeIn;if(t==="slide in")switch(e){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),o=(()=>{if(t==="fade in"||t==="mix")return N.fadeOut;if(t==="slide in")switch(e){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})(),a=(()=>{if(t==="fade in")return N.fadeOut;if(t==="slide in"||t==="mix")switch(e){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})();return{appearClass:r,backdropAppearClass:n,backdropDisappearClass:o,disappearClass:a}}const vl=({settings:t,content:e,styles:r,portalId:n,activeEvent:o,isEditor:a})=>{const[i,s]=z.useState(!1),{url:c}=t.thumbnailBlock.cover;return z.useEffect(()=>{o==="close"&&s(!1),o==="open"&&s(!0)},[o]),d.jsxs(d.Fragment,{children:[d.jsx("img",{src:c,alt:"Cover",className:N.heroImage,onClick:()=>s(!0)}),d.jsx(Sl,{isOpen:i,onClose:()=>s(!1),content:e,settings:t,lightboxStyles:r,portalId:n,isEditor:a})]})},Sl=({isOpen:t,onClose:e,content:r,lightboxStyles:n,settings:o,portalId:a,isEditor:i,metadata:s})=>{var j;const[c,l]=z.useState(0),[u,C]=z.useState(0),[v,m]=z.useState(!1),[p,g]=z.useState(!1),[S,h]=z.useState({}),f=z.useRef(null),$=z.useRef(null),M=z.useRef(null),T=z.useRef(!1),w=z.useRef(null),y=z.useRef(null),L=z.useRef(null),I=z.useRef(null),V=z.useRef(!1),R=z.useRef(null),[F,W]=z.useState(!1),{appear:H,triggers:G,slider:b,thumbnail:P,controls:k,area:A,caption:_,layout:B}=o.lightboxBlock,{appearClass:X,backdropAppearClass:ot,backdropDisappearClass:rt,disappearClass:st}=bl(H.type,H.direction),O=(s==null?void 0:s.itemId)??null;z.useEffect(()=>{const x=()=>{setTimeout(()=>{var q,J;(J=(q=f.current)==null?void 0:q.splide)==null||J.refresh()},16)},D=()=>{C(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",x),window.addEventListener("ArticleEditor.ComponentContent:change",D),()=>{window.removeEventListener("ArticleEditor.Layout:change",x),window.removeEventListener("ArticleEditor.ComponentContent:change",D)}},[]),z.useEffect(()=>{if(!t||!P.isActive){W(!1);return}const x=R.current;if(!x)return;const D=()=>{b.direction==="horiz"?W(x.scrollWidth>x.clientWidth):W(x.scrollHeight>x.clientHeight)};D();const q=new ResizeObserver(D);return q.observe(x),()=>q.disconnect()},[t,P.isActive,r.length,S,b.direction]);const K=z.useCallback(()=>{const x=window.matchMedia("(max-width: 768px)").matches,D=wn(A.color);x&&!i&&D>.9&&(document.body.style.backgroundColor=""),m(!0),T.current=!0;const q=J=>{J.target===w.current&&J.animationName&&(w.current&&y.current&&w.current.removeEventListener("animationend",y.current),y.current=null,T.current&&(T.current=!1,e()),m(!1))};w.current&&(y.current=q,w.current.addEventListener("animationend",q))},[e,A.color,i]),mt=(x,D,q)=>{var J,et;if(x){if(G.type==="click"&&G.switch==="image")G.repeat==="close"&&c===r.length-1?K():(J=f.current)==null||J.go("+1");else if(G.type==="click"&&G.switch==="50/50"){const Z=x.getBoundingClientRect(),Y=D-Z.left,nt=q-Z.top,it=Z.width,at=Z.height;let lt;b.direction==="horiz"?lt=Y<it/2?"-1":"+1":lt=nt<at/2?"-1":"+1",(et=f.current)==null||et.go(lt)}}},ct=x=>{if(V.current){V.current=!1;return}const D=r[c],q=(D==null?void 0:D.image.objectFit)==="cover";let J,et;if("changedTouches"in x&&x.changedTouches.length>0)J=x.changedTouches[0].clientX,et=x.changedTouches[0].clientY;else if("clientX"in x)J=x.clientX,et=x.clientY;else return;let Z;if(q&&M.current){const Y=$n(M.current);Z=J>=Y.left&&J<=Y.right&&et>=Y.top&&et<=Y.bottom}else{const Y=M.current?Cn(M.current):null;if(!Y){x.target===x.currentTarget&&K();return}Z=J>=Y.x&&J<=Y.x+Y.width&&et>=Y.y&&et<=Y.y+Y.height}Z?mt(M.current,J,et):K()},dt=x=>{const D=x.target;(D.classList.contains(N.thumbsWrapper)||D.classList.contains(N.thumbsContainer))&&ct(x)};z.useEffect(()=>{if(!t)return;const x=D=>{var q,J;if(D.key==="Escape"){K();return}if(D.key==="ArrowRight"){l(et=>(et+1)%Math.max(r.length,1)),(q=f.current)==null||q.go("+1");return}D.key==="ArrowLeft"&&(l(et=>(et-1+Math.max(r.length,1))%Math.max(r.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[t,K,r.length]),z.useEffect(()=>{if(t){if(l(0),C(D=>D+1),T.current=!1,m(!1),g(!1),h({}),!O)return;const x=new CustomEvent("page-overlay",{detail:{itemId:O}});window.dispatchEvent(x)}return()=>{w.current&&y.current&&(w.current.removeEventListener("animationend",y.current),y.current=null),g(!1)}},[t,O]),z.useEffect(()=>{$.current!==null&&$.current!==b.type&&C(x=>x+1),$.current=b.type},[b.type]),z.useEffect(()=>{if(!t)return;const x=document.body.style.overflow,D=window.matchMedia("(max-width: 768px)").matches,q=wn(A.color);document.body.style.overflow="hidden",g(!1);const J=Z=>{Z.target===w.current&&!T.current&&Z.animationName&&(D&&!i&&q>.9&&(document.body.style.backgroundColor=A.color),g(!0),w.current&&L.current&&w.current.removeEventListener("animationend",L.current),L.current=null)};w.current&&(L.current=J,w.current.addEventListener("animationend",J));const et=Z=>{const Y=Z.target;Y&&(Y.closest(`.${N.thumbsWrapper}`)||Y.closest(`.${N.thumbsContainer}`))||b.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",et,{passive:!1}),()=>{document.body.style.overflow=x,document.removeEventListener("touchmove",et),w.current&&L.current&&(w.current.removeEventListener("animationend",L.current),L.current=null),g(!1)}},[t,i,A.color,b.type]),z.useEffect(()=>{if(!t)return;const x=D=>{var J,et;if(T.current){D.stopPropagation();return}if(V.current){V.current=!1;return}const q=D.target;if(!(q&&(q.closest(`.${N.thumbsContainer}`)||q.closest(`.${N.thumbItem}`)))){if(b.type==="slide"&&G.type==="drag"&&((et=(J=f.current)==null?void 0:J.splide)!=null&&et.root)){const Z=f.current.splide.root;if(q&&(Z.contains(q)||Z===q))return}if(D.touches.length===0&&D.changedTouches.length>0){const Z=r[c],Y=(Z==null?void 0:Z.image.objectFit)==="cover",nt=D.changedTouches[0];let it;if(Y&&M.current){const at=$n(M.current);it=nt.clientX>=at.left&&nt.clientX<=at.right&&nt.clientY>=at.top&&nt.clientY<=at.bottom}else{const at=M.current?Cn(M.current):null;if(!at)return;it=nt.clientX>=at.x&&nt.clientX<=at.x+at.width&&nt.clientY>=at.y&&nt.clientY<=at.y+at.height}if(!it){D.stopPropagation(),T.current=!0;const at=lt=>{lt.stopPropagation(),lt.preventDefault(),document.removeEventListener("click",at,!0)};document.addEventListener("click",at,!0),K()}}}};return document.addEventListener("touchend",x,{passive:!0}),()=>{document.removeEventListener("touchend",x)}},[t,K,c,r]);const xt=(b.type==="scale"||b.type==="fade")&&b.direction==="vert"&&G.type==="drag";z.useEffect(()=>{var lt,bt;if(!t||!xt||!((bt=(lt=f.current)==null?void 0:lt.splide)!=null&&bt.root))return;const x=f.current.splide.root,D=30,q=(Q,ut)=>{if(I.current){const wt=Math.abs(Q-I.current.x),Xt=Math.abs(ut-I.current.y);(wt>0||Xt>0)&&(V.current=!0)}},J=Q=>{I.current&&(Q.preventDefault(),q(Q.clientX,Q.clientY))},et=Q=>{I.current&&Q.touches.length>0&&(Q.preventDefault(),q(Q.touches[0].clientX,Q.touches[0].clientY))},Z=(Q,ut)=>{if(!I.current||!f.current){I.current=null;return}const wt=Math.abs(Q-I.current.x),Xt=Math.abs(ut-I.current.y);Xt>D&&Xt>wt&&f.current.go(ut<I.current.y?"+1":"-1"),I.current=null},Y=Q=>{I.current&&Z(Q.clientX,Q.clientY),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("pointermove",J)},nt=Q=>{if(I.current){if(Q.changedTouches.length>0){const ut=Q.changedTouches[0];Z(ut.clientX,ut.clientY)}document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),document.removeEventListener("touchmove",et)}},it=Q=>{I.current={x:Q.clientX,y:Q.clientY},V.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",Y),document.addEventListener("pointercancel",Y)},at=Q=>{Q.touches.length>0&&(I.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},V.current=!1,document.addEventListener("touchmove",et,{passive:!1}),document.addEventListener("touchend",nt),document.addEventListener("touchcancel",nt))};return x.addEventListener("pointerdown",it),x.addEventListener("touchstart",at),()=>{x.removeEventListener("pointerdown",it),x.removeEventListener("touchstart",at),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("touchmove",et),document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),I.current=null,V.current=!1}},[t,xt,u]);const kt={backgroundColor:A.color,backdropFilter:`blur(${A.blur}px)`,animationDuration:`${parseInt(H.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:Ln.createPortal(d.jsxs(d.Fragment,{children:[d.jsx("div",{ref:i?null:w,className:ft(N.background,v?rt:ot,{[N.editor]:i},{[N.hidden]:!t}),style:{...kt,...p&&!i&&!v?{position:"absolute"}:{}}}),d.jsxs("div",{ref:i?w:null,className:ft(N.contentStyle,v?st:X,{[N.editor]:i},{[N.hidden]:!t}),style:{animationDuration:`${parseInt(H.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[d.jsx(Qr,{onMove:x=>l(x.index),ref:f,className:N.lightboxSplide,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,direction:b.direction==="horiz"||b.type==="fade"||b.type==="scale"?"ltr":"ttb",pagination:!1,drag:G.type==="drag"&&!xt,perPage:1,width:"100%",height:"100%",type:b.type==="fade"||b.type==="scale"?"fade":"loop",padding:0,rewind:G.repeat!=="close",start:0},style:{"--splide-speed":b.duration},children:r.map((x,D)=>{const q=Ue(B.position,B.offset,i),J=`${E.scalingValue(B.padding.top,i)} ${E.scalingValue(B.padding.right,i)} ${E.scalingValue(B.padding.bottom,i)} ${E.scalingValue(B.padding.left,i)}`,et=b.type==="scale"?(()=>{const{transform:Z,...Y}=q;return{...Y,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Z||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return d.jsx(tn,{children:d.jsx("div",{className:N.imgWrapper,onClick:ct,children:d.jsx("img",{ref:D===c?M:null,className:ft(N.imageStyle,{[N.contain]:x.image.objectFit==="contain",[N.cover]:x.image.objectFit==="cover",[N.scaleSlide]:b.type==="scale"}),src:x.image.url,alt:x.image.name??"",style:{...et,pointerEvents:x.image.objectFit==="contain"?"none":"auto"}})})},D)})},u),k.isActive&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:ft(N.arrow,{[N.arrowVertical]:b.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:d.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue(k.offset.x,i)}, ${E.scalingValue(k.offset.y*(b.direction==="horiz"?1:-1),i)}) scale(${k.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=f.current)==null?void 0:x.go("-1")},"aria-label":"Previous",children:[k.arrowsImgUrl&&d.jsx(he,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:ft(N.arrowImg,N.mirror)}),!k.arrowsImgUrl&&d.jsx(_n,{color:k.color,className:ft(N.arrowIcon,N.arrowImg,N.mirror)})]})}),d.jsx("div",{className:ft(N.arrow,N.nextArrow,{[N.arrowVertical]:b.direction==="vert"}),style:{color:k.color,"--arrow-hover-color":k.hover},children:d.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue(k.offset.x*(b.direction==="horiz"?-1:1),i)}, ${E.scalingValue(k.offset.y,i)}) scale(${k.scale}) rotate(${b.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=f.current)==null?void 0:x.go("+1")},"aria-label":"Next",children:[k.arrowsImgUrl&&d.jsx(he,{url:k.arrowsImgUrl,fill:k.color,hoverFill:k.hover,className:N.arrowImg}),!k.arrowsImgUrl&&d.jsx(_n,{color:k.color,className:ft(N.arrowIcon,N.arrowImg)})]})})]}),A.closeIconUrl&&(()=>{const x=Ue(A.closeIconAlign,A.closeIconOffset,i),D=`scale(${A.closeIconScale})`,q=x.transform?`${x.transform} ${D}`:D;return d.jsx("button",{className:N.closeButton,style:{...x,transform:q},onClick:K,"aria-label":"Close lightbox",children:d.jsx(he,{url:A.closeIconUrl,fill:A.closeIconColor??"#000000",hoverFill:A.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&n.imageCaption&&((j=r[c])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:x,fontSettings:D,letterSpacing:q,textAlign:J,wordSpacing:et,fontSizeLineHeight:Z,textAppearance:Y,color:nt}=n.imageCaption;return d.jsx("div",{className:N.caption,style:{...Ue(_.alignment,_.offset,i),fontFamily:D.fontFamily,fontWeight:D.fontWeight,fontStyle:D.fontStyle,width:x.sizing==="auto"?"max-content":E.scalingValue(x.width,i),letterSpacing:E.scalingValue(q,i),wordSpacing:E.scalingValue(et,i),textAlign:J,fontSize:E.scalingValue(Z.fontSize,i),lineHeight:E.scalingValue(Z.lineHeight,i),textTransform:Y.textTransform??"none",textDecoration:Y.textDecoration??"none",fontVariant:Y.fontVariant??"normal",color:nt},onClick:it=>it.stopPropagation(),children:d.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:d.jsx(uo,{content:r[c].imageCaption})})})})(),P.isActive&&(()=>{const[x,D]=P.position.split("-"),q=b.direction==="horiz"?`${x}-left`:P.position,J=Ue(q,P.offset,i),et=()=>{if(b.direction==="horiz"){if(D==="left")return"flex-start";if(D==="center")return"center";if(D==="right")return"flex-end"}else{if(x==="top")return"flex-start";if(x==="middle")return"center";if(x==="bottom")return"flex-end"}return"flex-start"};return d.jsx("div",{ref:R,className:N.thumbsWrapper,onClick:Z=>dt(Z),style:{position:i?"absolute":"fixed",...J,...b.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:d.jsx("div",{className:ft(N.thumbsContainer,{[N.thumbsContainerVertical]:b.direction==="vert",[N.thumbsAlignStart]:P.align==="start",[N.thumbsAlignCenter]:P.align==="center",[N.thumbsAlignEnd]:P.align==="end"}),style:{gap:E.scalingValue(P.grid.gap,i),justifyContent:F?"flex-start":et()},children:r.map((Z,Y)=>{const nt=Y===c,it=S[Y],lt=P.grid.size*(nt?P.activeState.scale:1),bt=()=>{if(P.fit!=="fit")return{};if(!it)return b.direction==="horiz"?{height:E.scalingValue(lt,i)}:{width:E.scalingValue(lt,i)};const Q=it.width/it.height;if(b.direction==="horiz"){const ut=lt,wt=ut*Q;return{width:E.scalingValue(wt,i),height:E.scalingValue(ut,i)}}else{const ut=lt,wt=ut/Q;return{width:E.scalingValue(ut,i),height:E.scalingValue(wt,i)}}};return d.jsx("button",{className:N.thumbItem,style:{...b.direction==="horiz"&&P.fit!=="fit"?{height:E.scalingValue(lt,i)}:{},...b.direction==="vert"&&P.fit!=="fit"?{width:E.scalingValue(lt,i)}:{},...P.fit==="cover"?{width:E.scalingValue(lt,i),height:E.scalingValue(lt,i)}:{},...bt(),transition:nt?"all 0.25s ease-out":"none",opacity:nt?P.activeState.opacity/100:P.opacity/100,"--thumb-hover":P.activeState.opacity/100},onClick:Q=>{var ut;Q.stopPropagation(),l(Y),(ut=f.current)==null||ut.go(Y)},onMouseEnter:()=>{var Q;P.triggers==="hov"&&((Q=f.current)==null||Q.go(Y))},children:d.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:Q=>{const ut=Q.currentTarget;ut.naturalWidth&&ut.naturalHeight&&h(wt=>({...wt,[Y]:{width:ut.naturalWidth,height:ut.naturalHeight}}))},style:{objectFit:P.fit==="cover"?"cover":"contain",...P.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...P.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${Y}`)})})})})()]})]}),document.getElementById(a))};function _n({color:t,className:e}){return d.jsx("svg",{viewBox:"0 0 10 18",className:e,children:d.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:d.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:t,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const xl={element:vl,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 Kt(t){const{color:e,...r}=t;return r}function Ht(t,e){var r,n,o;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:E.scalingValue(t.letterSpacing,e),wordSpacing:E.scalingValue(t.wordSpacing,e),fontSize:E.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?E.scalingValue(t.lineHeight,e):void 0,textTransform:(r=t.textAppearance)==null?void 0:r.textTransform,textDecoration:(n=t.textAppearance)==null?void 0:n.textDecoration,fontVariant:(o=t.textAppearance)==null?void 0:o.fontVariant,color:t.color}}function Xe(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Cl(t){return`
7
- .${t}-wrapper {
6
+ */const ya="RichTextRenderer-module__link___BWeZ2",ba={link:ya},uo=({content:e})=>{const t=n=>n.map((r,o)=>r.type==="link"?p.jsx("a",{className:ba.link,href:r.value,target:r.target,children:t(r.children)},o):p.jsx("span",{style:va(r),children:r.text},o));return p.jsx(p.Fragment,{children:e.map((n,r)=>{const o=n.children;return p.jsx("div",{children:t(o)},r)})})};function va(e){return{...e.fontFamily&&{fontFamily:e.fontFamily},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Sa="SvgImage-module__svg___q3xE-",xa="SvgImage-module__img___VsTm-",vr={svg:Sa,img:xa},Ca=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,'\\"')}")`,bt=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:r="",style:o})=>{const[a,i]=V.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return V.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');i(c)}},[]),!Ca(e)||!a?p.jsx("img",{src:e,alt:"",className:ye(vr.img,r),style:o}):p.jsx("span",{"data-supports-mask":a,className:ye(vr.svg,r),style:{"--svg":$a(e),"--fill":t,"--hover-fill":n,...o??{}}})},wa={"top-left":U.topLeftAlignment,"top-center":U.topCenterAlignment,"top-right":U.topRightAlignment,"middle-left":U.middleLeftAlignment,"middle-center":U.middleCenterAlignment,"middle-right":U.middleRightAlignment,"bottom-left":U.bottomLeftAlignment,"bottom-center":U.bottomCenterAlignment,"bottom-right":U.bottomRightAlignment};function _a({settings:e,content:t,styles:n,isEditor:r}){const[o,a]=V.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:d,wordSpacing:l,fontSizeLineHeight:C,textAppearance:b,color:g}=n.imageCaption,[u,m]=V.useState(void 0),[S,y]=V.useState(null),[v,$]=V.useState(0),[M,P]=V.useState(0),{direction:w,transition:f,controls:T,pagination:A,imageCaption:z,triggers:L}=e,k=V.useRef(f.type),{x:W,y:D}=e.controls.offset,H=h=>{o&&o.go(h)};return V.useEffect(()=>{if(!S)return;const h=new ResizeObserver(O=>{if(!o)return;const[F]=O;m({width:Math.round(F.contentRect.width),height:Math.round(F.contentRect.height)})});return h.observe(S),()=>h.unobserve(S)},[S]),V.useEffect(()=>{!o||k.current===f.type||(P(h=>h+1),k.current=f.type)},[f.type]),p.jsx("div",{className:ye(U.wrapper,{[U.editor]:r}),ref:y,children:p.jsxs("div",{className:U.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:f.backgroundColor&&f.type==="fade in"?f.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&p.jsx("div",{className:ye(U.captionBlock),children:p.jsx("div",{className:U.captionTextWrapper,children:t.map((h,O)=>p.jsx("div",{className:ye(U.captionText,wa[z.alignment],{[U.withPointerEvents]:O===v&&r,[U.active]:O===v}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":E.scalingValue(i.width,r),letterSpacing:E.scalingValue(s,r),wordSpacing:E.scalingValue(l,r),textAlign:d,fontSize:E.scalingValue(C.fontSize,r),lineHeight:E.scalingValue(C.lineHeight,r),textTransform:b.textTransform??"none",textDecoration:b.textDecoration??"none",fontVariant:b.fontVariant??"normal",color:g,transitionDuration:f.duration?`${Math.round(parseInt(f.duration)/2)}ms`:"500ms"},children:p.jsx("div",{"data-styles":"imageCaption",className:U.captionTextInner,style:{"--link-hover-color":z.linkHoverColor,"--link-color":z.linkColor,position:"relative",top:E.scalingValue(z.offset.y,r),left:E.scalingValue(z.offset.x,r)},children:p.jsx(uo,{content:h.imageCaption})})},O))})}),p.jsx(tr,{onMove:h=>{$(h.index)},ref:a,options:{arrows:!1,speed:f.duration?parseInt(f.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:w==="horiz"||f.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:f.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((h,O)=>p.jsx(nr,{children:p.jsx("div",{className:U.sliderItem,children:p.jsx("div",{className:U.imgWrapper,children:p.jsx("img",{className:ye(U.sliderImage,{[U.contain]:h.image.objectFit==="contain",[U.cover]:h.image.objectFit==="cover"}),src:h.image.url,alt:h.image.name??""})})})},O))},M),T.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:ye(U.arrow,{[U.arrowVertical]:w==="vert",[U.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:p.jsxs("button",{onClick:()=>{H("-1")},className:U.arrowInner,style:{transform:`translate(${E.scalingValue(W,r)}, ${E.scalingValue(D*(w==="horiz"?1:-1),r)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&p.jsx(bt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:ye(U.arrowImg,U.mirror)}),!T.arrowsImgUrl&&p.jsx(Sr,{color:T.color,className:ye(U.arrowIcon,U.arrowImg,U.mirror)})]})}),p.jsx("div",{className:ye(U.arrow,U.nextArrow,{[U.arrowVertical]:w==="vert",[U.hoverArrow]:T.show==="on hover"}),style:{color:T.color,"--arrow-hover-color":T.hover},children:p.jsxs("button",{className:U.arrowInner,onClick:()=>H("+1"),style:{transform:`translate(${E.scalingValue(W*(w==="horiz"?-1:1),r)}, ${E.scalingValue(D,r)}) scale(${e.controls.scale/100}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:[T.arrowsImgUrl&&p.jsx(bt,{url:T.arrowsImgUrl,fill:T.color,hoverFill:T.hover,className:U.arrowImg}),!T.arrowsImgUrl&&p.jsx(Sr,{color:T.color,className:ye(U.arrowIcon,U.arrowImg)})]})})]}),L.triggersList.click&&p.jsx("div",{className:U.clickOverlay,onClick:()=>{o&&o.go("+1")}}),A.isActive&&p.jsx("div",{className:ye(U.pagination,{[U.paginationInsideBottom]:A.position==="inside-1"&&w==="horiz",[U.paginationInsideTop]:A.position==="inside-2"&&w==="horiz",[U.paginationOutsideBottom]:A.position==="outside-1"&&w==="horiz",[U.paginationOutsideTop]:A.position==="outside-2"&&w==="horiz",[U.paginationInsideLeft]:A.position==="inside-1"&&w==="vert",[U.paginationInsideRight]:A.position==="inside-2"&&w==="vert",[U.paginationOutsideLeft]:A.position==="outside-1"&&w==="vert",[U.paginationOutsideRight]:A.position==="outside-2"&&w==="vert",[U.paginationVertical]:w==="vert"}),children:p.jsx("div",{className:U.paginationInner,style:{backgroundColor:A.colors[2],transform:`scale(${A.scale/100}) translate(${E.scalingValue(A.offset.x,r)}, ${E.scalingValue(A.offset.y,r)}) rotate(${w==="horiz"?"0deg":"90deg"})`},children:t.map((h,O)=>p.jsx("button",{onClick:()=>{o&&o.go(O)},className:ye(U.paginationItem),children:p.jsx("div",{className:ye(U.dot,{[U.activeDot]:O===v}),style:{backgroundColor:O===v?A.colors[0]:A.colors[1],"--pagination-hover-color":A.hover}})},O))})})]})})}function Sr({color:e,className:t}){return p.jsx("svg",{viewBox:"0 0 10 18",className:t,children:p.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:p.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 Ta={element:_a,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",Ea="ImageRevealSlider-module__image___Qjt-e",Aa="ImageRevealSlider-module__link___N-iLG",Ia="ImageRevealSlider-module__cursor___2U03d",dt={imageRevealSlider:La,image:Ea,link:Aa,cursor:Ia};function xr(e,t,n){for(const r of n){const o=new Image;o.src=r.url;const a=r.width?Number.parseFloat(r.width):o.naturalWidth,i=o.naturalHeight/o.naturalWidth*a,c=a/2,s=i/2;if(e>=r.x-c&&e<=r.x+c&&t>=r.y-s&&t<=r.y+s)return!0}return!1}function wn(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function Fa(e,t,n,r){let o,a;if(t==="custom"){o=n;const i=await wn(e);a=i.height/i.width*o}else if(t==="random"){o=Math.random()*(r.max-r.min)+r.min;const i=await wn(e);a=i.height/i.width*o}else{const i=await wn(e);o=i.width,a=i.height}return{width:o,height:a,finalWidth:`${o}px`}}function ka({settings:e,content:t,isEditor:n}){const[r,o]=V.useState(null),[a,i]=V.useState([]),[c,s]=V.useState(0),d=V.useRef(0),[l,C]=V.useState({x:0,y:0}),[b,g]=V.useState(1),[u,m]=V.useState("none"),S=V.useRef({x:0,y:0}),[y,v]=V.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:P}=e.imageSize,{revealPosition:w,visible:f}=e.position,{cursorType:T,target:A,defaultCursorScale:z,defaultCursor:L,hoverCursorScale:k,hoverCursor:W}=e.cursor;V.useEffect(()=>{if(!r)return;const h=(I,_)=>{const B=r.getBoundingClientRect(),X=I-B.left,ie=_-B.top;if(C({x:X,y:ie}),T==="system"){m("none"),g(1);return}const ne=X,se=ie,R=document.elementFromPoint(B.left+ne,B.top+se);if(R&&R.closest("a")){m("none"),g(1);return}const K=xr(ne,se,a)||A==="area"?{img:W??"none",scale:k}:{img:L??"none",scale:z};m(K.img),g(K.scale)},O=I=>{I.stopPropagation(),S.current={x:I.clientX,y:I.clientY},h(I.clientX,I.clientY)},F=()=>{y&&h(S.current.x,S.current.y)};return r.addEventListener("mousemove",O),window.addEventListener("scroll",F,!0),()=>{r.removeEventListener("mousemove",O),window.removeEventListener("scroll",F,!0)}},[r,y,l,T,A,W,L,k,z,a]),V.useEffect(()=>{y||(m("none"),g(0))},[y]);const D=async(h,O,F,I={})=>{const{width:_,height:B,finalWidth:X}=await Fa(h.image.url,$,M,P);let ie=0,ne=0;w==="same"?(ie=O/2,ne=F/2):(ie=I.x??Math.random()*O,ne=I.y??Math.random()*F);const se=Math.min(Math.max(ie,_/2),O-_/2),R=Math.min(Math.max(ne,B/2),F-B/2);return{id:d.current++,url:h.image.url,link:h.link,name:h.image.name,x:se,y:R,width:X}};V.useEffect(()=>{if(!r||t.length===0)return;const h=r.getBoundingClientRect(),O=h.width,F=h.height,I=[];(async()=>{const B=t[0],X=await D(B,O,F);I.push(X),i(I),s(1)})()},[$,M,P,w,r]),V.useEffect(()=>{f==="last One"&&i(h=>h.length>0?[h[h.length-1]]:[])},[f]);const H=async h=>{if(!r)return;const O=r.getBoundingClientRect(),F=h.clientX-O.left,I=h.clientY-O.top;if(A==="image"&&!xr(F,I,a))return;let _=0,B=0;w==="on Click"?(_=F,B=I):w==="same"?(_=O.width/2,B=O.height/2):(_=Math.random()*O.width,B=Math.random()*O.height);const X=t[c],ie=await D(X,O.width,O.height,{x:_,y:B});i(ne=>f==="all"?[...ne,ie]:[ie]),s(ne=>ne>=t.length-1?0:ne+1)};return p.jsxs("div",{ref:o,onClick:H,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),className:dt.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(h=>p.jsx("div",{className:dt.wrapper,style:{top:`${h.y}px`,left:`${h.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:h.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:A==="area"&&h.link?p.jsx("a",{href:h.link,target:"_blank",className:dt.link,children:p.jsx("img",{src:h.url,alt:h.name,className:dt.image},h.id)}):p.jsx("img",{src:h.url,alt:h.name,className:dt.image},h.id)},h.id)),y&&p.jsx("div",{className:dt.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${b})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Ra={element:ka,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:""}]}}}},Oa="LightBox-module__hidden___9s-9x",Ba="LightBox-module__heroImage___sTxNF",Pa="LightBox-module__background___rm9ml",Wa="LightBox-module__editor___4ACaY",Va="LightBox-module__contentStyle___Bgnsq",za="LightBox-module__imageStyle___tLIlB",Na="LightBox-module__imgWrapper___LuFUp",ja="LightBox-module__contain___8-yaS",Ma="LightBox-module__cover___hNvOG",Ha="LightBox-module__caption___b6L2I",Da="LightBox-module__captionTextInner___rCGNH",Ga="LightBox-module__lightboxSplide___XFuWC",Ua="LightBox-module__arrow___iz38X",Xa="LightBox-module__arrowVertical___Zfz81",qa="LightBox-module__nextArrow___zkAQN",Ya="LightBox-module__arrowInner___p48sW",Ka="LightBox-module__arrowIcon___3VaFf",Ja="LightBox-module__arrowImg___pNV88",Za="LightBox-module__mirror___pjeXc",Qa="LightBox-module__thumbsWrapper___GB-nU",el="LightBox-module__thumbsContainerVertical___wttk5",tl="LightBox-module__thumbsContainer___osSma",nl="LightBox-module__thumbsAlignStart___MO6tY",rl="LightBox-module__thumbsAlignCenter___Q4sUx",ol="LightBox-module__thumbsAlignEnd___p4y9R",il="LightBox-module__thumbItem___HvnF3",al="LightBox-module__closeButton___g2khP",ll="LightBox-module__fadeIn___0m5GW",sl="LightBox-module__slideInLeft___gPYwC",cl="LightBox-module__slideInRight___S-pPp",ul="LightBox-module__slideInTop___DFdAj",pl="LightBox-module__slideInBottom___m27kZ",dl="LightBox-module__fadeOut___55qBR",gl="LightBox-module__slideOutLeft___NvU7P",ml="LightBox-module__slideOutRight___SK7eC",fl="LightBox-module__slideOutTop___Vgg0z",hl="LightBox-module__slideOutBottom___nJ0Ef",yl="LightBox-module__scaleSlide___vZriG",N={hidden:Oa,heroImage:Ba,background:Pa,editor:Wa,contentStyle:Va,imageStyle:za,imgWrapper:Na,contain:ja,cover:Ma,caption:Ha,captionTextInner:Da,lightboxSplide:Ga,arrow:Ua,arrowVertical:Xa,nextArrow:qa,arrowInner:Ya,arrowIcon:Ka,arrowImg:Ja,mirror:Za,thumbsWrapper:Qa,thumbsContainerVertical:el,thumbsContainer:tl,thumbsAlignStart:nl,thumbsAlignCenter:rl,thumbsAlignEnd:ol,thumbItem:il,closeButton:al,fadeIn:ll,slideInLeft:sl,slideInRight:cl,slideInTop:ul,slideInBottom:pl,fadeOut:dl,slideOutLeft:gl,slideOutRight:ml,slideOutTop:fl,slideOutBottom:hl,scaleSlide:yl},qt=(e,t,n)=>{const r={},[o,a]=e.split("-");return o==="top"?(r.top="0",r.bottom="auto"):o==="middle"?(r.top="50%",r.bottom="auto"):o==="bottom"&&(r.top="auto",r.bottom="0"),a==="left"?(r.left="0",r.right="auto"):a==="center"?(r.left="50%",r.right="auto"):a==="right"&&(r.left="auto",r.right="0"),o==="middle"&&a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?r.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:a==="center"?r.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:r.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,r};function po(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 Cr(e){const t=e.getBoundingClientRect(),n=po(e),r=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),a=e.naturalWidth,i=e.naturalHeight,c=r/o,s=a/i;let d,l;s>c?(d=r,l=r/s):(l=o,d=o*s);const C=t.left+n.left,b=t.top+n.top,g=(r-d)/2+C,u=(o-l)/2+b;return{x:g,y:u,width:d,height:l}}function $r(e){const t=e.getBoundingClientRect(),n=po(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function wr(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const r=t[1].split(",").map(o=>parseFloat(o.trim()));return r.length===4?r[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const r=n[1].substring(6,8);return parseInt(r,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function bl(e,t){const n=(()=>{if(e==="fade in")return N.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),r=(()=>{if(e==="fade in"||e==="mix")return N.fadeIn;if(e==="slide in")switch(t){case"left":return N.slideInLeft;case"right":return N.slideInRight;case"top":return N.slideInTop;case"bottom":return N.slideInBottom;default:return N.slideInRight}return N.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return N.fadeOut;if(e==="slide in")switch(t){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})(),a=(()=>{if(e==="fade in")return N.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return N.slideOutLeft;case"right":return N.slideOutRight;case"top":return N.slideOutTop;case"bottom":return N.slideOutBottom;default:return N.slideOutRight}return N.fadeOut})();return{appearClass:n,backdropAppearClass:r,backdropDisappearClass:o,disappearClass:a}}const vl=({settings:e,content:t,styles:n,portalId:r,activeEvent:o,isEditor:a})=>{const[i,c]=V.useState(!1),{url:s}=e.thumbnailBlock.cover;return V.useEffect(()=>{o==="close"&&c(!1),o==="open"&&c(!0)},[o]),p.jsxs(p.Fragment,{children:[p.jsx("img",{src:s,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),p.jsx(Sl,{isOpen:i,onClose:()=>c(!1),content:t,settings:e,lightboxStyles:n,portalId:r,isEditor:a})]})},Sl=({isOpen:e,onClose:t,content:n,lightboxStyles:r,settings:o,portalId:a,isEditor:i,metadata:c})=>{var j;const[s,d]=V.useState(0),[l,C]=V.useState(0),[b,g]=V.useState(!1),[u,m]=V.useState(!1),[S,y]=V.useState({}),v=V.useRef(null),$=V.useRef(null),M=V.useRef(null),P=V.useRef(!1),w=V.useRef(null),f=V.useRef(null),T=V.useRef(null),A=V.useRef(null),z=V.useRef(!1),L=V.useRef(null),[k,W]=V.useState(!1),{appear:D,triggers:H,slider:h,thumbnail:O,controls:F,area:I,caption:_,layout:B}=o.lightboxBlock,{appearClass:X,backdropAppearClass:ie,backdropDisappearClass:ne,disappearClass:se}=bl(D.type,D.direction),R=(c==null?void 0:c.itemId)??null;V.useEffect(()=>{const x=()=>{setTimeout(()=>{var q,J;(J=(q=v.current)==null?void 0:q.splide)==null||J.refresh()},16)},G=()=>{C(q=>q+1)};return window.addEventListener("ArticleEditor.Layout:change",x),window.addEventListener("ArticleEditor.ComponentContent:change",G),()=>{window.removeEventListener("ArticleEditor.Layout:change",x),window.removeEventListener("ArticleEditor.ComponentContent:change",G)}},[]),V.useEffect(()=>{if(!e||!O.isActive){W(!1);return}const x=L.current;if(!x)return;const G=()=>{h.direction==="horiz"?W(x.scrollWidth>x.clientWidth):W(x.scrollHeight>x.clientHeight)};G();const q=new ResizeObserver(G);return q.observe(x),()=>q.disconnect()},[e,O.isActive,n.length,S,h.direction]);const K=V.useCallback(()=>{const x=window.matchMedia("(max-width: 768px)").matches,G=wr(I.color);x&&!i&&G>.9&&(document.body.style.backgroundColor=""),g(!0),P.current=!0;const q=J=>{J.target===w.current&&J.animationName&&(w.current&&f.current&&w.current.removeEventListener("animationend",f.current),f.current=null,P.current&&(P.current=!1,t()),g(!1))};w.current&&(f.current=q,w.current.addEventListener("animationend",q))},[t,I.color,i]),fe=(x,G,q)=>{var J,re;if(x){if(H.type==="click"&&H.switch==="image")H.repeat==="close"&&s===n.length-1?K():(J=v.current)==null||J.go("+1");else if(H.type==="click"&&H.switch==="50/50"){const Z=x.getBoundingClientRect(),Y=G-Z.left,oe=q-Z.top,he=Z.width,ae=Z.height;let ge;h.direction==="horiz"?ge=Y<he/2?"-1":"+1":ge=oe<ae/2?"-1":"+1",(re=v.current)==null||re.go(ge)}}},ce=x=>{if(z.current){z.current=!1;return}const G=n[s],q=(G==null?void 0:G.image.objectFit)==="cover";let J,re;if("changedTouches"in x&&x.changedTouches.length>0)J=x.changedTouches[0].clientX,re=x.changedTouches[0].clientY;else if("clientX"in x)J=x.clientX,re=x.clientY;else return;let Z;if(q&&M.current){const Y=$r(M.current);Z=J>=Y.left&&J<=Y.right&&re>=Y.top&&re<=Y.bottom}else{const Y=M.current?Cr(M.current):null;if(!Y){x.target===x.currentTarget&&K();return}Z=J>=Y.x&&J<=Y.x+Y.width&&re>=Y.y&&re<=Y.y+Y.height}Z?fe(M.current,J,re):K()},de=x=>{const G=x.target;(G.classList.contains(N.thumbsWrapper)||G.classList.contains(N.thumbsContainer))&&ce(x)};V.useEffect(()=>{if(!e)return;const x=G=>{var q,J;if(G.key==="Escape"){K();return}if(G.key==="ArrowRight"){d(re=>(re+1)%Math.max(n.length,1)),(q=v.current)==null||q.go("+1");return}G.key==="ArrowLeft"&&(d(re=>(re-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=v.current)==null||J.go("-1"))};return window.addEventListener("keydown",x),()=>{window.removeEventListener("keydown",x)}},[e,K,n.length]),V.useEffect(()=>{if(e){if(d(0),C(G=>G+1),P.current=!1,g(!1),m(!1),y({}),!R)return;const x=new CustomEvent("page-overlay",{detail:{itemId:R}});window.dispatchEvent(x)}return()=>{w.current&&f.current&&(w.current.removeEventListener("animationend",f.current),f.current=null),m(!1)}},[e,R]),V.useEffect(()=>{$.current!==null&&$.current!==h.type&&C(x=>x+1),$.current=h.type},[h.type]),V.useEffect(()=>{if(!e)return;const x=document.body.style.overflow,G=window.matchMedia("(max-width: 768px)").matches,q=wr(I.color);document.body.style.overflow="hidden",m(!1);const J=Z=>{Z.target===w.current&&!P.current&&Z.animationName&&(G&&!i&&q>.9&&(document.body.style.backgroundColor=I.color),m(!0),w.current&&T.current&&w.current.removeEventListener("animationend",T.current),T.current=null)};w.current&&(T.current=J,w.current.addEventListener("animationend",J));const re=Z=>{const Y=Z.target;Y&&(Y.closest(`.${N.thumbsWrapper}`)||Y.closest(`.${N.thumbsContainer}`))||h.type!=="slide"&&Z.preventDefault()};return document.addEventListener("touchmove",re,{passive:!1}),()=>{document.body.style.overflow=x,document.removeEventListener("touchmove",re),w.current&&T.current&&(w.current.removeEventListener("animationend",T.current),T.current=null),m(!1)}},[e,i,I.color,h.type]),V.useEffect(()=>{if(!e)return;const x=G=>{var J,re;if(P.current){G.stopPropagation();return}if(z.current){z.current=!1;return}const q=G.target;if(!(q&&(q.closest(`.${N.thumbsContainer}`)||q.closest(`.${N.thumbItem}`)))){if(h.type==="slide"&&H.type==="drag"&&((re=(J=v.current)==null?void 0:J.splide)!=null&&re.root)){const Z=v.current.splide.root;if(q&&(Z.contains(q)||Z===q))return}if(G.touches.length===0&&G.changedTouches.length>0){const Z=n[s],Y=(Z==null?void 0:Z.image.objectFit)==="cover",oe=G.changedTouches[0];let he;if(Y&&M.current){const ae=$r(M.current);he=oe.clientX>=ae.left&&oe.clientX<=ae.right&&oe.clientY>=ae.top&&oe.clientY<=ae.bottom}else{const ae=M.current?Cr(M.current):null;if(!ae)return;he=oe.clientX>=ae.x&&oe.clientX<=ae.x+ae.width&&oe.clientY>=ae.y&&oe.clientY<=ae.y+ae.height}if(!he){G.stopPropagation(),P.current=!0;const ae=ge=>{ge.stopPropagation(),ge.preventDefault(),document.removeEventListener("click",ae,!0)};document.addEventListener("click",ae,!0),K()}}}};return document.addEventListener("touchend",x,{passive:!0}),()=>{document.removeEventListener("touchend",x)}},[e,K,s,n]);const Se=(h.type==="scale"||h.type==="fade")&&h.direction==="vert"&&H.type==="drag";V.useEffect(()=>{var ge,we;if(!e||!Se||!((we=(ge=v.current)==null?void 0:ge.splide)!=null&&we.root))return;const x=v.current.splide.root,G=30,q=(Q,ue)=>{if(A.current){const xe=Math.abs(Q-A.current.x),Pe=Math.abs(ue-A.current.y);(xe>0||Pe>0)&&(z.current=!0)}},J=Q=>{A.current&&(Q.preventDefault(),q(Q.clientX,Q.clientY))},re=Q=>{A.current&&Q.touches.length>0&&(Q.preventDefault(),q(Q.touches[0].clientX,Q.touches[0].clientY))},Z=(Q,ue)=>{if(!A.current||!v.current){A.current=null;return}const xe=Math.abs(Q-A.current.x),Pe=Math.abs(ue-A.current.y);Pe>G&&Pe>xe&&v.current.go(ue<A.current.y?"+1":"-1"),A.current=null},Y=Q=>{A.current&&Z(Q.clientX,Q.clientY),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("pointermove",J)},oe=Q=>{if(A.current){if(Q.changedTouches.length>0){const ue=Q.changedTouches[0];Z(ue.clientX,ue.clientY)}document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),document.removeEventListener("touchmove",re)}},he=Q=>{A.current={x:Q.clientX,y:Q.clientY},z.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",Y),document.addEventListener("pointercancel",Y)},ae=Q=>{Q.touches.length>0&&(A.current={x:Q.touches[0].clientX,y:Q.touches[0].clientY},z.current=!1,document.addEventListener("touchmove",re,{passive:!1}),document.addEventListener("touchend",oe),document.addEventListener("touchcancel",oe))};return x.addEventListener("pointerdown",he),x.addEventListener("touchstart",ae),()=>{x.removeEventListener("pointerdown",he),x.removeEventListener("touchstart",ae),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",Y),document.removeEventListener("pointercancel",Y),document.removeEventListener("touchmove",re),document.removeEventListener("touchend",oe),document.removeEventListener("touchcancel",oe),A.current=null,z.current=!1}},[e,Se,l]);const Be={backgroundColor:I.color,backdropFilter:`blur(${I.blur}px)`,animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:Lr.createPortal(p.jsxs(p.Fragment,{children:[p.jsx("div",{ref:i?null:w,className:ye(N.background,b?ne:ie,{[N.editor]:i},{[N.hidden]:!e}),style:{...Be,...u&&!i&&!b?{position:"absolute"}:{}}}),p.jsxs("div",{ref:i?w:null,className:ye(N.contentStyle,b?se:X,{[N.editor]:i},{[N.hidden]:!e}),style:{animationDuration:`${parseInt(D.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[p.jsx(tr,{onMove:x=>d(x.index),ref:v,className:N.lightboxSplide,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,direction:h.direction==="horiz"||h.type==="fade"||h.type==="scale"?"ltr":"ttb",pagination:!1,drag:H.type==="drag"&&!Se,perPage:1,width:"100%",height:"100%",type:h.type==="fade"||h.type==="scale"?"fade":"loop",padding:0,rewind:H.repeat!=="close",start:0},style:{"--splide-speed":h.duration},children:n.map((x,G)=>{const q=qt(B.position,B.offset,i),J=`${E.scalingValue(B.padding.top,i)} ${E.scalingValue(B.padding.right,i)} ${E.scalingValue(B.padding.bottom,i)} ${E.scalingValue(B.padding.left,i)}`,re=h.type==="scale"?(()=>{const{transform:Z,...Y}=q;return{...Y,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":Z||"none"}})():{...q,position:"absolute",padding:J,boxSizing:"border-box"};return p.jsx(nr,{children:p.jsx("div",{className:N.imgWrapper,onClick:ce,children:p.jsx("img",{ref:G===s?M:null,className:ye(N.imageStyle,{[N.contain]:x.image.objectFit==="contain",[N.cover]:x.image.objectFit==="cover",[N.scaleSlide]:h.type==="scale"}),src:x.image.url,alt:x.image.name??"",style:{...re,pointerEvents:x.image.objectFit==="contain"?"none":"auto"}})})},G)})},l),F.isActive&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:ye(N.arrow,{[N.arrowVertical]:h.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:p.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x,i)}, ${E.scalingValue(F.offset.y*(h.direction==="horiz"?1:-1),i)}) scale(${F.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=v.current)==null?void 0:x.go("-1")},"aria-label":"Previous",children:[F.arrowsImgUrl&&p.jsx(bt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:ye(N.arrowImg,N.mirror)}),!F.arrowsImgUrl&&p.jsx(_r,{color:F.color,className:ye(N.arrowIcon,N.arrowImg,N.mirror)})]})}),p.jsx("div",{className:ye(N.arrow,N.nextArrow,{[N.arrowVertical]:h.direction==="vert"}),style:{color:F.color,"--arrow-hover-color":F.hover},children:p.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${E.scalingValue(F.offset.x*(h.direction==="horiz"?-1:1),i)}, ${E.scalingValue(F.offset.y,i)}) scale(${F.scale}) rotate(${h.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var x;return(x=v.current)==null?void 0:x.go("+1")},"aria-label":"Next",children:[F.arrowsImgUrl&&p.jsx(bt,{url:F.arrowsImgUrl,fill:F.color,hoverFill:F.hover,className:N.arrowImg}),!F.arrowsImgUrl&&p.jsx(_r,{color:F.color,className:ye(N.arrowIcon,N.arrowImg)})]})})]}),I.closeIconUrl&&(()=>{const x=qt(I.closeIconAlign,I.closeIconOffset,i),G=`scale(${I.closeIconScale})`,q=x.transform?`${x.transform} ${G}`:G;return p.jsx("button",{className:N.closeButton,style:{...x,transform:q},onClick:K,"aria-label":"Close lightbox",children:p.jsx(bt,{url:I.closeIconUrl,fill:I.closeIconColor??"#000000",hoverFill:I.closeIconHover??"#cccccc"})})})(),_&&_.isActive&&r.imageCaption&&((j=n[s])==null?void 0:j.imageCaption)&&(()=>{const{widthSettings:x,fontSettings:G,letterSpacing:q,textAlign:J,wordSpacing:re,fontSizeLineHeight:Z,textAppearance:Y,color:oe}=r.imageCaption;return p.jsx("div",{className:N.caption,style:{...qt(_.alignment,_.offset,i),fontFamily:G.fontFamily,fontWeight:G.fontWeight,fontStyle:G.fontStyle,width:x.sizing==="auto"?"max-content":E.scalingValue(x.width,i),letterSpacing:E.scalingValue(q,i),wordSpacing:E.scalingValue(re,i),textAlign:J,fontSize:E.scalingValue(Z.fontSize,i),lineHeight:E.scalingValue(Z.lineHeight,i),textTransform:Y.textTransform??"none",textDecoration:Y.textDecoration??"none",fontVariant:Y.fontVariant??"normal",color:oe},onClick:he=>he.stopPropagation(),children:p.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":_.linkColor,"--link-hover-color":_.linkHoverColor},children:p.jsx(uo,{content:n[s].imageCaption})})})})(),O.isActive&&(()=>{const[x,G]=O.position.split("-"),q=h.direction==="horiz"?`${x}-left`:O.position,J=qt(q,O.offset,i),re=()=>{if(h.direction==="horiz"){if(G==="left")return"flex-start";if(G==="center")return"center";if(G==="right")return"flex-end"}else{if(x==="top")return"flex-start";if(x==="middle")return"center";if(x==="bottom")return"flex-end"}return"flex-start"};return p.jsx("div",{ref:L,className:N.thumbsWrapper,onClick:Z=>de(Z),style:{position:i?"absolute":"fixed",...J,...h.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:p.jsx("div",{className:ye(N.thumbsContainer,{[N.thumbsContainerVertical]:h.direction==="vert",[N.thumbsAlignStart]:O.align==="start",[N.thumbsAlignCenter]:O.align==="center",[N.thumbsAlignEnd]:O.align==="end"}),style:{gap:E.scalingValue(O.grid.gap,i),justifyContent:k?"flex-start":re()},children:n.map((Z,Y)=>{const oe=Y===s,he=S[Y],ge=O.grid.size*(oe?O.activeState.scale:1),we=()=>{if(O.fit!=="fit")return{};if(!he)return h.direction==="horiz"?{height:E.scalingValue(ge,i)}:{width:E.scalingValue(ge,i)};const Q=he.width/he.height;if(h.direction==="horiz"){const ue=ge,xe=ue*Q;return{width:E.scalingValue(xe,i),height:E.scalingValue(ue,i)}}else{const ue=ge,xe=ue/Q;return{width:E.scalingValue(ue,i),height:E.scalingValue(xe,i)}}};return p.jsx("button",{className:N.thumbItem,style:{...h.direction==="horiz"&&O.fit!=="fit"?{height:E.scalingValue(ge,i)}:{},...h.direction==="vert"&&O.fit!=="fit"?{width:E.scalingValue(ge,i)}:{},...O.fit==="cover"?{width:E.scalingValue(ge,i),height:E.scalingValue(ge,i)}:{},...we(),transition:oe?"all 0.25s ease-out":"none",opacity:oe?O.activeState.opacity/100:O.opacity/100,"--thumb-hover":O.activeState.opacity/100},onClick:Q=>{var ue;Q.stopPropagation(),d(Y),(ue=v.current)==null||ue.go(Y)},onMouseEnter:()=>{var Q;O.triggers==="hov"&&((Q=v.current)==null||Q.go(Y))},children:p.jsx("img",{src:Z.image.url,alt:Z.image.name??"",onLoad:Q=>{const ue=Q.currentTarget;ue.naturalWidth&&ue.naturalHeight&&y(xe=>({...xe,[Y]:{width:ue.naturalWidth,height:ue.naturalHeight}}))},style:{objectFit:O.fit==="cover"?"cover":"contain",...O.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...O.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${Z.image.name}-${Y}`)})})})})()]})]}),document.getElementById(a))};function _r({color:e,className:t}){return p.jsx("svg",{viewBox:"0 0 10 18",className:t,children:p.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:p.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 xl={element:vl,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 Ze(e){const{color:t,...n}=e;return n}function Ge(e,t){var n,r,o;return{fontFamily: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:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(o=e.textAppearance)==null?void 0:o.fontVariant,color:e.color}}function Yt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Cl(e){return`
7
+ .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Xe(48)};
11
+ min-height: ${Yt(48)};
12
12
  }
13
- .${t}-wrapper.${t}-type-C .${t}-input:focus-visible,
14
- .${t}-wrapper.${t}-type-C .${t}-button:focus-visible {
13
+ .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
+ .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
15
15
  outline: none;
16
16
  }
17
- .${t}-form {
17
+ .${e}-form {
18
18
  display: flex;
19
19
  flex-direction: column;
20
20
  width: 100%;
21
21
  }
22
- .${t}-fields {
22
+ .${e}-fields {
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  flex: 1;
26
26
  min-width: 0;
27
27
  }
28
- .${t}-field-group {
28
+ .${e}-field-group {
29
29
  display: flex;
30
30
  flex-direction: column;
31
31
  flex: 1;
32
32
  min-width: 0;
33
33
  }
34
- .${t}-field-group.${t}-labeled {
35
- gap: ${Xe(4)};
34
+ .${e}-field-group.${e}-labeled {
35
+ gap: ${Yt(4)};
36
36
  }
37
- .${t}-field-label {
37
+ .${e}-field-label {
38
38
  white-space: nowrap;
39
- color: var(--${t}-label-text-color);
39
+ color: var(--${e}-label-text-color);
40
40
  }
41
- .${t}-input {
41
+ .${e}-input {
42
42
  width: 100%;
43
43
  box-sizing: border-box;
44
44
  outline: none;
45
45
  -webkit-tap-highlight-color: transparent;
46
- background-color: var(--${t}-input-color);
47
- color: var(--${t}-input-text-color);
48
- border-color: var(--${t}-input-border-color);
46
+ background-color: var(--${e}-input-color);
47
+ color: var(--${e}-input-text-color);
48
+ border-color: var(--${e}-input-border-color);
49
49
  transition: color 250ms, border-color 250ms, background-color 250ms;
50
50
  }
51
- .${t}-input::placeholder {
52
- color: var(--${t}-placeholder-color);
51
+ .${e}-input::placeholder {
52
+ color: var(--${e}-placeholder-color);
53
53
  opacity: 1;
54
54
  transition: color 250ms, opacity 250ms;
55
55
  }
56
- .${t}-input:hover {
57
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
58
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
59
- border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
60
- }
61
- .${t}-wrapper.${t}-state-hover .${t}-input {
62
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
63
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
64
- border-color: var(--${t}-hover-input-border-color, var(--${t}-input-border-color));
65
- }
66
- .${t}-input:focus,
67
- .${t}-input:focus-visible,
68
- .${t}-wrapper.${t}-state-focus .${t}-input {
69
- background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
70
- color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
71
- border-color: var(--${t}-focus-input-border-color, var(--${t}-input-border-color));
72
- }
73
- .${t}-input[data-filled="true"] {
74
- background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
75
- color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
76
- border-color: var(--${t}-filled-input-border-color, var(--${t}-input-border-color));
77
- }
78
- .${t}-wrapper.${t}-state-filled .${t}-button {
79
- background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
80
- color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
81
- border-color: var(--${t}-filled-button-border-color, var(--${t}-button-border-color));
82
- }
83
- .${t}-wrapper.${t}-state-success .${t}-input,
84
- .${t}-wrapper.${t}-state-success .${t}-button {
56
+ .${e}-input:hover {
57
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
58
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
59
+ border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
60
+ }
61
+ .${e}-wrapper.${e}-state-hover .${e}-input {
62
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
63
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
64
+ border-color: var(--${e}-hover-input-border-color, var(--${e}-input-border-color));
65
+ }
66
+ .${e}-input:focus,
67
+ .${e}-input:focus-visible,
68
+ .${e}-wrapper.${e}-state-focus .${e}-input {
69
+ background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
70
+ color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
71
+ border-color: var(--${e}-focus-input-border-color, var(--${e}-input-border-color));
72
+ }
73
+ .${e}-input[data-filled="true"] {
74
+ background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
75
+ color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
76
+ border-color: var(--${e}-filled-input-border-color, var(--${e}-input-border-color));
77
+ }
78
+ .${e}-wrapper.${e}-state-filled .${e}-button {
79
+ background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
80
+ color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
81
+ border-color: var(--${e}-filled-button-border-color, var(--${e}-button-border-color));
82
+ }
83
+ .${e}-wrapper.${e}-state-success .${e}-input,
84
+ .${e}-wrapper.${e}-state-success .${e}-button {
85
85
  pointer-events: none;
86
86
  }
87
- .${t}-wrapper.${t}-state-error .${t}-input {
87
+ .${e}-wrapper.${e}-state-error .${e}-input {
88
88
  }
89
- .${t}-input[data-field-type="textarea"] {
89
+ .${e}-input[data-field-type="textarea"] {
90
90
  resize: vertical;
91
91
  }
92
- .${t}-input:disabled {
92
+ .${e}-input:disabled {
93
93
  cursor: not-allowed;
94
94
  }
95
- .${t}-button {
95
+ .${e}-button {
96
96
  cursor: pointer;
97
97
  white-space: nowrap;
98
98
  box-sizing: border-box;
99
99
  outline: none;
100
- background-color: var(--${t}-button-color);
101
- color: var(--${t}-button-text-color);
102
- border-color: var(--${t}-button-border-color);
100
+ background-color: var(--${e}-button-color);
101
+ color: var(--${e}-button-text-color);
102
+ border-color: var(--${e}-button-border-color);
103
103
  transition: color 250ms, background-color 250ms, border-color 250ms;
104
104
  }
105
- .${t}-button:hover {
106
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
107
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
108
- border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
109
- }
110
- .${t}-wrapper.${t}-state-hover .${t}-button {
111
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
112
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
113
- border-color: var(--${t}-hover-button-border-color, var(--${t}-button-border-color));
114
- }
115
- .${t}-button:focus,
116
- .${t}-button:focus-visible,
117
- .${t}-wrapper.${t}-state-focus .${t}-button {
118
- background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
119
- color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
120
- border-color: var(--${t}-focus-button-border-color, var(--${t}-button-border-color));
121
- }
122
- .${t}-input:focus-visible,
123
- .${t}-wrapper.${t}-state-focus .${t}-input {
105
+ .${e}-button:hover {
106
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
107
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
108
+ border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
109
+ }
110
+ .${e}-wrapper.${e}-state-hover .${e}-button {
111
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
112
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
113
+ border-color: var(--${e}-hover-button-border-color, var(--${e}-button-border-color));
114
+ }
115
+ .${e}-button:focus,
116
+ .${e}-button:focus-visible,
117
+ .${e}-wrapper.${e}-state-focus .${e}-button {
118
+ background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
119
+ color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
120
+ border-color: var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
121
+ }
122
+ .${e}-input:focus-visible,
123
+ .${e}-wrapper.${e}-state-focus .${e}-input {
124
124
  outline: none;
125
125
  }
126
- .${t}-button:focus-visible,
127
- .${t}-wrapper.${t}-state-focus .${t}-button {
126
+ .${e}-button:focus-visible,
127
+ .${e}-wrapper.${e}-state-focus .${e}-button {
128
128
  outline: none;
129
129
  }
130
- .${t}-success {
131
- margin-top: ${Xe(8)};
132
- color: var(--${t}-success-success-color, var(--${t}-success-color));
130
+ .${e}-success {
131
+ margin-top: ${Yt(8)};
132
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
- .${t}-error {
135
- margin-top: ${Xe(8)};
136
- color: var(--${t}-error-error-color, var(--${t}-error-color));
134
+ .${e}-error {
135
+ margin-top: ${Yt(8)};
136
+ color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
- .${t}-overlay-anchor {
138
+ .${e}-overlay-anchor {
139
139
  position: relative;
140
140
  height: auto;
141
141
  }
142
- `}function $l({settings:t,isEditor:e,metadata:r,activeEvent:n}){const{prefix:o}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:s=[],buttonLabel:c,gap:l,fieldsGap:u,buttonCorners:C,buttonStroke:v,buttonPadding:m,isButtonFullWidth:p,inputCorners:g,inputStroke:S,inputPadding:h,inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:T,buttonColor:w,buttonTextColor:y,buttonBorderColor:L,labelTextColor:I,successColor:V,errorColor:R,fontFamily:F,inputFontSettings:W,inputFontSize:H,inputLineHeight:G,inputLetterSpacing:b,inputWordSpacing:P,inputTextAppearance:k,buttonFontSettings:A,buttonFontSize:_,buttonLineHeight:B,buttonLetterSpacing:X,buttonWordSpacing:ot,buttonTextAppearance:rt,labelFontSettings:st,labelFontSize:O,labelLineHeight:K,labelLetterSpacing:mt,labelWordSpacing:ct,labelTextAppearance:dt,statusFontSettings:xt,statusFontSize:kt,statusLineHeight:j,statusLetterSpacing:x,statusWordSpacing:D,statusTextAppearance:q,successMessage:J,errorMessage:et,stateOverrides:Z}=t,Y=a==="B",nt=s.slice(0,Math.min(i,s.length)),it={fontSettings:{fontFamily:F,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:H??.01,lineHeight:G,letterSpacing:b??0,wordSpacing:P??0,textAppearance:k,color:$},at=Kt(Ht(it,e)),lt=E.scalingValue(S??0,e),bt=E.scalingValue((G??H??.01)+((h==null?void 0:h.top)??0)+((h==null?void 0:h.bottom)??0)+(a==="C"?S??0:(S??0)*2),e),Q={...at,borderStyle:"solid",borderRadius:a==="C"?0:E.scalingValue(g??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:lt,borderLeftWidth:0}:{borderWidth:lt},paddingTop:E.scalingValue((h==null?void 0:h.top)??0,e),paddingRight:E.scalingValue((h==null?void 0:h.right)??0,e),paddingBottom:E.scalingValue((h==null?void 0:h.bottom)??0,e),paddingLeft:E.scalingValue((h==null?void 0:h.left)??0,e),height:bt,minHeight:bt},ut={fontSettings:{fontFamily:F,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:_??.01,lineHeight:B,letterSpacing:X??0,wordSpacing:ot??0,textAppearance:rt,color:y},wt=Kt(Ht(ut,e)),Xt=E.scalingValue(v??0,e),hr={fontSettings:{fontFamily:F,fontWeight:(st==null?void 0:st.fontWeight)??400,fontStyle:(st==null?void 0:st.fontStyle)??"normal"},fontSize:O??.01,lineHeight:K,letterSpacing:mt??0,wordSpacing:ct??0,textAppearance:dt,color:I},$e=Ht(hr,e),yt={fontSettings:{fontFamily:F,fontWeight:(xt==null?void 0:xt.fontWeight)??400,fontStyle:(xt==null?void 0:xt.fontStyle)??"normal"},fontSize:kt??.01,lineHeight:j,letterSpacing:x??0,wordSpacing:D??0,textAppearance:q,color:V},Rt=Kt(Ht(yt,e)),re=E.buildColorVars(o,{inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:T!=null&&T.trim()?T:"#cccccc",buttonColor:w,buttonTextColor:y,buttonBorderColor:L,labelTextColor:I,successColor:V,errorColor:R},wl,_l,Z),[St,Wt]=z.useState(()=>Object.fromEntries(nt.map(pt=>[pt.name,""]))),[en,we]=z.useState("idle"),[go,He]=z.useState(null),yr=n==="success"?"success":n==="error"?"error":en,mo=n==="error"?et:go,De=n==="filled",_e=z.useMemo(()=>{if(!De)return St;let pt=null;for(const zt of nt)(St[zt.name]??"").trim().length>0||(pt=pt??{...St},pt[zt.name]="Filled");return pt??St},[St,De,nt]),fo=yr==="error"?E.getFormFieldValidationError(nt,_e):null,ho=`${n&&n!=="default"?`${o}-state-${n}`:""}`.trim(),rn=r==null?void 0:r.submitUrl,nn=(pt,zt)=>{Wt(Vt=>({...Vt,[pt]:zt}))},yo=async pt=>{pt.preventDefault();const zt=Object.fromEntries(nt.map(Et=>{var ce;return[Et.name,((ce=St[Et.name])==null?void 0:ce.trim())??""]}).filter(([,Et])=>Et));if(!rn){we("error"),He("No integrations were found for this form.");return}if(Object.keys(zt).length===0)return;const Vt=E.getFormFieldValidationError(nt,St);if(Vt){we("error"),He(Vt);return}we("submitting"),He(null);try{const Et=await fetch(rn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(zt)});if(!Et.ok){const ce=await Et.text();throw new Error(ce||`Request failed: ${Et.status}`)}we("success"),Wt(Object.fromEntries(nt.map(ce=>[ce.name,""])))}catch(Et){we("error"),He(Et instanceof Error?Et.message:"Something went wrong")}};return d.jsxs("div",{className:`${o}-wrapper ${o}-type-${a} ${ho}`.trim(),style:re,children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:Cl(o)}}),d.jsxs("form",{onSubmit:yo,className:`${o}-form`,style:{gap:E.scalingValue(l??0,e)},children:[d.jsx("div",{className:`${o}-fields`,style:{gap:E.scalingValue(u??0,e)},children:nt.map((pt,zt)=>d.jsxs("div",{className:`${o}-field-group${Y?` ${o}-labeled`:""}`,children:[Y&&d.jsx("span",{className:`${o}-field-label`,style:$e?{...$e,lineHeight:$e.fontSize}:void 0,children:pt.label||pt.name}),pt.type==="textarea"?d.jsx("textarea",{name:pt.name,autoComplete:"off",value:_e[pt.name]??"",onChange:Vt=>nn(pt.name,Vt.target.value),placeholder:pt.placeholder,className:`${o}-input`,style:Q,rows:1,"data-filled":De||(_e[pt.name]??"").trim().length>0,"data-field-type":"textarea"}):d.jsx("input",{type:pt.type==="phone"?"tel":pt.type==="email"?"email":"text",name:pt.name,autoComplete:"off",value:_e[pt.name]??"",onChange:Vt=>nn(pt.name,Vt.target.value),placeholder:pt.placeholder,required:pt.isRequired??pt.type==="email",className:`${o}-input`,style:Q,"data-filled":De||(_e[pt.name]??"").trim().length>0})]},zt))}),d.jsx("div",{className:`${o}-overlay-anchor`,children:d.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(C??0,e),borderWidth:Xt,paddingTop:E.scalingValue((m==null?void 0:m.top)??0,e),paddingRight:E.scalingValue((m==null?void 0:m.right)??0,e),paddingBottom:E.scalingValue((m==null?void 0:m.bottom)??0,e),paddingLeft:E.scalingValue((m==null?void 0:m.left)??0,e),...wt,...p?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:d.jsx("span",{className:`${o}-overlay-anchor`,style:p?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:en==="submitting"?"...":c})})})]}),yr==="success"&&d.jsx("p",{className:`${o}-success`,style:{...Rt},children:J}),yr==="error"&&d.jsx("p",{className:`${o}-error`,style:{...Rt},role:"alert",children:fo??mo??et})]})}const wl={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"},_l=["hover","focus","filled","success","error"],Tl=`import React, { useMemo, useState } from 'react';\r
142
+ `}function $l({settings:e,isEditor:t,metadata:n,activeEvent:r}){const{prefix:o}=E.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:d,fieldsGap:l,buttonCorners:C,buttonStroke:b,buttonPadding:g,isButtonFullWidth:u,inputCorners:m,inputStroke:S,inputPadding:y,inputColor:v,inputTextColor:$,inputBorderColor:M,placeholderColor:P,buttonColor:w,buttonTextColor:f,buttonBorderColor:T,labelTextColor:A,successColor:z,errorColor:L,fontFamily:k,inputFontSettings:W,inputFontSize:D,inputLineHeight:H,inputLetterSpacing:h,inputWordSpacing:O,inputTextAppearance:F,buttonFontSettings:I,buttonFontSize:_,buttonLineHeight:B,buttonLetterSpacing:X,buttonWordSpacing:ie,buttonTextAppearance:ne,labelFontSettings:se,labelFontSize:R,labelLineHeight:K,labelLetterSpacing:fe,labelWordSpacing:ce,labelTextAppearance:de,statusFontSettings:Se,statusFontSize:Be,statusLineHeight:j,statusLetterSpacing:x,statusWordSpacing:G,statusTextAppearance:q,successMessage:J,errorMessage:re,stateOverrides:Z}=e,Y=a==="B",oe=c.slice(0,Math.min(i,c.length)),he={fontSettings:{fontFamily:k,fontWeight:(W==null?void 0:W.fontWeight)??400,fontStyle:(W==null?void 0:W.fontStyle)??"normal"},fontSize:D??.01,lineHeight:H,letterSpacing:h??0,wordSpacing:O??0,textAppearance:F,color:$},ae=Ze(Ge(he,t)),ge=E.scalingValue(S??0,t),we=E.scalingValue((H??D??.01)+((y==null?void 0:y.top)??0)+((y==null?void 0:y.bottom)??0)+(a==="C"?S??0:(S??0)*2),t),Q={...ae,borderStyle:"solid",borderRadius:a==="C"?0:E.scalingValue(m??0,t),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ge,borderLeftWidth:0}:{borderWidth:ge},paddingTop:E.scalingValue((y==null?void 0:y.top)??0,t),paddingRight:E.scalingValue((y==null?void 0:y.right)??0,t),paddingBottom:E.scalingValue((y==null?void 0:y.bottom)??0,t),paddingLeft:E.scalingValue((y==null?void 0:y.left)??0,t),height:we,minHeight:we},ue={fontSettings:{fontFamily:k,fontWeight:(I==null?void 0:I.fontWeight)??400,fontStyle:(I==null?void 0:I.fontStyle)??"normal"},fontSize:_??.01,lineHeight:B,letterSpacing:X??0,wordSpacing:ie??0,textAppearance:ne,color:f},xe=Ze(Ge(ue,t)),Pe=E.scalingValue(b??0,t),_t={fontSettings:{fontFamily:k,fontWeight:(se==null?void 0:se.fontWeight)??400,fontStyle:(se==null?void 0:se.fontStyle)??"normal"},fontSize:R??.01,lineHeight:K,letterSpacing:fe??0,wordSpacing:ce??0,textAppearance:de,color:A},Ye=Ge(_t,t),te={fontSettings:{fontFamily:k,fontWeight:(Se==null?void 0:Se.fontWeight)??400,fontStyle:(Se==null?void 0:Se.fontStyle)??"normal"},fontSize:Be??.01,lineHeight:j,letterSpacing:x??0,wordSpacing:G??0,textAppearance:q,color:z},_e=Ze(Ge(te,t)),Le=E.buildColorVars(o,{inputColor:v,inputTextColor:$,inputBorderColor:M,placeholderColor:P!=null&&P.trim()?P:"#cccccc",buttonColor:w,buttonTextColor:f,buttonBorderColor:T,labelTextColor:A,successColor:z,errorColor:L},wl,_l,Z),[le,Ce]=V.useState(()=>Object.fromEntries(oe.map(pe=>[pe.name,""]))),[Dt,ot]=V.useState("idle"),[go,Gt]=V.useState(null),vn=r==="success"?"success":r==="error"?"error":Dt,mo=r==="error"?re:go,Ut=r==="filled",Tt=V.useMemo(()=>{if(!Ut)return le;let pe=null;for(const Ne of oe)(le[Ne.name]??"").trim().length>0||(pe=pe??{...le},pe[Ne.name]="Filled");return pe??le},[le,Ut,oe]),fo=vn==="error"?E.getFormFieldValidationError(oe,Tt):null,ho=`${r&&r!=="default"?`${o}-state-${r}`:""}`.trim(),rr=n==null?void 0:n.submitUrl,or=(pe,Ne)=>{Ce(je=>({...je,[pe]:Ne}))},yo=async pe=>{pe.preventDefault();const Ne=Object.fromEntries(oe.map(Fe=>{var pt;return[Fe.name,((pt=le[Fe.name])==null?void 0:pt.trim())??""]}).filter(([,Fe])=>Fe));if(!rr){ot("error"),Gt("No integrations were found for this form.");return}if(Object.keys(Ne).length===0)return;const je=E.getFormFieldValidationError(oe,le);if(je){ot("error"),Gt(je);return}ot("submitting"),Gt(null);try{const Fe=await fetch(rr,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ne)});if(!Fe.ok){const pt=await Fe.text();throw new Error(pt||`Request failed: ${Fe.status}`)}ot("success"),Ce(Object.fromEntries(oe.map(pt=>[pt.name,""])))}catch(Fe){ot("error"),Gt(Fe instanceof Error?Fe.message:"Something went wrong")}};return p.jsxs("div",{className:`${o}-wrapper ${o}-type-${a} ${ho}`.trim(),style:Le,children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Cl(o)}}),p.jsxs("form",{onSubmit:yo,className:`${o}-form`,style:{gap:E.scalingValue(d??0,t)},children:[p.jsx("div",{className:`${o}-fields`,style:{gap:E.scalingValue(l??0,t)},children:oe.map((pe,Ne)=>p.jsxs("div",{className:`${o}-field-group${Y?` ${o}-labeled`:""}`,children:[Y&&p.jsx("span",{className:`${o}-field-label`,style:Ye?{...Ye,lineHeight:Ye.fontSize}:void 0,children:pe.label||pe.name}),pe.type==="textarea"?p.jsx("textarea",{name:pe.name,autoComplete:"off",value:Tt[pe.name]??"",onChange:je=>or(pe.name,je.target.value),placeholder:pe.placeholder,className:`${o}-input`,style:Q,rows:1,"data-filled":Ut||(Tt[pe.name]??"").trim().length>0,"data-field-type":"textarea"}):p.jsx("input",{type:pe.type==="phone"?"tel":pe.type==="email"?"email":"text",name:pe.name,autoComplete:"off",value:Tt[pe.name]??"",onChange:je=>or(pe.name,je.target.value),placeholder:pe.placeholder,required:pe.isRequired??pe.type==="email",className:`${o}-input`,style:Q,"data-filled":Ut||(Tt[pe.name]??"").trim().length>0})]},Ne))}),p.jsx("div",{className:`${o}-overlay-anchor`,children:p.jsx("button",{type:"submit",className:`${o}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(C??0,t),borderWidth:Pe,paddingTop:E.scalingValue((g==null?void 0:g.top)??0,t),paddingRight:E.scalingValue((g==null?void 0:g.right)??0,t),paddingBottom:E.scalingValue((g==null?void 0:g.bottom)??0,t),paddingLeft:E.scalingValue((g==null?void 0:g.left)??0,t),...xe,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:p.jsx("span",{className:`${o}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Dt==="submitting"?"...":s})})})]}),vn==="success"&&p.jsx("p",{className:`${o}-success`,style:{..._e},children:J}),vn==="error"&&p.jsx("p",{className:`${o}-error`,style:{..._e},role:"alert",children:fo??mo??re})]})}const wl={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"},_l=["hover","focus","filled","success","error"],Tl=`import React, { useMemo, useState } from 'react';\r
143
143
  import { CommonComponentProps } from '../props';\r
144
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
145
145
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -740,8 +740,8 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
740
740
  };\r
741
741
  \r
742
742
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
743
- `,Ll=[{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"}],qe={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},El=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Al={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:{...qe.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:{...qe.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:{...qe.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:{...qe.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:Ll,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...El],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"]},Il={element:$l,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:Al,sourceCode:Tl};function Ye(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Fl(t){return`
744
- .${t}-wrapper {
743
+ `,Ll=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."},{name:"message",type:"textarea",placeholder:"Enter your message",label:"Message",isRequired:!1,error:"Message is required"},{name:"message2",type:"textarea",placeholder:"Enter your message 2",label:"Message 2",isRequired:!1,error:"Message 2 is required"},{name:"message3",type:"textarea",placeholder:"Enter your message 3",label:"Message 3",isRequired:!1,error:"Message 3 is required"}],Kt={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},El=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],Al={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:7},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","textarea","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},successMessage:{type:"string",scope:"common",title:"Success Message",display:{type:"text-input"}},errorMessage:{type:"string",scope:"common",title:"Error Message",display:{type:"text-input"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B","C"]},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"range-control",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"range-control"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"range-control",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Input Fill",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Input Stroke",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler text",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Button Fill",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Button Label",display:{type:"palette-color-picker"}},isButtonFullWidth:{type:"boolean",scope:"common",title:"Full Width",display:{type:"toggle",enum:["On","Off"]}},buttonBorderColor:{type:"string",scope:"common",title:"Button Stroke",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Color",display:{type:"palette-color-picker",visible:!1}},successColor:{type:"string",scope:"common",title:"Success Message Color",display:{type:"palette-color-picker"}},errorColor:{type:"string",scope:"common",title:"Error Message Color",display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},inputFontSettings:{...Kt.fontSettings,scope:"common",title:"Input",display:{type:"font-settings-weight"}},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...Kt.fontSettings,scope:"common",title:"Button",display:{type:"font-settings-weight"}},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},labelFontSettings:{...Kt.fontSettings,scope:"common",title:"Label",display:{type:"font-settings-weight",visible:!1}},labelFontSize:{type:"number",scope:"layout",title:"Label Font Size",display:{type:"font-size",visible:!1}},labelLineHeight:{type:"number",scope:"layout",title:"Label Line Height",display:{type:"line-height-input",visible:!1}},labelLetterSpacing:{type:"number",scope:"layout",title:"Label Letter Spacing",display:{type:"letter-spacing-input",visible:!1}},labelWordSpacing:{type:"number",scope:"layout",title:"Label Word Spacing",display:{type:"word-spacing-input",visible:!1}},labelTextAppearance:{type:"object",scope:"layout",title:"Label Text Appearance",display:{type:"text-appearance",visible:!1}},statusFontSettings:{...Kt.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,fields:Ll,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:[{type:"group",title:"",items:["fieldsGap","inputStroke","inputCorners"]},{type:"group",title:"",items:["inputPadding"]}]},{type:"group",title:"Button",items:[{type:"row",items:["isButtonFullWidth"]},{type:"row",items:[{type:"group",title:"",items:["gap","buttonStroke","buttonCorners"]},{type:"group",title:"",items:["buttonPadding"]}]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["labelFontSettings",{type:"row",items:["labelFontSize","labelLineHeight","labelLetterSpacing","labelWordSpacing"]},"labelTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...El],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"]},Il={element:$l,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.jpg"},version:1,defaultSize:{width:300,height:42},schema:Al,sourceCode:Tl};function Jt(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Fl(e){return`
744
+ .${e}-wrapper {
745
745
  display: flex;
746
746
  flex-direction: column;
747
747
  width: 100%;
@@ -749,90 +749,90 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
749
749
  align-items: stretch;
750
750
  justify-content: center;
751
751
  }
752
- .${t}-form {
752
+ .${e}-form {
753
753
  display: flex;
754
754
  width: 100%;
755
755
  align-items: stretch;
756
756
  overflow: hidden;
757
- border-color: var(--${t}-stroke-color);
757
+ border-color: var(--${e}-stroke-color);
758
758
  transition: border-color 250ms;
759
759
  }
760
- .${t}-form:hover {
761
- border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
760
+ .${e}-form:hover {
761
+ border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
762
762
  }
763
- .${t}-form:focus-within {
764
- border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
763
+ .${e}-form:focus-within {
764
+ border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
765
765
  }
766
- .${t}-wrapper.${t}-state-hover .${t}-form {
767
- border-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
766
+ .${e}-wrapper.${e}-state-hover .${e}-form {
767
+ border-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
768
768
  }
769
- .${t}-wrapper.${t}-state-focus .${t}-form {
770
- border-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
769
+ .${e}-wrapper.${e}-state-focus .${e}-form {
770
+ border-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
771
771
  }
772
- .${t}-wrapper.${t}-state-filled .${t}-form {
773
- border-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
772
+ .${e}-wrapper.${e}-state-filled .${e}-form {
773
+ border-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
774
774
  }
775
- .${t}-inputWrap {
775
+ .${e}-inputWrap {
776
776
  position: relative;
777
777
  display: flex;
778
778
  align-items: center;
779
779
  flex: 1;
780
780
  min-width: 0;
781
- background-color: var(--${t}-input-color);
781
+ background-color: var(--${e}-input-color);
782
782
  transition: background-color 250ms;
783
783
  }
784
- .${t}-inputWrap:hover,
785
- .${t}-wrapper.${t}-state-hover .${t}-inputWrap {
786
- background-color: var(--${t}-hover-input-color, var(--${t}-input-color));
784
+ .${e}-inputWrap:hover,
785
+ .${e}-wrapper.${e}-state-hover .${e}-inputWrap {
786
+ background-color: var(--${e}-hover-input-color, var(--${e}-input-color));
787
787
  }
788
- .${t}-inputWrap:focus-within,
789
- .${t}-wrapper.${t}-state-focus .${t}-inputWrap {
790
- background-color: var(--${t}-focus-input-color, var(--${t}-input-color));
788
+ .${e}-inputWrap:focus-within,
789
+ .${e}-wrapper.${e}-state-focus .${e}-inputWrap {
790
+ background-color: var(--${e}-focus-input-color, var(--${e}-input-color));
791
791
  }
792
- .${t}-wrapper.${t}-state-filled .${t}-inputWrap {
793
- background-color: var(--${t}-filled-input-color, var(--${t}-input-color));
792
+ .${e}-wrapper.${e}-state-filled .${e}-inputWrap {
793
+ background-color: var(--${e}-filled-input-color, var(--${e}-input-color));
794
794
  }
795
- .${t}-input {
795
+ .${e}-input {
796
796
  flex: 1;
797
797
  min-width: 0;
798
798
  background: transparent;
799
799
  border: none;
800
800
  outline: none;
801
801
  -webkit-tap-highlight-color: transparent;
802
- color: var(--${t}-input-text-color);
802
+ color: var(--${e}-input-text-color);
803
803
  transition: color 250ms, background-color 250ms, border-color 250ms;
804
804
  }
805
- .${t}-input:hover {
806
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
805
+ .${e}-input:hover {
806
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
807
807
  }
808
- .${t}-inputWrap:hover .${t}-input,
809
- .${t}-wrapper.${t}-state-hover .${t}-input {
810
- color: var(--${t}-hover-input-text-color, var(--${t}-input-text-color));
808
+ .${e}-inputWrap:hover .${e}-input,
809
+ .${e}-wrapper.${e}-state-hover .${e}-input {
810
+ color: var(--${e}-hover-input-text-color, var(--${e}-input-text-color));
811
811
  }
812
- .${t}-input:focus,
813
- .${t}-wrapper.${t}-state-focus .${t}-input {
814
- color: var(--${t}-focus-input-text-color, var(--${t}-input-text-color));
812
+ .${e}-input:focus,
813
+ .${e}-wrapper.${e}-state-focus .${e}-input {
814
+ color: var(--${e}-focus-input-text-color, var(--${e}-input-text-color));
815
815
  }
816
- .${t}-wrapper.${t}-state-filled .${t}-input {
817
- color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
816
+ .${e}-wrapper.${e}-state-filled .${e}-input {
817
+ color: var(--${e}-filled-input-text-color, var(--${e}-input-text-color));
818
818
  }
819
- .${t}-input::placeholder {
820
- color: var(--${t}-placeholder-color);
819
+ .${e}-input::placeholder {
820
+ color: var(--${e}-placeholder-color);
821
821
  opacity: 1;
822
822
  transition: color 250ms, opacity 250ms;
823
823
  }
824
- .${t}-inputWrap:hover .${t}-input::placeholder,
825
- .${t}-wrapper.${t}-state-hover .${t}-input::placeholder {
826
- color: var(--${t}-hover-placeholder-color, var(--${t}-placeholder-color));
824
+ .${e}-inputWrap:hover .${e}-input::placeholder,
825
+ .${e}-wrapper.${e}-state-hover .${e}-input::placeholder {
826
+ color: var(--${e}-hover-placeholder-color, var(--${e}-placeholder-color));
827
827
  }
828
- .${t}-inputWrap:focus-within .${t}-input::placeholder,
829
- .${t}-wrapper.${t}-state-focus .${t}-input::placeholder {
830
- color: var(--${t}-focus-placeholder-color, var(--${t}-placeholder-color));
828
+ .${e}-inputWrap:focus-within .${e}-input::placeholder,
829
+ .${e}-wrapper.${e}-state-focus .${e}-input::placeholder {
830
+ color: var(--${e}-focus-placeholder-color, var(--${e}-placeholder-color));
831
831
  }
832
- .${t}-wrapper.${t}-state-filled .${t}-input::placeholder {
833
- color: var(--${t}-filled-placeholder-color, var(--${t}-placeholder-color));
832
+ .${e}-wrapper.${e}-state-filled .${e}-input::placeholder {
833
+ color: var(--${e}-filled-placeholder-color, var(--${e}-placeholder-color));
834
834
  }
835
- .${t}-submitBtn {
835
+ .${e}-submitBtn {
836
836
  box-sizing: border-box;
837
837
  height: 100%;
838
838
  display: flex;
@@ -841,13 +841,13 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
841
841
  border: none;
842
842
  cursor: pointer;
843
843
  white-space: nowrap;
844
- background-color: var(--${t}-button-color);
845
- color: var(--${t}-button-text-color);
844
+ background-color: var(--${e}-button-color);
845
+ color: var(--${e}-button-text-color);
846
846
  border-left-style: solid;
847
- border-left-color: var(--${t}-stroke-color);
847
+ border-left-color: var(--${e}-stroke-color);
848
848
  transition: color 250ms, background-color 250ms, border-color 250ms;
849
849
  }
850
- .${t}-submitBtn img {
850
+ .${e}-submitBtn img {
851
851
  display: block;
852
852
  box-sizing: border-box;
853
853
  flex: 0 1 auto;
@@ -858,7 +858,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
858
858
  max-height: 100%;
859
859
  object-fit: contain;
860
860
  }
861
- .${t}-submitBtn svg {
861
+ .${e}-submitBtn svg {
862
862
  display: block;
863
863
  box-sizing: border-box;
864
864
  flex: 0 1 auto;
@@ -868,7 +868,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
868
868
  max-width: 100%;
869
869
  max-height: 100%;
870
870
  }
871
- .${t}-submitBtn .${t}-submitBtnIcon {
871
+ .${e}-submitBtn .${e}-submitBtnIcon {
872
872
  position: relative;
873
873
  top: auto;
874
874
  left: auto;
@@ -884,54 +884,54 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
884
884
  max-width: 100%;
885
885
  max-height: 100%;
886
886
  }
887
- .${t}-submitBtn:hover,
888
- .${t}-wrapper.${t}-state-hover .${t}-submitBtn {
889
- background-color: var(--${t}-hover-button-color, var(--${t}-button-color));
890
- color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
891
- border-left-color: var(--${t}-hover-stroke-color, var(--${t}-stroke-color));
887
+ .${e}-submitBtn:hover,
888
+ .${e}-wrapper.${e}-state-hover .${e}-submitBtn {
889
+ background-color: var(--${e}-hover-button-color, var(--${e}-button-color));
890
+ color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
891
+ border-left-color: var(--${e}-hover-stroke-color, var(--${e}-stroke-color));
892
892
  }
893
- .${t}-submitBtn:focus,
894
- .${t}-wrapper.${t}-state-focus .${t}-submitBtn {
895
- background-color: var(--${t}-focus-button-color, var(--${t}-button-color));
896
- color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
897
- border-left-color: var(--${t}-focus-stroke-color, var(--${t}-stroke-color));
893
+ .${e}-submitBtn:focus,
894
+ .${e}-wrapper.${e}-state-focus .${e}-submitBtn {
895
+ background-color: var(--${e}-focus-button-color, var(--${e}-button-color));
896
+ color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
897
+ border-left-color: var(--${e}-focus-stroke-color, var(--${e}-stroke-color));
898
898
  }
899
- .${t}-wrapper.${t}-state-filled .${t}-submitBtn {
900
- background-color: var(--${t}-filled-button-color, var(--${t}-button-color));
901
- color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
902
- border-left-color: var(--${t}-filled-stroke-color, var(--${t}-stroke-color));
899
+ .${e}-wrapper.${e}-state-filled .${e}-submitBtn {
900
+ background-color: var(--${e}-filled-button-color, var(--${e}-button-color));
901
+ color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
902
+ border-left-color: var(--${e}-filled-stroke-color, var(--${e}-stroke-color));
903
903
  }
904
- .${t}-submitBtn:hover .${t}-submitBtnIcon,
905
- .${t}-wrapper.${t}-state-hover .${t}-submitBtn .${t}-submitBtnIcon {
906
- background-color: var(--${t}-hover-button-text-color, var(--${t}-button-text-color));
904
+ .${e}-submitBtn:hover .${e}-submitBtnIcon,
905
+ .${e}-wrapper.${e}-state-hover .${e}-submitBtn .${e}-submitBtnIcon {
906
+ background-color: var(--${e}-hover-button-text-color, var(--${e}-button-text-color));
907
907
  }
908
- .${t}-submitBtn:focus .${t}-submitBtnIcon,
909
- .${t}-wrapper.${t}-state-focus .${t}-submitBtn .${t}-submitBtnIcon {
910
- background-color: var(--${t}-focus-button-text-color, var(--${t}-button-text-color));
908
+ .${e}-submitBtn:focus .${e}-submitBtnIcon,
909
+ .${e}-wrapper.${e}-state-focus .${e}-submitBtn .${e}-submitBtnIcon {
910
+ background-color: var(--${e}-focus-button-text-color, var(--${e}-button-text-color));
911
911
  }
912
- .${t}-wrapper.${t}-state-filled .${t}-submitBtn .${t}-submitBtnIcon {
913
- background-color: var(--${t}-filled-button-text-color, var(--${t}-button-text-color));
912
+ .${e}-wrapper.${e}-state-filled .${e}-submitBtn .${e}-submitBtnIcon {
913
+ background-color: var(--${e}-filled-button-text-color, var(--${e}-button-text-color));
914
914
  }
915
- .${t}-wrapper.${t}-state-success .${t}-input,
916
- .${t}-wrapper.${t}-state-success .${t}-submitBtn {
915
+ .${e}-wrapper.${e}-state-success .${e}-input,
916
+ .${e}-wrapper.${e}-state-success .${e}-submitBtn {
917
917
  pointer-events: none;
918
918
  }
919
- .${t}-overlayAnchor {
919
+ .${e}-overlayAnchor {
920
920
  position: relative;
921
921
  display: flex;
922
922
  align-items: center;
923
923
  }
924
- .${t}-success {
925
- margin-top: ${Ye(8)};
926
- font-size: ${Ye(14)};
927
- color: var(--${t}-success-success-color, var(--${t}-success-color));
924
+ .${e}-success {
925
+ margin-top: ${Jt(8)};
926
+ font-size: ${Jt(14)};
927
+ color: var(--${e}-success-success-color, var(--${e}-success-color));
928
928
  }
929
- .${t}-error {
930
- margin-top: ${Ye(8)};
931
- font-size: ${Ye(14)};
932
- color: var(--${t}-error-error-color, var(--${t}-error-color));
929
+ .${e}-error {
930
+ margin-top: ${Jt(8)};
931
+ font-size: ${Jt(14)};
932
+ color: var(--${e}-error-error-color, var(--${e}-error-color));
933
933
  }
934
- `}const kl=({settings:t,isEditor:e,metadata:r,activeEvent:n})=>{const{prefix:o}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:s,fieldsToShow:c=1,fontFamily:l,inputFontSettings:u,inputFontSize:C,inputLineHeight:v,inputLetterSpacing:m,inputWordSpacing:p,inputTextAppearance:g,buttonFontSettings:S,buttonFontSize:h,buttonLineHeight:f,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:T,statusFontSettings:w,statusFontSize:y,statusLineHeight:L,statusLetterSpacing:I,statusWordSpacing:V,statusTextAppearance:R,iconMaxWidth:F,minHeight:W,corners:H,stroke:G,stateOverrides:b,inputPadding:P,buttonPadding:k,successMessage:A="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=t,B=a.slice(0,Math.min(c,a.length)),[X,ot]=z.useState(()=>Object.fromEntries(B.map(yt=>[yt.name,""]))),[rt,st]=z.useState("idle"),[O,K]=z.useState(null),mt=n==="success"?"success":n==="error"?"error":rt,ct=n==="error"?_:O,dt=n==="filled",xt=z.useMemo(()=>{if(!dt)return X;let yt=null;for(const Rt of B)(X[Rt.name]??"").trim().length>0||(yt=yt??{...X},yt[Rt.name]="Filled");return yt??X},[dt,X,B]),kt=mt==="error"?E.getFormFieldValidationError(B,xt):null,j=n&&n!=="default"?`${o}-state-${n}`:"",x=B.some(yt=>(xt[yt.name]??"").trim().length>0),D=j!==`${o}-state-filled`&&x?`${o}-state-filled`:"",q=`${j} ${D}`.trim(),J=r==null?void 0:r.submitUrl,et=s??"",Z=(i==null?void 0:i.icon)??"",Y=(i==null?void 0:i.mode)==="On",nt=et||"Submit",it={fontSettings:{fontFamily:l,fontWeight:(u==null?void 0:u.fontWeight)??400,fontStyle:(u==null?void 0:u.fontStyle)??"normal"},fontSize:C??.01,lineHeight:v,letterSpacing:m??0,wordSpacing:p??0,textAppearance:g,color:t.inputTextColor??"#111111"},at={fontSettings:{fontFamily:l,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:h??.01,lineHeight:f,letterSpacing:$??0,wordSpacing:M??0,textAppearance:T,color:t.buttonTextColor??"#ffffff"},lt={fontSettings:{fontFamily:l,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:y??.01,lineHeight:L,letterSpacing:I??0,wordSpacing:V??0,textAppearance:R,color:t.successColor??"#22c55e"},bt=Kt(Ht(it,e)),Q=Kt(Ht(at,e)),ut=Kt(Ht(lt,e)),wt=E.buildColorVars(o,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(it==null?void 0:it.color)??"#111111",buttonTextColor:t.buttonTextColor??(at==null?void 0:at.color)??"#ffffff"},Rl,Ol,b),Xt={borderRadius:E.scalingValue(H,e),borderWidth:E.scalingValue(G,e),borderStyle:"solid"},hr={borderLeftWidth:E.scalingValue(G,e)},$e=async yt=>{yt.preventDefault();const Rt=Object.fromEntries(B.map(St=>{var Wt;return[St.name,((Wt=X[St.name])==null?void 0:Wt.trim())??""]}).filter(([,St])=>St));if(!J){st("error"),K("No integrations were found for this form.");return}if(Object.keys(Rt).length===0)return;const re=E.getFormFieldValidationError(B,X);if(re){st("error"),K(re);return}st("submitting"),K(null);try{const St=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Rt)});if(!St.ok){const Wt=await St.text();throw new Error(Wt||`Request failed: ${St.status}`)}st("success"),ot(Object.fromEntries(B.map(Wt=>[Wt.name,""])))}catch(St){st("error"),K(St instanceof Error?St.message:"Something went wrong")}};return d.jsxs("div",{className:`${o}-wrapper ${q}`.trim(),style:wt,children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:Fl(o)}}),d.jsxs("form",{onSubmit:$e,className:`${o}-form`,style:{...Xt,height:E.scalingValue(W,e),minHeight:E.scalingValue(W,e)},children:[d.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:B.map(yt=>d.jsx("input",{type:yt.type==="email"?"email":yt.type==="phone"?"tel":"text",name:yt.name,autoComplete:"off",value:xt[yt.name]??"",onChange:Rt=>ot(re=>({...re,[yt.name]:Rt.target.value})),placeholder:yt.placeholder,required:yt.isRequired??yt.type==="email",className:`${o}-input`,style:{...bt,paddingRight:E.scalingValue(P.right,e),paddingLeft:E.scalingValue(P.left,e),paddingTop:E.scalingValue(P.top,e),paddingBottom:E.scalingValue(P.bottom,e)}},yt.name))}),d.jsx("div",{className:`${o}-overlayAnchor`,children:d.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":nt,style:{...Q,...hr,paddingRight:E.scalingValue(k.right,e),paddingLeft:E.scalingValue(k.left,e),paddingTop:E.scalingValue(k.top,e),paddingBottom:E.scalingValue(k.bottom,e)},children:rt==="submitting"?"...":Y?Z&&d.jsx(he,{url:Z,className:`${o}-submitBtnIcon`,style:{maxWidth:E.scalingValue(F??0,e)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):et})})]}),mt==="success"&&d.jsx("p",{className:`${o}-success`,style:{...ut},children:A}),mt==="error"&&d.jsx("p",{className:`${o}-error`,style:{...ut},role:"alert",children:kt??ct??_})]})},Rl={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"},Ol=["hover","focus","filled","success","error"],Pl=`import React, { useMemo, useState } from 'react';\r
934
+ `}const kl=({settings:e,isEditor:t,metadata:n,activeEvent:r})=>{const{prefix:o}=E.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:i,buttonLabel:c,fieldsToShow:s=1,fontFamily:d,inputFontSettings:l,inputFontSize:C,inputLineHeight:b,inputLetterSpacing:g,inputWordSpacing:u,inputTextAppearance:m,buttonFontSettings:S,buttonFontSize:y,buttonLineHeight:v,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:P,statusFontSettings:w,statusFontSize:f,statusLineHeight:T,statusLetterSpacing:A,statusWordSpacing:z,statusTextAppearance:L,iconMaxWidth:k,minHeight:W,corners:D,stroke:H,stateOverrides:h,inputPadding:O,buttonPadding:F,successMessage:I="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=e,B=a.slice(0,Math.min(s,a.length)),[X,ie]=V.useState(()=>Object.fromEntries(B.map(te=>[te.name,""]))),[ne,se]=V.useState("idle"),[R,K]=V.useState(null),fe=r==="success"?"success":r==="error"?"error":ne,ce=r==="error"?_:R,de=r==="filled",Se=V.useMemo(()=>{if(!de)return X;let te=null;for(const _e of B)(X[_e.name]??"").trim().length>0||(te=te??{...X},te[_e.name]="Filled");return te??X},[de,X,B]),Be=fe==="error"?E.getFormFieldValidationError(B,Se):null,j=r&&r!=="default"?`${o}-state-${r}`:"",x=B.some(te=>(Se[te.name]??"").trim().length>0),G=j!==`${o}-state-filled`&&x?`${o}-state-filled`:"",q=`${j} ${G}`.trim(),J=n==null?void 0:n.submitUrl,re=c??"",Z=(i==null?void 0:i.icon)??"",Y=(i==null?void 0:i.mode)==="On",oe=re||"Submit",he={fontSettings:{fontFamily:d,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:C??.01,lineHeight:b,letterSpacing:g??0,wordSpacing:u??0,textAppearance:m,color:e.inputTextColor??"#111111"},ae={fontSettings:{fontFamily:d,fontWeight:(S==null?void 0:S.fontWeight)??400,fontStyle:(S==null?void 0:S.fontStyle)??"normal"},fontSize:y??.01,lineHeight:v,letterSpacing:$??0,wordSpacing:M??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},ge={fontSettings:{fontFamily:d,fontWeight:(w==null?void 0:w.fontWeight)??400,fontStyle:(w==null?void 0:w.fontStyle)??"normal"},fontSize:f??.01,lineHeight:T,letterSpacing:A??0,wordSpacing:z??0,textAppearance:L,color:e.successColor??"#22c55e"},we=Ze(Ge(he,t)),Q=Ze(Ge(ae,t)),ue=Ze(Ge(ge,t)),xe=E.buildColorVars(o,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(he==null?void 0:he.color)??"#111111",buttonTextColor:e.buttonTextColor??(ae==null?void 0:ae.color)??"#ffffff"},Rl,Ol,h),Pe={borderRadius:E.scalingValue(D,t),borderWidth:E.scalingValue(H,t),borderStyle:"solid"},_t={borderLeftWidth:E.scalingValue(H,t)},Ye=async te=>{te.preventDefault();const _e=Object.fromEntries(B.map(le=>{var Ce;return[le.name,((Ce=X[le.name])==null?void 0:Ce.trim())??""]}).filter(([,le])=>le));if(!J){se("error"),K("No integrations were found for this form.");return}if(Object.keys(_e).length===0)return;const Le=E.getFormFieldValidationError(B,X);if(Le){se("error"),K(Le);return}se("submitting"),K(null);try{const le=await fetch(J,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_e)});if(!le.ok){const Ce=await le.text();throw new Error(Ce||`Request failed: ${le.status}`)}se("success"),ie(Object.fromEntries(B.map(Ce=>[Ce.name,""])))}catch(le){se("error"),K(le instanceof Error?le.message:"Something went wrong")}};return p.jsxs("div",{className:`${o}-wrapper ${q}`.trim(),style:xe,children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Fl(o)}}),p.jsxs("form",{onSubmit:Ye,className:`${o}-form`,style:{...Pe,height:E.scalingValue(W,t),minHeight:E.scalingValue(W,t)},children:[p.jsx("div",{className:`${o}-inputWrap ${o}-overlayAnchor`,style:{flex:1,minWidth:0},children:B.map(te=>p.jsx("input",{type:te.type==="email"?"email":te.type==="phone"?"tel":"text",name:te.name,autoComplete:"off",value:Se[te.name]??"",onChange:_e=>ie(Le=>({...Le,[te.name]:_e.target.value})),placeholder:te.placeholder,required:te.isRequired??te.type==="email",className:`${o}-input`,style:{...we,paddingRight:E.scalingValue(O.right,t),paddingLeft:E.scalingValue(O.left,t),paddingTop:E.scalingValue(O.top,t),paddingBottom:E.scalingValue(O.bottom,t)}},te.name))}),p.jsx("div",{className:`${o}-overlayAnchor`,children:p.jsx("button",{type:"submit",className:`${o}-submitBtn`,"aria-label":oe,style:{...Q,..._t,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:ne==="submitting"?"...":Y?Z&&p.jsx(bt,{url:Z,className:`${o}-submitBtnIcon`,style:{maxWidth:E.scalingValue(k??0,t)},fill:`var(--${o}-button-text-color)`,hoverFill:`var(--${o}-button-text-color)`}):re})})]}),fe==="success"&&p.jsx("p",{className:`${o}-success`,style:{...ue},children:I}),fe==="error"&&p.jsx("p",{className:`${o}-error`,style:{...ue},role:"alert",children:Be??ce??_})]})},Rl={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"},Ol=["hover","focus","filled","success","error"],Bl=`import React, { useMemo, useState } from 'react';\r
935
935
  import { CommonComponentProps } from '../props';\r
936
936
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
937
937
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';\r
@@ -1503,592 +1503,643 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {\r
1503
1503
  };\r
1504
1504
  \r
1505
1505
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
1506
- `,Bl="data:image/svg+xml,"+encodeURIComponent('<svg width="23px" height="20px" viewBox="0 0 23 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Newsletter" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Tutorials-pop-up-Copy-12" transform="translate(-43, -687)" fill="#FFFFFF" fill-rule="nonzero"><path d="M66,697 C66,697.552285 65.5522847,698 65,698 L44,698 C43.4477153,698 43,697.552285 43,697 C43,696.447715 43.4477153,696 44,696 L65,696 C65.5522847,696 66,696.447715 66,697 Z M55.6689647,687.256706 L65.6689647,696.256706 C66.1103451,696.653948 66.1103451,697.346052 65.6689647,697.743294 L55.6689647,706.743294 C55.2584547,707.112753 54.6261649,707.079475 54.2567059,706.668965 C53.8872468,706.258455 53.9205252,705.626165 54.3310353,705.256706 L63.5051529,697 L54.3310353,688.743294 C53.9205252,688.373835 53.8872468,687.741545 54.2567059,687.331035 C54.6261649,686.920525 55.2584547,686.887247 55.6689647,687.256706 Z" id="Combined-Shape"></path></g></g></svg>'),Wl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],$r={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},zl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vl={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:{...$r.fontSettings,scope:"common",title:"Input"},inputFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},inputLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},inputLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},inputWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},inputTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},buttonFontSettings:{...$r.fontSettings,scope:"common",title:"Button"},buttonFontSize:{type:"number",scope:"layout",title:"Button Font Size",display:{type:"font-size"}},buttonLineHeight:{type:"number",scope:"layout",title:"Button Line Height",display:{type:"line-height-input"}},buttonLetterSpacing:{type:"number",scope:"layout",title:"Button Letter Spacing",display:{type:"letter-spacing-input"}},buttonWordSpacing:{type:"number",scope:"layout",title:"Button Word Spacing",display:{type:"word-spacing-input"}},buttonTextAppearance:{type:"object",scope:"layout",title:"Button Text Appearance",display:{type:"text-appearance"}},statusFontSettings:{...$r.fontSettings,scope:"common",title:"Success/Error"},statusFontSize:{type:"number",scope:"layout",title:"Success/Error Font Size",display:{type:"font-size"}},statusLineHeight:{type:"number",scope:"layout",title:"Success/Error Line Height",display:{type:"line-height-input"}},statusLetterSpacing:{type:"number",scope:"layout",title:"Success/Error Letter Spacing",display:{type:"letter-spacing-input"}},statusWordSpacing:{type:"number",scope:"layout",title:"Success/Error Word Spacing",display:{type:"word-spacing-input"}},statusTextAppearance:{type:"object",scope:"layout",title:"Success/Error Text Appearance",display:{type:"text-appearance"}}},defaults:{fields:Wl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Bl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...zl],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"]},Nl={element:kl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:Vl,sourceCode:Pl};function jl(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Ml(t){return`
1507
- .${t}-wrapper {
1506
+ `,Pl="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>'),Wl=[{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"}}}},Vl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],zl={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:Wl,fieldsToShow:1,buttonLabel:"Subscribe",buttonIcon:{mode:"Off",icon:Pl},fontFamily:"Arial",strokeColor:"#0A00F8",inputColor:"#ffffff",inputTextColor:"#0A00F8",placeholderColor:"#000000",buttonColor:"#0088D7",buttonTextColor:"#ffffff",errorColor:"#ef4444",successColor:"#22c55e",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields.",stateOverrides:{hover:{buttonColor:"#33A2F2"}},inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{minHeight:.1,iconMaxWidth:.1,stroke:0,corners:0,buttonPadding:{top:.02,right:.04,bottom:.02,left:.04},inputPadding:{top:.01,right:.03,bottom:.01,left:.03},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{minHeight:.028,iconMaxWidth:.028,stroke:0,corners:0,buttonPadding:{right:.0175,left:.0175,top:.005,bottom:.004},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.009,buttonLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"On"},then:{name:"properties.buttonTextAppearance.display.visible",value:!1}},{if:{name:"buttonIcon.mode",value:"Off"},then:{name:"properties.iconMaxWidth.display.visible",value:!1}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","fieldsToShow"]},{type:"row",items:["minHeight","corners"]},{type:"row",items:[{type:"group",title:"",items:["stroke","buttonIcon"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["buttonPadding"]}}]},"iconMaxWidth"]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["fontFamily",{type:"group",title:"",items:["inputFontSettings",{type:"row",items:["inputFontSize","inputLineHeight","inputLetterSpacing","inputWordSpacing"]},"inputTextAppearance"]},{type:"group",title:"",items:["buttonFontSettings",{type:"row",items:["buttonFontSize","buttonLineHeight","buttonLetterSpacing","buttonWordSpacing"]},"buttonTextAppearance"]},{type:"group",title:"",items:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Vl],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"]},Nl={element:kl,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.jpg"},defaultSize:{width:400,height:60},assetsPaths:{content:[],parameters:[{path:"buttonIcon.icon"}]},schema:zl,sourceCode:Bl};function jl(){return window.navigator.platform==="Win32"||window.navigator.platform==="Win64"?'"InputMono-Regular", monospace':'"DepartureMono-Regular", monospace'}function Ml(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Hl(e){return`
1507
+ .${e}-wrapper {
1508
1508
  display: grid;
1509
1509
  align-items: start;
1510
1510
  width: 100%;
1511
1511
  column-gap: 10%;
1512
- min-height: ${jl(48)};
1512
+ min-height: ${Ml(48)};
1513
1513
  }
1514
- .${t}-item {
1514
+ .${e}-item {
1515
1515
  display: flex;
1516
1516
  flex-direction: column;
1517
1517
  justify-content: center;
1518
1518
  align-items: center;
1519
1519
  gap: 12px;
1520
1520
  }
1521
- .${t}-item-image {
1521
+ .${e}-item-image-wrapper {
1522
+ display: flex;
1523
+ justify-content: center;
1524
+ align-items: center;
1525
+ }
1526
+ .${e}-item-image {
1522
1527
  width: 100%;
1523
1528
  height: 100%;
1524
1529
  display: block;
1525
1530
  }
1526
- .${t}-item-slider,
1527
- .${t}-item-slider .splide__track,
1528
- .${t}-item-slider .splide__list,
1529
- .${t}-item-slider .splide__slide {
1531
+ .${e}-item-slider,
1532
+ .${e}-item-slider .splide__track,
1533
+ .${e}-item-slider .splide__list,
1534
+ .${e}-item-slider .splide__slide {
1530
1535
  width: 100%;
1531
1536
  height: 100%;
1532
1537
  }
1533
- .${t}-item-slider .splide__slide {
1538
+ .${e}-item-slider .splide__slide {
1534
1539
  display: flex;
1540
+ justify-content: center;
1541
+ align-items: center;
1535
1542
  }
1536
- .${t}-item-title {
1543
+ .${e}-item-title {
1537
1544
  white-space: normal;
1538
1545
  overflow-wrap: anywhere;
1539
1546
  word-break: break-word;
1540
1547
  text-align: center;
1541
1548
  margin-bottom: 0px;
1542
1549
  margin-top: 0px;
1543
- color: var(--${t}-title-color);
1550
+ color: var(--${e}-title-color);
1544
1551
  }
1545
- .${t}-item-subtitle {
1552
+ .${e}-item-subtitle {
1546
1553
  white-space: normal;
1547
1554
  overflow-wrap: anywhere;
1548
1555
  word-break: break-word;
1549
1556
  text-align: center;
1550
1557
  margin-bottom: 0px;
1551
1558
  margin-top: 0px;
1552
- color: var(--${t}-subtitle-color);
1559
+ color: var(--${e}-subtitle-color);
1560
+ }
1561
+ `}const Ke=500,at="cubic-bezier(0.22, 1, 0.36, 1)";function Dl({images:e,index:t,imageDisplay:n,originRect:r,reverseClose:o,onClose:a,onPrev:i,onNext:c}){const s=V.useRef(null),d=V.useRef(null),[l,C]=V.useState(null),[b,g]=V.useState(r?"opening":"open"),[u,m]=V.useState(!0),S=V.useRef(t),y=V.useCallback(()=>{const f=s.current,T=d.current;if(!f||!T)return;const A=f.getBoundingClientRect(),z=A.width,L=A.height,k=T.naturalWidth,W=T.naturalHeight;if(!z||!L||!k||!W)return;if(n==="Cover"){C({width:z,height:L,left:A.left,top:A.top});return}const D=k/W,H=z/L;if(D>H){const h=z/D;C({width:z,height:h,left:A.left,top:A.top+(L-h)/2})}else{const h=L*D;C({width:h,height:L,left:A.left+(z-h)/2,top:A.top})}},[n]);V.useEffect(()=>{y();const f=s.current;if(!f)return;const T=new ResizeObserver(()=>y());return T.observe(f),()=>T.disconnect()},[y,t]),V.useEffect(()=>{if(b!=="opening"||!l)return;const f={id:0};return f.id=requestAnimationFrame(()=>{f.id=requestAnimationFrame(()=>g("open"))}),()=>cancelAnimationFrame(f.id)},[b,l]),V.useEffect(()=>{if(b!=="closing")return;const f=setTimeout(()=>a(),Ke);return()=>clearTimeout(f)},[b,a]),V.useEffect(()=>{S.current!==t&&m(!1),S.current=t},[t]);const v=()=>{b!=="closing"&&g("closing")},$=b==="open",M=b==="closing",P=M&&o&&!!r,w=b==="opening"?r??l:P?r:l;return p.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:v,children:[p.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:$?1:0,transition:`opacity ${Ke}ms ${at}`,pointerEvents:"none"}}),p.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[p.jsx("div",{style:{height:"10%"}}),p.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:p.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}),p.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:$?1:0,transition:`opacity ${Ke}ms ${at}`,fontFamily:jl()},children:[p.jsx("p",{children:t+1}),p.jsx("p",{children:"/"}),p.jsx("p",{children:e.length})]})]}),w&&p.jsx("img",{ref:d,src:e[t],onLoad:y,style:{position:"fixed",top:w.top,left:w.left,width:w.width,height:w.height,objectFit:n==="Cover"?"cover":"contain",opacity:M&&!P?0:1,transition:M&&!P?`opacity ${Ke}ms ${at}`:P||u?`top ${Ke}ms ${at}, left ${Ke}ms ${at}, width ${Ke}ms ${at}, height ${Ke}ms ${at}`:"none",pointerEvents:"none",zIndex:9998}}),$&&l&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{position:"fixed",top:l.top,left:l.left,width:l.width/2,height:l.height,cursor:"w-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),i()}}),p.jsx("div",{style:{position:"fixed",top:l.top,left:l.left+l.width/2,width:l.width/2,height:l.height,cursor:"e-resize",zIndex:9999},onClick:f=>{f.stopPropagation(),c()}})]})]})}function Gl({settings:e,content:t,isEditor:n,metadata:r,activeEvent:o}){const{prefix:a}=E.useScopedStyles(),{type:i="A",fieldsToShow:c=2,textBoxWidth:s,verticalGap:d,entriesCount:l,lightbox:C,imageSize:b,imageDisplay:g,slider:u,sliderTiming:m,direction:S,transition:y,titleColor:v,subtitleColor:$,titleFontFamily:M,titleFontSettings:P,titleFontSize:w,titleLineHeight:f,titleLetterSpacing:T,titleWordSpacing:A,titleTextAppearance:z,subtitleFontFamily:L,subtitleFontSettings:k,subtitleFontSize:W,subtitleLineHeight:D,subtitleLetterSpacing:H,subtitleWordSpacing:h,subtitleTextAppearance:O}=e,F={fontSettings:{fontFamily:M,fontWeight:(P==null?void 0:P.fontWeight)??400,fontStyle:(P==null?void 0:P.fontStyle)??"normal"},fontSize:w??.01,lineHeight:f,letterSpacing:T??0,wordSpacing:A??0,textAppearance:z,color:v},_={...Ze(Ge(F,n))},B={fontSettings:{fontFamily:L,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:W??.01,lineHeight:D,letterSpacing:H??0,wordSpacing:h??0,textAppearance:O,color:$},ie={...Ze(Ge(B,n))},ne=E.buildColorVars(a,{titleColor:v,subtitleColor:$},Ul,Xl),R=`${o&&o!=="default"?`${a}-state-${o}`:""}`.trim(),K=l===0?1/0:l,fe=(t??[]).slice(0,K),de={Small:.1,Medium:.2,Big:.3}[b]??.2,Se=(g==null?void 0:g.display)==="Cover",Be=(g==null?void 0:g.ratioValue)??"1:1",j=(g==null?void 0:g.reversed)??!1,[x,G]=Be.split(":").map(Number),q=j?G:x,J=j?x:G,re=`${q} / ${J}`,Z=q>=J,Y={objectFit:Se?"cover":"contain",...Se&&{aspectRatio:re,width:Z?"100%":"auto",height:Z?"auto":"100%"}},[oe,he]=V.useState("ltr"),[ae,ge]=V.useState(!1),[we,Q]=V.useState([]),[ue,xe]=V.useState(0),[Pe,_t]=V.useState(null),Ye=(te,_e,Le)=>{if(C==="Off")return;const le=te.currentTarget.getBoundingClientRect();_t({top:le.top,left:le.left,width:le.width,height:le.height}),Q(_e),xe(Le),ge(!0)};return V.useEffect(()=>{if(!ae||C!=="On"||typeof document>"u")return;const te=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=te}},[ae,C]),p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:Hl(a)}}),p.jsx("div",{style:ne,children:p.jsx("div",{className:`${a}-wrapper ${a}-type-${i} ${R}`.trim(),style:{gridTemplateColumns:`repeat(${c}, 1fr)`,rowGap:E.scalingValue(d??0,n)},children:fe.map((te,_e)=>{var Le;return p.jsxs("div",{className:`${a}-item`.trim(),children:[p.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:E.scalingValue(de??0,n),height:E.scalingValue(de??0,n)},children:(((Le=te.image)==null?void 0:Le.length)??0)===0?null:u==="Off"?p.jsx("img",{src:te.image[0].url,alt:te.image[0].name,className:`${a}-item-image`.trim(),style:Y,onClick:le=>Ye(le,te.image.map(Ce=>Ce.url),0)}):p.jsx(tr,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:m*1e3,width:"100%",height:"100%",speed:500,type:y==="Fade"?"fade":"loop",rewind:y==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:y==="Fade"?"ltr":S!=="Random"?S==="Horizontal"?"ltr":"ttb":oe},onMoved:le=>{if(S!=="Random"||y==="Fade")return;const Ce=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";he(Ce),setTimeout(()=>{le.refresh()},0)},children:te.image.map((le,Ce)=>p.jsx(nr,{children:p.jsx("img",{src:le.url,alt:le.name,className:`${a}-item-image`.trim(),style:Y,onClick:Dt=>Ye(Dt,te.image.map(ot=>ot.url),Ce)})},Ce))},`${y}-${b}-${S}-${m}`)}),p.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${E.scalingValue(de??0,n)} * (${s} / 100))`,..._},children:te.title}),i==="B"&&p.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${E.scalingValue(de??0,n)} * (${s} / 100))`,...ie},children:te.subtitle})]},_e)})})}),ae&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&C==="On"&&Lr.createPortal(p.jsx("div",{"data-selection":"none",children:p.jsx(Dl,{images:we,index:ue,imageDisplay:g.display,originRect:Pe,reverseClose:u==="Off",onClose:()=>ge(!1),onPrev:()=>xe(te=>(te-1+we.length)%we.length),onNext:()=>xe(te=>(te+1)%we.length)})}),document.body)]})}const Ul={titleColor:"title-color",subtitleColor:"subtitle-color"},Xl=["hover","focus","filled","success","error"],ql=`import { Splide, SplideSlide } from '@splidejs/react-splide';
1562
+ import '@splidejs/react-splide/css/core';
1563
+ import { CommonComponentProps } from '../props';
1564
+ import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
1565
+ import { useCallback, useEffect, useRef, useState } from 'react';
1566
+ import { createPortal } from 'react-dom';
1567
+ import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
1568
+ import { getFontBasedOnSystem } from '../utils/getMainFontBaseOnSystem';
1569
+
1570
+ function sv(px: number): string {
1571
+ return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
1572
+ }
1573
+
1574
+ function getCSS(P: string): string {
1575
+ return \`
1576
+ .\${P}-wrapper {
1577
+ display: grid;
1578
+ align-items: start;
1579
+ width: 100%;
1580
+ column-gap: 10%;
1581
+ min-height: \${sv(48)};
1553
1582
  }
1554
- `}const qt=500,oe="cubic-bezier(0.22, 1, 0.36, 1)";function Hl({images:t,index:e,imageDisplay:r,originRect:n,onClose:o,onPrev:a,onNext:i}){const s=z.useRef(null),c=z.useRef(null),[l,u]=z.useState(null),[C,v]=z.useState(n?"opening":"open"),[m,p]=z.useState(!0),g=z.useRef(e),S=z.useCallback(()=>{const T=s.current,w=c.current;if(!T||!w)return;const y=T.getBoundingClientRect(),L=y.width,I=y.height,V=w.naturalWidth,R=w.naturalHeight;if(!L||!I||!V||!R)return;if(r==="Cover"){u({width:L,height:I,left:y.left,top:y.top});return}const F=V/R,W=L/I;if(F>W){const H=L/F;u({width:L,height:H,left:y.left,top:y.top+(I-H)/2})}else{const H=I*F;u({width:H,height:I,left:y.left+(L-H)/2,top:y.top})}},[r]);z.useEffect(()=>{S();const T=s.current;if(!T)return;const w=new ResizeObserver(()=>S());return w.observe(T),()=>w.disconnect()},[S,e]),z.useEffect(()=>{if(C!=="opening"||!l)return;const T={id:0};return T.id=requestAnimationFrame(()=>{T.id=requestAnimationFrame(()=>v("open"))}),()=>cancelAnimationFrame(T.id)},[C,l]),z.useEffect(()=>{if(C!=="closing")return;const T=setTimeout(()=>o(),qt);return()=>clearTimeout(T)},[C,o]),z.useEffect(()=>{g.current!==e&&p(!1),g.current=e},[e]);const h=()=>{C!=="closing"&&v("closing")},f=C==="opening"?n??l:l,$=C==="open",M=C==="closing";return d.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:h,children:[d.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:$?1:0,transition:`opacity ${qt}ms ${oe}`,pointerEvents:"none"}}),d.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[d.jsx("div",{style:{height:"10%"}}),d.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:d.jsx("div",{ref:s,style:{width:"100%",height:"100%"}})}),d.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",color:"#E6E6E6",letterSpacing:"-0.6px",lineHeight:"16px",opacity:$?1:0,transition:`opacity ${qt}ms ${oe}`},children:[d.jsx("p",{children:e+1}),d.jsx("p",{children:"/"}),d.jsx("p",{children:t.length})]})]}),f&&d.jsx("img",{ref:c,src:t[e],onLoad:S,style:{position:"fixed",top:f.top,left:f.left,width:f.width,height:f.height,objectFit:r==="Cover"?"cover":"contain",opacity:M?0:1,transition:M?`opacity ${qt}ms ${oe}`:m?`top ${qt}ms ${oe}, left ${qt}ms ${oe}, width ${qt}ms ${oe}, height ${qt}ms ${oe}`:"none",pointerEvents:"none",zIndex:9998}}),$&&l&&d.jsxs(d.Fragment,{children:[d.jsx("div",{style:{position:"fixed",top:l.top,left:l.left,width:l.width/2,height:l.height,cursor:"w-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),a()}}),d.jsx("div",{style:{position:"fixed",top:l.top,left:l.left+l.width/2,width:l.width/2,height:l.height,cursor:"e-resize",zIndex:9999},onClick:T=>{T.stopPropagation(),i()}})]})]})}function Dl({settings:t,content:e,isEditor:r,metadata:n,activeEvent:o}){const{prefix:a}=E.useScopedStyles(),{type:i="A",fieldsToShow:s=2,textBoxWidth:c,verticalGap:l,entriesCount:u,lightbox:C,imageSize:v,imageDisplay:m,slider:p,sliderTiming:g,direction:S,transition:h,titleColor:f,subtitleColor:$,titleFontFamily:M,titleFontSettings:T,titleFontSize:w,titleLineHeight:y,titleLetterSpacing:L,titleWordSpacing:I,titleTextAppearance:V,subtitleFontFamily:R,subtitleFontSettings:F,subtitleFontSize:W,subtitleLineHeight:H,subtitleLetterSpacing:G,subtitleWordSpacing:b,subtitleTextAppearance:P}=t,k={fontSettings:{fontFamily:M,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:w??.01,lineHeight:y,letterSpacing:L??0,wordSpacing:I??0,textAppearance:V,color:f},_={...Kt(Ht(k,r))},B={fontSettings:{fontFamily:R,fontWeight:(F==null?void 0:F.fontWeight)??400,fontStyle:(F==null?void 0:F.fontStyle)??"normal"},fontSize:W??.01,lineHeight:H,letterSpacing:G??0,wordSpacing:b??0,textAppearance:P,color:$},ot={...Kt(Ht(B,r))},rt=E.buildColorVars(a,{titleColor:f,subtitleColor:$},Gl,Ul),O=`${o&&o!=="default"?`${a}-state-${o}`:""}`.trim(),K=u===0?1/0:u,mt=(e??[]).slice(0,K),dt={Small:.1,Medium:.2,Big:.3}[v]??.2,[xt,kt]=z.useState("ltr"),[j,x]=z.useState(!1),[D,q]=z.useState([]),[J,et]=z.useState(0),[Z,Y]=z.useState(null),nt=(it,at,lt)=>{if(C==="Off")return;const bt=it.currentTarget.getBoundingClientRect();Y({top:bt.top,left:bt.left,width:bt.width,height:bt.height}),q(at),et(lt),x(!0)};return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:Ml(a)}}),d.jsx("div",{style:rt,children:d.jsx("div",{className:`${a}-wrapper ${a}-type-${i} ${O}`.trim(),style:{gridTemplateColumns:`repeat(${s}, 1fr)`,rowGap:E.scalingValue(l??0,r)},children:mt.map((it,at)=>d.jsxs("div",{className:`${a}-item`.trim(),children:[d.jsx("div",{className:`${a}-item-image-wrapper`,style:{width:E.scalingValue(dt??0,r),height:E.scalingValue(dt??0,r)},children:p==="Off"?d.jsx("img",{src:it.image[0].url,alt:it.image[0].name,className:`${a}-item-image`.trim(),style:{objectFit:m==="Cover"?"cover":"contain"},onClick:lt=>nt(lt,it.image.map(bt=>bt.url),0)}):d.jsx(Qr,{className:`${a}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:g*1e3,width:"100%",height:"100%",speed:500,type:h==="Fade"?"fade":"loop",rewind:h==="Fade",pauseOnHover:!1,pauseOnFocus:!1,direction:h==="Fade"?"ltr":S!=="Random"?S==="Horizontal"?"ltr":"ttb":xt},onMoved:lt=>{if(S!=="Random"||h==="Fade")return;const bt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":Math.random()>.5?"btt":"ttb";kt(bt),setTimeout(()=>{lt.refresh()},0)},children:it.image.map((lt,bt)=>d.jsx(tn,{children:d.jsx("img",{src:lt.url,alt:lt.name,className:`${a}-item-image`.trim(),style:{objectFit:m==="Cover"?"cover":"contain"},onClick:Q=>nt(Q,it.image.map(ut=>ut.url),bt)})},bt))},`${h}-${v}-${S}-${g}`)}),d.jsx("p",{className:`${a}-item-title`.trim(),style:{width:`calc(${E.scalingValue(dt??0,r)} * (${c} / 100))`,..._},children:it.title}),i==="B"&&d.jsx("p",{className:`${a}-item-subtitle`.trim(),style:{width:`calc(${E.scalingValue(dt??0,r)} * (${c} / 100))`,...ot},children:it.subtitle})]},at))})}),j&&typeof document&&document.getElementById("grid-component-lightbox-portal")&&C==="On"&&Ln.createPortal(d.jsx("div",{"data-selection":"none",children:d.jsx(Hl,{images:D,index:J,imageDisplay:m,originRect:Z,onClose:()=>x(!1),onPrev:()=>et(it=>(it-1+D.length)%D.length),onNext:()=>et(it=>(it+1)%D.length)})}),document.body)]})}const Gl={titleColor:"title-color",subtitleColor:"subtitle-color"},Ul=["hover","focus","filled","success","error"],Xl=`import { Splide, SplideSlide } from '@splidejs/react-splide';\r
1555
- import '@splidejs/react-splide/css/core';\r
1556
- import { CommonComponentProps } from '../props';\r
1557
- import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';\r
1558
- import { useCallback, useEffect, useRef, useState } from 'react';\r
1559
- import { createPortal } from 'react-dom';\r
1560
- import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';\r
1561
- \r
1562
- function sv(px: number): string {\r
1563
- return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;\r
1564
- }\r
1565
- \r
1566
- function getCSS(P: string): string {\r
1567
- return \`\r
1568
- .\${P}-wrapper {\r
1569
- display: grid;\r
1570
- align-items: start;\r
1571
- width: 100%;\r
1572
- column-gap: 10%;\r
1573
- min-height: \${sv(48)};\r
1574
- }\r
1575
- .\${P}-item {\r
1576
- display: flex;\r
1577
- flex-direction: column;\r
1578
- justify-content: center;\r
1579
- align-items: center;\r
1580
- gap: 12px;\r
1581
- }\r
1582
- .\${P}-item-image {\r
1583
- width: 100%;\r
1584
- height: 100%;\r
1585
- display: block;\r
1586
- }\r
1587
- .\${P}-item-slider,\r
1588
- .\${P}-item-slider .splide__track,\r
1589
- .\${P}-item-slider .splide__list,\r
1590
- .\${P}-item-slider .splide__slide {\r
1591
- width: 100%;\r
1592
- height: 100%;\r
1593
- }\r
1594
- .\${P}-item-slider .splide__slide {\r
1595
- display: flex;\r
1596
- }\r
1597
- .\${P}-item-title {\r
1598
- white-space: normal;\r
1599
- overflow-wrap: anywhere;\r
1600
- word-break: break-word;\r
1601
- text-align: center;\r
1602
- margin-bottom: 0px;\r
1603
- margin-top: 0px;\r
1604
- color: var(--\${P}-title-color);\r
1605
- }\r
1606
- .\${P}-item-subtitle {\r
1607
- white-space: normal;\r
1608
- overflow-wrap: anywhere;\r
1609
- word-break: break-word;\r
1610
- text-align: center;\r
1611
- margin-bottom: 0px;\r
1612
- margin-top: 0px;\r
1613
- color: var(--\${P}-subtitle-color);\r
1614
- }\r
1615
- \`;\r
1616
- }\r
1617
- \r
1618
- type GridProps = {\r
1619
- settings: GridSettings;\r
1620
- content?: any;\r
1621
- isEditor?: boolean;\r
1622
- activeEvent: string | undefined;\r
1623
- onUpdateSettings?: (settings: GridSettings) => void;\r
1624
- } & CommonComponentProps;\r
1625
- \r
1626
- type AnimRect = { top: number; left: number; width: number; height: number };\r
1627
- \r
1628
- type LightboxProps = {\r
1629
- images: string[];\r
1630
- index: number;\r
1631
- imageDisplay: 'Fit' | 'Cover';\r
1632
- originRect: AnimRect | null;\r
1633
- onClose: () => void;\r
1634
- onPrev: () => void;\r
1635
- onNext: () => void;\r
1636
- };\r
1637
- \r
1638
- const LIGHTBOX_ANIM_MS = 500;\r
1639
- const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';\r
1640
- \r
1641
- function Lightbox({ images, index, imageDisplay, originRect, onClose, onPrev, onNext }: LightboxProps) {\r
1642
- const ghostRef = useRef<HTMLDivElement>(null);\r
1643
- const imgRef = useRef<HTMLImageElement>(null);\r
1644
- const [finalRect, setFinalRect] = useState<AnimRect | null>(null);\r
1645
- const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');\r
1646
- const [transitionsEnabled, setTransitionsEnabled] = useState(true);\r
1647
- const prevIndexRef = useRef(index);\r
1648
- \r
1649
- const computeFinalRect = useCallback(() => {\r
1650
- const ghost = ghostRef.current;\r
1651
- const img = imgRef.current;\r
1652
- if (!ghost || !img) return;\r
1653
- const cb = ghost.getBoundingClientRect();\r
1654
- const cw = cb.width;\r
1655
- const ch = cb.height;\r
1656
- const nw = img.naturalWidth;\r
1657
- const nh = img.naturalHeight;\r
1658
- if (!cw || !ch || !nw || !nh) return;\r
1659
- if (imageDisplay === 'Cover') {\r
1660
- setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });\r
1661
- return;\r
1662
- }\r
1663
- const ir = nw / nh;\r
1664
- const cr = cw / ch;\r
1665
- if (ir > cr) {\r
1666
- const dh = cw / ir;\r
1667
- setFinalRect({ width: cw, height: dh, left: cb.left, top: cb.top + (ch - dh) / 2 });\r
1668
- } else {\r
1669
- const dw = ch * ir;\r
1670
- setFinalRect({ width: dw, height: ch, left: cb.left + (cw - dw) / 2, top: cb.top });\r
1671
- }\r
1672
- }, [imageDisplay]);\r
1673
- \r
1674
- useEffect(() => {\r
1675
- computeFinalRect();\r
1676
- const c = ghostRef.current;\r
1677
- if (!c) return;\r
1678
- const ro = new ResizeObserver(() => computeFinalRect());\r
1679
- ro.observe(c);\r
1680
- return () => ro.disconnect();\r
1681
- }, [computeFinalRect, index]);\r
1682
- \r
1683
- useEffect(() => {\r
1684
- if (phase !== 'opening' || !finalRect) return;\r
1685
- const handle = { id: 0 };\r
1686
- handle.id = requestAnimationFrame(() => {\r
1687
- handle.id = requestAnimationFrame(() => setPhase('open'));\r
1688
- });\r
1689
- return () => cancelAnimationFrame(handle.id);\r
1690
- }, [phase, finalRect]);\r
1691
- \r
1692
- useEffect(() => {\r
1693
- if (phase !== 'closing') return;\r
1694
- const t = setTimeout(() => onClose(), LIGHTBOX_ANIM_MS);\r
1695
- return () => clearTimeout(t);\r
1696
- }, [phase, onClose]);\r
1697
- \r
1698
- // Once the user starts switching images, drop the size/position transition so that\r
1699
- // finalRect updates (driven by each image's aspect ratio) apply instantly instead of animating.\r
1700
- useEffect(() => {\r
1701
- if (prevIndexRef.current !== index) {\r
1702
- setTransitionsEnabled(false);\r
1703
- }\r
1704
- prevIndexRef.current = index;\r
1705
- }, [index]);\r
1706
- \r
1707
- const handleClose = () => {\r
1708
- if (phase === 'closing') return;\r
1709
- setPhase('closing');\r
1710
- };\r
1711
- \r
1712
- const animatedRect = phase === 'opening' ? (originRect ?? finalRect) : finalRect;\r
1713
- const isOpen = phase === 'open';\r
1714
- const isClosing = phase === 'closing';\r
1715
- \r
1716
- return (\r
1717
- <div\r
1718
- style={{\r
1719
- position: 'fixed',\r
1720
- top: 0,\r
1721
- left: 0,\r
1722
- width: '100vw',\r
1723
- height: '100vh',\r
1724
- zIndex: 9997,\r
1725
- }}\r
1726
- onClick={handleClose}\r
1727
- >\r
1728
- <div\r
1729
- style={{\r
1730
- position: 'absolute',\r
1731
- inset: 0,\r
1732
- background: 'rgba(28,31,34,0.9)',\r
1733
- opacity: isOpen ? 1 : 0,\r
1734
- transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,\r
1735
- pointerEvents: 'none',\r
1736
- }}\r
1737
- />\r
1738
- <div\r
1739
- style={{\r
1740
- position: 'relative',\r
1741
- width: '100%',\r
1742
- height: '100%',\r
1743
- display: 'flex',\r
1744
- flexDirection: 'column',\r
1745
- alignItems: 'center',\r
1746
- justifyContent: 'center',\r
1747
- }}\r
1748
- >\r
1749
- <div style={{ height: '10%' }}></div>\r
1750
- <div\r
1751
- style={{\r
1752
- width: '70%',\r
1753
- height: '80%',\r
1754
- display: 'flex',\r
1755
- justifyContent: 'center',\r
1756
- alignItems: 'center'\r
1757
- }}>\r
1758
- <div ref={ghostRef} style={{ width: '100%', height: '100%' }} />\r
1759
- </div>\r
1760
- <div\r
1761
- style={{\r
1762
- display: 'flex',\r
1763
- flexDirection: 'row',\r
1764
- justifyContent: 'center',\r
1765
- alignItems: 'center',\r
1766
- height: '10%',\r
1767
- color: '#E6E6E6',\r
1768
- letterSpacing: '-0.6px',\r
1769
- lineHeight: '16px',\r
1770
- opacity: isOpen ? 1 : 0,\r
1771
- transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,\r
1772
- }}\r
1773
- >\r
1774
- <p>{index + 1}</p>\r
1775
- <p>/</p>\r
1776
- <p>{images.length}</p>\r
1777
- </div>\r
1778
- </div>\r
1779
- \r
1780
- {animatedRect && (\r
1781
- <img\r
1782
- ref={imgRef}\r
1783
- src={images[index]}\r
1784
- onLoad={computeFinalRect}\r
1785
- style={{\r
1786
- position: 'fixed',\r
1787
- top: animatedRect.top,\r
1788
- left: animatedRect.left,\r
1789
- width: animatedRect.width,\r
1790
- height: animatedRect.height,\r
1791
- objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain',\r
1792
- opacity: isClosing ? 0 : 1,\r
1793
- transition: isClosing\r
1794
- ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`\r
1795
- : transitionsEnabled\r
1796
- ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`\r
1797
- : 'none',\r
1798
- pointerEvents: 'none',\r
1799
- zIndex: 9998,\r
1800
- }}\r
1801
- />\r
1802
- )}\r
1803
- \r
1804
- {isOpen && finalRect && (\r
1805
- <>\r
1806
- <div\r
1807
- style={{\r
1808
- position: 'fixed',\r
1809
- top: finalRect.top,\r
1810
- left: finalRect.left,\r
1811
- width: finalRect.width / 2,\r
1812
- height: finalRect.height,\r
1813
- cursor: 'w-resize',\r
1814
- zIndex: 9999,\r
1815
- }}\r
1816
- onClick={(e) => {\r
1817
- e.stopPropagation();\r
1818
- onPrev();\r
1819
- }}\r
1820
- />\r
1821
- <div\r
1822
- style={{\r
1823
- position: 'fixed',\r
1824
- top: finalRect.top,\r
1825
- left: finalRect.left + finalRect.width / 2,\r
1826
- width: finalRect.width / 2,\r
1827
- height: finalRect.height,\r
1828
- cursor: 'e-resize',\r
1829
- zIndex: 9999,\r
1830
- }}\r
1831
- onClick={(e) => {\r
1832
- e.stopPropagation();\r
1833
- onNext();\r
1834
- }}\r
1835
- />\r
1836
- </>\r
1837
- )}\r
1838
- </div>\r
1839
- );\r
1840
- }\r
1841
- \r
1842
- export function Grid({ settings, content, isEditor, metadata, activeEvent }: GridProps) {\r
1843
- const { prefix: P } = useScopedStyles();\r
1844
- const {\r
1845
- type = 'A',\r
1846
- fieldsToShow = 2,\r
1847
- textBoxWidth,\r
1848
- verticalGap,\r
1849
- entriesCount,\r
1850
- lightbox,\r
1851
- imageSize,\r
1852
- imageDisplay,\r
1853
- slider,\r
1854
- sliderTiming,\r
1855
- direction,\r
1856
- transition,\r
1857
- titleColor,\r
1858
- subtitleColor,\r
1859
- titleFontFamily,\r
1860
- titleFontSettings,\r
1861
- titleFontSize,\r
1862
- titleLineHeight,\r
1863
- titleLetterSpacing,\r
1864
- titleWordSpacing,\r
1865
- titleTextAppearance,\r
1866
- subtitleFontFamily,\r
1867
- subtitleFontSettings,\r
1868
- subtitleFontSize,\r
1869
- subtitleLineHeight,\r
1870
- subtitleLetterSpacing,\r
1871
- subtitleWordSpacing,\r
1872
- subtitleTextAppearance,\r
1873
- } = settings;\r
1874
- \r
1875
- const resolvedTitleTextStyle: TextStyles = {\r
1876
- fontSettings: {\r
1877
- fontFamily: titleFontFamily,\r
1878
- fontWeight: titleFontSettings?.fontWeight ?? 400,\r
1879
- fontStyle: titleFontSettings?.fontStyle ?? 'normal',\r
1880
- },\r
1881
- fontSize: titleFontSize ?? 0.01,\r
1882
- lineHeight: titleLineHeight,\r
1883
- letterSpacing: titleLetterSpacing ?? 0,\r
1884
- wordSpacing: titleWordSpacing ?? 0,\r
1885
- textAppearance: titleTextAppearance,\r
1886
- color: titleColor,\r
1887
- };\r
1888
- const titleTypographyCss = omitTextColors(textStylesToCss(resolvedTitleTextStyle, isEditor));\r
1889
- const titleFieldCss = {\r
1890
- ...titleTypographyCss,\r
1891
- } as React.CSSProperties;\r
1892
- \r
1893
- const resolvedSubtitleTextStyle: TextStyles = {\r
1894
- fontSettings: {\r
1895
- fontFamily: subtitleFontFamily,\r
1896
- fontWeight: subtitleFontSettings?.fontWeight ?? 400,\r
1897
- fontStyle: subtitleFontSettings?.fontStyle ?? 'normal',\r
1898
- },\r
1899
- fontSize: subtitleFontSize ?? 0.01,\r
1900
- lineHeight: subtitleLineHeight,\r
1901
- letterSpacing: subtitleLetterSpacing ?? 0,\r
1902
- wordSpacing: subtitleWordSpacing ?? 0,\r
1903
- textAppearance: subtitleTextAppearance,\r
1904
- color: subtitleColor,\r
1905
- };\r
1906
- const subtitleTypographyCss = omitTextColors(textStylesToCss(resolvedSubtitleTextStyle, isEditor));\r
1907
- const subtitleFieldCss = {\r
1908
- ...subtitleTypographyCss,\r
1909
- } as React.CSSProperties;\r
1910
- \r
1911
- const colorVars = buildColorVars(P, {\r
1912
- titleColor,\r
1913
- subtitleColor,\r
1914
- }, COLOR_VAR_MAP, STATE_KEYS);\r
1915
- \r
1916
- const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';\r
1917
- const wrapperStateClasses = \`\${stateClass}\`.trim();\r
1918
- \r
1919
- const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;\r
1920
- \r
1921
- const cropContent = (content ?? []).slice(0, resEntriesCount);\r
1922
- \r
1923
- const imageSizeMap = {\r
1924
- Small: 0.1,\r
1925
- Medium: 0.2,\r
1926
- Big: 0.3,\r
1927
- } as const;\r
1928
- \r
1929
- const size = imageSizeMap[imageSize] ?? 0.2;\r
1930
- \r
1931
- const [dir, setDir] = useState('ltr');\r
1932
- \r
1933
- const [lightboxOpen, setLightboxOpen] = useState(false);\r
1934
- const [lightboxImages, setLightboxImages] = useState<string[]>([]);\r
1935
- const [lightboxIndex, setLightboxIndex] = useState(0);\r
1936
- const [lightboxOriginRect, setLightboxOriginRect] = useState<AnimRect | null>(null);\r
1937
- \r
1938
- const openLightbox = (e: React.MouseEvent<HTMLImageElement>, urls: string[], idx: number) => {\r
1939
- if (lightbox === 'Off') return;\r
1940
- const r = e.currentTarget.getBoundingClientRect();\r
1941
- setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });\r
1942
- setLightboxImages(urls);\r
1943
- setLightboxIndex(idx);\r
1944
- setLightboxOpen(true);\r
1945
- };\r
1946
- \r
1947
- return (\r
1948
- <>\r
1949
- <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />\r
1950
- <div style={colorVars}>\r
1951
- <div\r
1952
- className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()}\r
1953
- style={{\r
1954
- gridTemplateColumns: \`repeat(\${fieldsToShow}, 1fr)\`,\r
1955
- rowGap: scalingValue(verticalGap ?? 0, isEditor),\r
1956
- }}>\r
1957
- {cropContent.map((item, index) => (\r
1958
- <div\r
1959
- key={index}\r
1960
- className={\`\${P}-item\`.trim()}\r
1961
- >\r
1962
- <div className={\`\${P}-item-image-wrapper\`} style={{ width: scalingValue(size ?? 0, isEditor), height: scalingValue(size ?? 0, isEditor) }}>\r
1963
- {slider === 'Off'\r
1964
- ?\r
1965
- <img\r
1966
- src={item.image[0].url}\r
1967
- alt={item.image[0].name}\r
1968
- className={\`\${P}-item-image\`.trim()}\r
1969
- style={{\r
1970
- objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain'\r
1971
- }}\r
1972
- onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), 0)}\r
1973
- />\r
1974
- :\r
1975
- <Splide\r
1976
- key={\`\${transition}-\${imageSize}-\${direction}-\${sliderTiming}\`}\r
1977
- className={\`\${P}-item-slider\`}\r
1978
- options={{\r
1979
- arrows: false,\r
1980
- pagination: false,\r
1981
- drag: false,\r
1982
- perPage: 1,\r
1983
- autoplay: true,\r
1984
- interval: sliderTiming * 1000,\r
1985
- width: '100%',\r
1986
- height: '100%',\r
1987
- speed: 500,\r
1988
- type: transition === 'Fade' ? 'fade' : 'loop',\r
1989
- rewind: transition === 'Fade',\r
1990
- pauseOnHover: false,\r
1991
- pauseOnFocus: false,\r
1992
- direction: transition === 'Fade' ? 'ltr' : direction !== 'Random'\r
1993
- ? direction === 'Horizontal'\r
1994
- ? 'ltr'\r
1995
- : 'ttb'\r
1996
- : dir,\r
1997
- }}\r
1998
- onMoved={(splide) => {\r
1999
- if (direction !== 'Random' || transition === 'Fade') return;\r
2000
- const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : Math.random() > 0.5 ? 'btt' : 'ttb';\r
2001
- setDir(next);\r
2002
- \r
2003
- setTimeout(() => {\r
2004
- splide.refresh();\r
2005
- }, 0);\r
2006
- }}\r
2007
- >\r
2008
- {item.image.map((img: { url: string; name?: string }, imgIndex: number) => (\r
2009
- <SplideSlide key={imgIndex}>\r
2010
- <img\r
2011
- src={img.url}\r
2012
- alt={img.name}\r
2013
- className={\`\${P}-item-image\`.trim()}\r
2014
- style={{\r
2015
- objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain'\r
2016
- }}\r
2017
- onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), imgIndex)}\r
2018
- />\r
2019
- </SplideSlide>\r
2020
- ))}\r
2021
- </Splide>\r
2022
- }\r
2023
- </div>\r
2024
- <p className={\`\${P}-item-title\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...titleFieldCss }}>\r
2025
- {item.title}\r
2026
- </p>\r
2027
- {type === 'B' && <p className={\`\${P}-item-subtitle\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...subtitleFieldCss }}>\r
2028
- {item.subtitle}\r
2029
- </p>}\r
2030
- </div>\r
2031
- ))}\r
2032
- </div>\r
2033
- </div>\r
2034
- {lightboxOpen && typeof document && document.getElementById("grid-component-lightbox-portal") && lightbox === 'On' &&\r
2035
- createPortal(\r
2036
- <div data-selection="none">\r
2037
- <Lightbox\r
2038
- images={lightboxImages}\r
2039
- index={lightboxIndex}\r
2040
- imageDisplay={imageDisplay}\r
2041
- originRect={lightboxOriginRect}\r
2042
- onClose={() => setLightboxOpen(false)}\r
2043
- onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}\r
2044
- onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}\r
2045
- />\r
2046
- </div>,\r
2047
- document.body\r
2048
- )}\r
2049
- </>\r
2050
- );\r
2051
- }\r
2052
- \r
2053
- type GridSettings = {\r
2054
- type: 'A' | 'B';\r
2055
- fieldsToShow: number;\r
2056
- textBoxWidth: number;\r
2057
- verticalGap: number;\r
2058
- entriesCount: number;\r
2059
- lightbox: 'On' | 'Off';\r
2060
- imageSize: 'Small' | 'Medium' | 'Big';\r
2061
- imageDisplay: 'Fit' | 'Cover';\r
2062
- slider: 'On' | 'Off';\r
2063
- sliderTiming: number;\r
2064
- direction: 'Horizontal' | 'Vertical' | 'Random',\r
2065
- transition: 'Fade' | 'Slide',\r
2066
- titleColor: string;\r
2067
- subtitleColor: string;\r
2068
- titleFontFamily: string;\r
2069
- titleFontSettings?: { fontWeight: number; fontStyle: string };\r
2070
- titleFontSize?: number;\r
2071
- titleLineHeight?: number;\r
2072
- titleLetterSpacing?: number;\r
2073
- titleWordSpacing?: number;\r
2074
- titleTextAppearance?: TextStyles['textAppearance'];\r
2075
- subtitleFontFamily: string;\r
2076
- subtitleFontSettings?: { fontWeight: number; fontStyle: string };\r
2077
- subtitleFontSize?: number;\r
2078
- subtitleLineHeight?: number;\r
2079
- subtitleLetterSpacing?: number;\r
2080
- subtitleWordSpacing?: number;\r
2081
- subtitleTextAppearance?: TextStyles['textAppearance'];\r
2082
- };\r
2083
- \r
2084
- type ColorKeys =\r
2085
- | 'titleColor'\r
2086
- | 'subtitleColor'\r
2087
- \r
2088
- const COLOR_VAR_MAP: Record<ColorKeys, string> = {\r
2089
- titleColor: 'title-color',\r
2090
- subtitleColor: 'subtitle-color',\r
2091
- };\r
2092
- \r
2093
- const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
2094
- `,Tn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ql=["titleColor","subtitleColor"],Yl={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}]},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}]},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}]}]}},settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},textBoxWidth:{type:"number",scope:"layout",title:"Textbox Width",display:{type:"percentage-input"},min:0,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"string",scope:"layout",title:"Size",display:{type:"toggle-cycle",enum:["Small","Medium","Big"]}},imageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["Fit","Cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (S)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Tn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Tn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,lightbox:"Off",imageDisplay:"Fit",type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{textBoxWidth:100,verticalGap:.0083,entriesCount:0,imageSize:"Medium",titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{textBoxWidth:100,verticalGap:.0083,entriesCount:0,imageSize:"Medium",titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["textBoxWidth"]},{type:"row",title:"",items:["verticalGap"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["entriesCount"]},{type:"row",title:"",items:["lightbox"]}]}]},{type:"group",title:"Image",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["imageDisplay"]}]}]},{type:"group",title:"Slider",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["slider"]},{type:"row",title:"",items:["sliderTiming"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["direction"]},{type:"row",title:"",items:["transition"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...ql],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},Kl={element:Dl,id:"grid",name:"Grid Default",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Yl,sourceCode:Xl},Jl=[Ta,Ra,xl,Il,Nl,Kl];exports.components=Jl;exports.isSchemaV1=bo;
1583
+ .\${P}-item {
1584
+ display: flex;
1585
+ flex-direction: column;
1586
+ justify-content: center;
1587
+ align-items: center;
1588
+ gap: 12px;
1589
+ }
1590
+ .\${P}-item-image-wrapper {
1591
+ display: flex;
1592
+ justify-content: center;
1593
+ align-items: center;
1594
+ }
1595
+ .\${P}-item-image {
1596
+ width: 100%;
1597
+ height: 100%;
1598
+ display: block;
1599
+ }
1600
+ .\${P}-item-slider,
1601
+ .\${P}-item-slider .splide__track,
1602
+ .\${P}-item-slider .splide__list,
1603
+ .\${P}-item-slider .splide__slide {
1604
+ width: 100%;
1605
+ height: 100%;
1606
+ }
1607
+ .\${P}-item-slider .splide__slide {
1608
+ display: flex;
1609
+ justify-content: center;
1610
+ align-items: center;
1611
+ }
1612
+ .\${P}-item-title {
1613
+ white-space: normal;
1614
+ overflow-wrap: anywhere;
1615
+ word-break: break-word;
1616
+ text-align: center;
1617
+ margin-bottom: 0px;
1618
+ margin-top: 0px;
1619
+ color: var(--\${P}-title-color);
1620
+ }
1621
+ .\${P}-item-subtitle {
1622
+ white-space: normal;
1623
+ overflow-wrap: anywhere;
1624
+ word-break: break-word;
1625
+ text-align: center;
1626
+ margin-bottom: 0px;
1627
+ margin-top: 0px;
1628
+ color: var(--\${P}-subtitle-color);
1629
+ }
1630
+ \`;
1631
+ }
1632
+
1633
+ type GridProps = {
1634
+ settings: GridSettings;
1635
+ content?: any;
1636
+ isEditor?: boolean;
1637
+ activeEvent: string | undefined;
1638
+ onUpdateSettings?: (settings: GridSettings) => void;
1639
+ } & CommonComponentProps;
1640
+
1641
+ type AnimRect = { top: number; left: number; width: number; height: number };
1642
+
1643
+ type LightboxProps = {
1644
+ images: string[];
1645
+ index: number;
1646
+ imageDisplay: 'Fit' | 'Cover';
1647
+ originRect: AnimRect | null;
1648
+ reverseClose: boolean;
1649
+ onClose: () => void;
1650
+ onPrev: () => void;
1651
+ onNext: () => void;
1652
+ };
1653
+
1654
+ const LIGHTBOX_ANIM_MS = 500;
1655
+ const LIGHTBOX_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
1656
+
1657
+ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClose, onPrev, onNext }: LightboxProps) {
1658
+ const ghostRef = useRef<HTMLDivElement>(null);
1659
+ const imgRef = useRef<HTMLImageElement>(null);
1660
+ const [finalRect, setFinalRect] = useState<AnimRect | null>(null);
1661
+ const [phase, setPhase] = useState<'opening' | 'open' | 'closing'>(originRect ? 'opening' : 'open');
1662
+ const [transitionsEnabled, setTransitionsEnabled] = useState(true);
1663
+ const prevIndexRef = useRef(index);
1664
+
1665
+ const computeFinalRect = useCallback(() => {
1666
+ const ghost = ghostRef.current;
1667
+ const img = imgRef.current;
1668
+ if (!ghost || !img) return;
1669
+ const cb = ghost.getBoundingClientRect();
1670
+ const cw = cb.width;
1671
+ const ch = cb.height;
1672
+ const nw = img.naturalWidth;
1673
+ const nh = img.naturalHeight;
1674
+ if (!cw || !ch || !nw || !nh) return;
1675
+ if (imageDisplay === 'Cover') {
1676
+ setFinalRect({ width: cw, height: ch, left: cb.left, top: cb.top });
1677
+ return;
1678
+ }
1679
+ const ir = nw / nh;
1680
+ const cr = cw / ch;
1681
+ if (ir > cr) {
1682
+ const dh = cw / ir;
1683
+ setFinalRect({ width: cw, height: dh, left: cb.left, top: cb.top + (ch - dh) / 2 });
1684
+ } else {
1685
+ const dw = ch * ir;
1686
+ setFinalRect({ width: dw, height: ch, left: cb.left + (cw - dw) / 2, top: cb.top });
1687
+ }
1688
+ }, [imageDisplay]);
1689
+
1690
+ useEffect(() => {
1691
+ computeFinalRect();
1692
+ const c = ghostRef.current;
1693
+ if (!c) return;
1694
+ const ro = new ResizeObserver(() => computeFinalRect());
1695
+ ro.observe(c);
1696
+ return () => ro.disconnect();
1697
+ }, [computeFinalRect, index]);
1698
+
1699
+ useEffect(() => {
1700
+ if (phase !== 'opening' || !finalRect) return;
1701
+ const handle = { id: 0 };
1702
+ handle.id = requestAnimationFrame(() => {
1703
+ handle.id = requestAnimationFrame(() => setPhase('open'));
1704
+ });
1705
+ return () => cancelAnimationFrame(handle.id);
1706
+ }, [phase, finalRect]);
1707
+
1708
+ useEffect(() => {
1709
+ if (phase !== 'closing') return;
1710
+ const t = setTimeout(() => onClose(), LIGHTBOX_ANIM_MS);
1711
+ return () => clearTimeout(t);
1712
+ }, [phase, onClose]);
1713
+
1714
+ useEffect(() => {
1715
+ if (prevIndexRef.current !== index) {
1716
+ setTransitionsEnabled(false);
1717
+ }
1718
+ prevIndexRef.current = index;
1719
+ }, [index]);
1720
+
1721
+ const handleClose = () => {
1722
+ if (phase === 'closing') return;
1723
+ setPhase('closing');
1724
+ };
1725
+
1726
+ const isOpen = phase === 'open';
1727
+ const isClosing = phase === 'closing';
1728
+ const reverseAnimateClose = isClosing && reverseClose && !!originRect;
1729
+ const animatedRect = phase === 'opening'
1730
+ ? (originRect ?? finalRect)
1731
+ : reverseAnimateClose
1732
+ ? originRect
1733
+ : finalRect;
1734
+
1735
+ return (
1736
+ <div
1737
+ style={{
1738
+ position: 'fixed',
1739
+ top: 0,
1740
+ left: 0,
1741
+ width: '100vw',
1742
+ height: '100vh',
1743
+ zIndex: 9997,
1744
+ }}
1745
+ onClick={handleClose}
1746
+ >
1747
+ <div
1748
+ style={{
1749
+ position: 'absolute',
1750
+ inset: 0,
1751
+ background: 'rgba(28,31,34,0.9)',
1752
+ opacity: isOpen ? 1 : 0,
1753
+ transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
1754
+ pointerEvents: 'none',
1755
+ }}
1756
+ />
1757
+ <div
1758
+ style={{
1759
+ position: 'relative',
1760
+ width: '100%',
1761
+ height: '100%',
1762
+ display: 'flex',
1763
+ flexDirection: 'column',
1764
+ alignItems: 'center',
1765
+ justifyContent: 'center',
1766
+ }}
1767
+ >
1768
+ <div style={{ height: '10%' }}></div>
1769
+ <div
1770
+ style={{
1771
+ width: '70%',
1772
+ height: '80%',
1773
+ display: 'flex',
1774
+ justifyContent: 'center',
1775
+ alignItems: 'center'
1776
+ }}>
1777
+ <div ref={ghostRef} style={{ width: '100%', height: '100%' }} />
1778
+ </div>
1779
+ <div
1780
+ style={{
1781
+ display: 'flex',
1782
+ flexDirection: 'row',
1783
+ justifyContent: 'center',
1784
+ alignItems: 'center',
1785
+ height: '10%',
1786
+ color: '#E6E6E6',
1787
+ letterSpacing: '-0.6px',
1788
+ lineHeight: '16px',
1789
+ opacity: isOpen ? 1 : 0,
1790
+ transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
1791
+ fontFamily: getFontBasedOnSystem(),
1792
+ }}
1793
+ >
1794
+ <p>{index + 1}</p>
1795
+ <p>/</p>
1796
+ <p>{images.length}</p>
1797
+ </div>
1798
+ </div>
1799
+
1800
+ {animatedRect && (
1801
+ <img
1802
+ ref={imgRef}
1803
+ src={images[index]}
1804
+ onLoad={computeFinalRect}
1805
+ style={{
1806
+ position: 'fixed',
1807
+ top: animatedRect.top,
1808
+ left: animatedRect.left,
1809
+ width: animatedRect.width,
1810
+ height: animatedRect.height,
1811
+ objectFit: imageDisplay === 'Cover' ? 'cover' : 'contain',
1812
+ opacity: isClosing && !reverseAnimateClose ? 0 : 1,
1813
+ transition: isClosing && !reverseAnimateClose
1814
+ ? \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
1815
+ : (reverseAnimateClose || transitionsEnabled)
1816
+ ? \`top \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, left \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, width \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}, height \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`
1817
+ : 'none',
1818
+ pointerEvents: 'none',
1819
+ zIndex: 9998,
1820
+ }}
1821
+ />
1822
+ )}
1823
+
1824
+ {isOpen && finalRect && (
1825
+ <>
1826
+ <div
1827
+ style={{
1828
+ position: 'fixed',
1829
+ top: finalRect.top,
1830
+ left: finalRect.left,
1831
+ width: finalRect.width / 2,
1832
+ height: finalRect.height,
1833
+ cursor: 'w-resize',
1834
+ zIndex: 9999,
1835
+ }}
1836
+ onClick={(e) => {
1837
+ e.stopPropagation();
1838
+ onPrev();
1839
+ }}
1840
+ />
1841
+ <div
1842
+ style={{
1843
+ position: 'fixed',
1844
+ top: finalRect.top,
1845
+ left: finalRect.left + finalRect.width / 2,
1846
+ width: finalRect.width / 2,
1847
+ height: finalRect.height,
1848
+ cursor: 'e-resize',
1849
+ zIndex: 9999,
1850
+ }}
1851
+ onClick={(e) => {
1852
+ e.stopPropagation();
1853
+ onNext();
1854
+ }}
1855
+ />
1856
+ </>
1857
+ )}
1858
+ </div>
1859
+ );
1860
+ }
1861
+
1862
+ export function Grid({ settings, content, isEditor, metadata, activeEvent }: GridProps) {
1863
+ const { prefix: P } = useScopedStyles();
1864
+ const {
1865
+ type = 'A',
1866
+ fieldsToShow = 2,
1867
+ textBoxWidth,
1868
+ verticalGap,
1869
+ entriesCount,
1870
+ lightbox,
1871
+ imageSize,
1872
+ imageDisplay,
1873
+ slider,
1874
+ sliderTiming,
1875
+ direction,
1876
+ transition,
1877
+ titleColor,
1878
+ subtitleColor,
1879
+ titleFontFamily,
1880
+ titleFontSettings,
1881
+ titleFontSize,
1882
+ titleLineHeight,
1883
+ titleLetterSpacing,
1884
+ titleWordSpacing,
1885
+ titleTextAppearance,
1886
+ subtitleFontFamily,
1887
+ subtitleFontSettings,
1888
+ subtitleFontSize,
1889
+ subtitleLineHeight,
1890
+ subtitleLetterSpacing,
1891
+ subtitleWordSpacing,
1892
+ subtitleTextAppearance,
1893
+ } = settings;
1894
+
1895
+ const resolvedTitleTextStyle: TextStyles = {
1896
+ fontSettings: {
1897
+ fontFamily: titleFontFamily,
1898
+ fontWeight: titleFontSettings?.fontWeight ?? 400,
1899
+ fontStyle: titleFontSettings?.fontStyle ?? 'normal',
1900
+ },
1901
+ fontSize: titleFontSize ?? 0.01,
1902
+ lineHeight: titleLineHeight,
1903
+ letterSpacing: titleLetterSpacing ?? 0,
1904
+ wordSpacing: titleWordSpacing ?? 0,
1905
+ textAppearance: titleTextAppearance,
1906
+ color: titleColor,
1907
+ };
1908
+ const titleTypographyCss = omitTextColors(textStylesToCss(resolvedTitleTextStyle, isEditor));
1909
+ const titleFieldCss = {
1910
+ ...titleTypographyCss,
1911
+ } as React.CSSProperties;
1912
+
1913
+ const resolvedSubtitleTextStyle: TextStyles = {
1914
+ fontSettings: {
1915
+ fontFamily: subtitleFontFamily,
1916
+ fontWeight: subtitleFontSettings?.fontWeight ?? 400,
1917
+ fontStyle: subtitleFontSettings?.fontStyle ?? 'normal',
1918
+ },
1919
+ fontSize: subtitleFontSize ?? 0.01,
1920
+ lineHeight: subtitleLineHeight,
1921
+ letterSpacing: subtitleLetterSpacing ?? 0,
1922
+ wordSpacing: subtitleWordSpacing ?? 0,
1923
+ textAppearance: subtitleTextAppearance,
1924
+ color: subtitleColor,
1925
+ };
1926
+ const subtitleTypographyCss = omitTextColors(textStylesToCss(resolvedSubtitleTextStyle, isEditor));
1927
+ const subtitleFieldCss = {
1928
+ ...subtitleTypographyCss,
1929
+ } as React.CSSProperties;
1930
+
1931
+ const colorVars = buildColorVars(P, {
1932
+ titleColor,
1933
+ subtitleColor,
1934
+ }, COLOR_VAR_MAP, STATE_KEYS);
1935
+
1936
+ const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
1937
+ const wrapperStateClasses = \`\${stateClass}\`.trim();
1938
+
1939
+ const resEntriesCount = entriesCount === 0 ? Infinity : entriesCount;
1940
+
1941
+ const cropContent = (content ?? []).slice(0, resEntriesCount);
1942
+
1943
+ const imageSizeMap = {
1944
+ Small: 0.1,
1945
+ Medium: 0.2,
1946
+ Big: 0.3,
1947
+ } as const;
1948
+
1949
+ const size = imageSizeMap[imageSize] ?? 0.2;
1950
+
1951
+ const isCover = imageDisplay?.display === 'Cover';
1952
+ const ratioValue = imageDisplay?.ratioValue ?? '1:1';
1953
+ const ratioReversed = imageDisplay?.reversed ?? false;
1954
+ const [rW, rH] = ratioValue.split(':').map(Number);
1955
+ const effW = ratioReversed ? rH : rW;
1956
+ const effH = ratioReversed ? rW : rH;
1957
+ const aspectRatio = \`\${effW} / \${effH}\`;
1958
+ const isLandscape = effW >= effH;
1959
+
1960
+ const imageStyle: React.CSSProperties = {
1961
+ objectFit: isCover ? 'cover' : 'contain',
1962
+ ...(isCover && {
1963
+ aspectRatio,
1964
+ width: isLandscape ? '100%' : 'auto',
1965
+ height: isLandscape ? 'auto' : '100%',
1966
+ }),
1967
+ };
1968
+
1969
+ const [dir, setDir] = useState('ltr');
1970
+
1971
+ const [lightboxOpen, setLightboxOpen] = useState(false);
1972
+ const [lightboxImages, setLightboxImages] = useState<string[]>([]);
1973
+ const [lightboxIndex, setLightboxIndex] = useState(0);
1974
+ const [lightboxOriginRect, setLightboxOriginRect] = useState<AnimRect | null>(null);
1975
+
1976
+ const openLightbox = (e: React.MouseEvent<HTMLImageElement>, urls: string[], idx: number) => {
1977
+ if (lightbox === 'Off') return;
1978
+ const r = e.currentTarget.getBoundingClientRect();
1979
+ setLightboxOriginRect({ top: r.top, left: r.left, width: r.width, height: r.height });
1980
+ setLightboxImages(urls);
1981
+ setLightboxIndex(idx);
1982
+ setLightboxOpen(true);
1983
+ };
1984
+
1985
+ useEffect(() => {
1986
+ if (!lightboxOpen || lightbox !== 'On') return;
1987
+ if (typeof document === 'undefined') return;
1988
+ const prevOverflow = document.body.style.overflow;
1989
+ document.body.style.overflow = 'hidden';
1990
+ return () => {
1991
+ document.body.style.overflow = prevOverflow;
1992
+ };
1993
+ }, [lightboxOpen, lightbox]);
1994
+
1995
+ return (
1996
+ <>
1997
+ <style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
1998
+ <div style={colorVars}>
1999
+ <div
2000
+ className={\`\${P}-wrapper \${P}-type-\${type} \${wrapperStateClasses}\`.trim()}
2001
+ style={{
2002
+ gridTemplateColumns: \`repeat(\${fieldsToShow}, 1fr)\`,
2003
+ rowGap: scalingValue(verticalGap ?? 0, isEditor),
2004
+ }}>
2005
+ {cropContent.map((item, index) => (
2006
+ <div
2007
+ key={index}
2008
+ className={\`\${P}-item\`.trim()}
2009
+ >
2010
+ <div className={\`\${P}-item-image-wrapper\`} style={{ width: scalingValue(size ?? 0, isEditor), height: scalingValue(size ?? 0, isEditor) }}>
2011
+ {(item.image?.length ?? 0) === 0
2012
+ ? null
2013
+ : slider === 'Off'
2014
+ ?
2015
+ <img
2016
+ src={item.image[0].url}
2017
+ alt={item.image[0].name}
2018
+ className={\`\${P}-item-image\`.trim()}
2019
+ style={imageStyle}
2020
+ onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), 0)}
2021
+ />
2022
+ :
2023
+ <Splide
2024
+ key={\`\${transition}-\${imageSize}-\${direction}-\${sliderTiming}\`}
2025
+ className={\`\${P}-item-slider\`}
2026
+ options={{
2027
+ arrows: false,
2028
+ pagination: false,
2029
+ drag: false,
2030
+ perPage: 1,
2031
+ autoplay: true,
2032
+ interval: sliderTiming * 1000,
2033
+ width: '100%',
2034
+ height: '100%',
2035
+ speed: 500,
2036
+ type: transition === 'Fade' ? 'fade' : 'loop',
2037
+ rewind: transition === 'Fade',
2038
+ pauseOnHover: false,
2039
+ pauseOnFocus: false,
2040
+ direction: transition === 'Fade' ? 'ltr' : direction !== 'Random'
2041
+ ? direction === 'Horizontal'
2042
+ ? 'ltr'
2043
+ : 'ttb'
2044
+ : dir,
2045
+ }}
2046
+ onMoved={(splide) => {
2047
+ if (direction !== 'Random' || transition === 'Fade') return;
2048
+ const next = Math.random() > 0.5 ? Math.random() > 0.5 ? 'rtl' : 'ltr' : Math.random() > 0.5 ? 'btt' : 'ttb';
2049
+ setDir(next);
2050
+
2051
+ setTimeout(() => {
2052
+ splide.refresh();
2053
+ }, 0);
2054
+ }}
2055
+ >
2056
+ {item.image.map((img: { url: string; name?: string }, imgIndex: number) => (
2057
+ <SplideSlide key={imgIndex}>
2058
+ <img
2059
+ src={img.url}
2060
+ alt={img.name}
2061
+ className={\`\${P}-item-image\`.trim()}
2062
+ style={imageStyle}
2063
+ onClick={(e) => openLightbox(e, item.image.map((i: any) => i.url), imgIndex)}
2064
+ />
2065
+ </SplideSlide>
2066
+ ))}
2067
+ </Splide>
2068
+ }
2069
+ </div>
2070
+ <p className={\`\${P}-item-title\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...titleFieldCss }}>
2071
+ {item.title}
2072
+ </p>
2073
+ {type === 'B' && <p className={\`\${P}-item-subtitle\`.trim()} style={{ width: \`calc(\${scalingValue(size ?? 0, isEditor)} * (\${textBoxWidth} / 100))\`, ...subtitleFieldCss }}>
2074
+ {item.subtitle}
2075
+ </p>}
2076
+ </div>
2077
+ ))}
2078
+ </div>
2079
+ </div>
2080
+ {lightboxOpen && typeof document && document.getElementById("grid-component-lightbox-portal") && lightbox === 'On' &&
2081
+ createPortal(
2082
+ <div data-selection="none">
2083
+ <Lightbox
2084
+ images={lightboxImages}
2085
+ index={lightboxIndex}
2086
+ imageDisplay={imageDisplay.display}
2087
+ originRect={lightboxOriginRect}
2088
+ reverseClose={slider === 'Off'}
2089
+ onClose={() => setLightboxOpen(false)}
2090
+ onPrev={() => setLightboxIndex((prev) => (prev - 1 + lightboxImages.length) % lightboxImages.length)}
2091
+ onNext={() => setLightboxIndex((prev) => (prev + 1) % lightboxImages.length)}
2092
+ />
2093
+ </div>,
2094
+ document.body
2095
+ )}
2096
+ </>
2097
+ );
2098
+ }
2099
+
2100
+ type GridSettings = {
2101
+ type: 'A' | 'B';
2102
+ fieldsToShow: number;
2103
+ textBoxWidth: number;
2104
+ verticalGap: number;
2105
+ entriesCount: number;
2106
+ lightbox: 'On' | 'Off';
2107
+ imageSize: 'Small' | 'Medium' | 'Big';
2108
+ imageDisplay: {
2109
+ display: 'Fit' | 'Cover';
2110
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
2111
+ reversed: boolean;
2112
+ };
2113
+ slider: 'On' | 'Off';
2114
+ sliderTiming: number;
2115
+ direction: 'Horizontal' | 'Vertical' | 'Random',
2116
+ transition: 'Fade' | 'Slide',
2117
+ titleColor: string;
2118
+ subtitleColor: string;
2119
+ titleFontFamily: string;
2120
+ titleFontSettings?: { fontWeight: number; fontStyle: string };
2121
+ titleFontSize?: number;
2122
+ titleLineHeight?: number;
2123
+ titleLetterSpacing?: number;
2124
+ titleWordSpacing?: number;
2125
+ titleTextAppearance?: TextStyles['textAppearance'];
2126
+ subtitleFontFamily: string;
2127
+ subtitleFontSettings?: { fontWeight: number; fontStyle: string };
2128
+ subtitleFontSize?: number;
2129
+ subtitleLineHeight?: number;
2130
+ subtitleLetterSpacing?: number;
2131
+ subtitleWordSpacing?: number;
2132
+ subtitleTextAppearance?: TextStyles['textAppearance'];
2133
+ };
2134
+
2135
+ type ColorKeys =
2136
+ | 'titleColor'
2137
+ | 'subtitleColor'
2138
+
2139
+ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
2140
+ titleColor: 'title-color',
2141
+ subtitleColor: 'subtitle-color',
2142
+ };
2143
+
2144
+ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
2145
+ `,Tr={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yl=["titleColor","subtitleColor"],Kl={type:"object",version:1,properties:{content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}},required:["image"]},default:[{title:"Title 1",subtitle:"Subtitle 1",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-1.png",name:"Grid-1.png",objectFit:"cover"}]},{title:"Title 2",subtitle:"Subtitle 2",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-2.png",name:"Grid-2.png",objectFit:"cover"}]},{title:"Title 3",subtitle:"Subtitle 3",image:[{url:"https://cdn.cntrl.site/component-assets/Control-slider-default-picture-3.png",name:"Grid-3.png",objectFit:"cover"}]}]}},settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"}},type:{type:"string",scope:"common",title:"",display:{type:"radio-group"},enum:["A","B"]},textBoxWidth:{type:"number",scope:"layout",title:"Textbox Width",display:{type:"percentage-input"},min:0,max:200},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["Auto","Fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["On","Off"]}},imageSize:{type:"string",scope:"layout",title:"Size",display:{type:"toggle-cycle",enum:["Small","Medium","Big"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["Fit","Cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["On","Off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (S)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["Horizontal","Vertical","Random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["Fade","Slide"]}},titleColor:{type:"string",scope:"common",title:"Title Color",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Color",display:{type:"palette-color-picker",visible:!1}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Tr.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}}},defaults:{fieldsToShow:2,lightbox:"Off",imageDisplay:{display:"Fit",ratioValue:"16:9",reversed:!1},type:"A",slider:"Off",sliderTiming:5,direction:"Horizontal",transition:"Slide",titleColor:"#767676",subtitleColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Arial",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{textBoxWidth:100,verticalGap:.0083,entriesCount:0,imageSize:"Medium",titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.043,titleLineHeight:.043,subtitleFontSize:.0373,subtitleLineHeight:.0373},d:{textBoxWidth:100,verticalGap:.0083,entriesCount:0,imageSize:"Medium",titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.01,titleLineHeight:.01,subtitleFontSize:.01,subtitleLineHeight:.01}},displayRules:[{if:{name:"transition",value:"Fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"type",value:"B"},then:{name:"properties.subtitleColor.display.visible",value:!0}}]},panels:[{id:"general",icon:"cursor",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name","fieldsToShow"]},"type",{type:"group",title:"",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["textBoxWidth"]},{type:"row",title:"",items:["verticalGap"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["entriesCount"]},{type:"row",title:"",items:["lightbox"]}]}]},{type:"group",title:"Image",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["imageDisplay"]}]}]},{type:"group",title:"Slider",items:[{type:"row",title:"",items:[{type:"row",title:"",items:["slider"]},{type:"row",title:"",items:["sliderTiming"]}]},{type:"row",title:"",items:[{type:"row",title:"",items:["direction"]},{type:"row",title:"",items:["transition"]}]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]}]}],paletteBookmark:{items:[...Yl],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor"]}}},Jl={element:Gl,id:"grid",name:"Neptune",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:720,height:540},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Kl,sourceCode:ql},Zl=[Ta,Ra,xl,Il,Nl,Jl];exports.components=Zl;exports.isSchemaV1=bo;