@cntrl-site/components 1.0.3 → 1.0.5

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,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),j=require("react"),dt=require("classnames"),F=require("./useScopedStyles-DpVdqfXj.js"),gr=require("react-dom");function mr(t){return t.type==="object"&&t.version===1}const fr="ControlSlider-module__wrapper___sHEkd",hr="ControlSlider-module__hoverArrow___A-dOH",yr="ControlSlider-module__sliderItem___QQSkR",vr="ControlSlider-module__sliderImage___9hRl-",br="ControlSlider-module__arrow___05ghY",Sr="ControlSlider-module__arrowVertical___tBfVN",xr="ControlSlider-module__nextArrow___-30Yc",Cr="ControlSlider-module__arrowInner___aEra3",$r="ControlSlider-module__arrowIcon___S4ztF",_r="ControlSlider-module__arrowImg___2dwJW",wr="ControlSlider-module__mirror___brd6U",Tr="ControlSlider-module__pagination___bicLF",Er="ControlSlider-module__paginationInner___bT-P-",Lr="ControlSlider-module__paginationVertical___zYqKw",Ar="ControlSlider-module__paginationItem___nTRbk",Ir="ControlSlider-module__dot___p1Qun",kr="ControlSlider-module__activeDot___LHFaj",Fr="ControlSlider-module__paginationInsideBottom___R3FWn",Rr="ControlSlider-module__paginationInsideTop___V-qb-",Br="ControlSlider-module__paginationOutsideBottom___14w8D",Vr="ControlSlider-module__paginationOutsideTop___SCLqB",Or="ControlSlider-module__paginationInsideLeft___yOBRZ",Pr="ControlSlider-module__paginationInsideRight___Rtt3o",Nr="ControlSlider-module__paginationOutsideLeft___lahaw",Wr="ControlSlider-module__paginationOutsideRight___EtuQa",zr="ControlSlider-module__imgWrapper___UjEgB",jr="ControlSlider-module__captionBlock___dJ6-j",Mr="ControlSlider-module__captionTextWrapper___HFlpf",Hr="ControlSlider-module__captionText___uGBVc",Dr="ControlSlider-module__active___WZK4G",Ur="ControlSlider-module__withPointerEvents___t-18M",Yr="ControlSlider-module__topLeftAlignment___zjnGM",Gr="ControlSlider-module__topCenterAlignment___gD1xW",qr="ControlSlider-module__topRightAlignment___NMapS",Xr="ControlSlider-module__middleLeftAlignment___OnUrY",Kr="ControlSlider-module__middleCenterAlignment___Tdkl0",Jr="ControlSlider-module__middleRightAlignment___wEbfX",Zr="ControlSlider-module__bottomLeftAlignment___cTP2-",Qr="ControlSlider-module__bottomCenterAlignment___c54fB",ti="ControlSlider-module__bottomRightAlignment___kEwrz",ei="ControlSlider-module__clickOverlay___DZA28",ni="ControlSlider-module__contain___pLyq7",oi="ControlSlider-module__cover___KdDat",Y={wrapper:fr,hoverArrow:hr,sliderItem:yr,sliderImage:vr,arrow:br,arrowVertical:Sr,nextArrow:xr,arrowInner:Cr,arrowIcon:$r,arrowImg:_r,mirror:wr,pagination:Tr,paginationInner:Er,paginationVertical:Lr,paginationItem:Ar,dot:Ir,activeDot:kr,paginationInsideBottom:Fr,paginationInsideTop:Rr,paginationOutsideBottom:Br,paginationOutsideTop:Vr,paginationInsideLeft:Or,paginationInsideRight:Pr,paginationOutsideLeft:Nr,paginationOutsideRight:Wr,imgWrapper:zr,captionBlock:jr,captionTextWrapper:Mr,captionText:Hr,active:Dr,withPointerEvents:Ur,topLeftAlignment:Yr,topCenterAlignment:Gr,topRightAlignment:qr,middleLeftAlignment:Xr,middleCenterAlignment:Kr,middleRightAlignment:Jr,bottomLeftAlignment:Zr,bottomCenterAlignment:Qr,bottomRightAlignment:ti,clickOverlay:ei,contain:ni,cover:oi};function ri(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ii(t,e,n){return e&&ri(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var to="(prefers-reduced-motion: reduce)",ce=1,ai=2,ge=3,he=4,Fe=5,Ye=6,Ke=7,si={CREATED:ce,MOUNTED:ai,IDLE:ge,MOVING:he,SCROLLING:Fe,DRAGGING:Ye,DESTROYED:Ke};function zt(t){t.length=0}function qt(t,e,n){return Array.prototype.slice.call(t,e,n)}function at(t){return t.bind.apply(t,[null].concat(qt(arguments,1)))}var Co=setTimeout,xn=function(){};function eo(t){return requestAnimationFrame(t)}function en(t,e){return typeof e===t}function we(t){return!kn(t)&&en("object",t)}var In=Array.isArray,$o=at(en,"function"),Yt=at(en,"string"),Re=at(en,"undefined");function kn(t){return t===null}function _o(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Be(t){return In(t)?t:[t]}function Tt(t,e){Be(t).forEach(e)}function Fn(t,e){return t.indexOf(e)>-1}function Ge(t,e){return t.push.apply(t,Be(e)),t}function Pt(t,e,n){t&&Tt(e,function(o){o&&t.classList[n?"add":"remove"](o)})}function Rt(t,e){Pt(t,Yt(e)?e.split(" "):e,!0)}function Ve(t,e){Tt(e,t.appendChild.bind(t))}function Rn(t,e){Tt(t,function(n){var o=(e||n).parentNode;o&&o.insertBefore(n,e)})}function Te(t,e){return _o(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function wo(t,e){var n=t?qt(t.children):[];return e?n.filter(function(o){return Te(o,e)}):n}function Oe(t,e){return e?wo(t,e)[0]:t.firstElementChild}var Ee=Object.keys;function Qt(t,e,n){return t&&(n?Ee(t).reverse():Ee(t)).forEach(function(o){o!=="__proto__"&&e(t[o],o)}),t}function Le(t){return qt(arguments,1).forEach(function(e){Qt(e,function(n,o){t[o]=e[o]})}),t}function Ut(t){return qt(arguments,1).forEach(function(e){Qt(e,function(n,o){In(n)?t[o]=n.slice():we(n)?t[o]=Ut({},we(t[o])?t[o]:{},n):t[o]=n})}),t}function no(t,e){Tt(e||Ee(t),function(n){delete t[n]})}function Bt(t,e){Tt(t,function(n){Tt(e,function(o){n&&n.removeAttribute(o)})})}function Z(t,e,n){we(e)?Qt(e,function(o,r){Z(t,r,o)}):Tt(t,function(o){kn(n)||n===""?Bt(o,e):o.setAttribute(e,String(n))})}function ue(t,e,n){var o=document.createElement(t);return e&&(Yt(e)?Rt(o,e):Z(o,e)),n&&Ve(n,o),o}function Lt(t,e,n){if(Re(n))return getComputedStyle(t)[e];kn(n)||(t.style[e]=""+n)}function Ae(t,e){Lt(t,"display",e)}function To(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function At(t,e){return t.getAttribute(e)}function oo(t,e){return t&&t.classList.contains(e)}function _t(t){return t.getBoundingClientRect()}function te(t){Tt(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function Eo(t){return Oe(new DOMParser().parseFromString(t,"text/html").body)}function Ot(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Lo(t,e){return t&&t.querySelector(e)}function Bn(t,e){return e?qt(t.querySelectorAll(e)):[]}function Nt(t,e){Pt(t,e,!1)}function Cn(t){return t.timeStamp}function Jt(t){return Yt(t)?t:t?t+"px":""}var Pe="splide",Vn="data-"+Pe;function $e(t,e){if(!t)throw new Error("["+Pe+"] "+(e||""))}var Gt=Math.min,Je=Math.max,Ze=Math.floor,Ie=Math.ceil,xt=Math.abs;function Ao(t,e,n){return xt(t-e)<n}function qe(t,e,n,o){var r=Gt(e,n),a=Je(e,n);return o?r<t&&t<a:r<=t&&t<=a}function se(t,e,n){var o=Gt(e,n),r=Je(e,n);return Gt(Je(o,t),r)}function $n(t){return+(t>0)-+(t<0)}function _n(t,e){return Tt(e,function(n){t=t.replace("%s",""+n)}),t}function On(t){return t<10?"0"+t:""+t}var ro={};function li(t){return""+t+On(ro[t]=(ro[t]||0)+1)}function Io(){var t=[];function e(i,c,s,p){r(i,c,function(l,w,y){var m="addEventListener"in l,u=m?l.removeEventListener.bind(l,w,s,p):l.removeListener.bind(l,s);m?l.addEventListener(w,s,p):l.addListener(s),t.push([l,w,y,s,u])})}function n(i,c,s){r(i,c,function(p,l,w){t=t.filter(function(y){return y[0]===p&&y[1]===l&&y[2]===w&&(!s||y[3]===s)?(y[4](),!1):!0})})}function o(i,c,s){var p,l=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:l,detail:s}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,l,!1,s)),i.dispatchEvent(p),p}function r(i,c,s){Tt(i,function(p){p&&Tt(c,function(l){l.split(" ").forEach(function(w){var y=w.split(".");s(p,y[0],y[1])})})})}function a(){t.forEach(function(i){i[4]()}),zt(t)}return{bind:e,unbind:n,dispatch:o,destroy:a}}var Xt="mounted",wn="ready",jt="move",ye="moved",Pn="click",ko="active",Fo="inactive",Ro="visible",Bo="hidden",yt="refresh",St="updated",me="resize",nn="resized",Vo="drag",Oo="dragging",Po="dragged",on="scroll",ne="scrolled",ci="overflow",Nn="destroy",No="arrows:mounted",Wo="arrows:updated",zo="pagination:mounted",jo="pagination:updated",Wn="navigation:mounted",zn="autoplay:play",Mo="autoplay:playing",jn="autoplay:pause",Mn="lazyload:loaded",Ho="sk",Do="sh",Qe="ei";function gt(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Io();function o(a,i){n.bind(e,Be(a).join(" "),function(c){i.apply(i,In(c.detail)?c.detail:[])})}function r(a){n.dispatch(e,a,qt(arguments,1))}return t&&t.event.on(Nn,n.destroy),Le(n,{bus:e,on:o,off:at(n.unbind,e),emit:r})}function rn(t,e,n,o){var r=Date.now,a,i=0,c,s=!0,p=0;function l(){if(!s){if(i=t?Gt((r()-a)/t,1):1,n&&n(i),i>=1&&(e(),a=r(),o&&++p>=o))return y();c=eo(l)}}function w(b){b||u(),a=r()-(b?i*t:0),s=!1,c=eo(l)}function y(){s=!0}function m(){a=r(),i=0,n&&n(i)}function u(){c&&cancelAnimationFrame(c),i=0,c=0,s=!0}function d(b){t=b}function C(){return s}return{start:w,rewind:m,pause:y,cancel:u,set:d,isPaused:C}}function ui(t){var e=t;function n(r){e=r}function o(r){return Fn(Be(r),e)}return{set:n,is:o}}function pi(t,e){var n=rn(0,t,null,1);return function(){n.isPaused()&&n.start()}}function di(t,e,n){var o=t.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Io(),c=[];function s(){var u=n.mediaQuery==="min";Ee(r).sort(function(d,C){return u?+d-+C:+C-+d}).forEach(function(d){l(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),l(a,to),w()}function p(u){u&&i.destroy()}function l(u,d){var C=matchMedia(d);i.bind(C,"change",w),c.push([u,C])}function w(){var u=o.is(Ke),d=n.direction,C=c.reduce(function(b,f){return Ut(b,f[1].matches?f[0]:{})},{});no(n),m(C),n.destroy?t.destroy(n.destroy==="completely"):u?(p(!0),t.mount()):d!==n.direction&&t.refresh()}function y(u){matchMedia(to).matches&&(u?Ut(n,a):no(n,Ee(a)))}function m(u,d,C){Ut(n,u),d&&Ut(Object.getPrototypeOf(n),u),(C||!o.is(ce))&&t.emit(St,n)}return{setup:s,destroy:p,reduce:y,set:m}}var an="Arrow",sn=an+"Left",ln=an+"Right",Uo=an+"Up",Yo=an+"Down",io="rtl",cn="ttb",fn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Uo,ln],ArrowRight:[Yo,sn]};function gi(t,e,n){function o(a,i,c){c=c||n.direction;var s=c===io&&!i?1:c===cn?0:-1;return fn[a]&&fn[a][s]||a.replace(/width|left|right/i,function(p,l){var w=fn[p.toLowerCase()][s]||p;return l>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function r(a){return a*(n.direction===io?1:-1)}return{resolve:o,orient:r}}var Wt="role",pe="tabindex",mi="disabled",It="aria-",Ne=It+"controls",Go=It+"current",ao=It+"selected",wt=It+"label",Hn=It+"labelledby",qo=It+"hidden",Dn=It+"orientation",ke=It+"roledescription",so=It+"live",lo=It+"busy",co=It+"atomic",Un=[Wt,pe,mi,Ne,Go,wt,Hn,qo,Dn,ke],Vt=Pe+"__",Kt="is-",hn=Pe,uo=Vt+"track",fi=Vt+"list",un=Vt+"slide",Xo=un+"--clone",hi=un+"__container",Yn=Vt+"arrows",pn=Vt+"arrow",Ko=pn+"--prev",Jo=pn+"--next",dn=Vt+"pagination",Zo=dn+"__page",yi=Vt+"progress",vi=yi+"__bar",bi=Vt+"toggle",Si=Vt+"spinner",xi=Vt+"sr",Ci=Kt+"initialized",ee=Kt+"active",Qo=Kt+"prev",tr=Kt+"next",Tn=Kt+"visible",En=Kt+"loading",er=Kt+"focus-in",nr=Kt+"overflow",$i=[ee,Tn,Qo,tr,En,er,nr],_i={slide:un,clone:Xo,arrows:Yn,arrow:pn,prev:Ko,next:Jo,pagination:dn,page:Zo,spinner:Si};function wi(t,e){if($o(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!Te(n,e);)n=n.parentElement;return n}var Ti=5,po=200,or="touchstart mousedown",yn="touchmove mousemove",vn="touchend touchcancel mouseup click";function Ei(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=t.root,c=n.i18n,s={},p=[],l=[],w=[],y,m,u;function d(){$(),M(),f()}function C(){r(yt,b),r(yt,d),r(St,f),a(document,or+" keydown",function(h){u=h.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Pt(i,er,!!u)})}function b(h){var L=Un.concat("style");zt(p),Nt(i,l),Nt(y,w),Bt([y,m],L),Bt(i,h?L:["style",ke])}function f(){Nt(i,l),Nt(y,w),l=T(hn),w=T(uo),Rt(i,l),Rt(y,w),Z(i,wt,n.label),Z(i,Hn,n.labelledby)}function $(){y=P("."+uo),m=Oe(y,"."+fi),$e(y&&m,"A track/list element is missing."),Ge(p,wo(m,"."+un+":not(."+Xo+")")),Qt({arrows:Yn,pagination:dn,prev:Ko,next:Jo,bar:vi,toggle:bi},function(h,L){s[L]=P("."+h)}),Le(s,{root:i,track:y,list:m,slides:p})}function M(){var h=i.id||li(Pe),L=n.role;i.id=h,y.id=y.id||h+"-track",m.id=m.id||h+"-list",!At(i,Wt)&&i.tagName!=="SECTION"&&L&&Z(i,Wt,L),Z(i,ke,c.carousel),Z(m,Wt,"presentation")}function P(h){var L=Lo(i,h);return L&&wi(L,"."+hn)===i?L:void 0}function T(h){return[h+"--"+n.type,h+"--"+n.direction,n.drag&&h+"--draggable",n.isNavigation&&h+"--nav",h===hn&&ee]}return Le(s,{setup:d,mount:C,destroy:b})}var fe="slide",ve="loop",We="fade";function Li(t,e,n,o){var r=gt(t),a=r.on,i=r.emit,c=r.bind,s=t.Components,p=t.root,l=t.options,w=l.isNavigation,y=l.updateOnMove,m=l.i18n,u=l.pagination,d=l.slideFocus,C=s.Direction.resolve,b=At(o,"style"),f=At(o,wt),$=n>-1,M=Oe(o,"."+hi),P;function T(){$||(o.id=p.id+"-slide"+On(e+1),Z(o,Wt,u?"tabpanel":"group"),Z(o,ke,m.slide),Z(o,wt,f||_n(m.slideLabel,[e+1,t.length]))),h()}function h(){c(o,"click",at(i,Pn,I)),c(o,"keydown",at(i,Ho,I)),a([ye,Do,ne],k),a(Wn,R),y&&a(jt,W)}function L(){P=!0,r.destroy(),Nt(o,$i),Bt(o,Un),Z(o,"style",b),Z(o,wt,f||"")}function R(){var _=t.splides.map(function(v){var V=v.splide.Components.Slides.getAt(e);return V?V.slide.id:""}).join(" ");Z(o,wt,_n(m.slideX,($?n:e)+1)),Z(o,Ne,_),Z(o,Wt,d?"button":""),d&&Bt(o,ke)}function W(){P||k()}function k(){if(!P){var _=t.index;B(),O(),Pt(o,Qo,e===_-1),Pt(o,tr,e===_+1)}}function B(){var _=D();_!==oo(o,ee)&&(Pt(o,ee,_),Z(o,Go,w&&_||""),i(_?ko:Fo,I))}function O(){var _=g(),v=!_&&(!D()||$);if(t.state.is([he,Fe])||Z(o,qo,v||""),Z(Bn(o,l.focusableNodes||""),pe,v?-1:""),d&&Z(o,pe,v?-1:0),_!==oo(o,Tn)&&(Pt(o,Tn,_),i(_?Ro:Bo,I)),!_&&document.activeElement===o){var V=s.Slides.getAt(t.index);V&&To(V.slide)}}function U(_,v,V){Lt(V&&M||o,_,v)}function D(){var _=t.index;return _===e||l.cloneStatus&&_===n}function g(){if(t.is(We))return D();var _=_t(s.Elements.track),v=_t(o),V=C("left",!0),X=C("right",!0);return Ze(_[V])<=Ie(v[V])&&Ze(v[X])<=Ie(_[X])}function A(_,v){var V=xt(_-e);return!$&&(l.rewind||t.is(ve))&&(V=Gt(V,t.length-V)),V<=v}var I={index:e,slideIndex:n,slide:o,container:M,isClone:$,mount:T,destroy:L,update:k,style:U,isWithin:A};return I}function Ai(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=o.bind,c=e.Elements,s=c.slides,p=c.list,l=[];function w(){y(),r(yt,m),r(yt,y)}function y(){s.forEach(function(k,B){d(k,B,-1)})}function m(){P(function(k){k.destroy()}),zt(l)}function u(){P(function(k){k.update()})}function d(k,B,O){var U=Li(t,B,O,k);U.mount(),l.push(U),l.sort(function(D,g){return D.index-g.index})}function C(k){return k?T(function(B){return!B.isClone}):l}function b(k){var B=e.Controller,O=B.toIndex(k),U=B.hasFocus()?1:n.perPage;return T(function(D){return qe(D.index,O,O+U-1)})}function f(k){return T(k)[0]}function $(k,B){Tt(k,function(O){if(Yt(O)&&(O=Eo(O)),_o(O)){var U=s[B];U?Rn(O,U):Ve(p,O),Rt(O,n.classes.slide),L(O,at(a,me))}}),a(yt)}function M(k){te(T(k).map(function(B){return B.slide})),a(yt)}function P(k,B){C(B).forEach(k)}function T(k){return l.filter($o(k)?k:function(B){return Yt(k)?Te(B.slide,k):Fn(Be(k),B.index)})}function h(k,B,O){P(function(U){U.style(k,B,O)})}function L(k,B){var O=Bn(k,"img"),U=O.length;U?O.forEach(function(D){i(D,"load error",function(){--U||B()})}):B()}function R(k){return k?s.length:l.length}function W(){return l.length>n.perPage}return{mount:w,destroy:m,update:u,register:d,get:C,getIn:b,getAt:f,add:$,remove:M,forEach:P,filter:T,style:h,getLength:R,isEnough:W}}function Ii(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.emit,c=e.Slides,s=e.Direction.resolve,p=e.Elements,l=p.root,w=p.track,y=p.list,m=c.getAt,u=c.style,d,C,b;function f(){$(),a(window,"resize load",pi(at(i,me))),r([St,yt],$),r(me,M)}function $(){d=n.direction===cn,Lt(l,"maxWidth",Jt(n.width)),Lt(w,s("paddingLeft"),P(!1)),Lt(w,s("paddingRight"),P(!0)),M(!0)}function M(I){var _=_t(l);(I||C.width!==_.width||C.height!==_.height)&&(Lt(w,"height",T()),u(s("marginRight"),Jt(n.gap)),u("width",L()),u("height",R(),!0),C=_,i(nn),b!==(b=A())&&(Pt(l,nr,b),i(ci,b)))}function P(I){var _=n.padding,v=s(I?"right":"left");return _&&Jt(_[v]||(we(_)?0:_))||"0px"}function T(){var I="";return d&&(I=h(),$e(I,"height or heightRatio is missing."),I="calc("+I+" - "+P(!1)+" - "+P(!0)+")"),I}function h(){return Jt(n.height||_t(y).width*n.heightRatio)}function L(){return n.autoWidth?null:Jt(n.fixedWidth)||(d?"":W())}function R(){return Jt(n.fixedHeight)||(d?n.autoHeight?null:W():h())}function W(){var I=Jt(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function k(){return _t(y)[s("width")]}function B(I,_){var v=m(I||0);return v?_t(v.slide)[s("width")]+(_?0:D()):0}function O(I,_){var v=m(I);if(v){var V=_t(v.slide)[s("right")],X=_t(y)[s("left")];return xt(V-X)+(_?0:D())}return 0}function U(I){return O(t.length-1)-O(0)+B(0,I)}function D(){var I=m(0);return I&&parseFloat(Lt(I.slide,s("marginRight")))||0}function g(I){return parseFloat(Lt(w,s("padding"+(I?"Right":"Left"))))||0}function A(){return t.is(We)||U(!0)>k()}return{mount:f,resize:M,listSize:k,slideSize:B,sliderSize:U,totalSize:O,getPadding:g,isOverflow:A}}var ki=2;function Fi(t,e,n){var o=gt(t),r=o.on,a=e.Elements,i=e.Slides,c=e.Direction.resolve,s=[],p;function l(){r(yt,w),r([St,me],m),(p=C())&&(u(p),e.Layout.resize(!0))}function w(){y(),l()}function y(){te(s),zt(s),o.destroy()}function m(){var b=C();p!==b&&(p<b||!b)&&o.emit(yt)}function u(b){var f=i.get().slice(),$=f.length;if($){for(;f.length<b;)Ge(f,f);Ge(f.slice(-b),f.slice(0,b)).forEach(function(M,P){var T=P<b,h=d(M.slide,P);T?Rn(h,f[0].slide):Ve(a.list,h),Ge(s,h),i.register(h,P-b+(T?0:$),M.index)})}}function d(b,f){var $=b.cloneNode(!0);return Rt($,n.classes.clone),$.id=t.root.id+"-clone"+On(f+1),$}function C(){var b=n.clones;if(!t.is(ve))b=0;else if(Re(b)){var f=n[c("fixedWidth")]&&e.Layout.slideSize(0),$=f&&Ie(_t(a.track)[c("width")]/f);b=$||n[c("autoWidth")]&&t.length||n.perPage*ki}return b}return{mount:l,destroy:y}}function Ri(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=t.state.set,c=e.Layout,s=c.slideSize,p=c.getPadding,l=c.totalSize,w=c.listSize,y=c.sliderSize,m=e.Direction,u=m.resolve,d=m.orient,C=e.Elements,b=C.list,f=C.track,$;function M(){$=e.Transition,r([Xt,nn,St,yt],P)}function P(){e.Controller.isBusy()||(e.Scroll.cancel(),h(t.index),e.Slides.update())}function T(v,V,X,rt){v!==V&&I(v>X)&&(k(),L(W(U(),v>X),!0)),i(he),a(jt,V,X,v),$.start(V,function(){i(ge),a(ye,V,X,v),rt&&rt()})}function h(v){L(O(v,!0))}function L(v,V){if(!t.is(We)){var X=V?v:R(v);Lt(b,"transform","translate"+u("X")+"("+X+"px)"),v!==X&&a(Do)}}function R(v){if(t.is(ve)){var V=B(v),X=V>e.Controller.getEnd(),rt=V<0;(rt||X)&&(v=W(v,X))}return v}function W(v,V){var X=v-A(V),rt=y();return v-=d(rt*(Ie(xt(X)/rt)||1))*(V?1:-1),v}function k(){L(U(),!0),$.cancel()}function B(v){for(var V=e.Slides.get(),X=0,rt=1/0,Q=0;Q<V.length;Q++){var ut=V[Q].index,E=xt(O(ut,!0)-v);if(E<=rt)rt=E,X=ut;else break}return X}function O(v,V){var X=d(l(v-1)-g(v));return V?D(X):X}function U(){var v=u("left");return _t(b)[v]-_t(f)[v]+d(p(!1))}function D(v){return n.trimSpace&&t.is(fe)&&(v=se(v,0,d(y(!0)-w()))),v}function g(v){var V=n.focus;return V==="center"?(w()-s(v,!0))/2:+V*s(v)||0}function A(v){return O(v?e.Controller.getEnd():0,!!n.trimSpace)}function I(v){var V=d(W(U(),v));return v?V>=0:V<=b[u("scrollWidth")]-_t(f)[u("width")]}function _(v,V){V=Re(V)?U():V;var X=v!==!0&&d(V)<d(A(!1)),rt=v!==!1&&d(V)>d(A(!0));return X||rt}return{mount:M,move:T,jump:h,translate:L,shift:W,cancel:k,toIndex:B,toPosition:O,getPosition:U,getLimit:A,exceededLimit:_,reposition:P}}function Bi(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=e.Move,c=i.getPosition,s=i.getLimit,p=i.toPosition,l=e.Slides,w=l.isEnough,y=l.getLength,m=n.omitEnd,u=t.is(ve),d=t.is(fe),C=at(U,!1),b=at(U,!0),f=n.start||0,$,M=f,P,T,h;function L(){R(),r([St,yt,Qe],R),r(nn,W)}function R(){P=y(!0),T=n.perMove,h=n.perPage,$=I();var E=se(f,0,m?$:P-1);E!==f&&(f=E,i.reposition())}function W(){$!==I()&&a(Qe)}function k(E,K,ft){if(!ut()){var it=O(E),mt=A(it);mt>-1&&(K||mt!==f)&&(X(mt),i.move(it,mt,M,ft))}}function B(E,K,ft,it){e.Scroll.scroll(E,K,ft,function(){var mt=A(i.toIndex(c()));X(m?Gt(mt,$):mt),it&&it()})}function O(E){var K=f;if(Yt(E)){var ft=E.match(/([+\-<>])(\d+)?/)||[],it=ft[1],mt=ft[2];it==="+"||it==="-"?K=D(f+ +(""+it+(+mt||1)),f):it===">"?K=mt?_(+mt):C(!0):it==="<"&&(K=b(!0))}else K=u?E:se(E,0,$);return K}function U(E,K){var ft=T||(Q()?1:h),it=D(f+ft*(E?-1:1),f,!(T||Q()));return it===-1&&d&&!Ao(c(),s(!E),1)?E?0:$:K?it:A(it)}function D(E,K,ft){if(w()||Q()){var it=g(E);it!==E&&(K=E,E=it,ft=!1),E<0||E>$?!T&&(qe(0,E,K,!0)||qe($,K,E,!0))?E=_(v(E)):u?E=ft?E<0?-(P%h||h):P:E:n.rewind?E=E<0?$:0:E=-1:ft&&E!==K&&(E=_(v(K)+(E<K?-1:1)))}else E=-1;return E}function g(E){if(d&&n.trimSpace==="move"&&E!==f)for(var K=c();K===p(E,!0)&&qe(E,0,t.length-1,!n.rewind);)E<f?--E:++E;return E}function A(E){return u?(E+P)%P||0:E}function I(){for(var E=P-(Q()||u&&T?1:h);m&&E-- >0;)if(p(P-1,!0)!==p(E,!0)){E++;break}return se(E,0,P-1)}function _(E){return se(Q()?E:h*E,0,$)}function v(E){return Q()?Gt(E,$):Ze((E>=$?P-1:E)/h)}function V(E){var K=i.toIndex(E);return d?se(K,0,$):K}function X(E){E!==f&&(M=f,f=E)}function rt(E){return E?M:f}function Q(){return!Re(n.focus)||n.isNavigation}function ut(){return t.state.is([he,Fe])&&!!n.waitForTransition}return{mount:L,go:k,scroll:B,getNext:C,getPrev:b,getAdjacent:U,getEnd:I,setIndex:X,getIndex:rt,toIndex:_,toPage:v,toDest:V,hasFocus:Q,isBusy:ut}}var Vi="http://www.w3.org/2000/svg",Oi="m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z",je=40;function Pi(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.emit,c=n.classes,s=n.i18n,p=e.Elements,l=e.Controller,w=p.arrows,y=p.track,m=w,u=p.prev,d=p.next,C,b,f={};function $(){P(),r(St,M)}function M(){T(),$()}function P(){var B=n.arrows;B&&!(u&&d)&&R(),u&&d&&(Le(f,{prev:u,next:d}),Ae(m,B?"":"none"),Rt(m,b=Yn+"--"+n.direction),B&&(h(),k(),Z([u,d],Ne,y.id),i(No,u,d)))}function T(){o.destroy(),Nt(m,b),C?(te(w?[u,d]:m),u=d=null):Bt([u,d],Un)}function h(){r([Xt,ye,yt,ne,Qe],k),a(d,"click",at(L,">")),a(u,"click",at(L,"<"))}function L(B){l.go(B,!0)}function R(){m=w||ue("div",c.arrows),u=W(!0),d=W(!1),C=!0,Ve(m,[u,d]),!w&&Rn(m,y)}function W(B){var O='<button class="'+c.arrow+" "+(B?c.prev:c.next)+'" type="button"><svg xmlns="'+Vi+'" viewBox="0 0 '+je+" "+je+'" width="'+je+'" height="'+je+'" focusable="false"><path d="'+(n.arrowPath||Oi)+'" />';return Eo(O)}function k(){if(u&&d){var B=t.index,O=l.getPrev(),U=l.getNext(),D=O>-1&&B<O?s.last:s.prev,g=U>-1&&B>U?s.first:s.next;u.disabled=O<0,d.disabled=U<0,Z(u,wt,D),Z(d,wt,g),i(Wo,u,d,O,U)}}return{arrows:f,mount:$,destroy:T,update:k}}var Ni=Vn+"-interval";function Wi(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.emit,c=rn(n.interval,t.go.bind(t,">"),h),s=c.isPaused,p=e.Elements,l=e.Elements,w=l.root,y=l.toggle,m=n.autoplay,u,d,C=m==="pause";function b(){m&&(f(),y&&Z(y,Ne,p.track.id),C||$(),T())}function f(){n.pauseOnHover&&a(w,"mouseenter mouseleave",function(R){u=R.type==="mouseenter",P()}),n.pauseOnFocus&&a(w,"focusin focusout",function(R){d=R.type==="focusin",P()}),y&&a(y,"click",function(){C?$():M(!0)}),r([jt,on,yt],c.rewind),r(jt,L)}function $(){s()&&e.Slides.isEnough()&&(c.start(!n.resetProgress),d=u=C=!1,T(),i(zn))}function M(R){R===void 0&&(R=!0),C=!!R,T(),s()||(c.pause(),i(jn))}function P(){C||(u||d?M(!1):$())}function T(){y&&(Pt(y,ee,!C),Z(y,wt,n.i18n[C?"play":"pause"]))}function h(R){var W=p.bar;W&&Lt(W,"width",R*100+"%"),i(Mo,R)}function L(R){var W=e.Slides.getAt(R);c.set(W&&+At(W.slide,Ni)||n.interval)}return{mount:b,destroy:c.cancel,play:$,pause:M,isPaused:s}}function zi(t,e,n){var o=gt(t),r=o.on;function a(){n.cover&&(r(Mn,at(c,!0)),r([Xt,St,yt],at(i,!0)))}function i(s){e.Slides.forEach(function(p){var l=Oe(p.container||p.slide,"img");l&&l.src&&c(s,l,p)})}function c(s,p,l){l.style("background",s?'center/cover no-repeat url("'+p.src+'")':"",!0),Ae(p,s?"none":"")}return{mount:a,destroy:at(i,!1)}}var ji=10,Mi=600,Hi=.6,Di=1.5,Ui=800;function Yi(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=t.state.set,c=e.Move,s=c.getPosition,p=c.getLimit,l=c.exceededLimit,w=c.translate,y=t.is(fe),m,u,d=1;function C(){r(jt,M),r([St,yt],P)}function b(h,L,R,W,k){var B=s();if(M(),R&&(!y||!l())){var O=e.Layout.sliderSize(),U=$n(h)*O*Ze(xt(h)/O)||0;h=c.toPosition(e.Controller.toDest(h%O))+U}var D=Ao(B,h,1);d=1,L=D?0:L||Je(xt(h-B)/Di,Ui),u=W,m=rn(L,f,at($,B,h,k),1),i(Fe),a(on),m.start()}function f(){i(ge),u&&u(),a(ne)}function $(h,L,R,W){var k=s(),B=h+(L-h)*T(W),O=(B-k)*d;w(k+O),y&&!R&&l()&&(d*=Hi,xt(O)<ji&&b(p(l(!0)),Mi,!1,u,!0))}function M(){m&&m.cancel()}function P(){m&&!m.isPaused()&&(M(),f())}function T(h){var L=n.easingFunc;return L?L(h):1-Math.pow(1-h,4)}return{mount:C,destroy:M,scroll:b,cancel:P}}var le={passive:!1,capture:!0};function Gi(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=o.bind,c=o.unbind,s=t.state,p=e.Move,l=e.Scroll,w=e.Controller,y=e.Elements.track,m=e.Media.reduce,u=e.Direction,d=u.resolve,C=u.orient,b=p.getPosition,f=p.exceededLimit,$,M,P,T,h,L=!1,R,W,k;function B(){i(y,yn,xn,le),i(y,vn,xn,le),i(y,or,U,le),i(y,"click",A,{capture:!0}),i(y,"dragstart",Ot),r([Xt,St],O)}function O(){var z=n.drag;Mt(!z),T=z==="free"}function U(z){if(R=!1,!W){var S=mt(z);it(z.target)&&(S||!z.button)&&(w.isBusy()?Ot(z,!0):(k=S?y:window,h=s.is([he,Fe]),P=null,i(k,yn,D,le),i(k,vn,g,le),p.cancel(),l.cancel(),I(z)))}}function D(z){if(s.is(Ye)||(s.set(Ye),a(Vo)),z.cancelable)if(h){p.translate($+ft(Q(z)));var S=ut(z)>po,H=L!==(L=f());(S||H)&&I(z),R=!0,a(Oo),Ot(z)}else V(z)&&(h=v(z),Ot(z))}function g(z){s.is(Ye)&&(s.set(ge),a(Po)),h&&(_(z),Ot(z)),c(k,yn,D),c(k,vn,g),h=!1}function A(z){!W&&R&&Ot(z,!0)}function I(z){P=M,M=z,$=b()}function _(z){var S=X(z),H=rt(S),G=n.rewind&&n.rewindByDrag;m(!1),T?w.scroll(H,0,n.snap):t.is(We)?w.go(C($n(S))<0?G?"<":"-":G?">":"+"):t.is(fe)&&L&&G?w.go(f(!0)?">":"<"):w.go(w.toDest(H),!0),m(!0)}function v(z){var S=n.dragMinThreshold,H=we(S),G=H&&S.mouse||0,J=(H?S.touch:+S)||10;return xt(Q(z))>(mt(z)?J:G)}function V(z){return xt(Q(z))>xt(Q(z,!0))}function X(z){if(t.is(ve)||!L){var S=ut(z);if(S&&S<po)return Q(z)/S}return 0}function rt(z){return b()+$n(z)*Gt(xt(z)*(n.flickPower||600),T?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function Q(z,S){return K(z,S)-K(E(z),S)}function ut(z){return Cn(z)-Cn(E(z))}function E(z){return M===z&&P||M}function K(z,S){return(mt(z)?z.changedTouches[0]:z)["page"+d(S?"Y":"X")]}function ft(z){return z/(L&&t.is(fe)?Ti:1)}function it(z){var S=n.noDrag;return!Te(z,"."+Zo+", ."+pn)&&(!S||!Te(z,S))}function mt(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function bt(){return h}function Mt(z){W=z}return{mount:B,disable:Mt,isDragging:bt}}var qi={Spacebar:" ",Right:ln,Left:sn,Up:Uo,Down:Yo};function Gn(t){return t=Yt(t)?t:t.key,qi[t]||t}var go="keydown";function Xi(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.unbind,c=t.root,s=e.Direction.resolve,p,l;function w(){y(),r(St,m),r(St,y),r(jt,d)}function y(){var b=n.keyboard;b&&(p=b==="global"?window:c,a(p,go,C))}function m(){i(p,go)}function u(b){l=b}function d(){var b=l;l=!0,Co(function(){l=b})}function C(b){if(!l){var f=Gn(b);f===s(sn)?t.go("<"):f===s(ln)&&t.go(">")}}return{mount:w,destroy:m,disable:u}}var _e=Vn+"-lazy",Xe=_e+"-srcset",Ki="["+_e+"], ["+Xe+"]";function Ji(t,e,n){var o=gt(t),r=o.on,a=o.off,i=o.bind,c=o.emit,s=n.lazyLoad==="sequential",p=[ye,ne],l=[];function w(){n.lazyLoad&&(y(),r(yt,y))}function y(){zt(l),m(),s?b():(a(p),r(p,u),u())}function m(){e.Slides.forEach(function(f){Bn(f.slide,Ki).forEach(function($){var M=At($,_e),P=At($,Xe);if(M!==$.src||P!==$.srcset){var T=n.classes.spinner,h=$.parentElement,L=Oe(h,"."+T)||ue("span",T,h);l.push([$,f,L]),$.src||Ae($,"none")}})})}function u(){l=l.filter(function(f){var $=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(t.index,$)?d(f):!0}),l.length||a(p)}function d(f){var $=f[0];Rt(f[1].slide,En),i($,"load error",at(C,f)),Z($,"src",At($,_e)),Z($,"srcset",At($,Xe)),Bt($,_e),Bt($,Xe)}function C(f,$){var M=f[0],P=f[1];Nt(P.slide,En),$.type!=="error"&&(te(f[2]),Ae(M,""),c(Mn,M,P),c(me)),s&&b()}function b(){l.length&&d(l.shift())}return{mount:w,destroy:at(zt,l),check:u}}function Zi(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=o.bind,c=e.Slides,s=e.Elements,p=e.Controller,l=p.hasFocus,w=p.getIndex,y=p.go,m=e.Direction.resolve,u=s.pagination,d=[],C,b;function f(){$(),r([St,yt,Qe],f);var W=n.pagination;u&&Ae(u,W?"":"none"),W&&(r([jt,on,ne],R),M(),R(),a(zo,{list:C,items:d},L(t.index)))}function $(){C&&(te(u?qt(C.children):C),Nt(C,b),zt(d),C=null),o.destroy()}function M(){var W=t.length,k=n.classes,B=n.i18n,O=n.perPage,U=l()?p.getEnd()+1:Ie(W/O);C=u||ue("ul",k.pagination,s.track.parentElement),Rt(C,b=dn+"--"+h()),Z(C,Wt,"tablist"),Z(C,wt,B.select),Z(C,Dn,h()===cn?"vertical":"");for(var D=0;D<U;D++){var g=ue("li",null,C),A=ue("button",{class:k.page,type:"button"},g),I=c.getIn(D).map(function(v){return v.slide.id}),_=!l()&&O>1?B.pageX:B.slideX;i(A,"click",at(P,D)),n.paginationKeyboard&&i(A,"keydown",at(T,D)),Z(g,Wt,"presentation"),Z(A,Wt,"tab"),Z(A,Ne,I.join(" ")),Z(A,wt,_n(_,D+1)),Z(A,pe,-1),d.push({li:g,button:A,page:D})}}function P(W){y(">"+W,!0)}function T(W,k){var B=d.length,O=Gn(k),U=h(),D=-1;O===m(ln,!1,U)?D=++W%B:O===m(sn,!1,U)?D=(--W+B)%B:O==="Home"?D=0:O==="End"&&(D=B-1);var g=d[D];g&&(To(g.button),y(">"+D),Ot(k,!0))}function h(){return n.paginationDirection||n.direction}function L(W){return d[p.toPage(W)]}function R(){var W=L(w(!0)),k=L(w());if(W){var B=W.button;Nt(B,ee),Bt(B,ao),Z(B,pe,-1)}if(k){var O=k.button;Rt(O,ee),Z(O,ao,!0),Z(O,pe,"")}a(jo,{list:C,items:d},W,k)}return{items:d,mount:f,destroy:$,getAt:L,update:R}}var Qi=[" ","Enter"];function ta(t,e,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){t.splides.forEach(function(u){u.isParent||(p(t,u.splide),p(u.splide,t))}),o&&l()}function c(){a.forEach(function(u){u.destroy()}),zt(a)}function s(){c(),i()}function p(u,d){var C=gt(u);C.on(jt,function(b,f,$){d.go(d.is(ve)?$:b)}),a.push(C)}function l(){var u=gt(t),d=u.on;d(Pn,y),d(Ho,m),d([Xt,St],w),a.push(u),u.emit(Wn,t.splides)}function w(){Z(e.Elements.list,Dn,n.direction===cn?"vertical":"")}function y(u){t.go(u.index)}function m(u,d){Fn(Qi,Gn(d))&&(y(u),Ot(d))}return{setup:at(e.Media.set,{slideFocus:Re(r)?o:r},!0),mount:i,destroy:c,remount:s}}function ea(t,e,n){var o=gt(t),r=o.bind,a=0;function i(){n.wheel&&r(e.Elements.track,"wheel",c,le)}function c(p){if(p.cancelable){var l=p.deltaY,w=l<0,y=Cn(p),m=n.wheelMinThreshold||0,u=n.wheelSleep||0;xt(l)>m&&y-a>u&&(t.go(w?"<":">"),a=y),s(w)&&Ot(p)}}function s(p){return!n.releaseWheel||t.state.is(he)||e.Controller.getAdjacent(p)!==-1}return{mount:i}}var na=90;function oa(t,e,n){var o=gt(t),r=o.on,a=e.Elements.track,i=n.live&&!n.isNavigation,c=ue("span",xi),s=rn(na,at(l,!1));function p(){i&&(y(!e.Autoplay.isPaused()),Z(a,co,!0),c.textContent="…",r(zn,at(y,!0)),r(jn,at(y,!1)),r([ye,ne],at(l,!0)))}function l(m){Z(a,lo,m),m?(Ve(a,c),s.start()):(te(c),s.cancel())}function w(){Bt(a,[so,co,lo]),te(c)}function y(m){i&&Z(a,so,m?"off":"polite")}return{mount:p,disable:y,destroy:w}}var ra=Object.freeze({__proto__:null,Media:di,Direction:gi,Elements:Ei,Slides:Ai,Layout:Ii,Clones:Fi,Move:Ri,Controller:Bi,Arrows:Pi,Autoplay:Wi,Cover:zi,Scroll:Yi,Drag:Gi,Keyboard:Xi,LazyLoad:Ji,Pagination:Zi,Sync:ta,Wheel:ea,Live:oa}),ia={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"},aa={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:_i,i18n:ia,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function sa(t,e,n){var o=e.Slides;function r(){gt(t).on([Xt,yt],a)}function a(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,s){o.style("transition","opacity "+n.speed+"ms "+n.easing),Co(s)}return{mount:r,start:i,cancel:xn}}function la(t,e,n){var o=e.Move,r=e.Controller,a=e.Scroll,i=e.Elements.list,c=at(Lt,i,"transition"),s;function p(){gt(t).bind(i,"transitionend",function(m){m.target===i&&s&&(w(),s())})}function l(m,u){var d=o.toPosition(m,!0),C=o.getPosition(),b=y(m);xt(d-C)>=1&&b>=1?n.useScroll?a.scroll(d,b,!1,u):(c("transform "+b+"ms "+n.easing),o.translate(d,!0),s=u):(o.jump(m),u())}function w(){c(""),a.cancel()}function y(m){var u=n.rewindSpeed;if(t.is(fe)&&u){var d=r.getIndex(!0),C=r.getEnd();if(d===0&&m>=C||d>=C&&m===0)return u}return n.speed}return{mount:p,start:l,cancel:w}}var ca=(function(){function t(n,o){this.event=gt(),this.Components={},this.state=ui(ce),this.splides=[],this._o={},this._E={};var r=Yt(n)?Lo(document,n):n;$e(r,r+" is invalid."),this.root=r,o=Ut({label:At(r,wt)||"",labelledby:At(r,Hn)||""},aa,t.defaults,o||{});try{Ut(o,JSON.parse(At(r,Vn)))}catch{$e(!1,"Invalid JSON")}this._o=Object.create(Ut({},o))}var e=t.prototype;return e.mount=function(o,r){var a=this,i=this.state,c=this.Components;$e(i.is([ce,Ke]),"Already mounted!"),i.set(ce),this._C=c,this._T=r||this._T||(this.is(We)?sa:la),this._E=o||this._E;var s=Le({},ra,this._E,{Transition:this._T});return Qt(s,function(p,l){var w=p(a,c,a._o);c[l]=w,w.setup&&w.setup()}),Qt(c,function(p){p.mount&&p.mount()}),this.emit(Xt),Rt(this.root,Ci),i.set(ge),this.emit(wn),this},e.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(ge)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},e.go=function(o){return this._C.Controller.go(o),this},e.on=function(o,r){return this.event.on(o,r),this},e.off=function(o){return this.event.off(o),this},e.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(qt(arguments,1))),this},e.add=function(o,r){return this._C.Slides.add(o,r),this},e.remove=function(o){return this._C.Slides.remove(o),this},e.is=function(o){return this._o.type===o},e.refresh=function(){return this.emit(yt),this},e.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ce)?gt(this).on(wn,this.destroy.bind(this,o)):(Qt(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Nn),r.destroy(),o&&zt(this.splides),a.set(Ke)),this},ii(t,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t})(),qn=ca;qn.defaults={};qn.STATES=si;var mo=[[Xt,"onMounted"],[wn,"onReady"],[jt,"onMove"],[ye,"onMoved"],[Pn,"onClick"],[ko,"onActive"],[Fo,"onInactive"],[Ro,"onVisible"],[Bo,"onHidden"],[yt,"onRefresh"],[St,"onUpdated"],[me,"onResize"],[nn,"onResized"],[Vo,"onDrag"],[Oo,"onDragging"],[Po,"onDragged"],[on,"onScroll"],[ne,"onScrolled"],[Nn,"onDestroy"],[No,"onArrowsMounted"],[Wo,"onArrowsUpdated"],[zo,"onPaginationMounted"],[jo,"onPaginationUpdated"],[Wn,"onNavigationMounted"],[zn,"onAutoplayPlay"],[Mo,"onAutoplayPlaying"],[jn,"onAutoplayPause"],[Mn,"onLazyLoadLoaded"]];function Xn(...t){return t.filter(Boolean).join(" ")}function tn(t){return t!==null&&typeof t=="object"}function Ln(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,o)=>!Ln(n,e[o]));if(tn(t)&&tn(e)){const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(e,r)||!Ln(t[r],e[r]))}return t===e}function ua(t,e){return t.length===e.length&&!t.some((n,o)=>n!==e[o])}function pa(t,e){if(t){const n=Object.keys(t);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&e(t[r],r)===!1)break}}return t}function An(t,e){const n=t;return pa(e,(o,r)=>{Array.isArray(o)?n[r]=o.slice():tn(o)?n[r]=An(tn(n[r])?n[r]:{},o):n[r]=o}),n}var da=({children:t,className:e,...n})=>j.createElement("div",{className:Xn("splide__track",e),...n},j.createElement("ul",{className:"splide__list"},t)),rr=class extends j.Component{constructor(){super(...arguments),this.splideRef=j.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new qn(o,t),this.bind(this.splide),this.splide.mount(e,n),this.options=An({},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&&!Ln(this.options,t)&&(this.splide.options=t,this.options=An({},t));const e=this.getSlides();ua(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){mo.forEach(([e,n])=>{const o=this.props[n];typeof o=="function"&&t.on(e,(...r)=>{o(t,...r)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:o,...r}=this.props;return j.createElement(e,{className:Xn("splide",t),ref:this.splideRef,...this.omit(r,["options",...mo.map(a=>a[1])])},n?j.createElement(da,null,o):o)}},ir=({children:t,className:e,...n})=>j.createElement("li",{className:Xn("splide__slide",e),...n},t);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),j=require("react"),dt=require("classnames"),F=require("./useScopedStyles-DpVdqfXj.js"),dr=require("react-dom");function gr(t){return t.type==="object"&&t.version===1}const mr="ControlSlider-module__wrapper___sHEkd",fr="ControlSlider-module__hoverArrow___A-dOH",hr="ControlSlider-module__sliderItem___QQSkR",yr="ControlSlider-module__sliderImage___9hRl-",vr="ControlSlider-module__arrow___05ghY",br="ControlSlider-module__arrowVertical___tBfVN",Sr="ControlSlider-module__nextArrow___-30Yc",xr="ControlSlider-module__arrowInner___aEra3",Cr="ControlSlider-module__arrowIcon___S4ztF",$r="ControlSlider-module__arrowImg___2dwJW",_r="ControlSlider-module__mirror___brd6U",wr="ControlSlider-module__pagination___bicLF",Tr="ControlSlider-module__paginationInner___bT-P-",Er="ControlSlider-module__paginationVertical___zYqKw",Lr="ControlSlider-module__paginationItem___nTRbk",Ar="ControlSlider-module__dot___p1Qun",Ir="ControlSlider-module__activeDot___LHFaj",kr="ControlSlider-module__paginationInsideBottom___R3FWn",Fr="ControlSlider-module__paginationInsideTop___V-qb-",Rr="ControlSlider-module__paginationOutsideBottom___14w8D",Br="ControlSlider-module__paginationOutsideTop___SCLqB",Vr="ControlSlider-module__paginationInsideLeft___yOBRZ",Or="ControlSlider-module__paginationInsideRight___Rtt3o",Pr="ControlSlider-module__paginationOutsideLeft___lahaw",Nr="ControlSlider-module__paginationOutsideRight___EtuQa",Wr="ControlSlider-module__imgWrapper___UjEgB",zr="ControlSlider-module__captionBlock___dJ6-j",jr="ControlSlider-module__captionTextWrapper___HFlpf",Mr="ControlSlider-module__captionText___uGBVc",Hr="ControlSlider-module__active___WZK4G",Dr="ControlSlider-module__withPointerEvents___t-18M",Ur="ControlSlider-module__topLeftAlignment___zjnGM",Yr="ControlSlider-module__topCenterAlignment___gD1xW",Gr="ControlSlider-module__topRightAlignment___NMapS",qr="ControlSlider-module__middleLeftAlignment___OnUrY",Xr="ControlSlider-module__middleCenterAlignment___Tdkl0",Kr="ControlSlider-module__middleRightAlignment___wEbfX",Jr="ControlSlider-module__bottomLeftAlignment___cTP2-",Zr="ControlSlider-module__bottomCenterAlignment___c54fB",Qr="ControlSlider-module__bottomRightAlignment___kEwrz",ti="ControlSlider-module__clickOverlay___DZA28",ei="ControlSlider-module__contain___pLyq7",ni="ControlSlider-module__cover___KdDat",Y={wrapper:mr,hoverArrow:fr,sliderItem:hr,sliderImage:yr,arrow:vr,arrowVertical:br,nextArrow:Sr,arrowInner:xr,arrowIcon:Cr,arrowImg:$r,mirror:_r,pagination:wr,paginationInner:Tr,paginationVertical:Er,paginationItem:Lr,dot:Ar,activeDot:Ir,paginationInsideBottom:kr,paginationInsideTop:Fr,paginationOutsideBottom:Rr,paginationOutsideTop:Br,paginationInsideLeft:Vr,paginationInsideRight:Or,paginationOutsideLeft:Pr,paginationOutsideRight:Nr,imgWrapper:Wr,captionBlock:zr,captionTextWrapper:jr,captionText:Mr,active:Hr,withPointerEvents:Dr,topLeftAlignment:Ur,topCenterAlignment:Yr,topRightAlignment:Gr,middleLeftAlignment:qr,middleCenterAlignment:Xr,middleRightAlignment:Kr,bottomLeftAlignment:Jr,bottomCenterAlignment:Zr,bottomRightAlignment:Qr,clickOverlay:ti,contain:ei,cover:ni};function oi(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ri(t,e,n){return e&&oi(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var Qn="(prefers-reduced-motion: reduce)",ue=1,ii=2,fe=3,ve=4,Fe=5,Ye=6,Ke=7,ai={CREATED:ue,MOUNTED:ii,IDLE:fe,MOVING:ve,SCROLLING:Fe,DRAGGING:Ye,DESTROYED:Ke};function zt(t){t.length=0}function qt(t,e,n){return Array.prototype.slice.call(t,e,n)}function at(t){return t.bind.apply(t,[null].concat(qt(arguments,1)))}var xo=setTimeout,Sn=function(){};function to(t){return requestAnimationFrame(t)}function en(t,e){return typeof e===t}function we(t){return!In(t)&&en("object",t)}var An=Array.isArray,Co=at(en,"function"),Yt=at(en,"string"),Re=at(en,"undefined");function In(t){return t===null}function $o(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Be(t){return An(t)?t:[t]}function Tt(t,e){Be(t).forEach(e)}function kn(t,e){return t.indexOf(e)>-1}function Ge(t,e){return t.push.apply(t,Be(e)),t}function Pt(t,e,n){t&&Tt(e,function(o){o&&t.classList[n?"add":"remove"](o)})}function Rt(t,e){Pt(t,Yt(e)?e.split(" "):e,!0)}function Ve(t,e){Tt(e,t.appendChild.bind(t))}function Fn(t,e){Tt(t,function(n){var o=(e||n).parentNode;o&&o.insertBefore(n,e)})}function Te(t,e){return $o(t)&&(t.msMatchesSelector||t.matches).call(t,e)}function _o(t,e){var n=t?qt(t.children):[];return e?n.filter(function(o){return Te(o,e)}):n}function Oe(t,e){return e?_o(t,e)[0]:t.firstElementChild}var Ee=Object.keys;function te(t,e,n){return t&&(n?Ee(t).reverse():Ee(t)).forEach(function(o){o!=="__proto__"&&e(t[o],o)}),t}function Le(t){return qt(arguments,1).forEach(function(e){te(e,function(n,o){t[o]=e[o]})}),t}function Ut(t){return qt(arguments,1).forEach(function(e){te(e,function(n,o){An(n)?t[o]=n.slice():we(n)?t[o]=Ut({},we(t[o])?t[o]:{},n):t[o]=n})}),t}function eo(t,e){Tt(e||Ee(t),function(n){delete t[n]})}function Bt(t,e){Tt(t,function(n){Tt(e,function(o){n&&n.removeAttribute(o)})})}function Z(t,e,n){we(e)?te(e,function(o,r){Z(t,r,o)}):Tt(t,function(o){In(n)||n===""?Bt(o,e):o.setAttribute(e,String(n))})}function pe(t,e,n){var o=document.createElement(t);return e&&(Yt(e)?Rt(o,e):Z(o,e)),n&&Ve(n,o),o}function Lt(t,e,n){if(Re(n))return getComputedStyle(t)[e];In(n)||(t.style[e]=""+n)}function Ae(t,e){Lt(t,"display",e)}function wo(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function At(t,e){return t.getAttribute(e)}function no(t,e){return t&&t.classList.contains(e)}function _t(t){return t.getBoundingClientRect()}function ee(t){Tt(t,function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})}function To(t){return Oe(new DOMParser().parseFromString(t,"text/html").body)}function Ot(t,e){t.preventDefault(),e&&(t.stopPropagation(),t.stopImmediatePropagation())}function Eo(t,e){return t&&t.querySelector(e)}function Rn(t,e){return e?qt(t.querySelectorAll(e)):[]}function Nt(t,e){Pt(t,e,!1)}function xn(t){return t.timeStamp}function Zt(t){return Yt(t)?t:t?t+"px":""}var Pe="splide",Bn="data-"+Pe;function $e(t,e){if(!t)throw new Error("["+Pe+"] "+(e||""))}var Gt=Math.min,Je=Math.max,Ze=Math.floor,Ie=Math.ceil,xt=Math.abs;function Lo(t,e,n){return xt(t-e)<n}function qe(t,e,n,o){var r=Gt(e,n),a=Je(e,n);return o?r<t&&t<a:r<=t&&t<=a}function se(t,e,n){var o=Gt(e,n),r=Je(e,n);return Gt(Je(o,t),r)}function Cn(t){return+(t>0)-+(t<0)}function $n(t,e){return Tt(e,function(n){t=t.replace("%s",""+n)}),t}function Vn(t){return t<10?"0"+t:""+t}var oo={};function li(t){return""+t+Vn(oo[t]=(oo[t]||0)+1)}function Ao(){var t=[];function e(i,c,l,p){r(i,c,function(s,w,y){var m="addEventListener"in s,u=m?s.removeEventListener.bind(s,w,l,p):s.removeListener.bind(s,l);m?s.addEventListener(w,l,p):s.addListener(l),t.push([s,w,y,l,u])})}function n(i,c,l){r(i,c,function(p,s,w){t=t.filter(function(y){return y[0]===p&&y[1]===s&&y[2]===w&&(!l||y[3]===l)?(y[4](),!1):!0})})}function o(i,c,l){var p,s=!0;return typeof CustomEvent=="function"?p=new CustomEvent(c,{bubbles:s,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(c,s,!1,l)),i.dispatchEvent(p),p}function r(i,c,l){Tt(i,function(p){p&&Tt(c,function(s){s.split(" ").forEach(function(w){var y=w.split(".");l(p,y[0],y[1])})})})}function a(){t.forEach(function(i){i[4]()}),zt(t)}return{bind:e,unbind:n,dispatch:o,destroy:a}}var Xt="mounted",_n="ready",jt="move",be="moved",On="click",Io="active",ko="inactive",Fo="visible",Ro="hidden",yt="refresh",St="updated",he="resize",nn="resized",Bo="drag",Vo="dragging",Oo="dragged",on="scroll",oe="scrolled",si="overflow",Pn="destroy",Po="arrows:mounted",No="arrows:updated",Wo="pagination:mounted",zo="pagination:updated",Nn="navigation:mounted",Wn="autoplay:play",jo="autoplay:playing",zn="autoplay:pause",jn="lazyload:loaded",Mo="sk",Ho="sh",Qe="ei";function gt(t){var e=t?t.event.bus:document.createDocumentFragment(),n=Ao();function o(a,i){n.bind(e,Be(a).join(" "),function(c){i.apply(i,An(c.detail)?c.detail:[])})}function r(a){n.dispatch(e,a,qt(arguments,1))}return t&&t.event.on(Pn,n.destroy),Le(n,{bus:e,on:o,off:at(n.unbind,e),emit:r})}function rn(t,e,n,o){var r=Date.now,a,i=0,c,l=!0,p=0;function s(){if(!l){if(i=t?Gt((r()-a)/t,1):1,n&&n(i),i>=1&&(e(),a=r(),o&&++p>=o))return y();c=to(s)}}function w(b){b||u(),a=r()-(b?i*t:0),l=!1,c=to(s)}function y(){l=!0}function m(){a=r(),i=0,n&&n(i)}function u(){c&&cancelAnimationFrame(c),i=0,c=0,l=!0}function d(b){t=b}function C(){return l}return{start:w,rewind:m,pause:y,cancel:u,set:d,isPaused:C}}function ci(t){var e=t;function n(r){e=r}function o(r){return kn(Be(r),e)}return{set:n,is:o}}function ui(t,e){var n=rn(0,t,null,1);return function(){n.isPaused()&&n.start()}}function pi(t,e,n){var o=t.state,r=n.breakpoints||{},a=n.reducedMotion||{},i=Ao(),c=[];function l(){var u=n.mediaQuery==="min";Ee(r).sort(function(d,C){return u?+d-+C:+C-+d}).forEach(function(d){s(r[d],"("+(u?"min":"max")+"-width:"+d+"px)")}),s(a,Qn),w()}function p(u){u&&i.destroy()}function s(u,d){var C=matchMedia(d);i.bind(C,"change",w),c.push([u,C])}function w(){var u=o.is(Ke),d=n.direction,C=c.reduce(function(b,f){return Ut(b,f[1].matches?f[0]:{})},{});eo(n),m(C),n.destroy?t.destroy(n.destroy==="completely"):u?(p(!0),t.mount()):d!==n.direction&&t.refresh()}function y(u){matchMedia(Qn).matches&&(u?Ut(n,a):eo(n,Ee(a)))}function m(u,d,C){Ut(n,u),d&&Ut(Object.getPrototypeOf(n),u),(C||!o.is(ue))&&t.emit(St,n)}return{setup:l,destroy:p,reduce:y,set:m}}var an="Arrow",ln=an+"Left",sn=an+"Right",Do=an+"Up",Uo=an+"Down",ro="rtl",cn="ttb",mn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Do,sn],ArrowRight:[Uo,ln]};function di(t,e,n){function o(a,i,c){c=c||n.direction;var l=c===ro&&!i?1:c===cn?0:-1;return mn[a]&&mn[a][l]||a.replace(/width|left|right/i,function(p,s){var w=mn[p.toLowerCase()][l]||p;return s>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function r(a){return a*(n.direction===ro?1:-1)}return{resolve:o,orient:r}}var Wt="role",de="tabindex",gi="disabled",It="aria-",Ne=It+"controls",Yo=It+"current",io=It+"selected",wt=It+"label",Mn=It+"labelledby",Go=It+"hidden",Hn=It+"orientation",ke=It+"roledescription",ao=It+"live",lo=It+"busy",so=It+"atomic",Dn=[Wt,de,gi,Ne,Yo,wt,Mn,Go,Hn,ke],Vt=Pe+"__",Kt="is-",fn=Pe,co=Vt+"track",mi=Vt+"list",un=Vt+"slide",qo=un+"--clone",fi=un+"__container",Un=Vt+"arrows",pn=Vt+"arrow",Xo=pn+"--prev",Ko=pn+"--next",dn=Vt+"pagination",Jo=dn+"__page",hi=Vt+"progress",yi=hi+"__bar",vi=Vt+"toggle",bi=Vt+"spinner",Si=Vt+"sr",xi=Kt+"initialized",ne=Kt+"active",Zo=Kt+"prev",Qo=Kt+"next",wn=Kt+"visible",Tn=Kt+"loading",tr=Kt+"focus-in",er=Kt+"overflow",Ci=[ne,wn,Zo,Qo,Tn,tr,er],$i={slide:un,clone:qo,arrows:Un,arrow:pn,prev:Xo,next:Ko,pagination:dn,page:Jo,spinner:bi};function _i(t,e){if(Co(t.closest))return t.closest(e);for(var n=t;n&&n.nodeType===1&&!Te(n,e);)n=n.parentElement;return n}var wi=5,uo=200,nr="touchstart mousedown",hn="touchmove mousemove",yn="touchend touchcancel mouseup click";function Ti(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=t.root,c=n.i18n,l={},p=[],s=[],w=[],y,m,u;function d(){$(),M(),f()}function C(){r(yt,b),r(yt,d),r(St,f),a(document,nr+" keydown",function(h){u=h.type==="keydown"},{capture:!0}),a(i,"focusin",function(){Pt(i,tr,!!u)})}function b(h){var L=Dn.concat("style");zt(p),Nt(i,s),Nt(y,w),Bt([y,m],L),Bt(i,h?L:["style",ke])}function f(){Nt(i,s),Nt(y,w),s=T(fn),w=T(co),Rt(i,s),Rt(y,w),Z(i,wt,n.label),Z(i,Mn,n.labelledby)}function $(){y=P("."+co),m=Oe(y,"."+mi),$e(y&&m,"A track/list element is missing."),Ge(p,_o(m,"."+un+":not(."+qo+")")),te({arrows:Un,pagination:dn,prev:Xo,next:Ko,bar:yi,toggle:vi},function(h,L){l[L]=P("."+h)}),Le(l,{root:i,track:y,list:m,slides:p})}function M(){var h=i.id||li(Pe),L=n.role;i.id=h,y.id=y.id||h+"-track",m.id=m.id||h+"-list",!At(i,Wt)&&i.tagName!=="SECTION"&&L&&Z(i,Wt,L),Z(i,ke,c.carousel),Z(m,Wt,"presentation")}function P(h){var L=Eo(i,h);return L&&_i(L,"."+fn)===i?L:void 0}function T(h){return[h+"--"+n.type,h+"--"+n.direction,n.drag&&h+"--draggable",n.isNavigation&&h+"--nav",h===fn&&ne]}return Le(l,{setup:d,mount:C,destroy:b})}var ye="slide",Se="loop",We="fade";function Ei(t,e,n,o){var r=gt(t),a=r.on,i=r.emit,c=r.bind,l=t.Components,p=t.root,s=t.options,w=s.isNavigation,y=s.updateOnMove,m=s.i18n,u=s.pagination,d=s.slideFocus,C=l.Direction.resolve,b=At(o,"style"),f=At(o,wt),$=n>-1,M=Oe(o,"."+fi),P;function T(){$||(o.id=p.id+"-slide"+Vn(e+1),Z(o,Wt,u?"tabpanel":"group"),Z(o,ke,m.slide),Z(o,wt,f||$n(m.slideLabel,[e+1,t.length]))),h()}function h(){c(o,"click",at(i,On,I)),c(o,"keydown",at(i,Mo,I)),a([be,Ho,oe],k),a(Nn,R),y&&a(jt,W)}function L(){P=!0,r.destroy(),Nt(o,Ci),Bt(o,Dn),Z(o,"style",b),Z(o,wt,f||"")}function R(){var _=t.splides.map(function(v){var V=v.splide.Components.Slides.getAt(e);return V?V.slide.id:""}).join(" ");Z(o,wt,$n(m.slideX,($?n:e)+1)),Z(o,Ne,_),Z(o,Wt,d?"button":""),d&&Bt(o,ke)}function W(){P||k()}function k(){if(!P){var _=t.index;B(),O(),Pt(o,Zo,e===_-1),Pt(o,Qo,e===_+1)}}function B(){var _=D();_!==no(o,ne)&&(Pt(o,ne,_),Z(o,Yo,w&&_||""),i(_?Io:ko,I))}function O(){var _=g(),v=!_&&(!D()||$);if(t.state.is([ve,Fe])||Z(o,Go,v||""),Z(Rn(o,s.focusableNodes||""),de,v?-1:""),d&&Z(o,de,v?-1:0),_!==no(o,wn)&&(Pt(o,wn,_),i(_?Fo:Ro,I)),!_&&document.activeElement===o){var V=l.Slides.getAt(t.index);V&&wo(V.slide)}}function U(_,v,V){Lt(V&&M||o,_,v)}function D(){var _=t.index;return _===e||s.cloneStatus&&_===n}function g(){if(t.is(We))return D();var _=_t(l.Elements.track),v=_t(o),V=C("left",!0),X=C("right",!0);return Ze(_[V])<=Ie(v[V])&&Ze(v[X])<=Ie(_[X])}function A(_,v){var V=xt(_-e);return!$&&(s.rewind||t.is(Se))&&(V=Gt(V,t.length-V)),V<=v}var I={index:e,slideIndex:n,slide:o,container:M,isClone:$,mount:T,destroy:L,update:k,style:U,isWithin:A};return I}function Li(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=o.bind,c=e.Elements,l=c.slides,p=c.list,s=[];function w(){y(),r(yt,m),r(yt,y)}function y(){l.forEach(function(k,B){d(k,B,-1)})}function m(){P(function(k){k.destroy()}),zt(s)}function u(){P(function(k){k.update()})}function d(k,B,O){var U=Ei(t,B,O,k);U.mount(),s.push(U),s.sort(function(D,g){return D.index-g.index})}function C(k){return k?T(function(B){return!B.isClone}):s}function b(k){var B=e.Controller,O=B.toIndex(k),U=B.hasFocus()?1:n.perPage;return T(function(D){return qe(D.index,O,O+U-1)})}function f(k){return T(k)[0]}function $(k,B){Tt(k,function(O){if(Yt(O)&&(O=To(O)),$o(O)){var U=l[B];U?Fn(O,U):Ve(p,O),Rt(O,n.classes.slide),L(O,at(a,he))}}),a(yt)}function M(k){ee(T(k).map(function(B){return B.slide})),a(yt)}function P(k,B){C(B).forEach(k)}function T(k){return s.filter(Co(k)?k:function(B){return Yt(k)?Te(B.slide,k):kn(Be(k),B.index)})}function h(k,B,O){P(function(U){U.style(k,B,O)})}function L(k,B){var O=Rn(k,"img"),U=O.length;U?O.forEach(function(D){i(D,"load error",function(){--U||B()})}):B()}function R(k){return k?l.length:s.length}function W(){return s.length>n.perPage}return{mount:w,destroy:m,update:u,register:d,get:C,getIn:b,getAt:f,add:$,remove:M,forEach:P,filter:T,style:h,getLength:R,isEnough:W}}function Ai(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.emit,c=e.Slides,l=e.Direction.resolve,p=e.Elements,s=p.root,w=p.track,y=p.list,m=c.getAt,u=c.style,d,C,b;function f(){$(),a(window,"resize load",ui(at(i,he))),r([St,yt],$),r(he,M)}function $(){d=n.direction===cn,Lt(s,"maxWidth",Zt(n.width)),Lt(w,l("paddingLeft"),P(!1)),Lt(w,l("paddingRight"),P(!0)),M(!0)}function M(I){var _=_t(s);(I||C.width!==_.width||C.height!==_.height)&&(Lt(w,"height",T()),u(l("marginRight"),Zt(n.gap)),u("width",L()),u("height",R(),!0),C=_,i(nn),b!==(b=A())&&(Pt(s,er,b),i(si,b)))}function P(I){var _=n.padding,v=l(I?"right":"left");return _&&Zt(_[v]||(we(_)?0:_))||"0px"}function T(){var I="";return d&&(I=h(),$e(I,"height or heightRatio is missing."),I="calc("+I+" - "+P(!1)+" - "+P(!0)+")"),I}function h(){return Zt(n.height||_t(y).width*n.heightRatio)}function L(){return n.autoWidth?null:Zt(n.fixedWidth)||(d?"":W())}function R(){return Zt(n.fixedHeight)||(d?n.autoHeight?null:W():h())}function W(){var I=Zt(n.gap);return"calc((100%"+(I&&" + "+I)+")/"+(n.perPage||1)+(I&&" - "+I)+")"}function k(){return _t(y)[l("width")]}function B(I,_){var v=m(I||0);return v?_t(v.slide)[l("width")]+(_?0:D()):0}function O(I,_){var v=m(I);if(v){var V=_t(v.slide)[l("right")],X=_t(y)[l("left")];return xt(V-X)+(_?0:D())}return 0}function U(I){return O(t.length-1)-O(0)+B(0,I)}function D(){var I=m(0);return I&&parseFloat(Lt(I.slide,l("marginRight")))||0}function g(I){return parseFloat(Lt(w,l("padding"+(I?"Right":"Left"))))||0}function A(){return t.is(We)||U(!0)>k()}return{mount:f,resize:M,listSize:k,slideSize:B,sliderSize:U,totalSize:O,getPadding:g,isOverflow:A}}var Ii=2;function ki(t,e,n){var o=gt(t),r=o.on,a=e.Elements,i=e.Slides,c=e.Direction.resolve,l=[],p;function s(){r(yt,w),r([St,he],m),(p=C())&&(u(p),e.Layout.resize(!0))}function w(){y(),s()}function y(){ee(l),zt(l),o.destroy()}function m(){var b=C();p!==b&&(p<b||!b)&&o.emit(yt)}function u(b){var f=i.get().slice(),$=f.length;if($){for(;f.length<b;)Ge(f,f);Ge(f.slice(-b),f.slice(0,b)).forEach(function(M,P){var T=P<b,h=d(M.slide,P);T?Fn(h,f[0].slide):Ve(a.list,h),Ge(l,h),i.register(h,P-b+(T?0:$),M.index)})}}function d(b,f){var $=b.cloneNode(!0);return Rt($,n.classes.clone),$.id=t.root.id+"-clone"+Vn(f+1),$}function C(){var b=n.clones;if(!t.is(Se))b=0;else if(Re(b)){var f=n[c("fixedWidth")]&&e.Layout.slideSize(0),$=f&&Ie(_t(a.track)[c("width")]/f);b=$||n[c("autoWidth")]&&t.length||n.perPage*Ii}return b}return{mount:s,destroy:y}}function Fi(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=t.state.set,c=e.Layout,l=c.slideSize,p=c.getPadding,s=c.totalSize,w=c.listSize,y=c.sliderSize,m=e.Direction,u=m.resolve,d=m.orient,C=e.Elements,b=C.list,f=C.track,$;function M(){$=e.Transition,r([Xt,nn,St,yt],P)}function P(){e.Controller.isBusy()||(e.Scroll.cancel(),h(t.index),e.Slides.update())}function T(v,V,X,rt){v!==V&&I(v>X)&&(k(),L(W(U(),v>X),!0)),i(ve),a(jt,V,X,v),$.start(V,function(){i(fe),a(be,V,X,v),rt&&rt()})}function h(v){L(O(v,!0))}function L(v,V){if(!t.is(We)){var X=V?v:R(v);Lt(b,"transform","translate"+u("X")+"("+X+"px)"),v!==X&&a(Ho)}}function R(v){if(t.is(Se)){var V=B(v),X=V>e.Controller.getEnd(),rt=V<0;(rt||X)&&(v=W(v,X))}return v}function W(v,V){var X=v-A(V),rt=y();return v-=d(rt*(Ie(xt(X)/rt)||1))*(V?1:-1),v}function k(){L(U(),!0),$.cancel()}function B(v){for(var V=e.Slides.get(),X=0,rt=1/0,Q=0;Q<V.length;Q++){var ut=V[Q].index,E=xt(O(ut,!0)-v);if(E<=rt)rt=E,X=ut;else break}return X}function O(v,V){var X=d(s(v-1)-g(v));return V?D(X):X}function U(){var v=u("left");return _t(b)[v]-_t(f)[v]+d(p(!1))}function D(v){return n.trimSpace&&t.is(ye)&&(v=se(v,0,d(y(!0)-w()))),v}function g(v){var V=n.focus;return V==="center"?(w()-l(v,!0))/2:+V*l(v)||0}function A(v){return O(v?e.Controller.getEnd():0,!!n.trimSpace)}function I(v){var V=d(W(U(),v));return v?V>=0:V<=b[u("scrollWidth")]-_t(f)[u("width")]}function _(v,V){V=Re(V)?U():V;var X=v!==!0&&d(V)<d(A(!1)),rt=v!==!1&&d(V)>d(A(!0));return X||rt}return{mount:M,move:T,jump:h,translate:L,shift:W,cancel:k,toIndex:B,toPosition:O,getPosition:U,getLimit:A,exceededLimit:_,reposition:P}}function Ri(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=e.Move,c=i.getPosition,l=i.getLimit,p=i.toPosition,s=e.Slides,w=s.isEnough,y=s.getLength,m=n.omitEnd,u=t.is(Se),d=t.is(ye),C=at(U,!1),b=at(U,!0),f=n.start||0,$,M=f,P,T,h;function L(){R(),r([St,yt,Qe],R),r(nn,W)}function R(){P=y(!0),T=n.perMove,h=n.perPage,$=I();var E=se(f,0,m?$:P-1);E!==f&&(f=E,i.reposition())}function W(){$!==I()&&a(Qe)}function k(E,K,ht){if(!ut()){var it=O(E),mt=A(it);mt>-1&&(K||mt!==f)&&(X(mt),i.move(it,mt,M,ht))}}function B(E,K,ht,it){e.Scroll.scroll(E,K,ht,function(){var mt=A(i.toIndex(c()));X(m?Gt(mt,$):mt),it&&it()})}function O(E){var K=f;if(Yt(E)){var ht=E.match(/([+\-<>])(\d+)?/)||[],it=ht[1],mt=ht[2];it==="+"||it==="-"?K=D(f+ +(""+it+(+mt||1)),f):it===">"?K=mt?_(+mt):C(!0):it==="<"&&(K=b(!0))}else K=u?E:se(E,0,$);return K}function U(E,K){var ht=T||(Q()?1:h),it=D(f+ht*(E?-1:1),f,!(T||Q()));return it===-1&&d&&!Lo(c(),l(!E),1)?E?0:$:K?it:A(it)}function D(E,K,ht){if(w()||Q()){var it=g(E);it!==E&&(K=E,E=it,ht=!1),E<0||E>$?!T&&(qe(0,E,K,!0)||qe($,K,E,!0))?E=_(v(E)):u?E=ht?E<0?-(P%h||h):P:E:n.rewind?E=E<0?$:0:E=-1:ht&&E!==K&&(E=_(v(K)+(E<K?-1:1)))}else E=-1;return E}function g(E){if(d&&n.trimSpace==="move"&&E!==f)for(var K=c();K===p(E,!0)&&qe(E,0,t.length-1,!n.rewind);)E<f?--E:++E;return E}function A(E){return u?(E+P)%P||0:E}function I(){for(var E=P-(Q()||u&&T?1:h);m&&E-- >0;)if(p(P-1,!0)!==p(E,!0)){E++;break}return se(E,0,P-1)}function _(E){return se(Q()?E:h*E,0,$)}function v(E){return Q()?Gt(E,$):Ze((E>=$?P-1:E)/h)}function V(E){var K=i.toIndex(E);return d?se(K,0,$):K}function X(E){E!==f&&(M=f,f=E)}function rt(E){return E?M:f}function Q(){return!Re(n.focus)||n.isNavigation}function ut(){return t.state.is([ve,Fe])&&!!n.waitForTransition}return{mount:L,go:k,scroll:B,getNext:C,getPrev:b,getAdjacent:U,getEnd:I,setIndex:X,getIndex:rt,toIndex:_,toPage:v,toDest:V,hasFocus:Q,isBusy:ut}}var Bi="http://www.w3.org/2000/svg",Vi="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",je=40;function Oi(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.emit,c=n.classes,l=n.i18n,p=e.Elements,s=e.Controller,w=p.arrows,y=p.track,m=w,u=p.prev,d=p.next,C,b,f={};function $(){P(),r(St,M)}function M(){T(),$()}function P(){var B=n.arrows;B&&!(u&&d)&&R(),u&&d&&(Le(f,{prev:u,next:d}),Ae(m,B?"":"none"),Rt(m,b=Un+"--"+n.direction),B&&(h(),k(),Z([u,d],Ne,y.id),i(Po,u,d)))}function T(){o.destroy(),Nt(m,b),C?(ee(w?[u,d]:m),u=d=null):Bt([u,d],Dn)}function h(){r([Xt,be,yt,oe,Qe],k),a(d,"click",at(L,">")),a(u,"click",at(L,"<"))}function L(B){s.go(B,!0)}function R(){m=w||pe("div",c.arrows),u=W(!0),d=W(!1),C=!0,Ve(m,[u,d]),!w&&Fn(m,y)}function W(B){var O='<button class="'+c.arrow+" "+(B?c.prev:c.next)+'" type="button"><svg xmlns="'+Bi+'" viewBox="0 0 '+je+" "+je+'" width="'+je+'" height="'+je+'" focusable="false"><path d="'+(n.arrowPath||Vi)+'" />';return To(O)}function k(){if(u&&d){var B=t.index,O=s.getPrev(),U=s.getNext(),D=O>-1&&B<O?l.last:l.prev,g=U>-1&&B>U?l.first:l.next;u.disabled=O<0,d.disabled=U<0,Z(u,wt,D),Z(d,wt,g),i(No,u,d,O,U)}}return{arrows:f,mount:$,destroy:T,update:k}}var Pi=Bn+"-interval";function Ni(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.emit,c=rn(n.interval,t.go.bind(t,">"),h),l=c.isPaused,p=e.Elements,s=e.Elements,w=s.root,y=s.toggle,m=n.autoplay,u,d,C=m==="pause";function b(){m&&(f(),y&&Z(y,Ne,p.track.id),C||$(),T())}function f(){n.pauseOnHover&&a(w,"mouseenter mouseleave",function(R){u=R.type==="mouseenter",P()}),n.pauseOnFocus&&a(w,"focusin focusout",function(R){d=R.type==="focusin",P()}),y&&a(y,"click",function(){C?$():M(!0)}),r([jt,on,yt],c.rewind),r(jt,L)}function $(){l()&&e.Slides.isEnough()&&(c.start(!n.resetProgress),d=u=C=!1,T(),i(Wn))}function M(R){R===void 0&&(R=!0),C=!!R,T(),l()||(c.pause(),i(zn))}function P(){C||(u||d?M(!1):$())}function T(){y&&(Pt(y,ne,!C),Z(y,wt,n.i18n[C?"play":"pause"]))}function h(R){var W=p.bar;W&&Lt(W,"width",R*100+"%"),i(jo,R)}function L(R){var W=e.Slides.getAt(R);c.set(W&&+At(W.slide,Pi)||n.interval)}return{mount:b,destroy:c.cancel,play:$,pause:M,isPaused:l}}function Wi(t,e,n){var o=gt(t),r=o.on;function a(){n.cover&&(r(jn,at(c,!0)),r([Xt,St,yt],at(i,!0)))}function i(l){e.Slides.forEach(function(p){var s=Oe(p.container||p.slide,"img");s&&s.src&&c(l,s,p)})}function c(l,p,s){s.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),Ae(p,l?"none":"")}return{mount:a,destroy:at(i,!1)}}var zi=10,ji=600,Mi=.6,Hi=1.5,Di=800;function Ui(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=t.state.set,c=e.Move,l=c.getPosition,p=c.getLimit,s=c.exceededLimit,w=c.translate,y=t.is(ye),m,u,d=1;function C(){r(jt,M),r([St,yt],P)}function b(h,L,R,W,k){var B=l();if(M(),R&&(!y||!s())){var O=e.Layout.sliderSize(),U=Cn(h)*O*Ze(xt(h)/O)||0;h=c.toPosition(e.Controller.toDest(h%O))+U}var D=Lo(B,h,1);d=1,L=D?0:L||Je(xt(h-B)/Hi,Di),u=W,m=rn(L,f,at($,B,h,k),1),i(Fe),a(on),m.start()}function f(){i(fe),u&&u(),a(oe)}function $(h,L,R,W){var k=l(),B=h+(L-h)*T(W),O=(B-k)*d;w(k+O),y&&!R&&s()&&(d*=Mi,xt(O)<zi&&b(p(s(!0)),ji,!1,u,!0))}function M(){m&&m.cancel()}function P(){m&&!m.isPaused()&&(M(),f())}function T(h){var L=n.easingFunc;return L?L(h):1-Math.pow(1-h,4)}return{mount:C,destroy:M,scroll:b,cancel:P}}var ce={passive:!1,capture:!0};function Yi(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=o.bind,c=o.unbind,l=t.state,p=e.Move,s=e.Scroll,w=e.Controller,y=e.Elements.track,m=e.Media.reduce,u=e.Direction,d=u.resolve,C=u.orient,b=p.getPosition,f=p.exceededLimit,$,M,P,T,h,L=!1,R,W,k;function B(){i(y,hn,Sn,ce),i(y,yn,Sn,ce),i(y,nr,U,ce),i(y,"click",A,{capture:!0}),i(y,"dragstart",Ot),r([Xt,St],O)}function O(){var z=n.drag;Mt(!z),T=z==="free"}function U(z){if(R=!1,!W){var S=mt(z);it(z.target)&&(S||!z.button)&&(w.isBusy()?Ot(z,!0):(k=S?y:window,h=l.is([ve,Fe]),P=null,i(k,hn,D,ce),i(k,yn,g,ce),p.cancel(),s.cancel(),I(z)))}}function D(z){if(l.is(Ye)||(l.set(Ye),a(Bo)),z.cancelable)if(h){p.translate($+ht(Q(z)));var S=ut(z)>uo,H=L!==(L=f());(S||H)&&I(z),R=!0,a(Vo),Ot(z)}else V(z)&&(h=v(z),Ot(z))}function g(z){l.is(Ye)&&(l.set(fe),a(Oo)),h&&(_(z),Ot(z)),c(k,hn,D),c(k,yn,g),h=!1}function A(z){!W&&R&&Ot(z,!0)}function I(z){P=M,M=z,$=b()}function _(z){var S=X(z),H=rt(S),G=n.rewind&&n.rewindByDrag;m(!1),T?w.scroll(H,0,n.snap):t.is(We)?w.go(C(Cn(S))<0?G?"<":"-":G?">":"+"):t.is(ye)&&L&&G?w.go(f(!0)?">":"<"):w.go(w.toDest(H),!0),m(!0)}function v(z){var S=n.dragMinThreshold,H=we(S),G=H&&S.mouse||0,J=(H?S.touch:+S)||10;return xt(Q(z))>(mt(z)?J:G)}function V(z){return xt(Q(z))>xt(Q(z,!0))}function X(z){if(t.is(Se)||!L){var S=ut(z);if(S&&S<uo)return Q(z)/S}return 0}function rt(z){return b()+Cn(z)*Gt(xt(z)*(n.flickPower||600),T?1/0:e.Layout.listSize()*(n.flickMaxPages||1))}function Q(z,S){return K(z,S)-K(E(z),S)}function ut(z){return xn(z)-xn(E(z))}function E(z){return M===z&&P||M}function K(z,S){return(mt(z)?z.changedTouches[0]:z)["page"+d(S?"Y":"X")]}function ht(z){return z/(L&&t.is(ye)?wi:1)}function it(z){var S=n.noDrag;return!Te(z,"."+Jo+", ."+pn)&&(!S||!Te(z,S))}function mt(z){return typeof TouchEvent<"u"&&z instanceof TouchEvent}function bt(){return h}function Mt(z){W=z}return{mount:B,disable:Mt,isDragging:bt}}var Gi={Spacebar:" ",Right:sn,Left:ln,Up:Do,Down:Uo};function Yn(t){return t=Yt(t)?t:t.key,Gi[t]||t}var po="keydown";function qi(t,e,n){var o=gt(t),r=o.on,a=o.bind,i=o.unbind,c=t.root,l=e.Direction.resolve,p,s;function w(){y(),r(St,m),r(St,y),r(jt,d)}function y(){var b=n.keyboard;b&&(p=b==="global"?window:c,a(p,po,C))}function m(){i(p,po)}function u(b){s=b}function d(){var b=s;s=!0,xo(function(){s=b})}function C(b){if(!s){var f=Yn(b);f===l(ln)?t.go("<"):f===l(sn)&&t.go(">")}}return{mount:w,destroy:m,disable:u}}var _e=Bn+"-lazy",Xe=_e+"-srcset",Xi="["+_e+"], ["+Xe+"]";function Ki(t,e,n){var o=gt(t),r=o.on,a=o.off,i=o.bind,c=o.emit,l=n.lazyLoad==="sequential",p=[be,oe],s=[];function w(){n.lazyLoad&&(y(),r(yt,y))}function y(){zt(s),m(),l?b():(a(p),r(p,u),u())}function m(){e.Slides.forEach(function(f){Rn(f.slide,Xi).forEach(function($){var M=At($,_e),P=At($,Xe);if(M!==$.src||P!==$.srcset){var T=n.classes.spinner,h=$.parentElement,L=Oe(h,"."+T)||pe("span",T,h);s.push([$,f,L]),$.src||Ae($,"none")}})})}function u(){s=s.filter(function(f){var $=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(t.index,$)?d(f):!0}),s.length||a(p)}function d(f){var $=f[0];Rt(f[1].slide,Tn),i($,"load error",at(C,f)),Z($,"src",At($,_e)),Z($,"srcset",At($,Xe)),Bt($,_e),Bt($,Xe)}function C(f,$){var M=f[0],P=f[1];Nt(P.slide,Tn),$.type!=="error"&&(ee(f[2]),Ae(M,""),c(jn,M,P),c(he)),l&&b()}function b(){s.length&&d(s.shift())}return{mount:w,destroy:at(zt,s),check:u}}function Ji(t,e,n){var o=gt(t),r=o.on,a=o.emit,i=o.bind,c=e.Slides,l=e.Elements,p=e.Controller,s=p.hasFocus,w=p.getIndex,y=p.go,m=e.Direction.resolve,u=l.pagination,d=[],C,b;function f(){$(),r([St,yt,Qe],f);var W=n.pagination;u&&Ae(u,W?"":"none"),W&&(r([jt,on,oe],R),M(),R(),a(Wo,{list:C,items:d},L(t.index)))}function $(){C&&(ee(u?qt(C.children):C),Nt(C,b),zt(d),C=null),o.destroy()}function M(){var W=t.length,k=n.classes,B=n.i18n,O=n.perPage,U=s()?p.getEnd()+1:Ie(W/O);C=u||pe("ul",k.pagination,l.track.parentElement),Rt(C,b=dn+"--"+h()),Z(C,Wt,"tablist"),Z(C,wt,B.select),Z(C,Hn,h()===cn?"vertical":"");for(var D=0;D<U;D++){var g=pe("li",null,C),A=pe("button",{class:k.page,type:"button"},g),I=c.getIn(D).map(function(v){return v.slide.id}),_=!s()&&O>1?B.pageX:B.slideX;i(A,"click",at(P,D)),n.paginationKeyboard&&i(A,"keydown",at(T,D)),Z(g,Wt,"presentation"),Z(A,Wt,"tab"),Z(A,Ne,I.join(" ")),Z(A,wt,$n(_,D+1)),Z(A,de,-1),d.push({li:g,button:A,page:D})}}function P(W){y(">"+W,!0)}function T(W,k){var B=d.length,O=Yn(k),U=h(),D=-1;O===m(sn,!1,U)?D=++W%B:O===m(ln,!1,U)?D=(--W+B)%B:O==="Home"?D=0:O==="End"&&(D=B-1);var g=d[D];g&&(wo(g.button),y(">"+D),Ot(k,!0))}function h(){return n.paginationDirection||n.direction}function L(W){return d[p.toPage(W)]}function R(){var W=L(w(!0)),k=L(w());if(W){var B=W.button;Nt(B,ne),Bt(B,io),Z(B,de,-1)}if(k){var O=k.button;Rt(O,ne),Z(O,io,!0),Z(O,de,"")}a(zo,{list:C,items:d},W,k)}return{items:d,mount:f,destroy:$,getAt:L,update:R}}var Zi=[" ","Enter"];function Qi(t,e,n){var o=n.isNavigation,r=n.slideFocus,a=[];function i(){t.splides.forEach(function(u){u.isParent||(p(t,u.splide),p(u.splide,t))}),o&&s()}function c(){a.forEach(function(u){u.destroy()}),zt(a)}function l(){c(),i()}function p(u,d){var C=gt(u);C.on(jt,function(b,f,$){d.go(d.is(Se)?$:b)}),a.push(C)}function s(){var u=gt(t),d=u.on;d(On,y),d(Mo,m),d([Xt,St],w),a.push(u),u.emit(Nn,t.splides)}function w(){Z(e.Elements.list,Hn,n.direction===cn?"vertical":"")}function y(u){t.go(u.index)}function m(u,d){kn(Zi,Yn(d))&&(y(u),Ot(d))}return{setup:at(e.Media.set,{slideFocus:Re(r)?o:r},!0),mount:i,destroy:c,remount:l}}function ta(t,e,n){var o=gt(t),r=o.bind,a=0;function i(){n.wheel&&r(e.Elements.track,"wheel",c,ce)}function c(p){if(p.cancelable){var s=p.deltaY,w=s<0,y=xn(p),m=n.wheelMinThreshold||0,u=n.wheelSleep||0;xt(s)>m&&y-a>u&&(t.go(w?"<":">"),a=y),l(w)&&Ot(p)}}function l(p){return!n.releaseWheel||t.state.is(ve)||e.Controller.getAdjacent(p)!==-1}return{mount:i}}var ea=90;function na(t,e,n){var o=gt(t),r=o.on,a=e.Elements.track,i=n.live&&!n.isNavigation,c=pe("span",Si),l=rn(ea,at(s,!1));function p(){i&&(y(!e.Autoplay.isPaused()),Z(a,so,!0),c.textContent="…",r(Wn,at(y,!0)),r(zn,at(y,!1)),r([be,oe],at(s,!0)))}function s(m){Z(a,lo,m),m?(Ve(a,c),l.start()):(ee(c),l.cancel())}function w(){Bt(a,[ao,so,lo]),ee(c)}function y(m){i&&Z(a,ao,m?"off":"polite")}return{mount:p,disable:y,destroy:w}}var oa=Object.freeze({__proto__:null,Media:pi,Direction:di,Elements:Ti,Slides:Li,Layout:Ai,Clones:ki,Move:Fi,Controller:Ri,Arrows:Oi,Autoplay:Ni,Cover:Wi,Scroll:Ui,Drag:Yi,Keyboard:qi,LazyLoad:Ki,Pagination:Ji,Sync:Qi,Wheel:ta,Live:na}),ra={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"},ia={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:$i,i18n:ra,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function aa(t,e,n){var o=e.Slides;function r(){gt(t).on([Xt,yt],a)}function a(){o.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function i(c,l){o.style("transition","opacity "+n.speed+"ms "+n.easing),xo(l)}return{mount:r,start:i,cancel:Sn}}function la(t,e,n){var o=e.Move,r=e.Controller,a=e.Scroll,i=e.Elements.list,c=at(Lt,i,"transition"),l;function p(){gt(t).bind(i,"transitionend",function(m){m.target===i&&l&&(w(),l())})}function s(m,u){var d=o.toPosition(m,!0),C=o.getPosition(),b=y(m);xt(d-C)>=1&&b>=1?n.useScroll?a.scroll(d,b,!1,u):(c("transform "+b+"ms "+n.easing),o.translate(d,!0),l=u):(o.jump(m),u())}function w(){c(""),a.cancel()}function y(m){var u=n.rewindSpeed;if(t.is(ye)&&u){var d=r.getIndex(!0),C=r.getEnd();if(d===0&&m>=C||d>=C&&m===0)return u}return n.speed}return{mount:p,start:s,cancel:w}}var sa=(function(){function t(n,o){this.event=gt(),this.Components={},this.state=ci(ue),this.splides=[],this._o={},this._E={};var r=Yt(n)?Eo(document,n):n;$e(r,r+" is invalid."),this.root=r,o=Ut({label:At(r,wt)||"",labelledby:At(r,Mn)||""},ia,t.defaults,o||{});try{Ut(o,JSON.parse(At(r,Bn)))}catch{$e(!1,"Invalid JSON")}this._o=Object.create(Ut({},o))}var e=t.prototype;return e.mount=function(o,r){var a=this,i=this.state,c=this.Components;$e(i.is([ue,Ke]),"Already mounted!"),i.set(ue),this._C=c,this._T=r||this._T||(this.is(We)?aa:la),this._E=o||this._E;var l=Le({},oa,this._E,{Transition:this._T});return te(l,function(p,s){var w=p(a,c,a._o);c[s]=w,w.setup&&w.setup()}),te(c,function(p){p.mount&&p.mount()}),this.emit(Xt),Rt(this.root,xi),i.set(fe),this.emit(_n),this},e.sync=function(o){return this.splides.push({splide:o}),o.splides.push({splide:this,isParent:!0}),this.state.is(fe)&&(this._C.Sync.remount(),o.Components.Sync.remount()),this},e.go=function(o){return this._C.Controller.go(o),this},e.on=function(o,r){return this.event.on(o,r),this},e.off=function(o){return this.event.off(o),this},e.emit=function(o){var r;return(r=this.event).emit.apply(r,[o].concat(qt(arguments,1))),this},e.add=function(o,r){return this._C.Slides.add(o,r),this},e.remove=function(o){return this._C.Slides.remove(o),this},e.is=function(o){return this._o.type===o},e.refresh=function(){return this.emit(yt),this},e.destroy=function(o){o===void 0&&(o=!0);var r=this.event,a=this.state;return a.is(ue)?gt(this).on(_n,this.destroy.bind(this,o)):(te(this._C,function(i){i.destroy&&i.destroy(o)},!0),r.emit(Pn),r.destroy(),o&&zt(this.splides),a.set(Ke)),this},ri(t,[{key:"options",get:function(){return this._o},set:function(o){this._C.Media.set(o,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),t})(),Gn=sa;Gn.defaults={};Gn.STATES=ai;var go=[[Xt,"onMounted"],[_n,"onReady"],[jt,"onMove"],[be,"onMoved"],[On,"onClick"],[Io,"onActive"],[ko,"onInactive"],[Fo,"onVisible"],[Ro,"onHidden"],[yt,"onRefresh"],[St,"onUpdated"],[he,"onResize"],[nn,"onResized"],[Bo,"onDrag"],[Vo,"onDragging"],[Oo,"onDragged"],[on,"onScroll"],[oe,"onScrolled"],[Pn,"onDestroy"],[Po,"onArrowsMounted"],[No,"onArrowsUpdated"],[Wo,"onPaginationMounted"],[zo,"onPaginationUpdated"],[Nn,"onNavigationMounted"],[Wn,"onAutoplayPlay"],[jo,"onAutoplayPlaying"],[zn,"onAutoplayPause"],[jn,"onLazyLoadLoaded"]];function qn(...t){return t.filter(Boolean).join(" ")}function tn(t){return t!==null&&typeof t=="object"}function En(t,e){if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&!t.some((n,o)=>!En(n,e[o]));if(tn(t)&&tn(e)){const n=Object.keys(t),o=Object.keys(e);return n.length===o.length&&!n.some(r=>!Object.prototype.hasOwnProperty.call(e,r)||!En(t[r],e[r]))}return t===e}function ca(t,e){return t.length===e.length&&!t.some((n,o)=>n!==e[o])}function ua(t,e){if(t){const n=Object.keys(t);for(let o=0;o<n.length;o++){const r=n[o];if(r!=="__proto__"&&e(t[r],r)===!1)break}}return t}function Ln(t,e){const n=t;return ua(e,(o,r)=>{Array.isArray(o)?n[r]=o.slice():tn(o)?n[r]=Ln(tn(n[r])?n[r]:{},o):n[r]=o}),n}var pa=({children:t,className:e,...n})=>j.createElement("div",{className:qn("splide__track",e),...n},j.createElement("ul",{className:"splide__list"},t)),or=class extends j.Component{constructor(){super(...arguments),this.splideRef=j.createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:e,transition:n}=this.props,{current:o}=this.splideRef;o&&(this.splide=new Gn(o,t),this.bind(this.splide),this.splide.mount(e,n),this.options=Ln({},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&&!En(this.options,t)&&(this.splide.options=t,this.options=Ln({},t));const e=this.getSlides();ca(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){go.forEach(([e,n])=>{const o=this.props[n];typeof o=="function"&&t.on(e,(...r)=>{o(t,...r)})})}omit(t,e){return e.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:e="div",hasTrack:n=!0,children:o,...r}=this.props;return j.createElement(e,{className:qn("splide",t),ref:this.splideRef,...this.omit(r,["options",...go.map(a=>a[1])])},n?j.createElement(pa,null,o):o)}},rr=({children:t,className:e,...n})=>j.createElement("li",{className:qn("splide__slide",e),...n},t);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const ga="RichTextRenderer-module__link___BWeZ2",ma={link:ga},ar=({content:t})=>{const e=n=>n.map((o,r)=>o.type==="link"?x.jsx("a",{className:ma.link,href:o.value,target:o.target,children:e(o.children)},r):x.jsx("span",{style:fa(o),children:o.text},r));return x.jsx(x.Fragment,{children:t.map((n,o)=>{const r=n.children;return x.jsx("div",{children:e(r)},o)})})};function fa(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 ha="SvgImage-module__svg___q3xE-",ya="SvgImage-module__img___VsTm-",fo={svg:ha,img:ya},va=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},ba=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,de=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:o=""})=>{const[r,a]=j.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return j.useEffect(()=>{if(typeof window<"u"&&window.CSS){const i=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(i)}},[]),!va(t)||!r?x.jsx("img",{src:t,alt:"",className:dt(fo.img,o)}):x.jsx("span",{"data-supports-mask":r,className:dt(fo.svg,o),style:{"--svg":ba(t),"--fill":e,"--hover-fill":n}})},Sa={"top-left":Y.topLeftAlignment,"top-center":Y.topCenterAlignment,"top-right":Y.topRightAlignment,"middle-left":Y.middleLeftAlignment,"middle-center":Y.middleCenterAlignment,"middle-right":Y.middleRightAlignment,"bottom-left":Y.bottomLeftAlignment,"bottom-center":Y.bottomCenterAlignment,"bottom-right":Y.bottomRightAlignment};function xa({settings:t,content:e,styles:n,isEditor:o}){const[r,a]=j.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:s,textAlign:p,wordSpacing:l,fontSizeLineHeight:w,textAppearance:y,color:m}=n.imageCaption,[u,d]=j.useState(void 0),[C,b]=j.useState(null),[f,$]=j.useState(0),[M,P]=j.useState(0),{direction:T,transition:h,controls:L,pagination:R,imageCaption:W,triggers:k}=t,B=j.useRef(h.type),{x:O,y:U}=t.controls.offset,D=g=>{r&&r.go(g)};return j.useEffect(()=>{if(!C)return;const g=new ResizeObserver(A=>{if(!r)return;const[I]=A;d({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return g.observe(C),()=>g.unobserve(C)},[C]),j.useEffect(()=>{!r||B.current===h.type||(P(g=>g+1),B.current=h.type)},[h.type]),x.jsx("div",{className:dt(Y.wrapper,{[Y.editor]:o}),ref:b,children:x.jsxs("div",{className:Y.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:h.backgroundColor&&h.type==="fade in"?h.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&x.jsx("div",{className:dt(Y.captionBlock),children:x.jsx("div",{className:Y.captionTextWrapper,children:e.map((g,A)=>x.jsx("div",{className:dt(Y.captionText,Sa[W.alignment],{[Y.withPointerEvents]:A===f&&o,[Y.active]:A===f}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":F.scalingValue(i.width,o),letterSpacing:F.scalingValue(s,o),wordSpacing:F.scalingValue(l,o),textAlign:p,fontSize:F.scalingValue(w.fontSize,o),lineHeight:F.scalingValue(w.lineHeight,o),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:m,transitionDuration:h.duration?`${Math.round(parseInt(h.duration)/2)}ms`:"500ms"},children:x.jsx("div",{"data-styles":"imageCaption",className:Y.captionTextInner,style:{"--link-hover-color":W.linkHoverColor,"--link-color":W.linkColor,position:"relative",top:F.scalingValue(W.offset.y,o),left:F.scalingValue(W.offset.x,o)},children:x.jsx(ar,{content:g.imageCaption})})},A))})}),x.jsx(rr,{onMove:g=>{$(g.index)},ref:a,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:T==="horiz"||h.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:h.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((g,A)=>x.jsx(ir,{children:x.jsx("div",{className:Y.sliderItem,children:x.jsx("div",{className:Y.imgWrapper,children:x.jsx("img",{className:dt(Y.sliderImage,{[Y.contain]:g.image.objectFit==="contain",[Y.cover]:g.image.objectFit==="cover"}),src:g.image.url,alt:g.image.name??""})})})},A))},M),L.isActive&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:dt(Y.arrow,{[Y.arrowVertical]:T==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:x.jsxs("button",{onClick:()=>{D("-1")},className:Y.arrowInner,style:{transform:`translate(${F.scalingValue(O,o)}, ${F.scalingValue(U*(T==="horiz"?1:-1),o)}) scale(${t.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&x.jsx(de,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:dt(Y.arrowImg,Y.mirror)}),!L.arrowsImgUrl&&x.jsx(ho,{color:L.color,className:dt(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),x.jsx("div",{className:dt(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:T==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:x.jsxs("button",{className:Y.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${F.scalingValue(O*(T==="horiz"?-1:1),o)}, ${F.scalingValue(U,o)}) scale(${t.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&x.jsx(de,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Y.arrowImg}),!L.arrowsImgUrl&&x.jsx(ho,{color:L.color,className:dt(Y.arrowIcon,Y.arrowImg)})]})})]}),k.triggersList.click&&x.jsx("div",{className:Y.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&x.jsx("div",{className:dt(Y.pagination,{[Y.paginationInsideBottom]:R.position==="inside-1"&&T==="horiz",[Y.paginationInsideTop]:R.position==="inside-2"&&T==="horiz",[Y.paginationOutsideBottom]:R.position==="outside-1"&&T==="horiz",[Y.paginationOutsideTop]:R.position==="outside-2"&&T==="horiz",[Y.paginationInsideLeft]:R.position==="inside-1"&&T==="vert",[Y.paginationInsideRight]:R.position==="inside-2"&&T==="vert",[Y.paginationOutsideLeft]:R.position==="outside-1"&&T==="vert",[Y.paginationOutsideRight]:R.position==="outside-2"&&T==="vert",[Y.paginationVertical]:T==="vert"}),children:x.jsx("div",{className:Y.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${F.scalingValue(R.offset.x,o)}, ${F.scalingValue(R.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:e.map((g,A)=>x.jsx("button",{onClick:()=>{r&&r.go(A)},className:dt(Y.paginationItem),children:x.jsx("div",{className:dt(Y.dot,{[Y.activeDot]:A===f}),style:{backgroundColor:A===f?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},A))})})]})})}function ho({color:t,className:e}){return x.jsx("svg",{viewBox:"0 0 10 18",className:e,children:x.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:x.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 Ca={element:xa,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"]}},$a="ImageRevealSlider-module__imageRevealSlider___UE5Ob",_a="ImageRevealSlider-module__image___Qjt-e",wa="ImageRevealSlider-module__link___N-iLG",Ta="ImageRevealSlider-module__cursor___2U03d",ae={imageRevealSlider:$a,image:_a,link:wa,cursor:Ta};function yo(t,e,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,c=a/2,s=i/2;if(t>=o.x-c&&t<=o.x+c&&e>=o.y-s&&e<=o.y+s)return!0}return!1}function bn(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ea(t,e,n,o){let r,a;if(e==="custom"){r=n;const i=await bn(t);a=i.height/i.width*r}else if(e==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await bn(t);a=i.height/i.width*r}else{const i=await bn(t);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function La({settings:t,content:e,isEditor:n}){const[o,r]=j.useState(null),[a,i]=j.useState([]),[c,s]=j.useState(0),p=j.useRef(0),[l,w]=j.useState({x:0,y:0}),[y,m]=j.useState(1),[u,d]=j.useState("none"),C=j.useRef({x:0,y:0}),[b,f]=j.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:P}=t.imageSize,{revealPosition:T,visible:h}=t.position,{cursorType:L,target:R,defaultCursorScale:W,defaultCursor:k,hoverCursorScale:B,hoverCursor:O}=t.cursor;j.useEffect(()=>{if(!o)return;const g=(_,v)=>{const V=o.getBoundingClientRect(),X=_-V.left,rt=v-V.top;if(w({x:X,y:rt}),L==="system"){d("none"),m(1);return}const Q=X,ut=rt,E=document.elementFromPoint(V.left+Q,V.top+ut);if(E&&E.closest("a")){d("none"),m(1);return}const K=yo(Q,ut,a)||R==="area"?{img:O??"none",scale:B}:{img:k??"none",scale:W};d(K.img),m(K.scale)},A=_=>{_.stopPropagation(),C.current={x:_.clientX,y:_.clientY},g(_.clientX,_.clientY)},I=()=>{b&&g(C.current.x,C.current.y)};return o.addEventListener("mousemove",A),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",A),window.removeEventListener("scroll",I,!0)}},[o,b,l,L,R,O,k,B,W,a]),j.useEffect(()=>{b||(d("none"),m(0))},[b]);const U=async(g,A,I,_={})=>{const{width:v,height:V,finalWidth:X}=await Ea(g.image.url,$,M,P);let rt=0,Q=0;T==="same"?(rt=A/2,Q=I/2):(rt=_.x??Math.random()*A,Q=_.y??Math.random()*I);const ut=Math.min(Math.max(rt,v/2),A-v/2),E=Math.min(Math.max(Q,V/2),I-V/2);return{id:p.current++,url:g.image.url,link:g.link,name:g.image.name,x:ut,y:E,width:X}};j.useEffect(()=>{if(!o||e.length===0)return;const g=o.getBoundingClientRect(),A=g.width,I=g.height,_=[];(async()=>{const V=e[0],X=await U(V,A,I);_.push(X),i(_),s(1)})()},[$,M,P,T,o]),j.useEffect(()=>{h==="last One"&&i(g=>g.length>0?[g[g.length-1]]:[])},[h]);const D=async g=>{if(!o)return;const A=o.getBoundingClientRect(),I=g.clientX-A.left,_=g.clientY-A.top;if(R==="image"&&!yo(I,_,a))return;let v=0,V=0;T==="on Click"?(v=I,V=_):T==="same"?(v=A.width/2,V=A.height/2):(v=Math.random()*A.width,V=Math.random()*A.height);const X=e[c],rt=await U(X,A.width,A.height,{x:v,y:V});i(Q=>h==="all"?[...Q,rt]:[rt]),s(Q=>Q>=e.length-1?0:Q+1)};return x.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:ae.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(g=>x.jsx("div",{className:ae.wrapper,style:{top:`${g.y}px`,left:`${g.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:g.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:R==="area"&&g.link?x.jsx("a",{href:g.link,target:"_blank",className:ae.link,children:x.jsx("img",{src:g.url,alt:g.name,className:ae.image},g.id)}):x.jsx("img",{src:g.url,alt:g.name,className:ae.image},g.id)},g.id)),b&&x.jsx("div",{className:ae.cursor,style:{left:`${l.x}px`,top:`${l.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const Aa={element:La,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:""}]}}}},Ia="LightBox-module__hidden___9s-9x",ka="LightBox-module__heroImage___sTxNF",Fa="LightBox-module__background___rm9ml",Ra="LightBox-module__editor___4ACaY",Ba="LightBox-module__contentStyle___Bgnsq",Va="LightBox-module__imageStyle___tLIlB",Oa="LightBox-module__imgWrapper___LuFUp",Pa="LightBox-module__contain___8-yaS",Na="LightBox-module__cover___hNvOG",Wa="LightBox-module__caption___b6L2I",za="LightBox-module__captionTextInner___rCGNH",ja="LightBox-module__lightboxSplide___XFuWC",Ma="LightBox-module__arrow___iz38X",Ha="LightBox-module__arrowVertical___Zfz81",Da="LightBox-module__nextArrow___zkAQN",Ua="LightBox-module__arrowInner___p48sW",Ya="LightBox-module__arrowIcon___3VaFf",Ga="LightBox-module__arrowImg___pNV88",qa="LightBox-module__mirror___pjeXc",Xa="LightBox-module__thumbsWrapper___GB-nU",Ka="LightBox-module__thumbsContainerVertical___wttk5",Ja="LightBox-module__thumbsContainer___osSma",Za="LightBox-module__thumbsAlignStart___MO6tY",Qa="LightBox-module__thumbsAlignCenter___Q4sUx",ts="LightBox-module__thumbsAlignEnd___p4y9R",es="LightBox-module__thumbItem___HvnF3",ns="LightBox-module__closeButton___g2khP",os="LightBox-module__fadeIn___0m5GW",rs="LightBox-module__slideInLeft___gPYwC",is="LightBox-module__slideInRight___S-pPp",as="LightBox-module__slideInTop___DFdAj",ss="LightBox-module__slideInBottom___m27kZ",ls="LightBox-module__fadeOut___55qBR",cs="LightBox-module__slideOutLeft___NvU7P",us="LightBox-module__slideOutRight___SK7eC",ps="LightBox-module__slideOutTop___Vgg0z",ds="LightBox-module__slideOutBottom___nJ0Ef",gs="LightBox-module__scaleSlide___vZriG",N={hidden:Ia,heroImage:ka,background:Fa,editor:Ra,contentStyle:Ba,imageStyle:Va,imgWrapper:Oa,contain:Pa,cover:Na,caption:Wa,captionTextInner:za,lightboxSplide:ja,arrow:Ma,arrowVertical:Ha,nextArrow:Da,arrowInner:Ua,arrowIcon:Ya,arrowImg:Ga,mirror:qa,thumbsWrapper:Xa,thumbsContainerVertical:Ka,thumbsContainer:Ja,thumbsAlignStart:Za,thumbsAlignCenter:Qa,thumbsAlignEnd:ts,thumbItem:es,closeButton:ns,fadeIn:os,slideInLeft:rs,slideInRight:is,slideInTop:as,slideInBottom:ss,fadeOut:ls,slideOutLeft:cs,slideOutRight:us,slideOutTop:ps,slideOutBottom:ds,scaleSlide:gs},Me=(t,e,n)=>{const o={},[r,a]=t.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${F.scalingValue(e.x,n)}), calc(-50% + ${F.scalingValue(e.y,n)}))`:r==="middle"?o.transform=`translate(${F.scalingValue(e.x,n)}, calc(-50% + ${F.scalingValue(e.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${F.scalingValue(e.x,n)}), ${F.scalingValue(e.y,n)})`:o.transform=`translate(${F.scalingValue(e.x,n)}, ${F.scalingValue(e.y,n)})`,o};function sr(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 vo(t){const e=t.getBoundingClientRect(),n=sr(t),o=Math.max(0,e.width-n.left-n.right),r=Math.max(0,e.height-n.top-n.bottom),a=t.naturalWidth,i=t.naturalHeight,c=o/r,s=a/i;let p,l;s>c?(p=o,l=o/s):(l=r,p=r*s);const w=e.left+n.left,y=e.top+n.top,m=(o-p)/2+w,u=(r-l)/2+y;return{x:m,y:u,width:p,height:l}}function bo(t){const e=t.getBoundingClientRect(),n=sr(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function So(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const o=e[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function ms(t,e){const n=(()=>{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})(),o=(()=>{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})(),r=(()=>{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:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const fs=({settings:t,content:e,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=j.useState(!1),{url:s}=t.thumbnailBlock.cover;return j.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),x.jsxs(x.Fragment,{children:[x.jsx("img",{src:s,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),x.jsx(hs,{isOpen:i,onClose:()=>c(!1),content:e,settings:t,lightboxStyles:n,portalId:o,isEditor:a})]})},hs=({isOpen:t,onClose:e,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var z;const[s,p]=j.useState(0),[l,w]=j.useState(0),[y,m]=j.useState(!1),[u,d]=j.useState(!1),[C,b]=j.useState({}),f=j.useRef(null),$=j.useRef(null),M=j.useRef(null),P=j.useRef(!1),T=j.useRef(null),h=j.useRef(null),L=j.useRef(null),R=j.useRef(null),W=j.useRef(!1),k=j.useRef(null),[B,O]=j.useState(!1),{appear:U,triggers:D,slider:g,thumbnail:A,controls:I,area:_,caption:v,layout:V}=r.lightboxBlock,{appearClass:X,backdropAppearClass:rt,backdropDisappearClass:Q,disappearClass:ut}=ms(U.type,U.direction),E=(c==null?void 0:c.itemId)??null;j.useEffect(()=>{const S=()=>{setTimeout(()=>{var G,J;(J=(G=f.current)==null?void 0:G.splide)==null||J.refresh()},16)},H=()=>{w(G=>G+1)};return window.addEventListener("ArticleEditor.Layout:change",S),window.addEventListener("ArticleEditor.ComponentContent:change",H),()=>{window.removeEventListener("ArticleEditor.Layout:change",S),window.removeEventListener("ArticleEditor.ComponentContent:change",H)}},[]),j.useEffect(()=>{if(!t||!A.isActive){O(!1);return}const S=k.current;if(!S)return;const H=()=>{g.direction==="horiz"?O(S.scrollWidth>S.clientWidth):O(S.scrollHeight>S.clientHeight)};H();const G=new ResizeObserver(H);return G.observe(S),()=>G.disconnect()},[t,A.isActive,n.length,C,g.direction]);const K=j.useCallback(()=>{const S=window.matchMedia("(max-width: 768px)").matches,H=So(_.color);S&&!i&&H>.9&&(document.body.style.backgroundColor=""),m(!0),P.current=!0;const G=J=>{J.target===T.current&&J.animationName&&(T.current&&h.current&&T.current.removeEventListener("animationend",h.current),h.current=null,P.current&&(P.current=!1,e()),m(!1))};T.current&&(h.current=G,T.current.addEventListener("animationend",G))},[e,_.color,i]),ft=(S,H,G)=>{var J,ot;if(S){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&s===n.length-1?K():(J=f.current)==null||J.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const tt=S.getBoundingClientRect(),q=H-tt.left,nt=G-tt.top,vt=tt.width,st=tt.height;let pt;g.direction==="horiz"?pt=q<vt/2?"-1":"+1":pt=nt<st/2?"-1":"+1",(ot=f.current)==null||ot.go(pt)}}},it=S=>{if(W.current){W.current=!1;return}const H=n[s],G=(H==null?void 0:H.image.objectFit)==="cover";let J,ot;if("changedTouches"in S&&S.changedTouches.length>0)J=S.changedTouches[0].clientX,ot=S.changedTouches[0].clientY;else if("clientX"in S)J=S.clientX,ot=S.clientY;else return;let tt;if(G&&M.current){const q=bo(M.current);tt=J>=q.left&&J<=q.right&&ot>=q.top&&ot<=q.bottom}else{const q=M.current?vo(M.current):null;if(!q){S.target===S.currentTarget&&K();return}tt=J>=q.x&&J<=q.x+q.width&&ot>=q.y&&ot<=q.y+q.height}tt?ft(M.current,J,ot):K()},mt=S=>{const H=S.target;(H.classList.contains(N.thumbsWrapper)||H.classList.contains(N.thumbsContainer))&&it(S)};j.useEffect(()=>{if(!t)return;const S=H=>{var G,J;if(H.key==="Escape"){K();return}if(H.key==="ArrowRight"){p(ot=>(ot+1)%Math.max(n.length,1)),(G=f.current)==null||G.go("+1");return}H.key==="ArrowLeft"&&(p(ot=>(ot-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",S),()=>{window.removeEventListener("keydown",S)}},[t,K,n.length]),j.useEffect(()=>{if(t){if(p(0),w(H=>H+1),P.current=!1,m(!1),d(!1),b({}),!E)return;const S=new CustomEvent("page-overlay",{detail:{itemId:E}});window.dispatchEvent(S)}return()=>{T.current&&h.current&&(T.current.removeEventListener("animationend",h.current),h.current=null),d(!1)}},[t,E]),j.useEffect(()=>{$.current!==null&&$.current!==g.type&&w(S=>S+1),$.current=g.type},[g.type]),j.useEffect(()=>{if(!t)return;const S=document.body.style.overflow,H=window.matchMedia("(max-width: 768px)").matches,G=So(_.color);document.body.style.overflow="hidden",d(!1);const J=tt=>{tt.target===T.current&&!P.current&&tt.animationName&&(H&&!i&&G>.9&&(document.body.style.backgroundColor=_.color),d(!0),T.current&&L.current&&T.current.removeEventListener("animationend",L.current),L.current=null)};T.current&&(L.current=J,T.current.addEventListener("animationend",J));const ot=tt=>{const q=tt.target;q&&(q.closest(`.${N.thumbsWrapper}`)||q.closest(`.${N.thumbsContainer}`))||g.type!=="slide"&&tt.preventDefault()};return document.addEventListener("touchmove",ot,{passive:!1}),()=>{document.body.style.overflow=S,document.removeEventListener("touchmove",ot),T.current&&L.current&&(T.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[t,i,_.color,g.type]),j.useEffect(()=>{if(!t)return;const S=H=>{var J,ot;if(P.current){H.stopPropagation();return}if(W.current){W.current=!1;return}const G=H.target;if(!(G&&(G.closest(`.${N.thumbsContainer}`)||G.closest(`.${N.thumbItem}`)))){if(g.type==="slide"&&D.type==="drag"&&((ot=(J=f.current)==null?void 0:J.splide)!=null&&ot.root)){const tt=f.current.splide.root;if(G&&(tt.contains(G)||tt===G))return}if(H.touches.length===0&&H.changedTouches.length>0){const tt=n[s],q=(tt==null?void 0:tt.image.objectFit)==="cover",nt=H.changedTouches[0];let vt;if(q&&M.current){const st=bo(M.current);vt=nt.clientX>=st.left&&nt.clientX<=st.right&&nt.clientY>=st.top&&nt.clientY<=st.bottom}else{const st=M.current?vo(M.current):null;if(!st)return;vt=nt.clientX>=st.x&&nt.clientX<=st.x+st.width&&nt.clientY>=st.y&&nt.clientY<=st.y+st.height}if(!vt){H.stopPropagation(),P.current=!0;const st=pt=>{pt.stopPropagation(),pt.preventDefault(),document.removeEventListener("click",st,!0)};document.addEventListener("click",st,!0),K()}}}};return document.addEventListener("touchend",S,{passive:!0}),()=>{document.removeEventListener("touchend",S)}},[t,K,s,n]);const bt=(g.type==="scale"||g.type==="fade")&&g.direction==="vert"&&D.type==="drag";j.useEffect(()=>{var pt,kt;if(!t||!bt||!((kt=(pt=f.current)==null?void 0:pt.splide)!=null&&kt.root))return;const S=f.current.splide.root,H=30,G=(et,lt)=>{if(R.current){const Ct=Math.abs(et-R.current.x),Ht=Math.abs(lt-R.current.y);(Ct>0||Ht>0)&&(W.current=!0)}},J=et=>{R.current&&(et.preventDefault(),G(et.clientX,et.clientY))},ot=et=>{R.current&&et.touches.length>0&&(et.preventDefault(),G(et.touches[0].clientX,et.touches[0].clientY))},tt=(et,lt)=>{if(!R.current||!f.current){R.current=null;return}const Ct=Math.abs(et-R.current.x),Ht=Math.abs(lt-R.current.y);Ht>H&&Ht>Ct&&f.current.go(lt<R.current.y?"+1":"-1"),R.current=null},q=et=>{R.current&&tt(et.clientX,et.clientY),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("pointermove",J)},nt=et=>{if(R.current){if(et.changedTouches.length>0){const lt=et.changedTouches[0];tt(lt.clientX,lt.clientY)}document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),document.removeEventListener("touchmove",ot)}},vt=et=>{R.current={x:et.clientX,y:et.clientY},W.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",q),document.addEventListener("pointercancel",q)},st=et=>{et.touches.length>0&&(R.current={x:et.touches[0].clientX,y:et.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",nt),document.addEventListener("touchcancel",nt))};return S.addEventListener("pointerdown",vt),S.addEventListener("touchstart",st),()=>{S.removeEventListener("pointerdown",vt),S.removeEventListener("touchstart",st),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),R.current=null,W.current=!1}},[t,bt,l]);const Mt={backgroundColor:_.color,backdropFilter:`blur(${_.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:gr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:i?null:T,className:dt(N.background,y?Q:rt,{[N.editor]:i},{[N.hidden]:!t}),style:{...Mt,...u&&!i&&!y?{position:"absolute"}:{}}}),x.jsxs("div",{ref:i?T:null,className:dt(N.contentStyle,y?ut:X,{[N.editor]:i},{[N.hidden]:!t}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[x.jsx(rr,{onMove:S=>p(S.index),ref:f,className:N.lightboxSplide,options:{arrows:!1,speed:g.duration?parseInt(g.duration):500,direction:g.direction==="horiz"||g.type==="fade"||g.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!bt,perPage:1,width:"100%",height:"100%",type:g.type==="fade"||g.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":g.duration},children:n.map((S,H)=>{const G=Me(V.position,V.offset,i),J=`${F.scalingValue(V.padding.top,i)} ${F.scalingValue(V.padding.right,i)} ${F.scalingValue(V.padding.bottom,i)} ${F.scalingValue(V.padding.left,i)}`,ot=g.type==="scale"?(()=>{const{transform:tt,...q}=G;return{...q,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":tt||"none"}})():{...G,position:"absolute",padding:J,boxSizing:"border-box"};return x.jsx(ir,{children:x.jsx("div",{className:N.imgWrapper,onClick:it,children:x.jsx("img",{ref:H===s?M:null,className:dt(N.imageStyle,{[N.contain]:S.image.objectFit==="contain",[N.cover]:S.image.objectFit==="cover",[N.scaleSlide]:g.type==="scale"}),src:S.image.url,alt:S.image.name??"",style:{...ot,pointerEvents:S.image.objectFit==="contain"?"none":"auto"}})})},H)})},l),I.isActive&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:dt(N.arrow,{[N.arrowVertical]:g.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:x.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${F.scalingValue(I.offset.x,i)}, ${F.scalingValue(I.offset.y*(g.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=f.current)==null?void 0:S.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&x.jsx(de,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:dt(N.arrowImg,N.mirror)}),!I.arrowsImgUrl&&x.jsx(xo,{color:I.color,className:dt(N.arrowIcon,N.arrowImg,N.mirror)})]})}),x.jsx("div",{className:dt(N.arrow,N.nextArrow,{[N.arrowVertical]:g.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:x.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${F.scalingValue(I.offset.x*(g.direction==="horiz"?-1:1),i)}, ${F.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=f.current)==null?void 0:S.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&x.jsx(de,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:N.arrowImg}),!I.arrowsImgUrl&&x.jsx(xo,{color:I.color,className:dt(N.arrowIcon,N.arrowImg)})]})})]}),_.closeIconUrl&&(()=>{const S=Me(_.closeIconAlign,_.closeIconOffset,i),H=`scale(${_.closeIconScale})`,G=S.transform?`${S.transform} ${H}`:H;return x.jsx("button",{className:N.closeButton,style:{...S,transform:G},onClick:K,"aria-label":"Close lightbox",children:x.jsx(de,{url:_.closeIconUrl,fill:_.closeIconColor??"#000000",hoverFill:_.closeIconHover??"#cccccc"})})})(),v&&v.isActive&&o.imageCaption&&((z=n[s])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:S,fontSettings:H,letterSpacing:G,textAlign:J,wordSpacing:ot,fontSizeLineHeight:tt,textAppearance:q,color:nt}=o.imageCaption;return x.jsx("div",{className:N.caption,style:{...Me(v.alignment,v.offset,i),fontFamily:H.fontFamily,fontWeight:H.fontWeight,fontStyle:H.fontStyle,width:S.sizing==="auto"?"max-content":F.scalingValue(S.width,i),letterSpacing:F.scalingValue(G,i),wordSpacing:F.scalingValue(ot,i),textAlign:J,fontSize:F.scalingValue(tt.fontSize,i),lineHeight:F.scalingValue(tt.lineHeight,i),textTransform:q.textTransform??"none",textDecoration:q.textDecoration??"none",fontVariant:q.fontVariant??"normal",color:nt},onClick:vt=>vt.stopPropagation(),children:x.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":v.linkColor,"--link-hover-color":v.linkHoverColor},children:x.jsx(ar,{content:n[s].imageCaption})})})})(),A.isActive&&(()=>{const[S,H]=A.position.split("-"),G=g.direction==="horiz"?`${S}-left`:A.position,J=Me(G,A.offset,i),ot=()=>{if(g.direction==="horiz"){if(H==="left")return"flex-start";if(H==="center")return"center";if(H==="right")return"flex-end"}else{if(S==="top")return"flex-start";if(S==="middle")return"center";if(S==="bottom")return"flex-end"}return"flex-start"};return x.jsx("div",{ref:k,className:N.thumbsWrapper,onClick:tt=>mt(tt),style:{position:i?"absolute":"fixed",...J,...g.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:x.jsx("div",{className:dt(N.thumbsContainer,{[N.thumbsContainerVertical]:g.direction==="vert",[N.thumbsAlignStart]:A.align==="start",[N.thumbsAlignCenter]:A.align==="center",[N.thumbsAlignEnd]:A.align==="end"}),style:{gap:F.scalingValue(A.grid.gap,i),justifyContent:B?"flex-start":ot()},children:n.map((tt,q)=>{const nt=q===s,vt=C[q],pt=A.grid.size*(nt?A.activeState.scale:1),kt=()=>{if(A.fit!=="fit")return{};if(!vt)return g.direction==="horiz"?{height:F.scalingValue(pt,i)}:{width:F.scalingValue(pt,i)};const et=vt.width/vt.height;if(g.direction==="horiz"){const lt=pt,Ct=lt*et;return{width:F.scalingValue(Ct,i),height:F.scalingValue(lt,i)}}else{const lt=pt,Ct=lt/et;return{width:F.scalingValue(lt,i),height:F.scalingValue(Ct,i)}}};return x.jsx("button",{className:N.thumbItem,style:{...g.direction==="horiz"&&A.fit!=="fit"?{height:F.scalingValue(pt,i)}:{},...g.direction==="vert"&&A.fit!=="fit"?{width:F.scalingValue(pt,i)}:{},...A.fit==="cover"?{width:F.scalingValue(pt,i),height:F.scalingValue(pt,i)}:{},...kt(),transition:nt?"all 0.25s ease-out":"none",opacity:nt?A.activeState.opacity/100:A.opacity/100,"--thumb-hover":A.activeState.opacity/100},onClick:et=>{var lt;et.stopPropagation(),p(q),(lt=f.current)==null||lt.go(q)},onMouseEnter:()=>{var et;A.triggers==="hov"&&((et=f.current)==null||et.go(q))},children:x.jsx("img",{src:tt.image.url,alt:tt.image.name??"",onLoad:et=>{const lt=et.currentTarget;lt.naturalWidth&&lt.naturalHeight&&b(Ct=>({...Ct,[q]:{width:lt.naturalWidth,height:lt.naturalHeight}}))},style:{objectFit:A.fit==="cover"?"cover":"contain",...A.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...A.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${tt.image.name}-${q}`)})})})})()]})]}),document.getElementById(a))};function xo({color:t,className:e}){return x.jsx("svg",{viewBox:"0 0 10 18",className:e,children:x.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:x.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 ys={element:fs,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 Zt(t,e){var n,o,r;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:F.scalingValue(t.letterSpacing,e),wordSpacing:F.scalingValue(t.wordSpacing,e),fontSize:F.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?F.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=t.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=t.textAppearance)==null?void 0:r.fontVariant,color:t.color}}function He(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function vs(t){return`
6
+ */const da="RichTextRenderer-module__link___BWeZ2",ga={link:da},ir=({content:t})=>{const e=n=>n.map((o,r)=>o.type==="link"?x.jsx("a",{className:ga.link,href:o.value,target:o.target,children:e(o.children)},r):x.jsx("span",{style:ma(o),children:o.text},r));return x.jsx(x.Fragment,{children:t.map((n,o)=>{const r=n.children;return x.jsx("div",{children:e(r)},o)})})};function ma(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 fa="SvgImage-module__svg___q3xE-",ha="SvgImage-module__img___VsTm-",mo={svg:fa,img:ha},ya=t=>{const e=t.trim();return e.startsWith("data:image/svg+xml")?!0:(e.split(/[?#]/)[0]??e).endsWith(".svg")},va=t=>`url("${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,ge=({url:t,fill:e="#000000",hoverFill:n="#CCCCCC",className:o=""})=>{const[r,a]=j.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return j.useEffect(()=>{if(typeof window<"u"&&window.CSS){const i=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(i)}},[]),!ya(t)||!r?x.jsx("img",{src:t,alt:"",className:dt(mo.img,o)}):x.jsx("span",{"data-supports-mask":r,className:dt(mo.svg,o),style:{"--svg":va(t),"--fill":e,"--hover-fill":n}})},ba={"top-left":Y.topLeftAlignment,"top-center":Y.topCenterAlignment,"top-right":Y.topRightAlignment,"middle-left":Y.middleLeftAlignment,"middle-center":Y.middleCenterAlignment,"middle-right":Y.middleRightAlignment,"bottom-left":Y.bottomLeftAlignment,"bottom-center":Y.bottomCenterAlignment,"bottom-right":Y.bottomRightAlignment};function Sa({settings:t,content:e,styles:n,isEditor:o}){const[r,a]=j.useState(null),{widthSettings:i,fontSettings:c,letterSpacing:l,textAlign:p,wordSpacing:s,fontSizeLineHeight:w,textAppearance:y,color:m}=n.imageCaption,[u,d]=j.useState(void 0),[C,b]=j.useState(null),[f,$]=j.useState(0),[M,P]=j.useState(0),{direction:T,transition:h,controls:L,pagination:R,imageCaption:W,triggers:k}=t,B=j.useRef(h.type),{x:O,y:U}=t.controls.offset,D=g=>{r&&r.go(g)};return j.useEffect(()=>{if(!C)return;const g=new ResizeObserver(A=>{if(!r)return;const[I]=A;d({width:Math.round(I.contentRect.width),height:Math.round(I.contentRect.height)})});return g.observe(C),()=>g.unobserve(C)},[C]),j.useEffect(()=>{!r||B.current===h.type||(P(g=>g+1),B.current=h.type)},[h.type]),x.jsx("div",{className:dt(Y.wrapper,{[Y.editor]:o}),ref:b,children:x.jsxs("div",{className:Y.sliderInner,style:{width:u?u.width:"100%",height:u?u.height:"100%",backgroundColor:h.backgroundColor&&h.type==="fade in"?h.backgroundColor:"transparent"},children:[t.imageCaption.isActive&&x.jsx("div",{className:dt(Y.captionBlock),children:x.jsx("div",{className:Y.captionTextWrapper,children:e.map((g,A)=>x.jsx("div",{className:dt(Y.captionText,ba[W.alignment],{[Y.withPointerEvents]:A===f&&o,[Y.active]:A===f}),style:{fontFamily:c.fontFamily,fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:i.sizing==="auto"?"max-content":F.scalingValue(i.width,o),letterSpacing:F.scalingValue(l,o),wordSpacing:F.scalingValue(s,o),textAlign:p,fontSize:F.scalingValue(w.fontSize,o),lineHeight:F.scalingValue(w.lineHeight,o),textTransform:y.textTransform??"none",textDecoration:y.textDecoration??"none",fontVariant:y.fontVariant??"normal",color:m,transitionDuration:h.duration?`${Math.round(parseInt(h.duration)/2)}ms`:"500ms"},children:x.jsx("div",{"data-styles":"imageCaption",className:Y.captionTextInner,style:{"--link-hover-color":W.linkHoverColor,"--link-color":W.linkColor,position:"relative",top:F.scalingValue(W.offset.y,o),left:F.scalingValue(W.offset.x,o)},children:x.jsx(ir,{content:g.imageCaption})})},A))})}),x.jsx(or,{onMove:g=>{$(g.index)},ref:a,options:{arrows:!1,speed:h.duration?parseInt(h.duration):500,autoplay:k.autoPlay!==null,...k.autoPlay!==null&&{interval:parseInt(k.autoPlay)*1e3},direction:T==="horiz"||h.type==="fade in"?"ltr":"ttb",pagination:!1,drag:k.triggersList.drag,perPage:1,width:u?u.width:"100%",height:u?u.height:"100%",type:h.type==="fade in"?"fade":"loop",rewind:!0},children:e.map((g,A)=>x.jsx(rr,{children:x.jsx("div",{className:Y.sliderItem,children:x.jsx("div",{className:Y.imgWrapper,children:x.jsx("img",{className:dt(Y.sliderImage,{[Y.contain]:g.image.objectFit==="contain",[Y.cover]:g.image.objectFit==="cover"}),src:g.image.url,alt:g.image.name??""})})})},A))},M),L.isActive&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:dt(Y.arrow,{[Y.arrowVertical]:T==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:x.jsxs("button",{onClick:()=>{D("-1")},className:Y.arrowInner,style:{transform:`translate(${F.scalingValue(O,o)}, ${F.scalingValue(U*(T==="horiz"?1:-1),o)}) scale(${t.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&x.jsx(ge,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:dt(Y.arrowImg,Y.mirror)}),!L.arrowsImgUrl&&x.jsx(fo,{color:L.color,className:dt(Y.arrowIcon,Y.arrowImg,Y.mirror)})]})}),x.jsx("div",{className:dt(Y.arrow,Y.nextArrow,{[Y.arrowVertical]:T==="vert",[Y.hoverArrow]:L.show==="on hover"}),style:{color:L.color,"--arrow-hover-color":L.hover},children:x.jsxs("button",{className:Y.arrowInner,onClick:()=>D("+1"),style:{transform:`translate(${F.scalingValue(O*(T==="horiz"?-1:1),o)}, ${F.scalingValue(U,o)}) scale(${t.controls.scale/100}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:[L.arrowsImgUrl&&x.jsx(ge,{url:L.arrowsImgUrl,fill:L.color,hoverFill:L.hover,className:Y.arrowImg}),!L.arrowsImgUrl&&x.jsx(fo,{color:L.color,className:dt(Y.arrowIcon,Y.arrowImg)})]})})]}),k.triggersList.click&&x.jsx("div",{className:Y.clickOverlay,onClick:()=>{r&&r.go("+1")}}),R.isActive&&x.jsx("div",{className:dt(Y.pagination,{[Y.paginationInsideBottom]:R.position==="inside-1"&&T==="horiz",[Y.paginationInsideTop]:R.position==="inside-2"&&T==="horiz",[Y.paginationOutsideBottom]:R.position==="outside-1"&&T==="horiz",[Y.paginationOutsideTop]:R.position==="outside-2"&&T==="horiz",[Y.paginationInsideLeft]:R.position==="inside-1"&&T==="vert",[Y.paginationInsideRight]:R.position==="inside-2"&&T==="vert",[Y.paginationOutsideLeft]:R.position==="outside-1"&&T==="vert",[Y.paginationOutsideRight]:R.position==="outside-2"&&T==="vert",[Y.paginationVertical]:T==="vert"}),children:x.jsx("div",{className:Y.paginationInner,style:{backgroundColor:R.colors[2],transform:`scale(${R.scale/100}) translate(${F.scalingValue(R.offset.x,o)}, ${F.scalingValue(R.offset.y,o)}) rotate(${T==="horiz"?"0deg":"90deg"})`},children:e.map((g,A)=>x.jsx("button",{onClick:()=>{r&&r.go(A)},className:dt(Y.paginationItem),children:x.jsx("div",{className:dt(Y.dot,{[Y.activeDot]:A===f}),style:{backgroundColor:A===f?R.colors[0]:R.colors[1],"--pagination-hover-color":R.hover}})},A))})})]})})}function fo({color:t,className:e}){return x.jsx("svg",{viewBox:"0 0 10 18",className:e,children:x.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:x.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 xa={element:Sa,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"]}},Ca="ImageRevealSlider-module__imageRevealSlider___UE5Ob",$a="ImageRevealSlider-module__image___Qjt-e",_a="ImageRevealSlider-module__link___N-iLG",wa="ImageRevealSlider-module__cursor___2U03d",le={imageRevealSlider:Ca,image:$a,link:_a,cursor:wa};function ho(t,e,n){for(const o of n){const r=new Image;r.src=o.url;const a=o.width?Number.parseFloat(o.width):r.naturalWidth,i=r.naturalHeight/r.naturalWidth*a,c=a/2,l=i/2;if(t>=o.x-c&&t<=o.x+c&&e>=o.y-l&&e<=o.y+l)return!0}return!1}function vn(t){return new Promise(e=>{const n=new Image;n.src=t,n.onload=()=>{e({width:n.naturalWidth,height:n.naturalHeight})}})}async function Ta(t,e,n,o){let r,a;if(e==="custom"){r=n;const i=await vn(t);a=i.height/i.width*r}else if(e==="random"){r=Math.random()*(o.max-o.min)+o.min;const i=await vn(t);a=i.height/i.width*r}else{const i=await vn(t);r=i.width,a=i.height}return{width:r,height:a,finalWidth:`${r}px`}}function Ea({settings:t,content:e,isEditor:n}){const[o,r]=j.useState(null),[a,i]=j.useState([]),[c,l]=j.useState(0),p=j.useRef(0),[s,w]=j.useState({x:0,y:0}),[y,m]=j.useState(1),[u,d]=j.useState("none"),C=j.useRef({x:0,y:0}),[b,f]=j.useState(!1),{sizeType:$,imageWidth:M,randomRangeImageWidth:P}=t.imageSize,{revealPosition:T,visible:h}=t.position,{cursorType:L,target:R,defaultCursorScale:W,defaultCursor:k,hoverCursorScale:B,hoverCursor:O}=t.cursor;j.useEffect(()=>{if(!o)return;const g=(_,v)=>{const V=o.getBoundingClientRect(),X=_-V.left,rt=v-V.top;if(w({x:X,y:rt}),L==="system"){d("none"),m(1);return}const Q=X,ut=rt,E=document.elementFromPoint(V.left+Q,V.top+ut);if(E&&E.closest("a")){d("none"),m(1);return}const K=ho(Q,ut,a)||R==="area"?{img:O??"none",scale:B}:{img:k??"none",scale:W};d(K.img),m(K.scale)},A=_=>{_.stopPropagation(),C.current={x:_.clientX,y:_.clientY},g(_.clientX,_.clientY)},I=()=>{b&&g(C.current.x,C.current.y)};return o.addEventListener("mousemove",A),window.addEventListener("scroll",I,!0),()=>{o.removeEventListener("mousemove",A),window.removeEventListener("scroll",I,!0)}},[o,b,s,L,R,O,k,B,W,a]),j.useEffect(()=>{b||(d("none"),m(0))},[b]);const U=async(g,A,I,_={})=>{const{width:v,height:V,finalWidth:X}=await Ta(g.image.url,$,M,P);let rt=0,Q=0;T==="same"?(rt=A/2,Q=I/2):(rt=_.x??Math.random()*A,Q=_.y??Math.random()*I);const ut=Math.min(Math.max(rt,v/2),A-v/2),E=Math.min(Math.max(Q,V/2),I-V/2);return{id:p.current++,url:g.image.url,link:g.link,name:g.image.name,x:ut,y:E,width:X}};j.useEffect(()=>{if(!o||e.length===0)return;const g=o.getBoundingClientRect(),A=g.width,I=g.height,_=[];(async()=>{const V=e[0],X=await U(V,A,I);_.push(X),i(_),l(1)})()},[$,M,P,T,o]),j.useEffect(()=>{h==="last One"&&i(g=>g.length>0?[g[g.length-1]]:[])},[h]);const D=async g=>{if(!o)return;const A=o.getBoundingClientRect(),I=g.clientX-A.left,_=g.clientY-A.top;if(R==="image"&&!ho(I,_,a))return;let v=0,V=0;T==="on Click"?(v=I,V=_):T==="same"?(v=A.width/2,V=A.height/2):(v=Math.random()*A.width,V=Math.random()*A.height);const X=e[c],rt=await U(X,A.width,A.height,{x:v,y:V});i(Q=>h==="all"?[...Q,rt]:[rt]),l(Q=>Q>=e.length-1?0:Q+1)};return x.jsxs("div",{ref:r,onClick:D,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:le.imageRevealSlider,style:{cursor:u==="none"?"default":"none"},children:[a.map(g=>x.jsx("div",{className:le.wrapper,style:{top:`${g.y}px`,left:`${g.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:g.width??"auto",height:"auto",cursor:u==="none"?"default":"none"},children:R==="area"&&g.link?x.jsx("a",{href:g.link,target:"_blank",className:le.link,children:x.jsx("img",{src:g.url,alt:g.name,className:le.image},g.id)}):x.jsx("img",{src:g.url,alt:g.name,className:le.image},g.id)},g.id)),b&&x.jsx("div",{className:le.cursor,style:{left:`${s.x}px`,top:`${s.y}px`,transform:`translate(-50%, -50%) scale(${y})`,backgroundImage:`url('${u}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const La={element:Ea,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:""}]}}}},Aa="LightBox-module__hidden___9s-9x",Ia="LightBox-module__heroImage___sTxNF",ka="LightBox-module__background___rm9ml",Fa="LightBox-module__editor___4ACaY",Ra="LightBox-module__contentStyle___Bgnsq",Ba="LightBox-module__imageStyle___tLIlB",Va="LightBox-module__imgWrapper___LuFUp",Oa="LightBox-module__contain___8-yaS",Pa="LightBox-module__cover___hNvOG",Na="LightBox-module__caption___b6L2I",Wa="LightBox-module__captionTextInner___rCGNH",za="LightBox-module__lightboxSplide___XFuWC",ja="LightBox-module__arrow___iz38X",Ma="LightBox-module__arrowVertical___Zfz81",Ha="LightBox-module__nextArrow___zkAQN",Da="LightBox-module__arrowInner___p48sW",Ua="LightBox-module__arrowIcon___3VaFf",Ya="LightBox-module__arrowImg___pNV88",Ga="LightBox-module__mirror___pjeXc",qa="LightBox-module__thumbsWrapper___GB-nU",Xa="LightBox-module__thumbsContainerVertical___wttk5",Ka="LightBox-module__thumbsContainer___osSma",Ja="LightBox-module__thumbsAlignStart___MO6tY",Za="LightBox-module__thumbsAlignCenter___Q4sUx",Qa="LightBox-module__thumbsAlignEnd___p4y9R",tl="LightBox-module__thumbItem___HvnF3",el="LightBox-module__closeButton___g2khP",nl="LightBox-module__fadeIn___0m5GW",ol="LightBox-module__slideInLeft___gPYwC",rl="LightBox-module__slideInRight___S-pPp",il="LightBox-module__slideInTop___DFdAj",al="LightBox-module__slideInBottom___m27kZ",ll="LightBox-module__fadeOut___55qBR",sl="LightBox-module__slideOutLeft___NvU7P",cl="LightBox-module__slideOutRight___SK7eC",ul="LightBox-module__slideOutTop___Vgg0z",pl="LightBox-module__slideOutBottom___nJ0Ef",dl="LightBox-module__scaleSlide___vZriG",N={hidden:Aa,heroImage:Ia,background:ka,editor:Fa,contentStyle:Ra,imageStyle:Ba,imgWrapper:Va,contain:Oa,cover:Pa,caption:Na,captionTextInner:Wa,lightboxSplide:za,arrow:ja,arrowVertical:Ma,nextArrow:Ha,arrowInner:Da,arrowIcon:Ua,arrowImg:Ya,mirror:Ga,thumbsWrapper:qa,thumbsContainerVertical:Xa,thumbsContainer:Ka,thumbsAlignStart:Ja,thumbsAlignCenter:Za,thumbsAlignEnd:Qa,thumbItem:tl,closeButton:el,fadeIn:nl,slideInLeft:ol,slideInRight:rl,slideInTop:il,slideInBottom:al,fadeOut:ll,slideOutLeft:sl,slideOutRight:cl,slideOutTop:ul,slideOutBottom:pl,scaleSlide:dl},Me=(t,e,n)=>{const o={},[r,a]=t.split("-");return r==="top"?(o.top="0",o.bottom="auto"):r==="middle"?(o.top="50%",o.bottom="auto"):r==="bottom"&&(o.top="auto",o.bottom="0"),a==="left"?(o.left="0",o.right="auto"):a==="center"?(o.left="50%",o.right="auto"):a==="right"&&(o.left="auto",o.right="0"),r==="middle"&&a==="center"?o.transform=`translate(calc(-50% + ${F.scalingValue(e.x,n)}), calc(-50% + ${F.scalingValue(e.y,n)}))`:r==="middle"?o.transform=`translate(${F.scalingValue(e.x,n)}, calc(-50% + ${F.scalingValue(e.y,n)}))`:a==="center"?o.transform=`translate(calc(-50% + ${F.scalingValue(e.x,n)}), ${F.scalingValue(e.y,n)})`:o.transform=`translate(${F.scalingValue(e.x,n)}, ${F.scalingValue(e.y,n)})`,o};function ar(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 yo(t){const e=t.getBoundingClientRect(),n=ar(t),o=Math.max(0,e.width-n.left-n.right),r=Math.max(0,e.height-n.top-n.bottom),a=t.naturalWidth,i=t.naturalHeight,c=o/r,l=a/i;let p,s;l>c?(p=o,s=o/l):(s=r,p=r*l);const w=e.left+n.left,y=e.top+n.top,m=(o-p)/2+w,u=(r-s)/2+y;return{x:m,y:u,width:p,height:s}}function vo(t){const e=t.getBoundingClientRect(),n=ar(t);return{left:e.left+n.left,right:e.right-n.right,top:e.top+n.top,bottom:e.bottom-n.bottom}}function bo(t){const e=t.match(/rgba?\(([^)]+)\)/);if(e){const o=e[1].split(",").map(r=>parseFloat(r.trim()));return o.length===4?o[3]:1}const n=t.match(/^#([0-9a-fA-F]{8})$/);if(n){const o=n[1].substring(6,8);return parseInt(o,16)/255}return t.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function gl(t,e){const n=(()=>{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})(),o=(()=>{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})(),r=(()=>{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:n,backdropAppearClass:o,backdropDisappearClass:r,disappearClass:a}}const ml=({settings:t,content:e,styles:n,portalId:o,activeEvent:r,isEditor:a})=>{const[i,c]=j.useState(!1),{url:l}=t.thumbnailBlock.cover;return j.useEffect(()=>{r==="close"&&c(!1),r==="open"&&c(!0)},[r]),x.jsxs(x.Fragment,{children:[x.jsx("img",{src:l,alt:"Cover",className:N.heroImage,onClick:()=>c(!0)}),x.jsx(fl,{isOpen:i,onClose:()=>c(!1),content:e,settings:t,lightboxStyles:n,portalId:o,isEditor:a})]})},fl=({isOpen:t,onClose:e,content:n,lightboxStyles:o,settings:r,portalId:a,isEditor:i,metadata:c})=>{var z;const[l,p]=j.useState(0),[s,w]=j.useState(0),[y,m]=j.useState(!1),[u,d]=j.useState(!1),[C,b]=j.useState({}),f=j.useRef(null),$=j.useRef(null),M=j.useRef(null),P=j.useRef(!1),T=j.useRef(null),h=j.useRef(null),L=j.useRef(null),R=j.useRef(null),W=j.useRef(!1),k=j.useRef(null),[B,O]=j.useState(!1),{appear:U,triggers:D,slider:g,thumbnail:A,controls:I,area:_,caption:v,layout:V}=r.lightboxBlock,{appearClass:X,backdropAppearClass:rt,backdropDisappearClass:Q,disappearClass:ut}=gl(U.type,U.direction),E=(c==null?void 0:c.itemId)??null;j.useEffect(()=>{const S=()=>{setTimeout(()=>{var G,J;(J=(G=f.current)==null?void 0:G.splide)==null||J.refresh()},16)},H=()=>{w(G=>G+1)};return window.addEventListener("ArticleEditor.Layout:change",S),window.addEventListener("ArticleEditor.ComponentContent:change",H),()=>{window.removeEventListener("ArticleEditor.Layout:change",S),window.removeEventListener("ArticleEditor.ComponentContent:change",H)}},[]),j.useEffect(()=>{if(!t||!A.isActive){O(!1);return}const S=k.current;if(!S)return;const H=()=>{g.direction==="horiz"?O(S.scrollWidth>S.clientWidth):O(S.scrollHeight>S.clientHeight)};H();const G=new ResizeObserver(H);return G.observe(S),()=>G.disconnect()},[t,A.isActive,n.length,C,g.direction]);const K=j.useCallback(()=>{const S=window.matchMedia("(max-width: 768px)").matches,H=bo(_.color);S&&!i&&H>.9&&(document.body.style.backgroundColor=""),m(!0),P.current=!0;const G=J=>{J.target===T.current&&J.animationName&&(T.current&&h.current&&T.current.removeEventListener("animationend",h.current),h.current=null,P.current&&(P.current=!1,e()),m(!1))};T.current&&(h.current=G,T.current.addEventListener("animationend",G))},[e,_.color,i]),ht=(S,H,G)=>{var J,ot;if(S){if(D.type==="click"&&D.switch==="image")D.repeat==="close"&&l===n.length-1?K():(J=f.current)==null||J.go("+1");else if(D.type==="click"&&D.switch==="50/50"){const tt=S.getBoundingClientRect(),q=H-tt.left,nt=G-tt.top,vt=tt.width,lt=tt.height;let pt;g.direction==="horiz"?pt=q<vt/2?"-1":"+1":pt=nt<lt/2?"-1":"+1",(ot=f.current)==null||ot.go(pt)}}},it=S=>{if(W.current){W.current=!1;return}const H=n[l],G=(H==null?void 0:H.image.objectFit)==="cover";let J,ot;if("changedTouches"in S&&S.changedTouches.length>0)J=S.changedTouches[0].clientX,ot=S.changedTouches[0].clientY;else if("clientX"in S)J=S.clientX,ot=S.clientY;else return;let tt;if(G&&M.current){const q=vo(M.current);tt=J>=q.left&&J<=q.right&&ot>=q.top&&ot<=q.bottom}else{const q=M.current?yo(M.current):null;if(!q){S.target===S.currentTarget&&K();return}tt=J>=q.x&&J<=q.x+q.width&&ot>=q.y&&ot<=q.y+q.height}tt?ht(M.current,J,ot):K()},mt=S=>{const H=S.target;(H.classList.contains(N.thumbsWrapper)||H.classList.contains(N.thumbsContainer))&&it(S)};j.useEffect(()=>{if(!t)return;const S=H=>{var G,J;if(H.key==="Escape"){K();return}if(H.key==="ArrowRight"){p(ot=>(ot+1)%Math.max(n.length,1)),(G=f.current)==null||G.go("+1");return}H.key==="ArrowLeft"&&(p(ot=>(ot-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=f.current)==null||J.go("-1"))};return window.addEventListener("keydown",S),()=>{window.removeEventListener("keydown",S)}},[t,K,n.length]),j.useEffect(()=>{if(t){if(p(0),w(H=>H+1),P.current=!1,m(!1),d(!1),b({}),!E)return;const S=new CustomEvent("page-overlay",{detail:{itemId:E}});window.dispatchEvent(S)}return()=>{T.current&&h.current&&(T.current.removeEventListener("animationend",h.current),h.current=null),d(!1)}},[t,E]),j.useEffect(()=>{$.current!==null&&$.current!==g.type&&w(S=>S+1),$.current=g.type},[g.type]),j.useEffect(()=>{if(!t)return;const S=document.body.style.overflow,H=window.matchMedia("(max-width: 768px)").matches,G=bo(_.color);document.body.style.overflow="hidden",d(!1);const J=tt=>{tt.target===T.current&&!P.current&&tt.animationName&&(H&&!i&&G>.9&&(document.body.style.backgroundColor=_.color),d(!0),T.current&&L.current&&T.current.removeEventListener("animationend",L.current),L.current=null)};T.current&&(L.current=J,T.current.addEventListener("animationend",J));const ot=tt=>{const q=tt.target;q&&(q.closest(`.${N.thumbsWrapper}`)||q.closest(`.${N.thumbsContainer}`))||g.type!=="slide"&&tt.preventDefault()};return document.addEventListener("touchmove",ot,{passive:!1}),()=>{document.body.style.overflow=S,document.removeEventListener("touchmove",ot),T.current&&L.current&&(T.current.removeEventListener("animationend",L.current),L.current=null),d(!1)}},[t,i,_.color,g.type]),j.useEffect(()=>{if(!t)return;const S=H=>{var J,ot;if(P.current){H.stopPropagation();return}if(W.current){W.current=!1;return}const G=H.target;if(!(G&&(G.closest(`.${N.thumbsContainer}`)||G.closest(`.${N.thumbItem}`)))){if(g.type==="slide"&&D.type==="drag"&&((ot=(J=f.current)==null?void 0:J.splide)!=null&&ot.root)){const tt=f.current.splide.root;if(G&&(tt.contains(G)||tt===G))return}if(H.touches.length===0&&H.changedTouches.length>0){const tt=n[l],q=(tt==null?void 0:tt.image.objectFit)==="cover",nt=H.changedTouches[0];let vt;if(q&&M.current){const lt=vo(M.current);vt=nt.clientX>=lt.left&&nt.clientX<=lt.right&&nt.clientY>=lt.top&&nt.clientY<=lt.bottom}else{const lt=M.current?yo(M.current):null;if(!lt)return;vt=nt.clientX>=lt.x&&nt.clientX<=lt.x+lt.width&&nt.clientY>=lt.y&&nt.clientY<=lt.y+lt.height}if(!vt){H.stopPropagation(),P.current=!0;const lt=pt=>{pt.stopPropagation(),pt.preventDefault(),document.removeEventListener("click",lt,!0)};document.addEventListener("click",lt,!0),K()}}}};return document.addEventListener("touchend",S,{passive:!0}),()=>{document.removeEventListener("touchend",S)}},[t,K,l,n]);const bt=(g.type==="scale"||g.type==="fade")&&g.direction==="vert"&&D.type==="drag";j.useEffect(()=>{var pt,kt;if(!t||!bt||!((kt=(pt=f.current)==null?void 0:pt.splide)!=null&&kt.root))return;const S=f.current.splide.root,H=30,G=(et,st)=>{if(R.current){const Ct=Math.abs(et-R.current.x),Ht=Math.abs(st-R.current.y);(Ct>0||Ht>0)&&(W.current=!0)}},J=et=>{R.current&&(et.preventDefault(),G(et.clientX,et.clientY))},ot=et=>{R.current&&et.touches.length>0&&(et.preventDefault(),G(et.touches[0].clientX,et.touches[0].clientY))},tt=(et,st)=>{if(!R.current||!f.current){R.current=null;return}const Ct=Math.abs(et-R.current.x),Ht=Math.abs(st-R.current.y);Ht>H&&Ht>Ct&&f.current.go(st<R.current.y?"+1":"-1"),R.current=null},q=et=>{R.current&&tt(et.clientX,et.clientY),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("pointermove",J)},nt=et=>{if(R.current){if(et.changedTouches.length>0){const st=et.changedTouches[0];tt(st.clientX,st.clientY)}document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),document.removeEventListener("touchmove",ot)}},vt=et=>{R.current={x:et.clientX,y:et.clientY},W.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",q),document.addEventListener("pointercancel",q)},lt=et=>{et.touches.length>0&&(R.current={x:et.touches[0].clientX,y:et.touches[0].clientY},W.current=!1,document.addEventListener("touchmove",ot,{passive:!1}),document.addEventListener("touchend",nt),document.addEventListener("touchcancel",nt))};return S.addEventListener("pointerdown",vt),S.addEventListener("touchstart",lt),()=>{S.removeEventListener("pointerdown",vt),S.removeEventListener("touchstart",lt),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",q),document.removeEventListener("pointercancel",q),document.removeEventListener("touchmove",ot),document.removeEventListener("touchend",nt),document.removeEventListener("touchcancel",nt),R.current=null,W.current=!1}},[t,bt,s]);const Mt={backgroundColor:_.color,backdropFilter:`blur(${_.blur}px)`,animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(a)?null:dr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:i?null:T,className:dt(N.background,y?Q:rt,{[N.editor]:i},{[N.hidden]:!t}),style:{...Mt,...u&&!i&&!y?{position:"absolute"}:{}}}),x.jsxs("div",{ref:i?T:null,className:dt(N.contentStyle,y?ut:X,{[N.editor]:i},{[N.hidden]:!t}),style:{animationDuration:`${parseInt(U.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[x.jsx(or,{onMove:S=>p(S.index),ref:f,className:N.lightboxSplide,options:{arrows:!1,speed:g.duration?parseInt(g.duration):500,direction:g.direction==="horiz"||g.type==="fade"||g.type==="scale"?"ltr":"ttb",pagination:!1,drag:D.type==="drag"&&!bt,perPage:1,width:"100%",height:"100%",type:g.type==="fade"||g.type==="scale"?"fade":"loop",padding:0,rewind:D.repeat!=="close",start:0},style:{"--splide-speed":g.duration},children:n.map((S,H)=>{const G=Me(V.position,V.offset,i),J=`${F.scalingValue(V.padding.top,i)} ${F.scalingValue(V.padding.right,i)} ${F.scalingValue(V.padding.bottom,i)} ${F.scalingValue(V.padding.left,i)}`,ot=g.type==="scale"?(()=>{const{transform:tt,...q}=G;return{...q,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":tt||"none"}})():{...G,position:"absolute",padding:J,boxSizing:"border-box"};return x.jsx(rr,{children:x.jsx("div",{className:N.imgWrapper,onClick:it,children:x.jsx("img",{ref:H===l?M:null,className:dt(N.imageStyle,{[N.contain]:S.image.objectFit==="contain",[N.cover]:S.image.objectFit==="cover",[N.scaleSlide]:g.type==="scale"}),src:S.image.url,alt:S.image.name??"",style:{...ot,pointerEvents:S.image.objectFit==="contain"?"none":"auto"}})})},H)})},s),I.isActive&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:dt(N.arrow,{[N.arrowVertical]:g.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:x.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${F.scalingValue(I.offset.x,i)}, ${F.scalingValue(I.offset.y*(g.direction==="horiz"?1:-1),i)}) scale(${I.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=f.current)==null?void 0:S.go("-1")},"aria-label":"Previous",children:[I.arrowsImgUrl&&x.jsx(ge,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:dt(N.arrowImg,N.mirror)}),!I.arrowsImgUrl&&x.jsx(So,{color:I.color,className:dt(N.arrowIcon,N.arrowImg,N.mirror)})]})}),x.jsx("div",{className:dt(N.arrow,N.nextArrow,{[N.arrowVertical]:g.direction==="vert"}),style:{color:I.color,"--arrow-hover-color":I.hover},children:x.jsxs("button",{className:N.arrowInner,style:{transform:`translate(${F.scalingValue(I.offset.x*(g.direction==="horiz"?-1:1),i)}, ${F.scalingValue(I.offset.y,i)}) scale(${I.scale}) rotate(${g.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var S;return(S=f.current)==null?void 0:S.go("+1")},"aria-label":"Next",children:[I.arrowsImgUrl&&x.jsx(ge,{url:I.arrowsImgUrl,fill:I.color,hoverFill:I.hover,className:N.arrowImg}),!I.arrowsImgUrl&&x.jsx(So,{color:I.color,className:dt(N.arrowIcon,N.arrowImg)})]})})]}),_.closeIconUrl&&(()=>{const S=Me(_.closeIconAlign,_.closeIconOffset,i),H=`scale(${_.closeIconScale})`,G=S.transform?`${S.transform} ${H}`:H;return x.jsx("button",{className:N.closeButton,style:{...S,transform:G},onClick:K,"aria-label":"Close lightbox",children:x.jsx(ge,{url:_.closeIconUrl,fill:_.closeIconColor??"#000000",hoverFill:_.closeIconHover??"#cccccc"})})})(),v&&v.isActive&&o.imageCaption&&((z=n[l])==null?void 0:z.imageCaption)&&(()=>{const{widthSettings:S,fontSettings:H,letterSpacing:G,textAlign:J,wordSpacing:ot,fontSizeLineHeight:tt,textAppearance:q,color:nt}=o.imageCaption;return x.jsx("div",{className:N.caption,style:{...Me(v.alignment,v.offset,i),fontFamily:H.fontFamily,fontWeight:H.fontWeight,fontStyle:H.fontStyle,width:S.sizing==="auto"?"max-content":F.scalingValue(S.width,i),letterSpacing:F.scalingValue(G,i),wordSpacing:F.scalingValue(ot,i),textAlign:J,fontSize:F.scalingValue(tt.fontSize,i),lineHeight:F.scalingValue(tt.lineHeight,i),textTransform:q.textTransform??"none",textDecoration:q.textDecoration??"none",fontVariant:q.fontVariant??"normal",color:nt},onClick:vt=>vt.stopPropagation(),children:x.jsx("div",{"data-styles":"imageCaption",className:N.captionTextInner,style:{"--link-color":v.linkColor,"--link-hover-color":v.linkHoverColor},children:x.jsx(ir,{content:n[l].imageCaption})})})})(),A.isActive&&(()=>{const[S,H]=A.position.split("-"),G=g.direction==="horiz"?`${S}-left`:A.position,J=Me(G,A.offset,i),ot=()=>{if(g.direction==="horiz"){if(H==="left")return"flex-start";if(H==="center")return"center";if(H==="right")return"flex-end"}else{if(S==="top")return"flex-start";if(S==="middle")return"center";if(S==="bottom")return"flex-end"}return"flex-start"};return x.jsx("div",{ref:k,className:N.thumbsWrapper,onClick:tt=>mt(tt),style:{position:i?"absolute":"fixed",...J,...g.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:x.jsx("div",{className:dt(N.thumbsContainer,{[N.thumbsContainerVertical]:g.direction==="vert",[N.thumbsAlignStart]:A.align==="start",[N.thumbsAlignCenter]:A.align==="center",[N.thumbsAlignEnd]:A.align==="end"}),style:{gap:F.scalingValue(A.grid.gap,i),justifyContent:B?"flex-start":ot()},children:n.map((tt,q)=>{const nt=q===l,vt=C[q],pt=A.grid.size*(nt?A.activeState.scale:1),kt=()=>{if(A.fit!=="fit")return{};if(!vt)return g.direction==="horiz"?{height:F.scalingValue(pt,i)}:{width:F.scalingValue(pt,i)};const et=vt.width/vt.height;if(g.direction==="horiz"){const st=pt,Ct=st*et;return{width:F.scalingValue(Ct,i),height:F.scalingValue(st,i)}}else{const st=pt,Ct=st/et;return{width:F.scalingValue(st,i),height:F.scalingValue(Ct,i)}}};return x.jsx("button",{className:N.thumbItem,style:{...g.direction==="horiz"&&A.fit!=="fit"?{height:F.scalingValue(pt,i)}:{},...g.direction==="vert"&&A.fit!=="fit"?{width:F.scalingValue(pt,i)}:{},...A.fit==="cover"?{width:F.scalingValue(pt,i),height:F.scalingValue(pt,i)}:{},...kt(),transition:nt?"all 0.25s ease-out":"none",opacity:nt?A.activeState.opacity/100:A.opacity/100,"--thumb-hover":A.activeState.opacity/100},onClick:et=>{var st;et.stopPropagation(),p(q),(st=f.current)==null||st.go(q)},onMouseEnter:()=>{var et;A.triggers==="hov"&&((et=f.current)==null||et.go(q))},children:x.jsx("img",{src:tt.image.url,alt:tt.image.name??"",onLoad:et=>{const st=et.currentTarget;st.naturalWidth&&st.naturalHeight&&b(Ct=>({...Ct,[q]:{width:st.naturalWidth,height:st.naturalHeight}}))},style:{objectFit:A.fit==="cover"?"cover":"contain",...A.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...A.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${tt.image.name}-${q}`)})})})})()]})]}),document.getElementById(a))};function So({color:t,className:e}){return x.jsx("svg",{viewBox:"0 0 10 18",className:e,children:x.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:x.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 hl={element:ml,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 me(t){const{color:e,...n}=t;return n}function Qt(t,e){var n,o,r;return{fontFamily:t.fontSettings.fontFamily,fontWeight:t.fontSettings.fontWeight,fontStyle:t.fontSettings.fontStyle,letterSpacing:F.scalingValue(t.letterSpacing,e),wordSpacing:F.scalingValue(t.wordSpacing,e),fontSize:F.scalingValue(t.fontSize,e),lineHeight:t.lineHeight!==void 0?F.scalingValue(t.lineHeight,e):void 0,textTransform:(n=t.textAppearance)==null?void 0:n.textTransform,textDecoration:(o=t.textAppearance)==null?void 0:o.textDecoration,fontVariant:(r=t.textAppearance)==null?void 0:r.fontVariant,color:t.color}}function He(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function yl(t){return`
7
7
  .${t}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -75,6 +75,11 @@
75
75
  color: var(--${t}-filled-input-text-color, var(--${t}-input-text-color));
76
76
  border-color: var(--${t}-filled-input-border-color, var(--${t}-input-border-color));
77
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
+ }
78
83
  .${t}-wrapper.${t}-state-success .${t}-input,
79
84
  .${t}-wrapper.${t}-state-success .${t}-button {
80
85
  pointer-events: none;
@@ -134,10 +139,10 @@
134
139
  position: relative;
135
140
  height: auto;
136
141
  }
137
- `}function bs({settings:t,isEditor:e,metadata:n,activeEvent:o}){const{prefix:r}=F.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:s,gap:p,fieldsGap:l,buttonCorners:w,buttonStroke:y,buttonPadding:m,isButtonFullWidth:u,inputCorners:d,inputStroke:C,inputPadding:b,inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:P,buttonColor:T,buttonTextColor:h,buttonBorderColor:L,labelTextColor:R,successColor:W,errorColor:k,fontFamily:B,inputFontSettings:O,inputFontSize:U,inputLineHeight:D,inputLetterSpacing:g,inputWordSpacing:A,inputTextAppearance:I,buttonFontSettings:_,buttonFontSize:v,buttonLineHeight:V,buttonLetterSpacing:X,buttonWordSpacing:rt,buttonTextAppearance:Q,labelFontSettings:ut,labelFontSize:E,labelLineHeight:K,labelLetterSpacing:ft,labelWordSpacing:it,labelTextAppearance:mt,statusFontSettings:bt,statusFontSize:Mt,statusLineHeight:z,statusLetterSpacing:S,statusWordSpacing:H,statusTextAppearance:G,successMessage:J,errorMessage:ot,stateOverrides:tt}=t,q=a==="B",nt=c.slice(0,Math.min(i,c.length)),vt={fontSettings:{fontFamily:B,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:U??.01,lineHeight:D,letterSpacing:g??0,wordSpacing:A??0,textAppearance:I,color:$},st=Zt(vt,e),pt=F.scalingValue(C??0,e),kt={...st,borderStyle:"solid",borderRadius:a==="C"?0:F.scalingValue(d??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pt,borderLeftWidth:0}:{borderWidth:pt},paddingTop:F.scalingValue((b==null?void 0:b.top)??0,e),paddingRight:F.scalingValue((b==null?void 0:b.right)??0,e),paddingBottom:F.scalingValue((b==null?void 0:b.bottom)??0,e),paddingLeft:F.scalingValue((b==null?void 0:b.left)??0,e)},et={fontSettings:{fontFamily:B,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:v??.01,lineHeight:V,letterSpacing:X??0,wordSpacing:rt??0,textAppearance:Q,color:h},lt=Zt(et,e),Ct=F.scalingValue(y??0,e),Ht={fontSettings:{fontFamily:B,fontWeight:(ut==null?void 0:ut.fontWeight)??400,fontStyle:(ut==null?void 0:ut.fontStyle)??"normal"},fontSize:E??.01,lineHeight:K,letterSpacing:ft??0,wordSpacing:it??0,textAppearance:mt,color:R},be=Zt(Ht,e),gn={fontSettings:{fontFamily:B,fontWeight:(bt==null?void 0:bt.fontWeight)??400,fontStyle:(bt==null?void 0:bt.fontStyle)??"normal"},fontSize:Mt??.01,lineHeight:z,letterSpacing:S??0,wordSpacing:H??0,textAppearance:G,color:W},ht=Zt(gn,e),{color:Se,...oe}=ht,$t=F.buildColorVars(r,{inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:P!=null&&P.trim()?P:"#cccccc",buttonColor:T,buttonTextColor:h,buttonBorderColor:L,labelTextColor:R,successColor:W,errorColor:k},Ss,xs,tt),[Ft,Kn]=j.useState(()=>Object.fromEntries(nt.map(ct=>[ct.name,""]))),[Jn,xe]=j.useState("idle"),[lr,ze]=j.useState(null),mn=o==="success"?"success":o==="error"?"error":Jn,cr=o==="error"?ot:lr,Ce=o==="filled"?Object.fromEntries(nt.map(ct=>[ct.name,"Filled"])):Ft,ur=mn==="error"?F.getFormFieldValidationError(nt,Ce):null,pr=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Zn=n==null?void 0:n.submitUrl,Qn=(ct,re)=>{Kn(Dt=>({...Dt,[ct]:re}))},dr=async ct=>{ct.preventDefault();const re=Object.fromEntries(nt.map(Et=>{var ie;return[Et.name,((ie=Ft[Et.name])==null?void 0:ie.trim())??""]}).filter(([,Et])=>Et));if(!Zn){xe("error"),ze("No integrations were found for this form.");return}if(Object.keys(re).length===0)return;const Dt=F.getFormFieldValidationError(nt,Ft);if(Dt){xe("error"),ze(Dt);return}xe("submitting"),ze(null);try{const Et=await fetch(Zn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(re)});if(!Et.ok){const ie=await Et.text();throw new Error(ie||`Request failed: ${Et.status}`)}xe("success"),Kn(Object.fromEntries(nt.map(ie=>[ie.name,""])))}catch(Et){xe("error"),ze(Et instanceof Error?Et.message:"Something went wrong")}};return x.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${pr}`.trim(),style:$t,children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:vs(r)}}),x.jsxs("form",{onSubmit:dr,className:`${r}-form`,style:{gap:F.scalingValue(p??0,e)},children:[x.jsx("div",{className:`${r}-fields`,style:{gap:F.scalingValue(l??0,e)},children:nt.map((ct,re)=>x.jsxs("div",{className:`${r}-field-group${q?` ${r}-labeled`:""}`,children:[q&&x.jsx("span",{className:`${r}-field-label`,style:be?{...be,lineHeight:be.fontSize}:void 0,children:ct.label||ct.name}),ct.type==="textarea"?x.jsx("textarea",{name:ct.name,autoComplete:"off",value:Ce[ct.name]??"",onChange:Dt=>Qn(ct.name,Dt.target.value),placeholder:ct.placeholder,className:`${r}-input`,style:kt,rows:1,"data-filled":(Ce[ct.name]??"").trim().length>0,"data-field-type":"textarea"}):x.jsx("input",{type:ct.type==="phone"?"tel":ct.type==="email"?"email":"text",name:ct.name,autoComplete:"off",value:Ce[ct.name]??"",onChange:Dt=>Qn(ct.name,Dt.target.value),placeholder:ct.placeholder,required:ct.isRequired??ct.type==="email",className:`${r}-input`,style:kt,"data-filled":(Ce[ct.name]??"").trim().length>0})]},re))}),x.jsx("div",{className:`${r}-overlay-anchor`,children:x.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:F.scalingValue(w??0,e),borderWidth:Ct,paddingTop:F.scalingValue((m==null?void 0:m.top)??0,e),paddingRight:F.scalingValue((m==null?void 0:m.right)??0,e),paddingBottom:F.scalingValue((m==null?void 0:m.bottom)??0,e),paddingLeft:F.scalingValue((m==null?void 0:m.left)??0,e),...lt,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:x.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Jn==="submitting"?"...":s})})})]}),mn==="success"&&x.jsx("p",{className:`${r}-success`,style:{...ht},children:J}),mn==="error"&&x.jsx("p",{className:`${r}-error`,style:{...oe},role:"alert",children:ur??cr??ot})]})}const Ss={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"},xs=["hover","focus","filled","success","error"],Cs=`import React, { useState } from 'react';
142
+ `}function vl({settings:t,isEditor:e,metadata:n,activeEvent:o}){const{prefix:r}=F.useScopedStyles(),{type:a="A",fieldsToShow:i=2,fields:c=[],buttonLabel:l,gap:p,fieldsGap:s,buttonCorners:w,buttonStroke:y,buttonPadding:m,isButtonFullWidth:u,inputCorners:d,inputStroke:C,inputPadding:b,inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:P,buttonColor:T,buttonTextColor:h,buttonBorderColor:L,labelTextColor:R,successColor:W,errorColor:k,fontFamily:B,inputFontSettings:O,inputFontSize:U,inputLineHeight:D,inputLetterSpacing:g,inputWordSpacing:A,inputTextAppearance:I,buttonFontSettings:_,buttonFontSize:v,buttonLineHeight:V,buttonLetterSpacing:X,buttonWordSpacing:rt,buttonTextAppearance:Q,labelFontSettings:ut,labelFontSize:E,labelLineHeight:K,labelLetterSpacing:ht,labelWordSpacing:it,labelTextAppearance:mt,statusFontSettings:bt,statusFontSize:Mt,statusLineHeight:z,statusLetterSpacing:S,statusWordSpacing:H,statusTextAppearance:G,successMessage:J,errorMessage:ot,stateOverrides:tt}=t,q=a==="B",nt=c.slice(0,Math.min(i,c.length)),vt={fontSettings:{fontFamily:B,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:U??.01,lineHeight:D,letterSpacing:g??0,wordSpacing:A??0,textAppearance:I,color:$},lt=me(Qt(vt,e)),pt=F.scalingValue(C??0,e),kt={...lt,borderStyle:"solid",borderRadius:a==="C"?0:F.scalingValue(d??0,e),...a==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:pt,borderLeftWidth:0}:{borderWidth:pt},paddingTop:F.scalingValue((b==null?void 0:b.top)??0,e),paddingRight:F.scalingValue((b==null?void 0:b.right)??0,e),paddingBottom:F.scalingValue((b==null?void 0:b.bottom)??0,e),paddingLeft:F.scalingValue((b==null?void 0:b.left)??0,e)},et={fontSettings:{fontFamily:B,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:v??.01,lineHeight:V,letterSpacing:X??0,wordSpacing:rt??0,textAppearance:Q,color:h},st=me(Qt(et,e)),Ct=F.scalingValue(y??0,e),Ht={fontSettings:{fontFamily:B,fontWeight:(ut==null?void 0:ut.fontWeight)??400,fontStyle:(ut==null?void 0:ut.fontStyle)??"normal"},fontSize:E??.01,lineHeight:K,letterSpacing:ht??0,wordSpacing:it??0,textAppearance:mt,color:R},ft=Qt(Ht,e),re={fontSettings:{fontFamily:B,fontWeight:(bt==null?void 0:bt.fontWeight)??400,fontStyle:(bt==null?void 0:bt.fontStyle)??"normal"},fontSize:Mt??.01,lineHeight:z,letterSpacing:S??0,wordSpacing:H??0,textAppearance:G,color:W},Jt=me(Qt(re,e)),$t=F.buildColorVars(r,{inputColor:f,inputTextColor:$,inputBorderColor:M,placeholderColor:P!=null&&P.trim()?P:"#cccccc",buttonColor:T,buttonTextColor:h,buttonBorderColor:L,labelTextColor:R,successColor:W,errorColor:k},bl,Sl,tt),[Ft,Xn]=j.useState(()=>Object.fromEntries(nt.map(ct=>[ct.name,""]))),[Kn,xe]=j.useState("idle"),[lr,ze]=j.useState(null),gn=o==="success"?"success":o==="error"?"error":Kn,sr=o==="error"?ot:lr,Ce=o==="filled"?Object.fromEntries(nt.map(ct=>[ct.name,"Filled"])):Ft,cr=gn==="error"?F.getFormFieldValidationError(nt,Ce):null,ur=`${o&&o!=="default"?`${r}-state-${o}`:""}`.trim(),Jn=n==null?void 0:n.submitUrl,Zn=(ct,ie)=>{Xn(Dt=>({...Dt,[ct]:ie}))},pr=async ct=>{ct.preventDefault();const ie=Object.fromEntries(nt.map(Et=>{var ae;return[Et.name,((ae=Ft[Et.name])==null?void 0:ae.trim())??""]}).filter(([,Et])=>Et));if(!Jn){xe("error"),ze("No integrations were found for this form.");return}if(Object.keys(ie).length===0)return;const Dt=F.getFormFieldValidationError(nt,Ft);if(Dt){xe("error"),ze(Dt);return}xe("submitting"),ze(null);try{const Et=await fetch(Jn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ie)});if(!Et.ok){const ae=await Et.text();throw new Error(ae||`Request failed: ${Et.status}`)}xe("success"),Xn(Object.fromEntries(nt.map(ae=>[ae.name,""])))}catch(Et){xe("error"),ze(Et instanceof Error?Et.message:"Something went wrong")}};return x.jsxs("div",{className:`${r}-wrapper ${r}-type-${a} ${ur}`.trim(),style:$t,children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:yl(r)}}),x.jsxs("form",{onSubmit:pr,className:`${r}-form`,style:{gap:F.scalingValue(p??0,e)},children:[x.jsx("div",{className:`${r}-fields`,style:{gap:F.scalingValue(s??0,e)},children:nt.map((ct,ie)=>x.jsxs("div",{className:`${r}-field-group${q?` ${r}-labeled`:""}`,children:[q&&x.jsx("span",{className:`${r}-field-label`,style:ft?{...ft,lineHeight:ft.fontSize}:void 0,children:ct.label||ct.name}),ct.type==="textarea"?x.jsx("textarea",{name:ct.name,autoComplete:"off",value:Ce[ct.name]??"",onChange:Dt=>Zn(ct.name,Dt.target.value),placeholder:ct.placeholder,className:`${r}-input`,style:kt,rows:1,"data-filled":(Ce[ct.name]??"").trim().length>0,"data-field-type":"textarea"}):x.jsx("input",{type:ct.type==="phone"?"tel":ct.type==="email"?"email":"text",name:ct.name,autoComplete:"off",value:Ce[ct.name]??"",onChange:Dt=>Zn(ct.name,Dt.target.value),placeholder:ct.placeholder,required:ct.isRequired??ct.type==="email",className:`${r}-input`,style:kt,"data-filled":(Ce[ct.name]??"").trim().length>0})]},ie))}),x.jsx("div",{className:`${r}-overlay-anchor`,children:x.jsx("button",{type:"submit",className:`${r}-button`,style:{borderStyle:"solid",borderRadius:F.scalingValue(w??0,e),borderWidth:Ct,paddingTop:F.scalingValue((m==null?void 0:m.top)??0,e),paddingRight:F.scalingValue((m==null?void 0:m.right)??0,e),paddingBottom:F.scalingValue((m==null?void 0:m.bottom)??0,e),paddingLeft:F.scalingValue((m==null?void 0:m.left)??0,e),...st,...u?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:x.jsx("span",{className:`${r}-overlay-anchor`,style:u?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Kn==="submitting"?"...":l})})})]}),gn==="success"&&x.jsx("p",{className:`${r}-success`,style:{...Jt},children:J}),gn==="error"&&x.jsx("p",{className:`${r}-error`,style:{...Jt},role:"alert",children:cr??sr??ot})]})}const bl={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"},Sl=["hover","focus","filled","success","error"],xl=`import React, { useState } from 'react';
138
143
  import { CommonComponentProps } from '../props';
139
144
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
140
- import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
145
+ import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
141
146
 
142
147
  function sv(px: number): string {
143
148
  return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
@@ -216,6 +221,11 @@ function getCSS(P: string): string {
216
221
  color: var(--\${P}-filled-input-text-color, var(--\${P}-input-text-color));
217
222
  border-color: var(--\${P}-filled-input-border-color, var(--\${P}-input-border-color));
218
223
  }
224
+ .\${P}-wrapper.\${P}-state-filled .\${P}-button {
225
+ background-color: var(--\${P}-filled-button-color, var(--\${P}-button-color));
226
+ color: var(--\${P}-filled-button-text-color, var(--\${P}-button-text-color));
227
+ border-color: var(--\${P}-filled-button-border-color, var(--\${P}-button-border-color));
228
+ }
219
229
  .\${P}-wrapper.\${P}-state-success .\${P}-input,
220
230
  .\${P}-wrapper.\${P}-state-success .\${P}-button {
221
231
  pointer-events: none;
@@ -358,10 +368,10 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
358
368
  textAppearance: inputTextAppearance,
359
369
  color: inputTextColor,
360
370
  };
361
- const inputCss = textStylesToCss(resolvedInputTextStyle, isEditor);
371
+ const inputTypographyCss = omitTextColors(textStylesToCss(resolvedInputTextStyle, isEditor));
362
372
  const strokeForInput = scalingValue(inputStroke ?? 0, isEditor);
363
373
  const inputFieldCss = {
364
- ...inputCss,
374
+ ...inputTypographyCss,
365
375
  borderStyle: 'solid',
366
376
  borderRadius: type === 'C' ? 0 : scalingValue(inputCorners ?? 0, isEditor),
367
377
  ...(type === 'C'
@@ -391,7 +401,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
391
401
  textAppearance: buttonTextAppearance,
392
402
  color: buttonTextColor,
393
403
  };
394
- const buttonTextCss = textStylesToCss(resolvedButtonTextStyle, isEditor);
404
+ const buttonTypographyCss = omitTextColors(textStylesToCss(resolvedButtonTextStyle, isEditor));
395
405
  const strokeForButton = scalingValue(buttonStroke ?? 0, isEditor);
396
406
 
397
407
  const resolvedLabelTextStyle: TextStyles = {
@@ -422,8 +432,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
422
432
  textAppearance: statusTextAppearance,
423
433
  color: successColor,
424
434
  };
425
- const statusTextCss = textStylesToCss(resolvedStatusTextStyle, isEditor);
426
- const { color: _statusMessageColor, ...statusTypographyCss } = statusTextCss;
435
+ const statusTypographyCss = omitTextColors(textStylesToCss(resolvedStatusTextStyle, isEditor));
427
436
 
428
437
  const colorVars = buildColorVars(P, {
429
438
  inputColor,
@@ -565,7 +574,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
565
574
  paddingRight: scalingValue(buttonPadding?.right ?? 0, isEditor),
566
575
  paddingBottom: scalingValue(buttonPadding?.bottom ?? 0, isEditor),
567
576
  paddingLeft: scalingValue(buttonPadding?.left ?? 0, isEditor),
568
- ...buttonTextCss,
577
+ ...buttonTypographyCss,
569
578
  ...(isButtonFullWidth
570
579
  ? {
571
580
  width: '100%',
@@ -594,7 +603,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
594
603
  {displayStatus === 'success' && (
595
604
  <p
596
605
  className={\`\${P}-success\`}
597
- style={{ ...statusTextCss }}
606
+ style={{ ...statusTypographyCss }}
598
607
  >
599
608
  {successMessage}
600
609
  </p>
@@ -712,7 +721,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
712
721
  };
713
722
 
714
723
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
715
- `,$s=[{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"}],De={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},_s=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ws={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"},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"},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"},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:{...De.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:{...De.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:{...De.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:{...De.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:$s,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#0A00F8",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:0,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:0,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.visible",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.visible",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}}]},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:[..._s],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"]},Ts={element:bs,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:300,height:42},schema:ws,sourceCode:Cs};function Ue(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Es(t){return`
724
+ `,Cl=[{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"}],De={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},$l=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],_l={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"},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"},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"},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:{...De.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:{...De.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:{...De.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:{...De.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:Cl,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.visible",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.visible",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}}]},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:[...$l],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"]},wl={element:vl,id:"form",name:"Newsletter Stacked",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/formImg.png"},version:1,defaultSize:{width:300,height:42},schema:_l,sourceCode:xl};function Ue(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Tl(t){return`
716
725
  .${t}-wrapper {
717
726
  display: flex;
718
727
  flex-direction: column;
@@ -903,10 +912,10 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
903
912
  font-size: ${Ue(14)};
904
913
  color: var(--${t}-error-error-color, var(--${t}-error-color));
905
914
  }
906
- `}const Ls=({settings:t,isEditor:e,metadata:n,activeEvent:o})=>{const{prefix:r}=F.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonContent:i,buttonLabel:c,fieldsToShow:s=1,fontFamily:p,inputFontSettings:l,inputFontSize:w,inputLineHeight:y,inputLetterSpacing:m,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:C,buttonFontSize:b,buttonLineHeight:f,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:P,statusFontSettings:T,statusFontSize:h,statusLineHeight:L,statusLetterSpacing:R,statusWordSpacing:W,statusTextAppearance:k,minHeight:B,corners:O,stroke:U,stateOverrides:D,inputPadding:g,buttonPadding:A,successMessage:I="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=t,v=a.slice(0,Math.min(s,a.length)),[V,X]=j.useState(()=>Object.fromEntries(v.map(ht=>[ht.name,""]))),[rt,Q]=j.useState("idle"),[ut,E]=j.useState(null),K=o==="success"?"success":o==="error"?"error":rt,ft=o==="error"?_:ut,it=o==="filled"?Object.fromEntries(v.map(ht=>[ht.name,"Filled"])):V,mt=K==="error"?F.getFormFieldValidationError(v,it):null,bt=o&&o!=="default"?`${r}-state-${o}`:"",Mt=v.some(ht=>(it[ht.name]??"").trim().length>0),z=bt!==`${r}-state-filled`&&Mt?`${r}-state-filled`:"",S=`${bt} ${z}`.trim(),H=n==null?void 0:n.submitUrl,G=c??"",J=(i==null?void 0:i.icon)??"",ot=(i==null?void 0:i.mode)==="On",tt=G||"Submit",q={fontSettings:{fontFamily:p,fontWeight:(l==null?void 0:l.fontWeight)??400,fontStyle:(l==null?void 0:l.fontStyle)??"normal"},fontSize:w??.01,lineHeight:y,letterSpacing:m??0,wordSpacing:u??0,textAppearance:d,color:t.inputTextColor??"#111111"},nt={fontSettings:{fontFamily:p,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:f,letterSpacing:$??0,wordSpacing:M??0,textAppearance:P,color:t.buttonTextColor??"#ffffff"},vt={fontSettings:{fontFamily:p,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:h??.01,lineHeight:L,letterSpacing:R??0,wordSpacing:W??0,textAppearance:k,color:t.successColor??"#22c55e"},st=Zt(q,e),pt=Zt(nt,e),kt=Zt(vt,e),{color:et,...lt}=kt,Ct=F.buildColorVars(r,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(q==null?void 0:q.color)??"#111111",buttonTextColor:t.buttonTextColor??(nt==null?void 0:nt.color)??"#ffffff"},As,Is,D),Ht={borderRadius:F.scalingValue(O,e),borderWidth:F.scalingValue(U,e),borderStyle:"solid"},be={borderLeftWidth:F.scalingValue(U,e)},gn=async ht=>{ht.preventDefault();const Se=Object.fromEntries(v.map($t=>{var Ft;return[$t.name,((Ft=V[$t.name])==null?void 0:Ft.trim())??""]}).filter(([,$t])=>$t));if(!H){Q("error"),E("No integrations were found for this form.");return}if(Object.keys(Se).length===0)return;const oe=F.getFormFieldValidationError(v,V);if(oe){Q("error"),E(oe);return}Q("submitting"),E(null);try{const $t=await fetch(H,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Se)});if(!$t.ok){const Ft=await $t.text();throw new Error(Ft||`Request failed: ${$t.status}`)}Q("success"),X(Object.fromEntries(v.map(Ft=>[Ft.name,""])))}catch($t){Q("error"),E($t instanceof Error?$t.message:"Something went wrong")}};return x.jsxs("div",{className:`${r}-wrapper ${S}`.trim(),style:Ct,children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:Es(r)}}),x.jsxs("form",{onSubmit:gn,className:`${r}-form`,style:{...Ht,height:F.scalingValue(B,e),minHeight:F.scalingValue(B,e)},children:[x.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:v.map(ht=>x.jsx("input",{type:ht.type==="email"?"email":ht.type==="phone"?"tel":"text",name:ht.name,autoComplete:"off",value:it[ht.name]??"",onChange:Se=>X(oe=>({...oe,[ht.name]:Se.target.value})),placeholder:ht.placeholder,required:ht.isRequired??ht.type==="email",className:`${r}-input`,style:{...st,paddingRight:F.scalingValue(g.right,e),paddingLeft:F.scalingValue(g.left,e),paddingTop:F.scalingValue(g.top,e),paddingBottom:F.scalingValue(g.bottom,e)}},ht.name))}),x.jsx("div",{className:`${r}-overlayAnchor`,children:x.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":tt,style:{...pt,...be,paddingRight:F.scalingValue(A.right,e),paddingLeft:F.scalingValue(A.left,e),paddingTop:F.scalingValue(A.top,e),paddingBottom:F.scalingValue(A.bottom,e)},children:rt==="submitting"?"...":ot?J&&x.jsx(de,{url:J,className:`${r}-submitBtnIcon`,fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):G})})]}),K==="success"&&x.jsx("p",{className:`${r}-success`,style:{...kt},children:I}),K==="error"&&x.jsx("p",{className:`${r}-error`,style:{...lt},role:"alert",children:mt??ft??_})]})},As={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"},Is=["hover","focus","filled","success","error"],ks=`import React, { useState } from 'react';
915
+ `}const El=({settings:t,isEditor:e,metadata:n,activeEvent:o})=>{const{prefix:r}=F.useScopedStyles(),{fields:a=[{name:"email",type:"email",placeholder:"Your email"}],buttonContent:i,buttonLabel:c,fieldsToShow:l=1,fontFamily:p,inputFontSettings:s,inputFontSize:w,inputLineHeight:y,inputLetterSpacing:m,inputWordSpacing:u,inputTextAppearance:d,buttonFontSettings:C,buttonFontSize:b,buttonLineHeight:f,buttonLetterSpacing:$,buttonWordSpacing:M,buttonTextAppearance:P,statusFontSettings:T,statusFontSize:h,statusLineHeight:L,statusLetterSpacing:R,statusWordSpacing:W,statusTextAppearance:k,minHeight:B,corners:O,stroke:U,stateOverrides:D,inputPadding:g,buttonPadding:A,successMessage:I="Thanks for subscribing!",errorMessage:_="Please, fill all required fields."}=t,v=a.slice(0,Math.min(l,a.length)),[V,X]=j.useState(()=>Object.fromEntries(v.map(ft=>[ft.name,""]))),[rt,Q]=j.useState("idle"),[ut,E]=j.useState(null),K=o==="success"?"success":o==="error"?"error":rt,ht=o==="error"?_:ut,it=o==="filled"?Object.fromEntries(v.map(ft=>[ft.name,"Filled"])):V,mt=K==="error"?F.getFormFieldValidationError(v,it):null,bt=o&&o!=="default"?`${r}-state-${o}`:"",Mt=v.some(ft=>(it[ft.name]??"").trim().length>0),z=bt!==`${r}-state-filled`&&Mt?`${r}-state-filled`:"",S=`${bt} ${z}`.trim(),H=n==null?void 0:n.submitUrl,G=c??"",J=(i==null?void 0:i.icon)??"",ot=(i==null?void 0:i.mode)==="On",tt=G||"Submit",q={fontSettings:{fontFamily:p,fontWeight:(s==null?void 0:s.fontWeight)??400,fontStyle:(s==null?void 0:s.fontStyle)??"normal"},fontSize:w??.01,lineHeight:y,letterSpacing:m??0,wordSpacing:u??0,textAppearance:d,color:t.inputTextColor??"#111111"},nt={fontSettings:{fontFamily:p,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:b??.01,lineHeight:f,letterSpacing:$??0,wordSpacing:M??0,textAppearance:P,color:t.buttonTextColor??"#ffffff"},vt={fontSettings:{fontFamily:p,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:h??.01,lineHeight:L,letterSpacing:R??0,wordSpacing:W??0,textAppearance:k,color:t.successColor??"#22c55e"},lt=me(Qt(q,e)),pt=me(Qt(nt,e)),kt=me(Qt(vt,e)),et=F.buildColorVars(r,{strokeColor:t.strokeColor,inputColor:t.inputColor,placeholderColor:t.placeholderColor,buttonColor:t.buttonColor,successColor:t.successColor,errorColor:t.errorColor,inputTextColor:t.inputTextColor??(q==null?void 0:q.color)??"#111111",buttonTextColor:t.buttonTextColor??(nt==null?void 0:nt.color)??"#ffffff"},Ll,Al,D),st={borderRadius:F.scalingValue(O,e),borderWidth:F.scalingValue(U,e),borderStyle:"solid"},Ct={borderLeftWidth:F.scalingValue(U,e)},Ht=async ft=>{ft.preventDefault();const re=Object.fromEntries(v.map($t=>{var Ft;return[$t.name,((Ft=V[$t.name])==null?void 0:Ft.trim())??""]}).filter(([,$t])=>$t));if(!H){Q("error"),E("No integrations were found for this form.");return}if(Object.keys(re).length===0)return;const Jt=F.getFormFieldValidationError(v,V);if(Jt){Q("error"),E(Jt);return}Q("submitting"),E(null);try{const $t=await fetch(H,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(re)});if(!$t.ok){const Ft=await $t.text();throw new Error(Ft||`Request failed: ${$t.status}`)}Q("success"),X(Object.fromEntries(v.map(Ft=>[Ft.name,""])))}catch($t){Q("error"),E($t instanceof Error?$t.message:"Something went wrong")}};return x.jsxs("div",{className:`${r}-wrapper ${S}`.trim(),style:et,children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:Tl(r)}}),x.jsxs("form",{onSubmit:Ht,className:`${r}-form`,style:{...st,height:F.scalingValue(B,e),minHeight:F.scalingValue(B,e)},children:[x.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:v.map(ft=>x.jsx("input",{type:ft.type==="email"?"email":ft.type==="phone"?"tel":"text",name:ft.name,autoComplete:"off",value:it[ft.name]??"",onChange:re=>X(Jt=>({...Jt,[ft.name]:re.target.value})),placeholder:ft.placeholder,required:ft.isRequired??ft.type==="email",className:`${r}-input`,style:{...lt,paddingRight:F.scalingValue(g.right,e),paddingLeft:F.scalingValue(g.left,e),paddingTop:F.scalingValue(g.top,e),paddingBottom:F.scalingValue(g.bottom,e)}},ft.name))}),x.jsx("div",{className:`${r}-overlayAnchor`,children:x.jsx("button",{type:"submit",className:`${r}-submitBtn`,"aria-label":tt,style:{...pt,...Ct,paddingRight:F.scalingValue(A.right,e),paddingLeft:F.scalingValue(A.left,e),paddingTop:F.scalingValue(A.top,e),paddingBottom:F.scalingValue(A.bottom,e)},children:rt==="submitting"?"...":ot?J&&x.jsx(ge,{url:J,className:`${r}-submitBtnIcon`,fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):G})})]}),K==="success"&&x.jsx("p",{className:`${r}-success`,style:{...kt},children:I}),K==="error"&&x.jsx("p",{className:`${r}-error`,style:{...kt},role:"alert",children:mt??ht??_})]})},Ll={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"},Al=["hover","focus","filled","success","error"],Il=`import React, { useState } from 'react';
907
916
  import { CommonComponentProps } from '../props';
908
917
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
909
- import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
918
+ import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
910
919
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
911
920
 
912
921
  function sv(px: number): string {
@@ -1222,10 +1231,9 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
1222
1231
  color: settings.successColor ?? '#22c55e',
1223
1232
  };
1224
1233
 
1225
- const inputCss = textStylesToCss(resolvedInputTextStyle, isEditor);
1226
- const buttonCss = textStylesToCss(resolvedButtonTextStyle, isEditor);
1227
- const statusCss = textStylesToCss(resolvedStatusTextStyle, isEditor);
1228
- const { color: _statusMessageColor, ...statusTypographyCss } = statusCss;
1234
+ const inputTypographyCss = omitTextColors(textStylesToCss(resolvedInputTextStyle, isEditor));
1235
+ const buttonTypographyCss = omitTextColors(textStylesToCss(resolvedButtonTextStyle, isEditor));
1236
+ const statusTypographyCss = omitTextColors(textStylesToCss(resolvedStatusTextStyle, isEditor));
1229
1237
  const colorVars = buildColorVars(P, {
1230
1238
  strokeColor: settings.strokeColor,
1231
1239
  inputColor: settings.inputColor,
@@ -1315,7 +1323,7 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
1315
1323
  required={field.isRequired ?? field.type === 'email'}
1316
1324
  className={\`\${P}-input\`}
1317
1325
  style={{
1318
- ...inputCss,
1326
+ ...inputTypographyCss,
1319
1327
  paddingRight: scalingValue(inputPadding.right, isEditor),
1320
1328
  paddingLeft: scalingValue(inputPadding.left, isEditor),
1321
1329
  paddingTop: scalingValue(inputPadding.top, isEditor),
@@ -1330,7 +1338,7 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
1330
1338
  className={\`\${P}-submitBtn\`}
1331
1339
  aria-label={submitAriaLabel}
1332
1340
  style={{
1333
- ...buttonCss,
1341
+ ...buttonTypographyCss,
1334
1342
  ...dividerWidthStyle,
1335
1343
  paddingRight: scalingValue(buttonPadding.right, isEditor),
1336
1344
  paddingLeft: scalingValue(buttonPadding.left, isEditor),
@@ -1356,7 +1364,7 @@ export const OnelinerForm = ({ settings, isEditor, metadata, activeEvent }: Onel
1356
1364
  {displayStatus === 'success' && (
1357
1365
  <p
1358
1366
  className={\`\${P}-success\`}
1359
- style={{ ...statusCss }}
1367
+ style={{ ...statusTypographyCss }}
1360
1368
  >
1361
1369
  {successMessage}
1362
1370
  </p>
@@ -1463,4 +1471,4 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
1463
1471
  };
1464
1472
 
1465
1473
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1466
- `,Fs="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="6" height="9"><path fill="white" transform="translate(0.0625 0.0595703)" d="M0.18305826 0.18305826C0.40836075 -0.042244215 0.76288015 -0.059575174 1.0080621 0.13106538L1.0669417 0.18305826L4.8169417 3.9330583C5.0422444 4.158361 5.0595751 4.5128803 4.8689346 4.7580624L4.8169417 4.8169417L1.0669417 8.5669422C0.82286406 8.8110189 0.42713594 8.8110189 0.18305826 8.5669422C-0.042244215 8.3416395 -0.059575174 7.9871197 0.13106538 7.7419376L0.18305826 7.6830583L3.4906249 4.375L0.18305826 1.0669417C-0.042244215 0.84163928 -0.059575174 0.48711985 0.13106538 0.24193785L0.18305826 0.18305826Z" fill-rule="evenodd"/></svg>'),Rs=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],Sn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Bs=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Vs={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"number"},min:1,max:3},fields:{type:"array",scope:"common",display:{type:"fields-group"},items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["text","phone","email"]},placeholder:{type:"string"},label:{type:"string"},isRequired:{type:"boolean"},error:{type:"string"}}}},buttonLabel:{type:"string",scope:"common",title:"Button Label",display:{type:"text-input"}},buttonContent:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-content-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},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:{...Sn.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:{...Sn.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:{...Sn.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:Rs,fieldsToShow:1,buttonLabel:"Subscribe",buttonContent:{mode:"Off",icon:Fs},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,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,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:"buttonContent.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonTextAppearance.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","buttonContent"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["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:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Bs],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Os={element:Ls,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.png"},defaultSize:{width:400,height:60},schema:Vs,sourceCode:ks},Ps=[Ca,Aa,ys,Ts,Os];exports.components=Ps;exports.isSchemaV1=mr;
1474
+ `,kl="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="6" height="9"><path fill="white" transform="translate(0.0625 0.0595703)" d="M0.18305826 0.18305826C0.40836075 -0.042244215 0.76288015 -0.059575174 1.0080621 0.13106538L1.0669417 0.18305826L4.8169417 3.9330583C5.0422444 4.158361 5.0595751 4.5128803 4.8689346 4.7580624L4.8169417 4.8169417L1.0669417 8.5669422C0.82286406 8.8110189 0.42713594 8.8110189 0.18305826 8.5669422C-0.042244215 8.3416395 -0.059575174 7.9871197 0.13106538 7.7419376L0.18305826 7.6830583L3.4906249 4.375L0.18305826 1.0669417C-0.042244215 0.84163928 -0.059575174 0.48711985 0.13106538 0.24193785L0.18305826 0.18305826Z" fill-rule="evenodd"/></svg>'),Fl=[{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"company",type:"text",placeholder:"Enter company",label:"Company",isRequired:!1,error:"Please, enter your company name."},{name:"phone",type:"phone",placeholder:"Enter your phone",label:"Phone",isRequired:!1,error:"Please, enter a valid phone number."}],bn={fontSettings:{type:"object",display:{type:"font-settings-weight",visible:!0},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Rl=["strokeColor","inputColor","inputTextColor","placeholderColor","buttonColor","buttonTextColor","successColor","errorColor"],Bl={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"}},buttonContent:{type:"object",scope:"common",title:"Button Icon",display:{type:"button-content-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},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:{...bn.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:{...bn.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:{...bn.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:Fl,fieldsToShow:1,buttonLabel:"Subscribe",buttonContent:{mode:"Off",icon:kl},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,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,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:"buttonContent.mode",value:"On"},then:{name:"properties.buttonFontSettings.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonFontSize.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonLineHeight.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonLetterSpacing.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonWordSpacing.display.visible",value:!1}},{if:{name:"buttonContent.mode",value:"On"},then:{name:"properties.buttonTextAppearance.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","buttonContent"]},{type:"switcher",title:"Padding",options:{Input:["inputPadding"],Button:["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:["statusFontSettings",{type:"row",items:["statusFontSize","statusLineHeight","statusLetterSpacing","statusWordSpacing"]},"statusTextAppearance"]}]},{id:"fields",icon:"layers",title:"Fields",tooltip:"Fields",layout:["fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...Rl],panelIds:["general","typeStyle"],stateItems:{default:["strokeColor","placeholderColor","inputColor","buttonTextColor","buttonColor"],hover:["strokeColor","inputColor","buttonTextColor","buttonColor"],focus:["strokeColor","inputTextColor","buttonTextColor","buttonColor"],filled:["strokeColor","inputColor","inputTextColor","buttonTextColor"],success:["successColor"],error:["errorColor"]}},allowedPlugins:["newsletter"],states:["default","hover","focus","filled","success","error"]},Vl={element:El,id:"oneliner-form",name:"Newsletter Single Line",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/onelinerImg.png"},defaultSize:{width:400,height:60},schema:Bl,sourceCode:Il},Ol=[xa,La,hl,wl,Vl];exports.components=Ol;exports.isSchemaV1=gr;