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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +37 -37
  2. package/dist/index.mjs +3163 -3134
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Xe=require("classnames"),L=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),Ni=require("react-dom");function Us(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Xs="ControlSlider-module__hoverArrow___A-dOH",Ys="ControlSlider-module__sliderItem___QQSkR",Js="ControlSlider-module__sliderImage___9hRl-",Zs="ControlSlider-module__arrow___05ghY",Qs="ControlSlider-module__arrowVertical___tBfVN",el="ControlSlider-module__nextArrow___-30Yc",tl="ControlSlider-module__arrowInner___aEra3",nl="ControlSlider-module__arrowIcon___S4ztF",il="ControlSlider-module__arrowImg___2dwJW",ol="ControlSlider-module__mirror___brd6U",rl="ControlSlider-module__pagination___bicLF",al="ControlSlider-module__paginationInner___bT-P-",sl="ControlSlider-module__paginationVertical___zYqKw",ll="ControlSlider-module__paginationItem___nTRbk",cl="ControlSlider-module__dot___p1Qun",dl="ControlSlider-module__activeDot___LHFaj",ul="ControlSlider-module__paginationInsideBottom___R3FWn",pl="ControlSlider-module__paginationInsideTop___V-qb-",ml="ControlSlider-module__paginationOutsideBottom___14w8D",gl="ControlSlider-module__paginationOutsideTop___SCLqB",hl="ControlSlider-module__paginationInsideLeft___yOBRZ",fl="ControlSlider-module__paginationInsideRight___Rtt3o",yl="ControlSlider-module__paginationOutsideLeft___lahaw",vl="ControlSlider-module__paginationOutsideRight___EtuQa",bl="ControlSlider-module__imgWrapper___UjEgB",xl="ControlSlider-module__captionBlock___dJ6-j",wl="ControlSlider-module__captionTextWrapper___HFlpf",Sl="ControlSlider-module__captionText___uGBVc",$l="ControlSlider-module__active___WZK4G",Cl="ControlSlider-module__withPointerEvents___t-18M",Tl="ControlSlider-module__topLeftAlignment___zjnGM",Ll="ControlSlider-module__topCenterAlignment___gD1xW",El="ControlSlider-module__topRightAlignment___NMapS",Pl="ControlSlider-module__middleLeftAlignment___OnUrY",Il="ControlSlider-module__middleCenterAlignment___Tdkl0",Al="ControlSlider-module__middleRightAlignment___wEbfX",_l="ControlSlider-module__bottomLeftAlignment___cTP2-",Rl="ControlSlider-module__bottomCenterAlignment___c54fB",kl="ControlSlider-module__bottomRightAlignment___kEwrz",Ml="ControlSlider-module__clickOverlay___DZA28",Wl="ControlSlider-module__contain___pLyq7",Fl="ControlSlider-module__cover___KdDat",Ee={wrapper:Gs,hoverArrow:Xs,sliderItem:Ys,sliderImage:Js,arrow:Zs,arrowVertical:Qs,nextArrow:el,arrowInner:tl,arrowIcon:nl,arrowImg:il,mirror:ol,pagination:rl,paginationInner:al,paginationVertical:sl,paginationItem:ll,dot:cl,activeDot:dl,paginationInsideBottom:ul,paginationInsideTop:pl,paginationOutsideBottom:ml,paginationOutsideTop:gl,paginationInsideLeft:hl,paginationInsideRight:fl,paginationOutsideLeft:yl,paginationOutsideRight:vl,imgWrapper:bl,captionBlock:xl,captionTextWrapper:wl,captionText:Sl,active:$l,withPointerEvents:Cl,topLeftAlignment:Tl,topCenterAlignment:Ll,topRightAlignment:El,middleLeftAlignment:Pl,middleCenterAlignment:Il,middleRightAlignment:Al,bottomLeftAlignment:_l,bottomCenterAlignment:Rl,bottomRightAlignment:kl,clickOverlay:Ml,contain:Wl,cover:Fl};function Nl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Hl(e,t,n){return t&&Nl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ur="(prefers-reduced-motion: reduce)",si=1,Ol=2,ui=3,bi=4,Hi=5,lo=6,vo=7,Bl={CREATED:si,MOUNTED:Ol,IDLE:ui,MOVING:bi,SCROLLING:Hi,DRAGGING:lo,DESTROYED:vo};function Cn(e){e.length=0}function Nn(e,t,n){return Array.prototype.slice.call(e,t,n)}function mt(e){return e.bind.apply(e,[null].concat(Nn(arguments,1)))}var Ya=setTimeout,rr=function(){};function Gr(e){return requestAnimationFrame(e)}function To(e,t){return typeof t===e}function Ei(e){return!vr(e)&&To("object",e)}var yr=Array.isArray,Ja=mt(To,"function"),Mn=mt(To,"string"),Oi=mt(To,"undefined");function vr(e){return e===null}function Za(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Bi(e){return yr(e)?e:[e]}function en(e,t){Bi(e).forEach(t)}function br(e,t){return e.indexOf(t)>-1}function co(e,t){return e.push.apply(e,Bi(t)),e}function bn(e,t,n){e&&en(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function dn(e,t){bn(e,Mn(t)?t.split(" "):t,!0)}function ji(e,t){en(t,e.appendChild.bind(e))}function xr(e,t){en(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Pi(e,t){return Za(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qa(e,t){var n=e?Nn(e.children):[];return t?n.filter(function(i){return Pi(i,t)}):n}function zi(e,t){return t?Qa(e,t)[0]:e.firstElementChild}var Ii=Object.keys;function Gn(e,t,n){return e&&(n?Ii(e).reverse():Ii(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Ai(e){return Nn(arguments,1).forEach(function(t){Gn(t,function(n,i){e[i]=t[i]})}),e}function kn(e){return Nn(arguments,1).forEach(function(t){Gn(t,function(n,i){yr(n)?e[i]=n.slice():Ei(n)?e[i]=kn({},Ei(e[i])?e[i]:{},n):e[i]=n})}),e}function Xr(e,t){en(t||Ii(e),function(n){delete e[n]})}function un(e,t){en(e,function(n){en(t,function(i){n&&n.removeAttribute(i)})})}function je(e,t,n){Ei(t)?Gn(t,function(i,o){je(e,o,i)}):en(e,function(i){vr(n)||n===""?un(i,t):i.setAttribute(t,String(n))})}function li(e,t,n){var i=document.createElement(e);return t&&(Mn(t)?dn(i,t):je(i,t)),n&&ji(n,i),i}function rn(e,t,n){if(Oi(n))return getComputedStyle(e)[t];vr(n)||(e.style[t]=""+n)}function _i(e,t){rn(e,"display",t)}function es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function an(e,t){return e.getAttribute(t)}function Yr(e,t){return e&&e.classList.contains(t)}function Yt(e){return e.getBoundingClientRect()}function Xn(e){en(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ts(e){return zi(new DOMParser().parseFromString(e,"text/html").body)}function vn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ns(e,t){return e&&e.querySelector(t)}function wr(e,t){return t?Nn(e.querySelectorAll(t)):[]}function xn(e,t){bn(e,t,!1)}function ar(e){return e.timeStamp}function zn(e){return Mn(e)?e:e?e+"px":""}var Vi="splide",Sr="data-"+Vi;function Ci(e,t){if(!e)throw new Error("["+Vi+"] "+(t||""))}var Wn=Math.min,bo=Math.max,xo=Math.floor,Ri=Math.ceil,Kt=Math.abs;function is(e,t,n){return Kt(e-t)<n}function uo(e,t,n,i){var o=Wn(t,n),s=bo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function oi(e,t,n){var i=Wn(t,n),o=bo(t,n);return Wn(bo(i,e),o)}function sr(e){return+(e>0)-+(e<0)}function lr(e,t){return en(t,function(n){e=e.replace("%s",""+n)}),e}function $r(e){return e<10?"0"+e:""+e}var Jr={};function jl(e){return""+e+$r(Jr[e]=(Jr[e]||0)+1)}function os(){var e=[];function t(a,d,l,p){o(a,d,function(u,w,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,w,l,p):u.removeListener.bind(u,l);v?u.addEventListener(w,l,p):u.addListener(l),e.push([u,w,x,l,m])})}function n(a,d,l){o(a,d,function(p,u,w){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===w&&(!l||x[3]===l)?(x[4](),!1):!0})})}function i(a,d,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,l)),a.dispatchEvent(p),p}function o(a,d,l){en(a,function(p){p&&en(d,function(u){u.split(" ").forEach(function(w){var x=w.split(".");l(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),Cn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Hn="mounted",cr="ready",Tn="move",xi="moved",Cr="click",rs="active",as="inactive",ss="visible",ls="hidden",Pt="refresh",jt="updated",pi="resize",Lo="resized",cs="drag",ds="dragging",us="dragged",Eo="scroll",Jn="scrolled",zl="overflow",Tr="destroy",ps="arrows:mounted",ms="arrows:updated",gs="pagination:mounted",hs="pagination:updated",Lr="navigation:mounted",Er="autoplay:play",fs="autoplay:playing",Pr="autoplay:pause",Ir="lazyload:loaded",ys="sk",vs="sh",wo="ei";function wt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=os();function i(s,a){n.bind(t,Bi(s).join(" "),function(d){a.apply(a,yr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Nn(arguments,1))}return e&&e.event.on(Tr,n.destroy),Ai(n,{bus:t,on:i,off:mt(n.unbind,t),emit:o})}function Po(e,t,n,i){var o=Date.now,s,a=0,d,l=!0,p=0;function u(){if(!l){if(a=e?Wn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=Gr(u)}}function w($){$||m(),s=o()-($?a*e:0),l=!1,d=Gr(u)}function x(){l=!0}function v(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,l=!0}function f($){e=$}function E(){return l}return{start:w,rewind:v,pause:x,cancel:m,set:f,isPaused:E}}function Vl(e){var t=e;function n(o){t=o}function i(o){return br(Bi(o),t)}return{set:n,is:i}}function Dl(e,t){var n=Po(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=os(),d=[];function l(){var m=n.mediaQuery==="min";Ii(o).sort(function(f,E){return m?+f-+E:+E-+f}).forEach(function(f){u(o[f],"("+(m?"min":"max")+"-width:"+f+"px)")}),u(s,Ur),w()}function p(m){m&&a.destroy()}function u(m,f){var E=matchMedia(f);a.bind(E,"change",w),d.push([m,E])}function w(){var m=i.is(vo),f=n.direction,E=d.reduce(function($,C){return kn($,C[1].matches?C[0]:{})},{});Xr(n),v(E),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):f!==n.direction&&e.refresh()}function x(m){matchMedia(Ur).matches&&(m?kn(n,s):Xr(n,Ii(s)))}function v(m,f,E){kn(n,m),f&&kn(Object.getPrototypeOf(n),m),(E||!i.is(si))&&e.emit(jt,n)}return{setup:l,destroy:p,reduce:x,set:v}}var Io="Arrow",Ao=Io+"Left",_o=Io+"Right",bs=Io+"Up",xs=Io+"Down",Zr="rtl",Ro="ttb",jo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bs,_o],ArrowRight:[xs,Ao]};function Kl(e,t,n){function i(s,a,d){d=d||n.direction;var l=d===Zr&&!a?1:d===Ro?0:-1;return jo[s]&&jo[s][l]||s.replace(/width|left|right/i,function(p,u){var w=jo[p.toLowerCase()][l]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===Zr?1:-1)}return{resolve:i,orient:o}}var wn="role",ci="tabindex",Ul="disabled",ln="aria-",Di=ln+"controls",ws=ln+"current",Qr=ln+"selected",Jt=ln+"label",Ar=ln+"labelledby",Ss=ln+"hidden",_r=ln+"orientation",ki=ln+"roledescription",ea=ln+"live",ta=ln+"busy",na=ln+"atomic",Rr=[wn,ci,Ul,Di,ws,Jt,Ar,Ss,_r,ki],pn=Vi+"__",On="is-",zo=Vi,ia=pn+"track",Gl=pn+"list",ko=pn+"slide",$s=ko+"--clone",Xl=ko+"__container",kr=pn+"arrows",Mo=pn+"arrow",Cs=Mo+"--prev",Ts=Mo+"--next",Wo=pn+"pagination",Ls=Wo+"__page",Yl=pn+"progress",Jl=Yl+"__bar",Zl=pn+"toggle",Ql=pn+"spinner",ec=pn+"sr",tc=On+"initialized",Yn=On+"active",Es=On+"prev",Ps=On+"next",dr=On+"visible",ur=On+"loading",Is=On+"focus-in",As=On+"overflow",nc=[Yn,dr,Es,Ps,ur,Is,As],ic={slide:ko,clone:$s,arrows:kr,arrow:Mo,prev:Cs,next:Ts,pagination:Wo,page:Ls,spinner:Ql};function oc(e,t){if(Ja(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Pi(n,t);)n=n.parentElement;return n}var rc=5,oa=200,_s="touchstart mousedown",Vo="touchmove mousemove",Do="touchend touchcancel mouseup click";function ac(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,l={},p=[],u=[],w=[],x,v,m;function f(){S(),M(),C()}function E(){o(Pt,$),o(Pt,f),o(jt,C),s(document,_s+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){bn(a,Is,!!m)})}function $(b){var R=Rr.concat("style");Cn(p),xn(a,u),xn(x,w),un([x,v],R),un(a,b?R:["style",ki])}function C(){xn(a,u),xn(x,w),u=W(zo),w=W(ia),dn(a,u),dn(x,w),je(a,Jt,n.label),je(a,Ar,n.labelledby)}function S(){x=I("."+ia),v=zi(x,"."+Gl),Ci(x&&v,"A track/list element is missing."),co(p,Qa(v,"."+ko+":not(."+$s+")")),Gn({arrows:kr,pagination:Wo,prev:Cs,next:Ts,bar:Jl,toggle:Zl},function(b,R){l[R]=I("."+b)}),Ai(l,{root:a,track:x,list:v,slides:p})}function M(){var b=a.id||jl(Vi),R=n.role;a.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!an(a,wn)&&a.tagName!=="SECTION"&&R&&je(a,wn,R),je(a,ki,d.carousel),je(v,wn,"presentation")}function I(b){var R=ns(a,b);return R&&oc(R,"."+zo)===a?R:void 0}function W(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===zo&&Yn]}return Ai(l,{setup:f,mount:E,destroy:$})}var mi="slide",wi="loop",qi="fade";function sc(e,t,n,i){var o=wt(e),s=o.on,a=o.emit,d=o.bind,l=e.Components,p=e.root,u=e.options,w=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,f=u.slideFocus,E=l.Direction.resolve,$=an(i,"style"),C=an(i,Jt),S=n>-1,M=zi(i,"."+Xl),I;function W(){S||(i.id=p.id+"-slide"+$r(t+1),je(i,wn,m?"tabpanel":"group"),je(i,ki,v.slide),je(i,Jt,C||lr(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",mt(a,Cr,X)),d(i,"keydown",mt(a,ys,X)),s([xi,vs,Jn],T),s(Lr,V),x&&s(Tn,g)}function R(){I=!0,o.destroy(),xn(i,nc),un(i,Rr),je(i,"style",$),je(i,Jt,C||"")}function V(){var q=e.splides.map(function(O){var Y=O.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");je(i,Jt,lr(v.slideX,(S?n:t)+1)),je(i,Di,q),je(i,wn,f?"button":""),f&&un(i,ki)}function g(){I||T()}function T(){if(!I){var q=e.index;_(),H(),bn(i,Es,t===q-1),bn(i,Ps,t===q+1)}}function _(){var q=se();q!==Yr(i,Yn)&&(bn(i,Yn,q),je(i,ws,w&&q||""),a(q?rs:as,X))}function H(){var q=j(),O=!q&&(!se()||S);if(e.state.is([bi,Hi])||je(i,Ss,O||""),je(wr(i,u.focusableNodes||""),ci,O?-1:""),f&&je(i,ci,O?-1:0),q!==Yr(i,dr)&&(bn(i,dr,q),a(q?ss:ls,X)),!q&&document.activeElement===i){var Y=l.Slides.getAt(e.index);Y&&es(Y.slide)}}function K(q,O,Y){rn(Y&&M||i,q,O)}function se(){var q=e.index;return q===t||u.cloneStatus&&q===n}function j(){if(e.is(qi))return se();var q=Yt(l.Elements.track),O=Yt(i),Y=E("left",!0),te=E("right",!0);return xo(q[Y])<=Ri(O[Y])&&xo(O[te])<=Ri(q[te])}function k(q,O){var Y=Kt(q-t);return!S&&(u.rewind||e.is(wi))&&(Y=Wn(Y,e.length-Y)),Y<=O}var X={index:t,slideIndex:n,slide:i,container:M,isClone:S,mount:W,destroy:R,update:T,style:K,isWithin:k};return X}function lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,l=d.slides,p=d.list,u=[];function w(){x(),o(Pt,v),o(Pt,x)}function x(){l.forEach(function(T,_){f(T,_,-1)})}function v(){I(function(T){T.destroy()}),Cn(u)}function m(){I(function(T){T.update()})}function f(T,_,H){var K=sc(e,_,H,T);K.mount(),u.push(K),u.sort(function(se,j){return se.index-j.index})}function E(T){return T?W(function(_){return!_.isClone}):u}function $(T){var _=t.Controller,H=_.toIndex(T),K=_.hasFocus()?1:n.perPage;return W(function(se){return uo(se.index,H,H+K-1)})}function C(T){return W(T)[0]}function S(T,_){en(T,function(H){if(Mn(H)&&(H=ts(H)),Za(H)){var K=l[_];K?xr(H,K):ji(p,H),dn(H,n.classes.slide),R(H,mt(s,pi))}}),s(Pt)}function M(T){Xn(W(T).map(function(_){return _.slide})),s(Pt)}function I(T,_){E(_).forEach(T)}function W(T){return u.filter(Ja(T)?T:function(_){return Mn(T)?Pi(_.slide,T):br(Bi(T),_.index)})}function b(T,_,H){I(function(K){K.style(T,_,H)})}function R(T,_){var H=wr(T,"img"),K=H.length;K?H.forEach(function(se){a(se,"load error",function(){--K||_()})}):_()}function V(T){return T?l.length:u.length}function g(){return u.length>n.perPage}return{mount:w,destroy:v,update:m,register:f,get:E,getIn:$,getAt:C,add:S,remove:M,forEach:I,filter:W,style:b,getLength:V,isEnough:g}}function cc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,x=p.list,v=d.getAt,m=d.style,f,E,$;function C(){S(),s(window,"resize load",Dl(mt(a,pi))),o([jt,Pt],S),o(pi,M)}function S(){f=n.direction===Ro,rn(u,"maxWidth",zn(n.width)),rn(w,l("paddingLeft"),I(!1)),rn(w,l("paddingRight"),I(!0)),M(!0)}function M(X){var q=Yt(u);(X||E.width!==q.width||E.height!==q.height)&&(rn(w,"height",W()),m(l("marginRight"),zn(n.gap)),m("width",R()),m("height",V(),!0),E=q,a(Lo),$!==($=k())&&(bn(u,As,$),a(zl,$)))}function I(X){var q=n.padding,O=l(X?"right":"left");return q&&zn(q[O]||(Ei(q)?0:q))||"0px"}function W(){var X="";return f&&(X=b(),Ci(X,"height or heightRatio is missing."),X="calc("+X+" - "+I(!1)+" - "+I(!0)+")"),X}function b(){return zn(n.height||Yt(x).width*n.heightRatio)}function R(){return n.autoWidth?null:zn(n.fixedWidth)||(f?"":g())}function V(){return zn(n.fixedHeight)||(f?n.autoHeight?null:g():b())}function g(){var X=zn(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function T(){return Yt(x)[l("width")]}function _(X,q){var O=v(X||0);return O?Yt(O.slide)[l("width")]+(q?0:se()):0}function H(X,q){var O=v(X);if(O){var Y=Yt(O.slide)[l("right")],te=Yt(x)[l("left")];return Kt(Y-te)+(q?0:se())}return 0}function K(X){return H(e.length-1)-H(0)+_(0,X)}function se(){var X=v(0);return X&&parseFloat(rn(X.slide,l("marginRight")))||0}function j(X){return parseFloat(rn(w,l("padding"+(X?"Right":"Left"))))||0}function k(){return e.is(qi)||K(!0)>T()}return{mount:C,resize:M,listSize:T,slideSize:_,sliderSize:K,totalSize:H,getPadding:j,isOverflow:k}}var dc=2;function uc(e,t,n){var i=wt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,l=[],p;function u(){o(Pt,w),o([jt,pi],v),(p=E())&&(m(p),t.Layout.resize(!0))}function w(){x(),u()}function x(){Xn(l),Cn(l),i.destroy()}function v(){var $=E();p!==$&&(p<$||!$)&&i.emit(Pt)}function m($){var C=a.get().slice(),S=C.length;if(S){for(;C.length<$;)co(C,C);co(C.slice(-$),C.slice(0,$)).forEach(function(M,I){var W=I<$,b=f(M.slide,I);W?xr(b,C[0].slide):ji(s.list,b),co(l,b),a.register(b,I-$+(W?0:S),M.index)})}}function f($,C){var S=$.cloneNode(!0);return dn(S,n.classes.clone),S.id=e.root.id+"-clone"+$r(C+1),S}function E(){var $=n.clones;if(!e.is(wi))$=0;else if(Oi($)){var C=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=C&&Ri(Yt(s.track)[d("width")]/C);$=S||n[d("autoWidth")]&&e.length||n.perPage*dc}return $}return{mount:u,destroy:x}}function pc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,l=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,f=v.orient,E=t.Elements,$=E.list,C=E.track,S;function M(){S=t.Transition,o([Hn,Lo,jt,Pt],I)}function I(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function W(O,Y,te,oe){O!==Y&&X(O>te)&&(T(),R(g(K(),O>te),!0)),a(bi),s(Tn,Y,te,O),S.start(Y,function(){a(ui),s(xi,Y,te,O),oe&&oe()})}function b(O){R(H(O,!0))}function R(O,Y){if(!e.is(qi)){var te=Y?O:V(O);rn($,"transform","translate"+m("X")+"("+te+"px)"),O!==te&&s(vs)}}function V(O){if(e.is(wi)){var Y=_(O),te=Y>t.Controller.getEnd(),oe=Y<0;(oe||te)&&(O=g(O,te))}return O}function g(O,Y){var te=O-k(Y),oe=x();return O-=f(oe*(Ri(Kt(te)/oe)||1))*(Y?1:-1),O}function T(){R(K(),!0),S.cancel()}function _(O){for(var Y=t.Slides.get(),te=0,oe=1/0,F=0;F<Y.length;F++){var ae=Y[F].index,h=Kt(H(ae,!0)-O);if(h<=oe)oe=h,te=ae;else break}return te}function H(O,Y){var te=f(u(O-1)-j(O));return Y?se(te):te}function K(){var O=m("left");return Yt($)[O]-Yt(C)[O]+f(p(!1))}function se(O){return n.trimSpace&&e.is(mi)&&(O=oi(O,0,f(x(!0)-w()))),O}function j(O){var Y=n.focus;return Y==="center"?(w()-l(O,!0))/2:+Y*l(O)||0}function k(O){return H(O?t.Controller.getEnd():0,!!n.trimSpace)}function X(O){var Y=f(g(K(),O));return O?Y>=0:Y<=$[m("scrollWidth")]-Yt(C)[m("width")]}function q(O,Y){Y=Oi(Y)?K():Y;var te=O!==!0&&f(Y)<f(k(!1)),oe=O!==!1&&f(Y)>f(k(!0));return te||oe}return{mount:M,move:W,jump:b,translate:R,shift:g,cancel:T,toIndex:_,toPosition:H,getPosition:K,getLimit:k,exceededLimit:q,reposition:I}}function mc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,l=a.getLimit,p=a.toPosition,u=t.Slides,w=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(wi),f=e.is(mi),E=mt(K,!1),$=mt(K,!0),C=n.start||0,S,M=C,I,W,b;function R(){V(),o([jt,Pt,wo],V),o(Lo,g)}function V(){I=x(!0),W=n.perMove,b=n.perPage,S=X();var h=oi(C,0,v?S:I-1);h!==C&&(C=h,a.reposition())}function g(){S!==X()&&s(wo)}function T(h,ie,he){if(!ae()){var fe=H(h),We=k(fe);We>-1&&(ie||We!==C)&&(te(We),a.move(fe,We,M,he))}}function _(h,ie,he,fe){t.Scroll.scroll(h,ie,he,function(){var We=k(a.toIndex(d()));te(v?Wn(We,S):We),fe&&fe()})}function H(h){var ie=C;if(Mn(h)){var he=h.match(/([+\-<>])(\d+)?/)||[],fe=he[1],We=he[2];fe==="+"||fe==="-"?ie=se(C+ +(""+fe+(+We||1)),C):fe===">"?ie=We?q(+We):E(!0):fe==="<"&&(ie=$(!0))}else ie=m?h:oi(h,0,S);return ie}function K(h,ie){var he=W||(F()?1:b),fe=se(C+he*(h?-1:1),C,!(W||F()));return fe===-1&&f&&!is(d(),l(!h),1)?h?0:S:ie?fe:k(fe)}function se(h,ie,he){if(w()||F()){var fe=j(h);fe!==h&&(ie=h,h=fe,he=!1),h<0||h>S?!W&&(uo(0,h,ie,!0)||uo(S,ie,h,!0))?h=q(O(h)):m?h=he?h<0?-(I%b||b):I:h:n.rewind?h=h<0?S:0:h=-1:he&&h!==ie&&(h=q(O(ie)+(h<ie?-1:1)))}else h=-1;return h}function j(h){if(f&&n.trimSpace==="move"&&h!==C)for(var ie=d();ie===p(h,!0)&&uo(h,0,e.length-1,!n.rewind);)h<C?--h:++h;return h}function k(h){return m?(h+I)%I||0:h}function X(){for(var h=I-(F()||m&&W?1:b);v&&h-- >0;)if(p(I-1,!0)!==p(h,!0)){h++;break}return oi(h,0,I-1)}function q(h){return oi(F()?h:b*h,0,S)}function O(h){return F()?Wn(h,S):xo((h>=S?I-1:h)/b)}function Y(h){var ie=a.toIndex(h);return f?oi(ie,0,S):ie}function te(h){h!==C&&(M=C,C=h)}function oe(h){return h?M:C}function F(){return!Oi(n.focus)||n.isNavigation}function ae(){return e.state.is([bi,Hi])&&!!n.waitForTransition}return{mount:R,go:T,scroll:_,getNext:E,getPrev:$,getAdjacent:K,getEnd:X,setIndex:te,getIndex:oe,toIndex:q,toPage:O,toDest:Y,hasFocus:F,isBusy:ae}}var gc="http://www.w3.org/2000/svg",hc="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",Xi=40;function fc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,x=p.track,v=w,m=p.prev,f=p.next,E,$,C={};function S(){I(),o(jt,M)}function M(){W(),S()}function I(){var _=n.arrows;_&&!(m&&f)&&V(),m&&f&&(Ai(C,{prev:m,next:f}),_i(v,_?"":"none"),dn(v,$=kr+"--"+n.direction),_&&(b(),T(),je([m,f],Di,x.id),a(ps,m,f)))}function W(){i.destroy(),xn(v,$),E?(Xn(w?[m,f]:v),m=f=null):un([m,f],Rr)}function b(){o([Hn,xi,Pt,Jn,wo],T),s(f,"click",mt(R,">")),s(m,"click",mt(R,"<"))}function R(_){u.go(_,!0)}function V(){v=w||li("div",d.arrows),m=g(!0),f=g(!1),E=!0,ji(v,[m,f]),!w&&xr(v,x)}function g(_){var H='<button class="'+d.arrow+" "+(_?d.prev:d.next)+'" type="button"><svg xmlns="'+gc+'" viewBox="0 0 '+Xi+" "+Xi+'" width="'+Xi+'" height="'+Xi+'" focusable="false"><path d="'+(n.arrowPath||hc)+'" />';return ts(H)}function T(){if(m&&f){var _=e.index,H=u.getPrev(),K=u.getNext(),se=H>-1&&_<H?l.last:l.prev,j=K>-1&&_>K?l.first:l.next;m.disabled=H<0,f.disabled=K<0,je(m,Jt,se),je(f,Jt,j),a(ms,m,f,H,K)}}return{arrows:C,mount:S,destroy:W,update:T}}var yc=Sr+"-interval";function vc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=Po(n.interval,e.go.bind(e,">"),b),l=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,x=u.toggle,v=n.autoplay,m,f,E=v==="pause";function $(){v&&(C(),x&&je(x,Di,p.track.id),E||S(),W())}function C(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",I()}),n.pauseOnFocus&&s(w,"focusin focusout",function(V){f=V.type==="focusin",I()}),x&&s(x,"click",function(){E?S():M(!0)}),o([Tn,Eo,Pt],d.rewind),o(Tn,R)}function S(){l()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),f=m=E=!1,W(),a(Er))}function M(V){V===void 0&&(V=!0),E=!!V,W(),l()||(d.pause(),a(Pr))}function I(){E||(m||f?M(!1):S())}function W(){x&&(bn(x,Yn,!E),je(x,Jt,n.i18n[E?"play":"pause"]))}function b(V){var g=p.bar;g&&rn(g,"width",V*100+"%"),a(fs,V)}function R(V){var g=t.Slides.getAt(V);d.set(g&&+an(g.slide,yc)||n.interval)}return{mount:$,destroy:d.cancel,play:S,pause:M,isPaused:l}}function bc(e,t,n){var i=wt(e),o=i.on;function s(){n.cover&&(o(Ir,mt(d,!0)),o([Hn,jt,Pt],mt(a,!0)))}function a(l){t.Slides.forEach(function(p){var u=zi(p.container||p.slide,"img");u&&u.src&&d(l,u,p)})}function d(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),_i(p,l?"none":"")}return{mount:s,destroy:mt(a,!1)}}var xc=10,wc=600,Sc=.6,$c=1.5,Cc=800;function Tc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,l=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,x=e.is(mi),v,m,f=1;function E(){o(Tn,M),o([jt,Pt],I)}function $(b,R,V,g,T){var _=l();if(M(),V&&(!x||!u())){var H=t.Layout.sliderSize(),K=sr(b)*H*xo(Kt(b)/H)||0;b=d.toPosition(t.Controller.toDest(b%H))+K}var se=is(_,b,1);f=1,R=se?0:R||bo(Kt(b-_)/$c,Cc),m=g,v=Po(R,C,mt(S,_,b,T),1),a(Hi),s(Eo),v.start()}function C(){a(ui),m&&m(),s(Jn)}function S(b,R,V,g){var T=l(),_=b+(R-b)*W(g),H=(_-T)*f;w(T+H),x&&!V&&u()&&(f*=Sc,Kt(H)<xc&&$(p(u(!0)),wc,!1,m,!0))}function M(){v&&v.cancel()}function I(){v&&!v.isPaused()&&(M(),C())}function W(b){var R=n.easingFunc;return R?R(b):1-Math.pow(1-b,4)}return{mount:E,destroy:M,scroll:$,cancel:I}}var ri={passive:!1,capture:!0};function Lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,l=e.state,p=t.Move,u=t.Scroll,w=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,f=m.resolve,E=m.orient,$=p.getPosition,C=p.exceededLimit,S,M,I,W,b,R=!1,V,g,T;function _(){a(x,Vo,rr,ri),a(x,Do,rr,ri),a(x,_s,K,ri),a(x,"click",k,{capture:!0}),a(x,"dragstart",vn),o([Hn,jt],H)}function H(){var U=n.drag;le(!U),W=U==="free"}function K(U){if(V=!1,!g){var B=We(U);fe(U.target)&&(B||!U.button)&&(w.isBusy()?vn(U,!0):(T=B?x:window,b=l.is([bi,Hi]),I=null,a(T,Vo,se,ri),a(T,Do,j,ri),p.cancel(),u.cancel(),X(U)))}}function se(U){if(l.is(lo)||(l.set(lo),s(cs)),U.cancelable)if(b){p.translate(S+he(F(U)));var B=ae(U)>oa,N=R!==(R=C());(B||N)&&X(U),V=!0,s(ds),vn(U)}else Y(U)&&(b=O(U),vn(U))}function j(U){l.is(lo)&&(l.set(ui),s(us)),b&&(q(U),vn(U)),d(T,Vo,se),d(T,Do,j),b=!1}function k(U){!g&&V&&vn(U,!0)}function X(U){I=M,M=U,S=$()}function q(U){var B=te(U),N=oe(B),me=n.rewind&&n.rewindByDrag;v(!1),W?w.scroll(N,0,n.snap):e.is(qi)?w.go(E(sr(B))<0?me?"<":"-":me?">":"+"):e.is(mi)&&R&&me?w.go(C(!0)?">":"<"):w.go(w.toDest(N),!0),v(!0)}function O(U){var B=n.dragMinThreshold,N=Ei(B),me=N&&B.mouse||0,we=(N?B.touch:+B)||10;return Kt(F(U))>(We(U)?we:me)}function Y(U){return Kt(F(U))>Kt(F(U,!0))}function te(U){if(e.is(wi)||!R){var B=ae(U);if(B&&B<oa)return F(U)/B}return 0}function oe(U){return $()+sr(U)*Wn(Kt(U)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(U,B){return ie(U,B)-ie(h(U),B)}function ae(U){return ar(U)-ar(h(U))}function h(U){return M===U&&I||M}function ie(U,B){return(We(U)?U.changedTouches[0]:U)["page"+f(B?"Y":"X")]}function he(U){return U/(R&&e.is(mi)?rc:1)}function fe(U){var B=n.noDrag;return!Pi(U,"."+Ls+", ."+Mo)&&(!B||!Pi(U,B))}function We(U){return typeof TouchEvent<"u"&&U instanceof TouchEvent}function Z(){return b}function le(U){g=U}return{mount:_,disable:le,isDragging:Z}}var Ec={Spacebar:" ",Right:_o,Left:Ao,Up:bs,Down:xs};function Mr(e){return e=Mn(e)?e:e.key,Ec[e]||e}var ra="keydown";function Pc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,l=t.Direction.resolve,p,u;function w(){x(),o(jt,v),o(jt,x),o(Tn,f)}function x(){var $=n.keyboard;$&&(p=$==="global"?window:d,s(p,ra,E))}function v(){a(p,ra)}function m($){u=$}function f(){var $=u;u=!0,Ya(function(){u=$})}function E($){if(!u){var C=Mr($);C===l(Ao)?e.go("<"):C===l(_o)&&e.go(">")}}return{mount:w,destroy:v,disable:m}}var Ti=Sr+"-lazy",po=Ti+"-srcset",Ic="["+Ti+"], ["+po+"]";function Ac(e,t,n){var i=wt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,l=n.lazyLoad==="sequential",p=[xi,Jn],u=[];function w(){n.lazyLoad&&(x(),o(Pt,x))}function x(){Cn(u),v(),l?$():(s(p),o(p,m),m())}function v(){t.Slides.forEach(function(C){wr(C.slide,Ic).forEach(function(S){var M=an(S,Ti),I=an(S,po);if(M!==S.src||I!==S.srcset){var W=n.classes.spinner,b=S.parentElement,R=zi(b,"."+W)||li("span",W,b);u.push([S,C,R]),S.src||_i(S,"none")}})})}function m(){u=u.filter(function(C){var S=n.perPage*((n.preloadPages||1)+1)-1;return C[1].isWithin(e.index,S)?f(C):!0}),u.length||s(p)}function f(C){var S=C[0];dn(C[1].slide,ur),a(S,"load error",mt(E,C)),je(S,"src",an(S,Ti)),je(S,"srcset",an(S,po)),un(S,Ti),un(S,po)}function E(C,S){var M=C[0],I=C[1];xn(I.slide,ur),S.type!=="error"&&(Xn(C[2]),_i(M,""),d(Ir,M,I),d(pi)),l&&$()}function $(){u.length&&f(u.shift())}return{mount:w,destroy:mt(Cn,u),check:m}}function _c(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,x=p.go,v=t.Direction.resolve,m=l.pagination,f=[],E,$;function C(){S(),o([jt,Pt,wo],C);var g=n.pagination;m&&_i(m,g?"":"none"),g&&(o([Tn,Eo,Jn],V),M(),V(),s(gs,{list:E,items:f},R(e.index)))}function S(){E&&(Xn(m?Nn(E.children):E),xn(E,$),Cn(f),E=null),i.destroy()}function M(){var g=e.length,T=n.classes,_=n.i18n,H=n.perPage,K=u()?p.getEnd()+1:Ri(g/H);E=m||li("ul",T.pagination,l.track.parentElement),dn(E,$=Wo+"--"+b()),je(E,wn,"tablist"),je(E,Jt,_.select),je(E,_r,b()===Ro?"vertical":"");for(var se=0;se<K;se++){var j=li("li",null,E),k=li("button",{class:T.page,type:"button"},j),X=d.getIn(se).map(function(O){return O.slide.id}),q=!u()&&H>1?_.pageX:_.slideX;a(k,"click",mt(I,se)),n.paginationKeyboard&&a(k,"keydown",mt(W,se)),je(j,wn,"presentation"),je(k,wn,"tab"),je(k,Di,X.join(" ")),je(k,Jt,lr(q,se+1)),je(k,ci,-1),f.push({li:j,button:k,page:se})}}function I(g){x(">"+g,!0)}function W(g,T){var _=f.length,H=Mr(T),K=b(),se=-1;H===v(_o,!1,K)?se=++g%_:H===v(Ao,!1,K)?se=(--g+_)%_:H==="Home"?se=0:H==="End"&&(se=_-1);var j=f[se];j&&(es(j.button),x(">"+se),vn(T,!0))}function b(){return n.paginationDirection||n.direction}function R(g){return f[p.toPage(g)]}function V(){var g=R(w(!0)),T=R(w());if(g){var _=g.button;xn(_,Yn),un(_,Qr),je(_,ci,-1)}if(T){var H=T.button;dn(H,Yn),je(H,Qr,!0),je(H,ci,"")}s(hs,{list:E,items:f},g,T)}return{items:f,mount:C,destroy:S,getAt:R,update:V}}var Rc=[" ","Enter"];function kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),Cn(s)}function l(){d(),a()}function p(m,f){var E=wt(m);E.on(Tn,function($,C,S){f.go(f.is(wi)?S:$)}),s.push(E)}function u(){var m=wt(e),f=m.on;f(Cr,x),f(ys,v),f([Hn,jt],w),s.push(m),m.emit(Lr,e.splides)}function w(){je(t.Elements.list,_r,n.direction===Ro?"vertical":"")}function x(m){e.go(m.index)}function v(m,f){br(Rc,Mr(f))&&(x(m),vn(f))}return{setup:mt(t.Media.set,{slideFocus:Oi(o)?i:o},!0),mount:a,destroy:d,remount:l}}function Mc(e,t,n){var i=wt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ri)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,x=ar(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Kt(u)>v&&x-s>m&&(e.go(w?"<":">"),s=x),l(w)&&vn(p)}}function l(p){return!n.releaseWheel||e.state.is(bi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Wc=90;function Fc(e,t,n){var i=wt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=li("span",ec),l=Po(Wc,mt(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),je(s,na,!0),d.textContent="…",o(Er,mt(x,!0)),o(Pr,mt(x,!1)),o([xi,Jn],mt(u,!0)))}function u(v){je(s,ta,v),v?(ji(s,d),l.start()):(Xn(d),l.cancel())}function w(){un(s,[ea,na,ta]),Xn(d)}function x(v){a&&je(s,ea,v?"off":"polite")}return{mount:p,disable:x,destroy:w}}var Nc=Object.freeze({__proto__:null,Media:ql,Direction:Kl,Elements:ac,Slides:lc,Layout:cc,Clones:uc,Move:pc,Controller:mc,Arrows:fc,Autoplay:vc,Cover:bc,Scroll:Tc,Drag:Lc,Keyboard:Pc,LazyLoad:Ac,Pagination:_c,Sync:kc,Wheel:Mc,Live:Fc}),Hc={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"},Oc={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:ic,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Bc(e,t,n){var i=t.Slides;function o(){wt(e).on([Hn,Pt],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,l){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ya(l)}return{mount:o,start:a,cancel:rr}}function jc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=mt(rn,a,"transition"),l;function p(){wt(e).bind(a,"transitionend",function(v){v.target===a&&l&&(w(),l())})}function u(v,m){var f=i.toPosition(v,!0),E=i.getPosition(),$=x(v);Kt(f-E)>=1&&$>=1?n.useScroll?s.scroll(f,$,!1,m):(d("transform "+$+"ms "+n.easing),i.translate(f,!0),l=m):(i.jump(v),m())}function w(){d(""),s.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(mi)&&m){var f=o.getIndex(!0),E=o.getEnd();if(f===0&&v>=E||f>=E&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var zc=(function(){function e(n,i){this.event=wt(),this.Components={},this.state=Vl(si),this.splides=[],this._o={},this._E={};var o=Mn(n)?ns(document,n):n;Ci(o,o+" is invalid."),this.root=o,i=kn({label:an(o,Jt)||"",labelledby:an(o,Ar)||""},Oc,e.defaults,i||{});try{kn(i,JSON.parse(an(o,Sr)))}catch{Ci(!1,"Invalid JSON")}this._o=Object.create(kn({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;Ci(a.is([si,vo]),"Already mounted!"),a.set(si),this._C=d,this._T=o||this._T||(this.is(qi)?Bc:jc),this._E=i||this._E;var l=Ai({},Nc,this._E,{Transition:this._T});return Gn(l,function(p,u){var w=p(s,d,s._o);d[u]=w,w.setup&&w.setup()}),Gn(d,function(p){p.mount&&p.mount()}),this.emit(Hn),dn(this.root,tc),a.set(ui),this.emit(cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(ui)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Nn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(Pt),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(si)?wt(this).on(cr,this.destroy.bind(this,i)):(Gn(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Tr),o.destroy(),i&&Cn(this.splides),s.set(vo)),this},Hl(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Wr=zc;Wr.defaults={};Wr.STATES=Bl;var aa=[[Hn,"onMounted"],[cr,"onReady"],[Tn,"onMove"],[xi,"onMoved"],[Cr,"onClick"],[rs,"onActive"],[as,"onInactive"],[ss,"onVisible"],[ls,"onHidden"],[Pt,"onRefresh"],[jt,"onUpdated"],[pi,"onResize"],[Lo,"onResized"],[cs,"onDrag"],[ds,"onDragging"],[us,"onDragged"],[Eo,"onScroll"],[Jn,"onScrolled"],[Tr,"onDestroy"],[ps,"onArrowsMounted"],[ms,"onArrowsUpdated"],[gs,"onPaginationMounted"],[hs,"onPaginationUpdated"],[Lr,"onNavigationMounted"],[Er,"onAutoplayPlay"],[fs,"onAutoplayPlaying"],[Pr,"onAutoplayPause"],[Ir,"onLazyLoadLoaded"]];function Fr(...e){return e.filter(Boolean).join(" ")}function So(e){return e!==null&&typeof e=="object"}function pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!pr(n,t[i]));if(So(e)&&So(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!pr(e[o],t[o]))}return e===t}function Vc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dc(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function mr(e,t){const n=e;return Dc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():So(i)?n[o]=mr(So(n[o])?n[o]:{},i):n[o]=i}),n}var qc=({children:e,className:t,...n})=>c.createElement("div",{className:Fr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Nr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=mr({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!pr(this.options,e)&&(this.splide.options=e,this.options=mr({},e));const t=this.getSlides();Vc(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){aa.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return c.createElement(t,{className:Fr("splide",e),ref:this.splideRef,...this.omit(o,["options",...aa.map(s=>s[1])])},n?c.createElement(qc,null,i):i)}},Hr=({children:e,className:t,...n})=>c.createElement("li",{className:Fr("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("react"),Ge=require("classnames"),E=require("./readTestimonialTextMeasure-CB_Uq-fO.js"),ki=require("react-dom");function Us(e){return e.type==="object"&&e.version===1}const Gs="ControlSlider-module__wrapper___sHEkd",Xs="ControlSlider-module__hoverArrow___A-dOH",Ys="ControlSlider-module__sliderItem___QQSkR",Js="ControlSlider-module__sliderImage___9hRl-",Zs="ControlSlider-module__arrow___05ghY",Qs="ControlSlider-module__arrowVertical___tBfVN",el="ControlSlider-module__nextArrow___-30Yc",tl="ControlSlider-module__arrowInner___aEra3",nl="ControlSlider-module__arrowIcon___S4ztF",il="ControlSlider-module__arrowImg___2dwJW",ol="ControlSlider-module__mirror___brd6U",rl="ControlSlider-module__pagination___bicLF",al="ControlSlider-module__paginationInner___bT-P-",sl="ControlSlider-module__paginationVertical___zYqKw",ll="ControlSlider-module__paginationItem___nTRbk",cl="ControlSlider-module__dot___p1Qun",dl="ControlSlider-module__activeDot___LHFaj",ul="ControlSlider-module__paginationInsideBottom___R3FWn",pl="ControlSlider-module__paginationInsideTop___V-qb-",ml="ControlSlider-module__paginationOutsideBottom___14w8D",gl="ControlSlider-module__paginationOutsideTop___SCLqB",hl="ControlSlider-module__paginationInsideLeft___yOBRZ",fl="ControlSlider-module__paginationInsideRight___Rtt3o",yl="ControlSlider-module__paginationOutsideLeft___lahaw",vl="ControlSlider-module__paginationOutsideRight___EtuQa",bl="ControlSlider-module__imgWrapper___UjEgB",xl="ControlSlider-module__captionBlock___dJ6-j",wl="ControlSlider-module__captionTextWrapper___HFlpf",Sl="ControlSlider-module__captionText___uGBVc",$l="ControlSlider-module__active___WZK4G",Cl="ControlSlider-module__withPointerEvents___t-18M",Tl="ControlSlider-module__topLeftAlignment___zjnGM",Ll="ControlSlider-module__topCenterAlignment___gD1xW",El="ControlSlider-module__topRightAlignment___NMapS",Pl="ControlSlider-module__middleLeftAlignment___OnUrY",Il="ControlSlider-module__middleCenterAlignment___Tdkl0",_l="ControlSlider-module__middleRightAlignment___wEbfX",Al="ControlSlider-module__bottomLeftAlignment___cTP2-",Rl="ControlSlider-module__bottomCenterAlignment___c54fB",kl="ControlSlider-module__bottomRightAlignment___kEwrz",Ml="ControlSlider-module__clickOverlay___DZA28",Wl="ControlSlider-module__contain___pLyq7",Fl="ControlSlider-module__cover___KdDat",Pe={wrapper:Gs,hoverArrow:Xs,sliderItem:Ys,sliderImage:Js,arrow:Zs,arrowVertical:Qs,nextArrow:el,arrowInner:tl,arrowIcon:nl,arrowImg:il,mirror:ol,pagination:rl,paginationInner:al,paginationVertical:sl,paginationItem:ll,dot:cl,activeDot:dl,paginationInsideBottom:ul,paginationInsideTop:pl,paginationOutsideBottom:ml,paginationOutsideTop:gl,paginationInsideLeft:hl,paginationInsideRight:fl,paginationOutsideLeft:yl,paginationOutsideRight:vl,imgWrapper:bl,captionBlock:xl,captionTextWrapper:wl,captionText:Sl,active:$l,withPointerEvents:Cl,topLeftAlignment:Tl,topCenterAlignment:Ll,topRightAlignment:El,middleLeftAlignment:Pl,middleCenterAlignment:Il,middleRightAlignment:_l,bottomLeftAlignment:Al,bottomCenterAlignment:Rl,bottomRightAlignment:kl,clickOverlay:Ml,contain:Wl,cover:Fl};function Nl(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Hl(e,t,n){return t&&Nl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ur="(prefers-reduced-motion: reduce)",oi=1,Ol=2,li=3,fi=4,Mi=5,ro=6,ho=7,Bl={CREATED:oi,MOUNTED:Ol,IDLE:li,MOVING:fi,SCROLLING:Mi,DRAGGING:ro,DESTROYED:ho};function bn(e){e.length=0}function Wn(e,t,n){return Array.prototype.slice.call(e,t,n)}function ht(e){return e.bind.apply(e,[null].concat(Wn(arguments,1)))}var Ya=setTimeout,rr=function(){};function Gr(e){return requestAnimationFrame(e)}function So(e,t){return typeof t===e}function $i(e){return!vr(e)&&So("object",e)}var yr=Array.isArray,Ja=ht(So,"function"),Rn=ht(So,"string"),Wi=ht(So,"undefined");function vr(e){return e===null}function Za(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Fi(e){return yr(e)?e:[e]}function Jt(e,t){Fi(e).forEach(t)}function br(e,t){return e.indexOf(t)>-1}function ao(e,t){return e.push.apply(e,Fi(t)),e}function gn(e,t,n){e&&Jt(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function ln(e,t){gn(e,Rn(t)?t.split(" "):t,!0)}function Ni(e,t){Jt(t,e.appendChild.bind(e))}function xr(e,t){Jt(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function Ci(e,t){return Za(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function Qa(e,t){var n=e?Wn(e.children):[];return t?n.filter(function(i){return Ci(i,t)}):n}function Hi(e,t){return t?Qa(e,t)[0]:e.firstElementChild}var Ti=Object.keys;function Un(e,t,n){return e&&(n?Ti(e).reverse():Ti(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function Li(e){return Wn(arguments,1).forEach(function(t){Un(t,function(n,i){e[i]=t[i]})}),e}function An(e){return Wn(arguments,1).forEach(function(t){Un(t,function(n,i){yr(n)?e[i]=n.slice():$i(n)?e[i]=An({},$i(e[i])?e[i]:{},n):e[i]=n})}),e}function Xr(e,t){Jt(t||Ti(e),function(n){delete e[n]})}function cn(e,t){Jt(e,function(n){Jt(t,function(i){n&&n.removeAttribute(i)})})}function ze(e,t,n){$i(t)?Un(t,function(i,o){ze(e,o,i)}):Jt(e,function(i){vr(n)||n===""?cn(i,t):i.setAttribute(t,String(n))})}function ri(e,t,n){var i=document.createElement(e);return t&&(Rn(t)?ln(i,t):ze(i,t)),n&&Ni(n,i),i}function Qt(e,t,n){if(Wi(n))return getComputedStyle(e)[t];vr(n)||(e.style[t]=""+n)}function Ei(e,t){Qt(e,"display",t)}function es(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function en(e,t){return e.getAttribute(t)}function Yr(e,t){return e&&e.classList.contains(t)}function Ut(e){return e.getBoundingClientRect()}function Gn(e){Jt(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function ts(e){return Hi(new DOMParser().parseFromString(e,"text/html").body)}function mn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function ns(e,t){return e&&e.querySelector(t)}function wr(e,t){return t?Wn(e.querySelectorAll(t)):[]}function hn(e,t){gn(e,t,!1)}function ar(e){return e.timeStamp}function jn(e){return Rn(e)?e:e?e+"px":""}var Oi="splide",Sr="data-"+Oi;function xi(e,t){if(!e)throw new Error("["+Oi+"] "+(t||""))}var kn=Math.min,fo=Math.max,yo=Math.floor,Pi=Math.ceil,Dt=Math.abs;function is(e,t,n){return Dt(e-t)<n}function so(e,t,n,i){var o=kn(t,n),s=fo(t,n);return i?o<e&&e<s:o<=e&&e<=s}function ti(e,t,n){var i=kn(t,n),o=fo(t,n);return kn(fo(i,e),o)}function sr(e){return+(e>0)-+(e<0)}function lr(e,t){return Jt(t,function(n){e=e.replace("%s",""+n)}),e}function $r(e){return e<10?"0"+e:""+e}var Jr={};function jl(e){return""+e+$r(Jr[e]=(Jr[e]||0)+1)}function os(){var e=[];function t(a,d,l,p){o(a,d,function(u,w,x){var v="addEventListener"in u,m=v?u.removeEventListener.bind(u,w,l,p):u.removeListener.bind(u,l);v?u.addEventListener(w,l,p):u.addListener(l),e.push([u,w,x,l,m])})}function n(a,d,l){o(a,d,function(p,u,w){e=e.filter(function(x){return x[0]===p&&x[1]===u&&x[2]===w&&(!l||x[3]===l)?(x[4](),!1):!0})})}function i(a,d,l){var p,u=!0;return typeof CustomEvent=="function"?p=new CustomEvent(d,{bubbles:u,detail:l}):(p=document.createEvent("CustomEvent"),p.initCustomEvent(d,u,!1,l)),a.dispatchEvent(p),p}function o(a,d,l){Jt(a,function(p){p&&Jt(d,function(u){u.split(" ").forEach(function(w){var x=w.split(".");l(p,x[0],x[1])})})})}function s(){e.forEach(function(a){a[4]()}),bn(e)}return{bind:t,unbind:n,dispatch:i,destroy:s}}var Fn="mounted",cr="ready",xn="move",yi="moved",Cr="click",rs="active",as="inactive",ss="visible",ls="hidden",It="refresh",zt="updated",ci="resize",$o="resized",cs="drag",ds="dragging",us="dragged",Co="scroll",Yn="scrolled",zl="overflow",Tr="destroy",ps="arrows:mounted",ms="arrows:updated",gs="pagination:mounted",hs="pagination:updated",Lr="navigation:mounted",Er="autoplay:play",fs="autoplay:playing",Pr="autoplay:pause",Ir="lazyload:loaded",ys="sk",vs="sh",vo="ei";function wt(e){var t=e?e.event.bus:document.createDocumentFragment(),n=os();function i(s,a){n.bind(t,Fi(s).join(" "),function(d){a.apply(a,yr(d.detail)?d.detail:[])})}function o(s){n.dispatch(t,s,Wn(arguments,1))}return e&&e.event.on(Tr,n.destroy),Li(n,{bus:t,on:i,off:ht(n.unbind,t),emit:o})}function To(e,t,n,i){var o=Date.now,s,a=0,d,l=!0,p=0;function u(){if(!l){if(a=e?kn((o()-s)/e,1):1,n&&n(a),a>=1&&(t(),s=o(),i&&++p>=i))return x();d=Gr(u)}}function w($){$||m(),s=o()-($?a*e:0),l=!1,d=Gr(u)}function x(){l=!0}function v(){s=o(),a=0,n&&n(a)}function m(){d&&cancelAnimationFrame(d),a=0,d=0,l=!0}function y($){e=$}function P(){return l}return{start:w,rewind:v,pause:x,cancel:m,set:y,isPaused:P}}function Vl(e){var t=e;function n(o){t=o}function i(o){return br(Fi(o),t)}return{set:n,is:i}}function Dl(e,t){var n=To(0,e,null,1);return function(){n.isPaused()&&n.start()}}function ql(e,t,n){var i=e.state,o=n.breakpoints||{},s=n.reducedMotion||{},a=os(),d=[];function l(){var m=n.mediaQuery==="min";Ti(o).sort(function(y,P){return m?+y-+P:+P-+y}).forEach(function(y){u(o[y],"("+(m?"min":"max")+"-width:"+y+"px)")}),u(s,Ur),w()}function p(m){m&&a.destroy()}function u(m,y){var P=matchMedia(y);a.bind(P,"change",w),d.push([m,P])}function w(){var m=i.is(ho),y=n.direction,P=d.reduce(function($,T){return An($,T[1].matches?T[0]:{})},{});Xr(n),v(P),n.destroy?e.destroy(n.destroy==="completely"):m?(p(!0),e.mount()):y!==n.direction&&e.refresh()}function x(m){matchMedia(Ur).matches&&(m?An(n,s):Xr(n,Ti(s)))}function v(m,y,P){An(n,m),y&&An(Object.getPrototypeOf(n),m),(P||!i.is(oi))&&e.emit(zt,n)}return{setup:l,destroy:p,reduce:x,set:v}}var Lo="Arrow",Eo=Lo+"Left",Po=Lo+"Right",bs=Lo+"Up",xs=Lo+"Down",Zr="rtl",Io="ttb",jo={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bs,Po],ArrowRight:[xs,Eo]};function Kl(e,t,n){function i(s,a,d){d=d||n.direction;var l=d===Zr&&!a?1:d===Io?0:-1;return jo[s]&&jo[s][l]||s.replace(/width|left|right/i,function(p,u){var w=jo[p.toLowerCase()][l]||p;return u>0?w.charAt(0).toUpperCase()+w.slice(1):w})}function o(s){return s*(n.direction===Zr?1:-1)}return{resolve:i,orient:o}}var fn="role",ai="tabindex",Ul="disabled",nn="aria-",Bi=nn+"controls",ws=nn+"current",Qr=nn+"selected",Gt=nn+"label",_r=nn+"labelledby",Ss=nn+"hidden",Ar=nn+"orientation",Ii=nn+"roledescription",ea=nn+"live",ta=nn+"busy",na=nn+"atomic",Rr=[fn,ai,Ul,Bi,ws,Gt,_r,Ss,Ar,Ii],dn=Oi+"__",Nn="is-",zo=Oi,ia=dn+"track",Gl=dn+"list",_o=dn+"slide",$s=_o+"--clone",Xl=_o+"__container",kr=dn+"arrows",Ao=dn+"arrow",Cs=Ao+"--prev",Ts=Ao+"--next",Ro=dn+"pagination",Ls=Ro+"__page",Yl=dn+"progress",Jl=Yl+"__bar",Zl=dn+"toggle",Ql=dn+"spinner",ec=dn+"sr",tc=Nn+"initialized",Xn=Nn+"active",Es=Nn+"prev",Ps=Nn+"next",dr=Nn+"visible",ur=Nn+"loading",Is=Nn+"focus-in",_s=Nn+"overflow",nc=[Xn,dr,Es,Ps,ur,Is,_s],ic={slide:_o,clone:$s,arrows:kr,arrow:Ao,prev:Cs,next:Ts,pagination:Ro,page:Ls,spinner:Ql};function oc(e,t){if(Ja(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!Ci(n,t);)n=n.parentElement;return n}var rc=5,oa=200,As="touchstart mousedown",Vo="touchmove mousemove",Do="touchend touchcancel mouseup click";function ac(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=e.root,d=n.i18n,l={},p=[],u=[],w=[],x,v,m;function y(){S(),M(),T()}function P(){o(It,$),o(It,y),o(zt,T),s(document,As+" keydown",function(b){m=b.type==="keydown"},{capture:!0}),s(a,"focusin",function(){gn(a,Is,!!m)})}function $(b){var R=Rr.concat("style");bn(p),hn(a,u),hn(x,w),cn([x,v],R),cn(a,b?R:["style",Ii])}function T(){hn(a,u),hn(x,w),u=W(zo),w=W(ia),ln(a,u),ln(x,w),ze(a,Gt,n.label),ze(a,_r,n.labelledby)}function S(){x=I("."+ia),v=Hi(x,"."+Gl),xi(x&&v,"A track/list element is missing."),ao(p,Qa(v,"."+_o+":not(."+$s+")")),Un({arrows:kr,pagination:Ro,prev:Cs,next:Ts,bar:Jl,toggle:Zl},function(b,R){l[R]=I("."+b)}),Li(l,{root:a,track:x,list:v,slides:p})}function M(){var b=a.id||jl(Oi),R=n.role;a.id=b,x.id=x.id||b+"-track",v.id=v.id||b+"-list",!en(a,fn)&&a.tagName!=="SECTION"&&R&&ze(a,fn,R),ze(a,Ii,d.carousel),ze(v,fn,"presentation")}function I(b){var R=ns(a,b);return R&&oc(R,"."+zo)===a?R:void 0}function W(b){return[b+"--"+n.type,b+"--"+n.direction,n.drag&&b+"--draggable",n.isNavigation&&b+"--nav",b===zo&&Xn]}return Li(l,{setup:y,mount:P,destroy:$})}var di="slide",vi="loop",ji="fade";function sc(e,t,n,i){var o=wt(e),s=o.on,a=o.emit,d=o.bind,l=e.Components,p=e.root,u=e.options,w=u.isNavigation,x=u.updateOnMove,v=u.i18n,m=u.pagination,y=u.slideFocus,P=l.Direction.resolve,$=en(i,"style"),T=en(i,Gt),S=n>-1,M=Hi(i,"."+Xl),I;function W(){S||(i.id=p.id+"-slide"+$r(t+1),ze(i,fn,m?"tabpanel":"group"),ze(i,Ii,v.slide),ze(i,Gt,T||lr(v.slideLabel,[t+1,e.length]))),b()}function b(){d(i,"click",ht(a,Cr,X)),d(i,"keydown",ht(a,ys,X)),s([yi,vs,Yn],L),s(Lr,V),x&&s(xn,g)}function R(){I=!0,o.destroy(),hn(i,nc),cn(i,Rr),ze(i,"style",$),ze(i,Gt,T||"")}function V(){var q=e.splides.map(function(O){var Y=O.splide.Components.Slides.getAt(t);return Y?Y.slide.id:""}).join(" ");ze(i,Gt,lr(v.slideX,(S?n:t)+1)),ze(i,Bi,q),ze(i,fn,y?"button":""),y&&cn(i,Ii)}function g(){I||L()}function L(){if(!I){var q=e.index;A(),H(),gn(i,Es,t===q-1),gn(i,Ps,t===q+1)}}function A(){var q=se();q!==Yr(i,Xn)&&(gn(i,Xn,q),ze(i,ws,w&&q||""),a(q?rs:as,X))}function H(){var q=j(),O=!q&&(!se()||S);if(e.state.is([fi,Mi])||ze(i,Ss,O||""),ze(wr(i,u.focusableNodes||""),ai,O?-1:""),y&&ze(i,ai,O?-1:0),q!==Yr(i,dr)&&(gn(i,dr,q),a(q?ss:ls,X)),!q&&document.activeElement===i){var Y=l.Slides.getAt(e.index);Y&&es(Y.slide)}}function U(q,O,Y){Qt(Y&&M||i,q,O)}function se(){var q=e.index;return q===t||u.cloneStatus&&q===n}function j(){if(e.is(ji))return se();var q=Ut(l.Elements.track),O=Ut(i),Y=P("left",!0),ie=P("right",!0);return yo(q[Y])<=Pi(O[Y])&&yo(O[ie])<=Pi(q[ie])}function k(q,O){var Y=Dt(q-t);return!S&&(u.rewind||e.is(vi))&&(Y=kn(Y,e.length-Y)),Y<=O}var X={index:t,slideIndex:n,slide:i,container:M,isClone:S,mount:W,destroy:R,update:L,style:U,isWithin:k};return X}function lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Elements,l=d.slides,p=d.list,u=[];function w(){x(),o(It,v),o(It,x)}function x(){l.forEach(function(L,A){y(L,A,-1)})}function v(){I(function(L){L.destroy()}),bn(u)}function m(){I(function(L){L.update()})}function y(L,A,H){var U=sc(e,A,H,L);U.mount(),u.push(U),u.sort(function(se,j){return se.index-j.index})}function P(L){return L?W(function(A){return!A.isClone}):u}function $(L){var A=t.Controller,H=A.toIndex(L),U=A.hasFocus()?1:n.perPage;return W(function(se){return so(se.index,H,H+U-1)})}function T(L){return W(L)[0]}function S(L,A){Jt(L,function(H){if(Rn(H)&&(H=ts(H)),Za(H)){var U=l[A];U?xr(H,U):Ni(p,H),ln(H,n.classes.slide),R(H,ht(s,ci))}}),s(It)}function M(L){Gn(W(L).map(function(A){return A.slide})),s(It)}function I(L,A){P(A).forEach(L)}function W(L){return u.filter(Ja(L)?L:function(A){return Rn(L)?Ci(A.slide,L):br(Fi(L),A.index)})}function b(L,A,H){I(function(U){U.style(L,A,H)})}function R(L,A){var H=wr(L,"img"),U=H.length;U?H.forEach(function(se){a(se,"load error",function(){--U||A()})}):A()}function V(L){return L?l.length:u.length}function g(){return u.length>n.perPage}return{mount:w,destroy:v,update:m,register:y,get:P,getIn:$,getAt:T,add:S,remove:M,forEach:I,filter:W,style:b,getLength:V,isEnough:g}}function cc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=t.Slides,l=t.Direction.resolve,p=t.Elements,u=p.root,w=p.track,x=p.list,v=d.getAt,m=d.style,y,P,$;function T(){S(),s(window,"resize load",Dl(ht(a,ci))),o([zt,It],S),o(ci,M)}function S(){y=n.direction===Io,Qt(u,"maxWidth",jn(n.width)),Qt(w,l("paddingLeft"),I(!1)),Qt(w,l("paddingRight"),I(!0)),M(!0)}function M(X){var q=Ut(u);(X||P.width!==q.width||P.height!==q.height)&&(Qt(w,"height",W()),m(l("marginRight"),jn(n.gap)),m("width",R()),m("height",V(),!0),P=q,a($o),$!==($=k())&&(gn(u,_s,$),a(zl,$)))}function I(X){var q=n.padding,O=l(X?"right":"left");return q&&jn(q[O]||($i(q)?0:q))||"0px"}function W(){var X="";return y&&(X=b(),xi(X,"height or heightRatio is missing."),X="calc("+X+" - "+I(!1)+" - "+I(!0)+")"),X}function b(){return jn(n.height||Ut(x).width*n.heightRatio)}function R(){return n.autoWidth?null:jn(n.fixedWidth)||(y?"":g())}function V(){return jn(n.fixedHeight)||(y?n.autoHeight?null:g():b())}function g(){var X=jn(n.gap);return"calc((100%"+(X&&" + "+X)+")/"+(n.perPage||1)+(X&&" - "+X)+")"}function L(){return Ut(x)[l("width")]}function A(X,q){var O=v(X||0);return O?Ut(O.slide)[l("width")]+(q?0:se()):0}function H(X,q){var O=v(X);if(O){var Y=Ut(O.slide)[l("right")],ie=Ut(x)[l("left")];return Dt(Y-ie)+(q?0:se())}return 0}function U(X){return H(e.length-1)-H(0)+A(0,X)}function se(){var X=v(0);return X&&parseFloat(Qt(X.slide,l("marginRight")))||0}function j(X){return parseFloat(Qt(w,l("padding"+(X?"Right":"Left"))))||0}function k(){return e.is(ji)||U(!0)>L()}return{mount:T,resize:M,listSize:L,slideSize:A,sliderSize:U,totalSize:H,getPadding:j,isOverflow:k}}var dc=2;function uc(e,t,n){var i=wt(e),o=i.on,s=t.Elements,a=t.Slides,d=t.Direction.resolve,l=[],p;function u(){o(It,w),o([zt,ci],v),(p=P())&&(m(p),t.Layout.resize(!0))}function w(){x(),u()}function x(){Gn(l),bn(l),i.destroy()}function v(){var $=P();p!==$&&(p<$||!$)&&i.emit(It)}function m($){var T=a.get().slice(),S=T.length;if(S){for(;T.length<$;)ao(T,T);ao(T.slice(-$),T.slice(0,$)).forEach(function(M,I){var W=I<$,b=y(M.slide,I);W?xr(b,T[0].slide):Ni(s.list,b),ao(l,b),a.register(b,I-$+(W?0:S),M.index)})}}function y($,T){var S=$.cloneNode(!0);return ln(S,n.classes.clone),S.id=e.root.id+"-clone"+$r(T+1),S}function P(){var $=n.clones;if(!e.is(vi))$=0;else if(Wi($)){var T=n[d("fixedWidth")]&&t.Layout.slideSize(0),S=T&&Pi(Ut(s.track)[d("width")]/T);$=S||n[d("autoWidth")]&&e.length||n.perPage*dc}return $}return{mount:u,destroy:x}}function pc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Layout,l=d.slideSize,p=d.getPadding,u=d.totalSize,w=d.listSize,x=d.sliderSize,v=t.Direction,m=v.resolve,y=v.orient,P=t.Elements,$=P.list,T=P.track,S;function M(){S=t.Transition,o([Fn,$o,zt,It],I)}function I(){t.Controller.isBusy()||(t.Scroll.cancel(),b(e.index),t.Slides.update())}function W(O,Y,ie,re){O!==Y&&X(O>ie)&&(L(),R(g(U(),O>ie),!0)),a(fi),s(xn,Y,ie,O),S.start(Y,function(){a(li),s(yi,Y,ie,O),re&&re()})}function b(O){R(H(O,!0))}function R(O,Y){if(!e.is(ji)){var ie=Y?O:V(O);Qt($,"transform","translate"+m("X")+"("+ie+"px)"),O!==ie&&s(vs)}}function V(O){if(e.is(vi)){var Y=A(O),ie=Y>t.Controller.getEnd(),re=Y<0;(re||ie)&&(O=g(O,ie))}return O}function g(O,Y){var ie=O-k(Y),re=x();return O-=y(re*(Pi(Dt(ie)/re)||1))*(Y?1:-1),O}function L(){R(U(),!0),S.cancel()}function A(O){for(var Y=t.Slides.get(),ie=0,re=1/0,F=0;F<Y.length;F++){var ae=Y[F].index,f=Dt(H(ae,!0)-O);if(f<=re)re=f,ie=ae;else break}return ie}function H(O,Y){var ie=y(u(O-1)-j(O));return Y?se(ie):ie}function U(){var O=m("left");return Ut($)[O]-Ut(T)[O]+y(p(!1))}function se(O){return n.trimSpace&&e.is(di)&&(O=ti(O,0,y(x(!0)-w()))),O}function j(O){var Y=n.focus;return Y==="center"?(w()-l(O,!0))/2:+Y*l(O)||0}function k(O){return H(O?t.Controller.getEnd():0,!!n.trimSpace)}function X(O){var Y=y(g(U(),O));return O?Y>=0:Y<=$[m("scrollWidth")]-Ut(T)[m("width")]}function q(O,Y){Y=Wi(Y)?U():Y;var ie=O!==!0&&y(Y)<y(k(!1)),re=O!==!1&&y(Y)>y(k(!0));return ie||re}return{mount:M,move:W,jump:b,translate:R,shift:g,cancel:L,toIndex:A,toPosition:H,getPosition:U,getLimit:k,exceededLimit:q,reposition:I}}function mc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=t.Move,d=a.getPosition,l=a.getLimit,p=a.toPosition,u=t.Slides,w=u.isEnough,x=u.getLength,v=n.omitEnd,m=e.is(vi),y=e.is(di),P=ht(U,!1),$=ht(U,!0),T=n.start||0,S,M=T,I,W,b;function R(){V(),o([zt,It,vo],V),o($o,g)}function V(){I=x(!0),W=n.perMove,b=n.perPage,S=X();var f=ti(T,0,v?S:I-1);f!==T&&(T=f,a.reposition())}function g(){S!==X()&&s(vo)}function L(f,oe,he){if(!ae()){var fe=H(f),We=k(fe);We>-1&&(oe||We!==T)&&(ie(We),a.move(fe,We,M,he))}}function A(f,oe,he,fe){t.Scroll.scroll(f,oe,he,function(){var We=k(a.toIndex(d()));ie(v?kn(We,S):We),fe&&fe()})}function H(f){var oe=T;if(Rn(f)){var he=f.match(/([+\-<>])(\d+)?/)||[],fe=he[1],We=he[2];fe==="+"||fe==="-"?oe=se(T+ +(""+fe+(+We||1)),T):fe===">"?oe=We?q(+We):P(!0):fe==="<"&&(oe=$(!0))}else oe=m?f:ti(f,0,S);return oe}function U(f,oe){var he=W||(F()?1:b),fe=se(T+he*(f?-1:1),T,!(W||F()));return fe===-1&&y&&!is(d(),l(!f),1)?f?0:S:oe?fe:k(fe)}function se(f,oe,he){if(w()||F()){var fe=j(f);fe!==f&&(oe=f,f=fe,he=!1),f<0||f>S?!W&&(so(0,f,oe,!0)||so(S,oe,f,!0))?f=q(O(f)):m?f=he?f<0?-(I%b||b):I:f:n.rewind?f=f<0?S:0:f=-1:he&&f!==oe&&(f=q(O(oe)+(f<oe?-1:1)))}else f=-1;return f}function j(f){if(y&&n.trimSpace==="move"&&f!==T)for(var oe=d();oe===p(f,!0)&&so(f,0,e.length-1,!n.rewind);)f<T?--f:++f;return f}function k(f){return m?(f+I)%I||0:f}function X(){for(var f=I-(F()||m&&W?1:b);v&&f-- >0;)if(p(I-1,!0)!==p(f,!0)){f++;break}return ti(f,0,I-1)}function q(f){return ti(F()?f:b*f,0,S)}function O(f){return F()?kn(f,S):yo((f>=S?I-1:f)/b)}function Y(f){var oe=a.toIndex(f);return y?ti(oe,0,S):oe}function ie(f){f!==T&&(M=T,T=f)}function re(f){return f?M:T}function F(){return!Wi(n.focus)||n.isNavigation}function ae(){return e.state.is([fi,Mi])&&!!n.waitForTransition}return{mount:R,go:L,scroll:A,getNext:P,getPrev:$,getAdjacent:U,getEnd:X,setIndex:ie,getIndex:re,toIndex:q,toPage:O,toDest:Y,hasFocus:F,isBusy:ae}}var gc="http://www.w3.org/2000/svg",hc="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",Ki=40;function fc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=n.classes,l=n.i18n,p=t.Elements,u=t.Controller,w=p.arrows,x=p.track,v=w,m=p.prev,y=p.next,P,$,T={};function S(){I(),o(zt,M)}function M(){W(),S()}function I(){var A=n.arrows;A&&!(m&&y)&&V(),m&&y&&(Li(T,{prev:m,next:y}),Ei(v,A?"":"none"),ln(v,$=kr+"--"+n.direction),A&&(b(),L(),ze([m,y],Bi,x.id),a(ps,m,y)))}function W(){i.destroy(),hn(v,$),P?(Gn(w?[m,y]:v),m=y=null):cn([m,y],Rr)}function b(){o([Fn,yi,It,Yn,vo],L),s(y,"click",ht(R,">")),s(m,"click",ht(R,"<"))}function R(A){u.go(A,!0)}function V(){v=w||ri("div",d.arrows),m=g(!0),y=g(!1),P=!0,Ni(v,[m,y]),!w&&xr(v,x)}function g(A){var H='<button class="'+d.arrow+" "+(A?d.prev:d.next)+'" type="button"><svg xmlns="'+gc+'" viewBox="0 0 '+Ki+" "+Ki+'" width="'+Ki+'" height="'+Ki+'" focusable="false"><path d="'+(n.arrowPath||hc)+'" />';return ts(H)}function L(){if(m&&y){var A=e.index,H=u.getPrev(),U=u.getNext(),se=H>-1&&A<H?l.last:l.prev,j=U>-1&&A>U?l.first:l.next;m.disabled=H<0,y.disabled=U<0,ze(m,Gt,se),ze(y,Gt,j),a(ms,m,y,H,U)}}return{arrows:T,mount:S,destroy:W,update:L}}var yc=Sr+"-interval";function vc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.emit,d=To(n.interval,e.go.bind(e,">"),b),l=d.isPaused,p=t.Elements,u=t.Elements,w=u.root,x=u.toggle,v=n.autoplay,m,y,P=v==="pause";function $(){v&&(T(),x&&ze(x,Bi,p.track.id),P||S(),W())}function T(){n.pauseOnHover&&s(w,"mouseenter mouseleave",function(V){m=V.type==="mouseenter",I()}),n.pauseOnFocus&&s(w,"focusin focusout",function(V){y=V.type==="focusin",I()}),x&&s(x,"click",function(){P?S():M(!0)}),o([xn,Co,It],d.rewind),o(xn,R)}function S(){l()&&t.Slides.isEnough()&&(d.start(!n.resetProgress),y=m=P=!1,W(),a(Er))}function M(V){V===void 0&&(V=!0),P=!!V,W(),l()||(d.pause(),a(Pr))}function I(){P||(m||y?M(!1):S())}function W(){x&&(gn(x,Xn,!P),ze(x,Gt,n.i18n[P?"play":"pause"]))}function b(V){var g=p.bar;g&&Qt(g,"width",V*100+"%"),a(fs,V)}function R(V){var g=t.Slides.getAt(V);d.set(g&&+en(g.slide,yc)||n.interval)}return{mount:$,destroy:d.cancel,play:S,pause:M,isPaused:l}}function bc(e,t,n){var i=wt(e),o=i.on;function s(){n.cover&&(o(Ir,ht(d,!0)),o([Fn,zt,It],ht(a,!0)))}function a(l){t.Slides.forEach(function(p){var u=Hi(p.container||p.slide,"img");u&&u.src&&d(l,u,p)})}function d(l,p,u){u.style("background",l?'center/cover no-repeat url("'+p.src+'")':"",!0),Ei(p,l?"none":"")}return{mount:s,destroy:ht(a,!1)}}var xc=10,wc=600,Sc=.6,$c=1.5,Cc=800;function Tc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=e.state.set,d=t.Move,l=d.getPosition,p=d.getLimit,u=d.exceededLimit,w=d.translate,x=e.is(di),v,m,y=1;function P(){o(xn,M),o([zt,It],I)}function $(b,R,V,g,L){var A=l();if(M(),V&&(!x||!u())){var H=t.Layout.sliderSize(),U=sr(b)*H*yo(Dt(b)/H)||0;b=d.toPosition(t.Controller.toDest(b%H))+U}var se=is(A,b,1);y=1,R=se?0:R||fo(Dt(b-A)/$c,Cc),m=g,v=To(R,T,ht(S,A,b,L),1),a(Mi),s(Co),v.start()}function T(){a(li),m&&m(),s(Yn)}function S(b,R,V,g){var L=l(),A=b+(R-b)*W(g),H=(A-L)*y;w(L+H),x&&!V&&u()&&(y*=Sc,Dt(H)<xc&&$(p(u(!0)),wc,!1,m,!0))}function M(){v&&v.cancel()}function I(){v&&!v.isPaused()&&(M(),T())}function W(b){var R=n.easingFunc;return R?R(b):1-Math.pow(1-b,4)}return{mount:P,destroy:M,scroll:$,cancel:I}}var ni={passive:!1,capture:!0};function Lc(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=i.unbind,l=e.state,p=t.Move,u=t.Scroll,w=t.Controller,x=t.Elements.track,v=t.Media.reduce,m=t.Direction,y=m.resolve,P=m.orient,$=p.getPosition,T=p.exceededLimit,S,M,I,W,b,R=!1,V,g,L;function A(){a(x,Vo,rr,ni),a(x,Do,rr,ni),a(x,As,U,ni),a(x,"click",k,{capture:!0}),a(x,"dragstart",mn),o([Fn,zt],H)}function H(){var G=n.drag;ce(!G),W=G==="free"}function U(G){if(V=!1,!g){var B=We(G);fe(G.target)&&(B||!G.button)&&(w.isBusy()?mn(G,!0):(L=B?x:window,b=l.is([fi,Mi]),I=null,a(L,Vo,se,ni),a(L,Do,j,ni),p.cancel(),u.cancel(),X(G)))}}function se(G){if(l.is(ro)||(l.set(ro),s(cs)),G.cancelable)if(b){p.translate(S+he(F(G)));var B=ae(G)>oa,N=R!==(R=T());(B||N)&&X(G),V=!0,s(ds),mn(G)}else Y(G)&&(b=O(G),mn(G))}function j(G){l.is(ro)&&(l.set(li),s(us)),b&&(q(G),mn(G)),d(L,Vo,se),d(L,Do,j),b=!1}function k(G){!g&&V&&mn(G,!0)}function X(G){I=M,M=G,S=$()}function q(G){var B=ie(G),N=re(B),me=n.rewind&&n.rewindByDrag;v(!1),W?w.scroll(N,0,n.snap):e.is(ji)?w.go(P(sr(B))<0?me?"<":"-":me?">":"+"):e.is(di)&&R&&me?w.go(T(!0)?">":"<"):w.go(w.toDest(N),!0),v(!0)}function O(G){var B=n.dragMinThreshold,N=$i(B),me=N&&B.mouse||0,Ce=(N?B.touch:+B)||10;return Dt(F(G))>(We(G)?Ce:me)}function Y(G){return Dt(F(G))>Dt(F(G,!0))}function ie(G){if(e.is(vi)||!R){var B=ae(G);if(B&&B<oa)return F(G)/B}return 0}function re(G){return $()+sr(G)*kn(Dt(G)*(n.flickPower||600),W?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function F(G,B){return oe(G,B)-oe(f(G),B)}function ae(G){return ar(G)-ar(f(G))}function f(G){return M===G&&I||M}function oe(G,B){return(We(G)?G.changedTouches[0]:G)["page"+y(B?"Y":"X")]}function he(G){return G/(R&&e.is(di)?rc:1)}function fe(G){var B=n.noDrag;return!Ci(G,"."+Ls+", ."+Ao)&&(!B||!Ci(G,B))}function We(G){return typeof TouchEvent<"u"&&G instanceof TouchEvent}function Z(){return b}function ce(G){g=G}return{mount:A,disable:ce,isDragging:Z}}var Ec={Spacebar:" ",Right:Po,Left:Eo,Up:bs,Down:xs};function Mr(e){return e=Rn(e)?e:e.key,Ec[e]||e}var ra="keydown";function Pc(e,t,n){var i=wt(e),o=i.on,s=i.bind,a=i.unbind,d=e.root,l=t.Direction.resolve,p,u;function w(){x(),o(zt,v),o(zt,x),o(xn,y)}function x(){var $=n.keyboard;$&&(p=$==="global"?window:d,s(p,ra,P))}function v(){a(p,ra)}function m($){u=$}function y(){var $=u;u=!0,Ya(function(){u=$})}function P($){if(!u){var T=Mr($);T===l(Eo)?e.go("<"):T===l(Po)&&e.go(">")}}return{mount:w,destroy:v,disable:m}}var wi=Sr+"-lazy",lo=wi+"-srcset",Ic="["+wi+"], ["+lo+"]";function _c(e,t,n){var i=wt(e),o=i.on,s=i.off,a=i.bind,d=i.emit,l=n.lazyLoad==="sequential",p=[yi,Yn],u=[];function w(){n.lazyLoad&&(x(),o(It,x))}function x(){bn(u),v(),l?$():(s(p),o(p,m),m())}function v(){t.Slides.forEach(function(T){wr(T.slide,Ic).forEach(function(S){var M=en(S,wi),I=en(S,lo);if(M!==S.src||I!==S.srcset){var W=n.classes.spinner,b=S.parentElement,R=Hi(b,"."+W)||ri("span",W,b);u.push([S,T,R]),S.src||Ei(S,"none")}})})}function m(){u=u.filter(function(T){var S=n.perPage*((n.preloadPages||1)+1)-1;return T[1].isWithin(e.index,S)?y(T):!0}),u.length||s(p)}function y(T){var S=T[0];ln(T[1].slide,ur),a(S,"load error",ht(P,T)),ze(S,"src",en(S,wi)),ze(S,"srcset",en(S,lo)),cn(S,wi),cn(S,lo)}function P(T,S){var M=T[0],I=T[1];hn(I.slide,ur),S.type!=="error"&&(Gn(T[2]),Ei(M,""),d(Ir,M,I),d(ci)),l&&$()}function $(){u.length&&y(u.shift())}return{mount:w,destroy:ht(bn,u),check:m}}function Ac(e,t,n){var i=wt(e),o=i.on,s=i.emit,a=i.bind,d=t.Slides,l=t.Elements,p=t.Controller,u=p.hasFocus,w=p.getIndex,x=p.go,v=t.Direction.resolve,m=l.pagination,y=[],P,$;function T(){S(),o([zt,It,vo],T);var g=n.pagination;m&&Ei(m,g?"":"none"),g&&(o([xn,Co,Yn],V),M(),V(),s(gs,{list:P,items:y},R(e.index)))}function S(){P&&(Gn(m?Wn(P.children):P),hn(P,$),bn(y),P=null),i.destroy()}function M(){var g=e.length,L=n.classes,A=n.i18n,H=n.perPage,U=u()?p.getEnd()+1:Pi(g/H);P=m||ri("ul",L.pagination,l.track.parentElement),ln(P,$=Ro+"--"+b()),ze(P,fn,"tablist"),ze(P,Gt,A.select),ze(P,Ar,b()===Io?"vertical":"");for(var se=0;se<U;se++){var j=ri("li",null,P),k=ri("button",{class:L.page,type:"button"},j),X=d.getIn(se).map(function(O){return O.slide.id}),q=!u()&&H>1?A.pageX:A.slideX;a(k,"click",ht(I,se)),n.paginationKeyboard&&a(k,"keydown",ht(W,se)),ze(j,fn,"presentation"),ze(k,fn,"tab"),ze(k,Bi,X.join(" ")),ze(k,Gt,lr(q,se+1)),ze(k,ai,-1),y.push({li:j,button:k,page:se})}}function I(g){x(">"+g,!0)}function W(g,L){var A=y.length,H=Mr(L),U=b(),se=-1;H===v(Po,!1,U)?se=++g%A:H===v(Eo,!1,U)?se=(--g+A)%A:H==="Home"?se=0:H==="End"&&(se=A-1);var j=y[se];j&&(es(j.button),x(">"+se),mn(L,!0))}function b(){return n.paginationDirection||n.direction}function R(g){return y[p.toPage(g)]}function V(){var g=R(w(!0)),L=R(w());if(g){var A=g.button;hn(A,Xn),cn(A,Qr),ze(A,ai,-1)}if(L){var H=L.button;ln(H,Xn),ze(H,Qr,!0),ze(H,ai,"")}s(hs,{list:P,items:y},g,L)}return{items:y,mount:T,destroy:S,getAt:R,update:V}}var Rc=[" ","Enter"];function kc(e,t,n){var i=n.isNavigation,o=n.slideFocus,s=[];function a(){e.splides.forEach(function(m){m.isParent||(p(e,m.splide),p(m.splide,e))}),i&&u()}function d(){s.forEach(function(m){m.destroy()}),bn(s)}function l(){d(),a()}function p(m,y){var P=wt(m);P.on(xn,function($,T,S){y.go(y.is(vi)?S:$)}),s.push(P)}function u(){var m=wt(e),y=m.on;y(Cr,x),y(ys,v),y([Fn,zt],w),s.push(m),m.emit(Lr,e.splides)}function w(){ze(t.Elements.list,Ar,n.direction===Io?"vertical":"")}function x(m){e.go(m.index)}function v(m,y){br(Rc,Mr(y))&&(x(m),mn(y))}return{setup:ht(t.Media.set,{slideFocus:Wi(o)?i:o},!0),mount:a,destroy:d,remount:l}}function Mc(e,t,n){var i=wt(e),o=i.bind,s=0;function a(){n.wheel&&o(t.Elements.track,"wheel",d,ni)}function d(p){if(p.cancelable){var u=p.deltaY,w=u<0,x=ar(p),v=n.wheelMinThreshold||0,m=n.wheelSleep||0;Dt(u)>v&&x-s>m&&(e.go(w?"<":">"),s=x),l(w)&&mn(p)}}function l(p){return!n.releaseWheel||e.state.is(fi)||t.Controller.getAdjacent(p)!==-1}return{mount:a}}var Wc=90;function Fc(e,t,n){var i=wt(e),o=i.on,s=t.Elements.track,a=n.live&&!n.isNavigation,d=ri("span",ec),l=To(Wc,ht(u,!1));function p(){a&&(x(!t.Autoplay.isPaused()),ze(s,na,!0),d.textContent="…",o(Er,ht(x,!0)),o(Pr,ht(x,!1)),o([yi,Yn],ht(u,!0)))}function u(v){ze(s,ta,v),v?(Ni(s,d),l.start()):(Gn(d),l.cancel())}function w(){cn(s,[ea,na,ta]),Gn(d)}function x(v){a&&ze(s,ea,v?"off":"polite")}return{mount:p,disable:x,destroy:w}}var Nc=Object.freeze({__proto__:null,Media:ql,Direction:Kl,Elements:ac,Slides:lc,Layout:cc,Clones:uc,Move:pc,Controller:mc,Arrows:fc,Autoplay:vc,Cover:bc,Scroll:Tc,Drag:Lc,Keyboard:Pc,LazyLoad:_c,Pagination:Ac,Sync:kc,Wheel:Mc,Live:Fc}),Hc={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"},Oc={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:ic,i18n:Hc,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function Bc(e,t,n){var i=t.Slides;function o(){wt(e).on([Fn,It],s)}function s(){i.forEach(function(d){d.style("transform","translateX(-"+100*d.index+"%)")})}function a(d,l){i.style("transition","opacity "+n.speed+"ms "+n.easing),Ya(l)}return{mount:o,start:a,cancel:rr}}function jc(e,t,n){var i=t.Move,o=t.Controller,s=t.Scroll,a=t.Elements.list,d=ht(Qt,a,"transition"),l;function p(){wt(e).bind(a,"transitionend",function(v){v.target===a&&l&&(w(),l())})}function u(v,m){var y=i.toPosition(v,!0),P=i.getPosition(),$=x(v);Dt(y-P)>=1&&$>=1?n.useScroll?s.scroll(y,$,!1,m):(d("transform "+$+"ms "+n.easing),i.translate(y,!0),l=m):(i.jump(v),m())}function w(){d(""),s.cancel()}function x(v){var m=n.rewindSpeed;if(e.is(di)&&m){var y=o.getIndex(!0),P=o.getEnd();if(y===0&&v>=P||y>=P&&v===0)return m}return n.speed}return{mount:p,start:u,cancel:w}}var zc=(function(){function e(n,i){this.event=wt(),this.Components={},this.state=Vl(oi),this.splides=[],this._o={},this._E={};var o=Rn(n)?ns(document,n):n;xi(o,o+" is invalid."),this.root=o,i=An({label:en(o,Gt)||"",labelledby:en(o,_r)||""},Oc,e.defaults,i||{});try{An(i,JSON.parse(en(o,Sr)))}catch{xi(!1,"Invalid JSON")}this._o=Object.create(An({},i))}var t=e.prototype;return t.mount=function(i,o){var s=this,a=this.state,d=this.Components;xi(a.is([oi,ho]),"Already mounted!"),a.set(oi),this._C=d,this._T=o||this._T||(this.is(ji)?Bc:jc),this._E=i||this._E;var l=Li({},Nc,this._E,{Transition:this._T});return Un(l,function(p,u){var w=p(s,d,s._o);d[u]=w,w.setup&&w.setup()}),Un(d,function(p){p.mount&&p.mount()}),this.emit(Fn),ln(this.root,tc),a.set(li),this.emit(cr),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(li)&&(this._C.Sync.remount(),i.Components.Sync.remount()),this},t.go=function(i){return this._C.Controller.go(i),this},t.on=function(i,o){return this.event.on(i,o),this},t.off=function(i){return this.event.off(i),this},t.emit=function(i){var o;return(o=this.event).emit.apply(o,[i].concat(Wn(arguments,1))),this},t.add=function(i,o){return this._C.Slides.add(i,o),this},t.remove=function(i){return this._C.Slides.remove(i),this},t.is=function(i){return this._o.type===i},t.refresh=function(){return this.emit(It),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,s=this.state;return s.is(oi)?wt(this).on(cr,this.destroy.bind(this,i)):(Un(this._C,function(a){a.destroy&&a.destroy(i)},!0),o.emit(Tr),o.destroy(),i&&bn(this.splides),s.set(ho)),this},Hl(e,[{key:"options",get:function(){return this._o},set:function(i){this._C.Media.set(i,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}]),e})(),Wr=zc;Wr.defaults={};Wr.STATES=Bl;var aa=[[Fn,"onMounted"],[cr,"onReady"],[xn,"onMove"],[yi,"onMoved"],[Cr,"onClick"],[rs,"onActive"],[as,"onInactive"],[ss,"onVisible"],[ls,"onHidden"],[It,"onRefresh"],[zt,"onUpdated"],[ci,"onResize"],[$o,"onResized"],[cs,"onDrag"],[ds,"onDragging"],[us,"onDragged"],[Co,"onScroll"],[Yn,"onScrolled"],[Tr,"onDestroy"],[ps,"onArrowsMounted"],[ms,"onArrowsUpdated"],[gs,"onPaginationMounted"],[hs,"onPaginationUpdated"],[Lr,"onNavigationMounted"],[Er,"onAutoplayPlay"],[fs,"onAutoplayPlaying"],[Pr,"onAutoplayPause"],[Ir,"onLazyLoadLoaded"]];function Fr(...e){return e.filter(Boolean).join(" ")}function bo(e){return e!==null&&typeof e=="object"}function pr(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!pr(n,t[i]));if(bo(e)&&bo(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!pr(e[o],t[o]))}return e===t}function Vc(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function Dc(e,t){if(e){const n=Object.keys(e);for(let i=0;i<n.length;i++){const o=n[i];if(o!=="__proto__"&&t(e[o],o)===!1)break}}return e}function mr(e,t){const n=e;return Dc(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():bo(i)?n[o]=mr(bo(n[o])?n[o]:{},i):n[o]=i}),n}var qc=({children:e,className:t,...n})=>c.createElement("div",{className:Fr("splide__track",t),...n},c.createElement("ul",{className:"splide__list"},e)),Nr=class extends c.Component{constructor(){super(...arguments),this.splideRef=c.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Wr(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=mr({},e||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:e}=this.props;e&&!pr(this.options,e)&&(this.splide.options=e,this.options=mr({},e));const t=this.getSlides();Vc(this.slides,t)||(this.splide.refresh(),this.slides=t)}sync(e){var t;(t=this.splide)==null||t.sync(e)}go(e){var t;(t=this.splide)==null||t.go(e)}getSlides(){var e;if(this.splide){const t=(e=this.splide.Components.Elements)==null?void 0:e.list.children;return t&&Array.prototype.slice.call(t)||[]}return[]}bind(e){aa.forEach(([t,n])=>{const i=this.props[n];typeof i=="function"&&e.on(t,(...o)=>{i(e,...o)})})}omit(e,t){return t.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&delete e[n]}),e}render(){const{className:e,tag:t="div",hasTrack:n=!0,children:i,...o}=this.props;return c.createElement(t,{className:Fr("splide",e),ref:this.splideRef,...this.omit(o,["options",...aa.map(s=>s[1])])},n?c.createElement(qc,null,i):i)}},Hr=({children:e,className:t,...n})=>c.createElement("li",{className:Fr("splide__slide",t),...n},e);/*!
2
2
  * Splide.js
3
3
  * Version : 4.1.3
4
4
  * License : MIT
5
5
  * Copyright: 2022 Naotoshi Fujita
6
- */const Kc="RichTextRenderer-module__link___BWeZ2",Uc={link:Kc},Gc=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},Fo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Zt(e){const{color:t,...n}=e;return n}function _t(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Fo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:L.scalingValue(e.letterSpacing,t),wordSpacing:L.scalingValue(e.wordSpacing,t),fontSize:L.scalingValue(n,t),lineHeight:i!==void 0?L.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const gi=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Uc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Xc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Xc(e){return{...e.fontFamily&&{fontFamily:Fo(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Yc="SvgImage-module__svg___q3xE-",Jc="SvgImage-module__img___VsTm-",sa={svg:Yc,img:Jc},Zc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Qc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,sn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Zc(e)||!s?r.jsx("img",{src:e,alt:"",className:Xe(sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Xe(sa.svg,i),style:{"--svg":Qc(e),"--fill":t,"--hover-fill":n,...o??{}}})},ed={"top-left":Ee.topLeftAlignment,"top-center":Ee.topCenterAlignment,"top-right":Ee.topRightAlignment,"middle-left":Ee.middleLeftAlignment,"middle-center":Ee.middleCenterAlignment,"middle-right":Ee.middleRightAlignment,"bottom-left":Ee.bottomLeftAlignment,"bottom-center":Ee.bottomCenterAlignment,"bottom-right":Ee.bottomRightAlignment};function td({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=c.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:x,color:v}=n.imageCaption??{},[m,f]=c.useState(void 0),[E,$]=c.useState(null),[C,S]=c.useState(0),[M,I]=c.useState(0),{direction:W,transition:b,controls:R,pagination:V,imageCaption:g,triggers:T}=e,_=c.useRef(b.type),{x:H,y:K}=e.controls.offset,se=j=>{o&&o.go(j)};return c.useEffect(()=>{if(!E)return;const j=new ResizeObserver(k=>{if(!o)return;const[X]=k;f({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return j.observe(E),()=>j.unobserve(E)},[E]),c.useEffect(()=>{!o||_.current===b.type||(I(j=>j+1),_.current=b.type)},[b.type]),r.jsx("div",{className:Xe(Ee.wrapper,{[Ee.editor]:i}),ref:$,children:r.jsxs("div",{className:Ee.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Xe(Ee.captionBlock),children:r.jsx("div",{className:Ee.captionTextWrapper,children:t.map((j,k)=>r.jsx("div",{className:Xe(Ee.captionText,ed[g.alignment],{[Ee.withPointerEvents]:k===C&&i,[Ee.active]:k===C}),style:{fontFamily:Fo(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":L.scalingValue(a.width,i),letterSpacing:L.scalingValue(l,i),wordSpacing:L.scalingValue(u,i),textAlign:p,fontSize:L.scalingValue(w.fontSize,i),lineHeight:L.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Ee.captionTextInner,style:{"--link-hover-color":g.linkHoverColor,"--link-color":g.linkColor,position:"relative",top:L.scalingValue(g.offset.y,i),left:L.scalingValue(g.offset.x,i)},children:r.jsx(gi,{content:j.imageCaption})})},k))})}),r.jsx(Nr,{onMove:j=>{S(j.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:T.autoPlay!==null,...T.autoPlay!==null&&{interval:parseInt(T.autoPlay)*1e3},direction:W==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:T.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,k)=>r.jsx(Hr,{children:r.jsx("div",{className:Ee.sliderItem,children:r.jsx("div",{className:Ee.imgWrapper,children:r.jsx("img",{className:Xe(Ee.sliderImage,{[Ee.contain]:j.image.objectFit==="contain",[Ee.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},k))},M),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(Ee.arrow,{[Ee.arrowVertical]:W==="vert",[Ee.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Ee.arrowInner,style:{transform:`translate(${L.scalingValue(H,i)}, ${L.scalingValue(K*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Xe(Ee.arrowImg,Ee.mirror)}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Xe(Ee.arrowIcon,Ee.arrowImg,Ee.mirror)})]})}),r.jsx("div",{className:Xe(Ee.arrow,Ee.nextArrow,{[Ee.arrowVertical]:W==="vert",[Ee.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Ee.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${L.scalingValue(H*(W==="horiz"?-1:1),i)}, ${L.scalingValue(K,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(sn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Ee.arrowImg}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Xe(Ee.arrowIcon,Ee.arrowImg)})]})})]}),T.triggersList.click&&r.jsx("div",{className:Ee.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&r.jsx("div",{className:Xe(Ee.pagination,{[Ee.paginationInsideBottom]:V.position==="inside-1"&&W==="horiz",[Ee.paginationInsideTop]:V.position==="inside-2"&&W==="horiz",[Ee.paginationOutsideBottom]:V.position==="outside-1"&&W==="horiz",[Ee.paginationOutsideTop]:V.position==="outside-2"&&W==="horiz",[Ee.paginationInsideLeft]:V.position==="inside-1"&&W==="vert",[Ee.paginationInsideRight]:V.position==="inside-2"&&W==="vert",[Ee.paginationOutsideLeft]:V.position==="outside-1"&&W==="vert",[Ee.paginationOutsideRight]:V.position==="outside-2"&&W==="vert",[Ee.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Ee.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${L.scalingValue(V.offset.x,i)}, ${L.scalingValue(V.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((j,k)=>r.jsx("button",{onClick:()=>{o&&o.go(k)},className:Xe(Ee.paginationItem),children:r.jsx("div",{className:Xe(Ee.dot,{[Ee.activeDot]:k===C}),style:{backgroundColor:k===C?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},k))})})]})})}function la({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const nd={element:td,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},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:"inside-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"]}},id="ImageRevealSlider-module__imageRevealSlider___UE5Ob",od="ImageRevealSlider-module__image___Qjt-e",rd="ImageRevealSlider-module__link___N-iLG",ad="ImageRevealSlider-module__cursor___2U03d",ti={imageRevealSlider:id,image:od,link:rd,cursor:ad};function ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,l=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function qo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function sd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await qo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await qo(e);s=a.height/a.width*o}else{const a=await qo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[s,a]=c.useState([]),[d,l]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,f]=c.useState("none"),E=c.useRef({x:0,y:0}),[$,C]=c.useState(!1),{sizeType:S,imageWidth:M,randomRangeImageWidth:I}=e.imageSize,{revealPosition:W,visible:b}=e.position,{cursorType:R,target:V,defaultCursorScale:g,defaultCursor:T,hoverCursorScale:_,hoverCursor:H}=e.cursor;c.useEffect(()=>{if(!i)return;const j=(q,O)=>{const Y=i.getBoundingClientRect(),te=q-Y.left,oe=O-Y.top;if(w({x:te,y:oe}),R==="system"){f("none"),v(1);return}const F=te,ae=oe,h=document.elementFromPoint(Y.left+F,Y.top+ae);if(h&&h.closest("a")){f("none"),v(1);return}const ie=ca(F,ae,s)||V==="area"?{img:H??"none",scale:_}:{img:T??"none",scale:g};f(ie.img),v(ie.scale)},k=q=>{q.stopPropagation(),E.current={x:q.clientX,y:q.clientY},j(q.clientX,q.clientY)},X=()=>{$&&j(E.current.x,E.current.y)};return i.addEventListener("mousemove",k),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",k),window.removeEventListener("scroll",X,!0)}},[i,$,u,R,V,H,T,_,g,s]),c.useEffect(()=>{$||(f("none"),v(0))},[$]);const K=async(j,k,X,q={})=>{const{width:O,height:Y,finalWidth:te}=await sd(j.image.url,S,M,I);let oe=0,F=0;W==="same"?(oe=k/2,F=X/2):(oe=q.x??Math.random()*k,F=q.y??Math.random()*X);const ae=Math.min(Math.max(oe,O/2),k-O/2),h=Math.min(Math.max(F,Y/2),X-Y/2);return{id:p.current++,url:j.image.url,link:j.link,name:j.image.name,x:ae,y:h,width:te}};c.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),k=j.width,X=j.height,q=[];(async()=>{const Y=t[0],te=await K(Y,k,X);q.push(te),a(q),l(1)})()},[S,M,I,W,i]),c.useEffect(()=>{b==="last One"&&a(j=>j.length>0?[j[j.length-1]]:[])},[b]);const se=async j=>{if(!i)return;const k=i.getBoundingClientRect(),X=j.clientX-k.left,q=j.clientY-k.top;if(V==="image"&&!ca(X,q,s))return;let O=0,Y=0;W==="on Click"?(O=X,Y=q):W==="same"?(O=k.width/2,Y=k.height/2):(O=Math.random()*k.width,Y=Math.random()*k.height);const te=t[d],oe=await K(te,k.width,k.height,{x:O,y:Y});a(F=>b==="all"?[...F,oe]:[oe]),l(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),className:ti.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:ti.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:ti.link,children:r.jsx("img",{src:j.url,alt:j.name,className:ti.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:ti.image},j.id)},j.id)),$&&r.jsx("div",{className:ti.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const cd={element:ld,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{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:""}]}}}},dd="LightBox-module__hidden___9s-9x",ud="LightBox-module__heroImage___sTxNF",pd="LightBox-module__background___rm9ml",md="LightBox-module__editor___4ACaY",gd="LightBox-module__contentStyle___Bgnsq",hd="LightBox-module__imageStyle___tLIlB",fd="LightBox-module__imgWrapper___LuFUp",yd="LightBox-module__contain___8-yaS",vd="LightBox-module__cover___hNvOG",bd="LightBox-module__caption___b6L2I",xd="LightBox-module__captionTextInner___rCGNH",wd="LightBox-module__lightboxSplide___XFuWC",Sd="LightBox-module__arrow___iz38X",$d="LightBox-module__arrowVertical___Zfz81",Cd="LightBox-module__nextArrow___zkAQN",Td="LightBox-module__arrowInner___p48sW",Ld="LightBox-module__arrowIcon___3VaFf",Ed="LightBox-module__arrowImg___pNV88",Pd="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",Ad="LightBox-module__thumbsContainerVertical___wttk5",_d="LightBox-module__thumbsContainer___osSma",Rd="LightBox-module__thumbsAlignStart___MO6tY",kd="LightBox-module__thumbsAlignCenter___Q4sUx",Md="LightBox-module__thumbsAlignEnd___p4y9R",Wd="LightBox-module__thumbItem___HvnF3",Fd="LightBox-module__closeButton___g2khP",Nd="LightBox-module__fadeIn___0m5GW",Hd="LightBox-module__slideInLeft___gPYwC",Od="LightBox-module__slideInRight___S-pPp",Bd="LightBox-module__slideInTop___DFdAj",jd="LightBox-module__slideInBottom___m27kZ",zd="LightBox-module__fadeOut___55qBR",Vd="LightBox-module__slideOutLeft___NvU7P",Dd="LightBox-module__slideOutRight___SK7eC",qd="LightBox-module__slideOutTop___Vgg0z",Kd="LightBox-module__slideOutBottom___nJ0Ef",Ud="LightBox-module__scaleSlide___vZriG",ue={hidden:dd,heroImage:ud,background:pd,editor:md,contentStyle:gd,imageStyle:hd,imgWrapper:fd,contain:yd,cover:vd,caption:bd,captionTextInner:xd,lightboxSplide:wd,arrow:Sd,arrowVertical:$d,nextArrow:Cd,arrowInner:Td,arrowIcon:Ld,arrowImg:Ed,mirror:Pd,thumbsWrapper:Id,thumbsContainerVertical:Ad,thumbsContainer:_d,thumbsAlignStart:Rd,thumbsAlignCenter:kd,thumbsAlignEnd:Md,thumbItem:Wd,closeButton:Fd,fadeIn:Nd,slideInLeft:Hd,slideInRight:Od,slideInTop:Bd,slideInBottom:jd,fadeOut:zd,slideOutLeft:Vd,slideOutRight:Dd,slideOutTop:qd,slideOutBottom:Kd,scaleSlide:Ud},Yi=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), calc(-50% + ${L.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${L.scalingValue(t.x,n)}, calc(-50% + ${L.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${L.scalingValue(t.x,n)}), ${L.scalingValue(t.y,n)})`:i.transform=`translate(${L.scalingValue(t.x,n)}, ${L.scalingValue(t.y,n)})`,i};function Rs(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function da(e){const t=e.getBoundingClientRect(),n=Rs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,l=s/a;let p,u;l>d?(p=i,u=i/l):(u=o,p=o*l);const w=t.left+n.left,x=t.top+n.top,v=(i-p)/2+w,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ua(e){const t=e.getBoundingClientRect(),n=Rs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pa(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gd(e,t){const n=(()=>{if(e==="fade in")return ue.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return ue.fadeIn;if(e==="slide in")switch(t){case"left":return ue.slideInLeft;case"right":return ue.slideInRight;case"top":return ue.slideInTop;case"bottom":return ue.slideInBottom;default:return ue.slideInRight}return ue.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return ue.fadeOut;if(e==="slide in")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})(),s=(()=>{if(e==="fade in")return ue.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return ue.slideOutLeft;case"right":return ue.slideOutRight;case"top":return ue.slideOutTop;case"bottom":return ue.slideOutBottom;default:return ue.slideOutRight}return ue.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Xd=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,l]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:ue.heroImage,onClick:()=>l(!0)}),r.jsx(Yd,{isOpen:d,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Yd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Fe;const{widthSettings:l,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:f}=i.imageCaption??{},[E,$]=c.useState(0),[C,S]=c.useState(0),[M,I]=c.useState(!1),[W,b]=c.useState(!1),[R,V]=c.useState({}),g=c.useRef(null),T=c.useRef(null),_=c.useRef(null),H=c.useRef(!1),K=c.useRef(null),se=c.useRef(null),j=c.useRef(null),k=c.useRef(null),X=c.useRef(!1),q=c.useRef(null),[O,Y]=c.useState(!1),{appear:te,triggers:oe,slider:F,thumbnail:ae,controls:h,area:ie,caption:he,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:Z,backdropDisappearClass:le,disappearClass:U}=Gd(te.type,te.direction),B=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const z=()=>{setTimeout(()=>{var A,J;(J=(A=g.current)==null?void 0:A.splide)==null||J.refresh()},16)},de=()=>{S(A=>A+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",de),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",de)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){Y(!1);return}const z=q.current;if(!z)return;const de=()=>{F.direction==="horiz"?Y(z.scrollWidth>z.clientWidth):Y(z.scrollHeight>z.clientHeight)};de();const A=new ResizeObserver(de);return A.observe(z),()=>A.disconnect()},[e,ae.isActive,n.length,R,F.direction]);const N=c.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,de=pa(ie.color);z&&!a&&de>.9&&(document.body.style.backgroundColor=""),I(!0),H.current=!0;const A=J=>{J.target===K.current&&J.animationName&&(K.current&&se.current&&K.current.removeEventListener("animationend",se.current),se.current=null,H.current&&(H.current=!1,t()),I(!1))};K.current&&(se.current=A,K.current.addEventListener("animationend",A))},[t,ie.color,a]),me=(z,de,A)=>{var J,D;if(z){if(oe.type==="click"&&oe.switch==="image")oe.repeat==="close"&&E===n.length-1?N():(J=g.current)==null||J.go("+1");else if(oe.type==="click"&&oe.switch==="50/50"){const ee=z.getBoundingClientRect(),ge=de-ee.left,be=A-ee.top,De=ee.width,Pe=ee.height;let Re;F.direction==="horiz"?Re=ge<De/2?"-1":"+1":Re=be<Pe/2?"-1":"+1",(D=g.current)==null||D.go(Re)}}},we=z=>{if(X.current){X.current=!1;return}const de=n[E],A=(de==null?void 0:de.image.objectFit)==="cover";let J,D;if("changedTouches"in z&&z.changedTouches.length>0)J=z.changedTouches[0].clientX,D=z.changedTouches[0].clientY;else if("clientX"in z)J=z.clientX,D=z.clientY;else return;let ee;if(A&&_.current){const ge=ua(_.current);ee=J>=ge.left&&J<=ge.right&&D>=ge.top&&D<=ge.bottom}else{const ge=_.current?da(_.current):null;if(!ge){z.target===z.currentTarget&&N();return}ee=J>=ge.x&&J<=ge.x+ge.width&&D>=ge.y&&D<=ge.y+ge.height}ee?me(_.current,J,D):N()},Oe=z=>{const de=z.target;(de.classList.contains(ue.thumbsWrapper)||de.classList.contains(ue.thumbsContainer))&&we(z)};c.useEffect(()=>{if(!e)return;const z=de=>{var A,J;if(de.key==="Escape"){N();return}if(de.key==="ArrowRight"){$(D=>(D+1)%Math.max(n.length,1)),(A=g.current)==null||A.go("+1");return}de.key==="ArrowLeft"&&($(D=>(D-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),c.useEffect(()=>{if(e){if($(0),S(de=>de+1),H.current=!1,I(!1),b(!1),V({}),!B)return;const z=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(z)}return()=>{K.current&&se.current&&(K.current.removeEventListener("animationend",se.current),se.current=null),b(!1)}},[e,B]),c.useEffect(()=>{T.current!==null&&T.current!==F.type&&S(z=>z+1),T.current=F.type},[F.type]),c.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,de=window.matchMedia("(max-width: 768px)").matches,A=pa(ie.color);document.body.style.overflow="hidden",b(!1);const J=ee=>{ee.target===K.current&&!H.current&&ee.animationName&&(de&&!a&&A>.9&&(document.body.style.backgroundColor=ie.color),b(!0),K.current&&j.current&&K.current.removeEventListener("animationend",j.current),j.current=null)};K.current&&(j.current=J,K.current.addEventListener("animationend",J));const D=ee=>{const ge=ee.target;ge&&(ge.closest(`.${ue.thumbsWrapper}`)||ge.closest(`.${ue.thumbsContainer}`))||F.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",D,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",D),K.current&&j.current&&(K.current.removeEventListener("animationend",j.current),j.current=null),b(!1)}},[e,a,ie.color,F.type]),c.useEffect(()=>{if(!e)return;const z=de=>{var J,D;if(H.current){de.stopPropagation();return}if(X.current){X.current=!1;return}const A=de.target;if(!(A&&(A.closest(`.${ue.thumbsContainer}`)||A.closest(`.${ue.thumbItem}`)||A.closest(`.${ue.arrow}`)||A.closest(`.${ue.closeButton}`)||A.closest(`.${ue.caption}`)))){if(F.type==="slide"&&oe.type==="drag"&&((D=(J=g.current)==null?void 0:J.splide)!=null&&D.root)){const ee=g.current.splide.root;if(A&&(ee.contains(A)||ee===A))return}if(de.touches.length===0&&de.changedTouches.length>0){const ee=n[E],ge=(ee==null?void 0:ee.image.objectFit)==="cover",be=de.changedTouches[0];let De;if(ge&&_.current){const Pe=ua(_.current);De=be.clientX>=Pe.left&&be.clientX<=Pe.right&&be.clientY>=Pe.top&&be.clientY<=Pe.bottom}else{const Pe=_.current?da(_.current):null;if(!Pe)return;De=be.clientX>=Pe.x&&be.clientX<=Pe.x+Pe.width&&be.clientY>=Pe.y&&be.clientY<=Pe.y+Pe.height}if(!De){de.stopPropagation(),H.current=!0;const Pe=Re=>{Re.stopPropagation(),Re.preventDefault(),document.removeEventListener("click",Pe,!0)};document.addEventListener("click",Pe,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,E,n]);const _e=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&oe.type==="drag";c.useEffect(()=>{var Re,qe;if(!e||!_e||!((qe=(Re=g.current)==null?void 0:Re.splide)!=null&&qe.root))return;const z=g.current.splide.root,de=30,A=(ce,ke)=>{if(k.current){const ze=Math.abs(ce-k.current.x),Te=Math.abs(ke-k.current.y);(ze>0||Te>0)&&(X.current=!0)}},J=ce=>{k.current&&(ce.preventDefault(),A(ce.clientX,ce.clientY))},D=ce=>{k.current&&ce.touches.length>0&&(ce.preventDefault(),A(ce.touches[0].clientX,ce.touches[0].clientY))},ee=(ce,ke)=>{if(!k.current||!g.current){k.current=null;return}const ze=Math.abs(ce-k.current.x),Te=Math.abs(ke-k.current.y);Te>de&&Te>ze&&g.current.go(ke<k.current.y?"+1":"-1"),k.current=null},ge=ce=>{k.current&&ee(ce.clientX,ce.clientY),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("pointermove",J)},be=ce=>{if(k.current){if(ce.changedTouches.length>0){const ke=ce.changedTouches[0];ee(ke.clientX,ke.clientY)}document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),document.removeEventListener("touchmove",D)}},De=ce=>{k.current={x:ce.clientX,y:ce.clientY},X.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ge),document.addEventListener("pointercancel",ge)},Pe=ce=>{ce.touches.length>0&&(k.current={x:ce.touches[0].clientX,y:ce.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",be),document.addEventListener("touchcancel",be))};return z.addEventListener("pointerdown",De),z.addEventListener("touchstart",Pe),()=>{z.removeEventListener("pointerdown",De),z.removeEventListener("touchstart",Pe),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("touchmove",D),document.removeEventListener("touchend",be),document.removeEventListener("touchcancel",be),k.current=null,X.current=!1}},[e,_e,C]);const Se={backgroundColor:ie.color,backdropFilter:`blur(${ie.blur}px)`,animationDuration:`${parseInt(te.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:Ni.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:K,className:Xe(ue.background,M?le:Z,{[ue.editor]:a},{[ue.hidden]:!e}),style:{...Se,...W&&!a&&!M?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?K:null,className:Xe(ue.contentStyle,M?U:We,{[ue.editor]:a},{[ue.hidden]:!e}),style:{animationDuration:`${parseInt(te.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Nr,{onMove:z=>$(z.index),ref:g,className:ue.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:oe.type==="drag"&&!_e,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:oe.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((z,de)=>{const A=Yi(fe.position,fe.offset,a),J=`${L.scalingValue(fe.padding.top,a)} ${L.scalingValue(fe.padding.right,a)} ${L.scalingValue(fe.padding.bottom,a)} ${L.scalingValue(fe.padding.left,a)}`,D=F.type==="scale"?(()=>{const{transform:ee,...ge}=A;return{...ge,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ee||"none"}})():{...A,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(Hr,{children:r.jsx("div",{className:ue.imgWrapper,onClick:we,children:r.jsx("img",{ref:de===E?_:null,className:Xe(ue.imageStyle,{[ue.contain]:z.image.objectFit==="contain",[ue.cover]:z.image.objectFit==="cover",[ue.scaleSlide]:F.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...D,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},de)})},C),h.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Xe(ue.arrow,{[ue.arrowVertical]:F.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x,a)}, ${L.scalingValue(h.offset.y*(F.direction==="horiz"?1:-1),a)}) scale(${h.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[h.arrowsImgUrl&&r.jsx(sn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:Xe(ue.arrowImg,ue.mirror)}),!h.arrowsImgUrl&&r.jsx(ma,{color:h.color,className:Xe(ue.arrowIcon,ue.arrowImg,ue.mirror)})]})}),r.jsx("div",{className:Xe(ue.arrow,ue.nextArrow,{[ue.arrowVertical]:F.direction==="vert"}),style:{color:h.color,"--arrow-hover-color":h.hover},children:r.jsxs("button",{className:ue.arrowInner,style:{transform:`translate(${L.scalingValue(h.offset.x*(F.direction==="horiz"?-1:1),a)}, ${L.scalingValue(h.offset.y,a)}) scale(${h.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[h.arrowsImgUrl&&r.jsx(sn,{url:h.arrowsImgUrl,fill:h.color,hoverFill:h.hover,className:ue.arrowImg}),!h.arrowsImgUrl&&r.jsx(ma,{color:h.color,className:Xe(ue.arrowIcon,ue.arrowImg)})]})})]}),ie.closeIconUrl&&(()=>{const z=Yi(ie.closeIconAlign,ie.closeIconOffset,a),de=`scale(${ie.closeIconScale})`,A=z.transform?`${z.transform} ${de}`:de;return r.jsx("button",{className:ue.closeButton,style:{...z,transform:A},onClick:N,"aria-label":"Close lightbox",children:r.jsx(sn,{url:ie.closeIconUrl,fill:ie.closeIconColor??"#000000",hoverFill:ie.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&i.imageCaption&&((Fe=n[E])==null?void 0:Fe.imageCaption)&&r.jsx("div",{className:ue.caption,style:{...Yi(he.alignment,he.offset,a),fontFamily:Fo(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:l.sizing==="auto"?"max-content":L.scalingValue(l.width,a),letterSpacing:L.scalingValue(u,a),wordSpacing:L.scalingValue(x,a),textAlign:w,fontSize:L.scalingValue(v.fontSize,a),lineHeight:L.scalingValue(v.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:f},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:ue.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:r.jsx(gi,{content:n[E].imageCaption})})}),ae.isActive&&(()=>{const[z,de]=ae.position.split("-"),A=F.direction==="horiz"?`${z}-left`:ae.position,J=Yi(A,ae.offset,a),D=()=>{if(F.direction==="horiz"){if(de==="left")return"flex-start";if(de==="center")return"center";if(de==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:q,className:ue.thumbsWrapper,onClick:ee=>Oe(ee),style:{position:a?"absolute":"fixed",...J,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Xe(ue.thumbsContainer,{[ue.thumbsContainerVertical]:F.direction==="vert",[ue.thumbsAlignStart]:ae.align==="start",[ue.thumbsAlignCenter]:ae.align==="center",[ue.thumbsAlignEnd]:ae.align==="end"}),style:{gap:L.scalingValue(ae.grid.gap,a),justifyContent:O?"flex-start":D()},children:n.map((ee,ge)=>{const be=ge===E,De=R[ge],Re=ae.grid.size*(be?ae.activeState.scale:1),qe=()=>{if(ae.fit!=="fit")return{};if(!De)return F.direction==="horiz"?{height:L.scalingValue(Re,a)}:{width:L.scalingValue(Re,a)};const ce=De.width/De.height;if(F.direction==="horiz"){const ke=Re,ze=ke*ce;return{width:L.scalingValue(ze,a),height:L.scalingValue(ke,a)}}else{const ke=Re,ze=ke/ce;return{width:L.scalingValue(ke,a),height:L.scalingValue(ze,a)}}};return r.jsx("button",{className:ue.thumbItem,style:{...F.direction==="horiz"&&ae.fit!=="fit"?{height:L.scalingValue(Re,a)}:{},...F.direction==="vert"&&ae.fit!=="fit"?{width:L.scalingValue(Re,a)}:{},...ae.fit==="cover"?{width:L.scalingValue(Re,a),height:L.scalingValue(Re,a)}:{},...qe(),transition:be?"all 0.25s ease-out":"none",opacity:be?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:ce=>{var ke;ce.stopPropagation(),$(ge),(ke=g.current)==null||ke.go(ge)},onMouseEnter:()=>{var ce;ae.triggers==="hov"&&((ce=g.current)==null||ce.go(ge))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:ce=>{const ke=ce.currentTarget;ke.naturalWidth&&ke.naturalHeight&&V(ze=>({...ze,[ge]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ge}`)})})})})()]})]}),document.getElementById(s))};function ma({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Jd={element:Xd,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},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 Ji(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zd(e){return`
6
+ */const Kc="RichTextRenderer-module__link___BWeZ2",Uc={link:Kc},Gc=e=>{const t=e.trim();return!t||t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?!1:t.split(/\s+/g).filter(Boolean).some(i=>/^\d/.test(i))},ko=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Gc(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function Xt(e){const{color:t,...n}=e;return n}function kt(e,t){var o,s,a;const{fontSize:n,lineHeight:i}=e;return{fontFamily:ko(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:E.scalingValue(e.letterSpacing,t),wordSpacing:E.scalingValue(e.wordSpacing,t),fontSize:E.scalingValue(n,t),lineHeight:i!==void 0?E.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(s=e.textAppearance)==null?void 0:s.textDecoration,fontVariant:(a=e.textAppearance)==null?void 0:a.fontVariant,textAlign:e.textAlign,color:e.color}}const ui=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?r.jsx("a",{className:Uc.link,href:i.value,target:i.target,children:t(i.children)},o):r.jsx("span",{style:Xc(i),children:i.text},o));return r.jsx(r.Fragment,{children:e.map((n,i)=>{const o=n.children;return r.jsx("div",{children:t(o)},i)})})};function Xc(e){return{...e.fontFamily&&{fontFamily:ko(e.fontFamily)},...e.fontWeight&&{fontWeight:e.fontWeight},...e.fontStyle&&{fontStyle:e.fontStyle},...e.textDecoration&&{textDecoration:e.textDecoration},...e.textTransform&&{textTransform:e.textTransform},...e.fontVariant&&{fontVariant:e.fontVariant},...e.verticalAlign&&{verticalAlign:e.verticalAlign,lineHeight:"0px"}}}const Yc="SvgImage-module__svg___q3xE-",Jc="SvgImage-module__img___VsTm-",sa={svg:Yc,img:Jc},Zc=e=>{const t=e.trim();return t.startsWith("data:image/svg+xml")?!0:(t.split(/[?#]/)[0]??t).endsWith(".svg")},Qc=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,tn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[s,a]=c.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return c.useEffect(()=>{if(typeof window<"u"&&window.CSS){const d=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');a(d)}},[]),!Zc(e)||!s?r.jsx("img",{src:e,alt:"",className:Ge(sa.img,i),style:o}):r.jsx("span",{"data-supports-mask":s,className:Ge(sa.svg,i),style:{"--svg":Qc(e),"--fill":t,"--hover-fill":n,...o??{}}})},ed={"top-left":Pe.topLeftAlignment,"top-center":Pe.topCenterAlignment,"top-right":Pe.topRightAlignment,"middle-left":Pe.middleLeftAlignment,"middle-center":Pe.middleCenterAlignment,"middle-right":Pe.middleRightAlignment,"bottom-left":Pe.bottomLeftAlignment,"bottom-center":Pe.bottomCenterAlignment,"bottom-right":Pe.bottomRightAlignment};function td({settings:e,content:t,styles:n,isEditor:i}){const[o,s]=c.useState(null),{widthSettings:a,fontSettings:d,letterSpacing:l,textAlign:p,wordSpacing:u,fontSizeLineHeight:w,textAppearance:x,color:v}=n.imageCaption??{},[m,y]=c.useState(void 0),[P,$]=c.useState(null),[T,S]=c.useState(0),[M,I]=c.useState(0),{direction:W,transition:b,controls:R,pagination:V,imageCaption:g,triggers:L}=e,A=c.useRef(b.type),{x:H,y:U}=e.controls.offset,se=j=>{o&&o.go(j)};return c.useEffect(()=>{if(!P)return;const j=new ResizeObserver(k=>{if(!o)return;const[X]=k;y({width:Math.round(X.contentRect.width),height:Math.round(X.contentRect.height)})});return j.observe(P),()=>j.unobserve(P)},[P]),c.useEffect(()=>{!o||A.current===b.type||(I(j=>j+1),A.current=b.type)},[b.type]),r.jsx("div",{className:Ge(Pe.wrapper,{[Pe.editor]:i}),ref:$,children:r.jsxs("div",{className:Pe.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:b.backgroundColor&&b.type==="fade in"?b.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&r.jsx("div",{className:Ge(Pe.captionBlock),children:r.jsx("div",{className:Pe.captionTextWrapper,children:t.map((j,k)=>r.jsx("div",{className:Ge(Pe.captionText,ed[g.alignment],{[Pe.withPointerEvents]:k===T&&i,[Pe.active]:k===T}),style:{fontFamily:ko(d.fontFamily),fontWeight:d.fontWeight,fontStyle:d.fontStyle,width:a.sizing==="auto"?"max-content":E.scalingValue(a.width,i),letterSpacing:E.scalingValue(l,i),wordSpacing:E.scalingValue(u,i),textAlign:p,fontSize:E.scalingValue(w.fontSize,i),lineHeight:E.scalingValue(w.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:v,transitionDuration:b.duration?`${Math.round(parseInt(b.duration)/2)}ms`:"500ms"},children:r.jsx("div",{"data-styles":"imageCaption",className:Pe.captionTextInner,style:{"--link-hover-color":g.linkHoverColor,"--link-color":g.linkColor,position:"relative",top:E.scalingValue(g.offset.y,i),left:E.scalingValue(g.offset.x,i)},children:r.jsx(ui,{content:j.imageCaption})})},k))})}),r.jsx(Nr,{onMove:j=>{S(j.index)},ref:s,options:{arrows:!1,speed:b.duration?parseInt(b.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:W==="horiz"||b.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:b.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((j,k)=>r.jsx(Hr,{children:r.jsx("div",{className:Pe.sliderItem,children:r.jsx("div",{className:Pe.imgWrapper,children:r.jsx("img",{className:Ge(Pe.sliderImage,{[Pe.contain]:j.image.objectFit==="contain",[Pe.cover]:j.image.objectFit==="cover"}),src:j.image.url,alt:j.image.name??""})})})},k))},M),R.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(Pe.arrow,{[Pe.arrowVertical]:W==="vert",[Pe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{onClick:()=>{se("-1")},className:Pe.arrowInner,style:{transform:`translate(${E.scalingValue(H,i)}, ${E.scalingValue(U*(W==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(tn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Ge(Pe.arrowImg,Pe.mirror)}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Pe.arrowIcon,Pe.arrowImg,Pe.mirror)})]})}),r.jsx("div",{className:Ge(Pe.arrow,Pe.nextArrow,{[Pe.arrowVertical]:W==="vert",[Pe.hoverArrow]:R.show==="on hover"}),style:{color:R.color,"--arrow-hover-color":R.hover},children:r.jsxs("button",{className:Pe.arrowInner,onClick:()=>se("+1"),style:{transform:`translate(${E.scalingValue(H*(W==="horiz"?-1:1),i)}, ${E.scalingValue(U,i)}) scale(${e.controls.scale/100}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:[R.arrowsImgUrl&&r.jsx(tn,{url:R.arrowsImgUrl,fill:R.color,hoverFill:R.hover,className:Pe.arrowImg}),!R.arrowsImgUrl&&r.jsx(la,{color:R.color,className:Ge(Pe.arrowIcon,Pe.arrowImg)})]})})]}),L.triggersList.click&&r.jsx("div",{className:Pe.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&r.jsx("div",{className:Ge(Pe.pagination,{[Pe.paginationInsideBottom]:V.position==="inside-1"&&W==="horiz",[Pe.paginationInsideTop]:V.position==="inside-2"&&W==="horiz",[Pe.paginationOutsideBottom]:V.position==="outside-1"&&W==="horiz",[Pe.paginationOutsideTop]:V.position==="outside-2"&&W==="horiz",[Pe.paginationInsideLeft]:V.position==="inside-1"&&W==="vert",[Pe.paginationInsideRight]:V.position==="inside-2"&&W==="vert",[Pe.paginationOutsideLeft]:V.position==="outside-1"&&W==="vert",[Pe.paginationOutsideRight]:V.position==="outside-2"&&W==="vert",[Pe.paginationVertical]:W==="vert"}),children:r.jsx("div",{className:Pe.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${E.scalingValue(V.offset.x,i)}, ${E.scalingValue(V.offset.y,i)}) rotate(${W==="horiz"?"0deg":"90deg"})`},children:t.map((j,k)=>r.jsx("button",{onClick:()=>{o&&o.go(k)},className:Ge(Pe.paginationItem),children:r.jsx("div",{className:Ge(Pe.dot,{[Pe.activeDot]:k===T}),style:{backgroundColor:k===T?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},k))})})]})})}function la({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const nd={element:td,id:"control-slider",name:"Slider",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},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:"inside-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"]}},id="ImageRevealSlider-module__imageRevealSlider___UE5Ob",od="ImageRevealSlider-module__image___Qjt-e",rd="ImageRevealSlider-module__link___N-iLG",ad="ImageRevealSlider-module__cursor___2U03d",Zn={imageRevealSlider:id,image:od,link:rd,cursor:ad};function ca(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const s=i.width?Number.parseFloat(i.width):o.naturalWidth,a=o.naturalHeight/o.naturalWidth*s,d=s/2,l=a/2;if(e>=i.x-d&&e<=i.x+d&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function qo(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function sd(e,t,n,i){let o,s;if(t==="custom"){o=n;const a=await qo(e);s=a.height/a.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const a=await qo(e);s=a.height/a.width*o}else{const a=await qo(e);o=a.width,s=a.height}return{width:o,height:s,finalWidth:`${o}px`}}function ld({settings:e,content:t,isEditor:n}){const[i,o]=c.useState(null),[s,a]=c.useState([]),[d,l]=c.useState(0),p=c.useRef(0),[u,w]=c.useState({x:0,y:0}),[x,v]=c.useState(1),[m,y]=c.useState("none"),P=c.useRef({x:0,y:0}),[$,T]=c.useState(!1),{sizeType:S,imageWidth:M,randomRangeImageWidth:I}=e.imageSize,{revealPosition:W,visible:b}=e.position,{cursorType:R,target:V,defaultCursorScale:g,defaultCursor:L,hoverCursorScale:A,hoverCursor:H}=e.cursor;c.useEffect(()=>{if(!i)return;const j=(q,O)=>{const Y=i.getBoundingClientRect(),ie=q-Y.left,re=O-Y.top;if(w({x:ie,y:re}),R==="system"){y("none"),v(1);return}const F=ie,ae=re,f=document.elementFromPoint(Y.left+F,Y.top+ae);if(f&&f.closest("a")){y("none"),v(1);return}const oe=ca(F,ae,s)||V==="area"?{img:H??"none",scale:A}:{img:L??"none",scale:g};y(oe.img),v(oe.scale)},k=q=>{q.stopPropagation(),P.current={x:q.clientX,y:q.clientY},j(q.clientX,q.clientY)},X=()=>{$&&j(P.current.x,P.current.y)};return i.addEventListener("mousemove",k),window.addEventListener("scroll",X,!0),()=>{i.removeEventListener("mousemove",k),window.removeEventListener("scroll",X,!0)}},[i,$,u,R,V,H,L,A,g,s]),c.useEffect(()=>{$||(y("none"),v(0))},[$]);const U=async(j,k,X,q={})=>{const{width:O,height:Y,finalWidth:ie}=await sd(j.image.url,S,M,I);let re=0,F=0;W==="same"?(re=k/2,F=X/2):(re=q.x??Math.random()*k,F=q.y??Math.random()*X);const ae=Math.min(Math.max(re,O/2),k-O/2),f=Math.min(Math.max(F,Y/2),X-Y/2);return{id:p.current++,url:j.image.url,link:j.link,name:j.image.name,x:ae,y:f,width:ie}};c.useEffect(()=>{if(!i||t.length===0)return;const j=i.getBoundingClientRect(),k=j.width,X=j.height,q=[];(async()=>{const Y=t[0],ie=await U(Y,k,X);q.push(ie),a(q),l(1)})()},[S,M,I,W,i]),c.useEffect(()=>{b==="last One"&&a(j=>j.length>0?[j[j.length-1]]:[])},[b]);const se=async j=>{if(!i)return;const k=i.getBoundingClientRect(),X=j.clientX-k.left,q=j.clientY-k.top;if(V==="image"&&!ca(X,q,s))return;let O=0,Y=0;W==="on Click"?(O=X,Y=q):W==="same"?(O=k.width/2,Y=k.height/2):(O=Math.random()*k.width,Y=Math.random()*k.height);const ie=t[d],re=await U(ie,k.width,k.height,{x:O,y:Y});a(F=>b==="all"?[...F,re]:[re]),l(F=>F>=t.length-1?0:F+1)};return r.jsxs("div",{ref:o,onClick:se,onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),className:Zn.imageRevealSlider,style:{cursor:m==="none"?"default":"none"},children:[s.map(j=>r.jsx("div",{className:Zn.wrapper,style:{top:`${j.y}px`,left:`${j.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:j.width??"auto",height:"auto",cursor:m==="none"?"default":"none"},children:V==="area"&&j.link?r.jsx("a",{href:j.link,target:"_blank",className:Zn.link,children:r.jsx("img",{src:j.url,alt:j.name,className:Zn.image},j.id)}):r.jsx("img",{src:j.url,alt:j.name,className:Zn.image},j.id)},j.id)),$&&r.jsx("div",{className:Zn.cursor,style:{left:`${u.x}px`,top:`${u.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const cd={element:ld,id:"control-image-reveal",name:"Click Gallery",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{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:""}]}}}},dd="LightBox-module__hidden___9s-9x",ud="LightBox-module__heroImage___sTxNF",pd="LightBox-module__background___rm9ml",md="LightBox-module__editor___4ACaY",gd="LightBox-module__contentStyle___Bgnsq",hd="LightBox-module__imageStyle___tLIlB",fd="LightBox-module__imgWrapper___LuFUp",yd="LightBox-module__contain___8-yaS",vd="LightBox-module__cover___hNvOG",bd="LightBox-module__caption___b6L2I",xd="LightBox-module__captionTextInner___rCGNH",wd="LightBox-module__lightboxSplide___XFuWC",Sd="LightBox-module__arrow___iz38X",$d="LightBox-module__arrowVertical___Zfz81",Cd="LightBox-module__nextArrow___zkAQN",Td="LightBox-module__arrowInner___p48sW",Ld="LightBox-module__arrowIcon___3VaFf",Ed="LightBox-module__arrowImg___pNV88",Pd="LightBox-module__mirror___pjeXc",Id="LightBox-module__thumbsWrapper___GB-nU",_d="LightBox-module__thumbsContainerVertical___wttk5",Ad="LightBox-module__thumbsContainer___osSma",Rd="LightBox-module__thumbsAlignStart___MO6tY",kd="LightBox-module__thumbsAlignCenter___Q4sUx",Md="LightBox-module__thumbsAlignEnd___p4y9R",Wd="LightBox-module__thumbItem___HvnF3",Fd="LightBox-module__closeButton___g2khP",Nd="LightBox-module__fadeIn___0m5GW",Hd="LightBox-module__slideInLeft___gPYwC",Od="LightBox-module__slideInRight___S-pPp",Bd="LightBox-module__slideInTop___DFdAj",jd="LightBox-module__slideInBottom___m27kZ",zd="LightBox-module__fadeOut___55qBR",Vd="LightBox-module__slideOutLeft___NvU7P",Dd="LightBox-module__slideOutRight___SK7eC",qd="LightBox-module__slideOutTop___Vgg0z",Kd="LightBox-module__slideOutBottom___nJ0Ef",Ud="LightBox-module__scaleSlide___vZriG",pe={hidden:dd,heroImage:ud,background:pd,editor:md,contentStyle:gd,imageStyle:hd,imgWrapper:fd,contain:yd,cover:vd,caption:bd,captionTextInner:xd,lightboxSplide:wd,arrow:Sd,arrowVertical:$d,nextArrow:Cd,arrowInner:Td,arrowIcon:Ld,arrowImg:Ed,mirror:Pd,thumbsWrapper:Id,thumbsContainerVertical:_d,thumbsContainer:Ad,thumbsAlignStart:Rd,thumbsAlignCenter:kd,thumbsAlignEnd:Md,thumbItem:Wd,closeButton:Fd,fadeIn:Nd,slideInLeft:Hd,slideInRight:Od,slideInTop:Bd,slideInBottom:jd,fadeOut:zd,slideOutLeft:Vd,slideOutRight:Dd,slideOutTop:qd,slideOutBottom:Kd,scaleSlide:Ud},Ui=(e,t,n)=>{const i={},[o,s]=e.split("-");return o==="top"?(i.top="0",i.bottom="auto"):o==="middle"?(i.top="50%",i.bottom="auto"):o==="bottom"&&(i.top="auto",i.bottom="0"),s==="left"?(i.left="0",i.right="auto"):s==="center"?(i.left="50%",i.right="auto"):s==="right"&&(i.left="auto",i.right="0"),o==="middle"&&s==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), calc(-50% + ${E.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${E.scalingValue(t.x,n)}, calc(-50% + ${E.scalingValue(t.y,n)}))`:s==="center"?i.transform=`translate(calc(-50% + ${E.scalingValue(t.x,n)}), ${E.scalingValue(t.y,n)})`:i.transform=`translate(${E.scalingValue(t.x,n)}, ${E.scalingValue(t.y,n)})`,i};function Rs(e){const t=window.getComputedStyle(e);return{top:parseFloat(t.paddingTop)||0,right:parseFloat(t.paddingRight)||0,bottom:parseFloat(t.paddingBottom)||0,left:parseFloat(t.paddingLeft)||0}}function da(e){const t=e.getBoundingClientRect(),n=Rs(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),s=e.naturalWidth,a=e.naturalHeight,d=i/o,l=s/a;let p,u;l>d?(p=i,u=i/l):(u=o,p=o*l);const w=t.left+n.left,x=t.top+n.top,v=(i-p)/2+w,m=(o-u)/2+x;return{x:v,y:m,width:p,height:u}}function ua(e){const t=e.getBoundingClientRect(),n=Rs(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function pa(e){const t=e.match(/rgba?\(([^)]+)\)/);if(t){const i=t[1].split(",").map(o=>parseFloat(o.trim()));return i.length===4?i[3]:1}const n=e.match(/^#([0-9a-fA-F]{8})$/);if(n){const i=n[1].substring(6,8);return parseInt(i,16)/255}return e.match(/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/),1}function Gd(e,t){const n=(()=>{if(e==="fade in")return pe.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return pe.slideInLeft;case"right":return pe.slideInRight;case"top":return pe.slideInTop;case"bottom":return pe.slideInBottom;default:return pe.slideInRight}return pe.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return pe.fadeIn;if(e==="slide in")switch(t){case"left":return pe.slideInLeft;case"right":return pe.slideInRight;case"top":return pe.slideInTop;case"bottom":return pe.slideInBottom;default:return pe.slideInRight}return pe.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return pe.fadeOut;if(e==="slide in")switch(t){case"left":return pe.slideOutLeft;case"right":return pe.slideOutRight;case"top":return pe.slideOutTop;case"bottom":return pe.slideOutBottom;default:return pe.slideOutRight}return pe.fadeOut})(),s=(()=>{if(e==="fade in")return pe.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return pe.slideOutLeft;case"right":return pe.slideOutRight;case"top":return pe.slideOutTop;case"bottom":return pe.slideOutBottom;default:return pe.slideOutRight}return pe.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:s}}const Xd=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:s,isPreviewMode:a})=>{const[d,l]=c.useState(!1),{url:p}=e.thumbnailBlock.cover;return c.useEffect(()=>{o==="close"&&l(!1),o==="open"&&l(!0)},[o]),r.jsxs(r.Fragment,{children:[r.jsx("img",{src:p,alt:"Cover",className:pe.heroImage,onClick:()=>l(!0)}),r.jsx(Yd,{isOpen:d,onClose:()=>l(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:s})]})},Yd=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:s,isEditor:a,metadata:d})=>{var Ne;const{widthSettings:l,fontSettings:p,letterSpacing:u,textAlign:w,wordSpacing:x,fontSizeLineHeight:v,textAppearance:m,color:y}=i.imageCaption??{},[P,$]=c.useState(0),[T,S]=c.useState(0),[M,I]=c.useState(!1),[W,b]=c.useState(!1),[R,V]=c.useState({}),g=c.useRef(null),L=c.useRef(null),A=c.useRef(null),H=c.useRef(!1),U=c.useRef(null),se=c.useRef(null),j=c.useRef(null),k=c.useRef(null),X=c.useRef(!1),q=c.useRef(null),[O,Y]=c.useState(!1),{appear:ie,triggers:re,slider:F,thumbnail:ae,controls:f,area:oe,caption:he,layout:fe}=o.lightboxBlock,{appearClass:We,backdropAppearClass:Z,backdropDisappearClass:ce,disappearClass:G}=Gd(ie.type,ie.direction),B=(d==null?void 0:d.itemId)??null;c.useEffect(()=>{const z=()=>{setTimeout(()=>{var _,J;(J=(_=g.current)==null?void 0:_.splide)==null||J.refresh()},16)},ue=()=>{S(_=>_+1)};return window.addEventListener("ArticleEditor.Layout:change",z),window.addEventListener("ArticleEditor.ComponentContent:change",ue),()=>{window.removeEventListener("ArticleEditor.Layout:change",z),window.removeEventListener("ArticleEditor.ComponentContent:change",ue)}},[]),c.useEffect(()=>{if(!e||!ae.isActive){Y(!1);return}const z=q.current;if(!z)return;const ue=()=>{F.direction==="horiz"?Y(z.scrollWidth>z.clientWidth):Y(z.scrollHeight>z.clientHeight)};ue();const _=new ResizeObserver(ue);return _.observe(z),()=>_.disconnect()},[e,ae.isActive,n.length,R,F.direction]);const N=c.useCallback(()=>{const z=window.matchMedia("(max-width: 768px)").matches,ue=pa(oe.color);z&&!a&&ue>.9&&(document.body.style.backgroundColor=""),I(!0),H.current=!0;const _=J=>{J.target===U.current&&J.animationName&&(U.current&&se.current&&U.current.removeEventListener("animationend",se.current),se.current=null,H.current&&(H.current=!1,t()),I(!1))};U.current&&(se.current=_,U.current.addEventListener("animationend",_))},[t,oe.color,a]),me=(z,ue,_)=>{var J,D;if(z){if(re.type==="click"&&re.switch==="image")re.repeat==="close"&&P===n.length-1?N():(J=g.current)==null||J.go("+1");else if(re.type==="click"&&re.switch==="50/50"){const ee=z.getBoundingClientRect(),ge=ue-ee.left,we=_-ee.top,De=ee.width,Ie=ee.height;let Ae;F.direction==="horiz"?Ae=ge<De/2?"-1":"+1":Ae=we<Ie/2?"-1":"+1",(D=g.current)==null||D.go(Ae)}}},Ce=z=>{if(X.current){X.current=!1;return}const ue=n[P],_=(ue==null?void 0:ue.image.objectFit)==="cover";let J,D;if("changedTouches"in z&&z.changedTouches.length>0)J=z.changedTouches[0].clientX,D=z.changedTouches[0].clientY;else if("clientX"in z)J=z.clientX,D=z.clientY;else return;let ee;if(_&&A.current){const ge=ua(A.current);ee=J>=ge.left&&J<=ge.right&&D>=ge.top&&D<=ge.bottom}else{const ge=A.current?da(A.current):null;if(!ge){z.target===z.currentTarget&&N();return}ee=J>=ge.x&&J<=ge.x+ge.width&&D>=ge.y&&D<=ge.y+ge.height}ee?me(A.current,J,D):N()},Be=z=>{const ue=z.target;(ue.classList.contains(pe.thumbsWrapper)||ue.classList.contains(pe.thumbsContainer))&&Ce(z)};c.useEffect(()=>{if(!e)return;const z=ue=>{var _,J;if(ue.key==="Escape"){N();return}if(ue.key==="ArrowRight"){$(D=>(D+1)%Math.max(n.length,1)),(_=g.current)==null||_.go("+1");return}ue.key==="ArrowLeft"&&($(D=>(D-1+Math.max(n.length,1))%Math.max(n.length,1)),(J=g.current)==null||J.go("-1"))};return window.addEventListener("keydown",z),()=>{window.removeEventListener("keydown",z)}},[e,N,n.length]),c.useEffect(()=>{if(e){if($(0),S(ue=>ue+1),H.current=!1,I(!1),b(!1),V({}),!B)return;const z=new CustomEvent("page-overlay",{detail:{itemId:B}});window.dispatchEvent(z)}return()=>{U.current&&se.current&&(U.current.removeEventListener("animationend",se.current),se.current=null),b(!1)}},[e,B]),c.useEffect(()=>{L.current!==null&&L.current!==F.type&&S(z=>z+1),L.current=F.type},[F.type]),c.useEffect(()=>{if(!e)return;const z=document.body.style.overflow,ue=window.matchMedia("(max-width: 768px)").matches,_=pa(oe.color);document.body.style.overflow="hidden",b(!1);const J=ee=>{ee.target===U.current&&!H.current&&ee.animationName&&(ue&&!a&&_>.9&&(document.body.style.backgroundColor=oe.color),b(!0),U.current&&j.current&&U.current.removeEventListener("animationend",j.current),j.current=null)};U.current&&(j.current=J,U.current.addEventListener("animationend",J));const D=ee=>{const ge=ee.target;ge&&(ge.closest(`.${pe.thumbsWrapper}`)||ge.closest(`.${pe.thumbsContainer}`))||F.type!=="slide"&&ee.preventDefault()};return document.addEventListener("touchmove",D,{passive:!1}),()=>{document.body.style.overflow=z,document.removeEventListener("touchmove",D),U.current&&j.current&&(U.current.removeEventListener("animationend",j.current),j.current=null),b(!1)}},[e,a,oe.color,F.type]),c.useEffect(()=>{if(!e)return;const z=ue=>{var J,D;if(H.current){ue.stopPropagation();return}if(X.current){X.current=!1;return}const _=ue.target;if(!(_&&(_.closest(`.${pe.thumbsContainer}`)||_.closest(`.${pe.thumbItem}`)||_.closest(`.${pe.arrow}`)||_.closest(`.${pe.closeButton}`)||_.closest(`.${pe.caption}`)))){if(F.type==="slide"&&re.type==="drag"&&((D=(J=g.current)==null?void 0:J.splide)!=null&&D.root)){const ee=g.current.splide.root;if(_&&(ee.contains(_)||ee===_))return}if(ue.touches.length===0&&ue.changedTouches.length>0){const ee=n[P],ge=(ee==null?void 0:ee.image.objectFit)==="cover",we=ue.changedTouches[0];let De;if(ge&&A.current){const Ie=ua(A.current);De=we.clientX>=Ie.left&&we.clientX<=Ie.right&&we.clientY>=Ie.top&&we.clientY<=Ie.bottom}else{const Ie=A.current?da(A.current):null;if(!Ie)return;De=we.clientX>=Ie.x&&we.clientX<=Ie.x+Ie.width&&we.clientY>=Ie.y&&we.clientY<=Ie.y+Ie.height}if(!De){ue.stopPropagation(),H.current=!0;const Ie=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),document.removeEventListener("click",Ie,!0)};document.addEventListener("click",Ie,!0),N()}}}};return document.addEventListener("touchend",z,{passive:!0}),()=>{document.removeEventListener("touchend",z)}},[e,N,P,n]);const _e=(F.type==="scale"||F.type==="fade")&&F.direction==="vert"&&re.type==="drag";c.useEffect(()=>{var Ae,Ke;if(!e||!_e||!((Ke=(Ae=g.current)==null?void 0:Ae.splide)!=null&&Ke.root))return;const z=g.current.splide.root,ue=30,_=(de,ke)=>{if(k.current){const Ve=Math.abs(de-k.current.x),Le=Math.abs(ke-k.current.y);(Ve>0||Le>0)&&(X.current=!0)}},J=de=>{k.current&&(de.preventDefault(),_(de.clientX,de.clientY))},D=de=>{k.current&&de.touches.length>0&&(de.preventDefault(),_(de.touches[0].clientX,de.touches[0].clientY))},ee=(de,ke)=>{if(!k.current||!g.current){k.current=null;return}const Ve=Math.abs(de-k.current.x),Le=Math.abs(ke-k.current.y);Le>ue&&Le>Ve&&g.current.go(ke<k.current.y?"+1":"-1"),k.current=null},ge=de=>{k.current&&ee(de.clientX,de.clientY),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("pointermove",J)},we=de=>{if(k.current){if(de.changedTouches.length>0){const ke=de.changedTouches[0];ee(ke.clientX,ke.clientY)}document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),document.removeEventListener("touchmove",D)}},De=de=>{k.current={x:de.clientX,y:de.clientY},X.current=!1,document.addEventListener("pointermove",J,{passive:!1}),document.addEventListener("pointerup",ge),document.addEventListener("pointercancel",ge)},Ie=de=>{de.touches.length>0&&(k.current={x:de.touches[0].clientX,y:de.touches[0].clientY},X.current=!1,document.addEventListener("touchmove",D,{passive:!1}),document.addEventListener("touchend",we),document.addEventListener("touchcancel",we))};return z.addEventListener("pointerdown",De),z.addEventListener("touchstart",Ie),()=>{z.removeEventListener("pointerdown",De),z.removeEventListener("touchstart",Ie),document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ge),document.removeEventListener("pointercancel",ge),document.removeEventListener("touchmove",D),document.removeEventListener("touchend",we),document.removeEventListener("touchcancel",we),k.current=null,X.current=!1}},[e,_e,T]);const Te={backgroundColor:oe.color,backdropFilter:`blur(${oe.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(s)?null:ki.createPortal(r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:a?null:U,className:Ge(pe.background,M?ce:Z,{[pe.editor]:a},{[pe.hidden]:!e}),style:{...Te,...W&&!a&&!M?{position:"absolute"}:{}}}),r.jsxs("div",{ref:a?U:null,className:Ge(pe.contentStyle,M?G:We,{[pe.editor]:a},{[pe.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[r.jsx(Nr,{onMove:z=>$(z.index),ref:g,className:pe.lightboxSplide,options:{arrows:!1,speed:F.duration?parseInt(F.duration):500,direction:F.direction==="horiz"||F.type==="fade"||F.type==="scale"?"ltr":"ttb",pagination:!1,drag:re.type==="drag"&&!_e,perPage:1,width:"100%",height:"100%",type:F.type==="fade"||F.type==="scale"?"fade":"loop",padding:0,rewind:re.repeat!=="close",start:0},style:{"--splide-speed":F.duration},children:n.map((z,ue)=>{const _=Ui(fe.position,fe.offset,a),J=`${E.scalingValue(fe.padding.top,a)} ${E.scalingValue(fe.padding.right,a)} ${E.scalingValue(fe.padding.bottom,a)} ${E.scalingValue(fe.padding.left,a)}`,D=F.type==="scale"?(()=>{const{transform:ee,...ge}=_;return{...ge,position:"absolute",padding:J,boxSizing:"border-box","--position-transform":ee||"none"}})():{..._,position:"absolute",padding:J,boxSizing:"border-box"};return r.jsx(Hr,{children:r.jsx("div",{className:pe.imgWrapper,onClick:Ce,children:r.jsx("img",{ref:ue===P?A:null,className:Ge(pe.imageStyle,{[pe.contain]:z.image.objectFit==="contain",[pe.cover]:z.image.objectFit==="cover",[pe.scaleSlide]:F.type==="scale"}),src:z.image.url,alt:z.image.name??"",style:{...D,pointerEvents:z.image.objectFit==="contain"?"none":"auto"}})})},ue)})},T),f.isActive&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:Ge(pe.arrow,{[pe.arrowVertical]:F.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:pe.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x,a)}, ${E.scalingValue(f.offset.y*(F.direction==="horiz"?1:-1),a)}) scale(${f.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("-1")},"aria-label":"Previous",children:[f.arrowsImgUrl&&r.jsx(tn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:Ge(pe.arrowImg,pe.mirror)}),!f.arrowsImgUrl&&r.jsx(ma,{color:f.color,className:Ge(pe.arrowIcon,pe.arrowImg,pe.mirror)})]})}),r.jsx("div",{className:Ge(pe.arrow,pe.nextArrow,{[pe.arrowVertical]:F.direction==="vert"}),style:{color:f.color,"--arrow-hover-color":f.hover},children:r.jsxs("button",{className:pe.arrowInner,style:{transform:`translate(${E.scalingValue(f.offset.x*(F.direction==="horiz"?-1:1),a)}, ${E.scalingValue(f.offset.y,a)}) scale(${f.scale}) rotate(${F.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var z;return(z=g.current)==null?void 0:z.go("+1")},"aria-label":"Next",children:[f.arrowsImgUrl&&r.jsx(tn,{url:f.arrowsImgUrl,fill:f.color,hoverFill:f.hover,className:pe.arrowImg}),!f.arrowsImgUrl&&r.jsx(ma,{color:f.color,className:Ge(pe.arrowIcon,pe.arrowImg)})]})})]}),oe.closeIconUrl&&(()=>{const z=Ui(oe.closeIconAlign,oe.closeIconOffset,a),ue=`scale(${oe.closeIconScale})`,_=z.transform?`${z.transform} ${ue}`:ue;return r.jsx("button",{className:pe.closeButton,style:{...z,transform:_},onClick:N,"aria-label":"Close lightbox",children:r.jsx(tn,{url:oe.closeIconUrl,fill:oe.closeIconColor??"#000000",hoverFill:oe.closeIconHover??"#cccccc"})})})(),he&&he.isActive&&i.imageCaption&&((Ne=n[P])==null?void 0:Ne.imageCaption)&&r.jsx("div",{className:pe.caption,style:{...Ui(he.alignment,he.offset,a),fontFamily:ko(p.fontFamily),fontWeight:p.fontWeight,fontStyle:p.fontStyle,width:l.sizing==="auto"?"max-content":E.scalingValue(l.width,a),letterSpacing:E.scalingValue(u,a),wordSpacing:E.scalingValue(x,a),textAlign:w,fontSize:E.scalingValue(v.fontSize,a),lineHeight:E.scalingValue(v.lineHeight,a),textTransform:m.textTransform??"none",textDecoration:m.textDecoration??"none",fontVariant:m.fontVariant??"normal",color:y},onClick:z=>z.stopPropagation(),children:r.jsx("div",{"data-styles":"imageCaption",className:pe.captionTextInner,style:{"--link-color":he.linkColor,"--link-hover-color":he.linkHoverColor},children:r.jsx(ui,{content:n[P].imageCaption})})}),ae.isActive&&(()=>{const[z,ue]=ae.position.split("-"),_=F.direction==="horiz"?`${z}-left`:ae.position,J=Ui(_,ae.offset,a),D=()=>{if(F.direction==="horiz"){if(ue==="left")return"flex-start";if(ue==="center")return"center";if(ue==="right")return"flex-end"}else{if(z==="top")return"flex-start";if(z==="middle")return"center";if(z==="bottom")return"flex-end"}return"flex-start"};return r.jsx("div",{ref:q,className:pe.thumbsWrapper,onClick:ee=>Be(ee),style:{position:a?"absolute":"fixed",...J,...F.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:r.jsx("div",{className:Ge(pe.thumbsContainer,{[pe.thumbsContainerVertical]:F.direction==="vert",[pe.thumbsAlignStart]:ae.align==="start",[pe.thumbsAlignCenter]:ae.align==="center",[pe.thumbsAlignEnd]:ae.align==="end"}),style:{gap:E.scalingValue(ae.grid.gap,a),justifyContent:O?"flex-start":D()},children:n.map((ee,ge)=>{const we=ge===P,De=R[ge],Ae=ae.grid.size*(we?ae.activeState.scale:1),Ke=()=>{if(ae.fit!=="fit")return{};if(!De)return F.direction==="horiz"?{height:E.scalingValue(Ae,a)}:{width:E.scalingValue(Ae,a)};const de=De.width/De.height;if(F.direction==="horiz"){const ke=Ae,Ve=ke*de;return{width:E.scalingValue(Ve,a),height:E.scalingValue(ke,a)}}else{const ke=Ae,Ve=ke/de;return{width:E.scalingValue(ke,a),height:E.scalingValue(Ve,a)}}};return r.jsx("button",{className:pe.thumbItem,style:{...F.direction==="horiz"&&ae.fit!=="fit"?{height:E.scalingValue(Ae,a)}:{},...F.direction==="vert"&&ae.fit!=="fit"?{width:E.scalingValue(Ae,a)}:{},...ae.fit==="cover"?{width:E.scalingValue(Ae,a),height:E.scalingValue(Ae,a)}:{},...Ke(),transition:we?"all 0.25s ease-out":"none",opacity:we?ae.activeState.opacity/100:ae.opacity/100,"--thumb-hover":ae.activeState.opacity/100},onClick:de=>{var ke;de.stopPropagation(),$(ge),(ke=g.current)==null||ke.go(ge)},onMouseEnter:()=>{var de;ae.triggers==="hov"&&((de=g.current)==null||de.go(ge))},children:r.jsx("img",{src:ee.image.url,alt:ee.image.name??"",onLoad:de=>{const ke=de.currentTarget;ke.naturalWidth&&ke.naturalHeight&&V(Ve=>({...Ve,[ge]:{width:ke.naturalWidth,height:ke.naturalHeight}}))},style:{objectFit:ae.fit==="cover"?"cover":"contain",...ae.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...ae.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${ee.image.name}-${ge}`)})})})})()]})]}),document.getElementById(s))};function ma({color:e,className:t}){return r.jsx("svg",{viewBox:"0 0 10 18",className:t,children:r.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:r.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const Jd={element:Xd,id:"lightbox",name:"Lightbox",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Lightbox.png"},defaultSize:{d:{width:440,height:550},t:{width:235,height:293},m:{width:265,height:331}},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 Gi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Zd(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  width: 100%;
11
- min-height: ${Ji(48)};
11
+ min-height: ${Gi(48)};
12
12
  }
13
13
  .${e}-wrapper.${e}-type-C .${e}-input:focus-visible,
14
14
  .${e}-wrapper.${e}-type-C .${e}-button:focus-visible {
@@ -32,7 +32,7 @@
32
32
  min-width: 0;
33
33
  }
34
34
  .${e}-field-group.${e}-labeled {
35
- gap: ${Ji(4)};
35
+ gap: ${Gi(4)};
36
36
  }
37
37
  .${e}-field-label {
38
38
  white-space: nowrap;
@@ -128,11 +128,11 @@
128
128
  outline: none;
129
129
  }
130
130
  .${e}-success {
131
- margin-top: ${Ji(8)};
131
+ margin-top: ${Gi(8)};
132
132
  color: var(--${e}-success-success-color, var(--${e}-success-color));
133
133
  }
134
134
  .${e}-error {
135
- margin-top: ${Ji(8)};
135
+ margin-top: ${Gi(8)};
136
136
  color: var(--${e}-error-error-color, var(--${e}-error-color));
137
137
  }
138
138
  .${e}-overlay-anchor {
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function Qd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:l}=L.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:f,buttonStroke:E,buttonPadding:$,isButtonFullWidth:C,inputCorners:S,inputStroke:M,inputPadding:I,inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V,buttonColor:g,buttonTextColor:T,buttonBorderColor:_,labelTextColor:H,successColor:K,errorColor:se,fontFamily:j,inputFontSettings:k,inputFontSize:X,inputLineHeight:q,inputLetterSpacing:O,inputWordSpacing:Y,inputTextAppearance:te,buttonFontSettings:oe,buttonFontSize:F,buttonLineHeight:ae,buttonLetterSpacing:h,buttonWordSpacing:ie,buttonTextAppearance:he,labelFontSettings:fe,labelFontSize:We,labelLineHeight:Z,labelLetterSpacing:le,labelWordSpacing:U,labelTextAppearance:B,statusFontSettings:N,statusFontSize:me,statusLineHeight:we,statusLetterSpacing:Oe,statusWordSpacing:_e,statusTextAppearance:Se,successMessage:Fe,errorMessage:z,stateOverrides:de}=e,A=p==="B",J=w.slice(0,Math.min(u,w.length)),D={fontSettings:{fontFamily:j,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:X??.01,lineHeight:q,letterSpacing:O??0,wordSpacing:Y??0,textAppearance:te,color:b},ee=Zt(_t(D,t)),ge=L.scalingValue(M??0,t),be=L.scalingValue((q??X??.01)+((I==null?void 0:I.top)??0)+((I==null?void 0:I.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),De={...ee,borderStyle:"solid",borderRadius:p==="C"?0:L.scalingValue(S??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ge,borderLeftWidth:0}:{borderWidth:ge},paddingTop:L.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:L.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:L.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:L.scalingValue((I==null?void 0:I.left)??0,t),height:be,minHeight:be},Pe={fontSettings:{fontFamily:j,fontWeight:(oe==null?void 0:oe.fontWeight)??400,fontStyle:(oe==null?void 0:oe.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ae,letterSpacing:h??0,wordSpacing:ie??0,textAppearance:he,color:T},Re=Zt(_t(Pe,t)),qe=L.scalingValue(E??0,t),ce={fontSettings:{fontFamily:j,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:We??.01,lineHeight:Z,letterSpacing:le??0,wordSpacing:U??0,textAppearance:B,color:H},ke=_t(ce,t),ze={fontSettings:{fontFamily:j,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:me??.01,lineHeight:we,letterSpacing:Oe??0,wordSpacing:_e??0,textAppearance:Se,color:K},Te=Zt(_t(ze,t)),rt=L.buildColorVars(l,{inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:g,buttonTextColor:T,buttonBorderColor:_,labelTextColor:H,successColor:K,errorColor:se},eu,tu,de),[nt,vt]=c.useState(()=>Object.fromEntries(J.map(He=>[He.name,""]))),[Ue,at]=c.useState("idle"),[Rt,It]=c.useState(null),bt=s==="success"?"success":s==="error"?"error":Ue,ve=s==="error"?z:Rt,Be=s==="filled",Ze=c.useMemo(()=>{if(!Be)return nt;let He=null;for(const Lt of J)(nt[Lt.name]??"").trim().length>0||(He=He??{...nt},He[Lt.name]="Filled");return He??nt},[nt,Be,J]),Ke=bt==="error"?L.getFormFieldValidationError(J,Ze):null,Ht=`${s&&s!=="default"?`${l}-state-${s}`:""}`.trim(),Ft=o==null?void 0:o.submitUrl,zt=(He,Lt)=>{vt(st=>({...st,[He]:Lt}))},cn=async He=>{if(He.preventDefault(),!d)return;const Lt=Object.fromEntries(J.map(Qe=>{var gt;return[Qe.name,((gt=nt[Qe.name])==null?void 0:gt.trim())??""]}).filter(([,Qe])=>Qe));if(!Ft){at("error"),It("No integrations were found for this form.");return}if(Object.keys(Lt).length===0)return;const st=L.getFormFieldValidationError(J,nt);if(st){at("error"),It(st);return}at("submitting"),It(null);try{const Qe=await fetch(Ft,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Lt)});if(!Qe.ok){const gt=await Qe.text();throw new Error(gt||`Request failed: ${Qe.status}`)}at("success"),vt(Object.fromEntries(J.map(gt=>[gt.name,""])))}catch(Qe){at("error"),It(Qe instanceof Error?Qe.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${l}-type-${p} ${Ht}`.trim(),style:rt,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Zd(l)}}),r.jsxs("form",{onSubmit:cn,className:`${l}-form`,children:[r.jsx("div",{className:`${l}-fields`,children:J.map((He,Lt)=>r.jsxs(c.Fragment,{children:[Lt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${l}-control`:void 0,style:{height:L.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${l}-field-group${A?` ${l}-labeled`:""}`,children:[A&&r.jsx("span",{className:`${l}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:He.label||He.name}),He.type==="textarea"?r.jsx("textarea",{name:He.name,autoComplete:"off",value:Ze[He.name]??"",onChange:st=>zt(He.name,st.target.value),placeholder:He.placeholder,className:`${l}-input`,style:De,rows:1,"data-filled":Be||(Ze[He.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:He.type==="phone"?"tel":He.type==="email"?"email":"text",name:He.name,autoComplete:"off",value:Ze[He.name]??"",onChange:st=>zt(He.name,st.target.value),placeholder:He.placeholder,required:He.isRequired??He.type==="email",className:`${l}-input`,style:De,"data-filled":Be||(Ze[He.name]??"").trim().length>0})]})]},Lt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${l}-control`:void 0,style:{height:L.scalingValue(v??0,t)}}),r.jsx("div",{className:`${l}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${l}-button`,style:{borderStyle:"solid",borderRadius:L.scalingValue(f??0,t),borderWidth:qe,paddingTop:L.scalingValue(($==null?void 0:$.top)??0,t),paddingRight:L.scalingValue(($==null?void 0:$.right)??0,t),paddingBottom:L.scalingValue(($==null?void 0:$.bottom)??0,t),paddingLeft:L.scalingValue(($==null?void 0:$.left)??0,t),pointerEvents:d?"auto":void 0,...Re,...C?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${l}-overlay-anchor`,style:C?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:Ue==="submitting"?"...":x})})})]}),bt==="success"&&r.jsx("p",{className:`${l}-success`,style:{...Te},children:Fe}),bt==="error"&&r.jsx("p",{className:`${l}-error`,style:{...Te},role:"alert",children:Ke??ve??z})]})}const eu={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"},tu=["hover","focus","filled","success","error"],nu=`import React, { useMemo, useState } from 'react';
158
+ `}function Qd({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:s}){const a=!!n,d=i&&t||!t,{prefix:l}=E.useScopedStyles(),{type:p="A",fieldsToShow:u=2,fields:w=[],buttonLabel:x,gap:v,fieldsGap:m,buttonCorners:y,buttonStroke:P,buttonPadding:$,isButtonFullWidth:T,inputCorners:S,inputStroke:M,inputPadding:I,inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V,buttonColor:g,buttonTextColor:L,buttonBorderColor:A,labelTextColor:H,successColor:U,errorColor:se,fontFamily:j,inputFontSettings:k,inputFontSize:X,inputLineHeight:q,inputLetterSpacing:O,inputWordSpacing:Y,inputTextAppearance:ie,buttonFontSettings:re,buttonFontSize:F,buttonLineHeight:ae,buttonLetterSpacing:f,buttonWordSpacing:oe,buttonTextAppearance:he,labelFontSettings:fe,labelFontSize:We,labelLineHeight:Z,labelLetterSpacing:ce,labelWordSpacing:G,labelTextAppearance:B,statusFontSettings:N,statusFontSize:me,statusLineHeight:Ce,statusLetterSpacing:Be,statusWordSpacing:_e,statusTextAppearance:Te,successMessage:Ne,errorMessage:z,stateOverrides:ue}=e,_=p==="B",J=w.slice(0,Math.min(u,w.length)),D={fontSettings:{fontFamily:j,fontWeight:(k==null?void 0:k.fontWeight)??400,fontStyle:(k==null?void 0:k.fontStyle)??"normal"},fontSize:X??.01,lineHeight:q,letterSpacing:O??0,wordSpacing:Y??0,textAppearance:ie,color:b},ee=Xt(kt(D,t)),ge=E.scalingValue(M??0,t),we=E.scalingValue((q??X??.01)+((I==null?void 0:I.top)??0)+((I==null?void 0:I.bottom)??0)+(p==="C"?M??0:(M??0)*2),t),De={...ee,borderStyle:"solid",borderRadius:p==="C"?0:E.scalingValue(S??0,t),...p==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ge,borderLeftWidth:0}:{borderWidth:ge},paddingTop:E.scalingValue((I==null?void 0:I.top)??0,t),paddingRight:E.scalingValue((I==null?void 0:I.right)??0,t),paddingBottom:E.scalingValue((I==null?void 0:I.bottom)??0,t),paddingLeft:E.scalingValue((I==null?void 0:I.left)??0,t),height:we,minHeight:we},Ie={fontSettings:{fontFamily:j,fontWeight:(re==null?void 0:re.fontWeight)??400,fontStyle:(re==null?void 0:re.fontStyle)??"normal"},fontSize:F??.01,lineHeight:ae,letterSpacing:f??0,wordSpacing:oe??0,textAppearance:he,color:L},Ae=Xt(kt(Ie,t)),Ke=E.scalingValue(P??0,t),de={fontSettings:{fontFamily:j,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:We??.01,lineHeight:Z,letterSpacing:ce??0,wordSpacing:G??0,textAppearance:B,color:H},ke=kt(de,t),Ve={fontSettings:{fontFamily:j,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:me??.01,lineHeight:Ce,letterSpacing:Be??0,wordSpacing:_e??0,textAppearance:Te,color:U},Le=Xt(kt(Ve,t)),at=E.buildColorVars(l,{inputColor:W,inputTextColor:b,inputBorderColor:R,placeholderColor:V!=null&&V.trim()?V:"#cccccc",buttonColor:g,buttonTextColor:L,buttonBorderColor:A,labelTextColor:H,successColor:U,errorColor:se},eu,tu,ue),[tt,xt]=c.useState(()=>Object.fromEntries(J.map(Oe=>[Oe.name,""]))),[qe,pt]=c.useState("idle"),[Et,_t]=c.useState(null),At=s==="success"?"success":s==="error"?"error":qe,ve=s==="error"?z:Et,He=s==="filled",Ue=c.useMemo(()=>{if(!He)return tt;let Oe=null;for(const Tt of J)(tt[Tt.name]??"").trim().length>0||(Oe=Oe??{...tt},Oe[Tt.name]="Filled");return Oe??tt},[tt,He,J]),nt=At==="error"?E.getFormFieldValidationError(J,Ue):null,Ht=`${s&&s!=="default"?`${l}-state-${s}`:""}`.trim(),Mt=o==null?void 0:o.submitUrl,qt=(Oe,Tt)=>{xt(bt=>({...bt,[Oe]:Tt}))},on=async Oe=>{if(Oe.preventDefault(),!d)return;const Tt=Object.fromEntries(J.map(it=>{var ft;return[it.name,((ft=tt[it.name])==null?void 0:ft.trim())??""]}).filter(([,it])=>it));if(!Mt){pt("error"),_t("No integrations were found for this form.");return}if(Object.keys(Tt).length===0)return;const bt=E.getFormFieldValidationError(J,tt);if(bt){pt("error"),_t(bt);return}pt("submitting"),_t(null);try{const it=await fetch(Mt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Tt)});if(!it.ok){const ft=await it.text();throw new Error(ft||`Request failed: ${it.status}`)}pt("success"),xt(Object.fromEntries(J.map(ft=>[ft.name,""])))}catch(it){pt("error"),_t(it instanceof Error?it.message:"Something went wrong")}};return r.jsxs("div",{className:`${l}-wrapper ${l}-type-${p} ${Ht}`.trim(),style:at,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Zd(l)}}),r.jsxs("form",{onSubmit:on,className:`${l}-form`,children:[r.jsx("div",{className:`${l}-fields`,children:J.map((Oe,Tt)=>r.jsxs(c.Fragment,{children:[Tt>0&&r.jsx("div",{"data-controls":a?"fieldsGap":void 0,className:a?`${l}-control`:void 0,style:{height:E.scalingValue(m??0,t)}}),r.jsxs("div",{className:`${l}-field-group${_?` ${l}-labeled`:""}`,children:[_&&r.jsx("span",{className:`${l}-field-label`,style:ke?{...ke,lineHeight:ke.fontSize}:void 0,children:Oe.label||Oe.name}),Oe.type==="textarea"?r.jsx("textarea",{name:Oe.name,autoComplete:"off",value:Ue[Oe.name]??"",onChange:bt=>qt(Oe.name,bt.target.value),placeholder:Oe.placeholder,className:`${l}-input`,style:De,rows:1,"data-filled":He||(Ue[Oe.name]??"").trim().length>0,"data-field-type":"textarea"}):r.jsx("input",{type:Oe.type==="phone"?"tel":Oe.type==="email"?"email":"text",name:Oe.name,autoComplete:"off",value:Ue[Oe.name]??"",onChange:bt=>qt(Oe.name,bt.target.value),placeholder:Oe.placeholder,required:Oe.isRequired??Oe.type==="email",className:`${l}-input`,style:De,"data-filled":He||(Ue[Oe.name]??"").trim().length>0})]})]},Tt))}),r.jsx("div",{"data-controls":a?"gap":void 0,className:a?`${l}-control`:void 0,style:{height:E.scalingValue(v??0,t)}}),r.jsx("div",{className:`${l}-overlay-anchor`,children:r.jsx("button",{type:d?"submit":"button",className:`${l}-button`,style:{borderStyle:"solid",borderRadius:E.scalingValue(y??0,t),borderWidth:Ke,paddingTop:E.scalingValue(($==null?void 0:$.top)??0,t),paddingRight:E.scalingValue(($==null?void 0:$.right)??0,t),paddingBottom:E.scalingValue(($==null?void 0:$.bottom)??0,t),paddingLeft:E.scalingValue(($==null?void 0:$.left)??0,t),pointerEvents:d?"auto":void 0,...Ae,...T?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:r.jsx("span",{className:`${l}-overlay-anchor`,style:T?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:qe==="submitting"?"...":x})})})]}),At==="success"&&r.jsx("p",{className:`${l}-success`,style:{...Le},children:Ne}),At==="error"&&r.jsx("p",{className:`${l}-error`,style:{...Le},role:"alert",children:nt??ve??z})]})}const eu={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"},tu=["hover","focus","filled","success","error"],nu=`import React, { useMemo, useState } from 'react';
159
159
  import { CommonComponentProps } from '../props';
160
160
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
161
161
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -789,7 +789,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
789
789
  };
790
790
 
791
791
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
792
- `,iu=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],Zi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ou=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Zi.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:{...Zi.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:{...Zi.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:{...Zi.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:iu,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...ou],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"]},au={element:Qd,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:ru,sourceCode:nu};function Qi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function su(e){return`
792
+ `,iu=[{name:"name",type:"text",placeholder:"Enter your name",label:"Name",isRequired:!1,error:"Please, enter your name."},{name:"email",type:"email",placeholder:"Enter your email",label:"Email",isRequired:!0,error:"Please, enter a valid e-mail."},{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"}],Xi={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},ou=["inputColor","inputTextColor","inputBorderColor","placeholderColor","buttonColor","buttonTextColor","buttonBorderColor","labelTextColor","successColor","errorColor"],ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{fieldsToShow:{type:"number",scope:"common",title:"Fields",display:{type:"common-numeric-input"},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:"numeric-input"},min:0,max:100},fieldsGap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",enabled:!0},min:0,max:100},buttonPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},inputPadding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},buttonStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},buttonCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputStroke:{type:"number",scope:"layout",title:"Stroke",display:{type:"numeric-input"},min:0,max:20},inputCorners:{type:"number",scope:"layout",title:"Corners",display:{type:"numeric-input",enabled:!0},min:0,max:100},inputColor:{type:"string",scope:"common",title:"Fill Input",display:{type:"palette-color-picker"}},inputTextColor:{type:"string",scope:"common",title:"Input Label",display:{type:"palette-color-picker"}},inputBorderColor:{type:"string",scope:"common",title:"Stroke Input",display:{type:"palette-color-picker"}},placeholderColor:{type:"string",scope:"common",title:"Filler Input",display:{type:"palette-color-picker"}},buttonColor:{type:"string",scope:"common",title:"Fill Button",display:{type:"palette-color-picker"}},buttonTextColor:{type:"string",scope:"common",title:"Label Button",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:"Stroke Button",display:{type:"palette-color-picker"}},labelTextColor:{type:"string",scope:"common",title:"Label Button",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:{...Xi.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:{...Xi.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:{...Xi.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:{...Xi.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:iu,type:"A",inputColor:"#FFFFFF",inputTextColor:"#0A00F8",inputBorderColor:"#E2E2E2",placeholderColor:"#808080",buttonColor:"#0A00F8",buttonTextColor:"#ffffff",buttonBorderColor:"#0A00F8",labelTextColor:"#999999",successColor:"#22c55e",errorColor:"#ef4444",stateOverrides:{hover:{buttonColor:"#194EFF"}},fontFamily:"Arial",inputFontSettings:{fontWeight:400,fontStyle:"normal"},inputLetterSpacing:0,inputWordSpacing:0,inputTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},buttonFontSettings:{fontWeight:400,fontStyle:"normal"},buttonLetterSpacing:0,buttonWordSpacing:0,buttonTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},labelFontSettings:{fontWeight:400,fontStyle:"normal"},labelLetterSpacing:0,labelWordSpacing:0,labelTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},statusFontSettings:{fontWeight:400,fontStyle:"normal"},statusLetterSpacing:0,statusWordSpacing:0,statusTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},isButtonFullWidth:!1,buttonLabel:"Sign up",successMessage:"Thanks for subscribing!",errorMessage:"Please, fill all required fields."},layoutDefaults:{m:{gap:.032,fieldsGap:.032,buttonStroke:0,buttonCorners:.192,inputStroke:.003,inputCorners:.192,buttonPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},inputFontSize:.043,inputLineHeight:.043,buttonFontSize:.0373,buttonLineHeight:.0373,labelFontSize:.0373,labelLineHeight:.0373,statusFontSize:.0373,statusLineHeight:.0373},d:{gap:.0083,fieldsGap:.0083,buttonStroke:0,buttonCorners:.05,inputStroke:.001,inputCorners:.05,buttonPadding:{top:.01,right:.01,bottom:.01,left:.01},inputPadding:{top:.01,right:.01,bottom:.01,left:.01},inputFontSize:.01,inputLineHeight:.01,buttonFontSize:.01,buttonLineHeight:.01,labelFontSize:.01,labelLineHeight:.01,statusFontSize:.01,statusLineHeight:.01}},displayRules:[{if:{name:"type",value:"B"},then:{name:"properties.labelTextColor.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSettings.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelFontSize.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLineHeight.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelLetterSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelWordSpacing.display.visible",value:!0}},{if:{name:"type",value:"B"},then:{name:"properties.labelTextAppearance.display.visible",value:!0}},{if:{name:"type",value:"C"},then:{name:"properties.buttonCorners.display.enabled",value:!1}},{if:{name:"type",value:"C"},then:{name:"properties.inputCorners.display.enabled",value:!1}},{if:{name:"buttonStroke",value:0},then:{name:"properties.buttonBorderColor.display.visible",value:!1}},{if:{name:"inputStroke",value:0},then:{name:"properties.inputBorderColor.display.visible",value:!1}},{if:{name:"fieldsToShow",value:1},then:{name:"properties.fieldsGap.display.enabled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"group",title:"",items:[{type:"row",title:"Input",items:["inputCorners","inputPadding"]},{type:"row",title:"",items:["fieldsToShow","inputStroke"]}]},{type:"group",title:"",items:[{type:"row",title:"Button",items:["buttonCorners","buttonPadding"]},{type:"row",title:"",items:["buttonStroke","isButtonFullWidth"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","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:["__componentName__","fields","buttonLabel","successMessage","errorMessage"]}],paletteBookmark:{items:[...ou],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"]},au={element:Qd,id:"form",name:"Newsletter Stacked",category:"forms",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Newsletter_Stacked.png"},defaultSize:{d:{width:300,height:42},t:{width:346,height:42},m:{width:300,height:42}},schema:ru,sourceCode:nu};function Yi(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function su(e){return`
793
793
  .${e}-wrapper {
794
794
  display: flex;
795
795
  flex-direction: column;
@@ -971,16 +971,16 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
971
971
  align-items: center;
972
972
  }
973
973
  .${e}-success {
974
- margin-top: ${Qi(8)};
975
- font-size: ${Qi(14)};
974
+ margin-top: ${Yi(8)};
975
+ font-size: ${Yi(14)};
976
976
  color: var(--${e}-success-success-color, var(--${e}-success-color));
977
977
  }
978
978
  .${e}-error {
979
- margin-top: ${Qi(8)};
980
- font-size: ${Qi(14)};
979
+ margin-top: ${Yi(8)};
980
+ font-size: ${Yi(14)};
981
981
  color: var(--${e}-error-error-color, var(--${e}-error-color));
982
982
  }
983
- `}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=L.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:l,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:f,inputWordSpacing:E,inputTextAppearance:$,buttonFontSettings:C,buttonFontSize:S,buttonLineHeight:M,buttonLetterSpacing:I,buttonWordSpacing:W,buttonTextAppearance:b,statusFontSettings:R,statusFontSize:V,statusLineHeight:g,statusLetterSpacing:T,statusWordSpacing:_,statusTextAppearance:H,iconMaxWidth:K,minHeight:se,corners:j,stroke:k,stateOverrides:X,inputPadding:q,buttonPadding:O,successMessage:Y="Thanks for subscribing!",errorMessage:te="Please, fill all required fields."}=e,oe=d.slice(0,Math.min(u,d.length)),[F,ae]=c.useState(()=>Object.fromEntries(oe.map(ce=>[ce.name,""]))),[h,ie]=c.useState("idle"),[he,fe]=c.useState(null),We=o==="success"?"success":o==="error"?"error":h,Z=o==="error"?te:he,le=o==="filled",U=c.useMemo(()=>{if(!le)return F;let ce=null;for(const ke of oe)(F[ke.name]??"").trim().length>0||(ce=ce??{...F},ce[ke.name]="Filled");return ce??F},[le,F,oe]),B=We==="error"?L.getFormFieldValidationError(oe,U):null,N=o&&o!=="default"?`${s}-state-${o}`:"",me=oe.some(ce=>(U[ce.name]??"").trim().length>0),we=N!==`${s}-state-filled`&&me?`${s}-state-filled`:"",Oe=`${N} ${we}`.trim(),_e=i==null?void 0:i.submitUrl,Se=p??"",Fe=(l==null?void 0:l.icon)??"",z=(l==null?void 0:l.mode)==="On",de=Se||"Submit",A={fontSettings:{fontFamily:w,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:v??.01,lineHeight:m,letterSpacing:f??0,wordSpacing:E??0,textAppearance:$,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:w,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:S??.01,lineHeight:M,letterSpacing:I??0,wordSpacing:W??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},D={fontSettings:{fontFamily:w,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:V??.01,lineHeight:g,letterSpacing:T??0,wordSpacing:_??0,textAppearance:H,color:e.successColor??"#22c55e"},ee=Zt(_t(A,t)),ge=Zt(_t(J,t)),be=Zt(_t(D,t)),De=L.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(A==null?void 0:A.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},cu,du,X),Pe={borderRadius:L.scalingValue(j,t),borderWidth:L.scalingValue(k,t),borderStyle:"solid"},Re={borderLeftWidth:L.scalingValue(k,t)},qe=async ce=>{if(ce.preventDefault(),!a)return;const ke=Object.fromEntries(oe.map(Te=>{var rt;return[Te.name,((rt=F[Te.name])==null?void 0:rt.trim())??""]}).filter(([,Te])=>Te));if(!_e){ie("error"),fe("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const ze=L.getFormFieldValidationError(oe,F);if(ze){ie("error"),fe(ze);return}ie("submitting"),fe(null);try{const Te=await fetch(_e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!Te.ok){const rt=await Te.text();throw new Error(rt||`Request failed: ${Te.status}`)}ie("success"),ae(Object.fromEntries(oe.map(rt=>[rt.name,""])))}catch(Te){ie("error"),fe(Te instanceof Error?Te.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Oe}`.trim(),style:De,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:su(s)}}),r.jsxs("form",{onSubmit:qe,className:`${s}-form`,style:{...Pe,height:L.scalingValue(se,t),minHeight:L.scalingValue(se,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:oe.map(ce=>r.jsx("input",{type:ce.type==="email"?"email":ce.type==="phone"?"tel":"text",name:ce.name,autoComplete:"off",value:U[ce.name]??"",onChange:ke=>ae(ze=>({...ze,[ce.name]:ke.target.value})),placeholder:ce.placeholder,required:ce.isRequired??ce.type==="email",className:`${s}-input`,style:{...ee,paddingRight:L.scalingValue(q.right,t),paddingLeft:L.scalingValue(q.left,t),paddingTop:L.scalingValue(q.top,t),paddingBottom:L.scalingValue(q.bottom,t)}},ce.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":de,style:{...ge,...Re,paddingRight:L.scalingValue(O.right,t),paddingLeft:L.scalingValue(O.left,t),paddingTop:L.scalingValue(O.top,t),paddingBottom:L.scalingValue(O.bottom,t),pointerEvents:a?"auto":void 0},children:h==="submitting"?"...":z?Fe&&r.jsx(sn,{url:Fe,className:`${s}-submitBtnIcon`,style:{maxWidth:L.scalingValue(K??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Se})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...be},children:Y}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...be},role:"alert",children:B??Z??te})]})},cu={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"},du=["hover","focus","filled","success","error"],uu=`import React, { useMemo, useState } from 'react';
983
+ `}const lu=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:s}=E.useScopedStyles(),a=n&&t||!t,{fields:d=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:l,buttonLabel:p,fieldsToShow:u=1,fontFamily:w,inputFontSettings:x,inputFontSize:v,inputLineHeight:m,inputLetterSpacing:y,inputWordSpacing:P,inputTextAppearance:$,buttonFontSettings:T,buttonFontSize:S,buttonLineHeight:M,buttonLetterSpacing:I,buttonWordSpacing:W,buttonTextAppearance:b,statusFontSettings:R,statusFontSize:V,statusLineHeight:g,statusLetterSpacing:L,statusWordSpacing:A,statusTextAppearance:H,iconMaxWidth:U,minHeight:se,corners:j,stroke:k,stateOverrides:X,inputPadding:q,buttonPadding:O,successMessage:Y="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,re=d.slice(0,Math.min(u,d.length)),[F,ae]=c.useState(()=>Object.fromEntries(re.map(de=>[de.name,""]))),[f,oe]=c.useState("idle"),[he,fe]=c.useState(null),We=o==="success"?"success":o==="error"?"error":f,Z=o==="error"?ie:he,ce=o==="filled",G=c.useMemo(()=>{if(!ce)return F;let de=null;for(const ke of re)(F[ke.name]??"").trim().length>0||(de=de??{...F},de[ke.name]="Filled");return de??F},[ce,F,re]),B=We==="error"?E.getFormFieldValidationError(re,G):null,N=o&&o!=="default"?`${s}-state-${o}`:"",me=re.some(de=>(G[de.name]??"").trim().length>0),Ce=N!==`${s}-state-filled`&&me?`${s}-state-filled`:"",Be=`${N} ${Ce}`.trim(),_e=i==null?void 0:i.submitUrl,Te=p??"",Ne=(l==null?void 0:l.icon)??"",z=(l==null?void 0:l.mode)==="On",ue=Te||"Submit",_={fontSettings:{fontFamily:w,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:v??.01,lineHeight:m,letterSpacing:y??0,wordSpacing:P??0,textAppearance:$,color:e.inputTextColor??"#111111"},J={fontSettings:{fontFamily:w,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:S??.01,lineHeight:M,letterSpacing:I??0,wordSpacing:W??0,textAppearance:b,color:e.buttonTextColor??"#ffffff"},D={fontSettings:{fontFamily:w,fontWeight:(R==null?void 0:R.fontWeight)??400,fontStyle:(R==null?void 0:R.fontStyle)??"normal"},fontSize:V??.01,lineHeight:g,letterSpacing:L??0,wordSpacing:A??0,textAppearance:H,color:e.successColor??"#22c55e"},ee=Xt(kt(_,t)),ge=Xt(kt(J,t)),we=Xt(kt(D,t)),De=E.buildColorVars(s,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(_==null?void 0:_.color)??"#111111",buttonTextColor:e.buttonTextColor??(J==null?void 0:J.color)??"#ffffff"},cu,du,X),Ie={borderRadius:E.scalingValue(j,t),borderWidth:E.scalingValue(k,t),borderStyle:"solid"},Ae={borderLeftWidth:E.scalingValue(k,t)},Ke=async de=>{if(de.preventDefault(),!a)return;const ke=Object.fromEntries(re.map(Le=>{var at;return[Le.name,((at=F[Le.name])==null?void 0:at.trim())??""]}).filter(([,Le])=>Le));if(!_e){oe("error"),fe("No integrations were found for this form.");return}if(Object.keys(ke).length===0)return;const Ve=E.getFormFieldValidationError(re,F);if(Ve){oe("error"),fe(Ve);return}oe("submitting"),fe(null);try{const Le=await fetch(_e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ke)});if(!Le.ok){const at=await Le.text();throw new Error(at||`Request failed: ${Le.status}`)}oe("success"),ae(Object.fromEntries(re.map(at=>[at.name,""])))}catch(Le){oe("error"),fe(Le instanceof Error?Le.message:"Something went wrong")}};return r.jsxs("div",{className:`${s}-wrapper ${Be}`.trim(),style:De,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:su(s)}}),r.jsxs("form",{onSubmit:Ke,className:`${s}-form`,style:{...Ie,height:E.scalingValue(se,t),minHeight:E.scalingValue(se,t)},children:[r.jsx("div",{className:`${s}-inputWrap ${s}-overlayAnchor`,style:{flex:1,minWidth:0},children:re.map(de=>r.jsx("input",{type:de.type==="email"?"email":de.type==="phone"?"tel":"text",name:de.name,autoComplete:"off",value:G[de.name]??"",onChange:ke=>ae(Ve=>({...Ve,[de.name]:ke.target.value})),placeholder:de.placeholder,required:de.isRequired??de.type==="email",className:`${s}-input`,style:{...ee,paddingRight:E.scalingValue(q.right,t),paddingLeft:E.scalingValue(q.left,t),paddingTop:E.scalingValue(q.top,t),paddingBottom:E.scalingValue(q.bottom,t)}},de.name))}),r.jsx("div",{className:`${s}-overlayAnchor`,children:r.jsx("button",{type:a?"submit":"button",className:`${s}-submitBtn`,"aria-label":ue,style:{...ge,...Ae,paddingRight:E.scalingValue(O.right,t),paddingLeft:E.scalingValue(O.left,t),paddingTop:E.scalingValue(O.top,t),paddingBottom:E.scalingValue(O.bottom,t),pointerEvents:a?"auto":void 0},children:f==="submitting"?"...":z?Ne&&r.jsx(tn,{url:Ne,className:`${s}-submitBtnIcon`,style:{maxWidth:E.scalingValue(U??0,t)},fill:`var(--${s}-button-text-color)`,hoverFill:`var(--${s}-button-text-color)`}):Te})})]}),We==="success"&&r.jsx("p",{className:`${s}-success`,style:{...we},children:Y}),We==="error"&&r.jsx("p",{className:`${s}-error`,style:{...we},role:"alert",children:B??Z??ie})]})},cu={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"},du=["hover","focus","filled","success","error"],uu=`import React, { useMemo, useState } from 'react';
984
984
  import { CommonComponentProps } from '../props';
985
985
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
986
986
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1689,7 +1689,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1689
1689
  .${e}-image-hover-grayscale:hover img {
1690
1690
  filter: grayscale(100%);
1691
1691
  }
1692
- `}const vu=30,bu=20,Uo=2,xu=2,wu=(e,t)=>Array.from({length:t},()=>e).flat(),Su=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},$u=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Su(i,e))},Cu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:l})=>{var b,R,V;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!a)return;const g=p.current;g!=null&&g.complete&&(l==null||l())},[a,(b=e.image)==null?void 0:b.url,l]);const u=n.display==="cover",w=n.ratioValue??"1:1",x=n.reversed??!1,[v,m]=w.split(":").map(Number),$=(x?m:v)/(x?v:m);let C=i,S=C/$;S>o&&(S=o,C=S*$);const M=d(C),I=d(S),W=((R=e.image)==null?void 0:R.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((V=e.image)==null?void 0:V.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?l:void 0,onError:a?l:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:I,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Xe(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:W}):W})})},Tu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=c.useMemo(()=>yu(s),[s]),{speed:d,direction:l,pauseOnHover:p,gap:u,imageMaxWidth:w,imageMaxHeight:x,imageFit:v,hoverEffect:m}=e,f=!!o,E=!n||!!i,$=E&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,C=n?!!i:!0,M=((t==null?void 0:t.length)??0)>0&&(C||!!n),I=Math.max(0,d)*vu,W=B=>L.scalingValue(B,n??!1),b=c.useRef(null),R=c.useRef(null),V=c.useRef(null),[g,T]=c.useState(0),[_,H]=c.useState(0),K=C&&p==="on",[se,j]=c.useState(!1),[k,X]=c.useState({}),q=c.useRef(k);q.current=k;const O=c.useRef(null),Y=c.useRef(0),te=c.useRef(null),oe=c.useMemo(()=>(t??[]).map(B=>{var N;return((N=B.image)==null?void 0:N.url)??""}).join("\0"),[t]),[F,ae]=c.useState(Uo),h=c.useMemo(()=>{const B=t??[];return!C||B.length===0?B:wu(B,F)},[t,C,F]),ie=c.useMemo(()=>h.filter(B=>{var N;return!!((N=B.image)!=null&&N.url)}).length,[h]),he=M?xu:1;c.useLayoutEffect(()=>{Y.current=0,X({}),O.current=null,ae(Uo),T(0)},[oe]),c.useEffect(()=>{if(!E||m!=="randomize")return;const B=b.current;if(!B)return;const N=_e=>{X(Se=>{let Fe=null;for(const z of _e)z in Se&&($u(B,z)||(Fe||(Fe={...Se}),delete Fe[z]));return Fe??Se})},me=new IntersectionObserver(_e=>{const Se=new Set;for(const Fe of _e){const z=Fe.target.dataset.marqueeItemIndex,de=z!==void 0?Number(z):NaN;Number.isNaN(de)||Se.add(de)}Se.size>0&&N(Se)},{root:B,threshold:0});Object.keys(k).forEach(_e=>{const Se=Number(_e);B.querySelectorAll(`[data-marquee-item-index="${Se}"]`).forEach(Fe=>me.observe(Fe))});let we=0;const Oe=()=>{const _e=Object.keys(q.current);_e.length!==0&&(N(_e.map(Number)),we=requestAnimationFrame(Oe))};return Object.keys(q.current).length>0&&(we=requestAnimationFrame(Oe)),()=>{cancelAnimationFrame(we),me.disconnect()}},[m,k,E]),c.useLayoutEffect(()=>{if(!M)return;const B=b.current,N=V.current;if(!B||!N)return;let me=0;const we=()=>{const Se=B.getBoundingClientRect().width,Fe=N.getBoundingClientRect().width,z=O.current,de=typeof z=="number"&&Math.abs(z-Fe)<=.25;if(O.current=Fe,C&&Fe>0&&F>0){const A=Fe/F;if(A>0&&Se>0){const J=Math.max(Uo,Math.ceil(Se/A)+1);if(J!==F){ae(J);return}}}if(Fe>0&&g<=0){T(Fe);return}de&&Fe!==g?T(Fe):!de&&g<=0&&(cancelAnimationFrame(me),me=requestAnimationFrame(we))},Oe=()=>{cancelAnimationFrame(me),me=requestAnimationFrame(we)};te.current=Oe,Oe();const _e=new ResizeObserver(Oe);return _e.observe(B),_e.observe(N),()=>{te.current=null,cancelAnimationFrame(me),_e.disconnect()}},[C,M,g,oe,F]),c.useLayoutEffect(()=>{const B=R.current;if(!M||!B)return;const N=g>0?g:0,me=N>0&&I>0?N/I*1e3:0,we=`${Math.max(0,me)/1e3}s`;B.style.setProperty("--marquee-distance",`${N}px`),B.style.setProperty("--marquee-duration",we)},[C,M,I,g]),c.useLayoutEffect(()=>{if(!M){H(0);return}if(g<=0){H(0);return}const B=R.current;if(!B)return;const N=()=>{const we=B.getBoundingClientRect().height;H(we>0?we:0)};N();const me=new ResizeObserver(N);return me.observe(B),()=>me.disconnect()},[M,he,h,n,u,w,x,g,v,k]);const fe=()=>{K&&j(!0)},We=()=>{K&&j(!1)},Z=c.useCallback(()=>{var B;Y.current=Math.min(ie,Y.current+1),(B=te.current)==null||B.call(te)},[ie]),le=c.useCallback((B,N)=>{X(me=>{const we=me[B]??N,Oe=(t??[]).filter(Se=>Se!==we);if(Oe.length===0)return me;const _e=Oe[Math.floor(Math.random()*Oe.length)];return{...me,[B]:_e}})},[t]),U=(B,N,me,we)=>{const Oe=E&&m==="randomize"&&v.display==="cover"?k[me]??B:B,_e=`max(${W(u)}, ${bu}px)`,Se=`calc(-0.5 * (${_e} + ${W(u)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:E&&m==="randomize"&&v.display==="cover"?()=>le(me,B):void 0,children:[r.jsx(Cu,{item:Oe,prefix:s,imageFit:v,imageMaxWidth:w,imageMaxHeight:x,imageHoverClass:$,isEditor:n,isFirstSet:we,scaled:W,onFirstSetImageDone:Z}),f&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Se,width:_e,height:"100%"}})]},`${N}-${me}`)};if(M){const B=C?K&&se?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:g>0&&_>0?{height:_}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:R,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:fe,onMouseLeave:We,style:{"--marquee-play-state":B},children:Array.from({length:he},(N,me)=>r.jsx("div",{ref:me===0?V:void 0,className:Xe(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(u),paddingRight:W(u)},"aria-hidden":me>0,children:h.map((we,Oe)=>U(we,me,Oe,me===0))},`set-${me}`))},"marquee-track")]})}return r.jsxs("div",{ref:b,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Xe(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((B,N)=>U(B,0,N))},"marquee-static")]})},Lu=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1692
+ `}const vu=30,bu=20,Uo=2,xu=2,wu=(e,t)=>Array.from({length:t},()=>e).flat(),Su=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},$u=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Su(i,e))},Cu=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,imageHoverClass:s,isFirstSet:a,scaled:d,onFirstSetImageDone:l})=>{var b,R,V;const p=c.useRef(null);c.useLayoutEffect(()=>{if(!a)return;const g=p.current;g!=null&&g.complete&&(l==null||l())},[a,(b=e.image)==null?void 0:b.url,l]);const u=n.display==="cover",w=n.ratioValue??"1:1",x=n.reversed??!1,[v,m]=w.split(":").map(Number),$=(x?m:v)/(x?v:m);let T=i,S=T/$;S>o&&(S=o,T=S*$);const M=d(T),I=d(S),W=((R=e.image)==null?void 0:R.url)&&r.jsx("img",{ref:p,src:e.image.url,alt:((V=e.image)==null?void 0:V.name)??"",style:u?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover"}:{pointerEvents:"auto",display:"block",height:"100%",width:"auto",maxWidth:d(i),objectFit:"contain"},onLoad:a?l:void 0,onError:a?l:void 0});return r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...u?{width:M}:{width:"fit-content",maxWidth:d(i),minWidth:0}},children:r.jsx("div",{className:s,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...u?{width:M,height:I,overflow:"hidden"}:{width:"fit-content",maxWidth:d(i),height:d(o)}},children:W&&e.link?r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:Ge(`${t}-marquee-link`,!u&&`${t}-marquee-link-contain`),children:W}):W})})},Tu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=c.useMemo(()=>yu(s),[s]),{speed:d,direction:l,pauseOnHover:p,gap:u,imageMaxWidth:w,imageMaxHeight:x,imageFit:v,hoverEffect:m}=e,y=!!o,P=!n||!!i,$=P&&m!=="off"&&m!=="randomize"?`${s}-image-hover-${m}`:void 0,T=n?!!i:!0,M=((t==null?void 0:t.length)??0)>0&&(T||!!n),I=Math.max(0,d)*vu,W=B=>E.scalingValue(B,n??!1),b=c.useRef(null),R=c.useRef(null),V=c.useRef(null),[g,L]=c.useState(0),[A,H]=c.useState(0),U=T&&p==="on",[se,j]=c.useState(!1),[k,X]=c.useState({}),q=c.useRef(k);q.current=k;const O=c.useRef(null),Y=c.useRef(0),ie=c.useRef(null),re=c.useMemo(()=>(t??[]).map(B=>{var N;return((N=B.image)==null?void 0:N.url)??""}).join("\0"),[t]),[F,ae]=c.useState(Uo),f=c.useMemo(()=>{const B=t??[];return!T||B.length===0?B:wu(B,F)},[t,T,F]),oe=c.useMemo(()=>f.filter(B=>{var N;return!!((N=B.image)!=null&&N.url)}).length,[f]),he=M?xu:1;c.useLayoutEffect(()=>{Y.current=0,X({}),O.current=null,ae(Uo),L(0)},[re]),c.useEffect(()=>{if(!P||m!=="randomize")return;const B=b.current;if(!B)return;const N=_e=>{X(Te=>{let Ne=null;for(const z of _e)z in Te&&($u(B,z)||(Ne||(Ne={...Te}),delete Ne[z]));return Ne??Te})},me=new IntersectionObserver(_e=>{const Te=new Set;for(const Ne of _e){const z=Ne.target.dataset.marqueeItemIndex,ue=z!==void 0?Number(z):NaN;Number.isNaN(ue)||Te.add(ue)}Te.size>0&&N(Te)},{root:B,threshold:0});Object.keys(k).forEach(_e=>{const Te=Number(_e);B.querySelectorAll(`[data-marquee-item-index="${Te}"]`).forEach(Ne=>me.observe(Ne))});let Ce=0;const Be=()=>{const _e=Object.keys(q.current);_e.length!==0&&(N(_e.map(Number)),Ce=requestAnimationFrame(Be))};return Object.keys(q.current).length>0&&(Ce=requestAnimationFrame(Be)),()=>{cancelAnimationFrame(Ce),me.disconnect()}},[m,k,P]),c.useLayoutEffect(()=>{if(!M)return;const B=b.current,N=V.current;if(!B||!N)return;let me=0;const Ce=()=>{const Te=B.getBoundingClientRect().width,Ne=N.getBoundingClientRect().width,z=O.current,ue=typeof z=="number"&&Math.abs(z-Ne)<=.25;if(O.current=Ne,T&&Ne>0&&F>0){const _=Ne/F;if(_>0&&Te>0){const J=Math.max(Uo,Math.ceil(Te/_)+1);if(J!==F){ae(J);return}}}if(Ne>0&&g<=0){L(Ne);return}ue&&Ne!==g?L(Ne):!ue&&g<=0&&(cancelAnimationFrame(me),me=requestAnimationFrame(Ce))},Be=()=>{cancelAnimationFrame(me),me=requestAnimationFrame(Ce)};ie.current=Be,Be();const _e=new ResizeObserver(Be);return _e.observe(B),_e.observe(N),()=>{ie.current=null,cancelAnimationFrame(me),_e.disconnect()}},[T,M,g,re,F]),c.useLayoutEffect(()=>{const B=R.current;if(!M||!B)return;const N=g>0?g:0,me=N>0&&I>0?N/I*1e3:0,Ce=`${Math.max(0,me)/1e3}s`;B.style.setProperty("--marquee-distance",`${N}px`),B.style.setProperty("--marquee-duration",Ce)},[T,M,I,g]),c.useLayoutEffect(()=>{if(!M){H(0);return}if(g<=0){H(0);return}const B=R.current;if(!B)return;const N=()=>{const Ce=B.getBoundingClientRect().height;H(Ce>0?Ce:0)};N();const me=new ResizeObserver(N);return me.observe(B),()=>me.disconnect()},[M,he,f,n,u,w,x,g,v,k]);const fe=()=>{U&&j(!0)},We=()=>{U&&j(!1)},Z=c.useCallback(()=>{var B;Y.current=Math.min(oe,Y.current+1),(B=ie.current)==null||B.call(ie)},[oe]),ce=c.useCallback((B,N)=>{X(me=>{const Ce=me[B]??N,Be=(t??[]).filter(Te=>Te!==Ce);if(Be.length===0)return me;const _e=Be[Math.floor(Math.random()*Be.length)];return{...me,[B]:_e}})},[t]),G=(B,N,me,Ce)=>{const Be=P&&m==="randomize"&&v.display==="cover"?k[me]??B:B,_e=`max(${W(u)}, ${bu}px)`,Te=`calc(-0.5 * (${_e} + ${W(u)}))`;return r.jsxs("div",{className:`${s}-marquee-card`,"data-marquee-item-index":me,onMouseEnter:P&&m==="randomize"&&v.display==="cover"?()=>ce(me,B):void 0,children:[r.jsx(Cu,{item:Be,prefix:s,imageFit:v,imageMaxWidth:w,imageMaxHeight:x,imageHoverClass:$,isEditor:n,isFirstSet:Ce,scaled:W,onFirstSetImageDone:Z}),y&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${s}-gap-control`,style:{position:"absolute",top:0,right:Te,width:_e,height:"100%"}})]},`${N}-${me}`)};if(M){const B=T?U&&se?"paused":"running":"paused";return r.jsxs("div",{ref:b,className:Ge(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Marquee",style:g>0&&A>0?{height:A}:void 0,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{ref:R,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:fe,onMouseLeave:We,style:{"--marquee-play-state":B},children:Array.from({length:he},(N,me)=>r.jsx("div",{ref:me===0?V:void 0,className:Ge(`${s}-marquee-row`,`${s}-marquee-set`),style:{gap:W(u),paddingRight:W(u)},"aria-hidden":me>0,children:f.map((Ce,Be)=>G(Ce,me,Be,me===0))},`set-${me}`))},"marquee-track")]})}return r.jsxs("div",{ref:b,className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:a}}),r.jsx("div",{className:Ge(`${s}-marquee-row`,`${s}-marquee-static`),style:{gap:W(u),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((B,N)=>G(B,0,N))},"marquee-static")]})},Lu=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
1693
1693
  import cn from 'classnames';
1694
1694
  import { CommonComponentProps } from '../props';
1695
1695
  import { scalingValue } from '../utils/scalingValue';
@@ -2407,7 +2407,7 @@ type MarqueeProps = {
2407
2407
  pointer-events: auto;
2408
2408
  z-index: 10;
2409
2409
  }
2410
- `}const Iu=30,ha=2,Au=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),{align:a,speed:d,direction:l,pauseOnHover:p,gap:u,cardWidth:w,corners:x,stroke:v,strokeColor:m,bgColor:f,padding:E,logoMarginTop:$,logoWidth:C,logoHeight:S,captionMarginTop:M}=e,I=!!o,W=((t==null?void 0:t.length)??0)>0,b=d>0&&(!n||i),R=W&&(b||n),V=Math.max(0,d)*Iu,g=A=>L.scalingValue(A,n??!1),T=c.useRef(null),_=c.useRef(null),H=c.useRef(null),[K,se]=c.useState(0),[j,k]=c.useState(0),[X,q]=c.useState(0),O=b&&p==="on",[Y,te]=c.useState(!1),oe=c.useRef(null),[F,ae]=c.useState(0),[h,ie]=c.useState(0),he=c.useRef(null),fe=A=>{var D,ee,ge,be,De;return{fontSettings:{fontFamily:(e==null?void 0:e[`${A}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${A}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${A}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ge=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:ge.textTransform)??"none",textDecoration:((be=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:be.textDecoration)??"none",fontVariant:((De=e==null?void 0:e[`${A}TextAppearance`])==null?void 0:De.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${A}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${A}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${A}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${A}LineHeight`])??.01,color:(e==null?void 0:e[`${A}Color`])??"#000000"}},We=fe("text"),Z=fe("caption"),le=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(A=>{var J,D;return(((J=A.text)==null?void 0:J.length)??0)>0||(((D=A.caption)==null?void 0:D.length)??0)>0}),[t]),U=c.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:j<=0||K<=0?ha:Math.max(ha,Math.ceil(K/j)+1),[R,t==null?void 0:t.length,j,K]);c.useLayoutEffect(()=>{if(!R)return;const A=T.current,J=H.current;if(!A||!J)return;let D=0;const ee=()=>{const De=A.getBoundingClientRect().width,Pe=J.getBoundingClientRect().width,Re=he.current,qe=typeof Re=="number"&&Math.abs(Re-Pe)<=.25;if(he.current=Pe,se(De),typeof Pe=="number"&&Pe>0&&j<=0){k(Pe);return}qe&&Pe!==j?k(Pe):!qe&&j<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(ee))},ge=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(ee)};ge();const be=new ResizeObserver(ge);return be.observe(A),be.observe(J),()=>{cancelAnimationFrame(D),be.disconnect()}},[b,R,j]),c.useLayoutEffect(()=>{const A=_.current;if(!R||!A)return;const J=j>0?j:0,D=J>0&&V>0?J/V*1e3:0,ee=`${Math.max(0,D)/1e3}s`;A.style.setProperty("--marquee-distance",`${J}px`),A.style.setProperty("--marquee-duration",ee)},[b,R,V,j]),c.useLayoutEffect(()=>{if(!R){q(0);return}const A=H.current,J=_.current;if(!A||!J)return;const D=()=>{let ge=0;for(let be=0;be<A.children.length;be++){const Pe=A.children[be].firstElementChild;Pe&&(ge=Math.max(ge,Pe.offsetHeight))}ge<=0&&(ge=J.offsetHeight),q(ge>0?ge:0)};D();const ee=new ResizeObserver(D);return ee.observe(A),ee.observe(J),()=>{ee.disconnect()}},[R,U,t,n,u,w,E,v,x,C,S,F,h]);const B=()=>{O&&te(!0)},N=()=>{O&&te(!1)},me=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),we=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Oe=c.useCallback((A,J,D,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":I?"y":void 0,className:I?`${s}-control`:void 0,style:{height:g((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{..._t(A,n),textAlign:we,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(gi,{content:J})})]},D),[me,we,n,I,s,g]),_e=c.useCallback((A,J,D)=>{var ee,ge,be;return r.jsxs("div",{style:{padding:`${g(E.top)} ${g(E.right)} ${g(E.bottom)} ${g(E.left)}`,width:g(w+v*2),height:"100%",borderRadius:g(x),border:`${g(v)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:f}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:me,textAlign:we},children:[A.text&&Oe(We,A.text,"text",D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(D==null?void 0:D.textMinHeightPx)=="number"&&D.textMinHeightPx>0?{minHeightPx:D.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I&&!(D!=null&&D.dataMeasureAttrs)?"logoMarginTop":void 0,className:I&&!(D!=null&&D.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:g($)}}),r.jsx("div",{style:{width:g(C),height:g(S)},children:((ee=A.logo)==null?void 0:ee.url)&&r.jsx("img",{src:A.logo.url,alt:((ge=A.logo)==null?void 0:ge.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((be=A.logo)==null?void 0:be.objectFit)||"contain"}})})]}),A.caption&&Oe(Z,A.caption,"caption",{...D!=null&&D.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(D==null?void 0:D.captionMinHeightPx)=="number"&&D.captionMinHeightPx>0?{minHeightPx:D.captionMinHeightPx}:{}})]})]},J)},[f,M,Z,w,x,S,$,C,me,we,E.bottom,E.left,E.right,E.top,Oe,v,m,We,n,I,s]),Se=c.useCallback(A=>{ae(A.maxTextPx),ie(A.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!le){Se({maxTextPx:0,maxCaptionPx:0});return}const A=oe.current;if(!A)return;const J=()=>{L.readTestimonialTextMeasure(A,Se)};J();const D=new ResizeObserver(J);return D.observe(A),()=>{D.disconnect()}},[le,Se,t,_e]);const Fe=le?{textMinHeightPx:F,captionMinHeightPx:h}:void 0,z=le?r.jsx("div",{ref:oe,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((A,J)=>_e(A,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,de=(A,J)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[_e(A,`card-${J}`,Fe),I&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${g(u)})`,width:g(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);if(R){const A=b?O&&Y?"paused":"running":"paused";return r.jsxs("div",{ref:T,className:Xe(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...X>0?{height:X}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{ref:_,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:B,onMouseLeave:N,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":A},children:Array.from({length:U},(J,D)=>r.jsx("div",{ref:D===0?H:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:g(u),paddingRight:g(u)},"aria-hidden":D>0,children:t==null?void 0:t.map((ee,ge)=>de(ee,`${D}-${ge}`))},`set-${D}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{style:{gap:g(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((A,J)=>de(A,J))})]})},_u=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2410
+ `}const Iu=30,ha=2,_u=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),{align:a,speed:d,direction:l,pauseOnHover:p,gap:u,cardWidth:w,corners:x,stroke:v,strokeColor:m,bgColor:y,padding:P,logoMarginTop:$,logoWidth:T,logoHeight:S,captionMarginTop:M}=e,I=!!o,W=((t==null?void 0:t.length)??0)>0,b=d>0&&(!n||i),R=W&&(b||n),V=Math.max(0,d)*Iu,g=_=>E.scalingValue(_,n??!1),L=c.useRef(null),A=c.useRef(null),H=c.useRef(null),[U,se]=c.useState(0),[j,k]=c.useState(0),[X,q]=c.useState(0),O=b&&p==="on",[Y,ie]=c.useState(!1),re=c.useRef(null),[F,ae]=c.useState(0),[f,oe]=c.useState(0),he=c.useRef(null),fe=_=>{var D,ee,ge,we,De;return{fontSettings:{fontFamily:(e==null?void 0:e[`${_}FontFamily`])??"Arial",fontWeight:((D=e==null?void 0:e[`${_}FontSettings`])==null?void 0:D.fontWeight)??400,fontStyle:((ee=e==null?void 0:e[`${_}FontSettings`])==null?void 0:ee.fontStyle)??"normal"},textAppearance:{textTransform:((ge=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:ge.textTransform)??"none",textDecoration:((we=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:we.textDecoration)??"none",fontVariant:((De=e==null?void 0:e[`${_}TextAppearance`])==null?void 0:De.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${_}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${_}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${_}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${_}LineHeight`])??.01,color:(e==null?void 0:e[`${_}Color`])??"#000000"}},We=fe("text"),Z=fe("caption"),ce=c.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(_=>{var J,D;return(((J=_.text)==null?void 0:J.length)??0)>0||(((D=_.caption)==null?void 0:D.length)??0)>0}),[t]),G=c.useMemo(()=>!R||(t==null?void 0:t.length)===0?1:j<=0||U<=0?ha:Math.max(ha,Math.ceil(U/j)+1),[R,t==null?void 0:t.length,j,U]);c.useLayoutEffect(()=>{if(!R)return;const _=L.current,J=H.current;if(!_||!J)return;let D=0;const ee=()=>{const De=_.getBoundingClientRect().width,Ie=J.getBoundingClientRect().width,Ae=he.current,Ke=typeof Ae=="number"&&Math.abs(Ae-Ie)<=.25;if(he.current=Ie,se(De),typeof Ie=="number"&&Ie>0&&j<=0){k(Ie);return}Ke&&Ie!==j?k(Ie):!Ke&&j<=0&&(cancelAnimationFrame(D),D=requestAnimationFrame(ee))},ge=()=>{cancelAnimationFrame(D),D=requestAnimationFrame(ee)};ge();const we=new ResizeObserver(ge);return we.observe(_),we.observe(J),()=>{cancelAnimationFrame(D),we.disconnect()}},[b,R,j]),c.useLayoutEffect(()=>{const _=A.current;if(!R||!_)return;const J=j>0?j:0,D=J>0&&V>0?J/V*1e3:0,ee=`${Math.max(0,D)/1e3}s`;_.style.setProperty("--marquee-distance",`${J}px`),_.style.setProperty("--marquee-duration",ee)},[b,R,V,j]),c.useLayoutEffect(()=>{if(!R){q(0);return}const _=H.current,J=A.current;if(!_||!J)return;const D=()=>{let ge=0;for(let we=0;we<_.children.length;we++){const Ie=_.children[we].firstElementChild;Ie&&(ge=Math.max(ge,Ie.offsetHeight))}ge<=0&&(ge=J.offsetHeight),q(ge>0?ge:0)};D();const ee=new ResizeObserver(D);return ee.observe(_),ee.observe(J),()=>{ee.disconnect()}},[R,G,t,n,u,w,P,v,x,T,S,F,f]);const B=()=>{O&&ie(!0)},N=()=>{O&&ie(!1)},me=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[a]),Ce=c.useMemo(()=>{switch(a){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[a]),Be=c.useCallback((_,J,D,ee)=>r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I?ee==null?void 0:ee.controlsName:void 0,"data-controls-axis":I?"y":void 0,className:I?`${s}-control`:void 0,style:{height:g((ee==null?void 0:ee.marginTop)??0)}}),r.jsx("div",{...ee!=null&&ee.dataMeasureKind?{"data-testimonial-measure":ee.dataMeasureKind}:{},style:{...kt(_,n),textAlign:Ce,pointerEvents:"auto",...typeof(ee==null?void 0:ee.minHeightPx)=="number"&&ee.minHeightPx>0?{minHeight:ee.minHeightPx}:{}},children:r.jsx(ui,{content:J})})]},D),[me,Ce,n,I,s,g]),_e=c.useCallback((_,J,D)=>{var ee,ge,we;return r.jsxs("div",{style:{padding:`${g(P.top)} ${g(P.right)} ${g(P.bottom)} ${g(P.left)}`,width:g(w+v*2),height:"100%",borderRadius:g(x),border:`${g(v)} solid ${m}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[r.jsx("div",{className:`${s}-cover`,style:{background:y}}),r.jsxs("div",{className:`${s}-elements-overlay`,style:{alignItems:me,textAlign:Ce},children:[_.text&&Be(We,_.text,"text",D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(D==null?void 0:D.textMinHeightPx)=="number"&&D.textMinHeightPx>0?{minHeightPx:D.textMinHeightPx}:void 0),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:me,width:"100%"},children:[r.jsx("div",{"data-controls":I&&!(D!=null&&D.dataMeasureAttrs)?"logoMarginTop":void 0,className:I&&!(D!=null&&D.dataMeasureAttrs)?`${s}-control`:void 0,style:{height:g($)}}),r.jsx("div",{style:{width:g(T),height:g(S)},children:((ee=_.logo)==null?void 0:ee.url)&&r.jsx("img",{src:_.logo.url,alt:((ge=_.logo)==null?void 0:ge.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((we=_.logo)==null?void 0:we.objectFit)||"contain"}})})]}),_.caption&&Be(Z,_.caption,"caption",{...D!=null&&D.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:M,...D!=null&&D.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(D==null?void 0:D.captionMinHeightPx)=="number"&&D.captionMinHeightPx>0?{minHeightPx:D.captionMinHeightPx}:{}})]})]},J)},[y,M,Z,w,x,S,$,T,me,Ce,P.bottom,P.left,P.right,P.top,Be,v,m,We,n,I,s]),Te=c.useCallback(_=>{ae(_.maxTextPx),oe(_.maxCaptionPx)},[]);c.useLayoutEffect(()=>{if(!ce){Te({maxTextPx:0,maxCaptionPx:0});return}const _=re.current;if(!_)return;const J=()=>{E.readTestimonialTextMeasure(_,Te)};J();const D=new ResizeObserver(J);return D.observe(_),()=>{D.disconnect()}},[ce,Te,t,_e]);const Ne=ce?{textMinHeightPx:F,captionMinHeightPx:f}:void 0,z=ce?r.jsx("div",{ref:re,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:(t??[]).map((_,J)=>_e(_,`measure-${J}`,{dataMeasureAttrs:!0}))}):null,ue=(_,J)=>r.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[_e(_,`card-${J}`,Ne),I&&r.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${g(u)})`,width:g(u),height:"100%",pointerEvents:"auto",zIndex:2}})]},J);if(R){const _=b?O&&Y?"paused":"running":"paused";return r.jsxs("div",{ref:L,className:Ge(`${s}-wrapper`,`${s}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...X>0?{height:X}:{}},children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{ref:A,className:`${s}-marquee-track`,"data-direction":l,onMouseEnter:B,onMouseLeave:N,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px","--marquee-play-state":_},children:Array.from({length:G},(J,D)=>r.jsx("div",{ref:D===0?H:void 0,className:`${s}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:g(u),paddingRight:g(u)},"aria-hidden":D>0,children:t==null?void 0:t.map((ee,ge)=>ue(ee,`${D}-${ge}`))},`set-${D}`))})]})}return r.jsxs("div",{className:`${s}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:ga(s)}}),z,r.jsx("div",{style:{gap:g(u),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((_,J)=>ue(_,J))})]})},Au=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
2411
2411
  import cn from 'classnames';
2412
2412
  import { CommonComponentProps } from '../props';
2413
2413
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3022,7 +3022,7 @@ type TestimonialsSettings = {
3022
3022
  logoHeight: number;
3023
3023
  captionMarginTop: number;
3024
3024
  };
3025
- `,fa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ku={element:Au,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ru,sourceCode:_u,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Mu(e){return`
3025
+ `,fa={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ru={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},pauseOnHover:{title:"Pause on hover",type:"string",scope:"common",display:{type:"toggle-cycle",enum:["on","off"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,max:200,display:{type:"range-control"}},align:{type:"string",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},cardWidth:{type:"number",scope:"layout",title:"width",min:0,max:400,display:{type:"numeric-input"}},corners:{type:"number",scope:"layout",title:"Corners",min:0,max:100,display:{type:"numeric-input"}},stroke:{type:"number",scope:"layout",title:"Stroke",min:0,max:10,display:{type:"numeric-input"}},strokeColor:{type:"string",scope:"common",title:"Stroke Card",display:{type:"palette-color-picker",visible:!0}},bgColor:{title:"BG card",type:"string",scope:"common",display:{type:"palette-color-picker"}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},logoMarginTop:{type:"number",scope:"layout",title:"Logo margin top",min:0,max:200,display:{type:"range-control"}},logoWidth:{type:"number",scope:"layout",title:"width",min:0,max:200,display:{type:"numeric-input"}},logoHeight:{type:"number",scope:"layout",title:"height",min:0,max:200,display:{type:"numeric-input"}},textColor:{type:"string",scope:"common",title:"Fill Text",display:{type:"palette-color-picker"}},captionColor:{type:"string",scope:"common",title:"Fill Caption",display:{type:"palette-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...fa.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}}},defaults:{direction:"left",pauseOnHover:"off",strokeColor:"#000000",bgColor:"rgba(255, 255, 255, 0.81)",textColor:"#000000",captionColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},align:"center",captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{speed:.55,gap:.04,cardWidth:.8,corners:.02,stroke:.001,padding:{top:.053,right:.026,bottom:.053,left:.026},logoMarginTop:.18,logoWidth:.21,logoHeight:.21,captionMarginTop:.056,textFontSize:.058,textLineHeight:.088,captionFontSize:.053,captionLineHeight:.069},d:{speed:1.64,gap:.02,cardWidth:.15,corners:.005,stroke:.001,padding:{top:.01,right:.01,bottom:.01,left:.01},logoMarginTop:.048,logoWidth:.055,logoHeight:.027,captionMarginTop:.005,textFontSize:.012,textLineHeight:.013,captionFontSize:.01,captionLineHeight:.01}},displayRules:[{if:{name:"stroke",value:0},then:{name:"properties.strokeColor.display.visible",value:!1}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","cardWidth","corners","stroke","strokeColor","bgColor","padding","logoMarginTop","logoWidth","logoHeight","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["align","direction"]},{type:"row",items:["speed","pauseOnHover"]},{type:"row",title:"Card",items:[{type:"group",title:"",items:["cardWidth","corners"]},{type:"group",title:"",items:["stroke","padding"]}]},{type:"row",title:"Image Container",items:["logoWidth","logoHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["bgColor","strokeColor","textColor","captionColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{logo:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{logo:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},ku={element:_u,id:"testimonials",name:"Eliana",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Grid.mp4"},defaultSize:{d:{width:"100%",height:320}},schema:Ru,sourceCode:Au,assetsPaths:{content:[{path:"logo.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function Mu(e){return`
3026
3026
  .${e}-container {
3027
3027
  position: relative;
3028
3028
  overflow-x: clip;
@@ -3146,7 +3146,7 @@ type TestimonialsSettings = {
3146
3146
  width: 100%;
3147
3147
  height: 100%;
3148
3148
  }
3149
- `}const Wu=3e3,Fu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=L.useScopedStyles(),a=t||[],{speed:d,align:l,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:f,controlsColor:E,controlsHoverColor:$}=e,C=d>0&&(!n||!!i),[S,M]=c.useState(0),[I,W]=c.useState(null),[b,R]=c.useState(!1),V=c.useRef(null),g=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),T=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);c.useEffect(()=>{M(0),W(null),R(!1)},[a.length]);const _=a[S],H=I===null?null:a[I],K=Z=>{var U,B,N,me,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((U=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:U.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((N=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:N.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},se=K("text"),j=K("caption"),k=a.length>1&&a.some(Z=>{var le,U;return(((le=Z.text)==null?void 0:le.length)??0)>0||(((U=Z.caption)==null?void 0:U.length)??0)>0}),X=c.useRef(null),[q,O]=c.useState(0),[Y,te]=c.useState(0),oe=e.controls??{mode:"Off",icon:null},F=a.length>1,ae=c.useCallback((Z,le)=>!F||le===Z?Z:(V.current&&window.clearTimeout(V.current),W(Z),R(!0),V.current=window.setTimeout(()=>{W(null),R(!1),V.current=null},300),le),[F]),h=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z-1+a.length)%a.length))},[F,ae,a.length]),ie=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z+1)%a.length))},[F,ae,a.length]);c.useEffect(()=>{if(!C||!F)return;const Z=Math.max(300,Wu/d),le=window.setInterval(()=>{M(U=>ae(U,(U+1)%a.length))},Z);return()=>{window.clearInterval(le)}},[C,F,ae,a.length,d]),c.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const he=(Z,le)=>{var we,Oe,_e,Se;const U=le==null?void 0:le.textMinHeightPx,B=le==null?void 0:le.captionMinHeightPx,N=le==null?void 0:le.dataMeasureAttrs,me=o&&!(le!=null&&le.dataMeasureAttrs)&&!(le!=null&&le.hideControls);return r.jsxs(r.Fragment,{children:[Z.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"textMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:L.scalingValue(w??0,n??!1)}}),r.jsx("div",{...N&&{"data-testimonial-measure":"text"},style:{..._t(se,n),...U&&U>0?{minHeight:U}:{},textAlign:T,pointerEvents:"auto"},children:r.jsx(gi,{content:Z.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"imageMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:L.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:L.scalingValue(v??0,n??!1),height:L.scalingValue(m??0,n??!1)},children:((we=Z.image)==null?void 0:we.url)&&r.jsx("img",{src:(Oe=Z.image)==null?void 0:Oe.url,alt:((_e=Z.image)==null?void 0:_e.name)??"",className:`${s}-icon`,style:{objectFit:((Se=Z.image)==null?void 0:Se.objectFit)||"contain"}})})]}),Z.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"captionMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:L.scalingValue(x??0,n??!1)}}),r.jsx("div",{...N?{"data-testimonial-measure":"caption"}:{},style:{..._t(j,n),...B&&B>0?{minHeight:B}:{},textAlign:T,pointerEvents:"auto"},children:r.jsx(gi,{content:Z.caption})})]})]})},fe=c.useCallback(Z=>{O(Z.maxTextPx),te(Z.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!k){fe({maxTextPx:0,maxCaptionPx:0});return}const Z=X.current;if(!Z)return;const le=()=>{L.readTestimonialTextMeasure(Z,fe)};le();const U=new ResizeObserver(le);return U.observe(Z),()=>{U.disconnect()}},[k,fe,t]),!_)return r.jsx(r.Fragment,{});const We=k?{textMinHeightPx:q,captionMinHeightPx:Y}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Mu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:L.scalingValue(p??0,n??!1),alignItems:g},children:[k&&r.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Z,le)=>r.jsx("div",{style:{width:"100%"},children:he(Z,{dataMeasureAttrs:!0})},le))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[H&&b&&r.jsx("div",{className:Xe(`${s}-fade-item-prev`,`${s}-fade-out`),children:he(H,{...We,hideControls:!0})}),r.jsx("div",{className:Xe(`${s}-fade-item-current`,b?`${s}-fade-in`:void 0),children:he(_,We)})]})]}),oe.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:L.scalingValue(f??.02,n??!1),height:L.scalingValue(f??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:h,disabled:!F,"aria-label":"Previous testimonial",children:oe.icon&&r.jsx(sn,{url:oe.icon,fill:E,hoverFill:$,className:Xe(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Xe(`${s}-arrow`,`${s}-next-arrow`),style:{width:L.scalingValue(f??.02,n??!1),height:L.scalingValue(f??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:ie,disabled:!F,"aria-label":"Next testimonial",children:oe.icon&&r.jsx(sn,{url:oe.icon,fill:E,hoverFill:$,className:`${s}-arrow-img`})})})]})]})})},Nu=`import cn from 'classnames';
3149
+ `}const Wu=3e3,Fu=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:s}=E.useScopedStyles(),a=t||[],{speed:d,align:l,width:p,imageMarginTop:u,textMarginTop:w,captionMarginTop:x,imageWidth:v,imageHeight:m,controlsWidth:y,controlsColor:P,controlsHoverColor:$}=e,T=d>0&&(!n||!!i),[S,M]=c.useState(0),[I,W]=c.useState(null),[b,R]=c.useState(!1),V=c.useRef(null),g=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),L=c.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]);c.useEffect(()=>{M(0),W(null),R(!1)},[a.length]);const A=a[S],H=I===null?null:a[I],U=Z=>{var G,B,N,me,Ce;return{fontSettings:{fontFamily:(e==null?void 0:e[`${Z}FontFamily`])??"Arial",fontWeight:((G=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:G.fontWeight)??400,fontStyle:((B=e==null?void 0:e[`${Z}FontSettings`])==null?void 0:B.fontStyle)??"normal"},textAppearance:{textTransform:((N=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:N.textTransform)??"none",textDecoration:((me=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:me.textDecoration)??"none",fontVariant:((Ce=e==null?void 0:e[`${Z}TextAppearance`])==null?void 0:Ce.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${Z}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${Z}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${Z}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${Z}WordSpacing`])??0,color:(e==null?void 0:e[`${Z}Color`])??"#000000"}},se=U("text"),j=U("caption"),k=a.length>1&&a.some(Z=>{var ce,G;return(((ce=Z.text)==null?void 0:ce.length)??0)>0||(((G=Z.caption)==null?void 0:G.length)??0)>0}),X=c.useRef(null),[q,O]=c.useState(0),[Y,ie]=c.useState(0),re=e.controls??{mode:"Off",icon:null},F=a.length>1,ae=c.useCallback((Z,ce)=>!F||ce===Z?Z:(V.current&&window.clearTimeout(V.current),W(Z),R(!0),V.current=window.setTimeout(()=>{W(null),R(!1),V.current=null},300),ce),[F]),f=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z-1+a.length)%a.length))},[F,ae,a.length]),oe=c.useCallback(()=>{F&&M(Z=>ae(Z,(Z+1)%a.length))},[F,ae,a.length]);c.useEffect(()=>{if(!T||!F)return;const Z=Math.max(300,Wu/d),ce=window.setInterval(()=>{M(G=>ae(G,(G+1)%a.length))},Z);return()=>{window.clearInterval(ce)}},[T,F,ae,a.length,d]),c.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const he=(Z,ce)=>{var Ce,Be,_e,Te;const G=ce==null?void 0:ce.textMinHeightPx,B=ce==null?void 0:ce.captionMinHeightPx,N=ce==null?void 0:ce.dataMeasureAttrs,me=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return r.jsxs(r.Fragment,{children:[Z.text&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"textMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:E.scalingValue(w??0,n??!1)}}),r.jsx("div",{...N&&{"data-testimonial-measure":"text"},style:{...kt(se,n),...G&&G>0?{minHeight:G}:{},textAlign:L,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.text})})]}),r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"imageMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:E.scalingValue(u??0,n??!1)}}),r.jsx("div",{style:{width:E.scalingValue(v??0,n??!1),height:E.scalingValue(m??0,n??!1)},children:((Ce=Z.image)==null?void 0:Ce.url)&&r.jsx("img",{src:(Be=Z.image)==null?void 0:Be.url,alt:((_e=Z.image)==null?void 0:_e.name)??"",className:`${s}-icon`,style:{objectFit:((Te=Z.image)==null?void 0:Te.objectFit)||"contain"}})})]}),Z.caption&&r.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g,width:"100%"},children:[r.jsx("div",{"data-controls":me?"captionMarginTop":void 0,className:me?`${s}-control`:void 0,style:{height:E.scalingValue(x??0,n??!1)}}),r.jsx("div",{...N?{"data-testimonial-measure":"caption"}:{},style:{...kt(j,n),...B&&B>0?{minHeight:B}:{},textAlign:L,pointerEvents:"auto"},children:r.jsx(ui,{content:Z.caption})})]})]})},fe=c.useCallback(Z=>{O(Z.maxTextPx),ie(Z.maxCaptionPx)},[]);if(c.useLayoutEffect(()=>{if(!k){fe({maxTextPx:0,maxCaptionPx:0});return}const Z=X.current;if(!Z)return;const ce=()=>{E.readTestimonialTextMeasure(Z,fe)};ce();const G=new ResizeObserver(ce);return G.observe(Z),()=>{G.disconnect()}},[k,fe,t]),!A)return r.jsx(r.Fragment,{});const We=k?{textMinHeightPx:q,captionMinHeightPx:Y}:void 0;return r.jsx(r.Fragment,{children:r.jsxs("div",{className:`${s}-container`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Mu(s)}}),r.jsxs("div",{className:`${s}-wrapper`,style:{width:E.scalingValue(p??0,n??!1),alignItems:g},children:[k&&r.jsx("div",{ref:X,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:a.map((Z,ce)=>r.jsx("div",{style:{width:"100%"},children:he(Z,{dataMeasureAttrs:!0})},ce))}),r.jsxs("div",{className:`${s}-fade-stack`,children:[H&&b&&r.jsx("div",{className:Ge(`${s}-fade-item-prev`,`${s}-fade-out`),children:he(H,{...We,hideControls:!0})}),r.jsx("div",{className:Ge(`${s}-fade-item-current`,b?`${s}-fade-in`:void 0),children:he(A,We)})]})]}),re.mode==="On"&&r.jsxs("div",{className:`${s}-controls`,children:[r.jsx("div",{className:`${s}-arrow`,style:{width:E.scalingValue(y??.02,n??!1),height:E.scalingValue(y??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:f,disabled:!F,"aria-label":"Previous testimonial",children:re.icon&&r.jsx(tn,{url:re.icon,fill:P,hoverFill:$,className:Ge(`${s}-arrow-img`,`${s}-mirror`)})})}),r.jsx("div",{className:Ge(`${s}-arrow`,`${s}-next-arrow`),style:{width:E.scalingValue(y??.02,n??!1),height:E.scalingValue(y??.02,n??!1),"--arrow-hover-color":$},children:r.jsx("button",{type:"button",className:`${s}-arrow-inner`,onClick:oe,disabled:!F,"aria-label":"Next testimonial",children:re.icon&&r.jsx(tn,{url:re.icon,fill:P,hoverFill:$,className:`${s}-arrow-img`})})})]})]})})},Nu=`import cn from 'classnames';
3150
3150
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3151
3151
  import { CommonComponentProps } from '../props';
3152
3152
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -3642,7 +3642,7 @@ type TestimonialsSettings = {
3642
3642
  icon?: string | null;
3643
3643
  };
3644
3644
  };
3645
- `,Hu="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),ya={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ou={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ya.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ya.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Hu},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Bu={element:Fu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Ou,sourceCode:Nu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ju(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function va(e){return((e==null?void 0:e.trim().length)??0)>0}function Go(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Xo(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((o-t)/2,i)}}function zu(e){return`
3645
+ `,Hu="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 18" width="10" height="18"><path fill="#000000" fill-rule="evenodd" d="M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z" transform="translate(5, 9) rotate(-90) translate(-5, -9)"/></svg>'),ya={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ou={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:8},align:{type:"string",scope:"common",title:"Alignment",display:{type:"align-group",direction:"horizontal"},enum:["start","center","end"]},width:{type:"number",scope:"layout",title:"width",min:0,max:1e3,display:{type:"numeric-input"}},imageWidth:{type:"number",scope:"layout",title:"width",min:0,max:300,display:{type:"numeric-input"}},imageHeight:{type:"number",scope:"layout",title:"height",min:0,max:300,display:{type:"numeric-input"}},imageMarginTop:{type:"number",scope:"layout",title:"Image margin top",min:0,max:200,display:{type:"range-control"}},textMarginTop:{type:"number",scope:"layout",title:"Text margin top",min:0,max:200,display:{type:"range-control"}},controls:{type:"object",scope:"common",title:"Controls",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Icon",display:{type:"settings-image-input"}}}},controlsWidth:{type:"number",scope:"layout",title:"Controls width",min:0,max:100,display:{type:"numeric-input"}},controlsColor:{type:"string",scope:"common",title:"Fill Controls",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Hover Controls",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...ya.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Caption"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...ya.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Fill Text"}},defaults:{controls:{mode:"On",icon:Hu},controlsColor:"#000000",controlsHoverColor:"#EABC01",align:"center",textFontFamily:"Goudy Bookletter 1911",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",captionFontFamily:"Goudy Bookletter 1911",captionFontSettings:{fontWeight:400,fontStyle:"normal"},captionLetterSpacing:0,captionWordSpacing:0,captionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},captionColor:"#000000"},layoutDefaults:{m:{speed:1,width:.69,imageMarginTop:.08,captionMarginTop:.04,textMarginTop:0,textFontSize:.069,captionFontSize:.053,textLineHeight:.093,captionLineHeight:.069,imageWidth:.21,imageHeight:.21,controlsWidth:.06},d:{speed:1,width:.35,imageMarginTop:.02,textMarginTop:0,captionMarginTop:.01,textFontSize:.016,captionFontSize:.009,textLineHeight:.018,captionLineHeight:.009,imageWidth:.027,imageHeight:.027,controlsWidth:.014}},layout:["__componentName__","speed","width","imageMarginTop","textMarginTop","captionMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["width","align"]},{type:"row",items:["controls"]},{type:"row",items:["controlsWidth","speed"]},{type:"row",title:"Image Container",items:["imageWidth","imageHeight"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Text",items:["textFontFamily","textFontSettings",{type:"group",title:"",items:["text",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}]},{type:"group",title:"Caption",items:["captionFontFamily","captionFontSettings",{type:"group",title:"",items:["caption",{type:"row",items:["captionFontSize","captionLineHeight","captionLetterSpacing","captionWordSpacing"]},"captionTextAppearance"]}]}]}],paletteBookmark:{items:["textColor","captionColor","controlsColor","controlsHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input"}},text:{placeholder:"Add Text...",label:"Text",display:{type:"rich-text"}},caption:{placeholder:"Add Caption...",label:"Caption",display:{type:"rich-text"}}}},default:[{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/julia.png",name:""},text:[{type:"paragraph",children:[{text:"This website is a great tool for designers and developers. The ease of creating animations here is mesmerizing. Bravo to the creators of this product!"}]}],caption:[{type:"paragraph",children:[{text:"Julia Smith,"}]},{type:"paragraph",children:[{text:"Freelance Designer"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/mark.png",name:""},text:[{type:"paragraph",children:[{text:"This is super cool. The on onboarding terminal style animation brings me back to what made the Internet simple and fun."}]}],caption:[{type:"paragraph",children:[{text:"Mark Travis,"}]},{type:"paragraph",children:[{text:"Architect @ United Architects"}]}]},{image:{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/pia.png",name:""},text:[{type:"paragraph",children:[{text:"Great tool for someone who wants to quickly and easily build a site that has fancy scrolling animations. Totally addictive!"}]}],caption:[{type:"paragraph",children:[{text:"Pia,"}]},{type:"paragraph",children:[{text:"Media Buyer"}]}]}]}},Bu={element:Fu,id:"testimonial-single",name:"Clara",category:"testimonials",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Testimonials_Single.png"},defaultSize:{d:{width:700,height:300},t:{width:373,height:300},m:{width:334,height:300}},schema:Ou,sourceCode:Nu,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"settings.controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"styles.text.fontSettings"},{path:"styles.caption.fontSettings"}]}};function ju(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function va(e){return((e==null?void 0:e.trim().length)??0)>0}function Go(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Xo(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((o-t)/2,i)}}function zu(e){return`
3646
3646
  .${e}-wrapper {
3647
3647
  display: grid;
3648
3648
  align-items: start;
@@ -3845,7 +3845,7 @@ type TestimonialsSettings = {
3845
3845
  pointer-events: auto;
3846
3846
  z-index: 10;
3847
3847
  }
3848
- `}const yn=500,Vu=750,In="cubic-bezier(0.22, 1, 0.36, 1)";function Rn(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ba({media:e,className:t,style:n,onImageClick:i}){return Rn(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function Du({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:l,counterStyle:p}){const u=n==="cover",w=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[f,E]=c.useState(i?"opening":"open"),[$,C]=c.useState(!0),S=c.useRef(t),M=c.useCallback(()=>{const g=w.current,T=x.current;if(!g||!T)return;const _=g.getBoundingClientRect(),H=_.width,K=_.height,se=T.naturalWidth,j=T.naturalHeight;if(!H||!K||!se||!j)return;if(n==="cover"){m({width:H,height:K,left:_.left,top:_.top});return}const k=se/j,X=H/K;if(k>X){const q=H/k;m({width:H,height:q,left:_.left,top:_.top+(K-q)/2})}else{const q=K*k;m({width:q,height:K,left:_.left+(H-q)/2,top:_.top})}},[n]);c.useEffect(()=>{M();const g=w.current;if(!g)return;const T=new ResizeObserver(()=>M());return T.observe(g),()=>T.disconnect()},[M,t]),c.useEffect(()=>{f==="opening"&&v&&E("open")},[f,v]),c.useEffect(()=>{if(f!=="closing")return;const g=setTimeout(()=>s(),yn);return()=>clearTimeout(g)},[f,s]),c.useEffect(()=>{S.current!==t&&C(!1),S.current=t},[t]),c.useEffect(()=>{const g=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),f!=="closing"&&E("closing"))};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[f]);const I=()=>{f!=="closing"&&E("closing")},W=f==="open",b=f==="closing",R=b&&o&&!!i,V=f==="opening"?i??v:R?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:I,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:W?1:0,transition:`opacity ${yn}ms ${In}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${yn}ms ${In}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${yn}ms ${In}`},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]})}),V&&r.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!R?0:1,transition:b&&!R?`opacity ${yn}ms ${In}`:R||$?`top ${yn}ms ${In}, left ${yn}ms ${In}, width ${yn}ms ${In}, height ${yn}ms ${In}`:"none",pointerEvents:"none",zIndex:9998}}),W&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),a()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),d()}})]})]})}function qu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:l}=L.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:f,lightboxImageDisplay:E,slider:$,sliderTiming:C,direction:S,transition:M,titleMarginTop:I,subtitleMarginTop:W,titleColor:b,subtitleColor:R,lightboxCounterColor:V,titleFontFamily:g,titleFontSettings:T,titleFontSize:_,titleLineHeight:H,titleLetterSpacing:K,titleWordSpacing:se,titleTextAppearance:j,subtitleFontFamily:k,subtitleFontSettings:X,subtitleFontSize:q,subtitleLineHeight:O,subtitleLetterSpacing:Y,subtitleWordSpacing:te,subtitleTextAppearance:oe,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ae,lightboxCounterFontSize:h,lightboxCounterLineHeight:ie,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:fe,lightboxCounterTextAppearance:We,showText:Z="always",alignEntries:le="off"}=e,U={fontSettings:{fontFamily:g,fontWeight:(T==null?void 0:T.fontWeight)??400,fontStyle:(T==null?void 0:T.fontStyle)??"normal"},fontSize:_??.01,lineHeight:H,letterSpacing:K??0,wordSpacing:se??0,textAppearance:j,color:b},N={...Zt(_t(U,n))},me={fontSettings:{fontFamily:k,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:q??.01,lineHeight:O,letterSpacing:Y??0,wordSpacing:te??0,textAppearance:oe,color:R},Oe={...Zt(_t(me,n))},_e={fontSettings:{fontFamily:F,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:h??.01,lineHeight:ie,letterSpacing:he??0,wordSpacing:fe??0,textAppearance:We,color:V},Fe={...Zt(_t(_e,n)),...Xo(h,ie,l,n)},z=Go(_,H,`${l}-item-title`,`${l}-text-tight-leading`),de=Go(q,O,`${l}-item-subtitle`,`${l}-text-tight-leading`),A=Xo(_,H,l,n),J=Xo(q,O,l,n),D=Go(h,ie,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ee=L.buildColorVars(l,{titleColor:b,subtitleColor:R,lightboxCounterColor:V},Uu,Gu),De=`${a&&a!=="default"?`${l}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${l}-show-text-hover`:""}`.trim(),Pe=v===0?1/0:v,Re=(t??[]).slice(0,Pe),qe=u.entryWidth??.2,ce=(f==null?void 0:f.display)==="cover",ke=(f==null?void 0:f.ratioValue)??"1:1",ze=(f==null?void 0:f.reversed)??!1,[Te,rt]=ke.split(":").map(Number),Ue=`${ze?rt:Te} / ${ze?Te:rt}`,at=L.scalingValue(qe??0,n),Rt=!ce&&$!=="off",It={width:at,...ce?{aspectRatio:Ue,height:"auto",overflow:"hidden"}:{height:"auto"}},bt=`${l}-item-image-wrapper${Rt?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),ve=p==="c",Be=ve&&le==="on",Ze=`calc(${L.scalingValue(qe??0,n)} * (${w} / 100))`,Ke=L.scalingValue(qe*w/100,n),Wt=ce?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Ht,Ft]=c.useState("ltr"),[zt,cn]=c.useState(0),He=c.useRef(null);c.useEffect(()=>{const Ne=He.current;if(!Ne)return;const ft=new ResizeObserver(At=>{cn(Math.round(At[0].contentRect.width))});return ft.observe(Ne),()=>ft.disconnect()},[]);const Lt=(()=>{const Ne={...ee},ft=He.current?getComputedStyle(He.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(Ne["--cntrl-article-width"]=ft),Ne})(),[st,Qe]=c.useState(!1),[gt,Vt]=c.useState([]),[Ut,tn]=c.useState(0),[mn,Ge]=c.useState(null),nn=(Ne,ft,At)=>{if(n&&!i||m==="off")return;const ne=Ne.currentTarget.getBoundingClientRect();Ge({top:ne.top,left:ne.left,width:ne.width,height:ne.height}),Vt(ft),tn(At),Qe(!0)};c.useEffect(()=>{if(!st||m!=="on"||typeof document>"u")return;const Ne=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Ne}},[st,m]),c.useEffect(()=>{!n||i||(Qe(!1),Ge(null))},[n,i]);const Ot=c.useMemo(()=>zu(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Ot}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:He,className:`${l}-wrapper ${l}-type-${p}${Be?` ${l}-align-entries`:""} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:Be?0:L.scalingValue(x??0,n),columnGap:L.scalingValue(u.horizontalGap??0,n),width:L.scalingValue(u.wrapperWidth??0,n),...Be?{[`--${l}-align-entries-row-gap`]:L.scalingValue(x??0,n)}:{}},children:Re.map((Ne,ft)=>{var yt,lt;const At=va(Ne.title),ne=va(Ne.subtitle),xe=(((yt=Ne.link)==null?void 0:yt.length)??0)>0&&m==="off"?Ne.link:void 0,Ae=Math.floor(ft/u.columnsCount)===Math.ceil(Re.length/u.columnsCount)-1,Ve=ve?r.jsxs("div",{className:`${l}-item-text-block`,children:[At&&r.jsx("p",{className:z,style:{width:Ze,...N,...A},children:Ne.title}),At&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(I??0,n),width:Ke}}),ne&&r.jsx("p",{className:de,style:{width:Ze,...Oe,...J},children:Ne.subtitle}),ne&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:Ke}})]}):null,Ye=ve?r.jsxs("div",{className:`${l}-item-title-row`,children:[At&&r.jsx("p",{className:z,style:{width:Ze,...N,...A},children:Ne.title}),At&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(I??0,n),width:Ke}})]}):null,et=ve?r.jsxs("div",{className:`${l}-item-subtitle-row`,children:[ne&&r.jsx("p",{className:de,style:{width:Ze,...Oe,...J},children:Ne.subtitle}),ne&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:L.scalingValue(W??0,n),width:Ke}})]}):null,$e=xe?r.jsxs("a",{href:xe,target:"_blank",className:`${l}-item-text-link`,children:[Ye,et]}):r.jsxs(r.Fragment,{children:[Ye,et]}),Et=r.jsx("div",{className:bt,style:It,children:(((lt=Ne.image)==null?void 0:lt.length)??0)===0?null:$==="off"?(()=>{const Me=Ne.image[0],ct=Ne.image.filter($t=>!Rn($t)).map($t=>$t.url);return r.jsx(ba,{media:Me,className:`${l}-item-${Rn(Me)?"video":"image"}`.trim(),style:Wt,onImageClick:Rn(Me)?void 0:$t=>nn($t,ct,0)})})():r.jsxs(r.Fragment,{children:[Rt&&r.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ne.image.map(Me=>Rn(Me)?r.jsx("video",{src:Me.url,muted:!0,playsInline:!0},`sizer-${Me.url}`):r.jsx("img",{src:Me.url,alt:""},`sizer-${Me.url}`))}),r.jsx(Nr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:C*1e3,width:"100%",height:"100%",speed:Vu,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Ht},onMoved:Me=>{if(S!=="random"||M==="fade")return;const xt=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Ft(xt),setTimeout(()=>{Me.refresh()},0)},children:Ne.image.map((Me,xt)=>{const ct=Ne.image.filter(St=>!Rn(St)),$t=ct.map(St=>St.url),kt=ct.findIndex(St=>St.url===Me.url);return r.jsx(Hr,{children:r.jsx(ba,{media:Me,className:`${l}-item-${Rn(Me)?"video":"image"}`.trim(),style:Wt,onImageClick:Rn(Me)?void 0:St=>nn(St,$t,kt)})},xt)})},`${M}-${qe}-${S}-${C}-${zt}-${d}`)]})}),ht=ve?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&At?"titleMarginTop":void 0,className:o&&At?`${l}-control`:void 0,style:{height:At?L.scalingValue(I??0,n):0,width:Ke}}),r.jsx("p",{className:z,style:{width:Ze,...N,...A},children:Ne.title}),r.jsx("div",{"data-controls":o&&ne?"subtitleMarginTop":void 0,className:o&&ne?`${l}-control`:void 0,style:{height:ne?L.scalingValue(W??0,n):0,width:Ke}}),r.jsx("p",{className:de,style:{width:Ze,...Oe,...J},children:Ne.subtitle})]});return r.jsx("div",{className:`${l}-item`.trim(),children:r.jsx("div",{className:`${o?`${l}-item-inner`:`${l}-item-inner-hidden`}${Be&&Ae?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${L.scalingValue(qe??0,n)} * (${w} / 100))`:L.scalingValue(qe??0,n)},children:Be?r.jsxs(r.Fragment,{children:[$e,r.jsx("a",{href:xe,target:"_blank",className:`${l}-item-image-link`,children:Et})]}):r.jsxs("a",{href:xe,target:"_blank",className:`${l}-item-image-link`,children:[Ve,Et,ht]})})},ft)})})}),(!n||i)&&st&&typeof document<"u"&&m==="on"&&Ni.createPortal(r.jsx("div",{style:Lt,"data-selection":"none",children:r.jsx(Du,{images:gt,index:Ut,imageDisplay:qu(E),originRect:mn,reverseClose:$==="off",onClose:()=>Qe(!1),onPrev:()=>tn(Ne=>(Ne-1+gt.length)%gt.length),onNext:()=>tn(Ne=>(Ne+1)%gt.length),counterClassName:D,counterStyle:Fe})}),document.body)]})}const Uu={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Xu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3848
+ `}const pn=500,Vu=750,En="cubic-bezier(0.22, 1, 0.36, 1)";function _n(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function ba({media:e,className:t,style:n,onImageClick:i}){return _n(e)?r.jsx("video",{src:e.url,className:t,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0}):r.jsx("img",{src:e.url,alt:e.name,className:t,style:n,onClick:i})}function Du({images:e,index:t,imageDisplay:n,originRect:i,reverseClose:o,onClose:s,onPrev:a,onNext:d,counterClassName:l,counterStyle:p}){const u=n==="cover",w=c.useRef(null),x=c.useRef(null),[v,m]=c.useState(null),[y,P]=c.useState(i?"opening":"open"),[$,T]=c.useState(!0),S=c.useRef(t),M=c.useCallback(()=>{const g=w.current,L=x.current;if(!g||!L)return;const A=g.getBoundingClientRect(),H=A.width,U=A.height,se=L.naturalWidth,j=L.naturalHeight;if(!H||!U||!se||!j)return;if(n==="cover"){m({width:H,height:U,left:A.left,top:A.top});return}const k=se/j,X=H/U;if(k>X){const q=H/k;m({width:H,height:q,left:A.left,top:A.top+(U-q)/2})}else{const q=U*k;m({width:q,height:U,left:A.left+(H-q)/2,top:A.top})}},[n]);c.useEffect(()=>{M();const g=w.current;if(!g)return;const L=new ResizeObserver(()=>M());return L.observe(g),()=>L.disconnect()},[M,t]),c.useEffect(()=>{y==="opening"&&v&&P("open")},[y,v]),c.useEffect(()=>{if(y!=="closing")return;const g=setTimeout(()=>s(),pn);return()=>clearTimeout(g)},[y,s]),c.useEffect(()=>{S.current!==t&&T(!1),S.current=t},[t]),c.useEffect(()=>{const g=L=>{L.key==="Escape"&&(L.preventDefault(),L.stopPropagation(),y!=="closing"&&P("closing"))};return window.addEventListener("keydown",g,!0),()=>window.removeEventListener("keydown",g,!0)},[y]);const I=()=>{y!=="closing"&&P("closing")},W=y==="open",b=y==="closing",R=b&&o&&!!i,V=y==="opening"?i??v:R?i:v;return r.jsxs("div",{style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9997},onClick:I,children:[r.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`,pointerEvents:"none"}}),r.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:u?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:w,style:{position:"absolute",inset:0}}),r.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`,pointerEvents:"none",zIndex:9999},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{height:"10%"}}),r.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:r.jsx("div",{ref:w,style:{width:"100%",height:"100%"}})}),r.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:W?1:0,transition:`opacity ${pn}ms ${En}`},children:e.length>1&&r.jsxs("p",{className:l,style:p,children:[t+1," / ",e.length]})})]})}),V&&r.jsx("img",{ref:x,src:e[t],onLoad:M,style:{position:"fixed",top:V.top,left:V.left,width:V.width,height:V.height,objectFit:n==="cover"?"cover":"contain",opacity:b&&!R?0:1,transition:b&&!R?`opacity ${pn}ms ${En}`:R||$?`top ${pn}ms ${En}, left ${pn}ms ${En}, width ${pn}ms ${En}, height ${pn}ms ${En}`:"none",pointerEvents:"none",zIndex:9998}}),W&&v&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left,width:v.width/2,height:v.height,cursor:"w-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),a()}}),r.jsx("div",{style:{position:"fixed",top:v.top,left:v.left+v.width/2,width:v.width/2,height:v.height,cursor:"e-resize",zIndex:9999},onClick:g=>{g.stopPropagation(),d()}})]})]})}function qu(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Ku({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:s,activeEvent:a,layoutId:d}){const{prefix:l}=E.useScopedStyles(),{type:p="a",gridLayout:u,textBoxWidth:w=100,verticalGap:x,entriesCount:v,lightbox:m,imageDisplay:y,lightboxImageDisplay:P,slider:$,sliderTiming:T,direction:S,transition:M,titleMarginTop:I,subtitleMarginTop:W,titleColor:b,subtitleColor:R,lightboxCounterColor:V,titleFontFamily:g,titleFontSettings:L,titleFontSize:A,titleLineHeight:H,titleLetterSpacing:U,titleWordSpacing:se,titleTextAppearance:j,subtitleFontFamily:k,subtitleFontSettings:X,subtitleFontSize:q,subtitleLineHeight:O,subtitleLetterSpacing:Y,subtitleWordSpacing:ie,subtitleTextAppearance:re,lightboxCounterFontFamily:F,lightboxCounterFontSettings:ae,lightboxCounterFontSize:f,lightboxCounterLineHeight:oe,lightboxCounterLetterSpacing:he,lightboxCounterWordSpacing:fe,lightboxCounterTextAppearance:We,showText:Z="always",alignEntries:ce="off"}=e,G={fontSettings:{fontFamily:g,fontWeight:(L==null?void 0:L.fontWeight)??400,fontStyle:(L==null?void 0:L.fontStyle)??"normal"},fontSize:A??.01,lineHeight:H,letterSpacing:U??0,wordSpacing:se??0,textAppearance:j,color:b},N={...Xt(kt(G,n))},me={fontSettings:{fontFamily:k,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:q??.01,lineHeight:O,letterSpacing:Y??0,wordSpacing:ie??0,textAppearance:re,color:R},Be={...Xt(kt(me,n))},_e={fontSettings:{fontFamily:F,fontWeight:(ae==null?void 0:ae.fontWeight)??400,fontStyle:(ae==null?void 0:ae.fontStyle)??"normal"},fontSize:f??.01,lineHeight:oe,letterSpacing:he??0,wordSpacing:fe??0,textAppearance:We,color:V},Ne={...Xt(kt(_e,n)),...Xo(f,oe,l,n)},z=Go(A,H,`${l}-item-title`,`${l}-text-tight-leading`),ue=Go(q,O,`${l}-item-subtitle`,`${l}-text-tight-leading`),_=Xo(A,H,l,n),J=Xo(q,O,l,n),D=Go(f,oe,`${l}-lightbox-counter`,`${l}-text-tight-leading`),ee=E.buildColorVars(l,{titleColor:b,subtitleColor:R,lightboxCounterColor:V},Uu,Gu),De=`${a&&a!=="default"?`${l}-state-${a}`:""}${Z==="on hover"&&(!n||i)?` ${l}-show-text-hover`:""}`.trim(),Ie=v===0?1/0:v,Ae=(t??[]).slice(0,Ie),Ke=u.entryWidth??.2,de=(y==null?void 0:y.display)==="cover",ke=(y==null?void 0:y.ratioValue)??"1:1",Ve=(y==null?void 0:y.reversed)??!1,[Le,at]=ke.split(":").map(Number),qe=`${Ve?at:Le} / ${Ve?Le:at}`,pt=E.scalingValue(Ke??0,n),Et=!de&&$!=="off",_t={width:pt,...de?{aspectRatio:qe,height:"auto",overflow:"hidden"}:{height:"auto"}},At=`${l}-item-image-wrapper${Et?` ${l}-item-image-wrapper-fit-slider`:""}`.trim(),ve=p==="c",He=ve&&ce==="on",Ue=`calc(${E.scalingValue(Ke??0,n)} * (${w} / 100))`,nt=E.scalingValue(Ke*w/100,n),vt=de?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},[Ht,Mt]=c.useState("ltr"),[qt,on]=c.useState(0),Oe=c.useRef(null);c.useEffect(()=>{const Me=Oe.current;if(!Me)return;const ct=new ResizeObserver(Rt=>{on(Math.round(Rt[0].contentRect.width))});return ct.observe(Me),()=>ct.disconnect()},[]);const Tt=(()=>{const Me={...ee},ct=Oe.current?getComputedStyle(Oe.current).getPropertyValue("--cntrl-article-width").trim():"";return ct&&(Me["--cntrl-article-width"]=ct),Me})(),[bt,it]=c.useState(!1),[ft,Ot]=c.useState([]),[un,Ft]=c.useState(0),[wn,Qe]=c.useState(null),Bt=(Me,ct,Rt)=>{if(n&&!i||m==="off")return;const te=Me.currentTarget.getBoundingClientRect();Qe({top:te.top,left:te.left,width:te.width,height:te.height}),Ot(ct),Ft(Rt),it(!0)};c.useEffect(()=>{if(!bt||m!=="on"||typeof document>"u")return;const Me=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=Me}},[bt,m]),c.useEffect(()=>{!n||i||(it(!1),Qe(null))},[n,i]);const rn=c.useMemo(()=>zu(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),r.jsx("div",{style:ee,children:r.jsx("div",{ref:Oe,className:`${l}-wrapper ${l}-type-${p}${He?` ${l}-align-entries`:""} ${De}`.trim(),style:{gridTemplateColumns:`repeat(${u.columnsCount}, minmax(0, 1fr))`,rowGap:He?0:E.scalingValue(x??0,n),columnGap:E.scalingValue(u.horizontalGap??0,n),width:E.scalingValue(u.wrapperWidth??0,n),...He?{[`--${l}-align-entries-row-gap`]:E.scalingValue(x??0,n)}:{}},children:Ae.map((Me,ct)=>{var St,$t;const Rt=va(Me.title),te=va(Me.subtitle),Se=(((St=Me.link)==null?void 0:St.length)??0)>0&&m==="off"?Me.link:void 0,Re=Math.floor(ct/u.columnsCount)===Math.ceil(Ae.length/u.columnsCount)-1,je=ve?r.jsxs("div",{className:`${l}-item-text-block`,children:[Rt&&r.jsx("p",{className:z,style:{width:Ue,...N,..._},children:Me.title}),Rt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(I??0,n),width:nt}}),te&&r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(W??0,n),width:nt}})]}):null,Xe=ve?r.jsxs("div",{className:`${l}-item-title-row`,children:[Rt&&r.jsx("p",{className:z,style:{width:Ue,...N,..._},children:Me.title}),Rt&&r.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(I??0,n),width:nt}})]}):null,et=ve?r.jsxs("div",{className:`${l}-item-subtitle-row`,children:[te&&r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle}),te&&r.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${l}-control`:void 0,style:{height:E.scalingValue(W??0,n),width:nt}})]}):null,Ee=Se?r.jsxs("a",{href:Se,target:"_blank",className:`${l}-item-text-link`,children:[Xe,et]}):r.jsxs(r.Fragment,{children:[Xe,et]}),Lt=r.jsx("div",{className:At,style:_t,children:((($t=Me.image)==null?void 0:$t.length)??0)===0?null:$==="off"?(()=>{const Fe=Me.image[0],dt=Me.image.filter(Ct=>!_n(Ct)).map(Ct=>Ct.url);return r.jsx(ba,{media:Fe,className:`${l}-item-${_n(Fe)?"video":"image"}`.trim(),style:vt,onImageClick:_n(Fe)?void 0:Ct=>Bt(Ct,dt,0)})})():r.jsxs(r.Fragment,{children:[Et&&r.jsx("div",{className:`${l}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Me.image.map(Fe=>_n(Fe)?r.jsx("video",{src:Fe.url,muted:!0,playsInline:!0},`sizer-${Fe.url}`):r.jsx("img",{src:Fe.url,alt:""},`sizer-${Fe.url}`))}),r.jsx(Nr,{className:`${l}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:T*1e3,width:"100%",height:"100%",speed:Vu,type:M==="fade"?"fade":"loop",rewind:M==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:M==="fade"?"ltr":S!=="random"?S==="horizontal"?"ltr":"ttb":Ht},onMoved:Fe=>{if(S!=="random"||M==="fade")return;const ot=Math.random()>.5?Math.random()>.5?"rtl":"ltr":"ttb";Mt(ot),setTimeout(()=>{Fe.refresh()},0)},children:Me.image.map((Fe,ot)=>{const dt=Me.image.filter(st=>!_n(st)),Ct=dt.map(st=>st.url),an=dt.findIndex(st=>st.url===Fe.url);return r.jsx(Hr,{children:r.jsx(ba,{media:Fe,className:`${l}-item-${_n(Fe)?"video":"image"}`.trim(),style:vt,onImageClick:_n(Fe)?void 0:st=>Bt(st,Ct,an)})},ot)})},`${M}-${Ke}-${S}-${T}-${qt}-${d}`)]})}),yt=ve?null:r.jsxs(r.Fragment,{children:[r.jsx("div",{"data-controls":o&&Rt?"titleMarginTop":void 0,className:o&&Rt?`${l}-control`:void 0,style:{height:Rt?E.scalingValue(I??0,n):0,width:nt}}),r.jsx("p",{className:z,style:{width:Ue,...N,..._},children:Me.title}),r.jsx("div",{"data-controls":o&&te?"subtitleMarginTop":void 0,className:o&&te?`${l}-control`:void 0,style:{height:te?E.scalingValue(W??0,n):0,width:nt}}),r.jsx("p",{className:ue,style:{width:Ue,...Be,...J},children:Me.subtitle})]});return r.jsx("div",{className:`${l}-item`.trim(),children:r.jsx("div",{className:`${o?`${l}-item-inner`:`${l}-item-inner-hidden`}${He&&Re?` ${l}-item-inner-last-row`:""}`.trim(),style:{width:(w??0)>100?`calc(${E.scalingValue(Ke??0,n)} * (${w} / 100))`:E.scalingValue(Ke??0,n)},children:He?r.jsxs(r.Fragment,{children:[Ee,r.jsx("a",{href:Se,target:"_blank",className:`${l}-item-image-link`,children:Lt})]}):r.jsxs("a",{href:Se,target:"_blank",className:`${l}-item-image-link`,children:[je,Lt,yt]})})},ct)})})}),(!n||i)&&bt&&typeof document<"u"&&m==="on"&&ki.createPortal(r.jsx("div",{style:Tt,"data-selection":"none",children:r.jsx(Du,{images:ft,index:un,imageDisplay:qu(P),originRect:wn,reverseClose:$==="off",onClose:()=>it(!1),onPrev:()=>Ft(Me=>(Me-1+ft.length)%ft.length),onNext:()=>Ft(Me=>(Me+1)%ft.length),counterClassName:D,counterStyle:Ne})}),document.body)]})}const Uu={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},Gu=["hover","focus","filled","success","error"],Xu=`import { Splide, SplideSlide } from '@splidejs/react-splide';
3849
3849
  import '@splidejs/react-splide/css/core';
3850
3850
  import { CommonComponentProps } from '../props';
3851
3851
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
@@ -5014,11 +5014,11 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5014
5014
  };
5015
5015
 
5016
5016
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5017
- `,Yo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yu=["titleColor","subtitleColor","lightboxCounterColor"],Ju={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Yu],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zu={element:Ku,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ju,sourceCode:Xu},xa=12;function Qu(e,t="50%"){const n={position:"absolute",width:xa,height:xa,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Mt({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Qu(n,i)})})}function ep(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function tp({media:e,className:t,style:n}){const i=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function mo(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function np(e){return String(e??"").trim().length>0}function wa(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Sa(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function $a(e,t,n,i,o,s,a){const d=L.scalingValue(s,a),l=L.scalingValue(0,a),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:l,borderBottomWidth:!u||i?d:l}}function ip(e,t,n){const i=L.scalingValue(t,n),o=L.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ca=10;function op(e){return`
5017
+ `,Yo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Yu=["titleColor","subtitleColor","lightboxCounterColor"],Ju={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:[{title:"Flying Over the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(1).webp",objectFit:"cover"}],link:""},{title:"Doors of Matera",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(2).webp",objectFit:"cover"}],link:""},{title:"Cattedrale di Santa Maria",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(3).webp",objectFit:"cover"}],link:""},{title:"City Through the Cracks",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(4).webp",objectFit:"cover"}],link:""},{title:"Private Stone Gardens",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(5).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(6).webp",objectFit:"cover"},{url:"https://cdn.cntrl.site/component-assets/grid(7).webp",objectFit:"cover"}],link:""},{title:"Leaving the Old Town",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(8).webp",objectFit:"cover"}],link:""},{title:"Under the Sun",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(9).webp",objectFit:"cover"}],link:""},{title:"Citygates View",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(10).webp",objectFit:"cover"}],link:""},{title:"Around the City",subtitle:"Leica M6 / SUMMICRON-M 50mm F2/ PORTRA 400",image:[{url:"https://cdn.cntrl.site/component-assets/grid(11).webp",objectFit:"cover"}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:4},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gap",min:0}}}},textBoxWidth:{type:"number",scope:"layout",title:"Text Width (%)",display:{type:"percentage-input"},min:0},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},showText:{type:"boolean",scope:"common",title:"Show text",display:{type:"toggle-cycle",enum:["always","on hover"]}},alignEntries:{type:"boolean",scope:"layout",title:"Align entries",display:{type:"toggle-cycle",enum:["on","off"]}},entriesCount:{type:"number",scope:"layout",title:"Entries #",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageDisplay:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},slider:{type:"boolean",scope:"common",title:"Slider",display:{type:"toggle-cycle",enum:["on","off"]}},sliderTiming:{type:"number",scope:"common",title:"Timing (Sec)",display:{type:"common-numeric-input"},min:1,max:10},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical","random"],enabled:!0}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","slide"]}},titleMarginTop:{type:"number",scope:"layout",title:"Title margin top",min:0,max:100,display:{type:"range-control"}},subtitleMarginTop:{type:"number",scope:"layout",title:"Subtitle margin top",min:0,max:100,display:{type:"range-control"}},titleColor:{type:"string",scope:"common",title:"Title Entry",display:{type:"palette-color-picker"}},subtitleColor:{type:"string",scope:"common",title:"Subtitle Entry",display:{type:"palette-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},subtitleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},subtitleFontSettings:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},subtitleFontSize:{type:"number",scope:"layout",title:"Subtitle Font Size",display:{type:"font-size"}},subtitleLineHeight:{type:"number",scope:"layout",title:"Subtitle Line Height",display:{type:"line-height-input"}},subtitleLetterSpacing:{type:"number",scope:"layout",title:"Subtitle Letter Spacing",display:{type:"letter-spacing-input"}},subtitleWordSpacing:{type:"number",scope:"layout",title:"Subtitle Word Spacing",display:{type:"word-spacing-input"}},subtitleTextAppearance:{type:"object",scope:"layout",title:"Subtitle Text Appearance",display:{type:"text-appearance"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Yo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},lightboxCounterFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},lightboxCounterLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},lightboxCounterLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},lightboxCounterWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},lightboxCounterTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}}},defaults:{lightbox:"on",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"on",titleColor:"#000000",subtitleColor:"#000000",lightboxCounterColor:"#DEDDDD",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},subtitleFontFamily:"Goudy Bookletter 1911",subtitleFontSettings:{fontWeight:400,fontStyle:"normal"},subtitleLetterSpacing:0,subtitleWordSpacing:0,subtitleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{type:"a",gridLayout:{entryWidth:.8,horizontalGap:.0533,wrapperWidth:1,columnsCount:1,lockedParam:null},textBoxWidth:100,verticalGap:.266,entriesCount:0,titleMarginTop:.02,subtitleMarginTop:.02,titleStroke:.003,titleCorners:.192,subtitlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titlePadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},titleFontSize:.1066,titleLineHeight:.0853,subtitleFontSize:.056,subtitleLineHeight:.0506,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},d:{type:"a",gridLayout:{entryWidth:.0833,horizontalGap:0,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.027,titleLineHeight:.0222,titleLetterSpacing:-.00118,subtitleFontSize:.01,subtitleLineHeight:.01,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01}},displayRules:[{if:{name:"transition",value:"fade"},then:{name:"properties.direction.display.enabled",value:!1}},{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignEntries.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.alignEntries.display.visible",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","entriesCount","lightbox","imageDisplay","lightboxImageDisplay","slider","sliderTiming","direction","transition","transition","titleMarginTop","subtitleMarginTop"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"Grid",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["textBoxWidth","entriesCount"]},{type:"row",title:"",items:["verticalGap","showText"]},{type:"row",title:"",items:["alignEntries"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","sliderTiming"]},{type:"group",title:"",items:["direction","transition"]}]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Subtitle",items:["subtitleFontFamily","subtitleFontSettings",{type:"row",items:["subtitleFontSize","subtitleLineHeight","subtitleLetterSpacing","subtitleWordSpacing"]},"subtitleTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:[...Yu],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zu={element:Ku,id:"grid",name:"Neptune",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Neptune_Grid.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Ju,sourceCode:Xu},xa=12;function Qu(e,t="50%"){const n={position:"absolute",width:xa,height:xa,pointerEvents:"auto"};return e==="left-y"?{...n,left:20,top:"50%",transform:"translateY(-50%)"}:e==="center-x"?{...n,left:"50%",top:t,transform:"translate(-50%, -50%)"}:{...n,left:"50%",top:"50%",transform:"translate(-50%, -50%)"}}function Wt({className:e,areaStyle:t,hitPlacement:n,centerXHitTop:i,...o}){return r.jsx("div",{className:e,style:{...t,pointerEvents:"none"},"data-controls-center-only-drag":"",...o,children:r.jsx("div",{style:Qu(n,i)})})}function ep(e){if(e.type==="video")return!0;if(e.type==="image")return!1;const t=e.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url)}function tp({media:e,className:t,style:n}){const i=c.useRef(null);return c.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const s=o.play();s&&s.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?r.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):r.jsx("img",{className:t,src:e.url,alt:"",style:n})}function co(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function np(e){return String(e??"").trim().length>0}function wa(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY-i.top>i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function Sa(e,t){const n=e.currentTarget,i=n.getBoundingClientRect(),o=e.clientY<i.top+i.height/2;n.classList.toggle(`${t}-reveal-from-bottom`,o)}function $a(e,t,n,i,o,s,a){const d=E.scalingValue(s,a),l=E.scalingValue(0,a),p=e===0,u=e===t-1&&!o;return{borderTopWidth:p&&n?d:l,borderBottomWidth:!u||i?d:l}}function ip(e,t,n){const i=E.scalingValue(t,n),o=E.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ca=10;function op(e){return`
5018
5018
  .${e}-wrapper {
5019
5019
  display: grid;
5020
5020
  align-items: start;
5021
- min-height: ${mo(48)};
5021
+ min-height: ${co(48)};
5022
5022
  position: relative;
5023
5023
  overflow: visible;
5024
5024
  box-sizing: border-box;
@@ -5140,7 +5140,7 @@ a.${e}-list-item {
5140
5140
  flex-shrink: 0;
5141
5141
  overflow: visible;
5142
5142
  box-sizing: border-box;
5143
- min-width: ${mo(50)};
5143
+ min-width: ${co(50)};
5144
5144
  position: relative;
5145
5145
  display: flex;
5146
5146
  align-items: flex-start;
@@ -5148,7 +5148,7 @@ a.${e}-list-item {
5148
5148
 
5149
5149
  .${e}-list-col-last {
5150
5150
  flex: 1 1 auto;
5151
- min-width: ${mo(50)};
5151
+ min-width: ${co(50)};
5152
5152
  }
5153
5153
 
5154
5154
  .${e}-list-col-title {
@@ -5445,7 +5445,7 @@ a.${e}-list-item {
5445
5445
  overflow-wrap: anywhere;
5446
5446
  word-break: break-word;
5447
5447
  }
5448
- `}const Fn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Or=["AColumn","BColumn","CColumn","DColumn","EColumn"],Sn="cutLabel",Br=[...Or,Sn],No=["A","B","C","D","E"];function ks(e){return`${e}ColumnVerticalAlign`}const gr=["Top","Center","Bottom"];function jr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return No.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function rp(e){const t=jr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ap(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return No.includes(n)?n:null}function Ms(e,t,n){const i=ap(e);return i?i===t?!1:rp(n[ks(i)]):!0}function Mi(e){const t=jr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return No.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function sp(e,t,n){if(Ws(e,t,n))return Mi(e);const i=Mi(e);return i.kind==="baseline"?{kind:"top"}:i}function lp(e){const t=Mi(e);return t.kind==="baseline"?{kind:"top"}:t}function Ws(e,t,n){return Ms(e,n,t)?Mi(e).kind==="baseline":!1}function cp(e){const t={};let n=!1;for(const i of No){const o=ks(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}Ms(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function dp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function up(e){const t=Mi(e).kind;return t==="baseline"?"center":t}function pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ta(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function mp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function Jo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=mp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),l=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-l)/2:e.kind==="bottom"&&(p=d.height-l),d.top-t+p+a}function gp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function hp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const fp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const yp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function vp(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function bp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Br.map(e=>[yp[e],vp(e)]))}}function $o(e,t){const n=i=>{const o=Je(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===Sn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function La(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return Zt(_t(n,t))}function Ea(e,t,n,i){const o=$o(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Pa(e,t,n,i){const o=$o(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:L.scalingValue((s-a)/2,i)}}const Qt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],hi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],fi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],yi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],xp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},wp=["hover","focus","filled","success","error"],Ia=.004,ai=.004,Zo=ai,zr=50,Wi=1440,Fi=zr/Wi;function Fs(e){const t=typeof e=="number"&&e>0?e:Wi;return zr/t}function Sp(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Wi}const Ns={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Li(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function $p(e,t=1){const n=t/e;return Object.fromEntries(Qt.map(i=>[i,n]))}function Cp(){return Object.fromEntries([...hi.map(e=>[e,0]),...fi.map(e=>[e,0])])}function Tp(){return Object.fromEntries(yi.map(e=>[e,0]))}function eo(e){return Object.fromEntries(Qt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Hs(e,t,n){const i=e-Fi,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function go(e,t,n){const i=Vr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Lp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=hi[o],a=fi[o],d=typeof n[s]=="number"?n[s]:0,l=typeof n[a]=="number"?n[a]:0,p=Hs(t[o]??0,d,l);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==l&&(i[a]=p.paddingRight)}return i}function Vr(e,t,n){if(e<=0)return[];const i=Qt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Fi;if(t>=a)return i;const d=[...o];let l=a-t;for(let p=d.length-1;p>=0&&l>0;p-=1){const u=d[p]-Fi;if(u<=0)continue;const w=Math.min(l,u);d[p]-=w,l-=w}return[...d,i[e-1]]}function Ep(e,t,n){if(e<=1)return{};const i=Vr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Qt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function Aa(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Fn]}function Pp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ip(e,t,n,i){const o=Math.min(i,e.length,Qt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],l=t.indexOf(d);if(l===-1)continue;const p=Qt[l],u=hi[l],w=fi[l],x=yi[l],v=Qt[a],m=hi[a],f=fi[a],E=yi[a],$=n[p],C=n[u],S=n[w],M=n[x];typeof $=="number"&&(s[v]=$),typeof C=="number"&&(s[m]=C),typeof S=="number"&&(s[f]=S),typeof M=="number"&&(s[E]=M)}return s}function Os(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function Ap(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Li(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...$p(n,o),...Cp()};if(s)for(const d of yi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,Tp());return Os(e,a)?a:e}function _p(e,t,n){const i=cp(e);i&&(e={...e,...i});const o=Fs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Li(e),l=Li(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Fn.length,w=S=>{if(p)return S;const M=eo({...t,...S}),I=Li(S),W=go(u,I,M),b=Lp(u,W,{...t,...S});return Object.keys(b).length===0?S:{...S,...b}};if(typeof s=="number"&&s!==a)return e;const x=Aa(e),v=Aa(t);if(!Pp(x,v))return w({...e,...Ip(x,v,t,u)});if(d<l&&typeof u=="number"&&!p){const S=eo({...t,...e});return w({...e,...Ep(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(d-o)/2);return S>M?{...e,textPaddingLR:M}:e}const m=eo({...t,...e}),f=go(u,l,eo(t)),$=go(u,d,m).some((S,M)=>S<(f[M]??S)),C=Qt.some(S=>{const M=e[S],I=t[S];return typeof M=="number"&&typeof I=="number"&&M!==I});return $||C?w(e):e}function Rp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Fi,i-o-s-Fi)}function kp(e,t){return Math.random()*(t-e)+e}function Mp(e){return Object.fromEntries(Qt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Qo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Wp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const l=hi[d],p=fi[d],u=yi[d];return{key:a,textPrefix:fp[a],widthKey:Qt[d],width:n[Qt[d]],paddingLeftKey:l,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[l],paddingRight:o[p],paddingBottom:s[u]}})}function Fp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:l}=L.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:f,showVisibility:E,cut:$,showCut:C,cutCellMinHeight:S,cutLabel:M,imageSize:I,imageOnHover:W,entryHoverEffect:b,entryHoverShowOption:R,rowPaddingTop:V,rowPaddingBottom:g,rowPaddingTopB:T,columnsOrder:_,textPaddingLR:H,textColor:K,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q}=e,[O,Y]=c.useState(void 0),[te,oe]=c.useState(null),F=W==="on"&&(!n||i),ae=($??0)>0,h=w==="b",ie=c.useRef(null),he=c.useRef(null),[fe,We]=c.useState(null),[Z,le]=c.useState(Wi),U=Fs(Z),B=Math.max(0,((x??0)-U)/2),N=Math.min(H??0,B),me=Math.max(N,ai),we=((x??0)+U)/2;c.useLayoutEffect(()=>{if(!n){le(Wi);return}const ne=()=>{le(Sp(ie.current))};ne();const xe=ie.current;if(!xe)return;const Ae=new ResizeObserver(ne);Ae.observe(xe);let Ve=xe;for(;Ve&&!Ve.style.getPropertyValue("--cntrl-article-width");)Ve=Ve.parentElement;return Ve&&Ae.observe(Ve),()=>Ae.disconnect()},[n,a]),c.useEffect(()=>{Y(void 0)},[$,C,t,v]),c.useEffect(()=>{n&&!i&&Y(void 0)},[n,i]);const Oe=L.buildColorVars(l,{textColor:K,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q},xp,wp),_e=s&&s!=="default"?`${l}-state-${s}`:"",Fe=`${!n||i?b==="default"?`${l}-entry-hover-default`:b==="blinds"?`${l}-entry-hover-blinds`:b==="reveal"?`${l}-entry-hover-reveal`:"":""} ${_e}`.trim(),z=b==="reveal"&&(!n||i),de=(E==null?void 0:E[0])??!1,A=(E==null?void 0:E[1])??!1,J=c.useRef(e),D=c.useRef(a);c.useEffect(()=>{if(!d||!n){J.current=e,D.current=a;return}if(D.current!==a){J.current=e,D.current=a;return}const ne=J.current;if(!(ne!==e))return;if(typeof ne.columns=="number"&&typeof e.columns=="number"&&ne.columns!==e.columns){J.current=e;return}const Ae=_p(e,ne,{designWidth:Z});J.current=e,Os(e,Ae)&&d(Ae)},[e,d,n,a,Z]);const ee=c.useMemo(()=>Mp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ge=c.useMemo(()=>Qo(e,hi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),be=c.useMemo(()=>Qo(e,fi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),De=c.useMemo(()=>Qo(e,yi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Pe=c.useMemo(()=>Array.isArray(_)&&_.length>0?_:[...Fn],[_]),Re=c.useMemo(()=>Wp(Pe,u,ee,ge,be,De),[Pe,u,ee,ge,be,De]),qe=Li(e),ce=c.useMemo(()=>Qt.slice(0,u).map(ne=>ee[ne]),[u,ee]),ke=c.useMemo(()=>Vr(u,qe,ee),[u,qe,ee]),ze=c.useMemo(()=>go(u,qe,ee),[u,qe,ee]),Te=c.useMemo(()=>Re.map((ne,xe)=>Hs(ze[xe]??0,ne.paddingLeft,ne.paddingRight)),[Re,ze]),rt=c.useMemo(()=>{const ne=v===0?1/0:v;return(t??[]).slice(0,ne).map((Ae,Ve)=>({id:Ve,cells:Object.fromEntries(Fn.map(Ye=>[Ye,Ae[Ye]??""])),image:Ae.image,link:Ae.link}))},[t,v]),nt=ae?O??$:rt.length,vt=c.useMemo(()=>ae?rt.slice(0,nt):rt,[rt,ae,nt]),Ue=ae&&nt<rt.length,at=vt.length>1||Ue,Rt=[de?`${l}-divider-top`:"",A||at?`${l}-divider-bottom`:""].filter(Boolean).join(" "),It=!n||i,bt=()=>{if(!It)return;const ne=O??$;if(!C){Y(rt.length);return}Y(Math.min(ne+C,rt.length))},ve=ne=>L.scalingValue(ne,n??!1),Be=h?T??0:V??0,Ze=g??0,Ke=m??0,Wt=Be+Ke/2,Ht=Math.max(Ze,Zo),Ft=$a(0,vt.length,de,A,Ue,f??0,n??!1).borderTopWidth,zt=fe!=null?`${fe}px`:`calc(${Ft} + ${ve(Wt)})`,cn=h?"rowPaddingTopB":"rowPaddingTop",He=Re[0],Lt=Re[Re.length-1],st=Te[0],Qe=Te[Te.length-1],gt=He&&st?Math.max(st.paddingLeft,ai):0,Vt=Lt&&Qe?Math.max(Qe.paddingRight,ai):0,Ut=qe,tn=ne=>{const xe=ie.current;if(!xe)return{x:0,y:0};const Ae=xe.getBoundingClientRect();return{x:ne.clientX-Ae.left+Ca,y:ne.clientY-Ae.top+Ca}},mn=(ne,xe)=>{if(!F)return;const Ae=ne.image;if(!(Ae!=null&&Ae.url)){oe(null);return}const{x:Ve,y:Ye}=tn(xe),et=(I==null?void 0:I.min)??80,$e=(I==null?void 0:I.max)??320,Et=(te==null?void 0:te.rowId)===ne.id?te.widthPx:kp(et,$e);oe({rowId:ne.id,url:Ae.url,objectFit:"contain",isVideo:ep(Ae),widthPx:Et,x:Ve,y:Ye})},Ge=ne=>{if(!F||!te)return;const{x:xe,y:Ae}=tn(ne);oe(Ve=>!Ve||Ve.x===xe&&Ve.y===Ae?Ve:{...Ve,x:xe,y:Ae})},nn=()=>{oe(null)},Ot=ne=>{z&&wa(ne,l),F&&oe(null)},Ne=ne=>{z&&Sa(ne,l)};c.useLayoutEffect(()=>{if(!p||h){We(null);return}const ne=he.current,xe=ne==null?void 0:ne.parentElement;if(!ne||!xe){We(null);return}const Ae=()=>{const Ye=ne.querySelector("[data-list-row]");if(!Ye){We(null);return}const et=xe.getBoundingClientRect(),$e=Ye.getBoundingClientRect();We($e.top-et.top+$e.height/2)};Ae();const Ve=new ResizeObserver(Ae);return Ve.observe(ne),Ve.observe(xe),()=>Ve.disconnect()},[p,h,vt,Be,Ze,Ke,t,e,Re,ze,Z,f,de,A,Ue]);const ft=c.useMemo(()=>!h&&Or.some(ne=>{const xe=ne.charAt(0),Ae=e[`${ne}VerticalAlign`];return Ws(Ae,e,xe)}),[h,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var Et;const ne=ie.current;if(!ne)return;const xe=()=>{ne.querySelectorAll("[data-list-col]").forEach(ht=>{ht.style.transform="";const yt=ht.querySelector(`.${l}-list-col`);yt&&(yt.style.minHeight="",yt.style.height="");const lt=ht.querySelector(`.${l}-list-col-title`);lt&&(lt.style.transform="")})};if(h||!ft){xe();return}const Ae=()=>{const ht=Array.from(ne.querySelectorAll("[data-list-row]")),yt=`${l}-list-col`,lt=`${l}-baseline-probe`;ht.forEach(Me=>{Me.querySelectorAll("[data-list-col]").forEach(xt=>{xt.style.transform="";const ct=xt.querySelector(`.${yt}`);ct&&(ct.style.minHeight="",ct.style.height="");const $t=xt.querySelector(`.${l}-list-col-title`);$t&&($t.style.transform="")})}),ht.forEach(Me=>{const xt=Array.from(Me.querySelectorAll("[data-list-col]"));gp(Me,xt,yt)}),ne.offsetHeight,ht.forEach(Me=>{const xt=Array.from(Me.querySelectorAll("[data-list-col]")),ct=Me.getBoundingClientRect().top,$t=new Map,kt=xt.map(it=>{const Bt=it.querySelector(`.${l}-list-col-title`),Gt={el:it,titleEl:Bt,letter:it.getAttribute("data-col-letter")??"",kind:it.getAttribute("data-valign")??"top",anchor:it.getAttribute("data-valign-anchor")};return $t.set(Gt.letter,Gt),Gt}),St=new Map,Nt=(it,Bt)=>{const Gt=St.get(it.letter);if(Gt!==void 0)return Gt;const Ln=it.anchor?$t.get(it.anchor):void 0;if(it.kind!=="baseline"||!Ln||Bt.has(it.letter)){const on=Jo(it,ct,yt,lt);return St.set(it.letter,on),on}Bt.add(it.letter);const Bn=Nt(Ln,Bt);Bt.delete(it.letter);const En=Jo(it,ct,yt,lt),Zn=Bn-En;hp(it.titleEl,Zn);const Qn=Jo(it,ct,yt,lt);return St.set(it.letter,Qn),Qn};kt.forEach(it=>Nt(it,new Set))})};let Ve=null;const Ye=()=>{Ve===null&&(Ve=requestAnimationFrame(()=>{Ve=null,Ae()}))};Ae();const et=new ResizeObserver(()=>Ye());et.observe(ne);let $e=!1;return typeof document<"u"&&((Et=document.fonts)!=null&&Et.ready)&&document.fonts.ready.then(()=>{$e||Ye()}),()=>{$e=!0,Ve!==null&&(cancelAnimationFrame(Ve),Ve=null),et.disconnect(),xe()}},[ft,h,e,t,Z,vt,ze]);const At=c.useMemo(()=>op(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:At}}),r.jsx("div",{style:Oe,children:r.jsxs("div",{ref:ie,className:`${l}-wrapper ${Fe}${Rt?` ${Rt}`:""}${h?` ${l}-type-b`:""}`.trim(),style:{width:L.scalingValue(x??0,n),...!h&&p?{[`--${l}-first-entry-handle-top`]:zt}:{}},onMouseMove:F?Ge:void 0,onMouseLeave:F?nn:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[vt.map((ne,xe)=>{var et;const Ae=(((et=ne.link)==null?void 0:et.length)??0)>0,Ve=Ae&&(!n||i)?"a":"div",Ye=$a(xe,vt.length,de,A,Ue,f??0,n??!1);return r.jsxs(Ve,{ref:xe===0?$e=>{he.current=$e}:void 0,className:`${l}-list-item${Ae||R==="always"?` ${l}-list-item-has-link`:""}`,...Ae?{href:ne.link,target:"_blank"}:{},style:Ye,onMouseEnter:$e=>{z&&(Ae||R==="always")&&wa($e,l),F&&mn(ne,$e)},onMouseLeave:$e=>{z&&(Ae||R==="always")&&Sa($e,l)},children:[Be>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Be)}}),r.jsxs("div",{className:`${l}-list-cols-row${h?"":` ${l}-list-cols-row-h`}${p&&xe===0&&h?` ${l}-list-cols-row-controls`:""}`,...h?{}:{"data-list-row":""},style:h?void 0:{minHeight:ve(Ke)},children:[Re.map(($e,Et)=>{const ht=Et===Re.length-1,yt=Te[Et],lt=$e.paddingBottom,Me=np(ne.cells[$e.key]),xt=h&&Me&&lt>0,ct=h?{minHeight:ve(Ke)}:{width:ve(ze[Et])},$t=h?{paddingLeft:ve(N),paddingRight:ve(N)}:{paddingLeft:ve(yt.paddingLeft),paddingRight:ve(yt.paddingRight)},kt=$e.textPrefix.charAt(0),St=h?lp(e[`${$e.textPrefix}VerticalAlign`]):sp(e[`${$e.textPrefix}VerticalAlign`],e,kt),Nt=h&&Me&&p&&xe===0;return r.jsxs("div",{className:h?`${l}-list-col-wrap`:void 0,...h?{}:{"data-list-col":"","data-col-letter":kt,"data-valign":St.kind,...St.kind==="baseline"?{"data-valign-anchor":St.anchorLetter}:{}},children:[r.jsx("div",{className:`${l}-list-col${ht?` ${l}-list-col-last`:""}`,style:{...$t,...ct,...h?{justifyContent:Ta(St.kind)}:{}},"data-test":$e.width,children:r.jsx("span",{className:Ea(e,$e.textPrefix,`${l}-list-col-title`,`${l}-text-tight-leading`),style:{...La($o(e,$e.textPrefix),n),...Pa(e,$e.textPrefix,l,n),...h?{}:dp(St.kind)},children:ne.cells[$e.key]??null})}),xt&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(lt)}}),Nt&&r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":$e.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max(lt,Zo))}})]},$e.key)}),p&&xe===0&&h&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(me),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(we),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(me,qe-me)),width:ve(me),height:"100%"}})]})]}),!h&&Ze>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Ze)}}),p&&xe===0&&!h&&r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Ht)}})]},ne.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":cn,"data-controls-static-handle":"",...h?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:h?"center":"left-y",areaStyle:{position:"absolute",top:Ft,left:0,width:"100%",height:ve(Math.max(Be,Zo))}})},"row-padding-handles"),p&&!h&&He&&Lt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":He.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[0]-((st==null?void 0:st.paddingRight)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(gt),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Lt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[Re.length-1]-((Qe==null?void 0:Qe.paddingLeft)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ut-Vt),width:ve(Vt),height:"100%"}})]},"column-edge-padding-handles"),p&&!h&&Re.slice(0,-1).map((ne,xe)=>{const Ae=Re[xe+1],Ve=ke.slice(0,xe+1).reduce((ht,yt)=>ht+yt,0),Ye=Te[xe],et=Te[xe+1],$e=Math.max(Ye.paddingRight,ai),Et=Math.max(et.paddingLeft,ai);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":ne.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ze[xe]-Ye.paddingLeft),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ve-$e),width:ve($e),height:"100%"}}),r.jsx(Mt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Ae.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ze[xe+1]-et.paddingRight),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(Ve),width:ve(Et),height:"100%"}})]},`${ne.paddingRightKey}-padding`)}),p&&!h&&Re.slice(0,-1).map((ne,xe)=>{const Ae=Rp(xe,ke,ce,qe),Ye=ke.slice(0,xe+1).reduce((et,$e)=>et+$e,0)-Ia/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":ne.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(zr),"data-controls-max-fraction":String(Ae),"data-controls-variant":"column-width",className:`${l}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Ye),width:ve(Ia),height:"calc(100%)",pointerEvents:"auto"}})},`${ne.widthKey}-junction`)})]}),Ue&&(()=>{const ne=$o(e,Sn),xe=up(e.cutLabelVerticalAlign),Ae=ne.textTextAlign==="justify"||h;return r.jsx("button",{type:"button",className:`${l}-cut-item`,style:{minHeight:ve(S??0),cursor:It?"pointer":"default",...ip(A,f??0,n??!1)},onClick:It?bt:void 0,onMouseEnter:z||F?Ot:void 0,onMouseLeave:z?Ne:void 0,children:r.jsx("div",{className:`${l}-list-cols-row`,style:{...h?{paddingLeft:ve(N),paddingRight:ve(N)}:{},justifyContent:pp(ne.textTextAlign),alignItems:Ta(xe)},children:r.jsx("span",{className:Ea(e,Sn,`${l}-cut-label`,`${l}-text-tight-leading`),style:{...La(ne,n),...Pa(e,Sn,l,n),...Ae?{width:"100%"}:{}},children:M})})})})(),F&&te&&(()=>{const ne=mo(te.widthPx),xe={width:ne,height:"auto",maxHeight:ne,objectFit:"contain",left:te.x,top:te.y,position:"absolute"};return r.jsx(tp,{media:te,className:te.isVideo?`${l}-hover-video`:`${l}-hover-image`,style:xe},`${te.rowId}-${te.url}`)})()]})})]})}const Np=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
5448
+ `}const Mn=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Or=["AColumn","BColumn","CColumn","DColumn","EColumn"],yn="cutLabel",Br=[...Or,yn],Mo=["A","B","C","D","E"];function ks(e){return`${e}ColumnVerticalAlign`}const gr=["Top","Center","Bottom"];function jr(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Mo.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function rp(e){const t=jr(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function ap(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Mo.includes(n)?n:null}function Ms(e,t,n){const i=ap(e);return i?i===t?!1:rp(n[ks(i)]):!0}function _i(e){const t=jr(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Mo.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function sp(e,t,n){if(Ws(e,t,n))return _i(e);const i=_i(e);return i.kind==="baseline"?{kind:"top"}:i}function lp(e){const t=_i(e);return t.kind==="baseline"?{kind:"top"}:t}function Ws(e,t,n){return Ms(e,n,t)?_i(e).kind==="baseline":!1}function cp(e){const t={};let n=!1;for(const i of Mo){const o=ks(i),s=e[o];if(e.type==="b"){const a=String(s??"Top").trim();a!=="Top"&&a!=="Center"&&a!=="Bottom"&&(t[o]="Top",n=!0);continue}Ms(s,i,e)||(t[o]="Top",n=!0)}return n?t:null}function dp(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function up(e){const t=_i(e).kind;return t==="baseline"?"center":t}function pp(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Ta(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function mp(e,t){const n=document.createElement("i");n.className=t,n.setAttribute("aria-hidden","true"),e.prepend(n);const{top:i}=e.getBoundingClientRect(),{bottom:o}=n.getBoundingClientRect(),s=o-i;return n.remove(),s}function Jo(e,t,n,i){const o=e.titleEl;if(!o)return 0;const s=o.closest(`.${n}`);if(!s)return 0;const a=mp(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+a;const d=s.getBoundingClientRect(),l=o.getBoundingClientRect().height;let p=0;return e.kind==="center"?p=(d.height-l)/2:e.kind==="bottom"&&(p=d.height-l),d.top-t+p+a}function gp(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const s=o.querySelector(`.${n}`);s&&(s.style.minHeight=`${i}px`,s.style.height=`${i}px`)}),i)}function hp(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const fp={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Je(e,t){return`${e}${t.replace(/^text/,"Text")}`}const yp={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function vp(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),{type:"row",items:[Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing")]},Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function bp(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Br.map(e=>[yp[e],vp(e)]))}}function xo(e,t){const n=i=>{const o=Je(t,i);return e[o]};return{textFontFamily:n("textFontFamily")??"Arial",textFontSettings:n("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:n("textFontSize"),textLineHeight:n("textLineHeight"),textLetterSpacing:n("textLetterSpacing")??0,textWordSpacing:n("textWordSpacing")??0,textTextAlign:n("textTextAlign")??(t===yn?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function La(e,t){var i,o;const n={fontSettings:{fontFamily:e.textFontFamily,fontWeight:((i=e.textFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e.textFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:e.textFontSize??.01,lineHeight:e.textLineHeight,letterSpacing:e.textLetterSpacing,wordSpacing:e.textWordSpacing,textAlign:e.textTextAlign,textAppearance:e.textTextAppearance,color:e.textColor??"#767676"};return Xt(kt(n,t))}function Ea(e,t,n,i){const o=xo(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a!==void 0&&a<s?`${n} ${i}`:n}function Pa(e,t,n,i){const o=xo(e,t),s=o.textFontSize??.01,a=o.textLineHeight;return a===void 0||a>=s?{}:{[`--${n}-title-leading-gap`]:E.scalingValue((s-a)/2,i)}}const Yt=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],pi=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],mi=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],gi=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],xp={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},wp=["hover","focus","filled","success","error"],Ia=.004,ii=.004,Zo=ii,zr=50,Ai=1440,Ri=zr/Ai;function Fs(e){const t=typeof e=="number"&&e>0?e:Ai;return zr/t}function Sp(e){let t=e??null;for(;t;){const n=t.style.getPropertyValue("--cntrl-article-width").trim();if(n){const o=parseFloat(n);if(Number.isFinite(o)&&o>0)return o}const i=getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim();if(i){const o=parseFloat(i);if(Number.isFinite(o)&&o>0)return o}t=t.parentElement}return Ai}const Ns={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function Si(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function $p(e,t=1){const n=t/e;return Object.fromEntries(Yt.map(i=>[i,n]))}function Cp(){return Object.fromEntries([...pi.map(e=>[e,0]),...mi.map(e=>[e,0])])}function Tp(){return Object.fromEntries(gi.map(e=>[e,0]))}function Ji(e){return Object.fromEntries(Yt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Hs(e,t,n){const i=e-Ri,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const s=i/o;return{paddingLeft:t*s,paddingRight:n*s}}function uo(e,t,n){const i=Vr(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((s,a)=>s+a,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function Lp(e,t,n){const i={};for(let o=0;o<e;o+=1){const s=pi[o],a=mi[o],d=typeof n[s]=="number"?n[s]:0,l=typeof n[a]=="number"?n[a]:0,p=Hs(t[o]??0,d,l);p.paddingLeft!==d&&(i[s]=p.paddingLeft),p.paddingRight!==l&&(i[a]=p.paddingRight)}return i}function Vr(e,t,n){if(e<=0)return[];const i=Yt.slice(0,e).map(p=>n[p]);if(e===1)return i;const o=i.slice(0,e-1),a=o.reduce((p,u)=>p+u,0)+Ri;if(t>=a)return i;const d=[...o];let l=a-t;for(let p=d.length-1;p>=0&&l>0;p-=1){const u=d[p]-Ri;if(u<=0)continue;const w=Math.min(l,u);d[p]-=w,l-=w}return[...d,i[e-1]]}function Ep(e,t,n){if(e<=1)return{};const i=Vr(e,t,n),o={};for(let s=0;s<e-1;s+=1){const a=Yt[s];i[s]!==n[a]&&(o[a]=i[s])}return o}function _a(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Mn]}function Pp(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function Ip(e,t,n,i){const o=Math.min(i,e.length,Yt.length),s={};for(let a=0;a<o;a+=1){const d=e[a],l=t.indexOf(d);if(l===-1)continue;const p=Yt[l],u=pi[l],w=mi[l],x=gi[l],v=Yt[a],m=pi[a],y=mi[a],P=gi[a],$=n[p],T=n[u],S=n[w],M=n[x];typeof $=="number"&&(s[v]=$),typeof T=="number"&&(s[m]=T),typeof S=="number"&&(s[y]=S),typeof M=="number"&&(s[P]=M)}return s}function Os(e,t){const n=new Set([...Object.keys(e),...Object.keys(t)]);for(const i of n)if(e[i]!==t[i])return!0;return!1}function _p(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=Si(e),s=e.type==="b"||e.type===void 0&&t.type==="b",a={...e,...$p(n,o),...Cp()};if(s)for(const d of gi)typeof t[d]=="number"&&(a[d]=t[d]);else Object.assign(a,Tp());return Os(e,a)?a:e}function Ap(e,t,n){const i=cp(e);i&&(e={...e,...i});const o=Fs(n==null?void 0:n.designWidth),s=e.columns,a=t.columns,d=Si(e),l=Si(t),p=e.type==="b"||e.type===void 0&&t.type==="b",u=typeof s=="number"?s:typeof a=="number"?a:Mn.length,w=S=>{if(p)return S;const M=Ji({...t,...S}),I=Si(S),W=uo(u,I,M),b=Lp(u,W,{...t,...S});return Object.keys(b).length===0?S:{...S,...b}};if(typeof s=="number"&&s!==a)return e;const x=_a(e),v=_a(t);if(!Pp(x,v))return w({...e,...Ip(x,v,t,u)});if(d<l&&typeof u=="number"&&!p){const S=Ji({...t,...e});return w({...e,...Ep(u,d,S)})}if(p){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,M=Math.max(0,(d-o)/2);return S>M?{...e,textPaddingLR:M}:e}const m=Ji({...t,...e}),y=uo(u,l,Ji(t)),$=uo(u,d,m).some((S,M)=>S<(y[M]??S)),T=Yt.some(S=>{const M=e[S],I=t[S];return typeof M=="number"&&typeof I=="number"&&M!==I});return $||T?w(e):e}function Rp(e,t,n,i){const o=t.slice(0,e).reduce((a,d)=>a+d,0),s=n.slice(e+1,t.length-1).reduce((a,d)=>a+d,0);return Math.max(Ri,i-o-s-Ri)}function kp(e,t){return Math.random()*(t-e)+e}function Mp(e){return Object.fromEntries(Yt.map(t=>[t,typeof e[t]=="number"?e[t]:Ns[t]]))}function Qo(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function Wp(e,t,n,i,o,s){return e.slice(0,t).map((a,d)=>{const l=pi[d],p=mi[d],u=gi[d];return{key:a,textPrefix:fp[a],widthKey:Yt[d],width:n[Yt[d]],paddingLeftKey:l,paddingRightKey:p,paddingBottomKey:u,paddingLeft:i[l],paddingRight:o[p],paddingBottom:s[u]}})}function Fp({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s,layoutId:a,onUpdateSettings:d}){const{prefix:l}=E.useScopedStyles(),p=!!o,{columns:u,type:w,wrapperWidth:x,entriesCount:v,cellMinHeight:m,dividerWidth:y,showVisibility:P,cut:$,showCut:T,cutCellMinHeight:S,cutLabel:M,imageSize:I,imageOnHover:W,entryHoverEffect:b,entryHoverShowOption:R,rowPaddingTop:V,rowPaddingBottom:g,rowPaddingTopB:L,columnsOrder:A,textPaddingLR:H,textColor:U,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q}=e,[O,Y]=c.useState(void 0),[ie,re]=c.useState(null),F=W==="on"&&(!n||i),ae=($??0)>0,f=w==="b",oe=c.useRef(null),he=c.useRef(null),[fe,We]=c.useState(null),[Z,ce]=c.useState(Ai),G=Fs(Z),B=Math.max(0,((x??0)-G)/2),N=Math.min(H??0,B),me=Math.max(N,ii),Ce=((x??0)+G)/2;c.useLayoutEffect(()=>{if(!n){ce(Ai);return}const te=()=>{ce(Sp(oe.current))};te();const Se=oe.current;if(!Se)return;const Re=new ResizeObserver(te);Re.observe(Se);let je=Se;for(;je&&!je.style.getPropertyValue("--cntrl-article-width");)je=je.parentElement;return je&&Re.observe(je),()=>Re.disconnect()},[n,a]),c.useEffect(()=>{Y(void 0)},[$,T,t,v]),c.useEffect(()=>{n&&!i&&Y(void 0)},[n,i]);const Be=E.buildColorVars(l,{textColor:U,backgroundColor:se,dividerColor:j,textHoverColor:k,backgroundHoverColor:X,dividerHoverColor:q},xp,wp),_e=s&&s!=="default"?`${l}-state-${s}`:"",Ne=`${!n||i?b==="default"?`${l}-entry-hover-default`:b==="blinds"?`${l}-entry-hover-blinds`:b==="reveal"?`${l}-entry-hover-reveal`:"":""} ${_e}`.trim(),z=b==="reveal"&&(!n||i),ue=(P==null?void 0:P[0])??!1,_=(P==null?void 0:P[1])??!1,J=c.useRef(e),D=c.useRef(a);c.useEffect(()=>{if(!d||!n){J.current=e,D.current=a;return}if(D.current!==a){J.current=e,D.current=a;return}const te=J.current;if(!(te!==e))return;if(typeof te.columns=="number"&&typeof e.columns=="number"&&te.columns!==e.columns){J.current=e;return}const Re=Ap(e,te,{designWidth:Z});J.current=e,Os(e,Re)&&d(Re)},[e,d,n,a,Z]);const ee=c.useMemo(()=>Mp(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ge=c.useMemo(()=>Qo(e,pi),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),we=c.useMemo(()=>Qo(e,mi),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),De=c.useMemo(()=>Qo(e,gi),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),Ie=c.useMemo(()=>Array.isArray(A)&&A.length>0?A:[...Mn],[A]),Ae=c.useMemo(()=>Wp(Ie,u,ee,ge,we,De),[Ie,u,ee,ge,we,De]),Ke=Si(e),de=c.useMemo(()=>Yt.slice(0,u).map(te=>ee[te]),[u,ee]),ke=c.useMemo(()=>Vr(u,Ke,ee),[u,Ke,ee]),Ve=c.useMemo(()=>uo(u,Ke,ee),[u,Ke,ee]),Le=c.useMemo(()=>Ae.map((te,Se)=>Hs(Ve[Se]??0,te.paddingLeft,te.paddingRight)),[Ae,Ve]),at=c.useMemo(()=>{const te=v===0?1/0:v;return(t??[]).slice(0,te).map((Re,je)=>({id:je,cells:Object.fromEntries(Mn.map(Xe=>[Xe,Re[Xe]??""])),image:Re.image,link:Re.link}))},[t,v]),tt=ae?O??$:at.length,xt=c.useMemo(()=>ae?at.slice(0,tt):at,[at,ae,tt]),qe=ae&&tt<at.length,pt=xt.length>1||qe,Et=[ue?`${l}-divider-top`:"",_||pt?`${l}-divider-bottom`:""].filter(Boolean).join(" "),_t=!n||i,At=()=>{if(!_t)return;const te=O??$;if(!T){Y(at.length);return}Y(Math.min(te+T,at.length))},ve=te=>E.scalingValue(te,n??!1),He=f?L??0:V??0,Ue=g??0,nt=m??0,vt=He+nt/2,Ht=Math.max(Ue,Zo),Mt=$a(0,xt.length,ue,_,qe,y??0,n??!1).borderTopWidth,qt=fe!=null?`${fe}px`:`calc(${Mt} + ${ve(vt)})`,on=f?"rowPaddingTopB":"rowPaddingTop",Oe=Ae[0],Tt=Ae[Ae.length-1],bt=Le[0],it=Le[Le.length-1],ft=Oe&&bt?Math.max(bt.paddingLeft,ii):0,Ot=Tt&&it?Math.max(it.paddingRight,ii):0,un=Ke,Ft=te=>{const Se=oe.current;if(!Se)return{x:0,y:0};const Re=Se.getBoundingClientRect();return{x:te.clientX-Re.left+Ca,y:te.clientY-Re.top+Ca}},wn=(te,Se)=>{if(!F)return;const Re=te.image;if(!(Re!=null&&Re.url)){re(null);return}const{x:je,y:Xe}=Ft(Se),et=(I==null?void 0:I.min)??80,Ee=(I==null?void 0:I.max)??320,Lt=(ie==null?void 0:ie.rowId)===te.id?ie.widthPx:kp(et,Ee);re({rowId:te.id,url:Re.url,objectFit:"contain",isVideo:ep(Re),widthPx:Lt,x:je,y:Xe})},Qe=te=>{if(!F||!ie)return;const{x:Se,y:Re}=Ft(te);re(je=>!je||je.x===Se&&je.y===Re?je:{...je,x:Se,y:Re})},Bt=()=>{re(null)},rn=te=>{z&&wa(te,l),F&&re(null)},Me=te=>{z&&Sa(te,l)};c.useLayoutEffect(()=>{if(!p||f){We(null);return}const te=he.current,Se=te==null?void 0:te.parentElement;if(!te||!Se){We(null);return}const Re=()=>{const Xe=te.querySelector("[data-list-row]");if(!Xe){We(null);return}const et=Se.getBoundingClientRect(),Ee=Xe.getBoundingClientRect();We(Ee.top-et.top+Ee.height/2)};Re();const je=new ResizeObserver(Re);return je.observe(te),je.observe(Se),()=>je.disconnect()},[p,f,xt,He,Ue,nt,t,e,Ae,Ve,Z,y,ue,_,qe]);const ct=c.useMemo(()=>!f&&Or.some(te=>{const Se=te.charAt(0),Re=e[`${te}VerticalAlign`];return Ws(Re,e,Se)}),[f,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);c.useLayoutEffect(()=>{var Lt;const te=oe.current;if(!te)return;const Se=()=>{te.querySelectorAll("[data-list-col]").forEach(yt=>{yt.style.transform="";const St=yt.querySelector(`.${l}-list-col`);St&&(St.style.minHeight="",St.style.height="");const $t=yt.querySelector(`.${l}-list-col-title`);$t&&($t.style.transform="")})};if(f||!ct){Se();return}const Re=()=>{const yt=Array.from(te.querySelectorAll("[data-list-row]")),St=`${l}-list-col`,$t=`${l}-baseline-probe`;yt.forEach(Fe=>{Fe.querySelectorAll("[data-list-col]").forEach(ot=>{ot.style.transform="";const dt=ot.querySelector(`.${St}`);dt&&(dt.style.minHeight="",dt.style.height="");const Ct=ot.querySelector(`.${l}-list-col-title`);Ct&&(Ct.style.transform="")})}),yt.forEach(Fe=>{const ot=Array.from(Fe.querySelectorAll("[data-list-col]"));gp(Fe,ot,St)}),te.offsetHeight,yt.forEach(Fe=>{const ot=Array.from(Fe.querySelectorAll("[data-list-col]")),dt=Fe.getBoundingClientRect().top,Ct=new Map,an=ot.map(Ze=>{const Nt=Ze.querySelector(`.${l}-list-col-title`),jt={el:Ze,titleEl:Nt,letter:Ze.getAttribute("data-col-letter")??"",kind:Ze.getAttribute("data-valign")??"top",anchor:Ze.getAttribute("data-valign-anchor")};return Ct.set(jt.letter,jt),jt}),st=new Map,Zt=(Ze,Nt)=>{const jt=st.get(Ze.letter);if(jt!==void 0)return jt;const Sn=Ze.anchor?Ct.get(Ze.anchor):void 0;if(Ze.kind!=="baseline"||!Sn||Nt.has(Ze.letter)){const Cn=Jo(Ze,dt,St,$t);return st.set(Ze.letter,Cn),Cn}Nt.add(Ze.letter);const Hn=Zt(Sn,Nt);Nt.delete(Ze.letter);const On=Jo(Ze,dt,St,$t),$n=Hn-On;hp(Ze.titleEl,$n);const Jn=Jo(Ze,dt,St,$t);return st.set(Ze.letter,Jn),Jn};an.forEach(Ze=>Zt(Ze,new Set))})};let je=null;const Xe=()=>{je===null&&(je=requestAnimationFrame(()=>{je=null,Re()}))};Re();const et=new ResizeObserver(()=>Xe());et.observe(te);let Ee=!1;return typeof document<"u"&&((Lt=document.fonts)!=null&&Lt.ready)&&document.fonts.ready.then(()=>{Ee||Xe()}),()=>{Ee=!0,je!==null&&(cancelAnimationFrame(je),je=null),et.disconnect(),Se()}},[ct,f,e,t,Z,xt,Ve]);const Rt=c.useMemo(()=>op(l),[l]);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Rt}}),r.jsx("div",{style:Be,children:r.jsxs("div",{ref:oe,className:`${l}-wrapper ${Ne}${Et?` ${Et}`:""}${f?` ${l}-type-b`:""}`.trim(),style:{width:E.scalingValue(x??0,n),...!f&&p?{[`--${l}-first-entry-handle-top`]:qt}:{}},onMouseMove:F?Qe:void 0,onMouseLeave:F?Bt:void 0,children:[r.jsxs("div",{style:{width:"100%",position:"relative"},children:[xt.map((te,Se)=>{var et;const Re=(((et=te.link)==null?void 0:et.length)??0)>0,je=Re&&(!n||i)?"a":"div",Xe=$a(Se,xt.length,ue,_,qe,y??0,n??!1);return r.jsxs(je,{ref:Se===0?Ee=>{he.current=Ee}:void 0,className:`${l}-list-item${Re||R==="always"?` ${l}-list-item-has-link`:""}`,...Re?{href:te.link,target:"_blank"}:{},style:Xe,onMouseEnter:Ee=>{z&&(Re||R==="always")&&wa(Ee,l),F&&wn(te,Ee)},onMouseLeave:Ee=>{z&&(Re||R==="always")&&Sa(Ee,l)},children:[He>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(He)}}),r.jsxs("div",{className:`${l}-list-cols-row${f?"":` ${l}-list-cols-row-h`}${p&&Se===0&&f?` ${l}-list-cols-row-controls`:""}`,...f?{}:{"data-list-row":""},style:f?void 0:{minHeight:ve(nt)},children:[Ae.map((Ee,Lt)=>{const yt=Lt===Ae.length-1,St=Le[Lt],$t=Ee.paddingBottom,Fe=np(te.cells[Ee.key]),ot=f&&Fe&&$t>0,dt=f?{minHeight:ve(nt)}:{width:ve(Ve[Lt])},Ct=f?{paddingLeft:ve(N),paddingRight:ve(N)}:{paddingLeft:ve(St.paddingLeft),paddingRight:ve(St.paddingRight)},an=Ee.textPrefix.charAt(0),st=f?lp(e[`${Ee.textPrefix}VerticalAlign`]):sp(e[`${Ee.textPrefix}VerticalAlign`],e,an),Zt=f&&Fe&&p&&Se===0;return r.jsxs("div",{className:f?`${l}-list-col-wrap`:void 0,...f?{}:{"data-list-col":"","data-col-letter":an,"data-valign":st.kind,...st.kind==="baseline"?{"data-valign-anchor":st.anchorLetter}:{}},children:[r.jsx("div",{className:`${l}-list-col${yt?` ${l}-list-col-last`:""}`,style:{...Ct,...dt,...f?{justifyContent:Ta(st.kind)}:{}},"data-test":Ee.width,children:r.jsx("span",{className:Ea(e,Ee.textPrefix,`${l}-list-col-title`,`${l}-text-tight-leading`),style:{...La(xo(e,Ee.textPrefix),n),...Pa(e,Ee.textPrefix,l,n),...f?{}:dp(st.kind)},children:te.cells[Ee.key]??null})}),ot&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve($t)}}),Zt&&r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Ee.paddingBottomKey,"data-controls-static-handle":"","data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"center",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Math.max($t,Zo))}})]},Ee.key)}),p&&Se===0&&f&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ce),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:0,width:ve(me),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"textPaddingLR","data-controls-static-handle":"","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ce),className:`${l}-text-padding-lr-handle`,hitPlacement:"center",areaStyle:{position:"absolute",top:0,left:ve(Math.max(me,Ke-me)),width:ve(me),height:"100%"}})]})]}),!f&&Ue>0&&r.jsx("div",{className:`${l}-row-padding-handle`,style:{height:ve(Ue)}}),p&&Se===0&&!f&&r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":"rowPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:ve(Ht)}})]},te.id)}),p&&r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":on,"data-controls-static-handle":"",...f?{}:{"data-controls-handle-left":"20"},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-padding-control-handle`,hitPlacement:f?"center":"left-y",areaStyle:{position:"absolute",top:Mt,left:0,width:"100%",height:ve(Math.max(He,Zo))}})},"row-padding-handles"),p&&!f&&Oe&&Tt&&r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Oe.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[0]-((bt==null?void 0:bt.paddingRight)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:ve(ft),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Tt.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ve[Ae.length-1]-((it==null?void 0:it.paddingLeft)??0)),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(un-Ot),width:ve(Ot),height:"100%"}})]},"column-edge-padding-handles"),p&&!f&&Ae.slice(0,-1).map((te,Se)=>{const Re=Ae[Se+1],je=ke.slice(0,Se+1).reduce((yt,St)=>yt+St,0),Xe=Le[Se],et=Le[Se+1],Ee=Math.max(Xe.paddingRight,ii),Lt=Math.max(et.paddingLeft,ii);return r.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":te.paddingRightKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ve[Se]-Xe.paddingLeft),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(je-Ee),width:ve(Ee),height:"100%"}}),r.jsx(Wt,{centerXHitTop:`var(--${l}-first-entry-handle-top, 50%)`,"data-controls":Re.paddingLeftKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ve[Se+1]-et.paddingRight),className:`${l}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:ve(je),width:ve(Lt),height:"100%"}})]},`${te.paddingRightKey}-padding`)}),p&&!f&&Ae.slice(0,-1).map((te,Se)=>{const Re=Rp(Se,ke,de,Ke),Xe=ke.slice(0,Se+1).reduce((et,Ee)=>et+Ee,0)-Ia/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":te.widthKey,"data-controls-static-handle":"","data-controls-axis":"x","data-controls-min":String(zr),"data-controls-max-fraction":String(Re),"data-controls-variant":"column-width",className:`${l}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ve(Xe),width:ve(Ia),height:"calc(100%)",pointerEvents:"auto"}})},`${te.widthKey}-junction`)})]}),qe&&(()=>{const te=xo(e,yn),Se=up(e.cutLabelVerticalAlign),Re=te.textTextAlign==="justify"||f;return r.jsx("button",{type:"button",className:`${l}-cut-item`,style:{minHeight:ve(S??0),cursor:_t?"pointer":"default",...ip(_,y??0,n??!1)},onClick:_t?At:void 0,onMouseEnter:z||F?rn:void 0,onMouseLeave:z?Me:void 0,children:r.jsx("div",{className:`${l}-list-cols-row`,style:{...f?{paddingLeft:ve(N),paddingRight:ve(N)}:{},justifyContent:pp(te.textTextAlign),alignItems:Ta(Se)},children:r.jsx("span",{className:Ea(e,yn,`${l}-cut-label`,`${l}-text-tight-leading`),style:{...La(te,n),...Pa(e,yn,l,n),...Re?{width:"100%"}:{}},children:M})})})})(),F&&ie&&(()=>{const te=co(ie.widthPx),Se={width:te,height:"auto",maxHeight:te,objectFit:"contain",left:ie.x,top:ie.y,position:"absolute"};return r.jsx(tp,{media:ie,className:ie.isVideo?`${l}-hover-video`:`${l}-hover-image`,style:Se},`${ie.rowId}-${ie.url}`)})()]})})]})}const Np=`import { useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
5449
5449
  import { CommonComponentProps } from '../props';
5450
5450
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
5451
5451
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
@@ -8402,7 +8402,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8402
8402
  </>
8403
8403
  );
8404
8404
  }
8405
- `,Si=["A","B","C","D","E"],_a=[...gr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Vn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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"]}}}};function Hp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function to(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Op(){return Object.fromEntries(Si.map((e,t)=>{const n=Fn[t],i=`${e} column`;return[n,Hp(i)]}))}function Bp(){const e={};for(const t of Si)e[`${t}ColumnWidth`]=to(`${t} column width`),e[`${t}ColumnPaddingLeft`]=to(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=to(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=to(`${t} column padding bottom`);return e}function Ra(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Fn]};for(const s of Si)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function jp(e){const t={};if(e===Sn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...gr]},enum:[...gr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[..._a],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[..._a]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...Vn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...Vn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...Vn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...Vn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...Vn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...Vn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...Vn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const zp=Br.reduce((e,t)=>({...e,...jp(t)}),{});function Vp(e){return{verticalAlign:e===Sn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===Sn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Dp(e,t={}){var n;return{...Vp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ka=new Set(["textFontFamily","textFontSettings"]);function qp(e,t,n){const i=s=>n===void 0?!0:n==="common"?ka.has(s):!ka.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=jr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function ho(e={},t){return Br.reduce((n,i)=>({...n,...qp(i,Dp(i,e),t)}),{})}const Kp=ho(),Up=bp();function Bs(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Or.forEach((t,n)=>{const i=Fn[n],o=Bs(t);for(let s=1;s<Fn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,l)=>({name:`columnsOrder.${l}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Xp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Bs(Sn);const Yp=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Dn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Jp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Dn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Dn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Dn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Dn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Dn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Dn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Dn[6],link:""}],Zp=[...Si.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Qp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Op(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Jp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Bp(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...zp,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Kp,...ho({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ra({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...ho({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ra({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...ho({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yp.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...Si.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Up]}],paletteBookmark:{items:[...Xp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},em={element:Fp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>Ap(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qp,sourceCode:Np},Ma=300,An=.004,tm={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},nm=["hover","focus","filled","success","error"];function im(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Fa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:L.scalingValue((o-t)/2,i)}}function om(e){return`
8405
+ `,bi=["A","B","C","D","E"],Aa=[...gr,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],zn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",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"]}}}};function Hp(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function Zi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function Op(){return Object.fromEntries(bi.map((e,t)=>{const n=Mn[t],i=`${e} column`;return[n,Hp(i)]}))}function Bp(){const e={};for(const t of bi)e[`${t}ColumnWidth`]=Zi(`${t} column width`),e[`${t}ColumnPaddingLeft`]=Zi(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=Zi(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=Zi(`${t} column padding bottom`);return e}function Ra(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Mn]};for(const s of bi)i[`${s}ColumnWidth`]=s==="A"?.0798:.32,i[`${s}ColumnPaddingLeft`]=0,i[`${s}ColumnPaddingRight`]=0,i[`${s}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function jp(e){const t={};if(e===yn)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...gr]},enum:[...gr]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...Aa],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...Aa]}}return t[Je(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Je(e,"textFontSettings")]={...zn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Je(e,"textFontSize")]={...zn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Je(e,"textLineHeight")]={...zn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Je(e,"textLetterSpacing")]={...zn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Je(e,"textWordSpacing")]={...zn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Je(e,"textTextAlign")]={...zn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Je(e,"textTextAppearance")]={...zn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const zp=Br.reduce((e,t)=>({...e,...jp(t)}),{});function Vp(e){return{verticalAlign:e===yn?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===yn?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function Dp(e,t={}){var n;return{...Vp(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const ka=new Set(["textFontFamily","textFontSettings"]);function qp(e,t,n){const i=s=>n===void 0?!0:n==="common"?ka.has(s):!ka.has(s),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=jr(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Je(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Je(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Je(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Je(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Je(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Je(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Je(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Je(e,"textTextAppearance")]=t.textTextAppearance),o}function po(e={},t){return Br.reduce((n,i)=>({...n,...qp(i,Dp(i,e),t)}),{})}const Kp=po(),Up=bp();function Bs(e){return[Je(e,"textFontFamily"),Je(e,"textFontSettings"),Je(e,"textFontSize"),Je(e,"textLineHeight"),Je(e,"textLetterSpacing"),Je(e,"textWordSpacing"),Je(e,"textTextAlign"),Je(e,"textTextAppearance"),`${e}VerticalAlign`]}function Gp(){const e=[];return Or.forEach((t,n)=>{const i=Mn[n],o=Bs(t);for(let s=1;s<Mn.length;s+=1){const a=[{name:"columns",value:s},...Array.from({length:s},(d,l)=>({name:`columnsOrder.${l}`,value:i,isNotEqual:!0}))];o.forEach(d=>{e.push({if:a,then:{name:`properties.${d}.display.visible`,value:!1}})})}}),e}const Xp=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];Bs(yn);const Yp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],Vn=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(1).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(2).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(3).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(4).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(5).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(8).webp"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/grid(9).webp"}],Jp=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:Vn[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:Vn[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:Vn[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:Vn[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:Vn[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:Vn[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:Vn[6],link:""}],Zp=[...bi.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],Qp={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...Op(),image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["image"]},default:Jp},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b"]},columns:{type:"number",scope:"layout",title:"Columns",display:{type:"count-number"},min:1,max:5},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},textPaddingLR:{type:"number",scope:"layout",title:"Text Padding LR",min:0,max:9999,display:{type:"range-control"}},entriesCount:{type:"number",scope:"layout",title:"Amount",display:{type:"toggle-numeric-input",enum:["auto","fixed"]},min:1},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},imageOnHover:{type:"boolean",scope:"common",title:"Image On Hover",display:{type:"toggle-cycle",enum:["on","off"]}},imageSize:{type:"object",scope:"layout",title:"Image size",display:{type:"min-max-input"},min:1,max:1440,properties:{min:{type:"number"},max:{type:"number"}}},dividerWidth:{type:"number",scope:"layout",title:"Divider width",display:{type:"numeric-input"},min:0,max:9999},showVisibility:{type:"array",scope:"common",title:"Show",display:{type:"double-toggle",enum:["top","bottom"]},items:{type:"boolean"},default:[!0,!1]},cut:{type:"number",scope:"layout",title:"Display",display:{type:"toggle-numeric-input",enum:["off","on"]},min:1},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default","blinds","reveal"]}},entryHoverShowOption:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","link only"]}},cutCellMinHeight:{type:"number",scope:"layout",title:"Cell min height",display:{type:"numeric-input"},min:0,max:9999},cutLabel:{type:"string",scope:"common",title:"Cut Label",display:{type:"label-input"}},showCut:{type:"number",scope:"layout",title:"Show",display:{type:"toggle-numeric-input",enum:["all","custom"]},min:1},rowPaddingTop:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},rowPaddingBottom:{type:"number",scope:"layout",title:"Row Padding Bottom",min:0,max:100,display:{type:"range-control"}},rowPaddingTopB:{type:"number",scope:"layout",title:"Row Padding Top",min:0,max:100,display:{type:"range-control"}},...Bp(),columnsOrder:{type:"array",scope:"layout",title:"Columns Order",display:{type:"reorder-input"},items:{type:"string"}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},textHoverColor:{type:"string",scope:"common",title:"Text Hover",display:{type:"palette-color-picker"}},...zp,backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},backgroundHoverColor:{type:"string",scope:"common",title:"BG Hover",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}}},defaults:{imageOnHover:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...Kp,...po({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Ra({columns:3,type:"b",textPaddingLR:.0373,entriesCount:0,cellMinHeight:.02,imageSize:{min:80,max:320},dividerWidth:.004,cut:0,showCut:0,cutCellMinHeight:.02,rowPaddingTop:.01,rowPaddingBottom:.01,typeBDefaults:{rowPaddingTopB:.0461,AColumnPaddingBottom:.041,BColumnPaddingBottom:.041,CColumnPaddingBottom:.0615,DColumnPaddingBottom:0,EColumnPaddingBottom:0},textStroke:.003,textCorners:.192,textPadding:{top:.0373,right:.0373,bottom:.0373,left:.0373},...po({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Ra({columns:4,type:"a",textPaddingLR:.01,entriesCount:0,cellMinHeight:.0555,imageSize:{min:200,max:200},dividerWidth:.002083,cut:0,showCut:0,cutCellMinHeight:.0555,rowPaddingTop:0,rowPaddingBottom:0,rowPaddingTopB:.01,textStroke:.001,textCorners:.05,textPadding:{top:.01,right:.01,bottom:.01,left:.01},...po({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...Gp(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...Yp.map(e=>({if:{name:"type",value:"b"},then:{name:`properties.${e}.display.visible`,value:!1}})),{if:{name:"type",value:"a"},then:{name:"properties.rowPaddingTopB.display.visible",value:!1}},...bi.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}}))],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...Zp]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__","name"]},"type",{type:"row",title:"",items:["columns","wrapperWidth"]},{type:"row",title:"Entries",items:["entriesCount","cellMinHeight"]},{type:"row",title:"",items:["imageOnHover","imageSize"]},{type:"row",title:"Entry Hover",items:["entryHoverEffect","entryHoverShowOption"]},{type:"row",title:"Divider Settings",items:["dividerWidth","showVisibility"]}]},{id:"columnsOrder",icon:"layers",title:"Columns Order",tooltip:"Columns order",layout:["__componentName__","columnsOrder"]},{id:"cutSettings",icon:"cut",title:"Cut settings",tooltip:"Cut settings",layout:["__componentName__",{type:"row",title:"",items:["cut"]},{type:"row",title:"Cut Settings",items:["cutLabel","cutCellMinHeight"]},{type:"row",title:"",items:["showCut"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",Up]}],paletteBookmark:{items:[...Xp],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},em={element:Fp,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>_p(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},schema:Qp,sourceCode:Np},Ma=300,Pn=.004,tm={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},nm=["hover","focus","filled","success","error"];function im(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Wa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Fa(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:E.scalingValue((o-t)/2,i)}}function om(e){return`
8406
8406
  .${e}-wrapper {
8407
8407
  box-sizing: border-box;
8408
8408
  display: flex;
@@ -8595,7 +8595,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
8595
8595
  left: 20px;
8596
8596
  transform: translateY(-50%);
8597
8597
  }
8598
- `}function Na(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=L.useScopedStyles(),d=o??!1,{wrapperWidth:l=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:v="off",icon:m,iconMaxWidth:f=.00833,iconPaddingRight:E=0,iconAnimation:$="rotate 45",questionColor:C="#000000",answerColor:S="#000000",dividerColor:M="#0000001F",iconColor:I="#000000",questionHoverColor:W="#666666",iconHoverColor:b="#666666",iconActiveColor:R="#000000",dividerHoverColor:V="#000000",questionFontFamily:g,questionFontSettings:T,questionFontSize:_,questionLineHeight:H,questionLetterSpacing:K,questionWordSpacing:se,questionTextAppearance:j,answerFontFamily:k,answerFontSettings:X,answerFontSize:q,answerLineHeight:O,answerLetterSpacing:Y,answerWordSpacing:te,answerTextAppearance:oe,questionPaddingLeft:F=0,questionPaddingTop:ae=0,questionPaddingBottom:h=0,answerPaddingLeft:ie=0,answerPaddingRight:he=0,answerPaddingTop:fe=0,answerPaddingBottom:We=0}=e,Z=t??[],[le,U]=c.useState(()=>new Set),B=!n||i;c.useEffect(()=>{U(new Set)},[v]),c.useEffect(()=>{n&&!o&&!i&&U(new Set)},[n,o,i]);const N=ve=>L.scalingValue(ve,n??!1),me=Math.max(F,An),we=Math.max(ae,An),Oe=Math.max(h,An),_e=Math.max(ie,An),Se=Math.max(he,An),Fe=Math.max(fe,An),z=Math.max(We,An),de=Math.max(0,(l??1)-E-f),A=Math.max(0,(l??1)-he),J=Math.max(0,(l??1)-ie),D=Math.max(E,An),ee=Math.max(0,(l??1)-F-f),ge=c.useMemo(()=>le.size===0?0:Math.min(...le),[le]),be=c.useCallback(ve=>le.has(ve),[le]),De=B&&x==="default"?`${a}-entry-hover-default`:"",Pe=m??"",Re=Pe!=="",qe=$.replace(/^rotate /,""),ce=`${a}-icon-anim-${qe}`,ke=Zt(_t(Na(g,T,_,H,K,se,j,C),n)),ze=Zt(_t(Na(k,X,q,O,Y,te,oe,S),n)),Te=Wa(_,H,`${a}-question`,`${a}-text-tight-leading`),rt=Wa(q,O,`${a}-answer-text`,`${a}-text-tight-leading`),nt=Fa(_,H,a,n),vt=Fa(q,O,a,n),Ue=L.buildColorVars(a,{questionColor:C,answerColor:S,dividerColor:M,iconColor:I,questionHoverColor:W,iconHoverColor:b,iconActiveColor:R,dividerHoverColor:V},tm,nm),at=s&&s!=="default"?`${a}-state-${s}`:"",Rt=c.useCallback(ve=>{B&&U(Be=>{if(Be.has(ve)){const Ke=new Set(Be);return Ke.delete(ve),Ke}if(v==="on")return new Set([ve]);const Ze=new Set(Be);return Ze.add(ve),Ze})},[B,v]),It=c.useMemo(()=>om(a),[a]),bt={[`--${a}-divider-width`]:L.scalingValue(u,n??!1),[`--${a}-divider-style`]:w,[`--${a}-icon-max-width`]:L.scalingValue(f,n??!1),...p>0?{[`--${a}-question-min-height`]:L.scalingValue(p,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:It}}),r.jsx("div",{style:Ue,children:r.jsx("div",{className:Xe(`${a}-wrapper`,n&&!i&&`${a}-editor`,De,at),style:{width:L.scalingValue(l,n??!1),maxWidth:"100%",...bt},children:Z.map((ve,Be)=>{var zt;const Ze=be(Be),Ke=((zt=ve.question)==null?void 0:zt.trim())??"",Wt=ve.answer,Ht=((Wt==null?void 0:Wt.length)??0)>0,Ft=d&&Be===ge;return r.jsxs("div",{className:Xe(`${a}-item`,Ze&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Ft&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(we),zIndex:2}}),r.jsx(Mt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(de),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(me),height:"100%",zIndex:2}}),r.jsx(Mt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(D),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ze,style:{...ke,...nt,paddingLeft:N(F),paddingRight:N(E)},onClick:()=>Rt(Be),children:[ae>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Te,children:Ke}),Ht&&(Re?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${ce}`,"aria-hidden":"true",children:r.jsx(sn,{url:Pe,fill:I,hoverFill:b,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${ce}`,"aria-hidden":"true"}))]}),h>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(h)},"aria-hidden":"true"})]}),Ft&&r.jsx(Mt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(Oe),zIndex:2}})]}),Ht&&Wt&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ze,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Ft&&r.jsxs(r.Fragment,{children:[r.jsx(Mt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Fe),zIndex:2}}),r.jsx(Mt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(A),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(_e),height:"100%",zIndex:2}}),r.jsx(Mt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(Se),height:"100%",zIndex:2}})]}),fe>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(fe)}}),r.jsx("div",{className:`${a}-answer`,style:{...ze,...vt,paddingLeft:N(ie),paddingRight:N(he)},children:r.jsx("div",{className:rt,children:r.jsx(gi,{content:Wt})})}),We>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(We)}}),Ft&&r.jsx(Mt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(z),zIndex:2}})]})})})]},Be)})})})]})}const am=`import { useCallback, useEffect, useMemo, useState } from 'react';
8598
+ `}function Na(e,t,n,i,o,s,a,d){return{fontSettings:{fontFamily:e,fontWeight:(t==null?void 0:t.fontWeight)??400,fontStyle:(t==null?void 0:t.fontStyle)??"normal"},fontSize:n??.01,lineHeight:i,letterSpacing:o??0,wordSpacing:s??0,textAppearance:a,color:d??"#000000"}}function rm({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:s}){const{prefix:a}=E.useScopedStyles(),d=o??!1,{wrapperWidth:l=1,cellMinHeight:p=0,dividerWidth:u=694e-6,dividerStyle:w="solid",entryHoverEffect:x="default",autoclose:v="off",icon:m,iconMaxWidth:y=.00833,iconPaddingRight:P=0,iconAnimation:$="rotate 45",questionColor:T="#000000",answerColor:S="#000000",dividerColor:M="#0000001F",iconColor:I="#000000",questionHoverColor:W="#666666",iconHoverColor:b="#666666",iconActiveColor:R="#000000",dividerHoverColor:V="#000000",questionFontFamily:g,questionFontSettings:L,questionFontSize:A,questionLineHeight:H,questionLetterSpacing:U,questionWordSpacing:se,questionTextAppearance:j,answerFontFamily:k,answerFontSettings:X,answerFontSize:q,answerLineHeight:O,answerLetterSpacing:Y,answerWordSpacing:ie,answerTextAppearance:re,questionPaddingLeft:F=0,questionPaddingTop:ae=0,questionPaddingBottom:f=0,answerPaddingLeft:oe=0,answerPaddingRight:he=0,answerPaddingTop:fe=0,answerPaddingBottom:We=0}=e,Z=t??[],[ce,G]=c.useState(()=>new Set),B=!n||i;c.useEffect(()=>{G(new Set)},[v]),c.useEffect(()=>{n&&!o&&!i&&G(new Set)},[n,o,i]);const N=ve=>E.scalingValue(ve,n??!1),me=Math.max(F,Pn),Ce=Math.max(ae,Pn),Be=Math.max(f,Pn),_e=Math.max(oe,Pn),Te=Math.max(he,Pn),Ne=Math.max(fe,Pn),z=Math.max(We,Pn),ue=Math.max(0,(l??1)-P-y),_=Math.max(0,(l??1)-he),J=Math.max(0,(l??1)-oe),D=Math.max(P,Pn),ee=Math.max(0,(l??1)-F-y),ge=c.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),we=c.useCallback(ve=>ce.has(ve),[ce]),De=B&&x==="default"?`${a}-entry-hover-default`:"",Ie=m??"",Ae=Ie!=="",Ke=$.replace(/^rotate /,""),de=`${a}-icon-anim-${Ke}`,ke=Xt(kt(Na(g,L,A,H,U,se,j,T),n)),Ve=Xt(kt(Na(k,X,q,O,Y,ie,re,S),n)),Le=Wa(A,H,`${a}-question`,`${a}-text-tight-leading`),at=Wa(q,O,`${a}-answer-text`,`${a}-text-tight-leading`),tt=Fa(A,H,a,n),xt=Fa(q,O,a,n),qe=E.buildColorVars(a,{questionColor:T,answerColor:S,dividerColor:M,iconColor:I,questionHoverColor:W,iconHoverColor:b,iconActiveColor:R,dividerHoverColor:V},tm,nm),pt=s&&s!=="default"?`${a}-state-${s}`:"",Et=c.useCallback(ve=>{B&&G(He=>{if(He.has(ve)){const nt=new Set(He);return nt.delete(ve),nt}if(v==="on")return new Set([ve]);const Ue=new Set(He);return Ue.add(ve),Ue})},[B,v]),_t=c.useMemo(()=>om(a),[a]),At={[`--${a}-divider-width`]:E.scalingValue(u,n??!1),[`--${a}-divider-style`]:w,[`--${a}-icon-max-width`]:E.scalingValue(y,n??!1),...p>0?{[`--${a}-question-min-height`]:E.scalingValue(p,n??!1)}:{}};return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:_t}}),r.jsx("div",{style:qe,children:r.jsx("div",{className:Ge(`${a}-wrapper`,n&&!i&&`${a}-editor`,De,pt),style:{width:E.scalingValue(l,n??!1),maxWidth:"100%",...At},children:Z.map((ve,He)=>{var qt;const Ue=we(He),nt=((qt=ve.question)==null?void 0:qt.trim())??"",vt=ve.answer,Ht=((vt==null?void 0:vt.length)??0)>0,Mt=d&&He===ge;return r.jsxs("div",{className:Ge(`${a}-item`,Ue&&`${a}-item-open`),"data-faq-item":"",children:[r.jsxs("div",{className:`${a}-question-controls`,children:[Mt&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{"data-controls":"questionPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Ce),zIndex:2}}),r.jsx(Wt,{"data-controls":"questionPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(ue),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(me),height:"100%",zIndex:2}}),r.jsx(Wt,{"data-controls":"iconPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ee),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(D),height:"100%",zIndex:2}})]}),r.jsxs("button",{type:"button",className:`${a}-question-button`,"aria-expanded":Ue,style:{...ke,...tt,paddingLeft:N(F),paddingRight:N(P)},onClick:()=>Et(He),children:[ae>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(ae)},"aria-hidden":"true"}),r.jsxs("span",{className:`${a}-question-row`,children:[r.jsx("span",{className:Le,children:nt}),Ht&&(Ae?r.jsx("span",{className:`${a}-icon ${a}-icon-custom ${de}`,"aria-hidden":"true",children:r.jsx(tn,{url:Ie,fill:I,hoverFill:b,className:`${a}-icon-image`})}):r.jsx("span",{className:`${a}-icon ${a}-icon-default ${de}`,"aria-hidden":"true"}))]}),f>0&&r.jsx("span",{className:`${a}-padding-handle`,style:{height:N(f)},"aria-hidden":"true"})]}),Mt&&r.jsx(Wt,{"data-controls":"questionPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(Be),zIndex:2}})]}),Ht&&vt&&r.jsx("div",{className:`${a}-panel`,"aria-hidden":!Ue,children:r.jsx("div",{className:`${a}-panel-inner`,children:r.jsxs("div",{className:`${a}-answer-controls`,children:[Mt&&r.jsxs(r.Fragment,{children:[r.jsx(Wt,{"data-controls":"answerPaddingTop","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",top:0,left:0,width:"100%",height:N(Ne),zIndex:2}}),r.jsx(Wt,{"data-controls":"answerPaddingLeft","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(_),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,left:0,width:N(_e),height:"100%",zIndex:2}}),r.jsx(Wt,{"data-controls":"answerPaddingRight","data-controls-static-handle":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(J),className:`${a}-padding-control-handle`,hitPlacement:"center-x",areaStyle:{position:"absolute",top:0,right:0,width:N(Te),height:"100%",zIndex:2}})]}),fe>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(fe)}}),r.jsx("div",{className:`${a}-answer`,style:{...Ve,...xt,paddingLeft:N(oe),paddingRight:N(he)},children:r.jsx("div",{className:at,children:r.jsx(ui,{content:vt})})}),We>0&&r.jsx("div",{className:`${a}-padding-handle`,style:{height:N(We)}}),Mt&&r.jsx(Wt,{"data-controls":"answerPaddingBottom","data-controls-static-handle":"","data-controls-handle-left":"20","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${a}-padding-control-handle`,hitPlacement:"left-y",areaStyle:{position:"absolute",bottom:0,left:0,width:"100%",height:N(z),zIndex:2}})]})})})]},He)})})})]})}const am=`import { useCallback, useEffect, useMemo, useState } from 'react';
8599
8599
  import cn from 'classnames';
8600
8600
  import { CommonComponentProps } from '../props';
8601
8601
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -9392,7 +9392,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9392
9392
  </>
9393
9393
  );
9394
9394
  }
9395
- `;function _n(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ha={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],lm={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:_n("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Ha.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Ha.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:_n("Question Padding Left"),questionPaddingTop:_n("Question Padding Top"),questionPaddingBottom:_n("Question Padding Bottom"),answerPaddingLeft:_n("Answer Padding Left"),answerPaddingRight:_n("Answer Padding Right"),answerPaddingTop:_n("Answer Padding Top"),answerPaddingBottom:_n("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...sm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},cm={element:rm,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:lm,sourceCode:am},$n=e=>e.display==="cover",Ho=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Oa=100,dm=.2,Ba=8,js=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=c.useState(0),[a,d]=c.useState(!1),l=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Oa:Math.max(Oa,window.innerHeight*dm),[]),w=c.useCallback(g=>Math.max(0,1-g/(u*1.5)),[u]),x=c.useCallback(g=>Math.max(0,1-g/(u*.45)),[u]),v=c.useCallback(g=>{const T=typeof window<"u"?window.innerHeight:800,_=Math.max(.88,1-g/T*.12);return`translateY(${g}px) scale(${_})`},[]),m=c.useCallback(()=>{l.current=null},[]),f=c.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),E=c.useCallback(()=>{const g=typeof window<"u"?window.innerHeight:800;d(!0),s(g),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),$=c.useCallback(g=>{!e||a||g.pointerType==="touch"&&(i!=null&&i(g.target)||(l.current={startX:g.clientX,startY:g.clientY,isLocked:null,pointerId:g.pointerId}))},[e,a,i]),C=c.useCallback(g=>{const T=l.current;if(!e||!T||g.pointerType!=="touch"||T.pointerId!==g.pointerId)return;const _=g.clientX-T.startX,H=g.clientY-T.startY;if(T.isLocked===null){if(Math.abs(_)<Ba&&Math.abs(H)<Ba)return;if(H>0&&H>Math.abs(_))T.isLocked=!0,g.currentTarget.setPointerCapture(g.pointerId);else{T.isLocked=!1,m();return}}if(!T.isLocked)return;g.preventDefault();const K=Math.max(0,H);p.current=K,s(K)},[e,m]),S=c.useCallback(g=>{const T=l.current;if(!e||!T||g.pointerType!=="touch"||T.pointerId!==g.pointerId)return;const _=T.isLocked===!0;if(g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId),!_){m();return}g.clientY-T.startY>=u?E():f()},[u,E,e,m,f]),M=c.useCallback(g=>{S(g)},[S]),I=c.useCallback(g=>{S(g)},[S]),W=o>0,b=a?`transform ${n}ms ease`:"none",R=a?`opacity ${n}ms ease`:"none",V=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:v(o),transition:b,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:$,onPointerMove:C,onPointerUp:M,onPointerCancel:I}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},um="[data-lightbox-scrollable]",zs=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const l=d.target;l instanceof Element&&l.closest(um)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},mm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},gm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},hm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,l=a-n,p=(m,f)=>{mm(t),e.scrollLeft=m,f&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,w=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(w)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${l}px, 0, 0)`,w=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-gm(t),!1))}},di=300,fm=900,ym=1500,vm="cubic-bezier(0.16, 1, 0.3, 1)",bm=3e3,fo=50,xm=2,wm=16,Sm=.05,$m=1,ja=.5,Cm=20,ni=.004,Ki=["title1","title2","title3"],Tm={title1:"1",title2:"2",title3:"3"},Lm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Em={title1:.02,title2:.02,title3:.02},er=e=>`max(${e}, ${Cm}px)`,Pm=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},Im=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=Pm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},ut=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Am=e=>[ut(e,"fontFamily"),ut(e,"fontSettings"),{type:"row",items:[ut(e,"fontSize"),ut(e,"lineHeight"),ut(e,"letterSpacing"),ut(e,"wordSpacing")]},ut(e,"textAlign"),ut(e,"textAppearance")],_m=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ki.map(e=>[Tm[e],Am(e)]))}),Dr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},Vs=(e,t)=>Dr(e,t),no=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},za=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Dr(e.length,n),effective:Vs(e.length,n)}},Rm=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},tr=(e,t)=>{const n=i=>{const o=ut(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Lm[t]]}},km=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),nr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Em[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},Mm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:l,thumbnailMarginBottom:p,imageGap:u,closeIcon:w,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:f,thumbnailVisibility:E,thumbnailObjectFit:$,thumbnailActive:C,thumbnailActiveColor:S,title1Width:M,title2Width:I,title3Width:W,title1MarginLeft:b=0,title2MarginLeft:R=0,title3MarginLeft:V=0,titleRowMarginBottom:g=0,titleHeaderLayout:T="desktop",contentMarginTop:_,iconMarginLeft:H}=n,K=y=>L.scalingValue(y,i??!1),se=K(l),j=K(p??.02),k=K(u??0),X=K(_??0),q=K(H??0),{title1:O,title2:Y,title3:te}=Im(t),oe=nr("title1",tr(n,"title1"),i),F=nr("title2",tr(n,"title2"),i),ae=nr("title3",tr(n,"title3"),i),h=T==="mobile",ie=!o&&(!i||s),he=ie,fe=ie,We=ie,Z=$n($),le=Z?{"--image-aspect-ratio":Ho($)}:void 0,U=!!(O||Y||te),B=c.useMemo(()=>Rm(e,O,Y,te,oe,F,ae),[e,O,Y,te,oe,F,ae]),N=c.useMemo(()=>({title1Width:M,title2Width:I,title3Width:W}),[M,I,W]),me=c.useMemo(()=>B.map(y=>N[y.widthKey]),[B,N]),we=c.useMemo(()=>Dr(B.length,me),[B.length,me]),Oe=c.useMemo(()=>Vs(B.length,me),[B.length,me]),_e=c.useMemo(()=>B.filter(y=>y.prefix==="title1"),[B]),Se=c.useMemo(()=>B.filter(y=>y.prefix==="title2"||y.prefix==="title3"),[B]),Fe=c.useMemo(()=>za(_e,N),[_e,N]),z=c.useMemo(()=>za(Se,N),[Se,N]),de=c.useCallback((y,G)=>{const Q=B.indexOf(y);if(!h||G==="single-row")return{effectiveWidth:Oe[Q]??0,resolvedWidth:we[Q]??0,maxWidth:no(Q,we)};if(G==="two-row-top"){const ye=_e.indexOf(y);return{effectiveWidth:Fe.effective[ye]??0,resolvedWidth:Fe.resolved[ye]??0,maxWidth:no(ye,Fe.resolved)}}const pe=Se.indexOf(y);return{effectiveWidth:z.effective[pe]??0,resolvedWidth:z.resolved[pe]??0,maxWidth:no(pe,z.resolved)}},[Se,z,Oe,we,B,_e,Fe,h]),A=c.useCallback(y=>L.scalingValue(y,i??!1),[i]),J=A(g??0),D=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:R,title3MarginLeft:V}),[b,R,V]),ee=c.useCallback(y=>B.slice(0,y+1).reduce((G,Q,pe)=>G+(Q!=null&&Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(we[pe]??0),0)+(h?0:b??0),[B,D,we,h,b]),ge=c.useCallback(()=>h?0:b??0,[h,b]),be=c.useCallback(y=>Se.slice(0,y).reduce((G,Q,pe)=>G+(Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(z.resolved[pe]??0),0),[Se,z.resolved,D]),De=c.useCallback(y=>{const G=Se[y];return be(y)+(G.marginLeftKey?D[G.marginLeftKey]??0:0)+(z.resolved[y]??0)},[Se,z.resolved,be,D]),Pe=(y,G)=>{const Q=y.marginLeftKey?D[y.marginLeftKey]??0:0,{effectiveWidth:pe,resolvedWidth:ye,maxWidth:tt}=de(y,G),Ct=o&&G==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":y.prefix,style:{...G==="single-row"?{gridArea:y.prefix}:{},width:A(pe),...Q>0?{marginLeft:A(Q)}:{}},children:[r.jsx("p",{className:y.className,style:y.style,children:y.text}),Ct&&y.marginLeftKey&&r.jsx("div",{"data-controls":y.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:A(-Q),width:`max(${A(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Ct&&r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(tt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:A(-ni/2),width:A(ni),height:"100%",pointerEvents:"auto"}})]},y.className)},Re=()=>{const y=h?-1:B.findIndex(pe=>pe.prefix==="title1"),G=!h&&(o||(b??0)>0)?(()=>{const pe=b??0,ye=y>=0?we[y]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:0,width:`max(${A(pe)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Q=B.flatMap((pe,ye)=>{if(!pe.marginLeftKey)return[];const tt=D[pe.marginLeftKey]??0,Ct=km(B,we,D,ye)+ge();return r.jsx("div",{"data-controls":pe.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(we[ye]),style:{position:"absolute",top:0,left:A(Ct),width:`max(${A(tt)}, 10px)`,height:"100%",pointerEvents:"auto"}},pe.marginLeftKey)});return G?[G,...Q]:Q},qe=()=>B.map((y,G)=>{const Q=no(G,we),ye=ee(G)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ye),width:A(ni),height:"100%",pointerEvents:"auto"}})},`${y.widthKey}-junction`)}),ce=()=>Se.flatMap((y,G)=>{if(!y.marginLeftKey)return[];const Q=D[y.marginLeftKey]??0,pe=be(G),{resolvedWidth:ye}=de(y,"two-row-bottom");return r.jsx("div",{"data-controls":y.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:A(pe),width:`max(${A(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}},y.marginLeftKey)}),ke=()=>Se.map((y,G)=>{const{maxWidth:Q}=de(y,"two-row-bottom"),ye=De(G)-ni/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":y.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:A(ye),width:A(ni),height:"100%",pointerEvents:"auto"}})},`${y.widthKey}-junction`)}),ze=c.useRef(null),Te=c.useRef(null),rt=c.useRef(null),nt=c.useRef([]),vt=c.useRef(0),Ue=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),at=c.useRef(null),Rt=c.useRef(0),It=c.useRef("forward"),bt=c.useRef(0),ve=c.useRef(null),Be=c.useRef(!1),Ze=c.useRef(null),Ke=t.length>1&&(!o||!!s),Wt=Ke?3:1,Ht=c.useMemo(()=>Array.from({length:Wt},()=>t).flat(),[t,Wt]),[Ft,zt]=c.useState(!1),[cn,He]=c.useState(!1),[Lt,st]=c.useState(!0),[Qe,gt]=c.useState(0),Vt=c.useRef(Qe);Vt.current=Qe;const Ut=c.useRef(null),tn=c.useRef(!1),mn=c.useRef(null),Ge=c.useRef(null),nn=he&&!Lt,Ot=c.useCallback(()=>{he&&(st(!0),Ge.current&&clearTimeout(Ge.current),Ge.current=setTimeout(()=>{Ue.current.isActive||st(!1)},bm))},[he]),Ne=c.useCallback(()=>{o||tn.current||(tn.current=!0,He(!1),mn.current=setTimeout(()=>{a()},di))},[o,a]),ft=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":nn?"true":"false",style:{width:L.scalingValue(x??0,i),height:L.scalingValue(x??0,i),marginRight:q,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:Ne,"aria-label":"Close",children:r.jsx(sn,{url:w,fill:v,hoverFill:i&&!s?v:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),At=(y="two-row")=>r.jsx("div",{...y==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:A(b??0),flexShrink:0,...y==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...y==="two-row"&&o?{pointerEvents:"auto"}:{}}}),ne=()=>{const y=B.find(pe=>pe.prefix==="title1"),G=B.filter(pe=>pe.prefix==="title2"||pe.prefix==="title3"),Q=G.length>0||o||(g??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?At():null,y&&Pe(y,"two-row-top"),w&&ft()]}),Q?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[G.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[G.map(pe=>Pe(pe,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[ce(),ke()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:J,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},xe=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?At("single-row"):null,B.map(y=>Pe(y,"single-row")),o?r.jsxs(r.Fragment,{children:[Re(),qe()]}):null,w?ft():null]}),Ae=c.useCallback(y=>!!(y.closest("[data-controls]")||y.closest(`.${e}-thumbnails`)||y.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ve,backdropStyle:Ye,mediaAreaStyle:et,overlayContentStyle:$e,swipeHandlers:Et,dismissAreaStyle:ht}=js({enabled:ie??!1,onClose:Ne,animMs:di,isBlockedTarget:Ae}),yt=()=>{if(!Ke||t.length===0)return vt.current=0,0;const y=nt.current[0],G=nt.current[t.length];if(!y||!G)return vt.current;const Q=G.offsetLeft-y.offsetLeft;return Q>0&&(vt.current=Q),vt.current},lt=(y=!1)=>{if(!Ke)return;const G=Te.current,Q=yt();!G||Q<=0||(G.scrollLeft<=0?(G.scrollLeft+=Q,y&&(Ue.current.scrollLeft+=Q),Be.current&&(bt.current+=Q)):G.scrollLeft>=Q*2&&(G.scrollLeft-=Q,y&&(Ue.current.scrollLeft-=Q),Be.current&&(bt.current-=Q)))},Me=(y=(G=>(G=Te.current)==null?void 0:G.scrollLeft)()??0)=>{var Ct;const Q=((Ct=Te.current)==null?void 0:Ct.clientWidth)??0,pe=y+Q/2;let ye=-1,tt={flatIndex:0,distance:1/0};return nt.current.forEach((Dt,gn)=>{if(!Dt)return;const hn=Dt.offsetLeft,fn=hn+Dt.offsetWidth;ye===-1&&pe>=hn&&pe<fn&&(ye=gn);const P=Math.abs(hn-y);P<tt.distance&&(tt={flatIndex:gn,distance:P})}),ye!==-1?ye:tt.flatIndex},xt=y=>{const G=Te.current;return!y||!G?!1:y.offsetWidth>G.clientWidth+1},ct=y=>{Te.current&&nt.current.forEach(G=>{G&&(G.style.scrollSnapAlign=xt(G)&&y==="backward"?"end":"start")})},$t=y=>{const G=Te.current;if(!y||!G||!xt(y))return!1;const Q=y.offsetLeft,pe=Q+y.offsetWidth;return G.scrollLeft>=Q-1&&G.scrollLeft+G.clientWidth<=pe+1},kt=()=>{!Te.current||t.length===0||Ut.current===null&&gt(Me()%t.length)},St=()=>{Ut.current=null;const y=Te.current;y&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"L",location:"LightboxOverlay.tsx:releaseActiveIndexLock",message:"index lock released",data:{scrollLeft:y.scrollLeft,nearestIndex:Me()%t.length,activeIndex:Vt.current},timestamp:Date.now()})}).catch(()=>{})},Nt=y=>{const G=Te.current;G&&(G.style.scrollSnapType=y?"":"none")},it=()=>{var y;(y=at.current)==null||y.call(at),at.current=null},Bt=()=>{ve.current!==null&&(cancelAnimationFrame(ve.current),ve.current=null),Be.current=!1},Gt=()=>{const y=Te.current;if(!y){ve.current=null,Be.current=!1;return}const G=bt.current-y.scrollLeft;if(Math.abs(G)<.5){y.scrollLeft=bt.current,lt(),kt(),ve.current=null,Be.current=!1;return}y.scrollLeft+=G*Sm,lt(),kt(),Ot(),ve.current=requestAnimationFrame(Gt)},Ln=()=>{const y=rt.current;y&&(y.style.transition="",y.style.transform="",y.style.willChange="")},Bn=(y,G,Q,pe)=>{Ln(),y.scrollLeft=G,Rt.current=y.scrollLeft,lt(),Q!==void 0?gt(Q):kt();const ye=Q??Me()%t.length,tt=Me()%t.length;fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"K",location:"LightboxOverlay.tsx:finishStripScroll",message:"scroll settled",data:{targetLeft:G,scrollLeft:y.scrollLeft,intendedIndex:ye,actualIndex:tt,indexMismatch:ye!==tt},timestamp:Date.now()})}).catch(()=>{}),Nt(!0),pe==null||pe()},En=(y,{behavior:G="smooth",activeIndex:Q,onComplete:pe}={})=>{const ye=Te.current,tt=rt.current;if(!ye||!tt)return;if(Bt(),it(),Nt(!1),G==="auto"){Bn(ye,y,Q,pe);return}const Ct=Math.abs(y-ye.scrollLeft),Dt=pm(Ct,fm,ym,ye.clientWidth*.55);at.current=hm(ye,tt,y,{duration:Dt,easing:vm,onComplete:()=>{at.current=null,Bn(ye,y,Q,pe)}})},Zn=(y="smooth")=>{if(!Te.current||t.length===0)return;const Q=Me(),pe=nt.current[Q];pe&&En(pe.offsetLeft,{behavior:y,activeIndex:Q%t.length})},Qn=(y,G="smooth")=>{const Q=Te.current;if(!Q||t.length===0)return;const pe=Q.scrollLeft-y,ye=Me(y),tt=nt.current[ye];if($t(tt)){Nt(!0),kt();return}const Ct=nt.current[ye+1],Dt=tt?Ct?Ct.offsetLeft-tt.offsetLeft:tt.offsetWidth:0,gn=Dt>0?pe>Dt*ja?1:pe<-Dt*ja?-1:0:0,hn=Ke?ye+gn:Math.max(0,Math.min(Ht.length-1,ye+gn)),fn=nt.current[hn];if(!fn){Zn(G);return}const re=pe<0&&xt(fn)?fn.offsetLeft+fn.offsetWidth-Q.clientWidth:fn.offsetLeft,Le=hn%t.length,Ce=Me(Q.scrollLeft);fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"B_J",location:"LightboxOverlay.tsx:snapAfterDrag",message:"drag snap decision",data:{startScrollLeft:y,scrollLeft:Q.scrollLeft,scrollDelta:pe,startFlatIndex:ye,endFlatIndex:Ce,scrollAdjustment:gn,targetFlatIndex:hn,startIndex:ye%t.length,endIndex:Ce%t.length,targetIndex:Le,indexDelta:Le-ye%t.length,endMinusStart:Ce-ye},timestamp:Date.now()})}).catch(()=>{}),G==="smooth"&&(Ut.current=Le),gt(Le),En(re,{behavior:G,activeIndex:Le,onComplete:G==="smooth"?St:void 0})},on=(y,G="smooth")=>{const Q=Te.current,pe=Ke?t.length+y:y,ye=nt.current[pe];!Q||!ye||(G==="smooth"?Ut.current=y:Ut.current=null,gt(y),En(ye.offsetLeft,{behavior:G,activeIndex:y,onComplete:G==="smooth"?St:void 0}))},$i=y=>{if(!fe)return;if(y.pointerType==="touch"){Bt(),Nt(!0);return}if(y.pointerType!=="mouse"||y.button!==0||Ae(y.target))return;const G=Te.current;G&&(Bt(),it(),Ln(),Ut.current=null,Ue.current={isActive:!0,startX:y.clientX,scrollLeft:G.scrollLeft,hasMoved:!1},Ze.current=Me(G.scrollLeft)%t.length,Nt(!1),Ot(),G.setPointerCapture(y.pointerId))},ei=y=>{if(!fe||y.pointerType!=="mouse")return;const G=Te.current;if(!G||!Ue.current.isActive)return;const Q=y.clientX-Ue.current.startX;if(Math.abs(Q)>$m&&(Ue.current.hasMoved=!0,zt(!0)),Ue.current.hasMoved){if(y.preventDefault(),G.scrollLeft=Ue.current.scrollLeft-Q,lt(!0),kt(),Ze.current!==null){const pe=Me()%t.length,ye=Math.abs(pe-Ze.current);ye>=2&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"J",location:"LightboxOverlay.tsx:onStripPointerMove",message:"during drag multi-index",data:{startIndex:Ze.current,dragIndex:pe,dragIndexDelta:ye,scrollLeft:G.scrollLeft,deltaX:Q},timestamp:Date.now()})}).catch(()=>{})}Ot()}},Pn=y=>{if(!fe||y.pointerType!=="mouse")return;const G=Te.current;if(!G)return;const Q=Ue.current.hasMoved,pe=Ue.current.scrollLeft;Ue.current.isActive=!1,zt(!1),G.hasPointerCapture(y.pointerId)&&G.releasePointerCapture(y.pointerId),lt(),Q?Qn(pe):(Nt(!0),kt()),Ot()};return zs(),c.useEffect(()=>{const y=requestAnimationFrame(()=>He(!0));return()=>{cancelAnimationFrame(y),it(),mn.current&&clearTimeout(mn.current),Ge.current&&clearTimeout(Ge.current)}},[]),c.useEffect(()=>{if(!he){st(!0);return}Ot();const y=ze.current;if(!y)return;const G=()=>Ot();return y.addEventListener("pointermove",G),y.addEventListener("pointerdown",G),()=>{y.removeEventListener("pointermove",G),y.removeEventListener("pointerdown",G),Ge.current&&clearTimeout(Ge.current)}},[he,Ot]),c.useEffect(()=>{const y=G=>{G.key==="Escape"&&Ne()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[Ne]),c.useLayoutEffect(()=>{yt()},[k,t.length,Ke]),c.useLayoutEffect(()=>{o||on(Vt.current,"auto")},[k,o]),c.useLayoutEffect(()=>{on(0,"auto")},[t.length,Ke]),c.useEffect(()=>{const y=Te.current;if(!y||o||!ie)return;const G=Q=>{if(Q.preventDefault(),Math.abs(Q.deltaY)<=Math.abs(Q.deltaX))return;const pe=Q.deltaMode===1?wm:Q.deltaMode===2?y.clientHeight:1,ye=Q.deltaY*pe*xm;if(ye!==0){if(it(),Be.current||(Be.current=!0,bt.current=y.scrollLeft,Ut.current=null,Nt(!1)),bt.current+=ye,!Ke){const tt=y.scrollWidth-y.clientWidth;bt.current=Math.max(0,Math.min(tt,bt.current))}Ot(),ve.current===null&&(ve.current=requestAnimationFrame(Gt))}};return y.addEventListener("wheel",G,{passive:!1}),()=>{y.removeEventListener("wheel",G),Bt()}},[o,ie,Ke]),c.useEffect(()=>{const y=Te.current;if(!y)return;const G=()=>{lt();const pe=y.scrollLeft,ye=pe-Rt.current;Rt.current=pe;const tt=vt.current>0?vt.current*.5:1/0;if(ye!==0&&Math.abs(ye)<tt){const Ct=ye>0?"forward":"backward";Ct!==It.current&&(It.current=Ct,ct(Ct))}kt()};y.addEventListener("scroll",G,{passive:!0});const Q=new ResizeObserver(()=>{yt(),lt(),ct(It.current),kt()});return Q.observe(y),()=>{it(),y.removeEventListener("scroll",G),Q.disconnect()}},[t.length,Ke]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ve||Ne()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:cn?1:0,transition:`opacity ${di}ms ease`,pointerEvents:cn?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...Ye}}),r.jsxs("div",{ref:ze,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...ht},...Et,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:et,onClick:y=>y.stopPropagation(),children:r.jsx("div",{ref:Te,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":Ft?"true":"false",onPointerDown:$i,onPointerMove:ei,onPointerUp:Pn,onPointerCancel:Pn,children:r.jsx("div",{ref:rt,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Ht.map((y,G)=>{const Q=y.image.objectFit??"contain",pe=G%t.length,ye=Math.floor(G/t.length),tt=er(k),Ct=`calc(-0.5 * (${tt} + ${k}))`;return r.jsxs("div",{ref:Dt=>nt.current[G]=Dt,className:`${e}-strip-item`,style:{height:T==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:y.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Q}}),o&&pe<t.length-1&&ye===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ct,width:tt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ye}-${y.image.url}-${pe}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":nn?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...$e},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:X,width:"100%",pointerEvents:o?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${h?` ${e}-lightbox-content-area-stacked`:""}`,children:(U||w)&&r.jsx("div",{className:`${e}-header ${h?`${e}-header-two-row`:`${e}-header-single-row`}`,children:h?ne():U||w?xe():null})})})]}),t.length>1&&E==="on"&&(()=>{const y=er(j),G=`calc(-0.5 * (${j} + ${y}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":C,"data-overlay-content-hidden":nn?"true":"false",onClick:Q=>Q.stopPropagation(),style:{gap:se,bottom:j,"--thumbnail-active-color":S,...$e},children:[t.map((Q,pe)=>{const ye=er(se),tt=`calc(-0.5 * (${ye} + ${se}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":Qe===pe?"true":"false",onClick:()=>ie&&f==="click"&&on(pe),onMouseEnter:()=>We&&f==="hover"&&on(pe),"aria-label":Q.image.name?`View ${Q.image.name}`:`View image ${pe+1}`,"aria-current":Qe===pe?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Z?` ${e}-thumb-image-cover`:""}`,src:Q.image.url,alt:"",draggable:!1,style:{...le,...$.display==="cover"?{width:fo}:{width:"100%"}}})}),o&&pe<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:tt,width:ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Q.image.url}-${pe}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:G,height:y,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Wm(e){return`
9395
+ `;function In(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Ha={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},sm=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],lm={type:"object",version:1,content:{type:"array",display:{type:"array"},items:{type:"object",properties:{question:{type:"string",label:"Question",placeholder:"Add question...",display:{type:"text-input"}},answer:{label:"Answer",placeholder:"Add answer...",display:{type:"rich-text"}}}},default:[{question:"What are the three main parts of The Divine Comedy?",answer:[{type:"paragraph",children:[{text:"The poem is divided into Inferno, Purgatorio, and Paradiso. These three sections follow Dante’s journey through Hell, Purgatory, and Heaven."}]}]},{question:"Who guides Dante through Hell and most of Purgatory?",answer:[{type:"paragraph",children:[{text:"Dante is guided by Virgil, the ancient Roman poet. Virgil represents human reason and wisdom, but because he lived before Christianity, he cannot guide Dante all the way into Heaven."}]}]},{question:"What does the dark wood at the beginning of the poem symbolize?",answer:[{type:"paragraph",children:[{text:"The dark wood symbolizes Dante’s spiritual confusion and moral crisis. It shows that he has lost the “straight way” in life and needs guidance to return to truth and salvation."}]}]},{question:"What is “contrapasso” in Inferno?",answer:[{type:"paragraph",children:[{text:"“Contrapasso” is the principle that punishments in Hell reflect the sins committed during life. For example, people who caused division are themselves physically divided, showing how their punishment mirrors their wrongdoing."}]}]},{question:"Who guides Dante through Heaven?",answer:[{type:"paragraph",children:[{text:"Beatrice guides Dante through Paradiso. She represents divine love, grace, and spiritual understanding, helping Dante move beyond human reason toward a vision of God."}]}]},{question:"Why is The Divine Comedy important in literary history?",answer:[{type:"paragraph",children:[{text:"The Divine Comedy is important because it is one of the greatest works of world literature and helped shape the Italian language. Dante wrote it in the Tuscan dialect rather than Latin, making serious literature more accessible to ordinary readers."}]}]},{question:"What is the overall journey of The Divine Comedy about?",answer:[{type:"paragraph",children:[{text:"The poem is about Dante’s spiritual journey from sin and despair toward repentance, wisdom, and union with God. On a deeper level, it represents the soul’s path from confusion to divine truth."}]}]}]},settings:{sizing:"auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},cellMinHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},dividerWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},dividerStyle:{type:"string",scope:"common",title:"Style",display:{type:"toggle-cycle",enum:["solid","dashed","dotted"]}},entryHoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["none","default"]}},autoclose:{type:"string",scope:"common",title:"Autoclose",display:{type:"toggle-cycle",enum:["on","off"]}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"icon-switch-control"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:In("Icon Padding Right"),iconAnimation:{type:"string",scope:"common",title:"Icon Animation",display:{type:"toggle-cycle",enum:["rotate 180","rotate 90","rotate 45"]}},questionColor:{type:"string",scope:"common",title:"Question Default",display:{type:"palette-color-picker"}},answerColor:{type:"string",scope:"common",title:"Answer Default",display:{type:"palette-color-picker"}},dividerColor:{type:"string",scope:"common",title:"Divider Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"palette-color-picker"}},questionHoverColor:{type:"string",scope:"common",title:"Question Hover",display:{type:"palette-color-picker"}},iconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"palette-color-picker"}},iconActiveColor:{type:"string",scope:"common",title:"Icon Active",display:{type:"palette-color-picker"}},dividerHoverColor:{type:"string",scope:"common",title:"Divider Hover",display:{type:"palette-color-picker"}},questionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},questionFontSettings:{...Ha.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},questionFontSize:{type:"number",scope:"layout",title:"Question Font Size",display:{type:"font-size"}},questionLineHeight:{type:"number",scope:"layout",title:"Question Line Height",display:{type:"line-height-input"}},questionLetterSpacing:{type:"number",scope:"layout",title:"Question Letter Spacing",display:{type:"letter-spacing-input"}},questionWordSpacing:{type:"number",scope:"layout",title:"Question Word Spacing",display:{type:"word-spacing-input"}},questionTextAppearance:{type:"object",scope:"layout",title:"Question Text Appearance",display:{type:"text-appearance"}},answerFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},answerFontSettings:{...Ha.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},answerFontSize:{type:"number",scope:"layout",title:"Answer Font Size",display:{type:"font-size"}},answerLineHeight:{type:"number",scope:"layout",title:"Answer Line Height",display:{type:"line-height-input"}},answerLetterSpacing:{type:"number",scope:"layout",title:"Answer Letter Spacing",display:{type:"letter-spacing-input"}},answerWordSpacing:{type:"number",scope:"layout",title:"Answer Word Spacing",display:{type:"word-spacing-input"}},answerTextAppearance:{type:"object",scope:"layout",title:"Answer Text Appearance",display:{type:"text-appearance"}},questionPaddingLeft:In("Question Padding Left"),questionPaddingTop:In("Question Padding Top"),questionPaddingBottom:In("Question Padding Bottom"),answerPaddingLeft:In("Answer Padding Left"),answerPaddingRight:In("Answer Padding Right"),answerPaddingTop:In("Answer Padding Top"),answerPaddingBottom:In("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/component-assets/PlusIcon.svg",iconAnimation:"rotate 45",questionColor:"#000000",answerColor:"#000000",dividerColor:"#000000",iconColor:"#000000",questionHoverColor:"#A60239",iconHoverColor:"#A60239",iconActiveColor:"#000000",dividerHoverColor:"#A60239",questionFontFamily:"Goudy Bookletter 1911",questionFontSettings:{fontWeight:400,fontStyle:"normal"},questionLetterSpacing:0,questionWordSpacing:0,questionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},answerFontFamily:"Goudy Bookletter 1911",answerFontSettings:{fontWeight:400,fontStyle:"normal"},answerLetterSpacing:0,answerWordSpacing:0,answerTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{m:{wrapperWidth:1,cellMinHeight:0,dividerWidth:.008,iconMaxWidth:.0533,iconPaddingRight:.08,questionFontSize:.09066,questionLineHeight:.10133,questionLetterSpacing:-.00266,answerFontSize:.0533,answerLineHeight:.064,questionPaddingLeft:.0533,questionPaddingTop:.0533,questionPaddingBottom:.0533,answerPaddingLeft:.0533,answerPaddingRight:.16,answerPaddingTop:.0533,answerPaddingBottom:.0533},t:{wrapperWidth:.651041,cellMinHeight:0,dividerWidth:.00390625,iconMaxWidth:.02604166,iconPaddingRight:.0130208,questionFontSize:.0390625,questionLineHeight:.04427,questionLetterSpacing:-.00091145833,answerFontSize:.0234375,answerLineHeight:.026041,questionPaddingLeft:0,questionPaddingTop:.01302,questionPaddingBottom:.01302,answerPaddingLeft:.065104,answerPaddingRight:.09765625,answerPaddingTop:.026041,answerPaddingBottom:.026041},d:{wrapperWidth:.6388,cellMinHeight:0,dividerWidth:.002083,iconMaxWidth:.01388,iconPaddingRight:.01388,questionFontSize:.0333,questionLineHeight:.0333,questionLetterSpacing:-9e-4,answerFontSize:.01111,answerLineHeight:.01388,questionPaddingLeft:0,questionPaddingTop:.01111,questionPaddingBottom:.01111,answerPaddingLeft:.0625,answerPaddingRight:.1625,answerPaddingTop:0,answerPaddingBottom:.01111}},layout:["__componentName__","wrapperWidth","cellMinHeight","dividerWidth","dividerStyle","entryHoverEffect","autoclose","icon","iconMaxWidth","iconAnimation"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["wrapperWidth","cellMinHeight"]},{type:"row",title:"",items:["entryHoverEffect","autoclose"]},{type:"row",title:"Divider",items:["dividerWidth","dividerStyle"]},{type:"row",title:"Icon",items:["icon","iconMaxWidth"]},{type:"row",title:"",items:["iconAnimation"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"Question",items:["questionFontFamily","questionFontSettings",{type:"row",items:["questionFontSize","questionLineHeight","questionLetterSpacing","questionWordSpacing"]},"questionTextAppearance"]},{type:"group",title:"Answer",items:["answerFontFamily","answerFontSettings",{type:"row",items:["answerFontSize","answerLineHeight","answerLetterSpacing","answerWordSpacing"]},"answerTextAppearance"]}]}],paletteBookmark:{items:[...sm],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},cm={element:rm,id:"faq",name:"FAQ",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/FAQ_List.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[],parameters:[{path:"icon"}]},schema:lm,sourceCode:am},vn=e=>e.display==="cover",Wo=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Oa=100,dm=.2,Ba=8,js=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,s]=c.useState(0),[a,d]=c.useState(!1),l=c.useRef(null),p=c.useRef(0);p.current=o;const u=c.useMemo(()=>typeof window>"u"?Oa:Math.max(Oa,window.innerHeight*dm),[]),w=c.useCallback(g=>Math.max(0,1-g/(u*1.5)),[u]),x=c.useCallback(g=>Math.max(0,1-g/(u*.45)),[u]),v=c.useCallback(g=>{const L=typeof window<"u"?window.innerHeight:800,A=Math.max(.88,1-g/L*.12);return`translateY(${g}px) scale(${A})`},[]),m=c.useCallback(()=>{l.current=null},[]),y=c.useCallback(()=>{d(!0),s(0),window.setTimeout(()=>d(!1),n),m()},[n,m]),P=c.useCallback(()=>{const g=typeof window<"u"?window.innerHeight:800;d(!0),s(g),window.setTimeout(()=>{t(),m(),d(!1)},Math.min(n,200))},[n,t,m]),$=c.useCallback(g=>{!e||a||g.pointerType==="touch"&&(i!=null&&i(g.target)||(l.current={startX:g.clientX,startY:g.clientY,isLocked:null,pointerId:g.pointerId}))},[e,a,i]),T=c.useCallback(g=>{const L=l.current;if(!e||!L||g.pointerType!=="touch"||L.pointerId!==g.pointerId)return;const A=g.clientX-L.startX,H=g.clientY-L.startY;if(L.isLocked===null){if(Math.abs(A)<Ba&&Math.abs(H)<Ba)return;if(H>0&&H>Math.abs(A))L.isLocked=!0,g.currentTarget.setPointerCapture(g.pointerId);else{L.isLocked=!1,m();return}}if(!L.isLocked)return;g.preventDefault();const U=Math.max(0,H);p.current=U,s(U)},[e,m]),S=c.useCallback(g=>{const L=l.current;if(!e||!L||g.pointerType!=="touch"||L.pointerId!==g.pointerId)return;const A=L.isLocked===!0;if(g.currentTarget.hasPointerCapture(g.pointerId)&&g.currentTarget.releasePointerCapture(g.pointerId),!A){m();return}g.clientY-L.startY>=u?P():y()},[u,P,e,m,y]),M=c.useCallback(g=>{S(g)},[S]),I=c.useCallback(g=>{S(g)},[S]),W=o>0,b=a?`transform ${n}ms ease`:"none",R=a?`opacity ${n}ms ease`:"none",V=o>0||a;return{isSwipeDragging:W,backdropStyle:{opacity:w(o),transition:R},mediaAreaStyle:{transform:v(o),transition:b,touchAction:W?"none":void 0,willChange:W?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:R}:void 0,swipeHandlers:e?{onPointerDown:$,onPointerMove:T,onPointerUp:M,onPointerCancel:I}:{},dismissAreaStyle:e?{touchAction:"none"}:void 0}},um="[data-lightbox-scrollable]",zs=()=>{c.useEffect(()=>{const e=window.scrollY,t=document.body.style.overflow,n=document.body.style.position,i=document.body.style.top,o=document.body.style.width,s=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${e}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const a=d=>{const l=d.target;l instanceof Element&&l.closest(um)||d.preventDefault()};return document.addEventListener("touchmove",a,{passive:!1}),()=>{document.removeEventListener("touchmove",a),document.body.style.overflow=t,document.body.style.position=n,document.body.style.top=i,document.body.style.width=o,document.documentElement.style.overflow=s,window.scrollTo(0,e)}},[])},pm=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},mm=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},gm=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},hm=(e,t,n,{duration:i,easing:o,onComplete:s})=>{const a=e.scrollLeft,d=n-a,l=a-n,p=(m,y)=>{mm(t),e.scrollLeft=m,y&&(s==null||s())};if(Math.abs(d)<.5)return p(n,!0),()=>{};let u=!1,w=0;const x=()=>{t.removeEventListener("transitionend",v),clearTimeout(w)},v=m=>{m.target!==t||m.propertyName!=="transform"||u||(u=!0,x(),p(n,!0))};return t.addEventListener("transitionend",v),t.style.willChange="transform",t.style.transition="none",t.style.transform="translate3d(0, 0, 0)",t.offsetHeight,t.style.transition=`transform ${i}ms ${o}`,t.style.transform=`translate3d(${l}px, 0, 0)`,w=window.setTimeout(()=>{u||(u=!0,x(),p(n,!0))},i+64),()=>{u||(u=!0,x(),p(a-gm(t),!1))}},si=300,fm=900,ym=1500,vm="cubic-bezier(0.16, 1, 0.3, 1)",bm=3e3,mo=50,xm=2,wm=16,Sm=.05,$m=1,ja=.5,Cm=20,Qn=.004,zi=["title1","title2","title3"],Tm={title1:"1",title2:"2",title3:"3"},Lm={title1:"title1Color",title2:"title2Color",title3:"title3Color"},Em={title1:.02,title2:.02,title3:.02},er=e=>`max(${e}, ${Cm}px)`,Pm=e=>{if(!Array.isArray(e)||e.length===0)return{};const t=e.find(o=>(o==null?void 0:o.type)==="paragraph")??e[0],n=t==null?void 0:t.children;if(!Array.isArray(n))return{};const i=n.map(o=>typeof(o==null?void 0:o.text)=="string"?o.text.trim():"").filter(Boolean);return{title1:i[0],title2:i[1],title3:i[2]}},Im=e=>{for(const t of e)if(t.title1||t.title2||t.title3)return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""};for(const t of e){const n=Pm(t.text);if(n.title1||n.title2||n.title3)return{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}return{title1:"",title2:"",title3:""}},mt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,_m=e=>[mt(e,"fontFamily"),mt(e,"fontSettings"),{type:"row",items:[mt(e,"fontSize"),mt(e,"lineHeight"),mt(e,"letterSpacing"),mt(e,"wordSpacing")]},mt(e,"textAlign"),mt(e,"textAppearance")],Am=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(zi.map(e=>[Tm[e],_m(e)]))}),Dr=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},Vs=(e,t)=>Dr(e,t),Qi=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},za=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Dr(e.length,n),effective:Vs(e.length,n)}},Rm=(e,t,n,i,o,s,a)=>{const d=[];return t&&d.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&d.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:s,text:n}),i&&d.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:a,text:i}),d},tr=(e,t)=>{const n=i=>{const o=mt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[Lm[t]]}},km=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),nr=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??Em[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},Mm=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,onClose:a})=>{const{backgroundColor:d,thumbnailGap:l,thumbnailMarginBottom:p,imageGap:u,closeIcon:w,closeIconMaxWidth:x,closeIconColor:v,closeIconHoverColor:m,thumbnailTrigger:y,thumbnailVisibility:P,thumbnailObjectFit:$,thumbnailActive:T,thumbnailActiveColor:S,title1Width:M,title2Width:I,title3Width:W,title1MarginLeft:b=0,title2MarginLeft:R=0,title3MarginLeft:V=0,titleRowMarginBottom:g=0,titleHeaderLayout:L="desktop",contentMarginTop:A,iconMarginLeft:H}=n,U=h=>E.scalingValue(h,i??!1),se=U(l),j=U(p??.02),k=U(u??0),X=U(A??0),q=U(H??0),{title1:O,title2:Y,title3:ie}=Im(t),re=nr("title1",tr(n,"title1"),i),F=nr("title2",tr(n,"title2"),i),ae=nr("title3",tr(n,"title3"),i),f=L==="mobile",oe=!o&&(!i||s),he=oe,fe=oe,We=oe,Z=vn($),ce=Z?{"--image-aspect-ratio":Wo($)}:void 0,G=!!(O||Y||ie),B=c.useMemo(()=>Rm(e,O,Y,ie,re,F,ae),[e,O,Y,ie,re,F,ae]),N=c.useMemo(()=>({title1Width:M,title2Width:I,title3Width:W}),[M,I,W]),me=c.useMemo(()=>B.map(h=>N[h.widthKey]),[B,N]),Ce=c.useMemo(()=>Dr(B.length,me),[B.length,me]),Be=c.useMemo(()=>Vs(B.length,me),[B.length,me]),_e=c.useMemo(()=>B.filter(h=>h.prefix==="title1"),[B]),Te=c.useMemo(()=>B.filter(h=>h.prefix==="title2"||h.prefix==="title3"),[B]),Ne=c.useMemo(()=>za(_e,N),[_e,N]),z=c.useMemo(()=>za(Te,N),[Te,N]),ue=c.useCallback((h,K)=>{const Q=B.indexOf(h);if(!f||K==="single-row")return{effectiveWidth:Be[Q]??0,resolvedWidth:Ce[Q]??0,maxWidth:Qi(Q,Ce)};if(K==="two-row-top"){const ye=_e.indexOf(h);return{effectiveWidth:Ne.effective[ye]??0,resolvedWidth:Ne.resolved[ye]??0,maxWidth:Qi(ye,Ne.resolved)}}const le=Te.indexOf(h);return{effectiveWidth:z.effective[le]??0,resolvedWidth:z.resolved[le]??0,maxWidth:Qi(le,z.resolved)}},[Te,z,Be,Ce,B,_e,Ne,f]),_=c.useCallback(h=>E.scalingValue(h,i??!1),[i]),J=_(g??0),D=c.useMemo(()=>({title1MarginLeft:b,title2MarginLeft:R,title3MarginLeft:V}),[b,R,V]),ee=c.useCallback(h=>B.slice(0,h+1).reduce((K,Q,le)=>K+(Q!=null&&Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(Ce[le]??0),0)+(f?0:b??0),[B,D,Ce,f,b]),ge=c.useCallback(()=>f?0:b??0,[f,b]),we=c.useCallback(h=>Te.slice(0,h).reduce((K,Q,le)=>K+(Q.marginLeftKey?D[Q.marginLeftKey]??0:0)+(z.resolved[le]??0),0),[Te,z.resolved,D]),De=c.useCallback(h=>{const K=Te[h];return we(h)+(K.marginLeftKey?D[K.marginLeftKey]??0:0)+(z.resolved[h]??0)},[Te,z.resolved,we,D]),Ie=(h,K)=>{const Q=h.marginLeftKey?D[h.marginLeftKey]??0:0,{effectiveWidth:le,resolvedWidth:ye,maxWidth:rt}=ue(h,K),Pt=o&&K==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":h.prefix,style:{...K==="single-row"?{gridArea:h.prefix}:{},width:_(le),...Q>0?{marginLeft:_(Q)}:{}},children:[r.jsx("p",{className:h.className,style:h.style,children:h.text}),Pt&&h.marginLeftKey&&r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:_(-Q),width:`max(${_(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Pt&&r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:_(-Qn/2),width:_(Qn),height:"100%",pointerEvents:"auto"}})]},h.className)},Ae=()=>{const h=f?-1:B.findIndex(le=>le.prefix==="title1"),K=!f&&(o||(b??0)>0)?(()=>{const le=b??0,ye=h>=0?Ce[h]:M??0;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:0,width:`max(${_(le)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Q=B.flatMap((le,ye)=>{if(!le.marginLeftKey)return[];const rt=D[le.marginLeftKey]??0,Pt=km(B,Ce,D,ye)+ge();return r.jsx("div",{"data-controls":le.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ce[ye]),style:{position:"absolute",top:0,left:_(Pt),width:`max(${_(rt)}, 10px)`,height:"100%",pointerEvents:"auto"}},le.marginLeftKey)});return K?[K,...Q]:Q},Ke=()=>B.map((h,K)=>{const Q=Qi(K,Ce),ye=ee(K)-Qn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(ye),width:_(Qn),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),de=()=>Te.flatMap((h,K)=>{if(!h.marginLeftKey)return[];const Q=D[h.marginLeftKey]??0,le=we(K),{resolvedWidth:ye}=ue(h,"two-row-bottom");return r.jsx("div",{"data-controls":h.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ye),style:{position:"absolute",top:0,left:_(le),width:`max(${_(Q)}, 10px)`,height:"100%",pointerEvents:"auto"}},h.marginLeftKey)}),ke=()=>Te.map((h,K)=>{const{maxWidth:Q}=ue(h,"two-row-bottom"),ye=De(K)-Qn/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":h.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Q),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:_(ye),width:_(Qn),height:"100%",pointerEvents:"auto"}})},`${h.widthKey}-junction`)}),Ve=c.useRef(null),Le=c.useRef(null),at=c.useRef(null),tt=c.useRef([]),xt=c.useRef(0),qe=c.useRef({isActive:!1,startX:0,scrollLeft:0,hasMoved:!1}),pt=c.useRef(null),Et=c.useRef(null),_t=c.useRef(0),At=c.useRef("forward"),ve=c.useRef(0),He=c.useRef(null),Ue=c.useRef(!1),nt=c.useRef(null),vt=t.length>1&&(!o||!!s),Ht=vt?3:1,Mt=c.useMemo(()=>Array.from({length:Ht},()=>t).flat(),[t,Ht]),[qt,on]=c.useState(!1),[Oe,Tt]=c.useState(!1),[bt,it]=c.useState(!0),[ft,Ot]=c.useState(0),un=c.useRef(ft);un.current=ft;const Ft=c.useRef(null),wn=c.useRef(!1),Qe=c.useRef(null),Bt=c.useRef(null),rn=he&&!bt,Me=c.useCallback(()=>{he&&(it(!0),Bt.current&&clearTimeout(Bt.current),Bt.current=setTimeout(()=>{qe.current.isActive||it(!1)},bm))},[he]),ct=c.useCallback(()=>{o||wn.current||(wn.current=!0,Tt(!1),Qe.current=setTimeout(()=>{a()},si))},[o,a]),Rt=()=>r.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:E.scalingValue(x??0,i),height:E.scalingValue(x??0,i),marginRight:q,"--close-icon-hover-color":m},children:[r.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ct,"aria-label":"Close",children:r.jsx(tn,{url:w,fill:v,hoverFill:i&&!s?v:m,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:q,height:"100%",pointerEvents:"auto"}})]}),te=(h="two-row")=>r.jsx("div",{...h==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:_(b??0),flexShrink:0,...h==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...h==="two-row"&&o?{pointerEvents:"auto"}:{}}}),Se=()=>{const h=B.find(le=>le.prefix==="title1"),K=B.filter(le=>le.prefix==="title2"||le.prefix==="title3"),Q=K.length>0||o||(g??0)>0;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-header-row-top`,children:[(b??0)>0||o?te():null,h&&Ie(h,"two-row-top"),w&&Rt()]}),Q?r.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[K.length>0?r.jsxs("div",{className:`${e}-header-row-bottom`,children:[K.map(le=>Ie(le,"two-row-bottom")),o&&r.jsxs(r.Fragment,{children:[de(),ke()]})]}):null,r.jsx("div",{"data-controls":o?"titleRowMarginBottom":void 0,"data-controls-axis":o?"y":void 0,"data-controls-reverse":o?"":void 0,className:o?`${e}-control`:void 0,style:{height:J,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},Re=()=>r.jsxs(r.Fragment,{children:[(b??0)>0||o?te("single-row"):null,B.map(h=>Ie(h,"single-row")),o?r.jsxs(r.Fragment,{children:[Ae(),Ke()]}):null,w?Rt():null]}),je=c.useCallback(h=>!!(h.closest("[data-controls]")||h.closest(`.${e}-thumbnails`)||h.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Xe,backdropStyle:et,mediaAreaStyle:Ee,overlayContentStyle:Lt,swipeHandlers:yt,dismissAreaStyle:St}=js({enabled:oe??!1,onClose:ct,animMs:si,isBlockedTarget:je}),$t=()=>{if(!vt||t.length===0)return xt.current=0,0;const h=tt.current[0],K=tt.current[t.length];if(!h||!K)return xt.current;const Q=K.offsetLeft-h.offsetLeft;return Q>0&&(xt.current=Q),xt.current},Fe=(h=!1)=>{if(!vt)return;const K=Le.current,Q=$t();!K||Q<=0||(K.scrollLeft<=0?(K.scrollLeft+=Q,h&&(qe.current.scrollLeft+=Q),Ue.current&&(ve.current+=Q)):K.scrollLeft>=Q*2&&(K.scrollLeft-=Q,h&&(qe.current.scrollLeft-=Q),Ue.current&&(ve.current-=Q)))},ot=(h=(K=>(K=Le.current)==null?void 0:K.scrollLeft)()??0)=>{var Pt;const Q=((Pt=Le.current)==null?void 0:Pt.clientWidth)??0,le=h+Q/2;let ye=-1,rt={flatIndex:0,distance:1/0};return tt.current.forEach((C,ne)=>{if(!C)return;const $e=C.offsetLeft,be=$e+C.offsetWidth;ye===-1&&le>=$e&&le<be&&(ye=ne);const xe=Math.abs($e-h);xe<rt.distance&&(rt={flatIndex:ne,distance:xe})}),ye!==-1?ye:rt.flatIndex},dt=h=>{const K=Le.current;return!h||!K?!1:h.offsetWidth>K.clientWidth+1},Ct=h=>{Le.current&&tt.current.forEach(K=>{K&&(K.style.scrollSnapAlign=dt(K)&&h==="backward"?"end":"start")})},an=h=>{const K=Le.current;if(!h||!K||!dt(h))return!1;const Q=h.offsetLeft,le=Q+h.offsetWidth;return K.scrollLeft>=Q-1&&K.scrollLeft+K.clientWidth<=le+1},st=()=>{!Le.current||t.length===0||Ft.current===null&&Ot(ot()%t.length)},Zt=()=>{Ft.current=null;const h=Le.current;h&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"L",location:"LightboxOverlay.tsx:releaseActiveIndexLock",message:"index lock released",data:{scrollLeft:h.scrollLeft,nearestIndex:ot()%t.length,activeIndex:un.current},timestamp:Date.now()})}).catch(()=>{})},Ze=h=>{const K=Le.current;K&&(K.style.scrollSnapType=h?"":"none")},Nt=()=>{var h;(h=Et.current)==null||h.call(Et),Et.current=null},jt=()=>{He.current!==null&&(cancelAnimationFrame(He.current),He.current=null),Ue.current=!1},Sn=()=>{const h=Le.current;if(!h){He.current=null,Ue.current=!1;return}const K=ve.current-h.scrollLeft;if(Math.abs(K)<.5){h.scrollLeft=ve.current,Fe(),st(),He.current=null,Ue.current=!1;return}h.scrollLeft+=K*Sm,Fe(),st(),Me(),He.current=requestAnimationFrame(Sn)},Hn=()=>{const h=at.current;h&&(h.style.transition="",h.style.transform="",h.style.willChange="")},On=(h,K,Q,le)=>{Hn(),h.scrollLeft=K,_t.current=h.scrollLeft,Fe(),Q!==void 0?Ot(Q):st();const ye=Q??ot()%t.length,rt=ot()%t.length;fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"K",location:"LightboxOverlay.tsx:finishStripScroll",message:"scroll settled",data:{targetLeft:K,scrollLeft:h.scrollLeft,intendedIndex:ye,actualIndex:rt,indexMismatch:ye!==rt},timestamp:Date.now()})}).catch(()=>{}),Ze(!0),le==null||le()},$n=(h,{behavior:K="smooth",activeIndex:Q,onComplete:le}={})=>{const ye=Le.current,rt=at.current;if(!ye||!rt)return;if(jt(),Nt(),Ze(!1),K==="auto"){On(ye,h,Q,le);return}const Pt=Math.abs(h-ye.scrollLeft),C=pm(Pt,fm,ym,ye.clientWidth*.55);Et.current=hm(ye,rt,h,{duration:C,easing:vm,onComplete:()=>{Et.current=null,On(ye,h,Q,le)}})},Jn=(h="smooth")=>{if(!Le.current||t.length===0)return;const Q=ot(),le=tt.current[Q];le&&$n(le.offsetLeft,{behavior:h,activeIndex:Q%t.length})},Cn=(h,K="smooth")=>{const Q=Le.current;if(!Q||t.length===0)return;const le=Q.scrollLeft-h,ye=ot(h),rt=tt.current[ye];if(an(rt)){Ze(!0),st();return}const Pt=tt.current[ye+1],C=rt?Pt?Pt.offsetLeft-rt.offsetLeft:rt.offsetWidth:0,ne=C>0?le>C*ja?1:le<-C*ja?-1:0:0,$e=vt?ye+ne:Math.max(0,Math.min(Mt.length-1,ye+ne)),be=tt.current[$e];if(!be){Jn(K);return}const lt=le<0&&dt(be)?be.offsetLeft+be.offsetWidth-Q.clientWidth:be.offsetLeft,ut=$e%t.length,Ye=ot(Q.scrollLeft);fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"B_J",location:"LightboxOverlay.tsx:snapAfterDrag",message:"drag snap decision",data:{startScrollLeft:h,scrollLeft:Q.scrollLeft,scrollDelta:le,startFlatIndex:ye,endFlatIndex:Ye,scrollAdjustment:ne,targetFlatIndex:$e,startIndex:ye%t.length,endIndex:Ye%t.length,targetIndex:ut,indexDelta:ut-ye%t.length,endMinusStart:Ye-ye},timestamp:Date.now()})}).catch(()=>{}),K==="smooth"&&(Ft.current=ut),Ot(ut),$n(lt,{behavior:K,activeIndex:ut,onComplete:K==="smooth"?Zt:void 0})},Tn=(h,K="smooth")=>{const Q=Le.current,le=vt?t.length+h:h,ye=tt.current[le];!Q||!ye||(K==="smooth"?Ft.current=h:Ft.current=null,Ot(h),$n(ye.offsetLeft,{behavior:K,activeIndex:h,onComplete:K==="smooth"?Zt:void 0}))},Ln=()=>{pt.current&&(window.removeEventListener("pointerup",pt.current),window.removeEventListener("pointercancel",pt.current),pt.current=null)},sn=h=>{if(!qe.current.isActive)return;Ln();const K=Le.current;if(!K)return;const Q=qe.current.hasMoved,le=qe.current.scrollLeft;Fe(!0),qe.current={isActive:!1,startX:0,scrollLeft:0,hasMoved:!1},on(!1),h!==void 0&&K.hasPointerCapture(h)&&K.releasePointerCapture(h),Q?Cn(le):(Ze(!0),st()),Me()},Ho=h=>{if(!fe)return;if(h.pointerType==="touch"){jt(),Ze(!0);return}if(h.pointerType!=="mouse"||h.button!==0||je(h.target))return;const K=Le.current;if(!K)return;jt(),Nt(),Hn(),Ft.current=null,qe.current={isActive:!0,startX:h.clientX,scrollLeft:K.scrollLeft,hasMoved:!1},nt.current=ot(K.scrollLeft)%t.length,Ze(!1),Me(),K.setPointerCapture(h.pointerId),Ln();const Q=le=>{le.pointerType==="mouse"&&sn(le.pointerId)};pt.current=Q,window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},Oo=h=>{if(!fe||h.pointerType!=="mouse")return;const K=Le.current;if(!K||!qe.current.isActive)return;if(h.buttons===0){sn(h.pointerId);return}const Q=h.clientX-qe.current.startX;if(Math.abs(Q)>$m&&(qe.current.hasMoved=!0,on(!0)),qe.current.hasMoved){if(h.preventDefault(),K.scrollLeft=qe.current.scrollLeft-Q,Fe(!0),st(),nt.current!==null){const le=ot()%t.length,ye=Math.abs(le-nt.current);ye>=2&&fetch("http://127.0.0.1:7916/ingest/05b80f60-0d98-4176-9acb-551465211f52",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"8d1a00"},body:JSON.stringify({sessionId:"8d1a00",runId:"pre-fix-2",hypothesisId:"J",location:"LightboxOverlay.tsx:onStripPointerMove",message:"during drag multi-index",data:{startIndex:nt.current,dragIndex:le,dragIndexDelta:ye,scrollLeft:K.scrollLeft,deltaX:Q},timestamp:Date.now()})}).catch(()=>{})}Me()}},Di=h=>{fe&&h.pointerType==="mouse"&&sn(h.pointerId)},Bo=h=>{!fe||h.pointerType!=="mouse"||sn(h.pointerId)};return zs(),c.useEffect(()=>{const h=requestAnimationFrame(()=>Tt(!0));return()=>{cancelAnimationFrame(h),Nt(),Ln(),Qe.current&&clearTimeout(Qe.current),Bt.current&&clearTimeout(Bt.current)}},[]),c.useEffect(()=>{if(!he){it(!0);return}Me();const h=Ve.current;if(!h)return;const K=()=>Me();return h.addEventListener("pointermove",K),h.addEventListener("pointerdown",K),()=>{h.removeEventListener("pointermove",K),h.removeEventListener("pointerdown",K),Bt.current&&clearTimeout(Bt.current)}},[he,Me]),c.useEffect(()=>{const h=K=>{K.key==="Escape"&&ct()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[ct]),c.useLayoutEffect(()=>{$t()},[k,t.length,vt]),c.useLayoutEffect(()=>{o||Tn(un.current,"auto")},[k,o]),c.useLayoutEffect(()=>{Tn(0,"auto")},[t.length,vt]),c.useEffect(()=>{const h=Le.current;if(!h||o||!oe)return;const K=Q=>{if(Q.preventDefault(),Math.abs(Q.deltaY)<=Math.abs(Q.deltaX))return;const le=Q.deltaMode===1?wm:Q.deltaMode===2?h.clientHeight:1,ye=Q.deltaY*le*xm;if(ye!==0){if(Nt(),Ue.current||(Ue.current=!0,ve.current=h.scrollLeft,Ft.current=null,Ze(!1)),ve.current+=ye,!vt){const rt=h.scrollWidth-h.clientWidth;ve.current=Math.max(0,Math.min(rt,ve.current))}Me(),He.current===null&&(He.current=requestAnimationFrame(Sn))}};return h.addEventListener("wheel",K,{passive:!1}),()=>{h.removeEventListener("wheel",K),jt()}},[o,oe,vt]),c.useEffect(()=>{const h=Le.current;if(!h)return;const K=()=>{Fe(qe.current.isActive);const le=h.scrollLeft,ye=le-_t.current;_t.current=le;const rt=xt.current>0?xt.current*.5:1/0;if(ye!==0&&Math.abs(ye)<rt){const Pt=ye>0?"forward":"backward";Pt!==At.current&&(At.current=Pt,Ct(Pt))}st()};h.addEventListener("scroll",K,{passive:!0});const Q=new ResizeObserver(()=>{$t(),Fe(qe.current.isActive),Ct(At.current),st()});return Q.observe(h),()=>{Nt(),h.removeEventListener("scroll",K),Q.disconnect()}},[t.length,vt]),r.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Xe||ct()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:Oe?1:0,transition:`opacity ${si}ms ease`,pointerEvents:Oe?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:d,...et}}),r.jsxs("div",{ref:Ve,className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...St},...yt,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:Ee,onClick:h=>h.stopPropagation(),children:r.jsx("div",{ref:Le,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":fe&&t.length>0?"true":"false","data-mouse-dragging":qt?"true":"false",onPointerDown:Ho,onPointerMove:Oo,onPointerUp:Di,onPointerCancel:Di,onLostPointerCapture:Bo,children:r.jsx("div",{ref:at,className:`${e}-lightbox-strip-track`,style:{gap:k},children:Mt.map((h,K)=>{const Q=h.image.objectFit??"contain",le=K%t.length,ye=Math.floor(K/t.length),rt=er(k),Pt=`calc(-0.5 * (${rt} + ${k}))`;return r.jsxs("div",{ref:C=>tt.current[K]=C,className:`${e}-strip-item`,style:{height:L==="mobile"?"75vh":"100%"},children:[r.jsx("img",{src:h.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:Q}}),o&&le<t.length-1&&ye===0&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Pt,width:rt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ye}-${h.image.url}-${le}`)})})})}),r.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:{width:"100%",height:"100%",top:0,bottom:0,...Lt},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,"data-controls-axis":o?"y":void 0,"data-controls-handle-left-fraction":o?"0.05":void 0,className:o?`${e}-control`:void 0,style:{height:X,width:"100%",pointerEvents:o?"auto":"none"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:r.jsx("div",{className:`${e}-lightbox-content-area${f?` ${e}-lightbox-content-area-stacked`:""}`,children:(G||w)&&r.jsx("div",{className:`${e}-header ${f?`${e}-header-two-row`:`${e}-header-single-row`}`,children:f?Se():G||w?Re():null})})})]}),t.length>1&&P==="on"&&(()=>{const h=er(j),K=`calc(-0.5 * (${j} + ${h}))`;return r.jsxs("div",{className:`${e}-thumbnails`,"data-lightbox-scrollable":"","data-thumbnail-active":T,"data-overlay-content-hidden":rn?"true":"false",onClick:Q=>Q.stopPropagation(),style:{gap:se,bottom:j,"--thumbnail-active-color":S,...Lt},children:[t.map((Q,le)=>{const ye=er(se),rt=`calc(-0.5 * (${ye} + ${se}))`;return r.jsxs("div",{style:{position:"relative",flex:"0 0 auto"},children:[r.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":ft===le?"true":"false",onClick:()=>oe&&y==="click"&&Tn(le),onMouseEnter:()=>We&&y==="hover"&&Tn(le),"aria-label":Q.image.name?`View ${Q.image.name}`:`View image ${le+1}`,"aria-current":ft===le?"true":void 0,children:r.jsx("img",{className:`${e}-thumb-image${Z?` ${e}-thumb-image-cover`:""}`,src:Q.image.url,alt:"",draggable:!1,style:{...ce,...$.display==="cover"?{width:mo}:{width:"100%"}}})}),o&&le<t.length-1&&r.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:rt,width:ye,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${Q.image.url}-${le}`)}),o&&r.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:K,height:h,pointerEvents:"auto",zIndex:3}})]})})()]})]})};function Wm(e){return`
9396
9396
  .${e}-wrapper {
9397
9397
  position: relative;
9398
9398
  width: 100%;
@@ -9547,7 +9547,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9547
9547
  scrollbar-width: none;
9548
9548
  pointer-events: auto;
9549
9549
  opacity: 1;
9550
- transition: opacity ${di}ms ease;
9550
+ transition: opacity ${si}ms ease;
9551
9551
  }
9552
9552
 
9553
9553
  .${e}-thumbnails[data-overlay-content-hidden="true"] {
@@ -9595,15 +9595,15 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9595
9595
 
9596
9596
  .${e}-thumb-image {
9597
9597
  display: block;
9598
- height: ${fo}px;
9598
+ height: ${mo}px;
9599
9599
  object-fit: contain;
9600
9600
  transition: filter 0.2s ease;
9601
9601
  }
9602
9602
 
9603
9603
  .${e}-thumb-image-cover {
9604
9604
  aspect-ratio: var(--image-aspect-ratio);
9605
- max-width: ${fo}px;
9606
- max-height: ${fo}px;
9605
+ max-width: ${mo}px;
9606
+ max-height: ${mo}px;
9607
9607
  width: auto;
9608
9608
  height: auto;
9609
9609
  object-fit: cover;
@@ -9621,7 +9621,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9621
9621
  background-color: transparent;
9622
9622
  padding: 0;
9623
9623
  opacity: 1;
9624
- transition: opacity ${di}ms ease;
9624
+ transition: opacity ${si}ms ease;
9625
9625
  }
9626
9626
 
9627
9627
  .${e}-close-icon[data-overlay-content-hidden="true"] {
@@ -9746,7 +9746,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9746
9746
  display: flex;
9747
9747
  flex-direction: column;
9748
9748
  opacity: 1;
9749
- transition: opacity ${di}ms ease;
9749
+ transition: opacity ${si}ms ease;
9750
9750
  }
9751
9751
 
9752
9752
  .${e}-lightbox-content-inner[data-overlay-content-hidden="true"] {
@@ -9787,7 +9787,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
9787
9787
  pointer-events: auto;
9788
9788
  z-index: 10;
9789
9789
  }
9790
- `}const Fm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=L.useScopedStyles(),{cover:d,coverFit:l}=e,p=c.useRef(null),[u,w]=c.useState(!1),x=t??[],v=u&&x.length>0,m=()=>{x.length!==0&&w(!0)};return c.useEffect(()=>{!n||i||o||w(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wm(a)}}),d&&r.jsx("div",{className:`${a}-cover ${$n(l)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>m(),style:{...$n(l)?{"--image-aspect-ratio":Ho(l)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${$n(l)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),v&&typeof document<"u"&&(()=>{const f=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(Mm,{prefix:a,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>w(!1)}),f)})()]})},Nm=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
9790
+ `}const Fm=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s})=>{const{prefix:a}=E.useScopedStyles(),{cover:d,coverFit:l}=e,p=c.useRef(null),[u,w]=c.useState(!1),x=t??[],v=u&&x.length>0,m=()=>{x.length!==0&&w(!0)};return c.useEffect(()=>{!n||i||o||w(!1)},[n,i,o]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:p,className:`${a}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:Wm(a)}}),d&&r.jsx("div",{className:`${a}-cover ${vn(l)?`${a}-ratio-wrapper-cover`:`${a}-ratio-wrapper-fit`}`,onClick:()=>m(),style:{...vn(l)?{"--image-aspect-ratio":Wo(l)}:{}},"aria-label":"Open image gallery",children:r.jsx("img",{className:`${a}-cover-image ${vn(l)?`${a}-cover-image-cover`:`${a}-cover-image-fit`}`,src:d,alt:"cover"})})]}),v&&typeof document<"u"&&(()=>{const y=(s?document.getElementById(s):null)??document.body;return ki.createPortal(r.jsx(Mm,{prefix:a,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>w(!1)}),y)})()]})},Nm=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
9791
9791
  import { createPortal } from 'react-dom';
9792
9792
  import { CommonComponentProps } from '../props';
9793
9793
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -10348,7 +10348,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10348
10348
  </>
10349
10349
  );
10350
10350
  };
10351
- `,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),qn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Om(e){const t={};return t[ut(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSettings")]={...qn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[ut(e,"fontSize")]={...qn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[ut(e,"lineHeight")]={...qn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[ut(e,"letterSpacing")]={...qn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[ut(e,"wordSpacing")]={...qn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[ut(e,"textAlign")]={...qn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[ut(e,"textAppearance")]={...qn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=Ki.reduce((e,t)=>({...e,...Om(t)}),{}),jm=Ki.reduce((e,t)=>({...e,[ut(t,"fontFamily")]:"Arial",[ut(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[ut(t,"letterSpacing")]:0,[ut(t,"wordSpacing")]:0,[ut(t,"textAlign")]:"left",[ut(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return Ki.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[ut(n,"fontSize")]=i),o!==void 0&&(t[ut(n,"lineHeight")]=o),t},{})}const zm=_m(),Vm={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/LightboxJournal_1.jpg",coverFit:{display:"cover",ratioValue:"16:9",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"Fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},title1:"Ethan Parker",title2:"Midnight Atlas",title3:"Portland, OR"},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ki.map(e=>({path:`styles.${ut(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Oo=qr,hr=`${qr}-`,Bo=e=>`${qr}-${e}`,Kr=e=>e===Oo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(Bo(e)));if(i)return i}const n=qa(t.get(Oo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(Bo(t),String(e)):i.searchParams.set(Oo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Bo(e)||i===Oo:Kr(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Bo(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,vi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+vi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+vi(s).length,1),i=vi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},yo=(e,t)=>t==="B"?e.flatMap((n,i)=>vi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:vi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ii=.004,io=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},oo=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},Co=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>Co(e,t),Kn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},ro=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Co(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Ui=["title1","title2","title3","count"],pt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[pt(e,"fontFamily"),pt(e,"fontSettings"),{type:"row",items:[pt(e,"fontSize"),pt(e,"lineHeight"),pt(e,"letterSpacing"),pt(e,"wordSpacing")]},pt(e,"textAlign"),pt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ui.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},ao=(e,t)=>{const n=i=>{const o=pt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[rg[t]]}},so=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return _t(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:f,maxHeight:E,textTransition:$,title1Width:C,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:T,closeIconMaxWidth:_,closeIconColor:H,closeIconHoverColor:K,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(P=>L.scalingValue(P,i??!1),[i]),X=k(m??0),q=`${f}%`,O=`${E}%`,Y=k(g),te=k(se),oe=k(j),F=so("title1",ao(n,"title1"),i),ae=so("title2",ao(n,"title2"),i),h=so("title3",ao(n,"title3"),i),ie=so("count",ao(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>yo(t,w),[t,w]),[le,U]=c.useState(a),B=Z[le],N=B==null?void 0:B.entry,[me,we]=c.useState(!1),[Oe,_e]=c.useState(null),[Se,Fe]=c.useState(!1),[z,de]=c.useState(null),[A,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,be]=c.useState(),[De,Pe]=c.useState(),[Re,qe]=c.useState(null),ce=c.useRef(null),ke=c.useRef(0),ze=c.useRef(0),Te=c.useRef(0),rt=c.useRef(!1),nt=c.useRef(null),vt=c.useRef(null),Ue=c.useRef(null),at=c.useRef(null),Rt=c.useRef(null),It=c.useRef(null),bt=c.useRef(null),ve=c.useCallback(()=>{const P=vt.current;if(!P)return;const re=P.closest(`.${e}-lightbox-content-area`);if(!re)return P.getBoundingClientRect().width;const Le=Array.from(re.children).reduce((Ce,Ie)=>!(Ie instanceof HTMLElement)||Ie.contains(P)?Ce:Ce+Ie.getBoundingClientRect().width,0);return re.getBoundingClientRect().width-Le},[e]),Be=c.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null)},[]),Ze=c.useCallback(P=>{P===ke.current&&(de(null),J(!1))},[]),Ke=c.useCallback(()=>{o||rt.current||(rt.current=!0,p==null||p(),we(!1),nt.current=setTimeout(()=>{u()},300))},[o,p,u]),Wt=c.useCallback(P=>!!(P.closest("[data-controls]")||P.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Ft,mediaAreaStyle:zt,overlayContentStyle:cn,swipeHandlers:He,dismissAreaStyle:Lt}=js({enabled:We,onClose:Ke,animMs:300,isBlockedTarget:Wt}),st=c.useCallback(P=>{d&&Ds(P+1,l,!0)},[d,l]),Qe=c.useCallback(P=>{if(P)return P.getBoundingClientRect().height},[]),gt=c.useCallback(P=>{if(Z.length===0)return;const re=(P%Z.length+Z.length)%Z.length;if(re===le)return;const Le=Z[le],Ce=Z[re];ke.current+=1;const Ie=ke.current,dt=$==="fade"&&Ga(Le==null?void 0:Le.entry)!==Ga(Ce==null?void 0:Ce.entry),Tt=Qe(Ue.current),ot=dt?(()=>{const Xt=ve();Ni.flushSync(()=>{qe(Ce.entry)}),Ue.current&&Xt&&(Ue.current.style.width=`${Xt}px`);const Gi=Qe(Ue.current);return Ue.current&&(Ue.current.style.width=""),{measuredIncomingTitlesHeight:Gi,incomingTitlesMeasureWidth:Xt}})():void 0,qt=Math.max(Tt??0,(ot==null?void 0:ot.measuredIncomingTitlesHeight)??0)||void 0;ee(Ie),de(le),J(!0),U(re),st(re),Te.current=re,dt?(Be(),qt&&be(qt),ot!=null&&ot.incomingTitlesMeasureWidth&&Pe(ot.incomingTitlesMeasureWidth),_e((Le==null?void 0:Le.entryIndex)??null),Fe(!0),ze.current=Ce.entryIndex,ce.current=setTimeout(()=>{_e(null),Fe(!1),be(void 0),Pe(void 0),qe(null),ce.current=null},400)):(Be(),_e(null),Fe(!1),be(void 0),Pe(void 0),qe(null),ze.current=Ce.entryIndex)},[le,Be,ve,Qe,Z,st,$]),Vt=c.useCallback(()=>{bt.current=null},[]),Ut=c.useCallback(P=>{!fe||Z.length<=1||P.pointerType==="mouse"&&P.button!==0||P.target.closest("[data-controls]")||(bt.current={startX:P.clientX,startY:P.clientY,pointerId:P.pointerId})},[fe,Z.length]),tn=c.useCallback(P=>{var Xt;if(!fe||Z.length<=1||P.pointerType==="mouse"&&P.button!==0)return;if(Ht){Vt();return}const re=bt.current;if(!re||re.pointerId!==P.pointerId||(Vt(),P.target.closest("[data-controls]")))return;const Ce=P.clientX-re.startX,Ie=P.clientY-re.startY,dt=Math.abs(Ce),Tt=Math.abs(Ie);if(dt>=qm&&dt>Tt){gt(Ce>0?le-1:le+1);return}if(dt>Da||Tt>Da)return;const ot=(Xt=at.current)==null?void 0:Xt.getBoundingClientRect(),qt=ot?ot.left+ot.width/2:window.innerWidth/2;gt(P.clientX<qt?le-1:le+1)},[le,fe,gt,Ht,Vt,Z.length]),mn=c.useCallback(P=>{const re=bt.current;(re==null?void 0:re.pointerId)===P.pointerId&&Vt()},[Vt]);zs(),c.useEffect(()=>{It.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const P=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{Rt.current?Rt.current.focus():at.current&&at.current.focus()})});return()=>{cancelAnimationFrame(P),nt.current&&clearTimeout(nt.current),ce.current&&clearTimeout(ce.current);const re=It.current;re&&document.contains(re)&&re.focus()}},[]),c.useEffect(()=>{var P;$!=="fade"&&(ze.current=((P=Z[le])==null?void 0:P.entryIndex)??0,Be(),_e(null),Fe(!1),be(void 0),Pe(void 0))},[le,Be,Z,$]),c.useEffect(()=>{const P=re=>{if(re.key==="Escape"){Ke();return}if(re.key==="ArrowLeft"&&Z.length>1){gt(le-1);return}if(re.key==="ArrowRight"&&Z.length>1){gt(le+1);return}if(re.key==="Tab"&&at.current){const Le=at.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),Ce=Array.from(Le).filter(ot=>!ot.closest('[aria-hidden="true"]'));if(Ce.length===0)return;const Ie=Ce[0],dt=Ce[Ce.length-1],Tt=document.activeElement;re.shiftKey?(Tt===Ie||!at.current.contains(Tt))&&(re.preventDefault(),dt.focus()):(Tt===dt||!at.current.contains(Tt))&&(re.preventDefault(),Ie.focus())}};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[gt,Ke,le,Z.length]),c.useLayoutEffect(()=>{Be(),ke.current=0,ee(0),de(null),J(!1),_e(null),Fe(!1),be(void 0),Pe(void 0),qe(null),U(P=>{const re=Math.max(0,Z.length-1);return Math.min(P,re)})},[Be,t.length,w,Z.length]),c.useLayoutEffect(()=>{var Le;const P=Math.max(0,Z.length-1),re=Math.min(Math.max(0,a),P);Te.current=re,ze.current=((Le=Z[re])==null?void 0:Le.entryIndex)??0,U(re)},[a]);const Ge=Oe!==null?t[Oe]:null,nn=z!==null?Z[z]:null,Ot=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Ge==null?void 0:Ge.title1)||(Ge==null?void 0:Ge.title2)||(Ge==null?void 0:Ge.title3),Ne=Qm(w,Z,t),ft=T!==null,At=Ot||Ne||ft,ne=Ne&&ft?{gap:Y}:void 0,xe=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Ae=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,Ve=k(R),Ye=c.useMemo(()=>({title1Width:C??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[C,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),$e=c.useMemo(()=>N?oo(e,N,F,ae,h):[],[e,N,F,ae,h]),Et=c.useMemo(()=>$e.map(P=>Ye[P.widthKey]),[$e,Ye]),ht=c.useMemo(()=>Co($e.length,Et),[$e.length,Et]),yt=c.useMemo(()=>fr($e.length,Et),[$e.length,Et]),lt=c.useMemo(()=>$e.filter(P=>P.prefix==="title1"),[$e]),Me=c.useMemo(()=>$e.filter(P=>P.prefix==="title2"||P.prefix==="title3"),[$e]),xt=c.useMemo(()=>ro(lt,Ye),[lt,Ye]),ct=c.useMemo(()=>ro(Me,Ye),[Me,Ye]),$t=c.useCallback((P,re)=>{const Le=$e.findIndex(Ie=>Ie.prefix===P.prefix);if(!he||re==="single-row")return{effectiveWidth:yt[Le]??0,resolvedWidth:ht[Le]??0,maxWidth:Kn(Le,ht)};if(re==="two-row-top"){const Ie=lt.findIndex(dt=>dt.prefix===P.prefix);return{effectiveWidth:xt.effective[Ie]??0,resolvedWidth:xt.resolved[Ie]??0,maxWidth:Kn(Ie,xt.resolved)}}const Ce=Me.findIndex(Ie=>Ie.prefix===P.prefix);return{effectiveWidth:ct.effective[Ce]??0,resolvedWidth:ct.resolved[Ce]??0,maxWidth:Kn(Ce,ct.resolved)}},[$e,Me,ct,yt,ht,lt,xt,he]),kt=c.useCallback(P=>tg($e,ht,et,P)+(he?0:I??0),[$e,ht,et,he,I]),St=c.useCallback(()=>he?0:I??0,[he,I]),Nt=c.useCallback(P=>Me.slice(0,P).reduce((re,Le,Ce)=>re+(Le.marginLeftKey?et[Le.marginLeftKey]??0:0)+(ct.resolved[Ce]??0),0),[Me,ct.resolved,et]),it=c.useCallback(P=>{const re=Me[P];return Nt(P)+(re.marginLeftKey?et[re.marginLeftKey]??0:0)+(ct.resolved[P]??0)},[Me,ct.resolved,Nt,et]),Bt=c.useCallback((P,re,Le)=>{if(!he||Le==="single-row"){const ot=P.findIndex(jn=>jn.prefix===re.prefix),qt=P.map(jn=>Ye[jn.widthKey]),Xt=Co(P.length,qt);return{effectiveWidth:fr(P.length,qt)[ot]??0,resolvedWidth:Xt[ot]??0,maxWidth:Kn(ot,Xt)}}if(Le==="two-row-top"){const ot=P.filter(jn=>jn.prefix==="title1"),qt=ot.findIndex(jn=>jn.prefix===re.prefix),{resolved:Xt,effective:Gi}=ro(ot,Ye);return{effectiveWidth:Gi[qt]??0,resolvedWidth:Xt[qt]??0,maxWidth:Kn(qt,Xt)}}const Ce=P.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),Ie=Ce.findIndex(ot=>ot.prefix===re.prefix),{resolved:dt,effective:Tt}=ro(Ce,Ye);return{effectiveWidth:Tt[Ie]??0,resolvedWidth:dt[Ie]??0,maxWidth:Kn(Ie,dt)}},[Ye,he]),Gt=(P,re,Le)=>{const Ce=P.marginLeftKey?et[P.marginLeftKey]??0:0,{effectiveWidth:Ie,resolvedWidth:dt,maxWidth:Tt}=Le??$t(P,re),ot=Math.max(Ce,io),qt=o&&re==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":P.prefix,style:{width:k(Ie),...Ce>0?{marginLeft:k(Ce)}:{}},children:[r.jsx("p",{className:P.className,style:P.style,children:P.text}),qt&&P.marginLeftKey?r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:k(-Ce),width:k(ot),height:"100%",pointerEvents:"auto"}}):null,qt?r.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Tt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ii/2),width:k(ii),height:"100%",pointerEvents:"auto"}}):null]},P.className)},Ln=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Bn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:ie,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,le,w,t)}),o&&ft&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),En=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:L.scalingValue(_??0,i),height:L.scalingValue(_??0,i),marginRight:oe,"--close-icon-hover-color":K},children:[r.jsx("button",{ref:Rt,type:"button",className:`${e}-close-icon-inner`,onClick:Ke,"aria-label":"Close",children:r.jsx(sn,{url:T??"",fill:H,hoverFill:i&&!s?H:K,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:oe,height:"100%",pointerEvents:"auto"}})]}),Zn=()=>!Ne&&!ft?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:ne,children:[Ne?Bn():null,ft?En():null]}),Qn=P=>{if(!P)return null;const re=oo(e,P,F,ae,h);return r.jsxs(r.Fragment,{children:[I>0||o?Ln():null,re.map(Le=>Gt(Le,"single-row",Bt(re,Le,"single-row")))]})},on=P=>{if(!P)return null;const re=oo(e,P,F,ae,h),Le=re.find(Ce=>Ce.prefix==="title1");return!Le&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Ln():null,Le?Gt(Le,"two-row-top",Bt(re,Le,"two-row-top")):null]})},$i=(P,re=!1)=>{const Le=P?oo(e,P,F,ae,h):[],Ce=Le.filter(Tt=>Tt.prefix==="title2"||Tt.prefix==="title3"),Ie=o&&re;return Ce.length>0||Ie||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[Ce.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[Ce.map(Tt=>Gt(Tt,"two-row-bottom",Bt(Le,Tt,"two-row-bottom"))),re&&o?r.jsxs(r.Fragment,{children:[Q(),pe()]}):null]}):null,(R??0)>0||Ie?r.jsx("div",{"data-controls":Ie?"titleRowMarginBottom":void 0,"data-controls-axis":Ie?"y":void 0,"data-controls-reverse":Ie?"":void 0,className:Ie?`${e}-control`:void 0,style:{height:Ve,width:"100%",flexShrink:0,pointerEvents:Ie?"auto":"none"}}):null]}):null},ei=(P,re=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[on(P),Zn()]}),$i(P,re)]}),Pn=P=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:ei(P)}):P?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Qn(P)}):null,y=()=>{const P=he?-1:$e.findIndex(Ce=>Ce.prefix==="title1"),re=!he&&(o||(I??0)>0)?(()=>{const Ie=Math.max(I??0,io),dt=P>=0?ht[P]:C;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:0,width:k(Ie),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Le=$e.flatMap((Ce,Ie)=>{if(!Ce.marginLeftKey)return[];const dt=et[Ce.marginLeftKey]??0,Tt=eg($e,ht,et,Ie)+St(),ot=Math.max(dt,io);return r.jsx("div",{"data-controls":Ce.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ht[Ie]),style:{position:"absolute",top:0,left:k(Tt),width:k(ot),height:"100%",pointerEvents:"auto"}},Ce.marginLeftKey)});return re?[re,...Le]:Le},G=()=>$e.map((P,re)=>{const Le=Kn(re,ht),Ie=kt(re)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(Ie),width:k(ii),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),Q=()=>Me.flatMap((P,re)=>{if(!P.marginLeftKey)return[];const Le=et[P.marginLeftKey]??0,Ce=Nt(re),Ie=Math.max(Le,io),{resolvedWidth:dt}=$t(P,"two-row-bottom");return r.jsx("div",{"data-controls":P.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(dt),style:{position:"absolute",top:0,left:k(Ce),width:k(Ie),height:"100%",pointerEvents:"auto"}},P.marginLeftKey)}),pe=()=>Me.map((P,re)=>{const{maxWidth:Le}=$t(P,"two-row-bottom"),Ie=it(re)-ii/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":P.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Le),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(Ie),width:k(ii),height:"100%",pointerEvents:"auto"}})},`${P.widthKey}-junction`)}),ye=()=>!o||he?null:r.jsxs(r.Fragment,{children:[y(),G()]}),tt=P=>{const re=!P.objectFit&&$n(x);return{className:`${e}-slide-image-cell${re?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...re?{"--image-aspect-ratio":Ho(x)}:{}}}},Ct=P=>P.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":P.objectFit}}:$n(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},Dt=P=>{if(P.length===0)return null;const re=P.length>1,Le=ir(X),Ce=`calc(-0.5 * (${Le} + ${X}))`;if(P.length===1){const Ie=P[0];return r.jsx("div",{...tt(Ie),children:r.jsx("img",{...Ct(Ie),src:Ie.url,alt:Ie.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:re?{gap:X}:void 0,children:P.map((Ie,dt)=>r.jsxs("div",{...tt(Ie),children:[r.jsx("img",{...Ct(Ie),src:Ie.url,alt:Ie.name??"",draggable:!1}),o&&re&&dt<P.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Ce,width:Le,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ie.url}-${dt}`))})},gn=!!(N!=null&&N.title2||N!=null&&N.title3||Ge!=null&&Ge.title2||Ge!=null&&Ge.title3||(R??0)>0||o),hn=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:Ue,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:ei(Re||N)}),r.jsxs("div",{ref:vt,className:`${e}-titles-row-two-row`,style:{...Se&&ge?{minHeight:ge}:void 0,...Se&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:xe,style:{position:"relative",flex:1,minWidth:0},children:[Ge&&Se?r.jsx("div",{className:`${Ae} ${e}-titles-fade-out`,children:on(Ge)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:on(N)})]}),Zn()]}),gn?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ge&&Se?r.jsx("div",{className:`${Ae} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:$i(Ge)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:$i(N,!0)})]}):null]})]}),fn=()=>{const P=gn;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...P?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:P?void 0:{flex:"0 0 auto",height:"auto"},children:ei(N,!0)}),ye()]})};return r.jsxs("div",{ref:at,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||Ke()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ft?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Ft}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Lt},...He,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:zt,onClick:P=>P.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?Ut:void 0,onPointerUp:fe?tn:void 0,onPointerCancel:fe?mn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[nn&&A?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:P=>{P.target===P.currentTarget&&Ze(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:Dt(nn.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${A?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?Dt(B.images):null})},`slide-in-${D}-${le}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...cn},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:te,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?At:Ot)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?hn():fn():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:Ue,className:xe,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Pn(Re||N)}),r.jsxs("div",{ref:vt,className:xe,style:{width:"100%",...Se&&ge?{minHeight:ge}:void 0,...Se&&De?{width:De,maxWidth:"100%"}:void 0},children:[Ge&&Se?r.jsx("div",{className:`${Ae} ${e}-titles-fade-out`,children:Pn(Ge)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Se?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Pn(N)}),ye()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[Pn(N),ye()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:ne,children:[Ne&&Bn(),ft&&En()]})]})})]})]})]})};function lg(e){return`
10351
+ `,Hm="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Dn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function Om(e){const t={};return t[mt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSettings")]={...Dn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[mt(e,"fontSize")]={...Dn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[mt(e,"lineHeight")]={...Dn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[mt(e,"letterSpacing")]={...Dn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[mt(e,"wordSpacing")]={...Dn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[mt(e,"textAlign")]={...Dn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[mt(e,"textAppearance")]={...Dn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Bm=zi.reduce((e,t)=>({...e,...Om(t)}),{}),jm=zi.reduce((e,t)=>({...e,[mt(t,"fontFamily")]:"Arial",[mt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[mt(t,"letterSpacing")]:0,[mt(t,"wordSpacing")]:0,[mt(t,"textAlign")]:"left",[mt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Va(e){return zi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[mt(n,"fontSize")]=i),o!==void 0&&(t[mt(n,"lineHeight")]=o),t},{})}const zm=Am(),Vm={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailGap:{type:"number",scope:"layout",title:"Thumbnail Gap",min:0,display:{type:"range-control"}},thumbnailMarginBottom:{type:"number",scope:"layout",title:"Thumbnail Margin Bottom",min:0,display:{type:"range-control"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"layout",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},thumbnailVisibility:{type:"boolean",scope:"layout",title:"Visibility",display:{type:"toggle-cycle",enum:["on","off"]}},thumbnailObjectFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},thumbnailTrigger:{type:"string",scope:"common",title:"Trigger",display:{type:"toggle-cycle",enum:["click","hover"]}},thumbnailActive:{type:"boolean",scope:"common",title:"Active",display:{type:"toggle-cycle",enum:["outline","color","scale-up"]}},thumbnailActiveColor:{type:"string",scope:"common",title:"Outline Active",display:{type:"palette-color-picker",visible:!1}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},...Bm,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},iconMarginLeft:{type:"number",scope:"layout",title:"Icon margin left",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_strip_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Hm,closeIconColor:"#ffffff",closeIconHoverColor:"#cccccc",thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",thumbnailActiveColor:"#ffffff",title1Color:"#ffffff",title2Color:"#ffffff",title3Color:"#ffffff",...jm},layoutDefaults:{m:{thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.08,iconMarginLeft:.02,...Va({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04})},d:{thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,title1Width:.3,title2Width:.13,title3Width:.14,title1MarginLeft:.02,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,backgroundColor:"rgba(28, 31, 34, 0.9)",contentMarginTop:.02,iconMarginLeft:.02,...Va({title1FontSize:.015,title1LineHeight:.02,title2FontSize:.015,title2LineHeight:.02,title3FontSize:.015,title3LineHeight:.02})}},displayRules:[{if:{name:"thumbnailActive",value:"outline"},then:{name:"properties.thumbnailActiveColor.display.visible",value:!0}}],layout:["__componentName__","thumbnailGap","thumbnailMarginBottom","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","contentMarginTop","title1MarginLeft","iconMarginLeft"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",title:"Thumbnails",items:["thumbnailVisibility","thumbnailObjectFit"]},{type:"row",items:["thumbnailTrigger","thumbnailActive"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[zm]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0,stripFieldsOnAdd:["title1","title2","title3","text"]},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",supportsMainImage:!0}},title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_2.jpg",name:"",objectFit:"contain"},title1:"Giovanni Andrea Vavassore",title2:"ESEMPLA",title3:"Venice, 1500"},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_3.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_4.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_5.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_6.jpg",name:"",objectFit:"contain"}},{image:{url:"https://cdn.cntrl.site/component-assets/lightbox_strip_7.jpg",name:"",objectFit:"contain"}}]}},Dm={element:Fm,id:"lightbox-strip",name:"Lightbox Strip",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Vm,sourceCode:Nm,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:zi.map(e=>({path:`styles.${mt(e,"fontSettings")}`}))}},qm=50,Da=10,qr="cntrl-lightbox-journal",Fo=qr,hr=`${qr}-`,No=e=>`${qr}-${e}`,Kr=e=>e===Fo||e.startsWith(hr),qa=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Ka=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=qa(t.get(No(e)));if(i)return i}const n=qa(t.get(Fo));if(n)return n;for(const[i]of t){if(!i.startsWith(hr))continue;const o=i.slice(hr.length);if(!/^\d+$/.test(o))continue;const s=Number.parseInt(o,10);if(Number.isFinite(s)&&s>=1)return s}return null},Ua=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},Ds=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(a=>{Kr(a)&&i.searchParams.delete(a)}),t?i.searchParams.set(No(t),String(e)):i.searchParams.set(Fo,String(e));const o=n?"replaceState":"pushState",s=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",s)},Km=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===No(e)||i===Fo:Kr(i));if(n.forEach(i=>t.searchParams.delete(i)),n.length>0){const i=`${t.pathname}${t.search}${t.hash}`;window.history.replaceState(window.history.state,"",i)}},qs=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(No(e)):[...t.keys()].some(n=>Kr(n))},Um=(e,t)=>{if(qs(t)){if(e){window.history.back();return}Km(t)}},Gm=20,Xm=2,ir=e=>`max(${e}, ${Gm}px)`,hi=e=>((e==null?void 0:e.image)??[]).slice(0,Xm),Ks=e=>e.reduce((t,n)=>t+hi(n).length,0),Ym=(e,t)=>{const n=e.slice(0,t).reduce((o,s)=>o+hi(s).length,1),i=hi(e[t]).length;return{start:n,end:n+i-1}},Jm=(e,t)=>{const n=Ks(e),{start:i,end:o}=Ym(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},go=(e,t)=>t==="B"?e.flatMap((n,i)=>hi(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:hi(n)})),Zm=(e,t,n,i)=>{var s;if(n==="B")return`${t+1} / ${e.length}`;const o=((s=e[t])==null?void 0:s.entryIndex)??0;return Jm(i,o)},Ga=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",Qm=(e,t,n)=>e==="B"?t.length>1:Ks(n)>1,ei=.004,eo=.004,or={title1Width:.13,title2Width:.13,title3Width:.14},to=(e,t,n,i,o)=>{const s=[];return t.title1&&s.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&s.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&s.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),s},wo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((s,a)=>s+a,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:s,widths:a},d)=>{if(s<=0||d<=0)return{overflow:s,widths:[d,...a]};const l=Math.min(s,d);return{overflow:s-l,widths:[d-l,...a]}},{overflow:i-1,widths:[]});return o},fr=(e,t)=>wo(e,t),qn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},no=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:wo(e.length,n),effective:fr(e.length,n)}},eg=(e,t,n,i)=>e.slice(0,i).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),tg=(e,t,n,i)=>e.slice(0,i+1).reduce((o,s,a)=>o+(s!=null&&s.marginLeftKey?n[s.marginLeftKey]??0:0)+(t[a]??0),0),Vi=["title1","title2","title3","count"],gt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,ng={title1:"1",title2:"2",title3:"3",count:"Count"},ig=e=>[gt(e,"fontFamily"),gt(e,"fontSettings"),{type:"row",items:[gt(e,"fontSize"),gt(e,"lineHeight"),gt(e,"letterSpacing"),gt(e,"wordSpacing")]},gt(e,"textAlign"),gt(e,"textAppearance")],og=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Vi.map(e=>[ng[e],ig(e)]))}),rg={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},ag={title1:.02,title2:.02,title3:.02,count:.017},io=(e,t)=>{const n=i=>{const o=gt(t,i);return e[o]};return{fontFamily:n("fontFamily")??"Arial",fontSettings:n("fontSettings")??{fontWeight:400,fontStyle:"normal"},fontSize:n("fontSize"),lineHeight:n("lineHeight"),letterSpacing:n("letterSpacing")??0,wordSpacing:n("wordSpacing")??0,textAlign:n("textAlign")??"left",textAppearance:n("textAppearance"),color:e[rg[t]]}},oo=(e,t,n)=>{var o,s;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((s=t.fontSettings)==null?void 0:s.fontStyle)??"normal"},fontSize:t.fontSize??ag[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return kt(i,n)},sg=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:s,initialSlideIndex:a=0,enableUrlSync:d=!1,journalItemId:l=null,onBeforeClose:p,onClose:u})=>{const{type:w,coverFit:x,backgroundColor:v,imageGap:m,maxWidth:y,maxHeight:P,textTransition:$,title1Width:T,title2Width:S,title3Width:M,title1MarginLeft:I=0,title2MarginLeft:W=0,title3MarginLeft:b=0,titleRowMarginBottom:R=0,titleHeaderLayout:V="single-row",countCloseGap:g=0,closeIcon:L,closeIconMaxWidth:A,closeIconColor:H,closeIconHoverColor:U,contentMarginTop:se=0,iconMarginRight:j=0}=n,k=c.useCallback(C=>E.scalingValue(C,i??!1),[i]),X=k(m??0),q=`${y}%`,O=`${P}%`,Y=k(g),ie=k(se),re=k(j),F=oo("title1",io(n,"title1"),i),ae=oo("title2",io(n,"title2"),i),f=oo("title3",io(n,"title3"),i),oe=oo("count",io(n,"count"),i),he=V==="mobile",fe=!i||!!s,We=!o&&(!i||!!s),Z=c.useMemo(()=>go(t,w),[t,w]),[ce,G]=c.useState(a),B=Z[ce],N=B==null?void 0:B.entry,[me,Ce]=c.useState(!1),[Be,_e]=c.useState(null),[Te,Ne]=c.useState(!1),[z,ue]=c.useState(null),[_,J]=c.useState(!1),[D,ee]=c.useState(0),[ge,we]=c.useState(),[De,Ie]=c.useState(),[Ae,Ke]=c.useState(null),de=c.useRef(null),ke=c.useRef(0),Ve=c.useRef(0),Le=c.useRef(0),at=c.useRef(!1),tt=c.useRef(null),xt=c.useRef(null),qe=c.useRef(null),pt=c.useRef(null),Et=c.useRef(null),_t=c.useRef(null),At=c.useRef(null),ve=c.useCallback(()=>{const C=xt.current;if(!C)return;const ne=C.closest(`.${e}-lightbox-content-area`);if(!ne)return C.getBoundingClientRect().width;const $e=Array.from(ne.children).reduce((be,xe)=>!(xe instanceof HTMLElement)||xe.contains(C)?be:be+xe.getBoundingClientRect().width,0);return ne.getBoundingClientRect().width-$e},[e]),He=c.useCallback(()=>{de.current&&(clearTimeout(de.current),de.current=null)},[]),Ue=c.useCallback(C=>{C===ke.current&&(ue(null),J(!1))},[]),nt=c.useCallback(()=>{o||at.current||(at.current=!0,p==null||p(),Ce(!1),tt.current=setTimeout(()=>{u()},300))},[o,p,u]),vt=c.useCallback(C=>!!(C.closest("[data-controls]")||C.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:Ht,backdropStyle:Mt,mediaAreaStyle:qt,overlayContentStyle:on,swipeHandlers:Oe,dismissAreaStyle:Tt}=js({enabled:We,onClose:nt,animMs:300,isBlockedTarget:vt}),bt=c.useCallback(C=>{d&&Ds(C+1,l,!0)},[d,l]),it=c.useCallback(C=>{if(C)return C.getBoundingClientRect().height},[]),ft=c.useCallback(C=>{if(Z.length===0)return;const ne=(C%Z.length+Z.length)%Z.length;if(ne===ce)return;const $e=Z[ce],be=Z[ne];ke.current+=1;const xe=ke.current,lt=$==="fade"&&Ga($e==null?void 0:$e.entry)!==Ga(be==null?void 0:be.entry),ut=it(qe.current),Ye=lt?(()=>{const Kt=ve();ki.flushSync(()=>{Ke(be.entry)}),qe.current&&Kt&&(qe.current.style.width=`${Kt}px`);const qi=it(qe.current);return qe.current&&(qe.current.style.width=""),{measuredIncomingTitlesHeight:qi,incomingTitlesMeasureWidth:Kt}})():void 0,Vt=Math.max(ut??0,(Ye==null?void 0:Ye.measuredIncomingTitlesHeight)??0)||void 0;ee(xe),ue(ce),J(!0),G(ne),bt(ne),Le.current=ne,lt?(He(),Vt&&we(Vt),Ye!=null&&Ye.incomingTitlesMeasureWidth&&Ie(Ye.incomingTitlesMeasureWidth),_e(($e==null?void 0:$e.entryIndex)??null),Ne(!0),Ve.current=be.entryIndex,de.current=setTimeout(()=>{_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),de.current=null},400)):(He(),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),Ve.current=be.entryIndex)},[ce,He,ve,it,Z,bt,$]),Ot=c.useCallback(()=>{At.current=null},[]),un=c.useCallback(C=>{!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0||C.target.closest("[data-controls]")||(At.current={startX:C.clientX,startY:C.clientY,pointerId:C.pointerId})},[fe,Z.length]),Ft=c.useCallback(C=>{var Kt;if(!fe||Z.length<=1||C.pointerType==="mouse"&&C.button!==0)return;if(Ht){Ot();return}const ne=At.current;if(!ne||ne.pointerId!==C.pointerId||(Ot(),C.target.closest("[data-controls]")))return;const be=C.clientX-ne.startX,xe=C.clientY-ne.startY,lt=Math.abs(be),ut=Math.abs(xe);if(lt>=qm&&lt>ut){ft(be>0?ce-1:ce+1);return}if(lt>Da||ut>Da)return;const Ye=(Kt=pt.current)==null?void 0:Kt.getBoundingClientRect(),Vt=Ye?Ye.left+Ye.width/2:window.innerWidth/2;ft(C.clientX<Vt?ce-1:ce+1)},[ce,fe,ft,Ht,Ot,Z.length]),wn=c.useCallback(C=>{const ne=At.current;(ne==null?void 0:ne.pointerId)===C.pointerId&&Ot()},[Ot]);zs(),c.useEffect(()=>{_t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const C=requestAnimationFrame(()=>{Ce(!0),requestAnimationFrame(()=>{Et.current?Et.current.focus():pt.current&&pt.current.focus()})});return()=>{cancelAnimationFrame(C),tt.current&&clearTimeout(tt.current),de.current&&clearTimeout(de.current);const ne=_t.current;ne&&document.contains(ne)&&ne.focus()}},[]),c.useEffect(()=>{var C;$!=="fade"&&(Ve.current=((C=Z[ce])==null?void 0:C.entryIndex)??0,He(),_e(null),Ne(!1),we(void 0),Ie(void 0))},[ce,He,Z,$]),c.useEffect(()=>{const C=ne=>{if(ne.key==="Escape"){nt();return}if(ne.key==="ArrowLeft"&&Z.length>1){ft(ce-1);return}if(ne.key==="ArrowRight"&&Z.length>1){ft(ce+1);return}if(ne.key==="Tab"&&pt.current){const $e=pt.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),be=Array.from($e).filter(Ye=>!Ye.closest('[aria-hidden="true"]'));if(be.length===0)return;const xe=be[0],lt=be[be.length-1],ut=document.activeElement;ne.shiftKey?(ut===xe||!pt.current.contains(ut))&&(ne.preventDefault(),lt.focus()):(ut===lt||!pt.current.contains(ut))&&(ne.preventDefault(),xe.focus())}};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[ft,nt,ce,Z.length]),c.useLayoutEffect(()=>{He(),ke.current=0,ee(0),ue(null),J(!1),_e(null),Ne(!1),we(void 0),Ie(void 0),Ke(null),G(C=>{const ne=Math.max(0,Z.length-1);return Math.min(C,ne)})},[He,t.length,w,Z.length]),c.useLayoutEffect(()=>{var $e;const C=Math.max(0,Z.length-1),ne=Math.min(Math.max(0,a),C);Le.current=ne,Ve.current=(($e=Z[ne])==null?void 0:$e.entryIndex)??0,G(ne)},[a]);const Qe=Be!==null?t[Be]:null,Bt=z!==null?Z[z]:null,rn=(N==null?void 0:N.title1)||(N==null?void 0:N.title2)||(N==null?void 0:N.title3)||(Qe==null?void 0:Qe.title1)||(Qe==null?void 0:Qe.title2)||(Qe==null?void 0:Qe.title3),Me=Qm(w,Z,t),ct=L!==null,Rt=rn||Me||ct,te=Me&&ct?{gap:Y}:void 0,Se=`${e}-titles-stack${he?` ${e}-titles-stack-stacked`:""}`,Re=`${e}-titles-layer-out${he?` ${e}-titles-layer-out-stacked`:""}`,je=k(R),Xe=c.useMemo(()=>({title1Width:T??or.title1Width,title2Width:S??or.title2Width,title3Width:M??or.title3Width}),[T,S,M]),et=c.useMemo(()=>({title2MarginLeft:W,title3MarginLeft:b}),[W,b]),Ee=c.useMemo(()=>N?to(e,N,F,ae,f):[],[e,N,F,ae,f]),Lt=c.useMemo(()=>Ee.map(C=>Xe[C.widthKey]),[Ee,Xe]),yt=c.useMemo(()=>wo(Ee.length,Lt),[Ee.length,Lt]),St=c.useMemo(()=>fr(Ee.length,Lt),[Ee.length,Lt]),$t=c.useMemo(()=>Ee.filter(C=>C.prefix==="title1"),[Ee]),Fe=c.useMemo(()=>Ee.filter(C=>C.prefix==="title2"||C.prefix==="title3"),[Ee]),ot=c.useMemo(()=>no($t,Xe),[$t,Xe]),dt=c.useMemo(()=>no(Fe,Xe),[Fe,Xe]),Ct=c.useCallback((C,ne)=>{const $e=Ee.findIndex(xe=>xe.prefix===C.prefix);if(!he||ne==="single-row")return{effectiveWidth:St[$e]??0,resolvedWidth:yt[$e]??0,maxWidth:qn($e,yt)};if(ne==="two-row-top"){const xe=$t.findIndex(lt=>lt.prefix===C.prefix);return{effectiveWidth:ot.effective[xe]??0,resolvedWidth:ot.resolved[xe]??0,maxWidth:qn(xe,ot.resolved)}}const be=Fe.findIndex(xe=>xe.prefix===C.prefix);return{effectiveWidth:dt.effective[be]??0,resolvedWidth:dt.resolved[be]??0,maxWidth:qn(be,dt.resolved)}},[Ee,Fe,dt,St,yt,$t,ot,he]),an=c.useCallback(C=>tg(Ee,yt,et,C)+(he?0:I??0),[Ee,yt,et,he,I]),st=c.useCallback(()=>he?0:I??0,[he,I]),Zt=c.useCallback(C=>Fe.slice(0,C).reduce((ne,$e,be)=>ne+($e.marginLeftKey?et[$e.marginLeftKey]??0:0)+(dt.resolved[be]??0),0),[Fe,dt.resolved,et]),Ze=c.useCallback(C=>{const ne=Fe[C];return Zt(C)+(ne.marginLeftKey?et[ne.marginLeftKey]??0:0)+(dt.resolved[C]??0)},[Fe,dt.resolved,Zt,et]),Nt=c.useCallback((C,ne,$e)=>{if(!he||$e==="single-row"){const Ye=C.findIndex(Bn=>Bn.prefix===ne.prefix),Vt=C.map(Bn=>Xe[Bn.widthKey]),Kt=wo(C.length,Vt);return{effectiveWidth:fr(C.length,Vt)[Ye]??0,resolvedWidth:Kt[Ye]??0,maxWidth:qn(Ye,Kt)}}if($e==="two-row-top"){const Ye=C.filter(Bn=>Bn.prefix==="title1"),Vt=Ye.findIndex(Bn=>Bn.prefix===ne.prefix),{resolved:Kt,effective:qi}=no(Ye,Xe);return{effectiveWidth:qi[Vt]??0,resolvedWidth:Kt[Vt]??0,maxWidth:qn(Vt,Kt)}}const be=C.filter(Ye=>Ye.prefix==="title2"||Ye.prefix==="title3"),xe=be.findIndex(Ye=>Ye.prefix===ne.prefix),{resolved:lt,effective:ut}=no(be,Xe);return{effectiveWidth:ut[xe]??0,resolvedWidth:lt[xe]??0,maxWidth:qn(xe,lt)}},[Xe,he]),jt=(C,ne,$e)=>{const be=C.marginLeftKey?et[C.marginLeftKey]??0:0,{effectiveWidth:xe,resolvedWidth:lt,maxWidth:ut}=$e??Ct(C,ne),Ye=Math.max(be,eo),Vt=o&&ne==="two-row-top";return r.jsxs("div",{className:`${e}-title-cell`,"data-title":C.prefix,style:{width:k(xe),...be>0?{marginLeft:k(be)}:{}},children:[r.jsx("p",{className:C.className,style:C.style,children:C.text}),Vt&&C.marginLeftKey?r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(-be),width:k(Ye),height:"100%",pointerEvents:"auto"}}):null,Vt?r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ut),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:k(-ei/2),width:k(ei),height:"100%",pointerEvents:"auto"}}):null]},C.className)},Sn=()=>r.jsx("div",{...o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:k(I??0),flexShrink:0,alignSelf:"stretch",...o?{pointerEvents:"auto"}:{}}}),Hn=()=>r.jsxs("div",{className:`${e}-text-bar-cell`,children:[r.jsx("span",{className:`${e}-entry-counter`,style:oe,"aria-live":"polite","aria-atomic":"true",children:Zm(Z,ce,w,t)}),o&&ct&&r.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ir(Y)} + ${Y}))`,width:ir(Y),height:"100%",pointerEvents:"auto",zIndex:3}})]}),On=()=>r.jsxs("div",{className:`${e}-close-icon`,style:{width:E.scalingValue(A??0,i),height:E.scalingValue(A??0,i),marginRight:re,"--close-icon-hover-color":U},children:[r.jsx("button",{ref:Et,type:"button",className:`${e}-close-icon-inner`,onClick:nt,"aria-label":"Close",children:r.jsx(tn,{url:L??"",fill:H,hoverFill:i&&!s?H:U,className:`${e}-close-icon-img`})}),o&&r.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:re,height:"100%",pointerEvents:"auto"}})]}),$n=()=>!Me&&!ct?null:r.jsxs("div",{className:`${e}-titles-row-top-controls`,style:te,children:[Me?Hn():null,ct?On():null]}),Jn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f);return r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,ne.map($e=>jt($e,"single-row",Nt(ne,$e,"single-row")))]})},Cn=C=>{if(!C)return null;const ne=to(e,C,F,ae,f),$e=ne.find(be=>be.prefix==="title1");return!$e&&!(I>0||o)?null:r.jsxs(r.Fragment,{children:[I>0||o?Sn():null,$e?jt($e,"two-row-top",Nt(ne,$e,"two-row-top")):null]})},Tn=(C,ne=!1)=>{const $e=C?to(e,C,F,ae,f):[],be=$e.filter(ut=>ut.prefix==="title2"||ut.prefix==="title3"),xe=o&&ne;return be.length>0||xe||(R??0)>0?r.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[be.length>0?r.jsxs("div",{className:`${e}-titles-row-bottom`,children:[be.map(ut=>jt(ut,"two-row-bottom",Nt($e,ut,"two-row-bottom"))),ne&&o?r.jsxs(r.Fragment,{children:[Di(),Bo()]}):null]}):null,(R??0)>0||xe?r.jsx("div",{"data-controls":xe?"titleRowMarginBottom":void 0,"data-controls-axis":xe?"y":void 0,"data-controls-reverse":xe?"":void 0,className:xe?`${e}-control`:void 0,style:{height:je,width:"100%",flexShrink:0,pointerEvents:xe?"auto":"none"}}):null]}):null},Ln=(C,ne=!1)=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[Cn(C),$n()]}),Tn(C,ne)]}),sn=C=>he?r.jsx("div",{className:`${e}-titles-row-two-row`,style:{width:"100%"},children:Ln(C)}):C?r.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Jn(C)}):null,Ho=()=>{const C=he?-1:Ee.findIndex(be=>be.prefix==="title1"),ne=!he&&(o||(I??0)>0)?(()=>{const xe=Math.max(I??0,eo),lt=C>=0?yt[C]:T;return r.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:0,width:k(xe),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,$e=Ee.flatMap((be,xe)=>{if(!be.marginLeftKey)return[];const lt=et[be.marginLeftKey]??0,ut=eg(Ee,yt,et,xe)+st(),Ye=Math.max(lt,eo);return r.jsx("div",{"data-controls":be.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(yt[xe]),style:{position:"absolute",top:0,left:k(ut),width:k(Ye),height:"100%",pointerEvents:"auto"}},be.marginLeftKey)});return ne?[ne,...$e]:$e},Oo=()=>Ee.map((C,ne)=>{const $e=qn(ne,yt),xe=an(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),Di=()=>Fe.flatMap((C,ne)=>{if(!C.marginLeftKey)return[];const $e=et[C.marginLeftKey]??0,be=Zt(ne),xe=Math.max($e,eo),{resolvedWidth:lt}=Ct(C,"two-row-bottom");return r.jsx("div",{"data-controls":C.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(lt),style:{position:"absolute",top:0,left:k(be),width:k(xe),height:"100%",pointerEvents:"auto"}},C.marginLeftKey)}),Bo=()=>Fe.map((C,ne)=>{const{maxWidth:$e}=Ct(C,"two-row-bottom"),xe=Ze(ne)-ei/2;return r.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:r.jsx("div",{"data-controls":C.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String($e),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:k(xe),width:k(ei),height:"100%",pointerEvents:"auto"}})},`${C.widthKey}-junction`)}),h=()=>!o||he?null:r.jsxs(r.Fragment,{children:[Ho(),Oo()]}),K=C=>{const ne=!C.objectFit&&vn(x);return{className:`${e}-slide-image-cell${ne?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:q,maxHeight:O,...ne?{"--image-aspect-ratio":Wo(x)}:{}}}},Q=C=>C.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":C.objectFit}}:vn(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},le=C=>{if(C.length===0)return null;const ne=C.length>1,$e=ir(X),be=`calc(-0.5 * (${$e} + ${X}))`;if(C.length===1){const xe=C[0];return r.jsx("div",{...K(xe),children:r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1})})}return r.jsx("div",{className:`${e}-slide-inner`,style:ne?{gap:X}:void 0,children:C.map((xe,lt)=>r.jsxs("div",{...K(xe),children:[r.jsx("img",{...Q(xe),src:xe.url,alt:xe.name??"",draggable:!1}),o&&ne&&lt<C.length-1&&r.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:be,width:$e,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${xe.url}-${lt}`))})},ye=!!(N!=null&&N.title2||N!=null&&N.title3||Qe!=null&&Qe.title2||Qe!=null&&Qe.title3||(R??0)>0||o),rt=()=>r.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Ln(Ae||N)}),r.jsxs("div",{ref:xt,className:`${e}-titles-row-two-row`,style:{...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[r.jsxs("div",{className:`${e}-titles-row-top`,children:[r.jsxs("div",{className:Se,style:{position:"relative",flex:1,minWidth:0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:Cn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Cn(N)})]}),$n()]}),ye?r.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:Tn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${he?` ${e}-titles-layer-in-stacked`:""}`,children:Tn(N,!0)})]}):null]})]}),Pt=()=>{const C=ye;return r.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...C?{flex:1,height:"100%"}:{}},children:[r.jsx("div",{className:`${e}-titles-row-two-row`,style:C?void 0:{flex:"0 0 auto",height:"auto"},children:Ln(N,!0)}),h()]})};return r.jsxs("div",{ref:pt,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{Ht||nt()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:ct?void 0:-1,style:{opacity:me?1:0,transition:"opacity 300ms ease",pointerEvents:me?"auto":"none"},children:[r.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:v,...Mt}}),r.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:{position:"relative",width:"100%",height:"100%",...Tt},...Oe,children:[r.jsx("div",{className:`${e}-lightbox-content`,style:qt,onClick:C=>C.stopPropagation(),children:r.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":fe&&Z.length>1?"true":"false",onPointerDown:fe?un:void 0,onPointerUp:fe?Ft:void 0,onPointerCancel:fe?wn:void 0,children:r.jsxs("div",{className:`${e}-slide-stack`,children:[Bt&&_?r.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:C=>{C.target===C.currentTarget&&Ue(D)},children:r.jsx("div",{className:`${e}-slide-area`,children:le(Bt.images)})},`slide-out-${D}`):null,r.jsx("div",{className:`${e}-slide-layer-in${_?` ${e}-slide-fade-in`:""}`,children:r.jsx("div",{className:`${e}-slide-area`,children:B?le(B.images):null})},`slide-in-${D}-${ce}`)]})})}),r.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:{width:"100%",height:"100%",...on},children:[r.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),r.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...he?{flex:1,minHeight:0}:{}},children:r.jsxs("div",{className:`${e}-lightbox-content-area${he?` ${e}-lightbox-content-area-stacked`:""}`,children:[(he?Rt:rn)&&r.jsx("div",{className:`${e}-text-bar-cell${he?` ${e}-text-bar-cell-stacked`:""}`,children:he?$==="fade"?rt():Pt():$==="fade"?r.jsxs(r.Fragment,{children:[r.jsx("div",{ref:qe,className:Se,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:sn(Ae||N)}),r.jsxs("div",{ref:xt,className:Se,style:{width:"100%",...Te&&ge?{minHeight:ge}:void 0,...Te&&De?{width:De,maxWidth:"100%"}:void 0},children:[Qe&&Te?r.jsx("div",{className:`${Re} ${e}-titles-fade-out`,children:sn(Qe)}):null,r.jsx("div",{className:`${e}-titles-layer-in${Te?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:sn(N)}),h()]})]}):r.jsxs("div",{style:{position:"relative",width:"100%"},children:[sn(N),h()]})}),!he&&r.jsxs("div",{className:`${e}-lightbox-persistent-controls`,style:te,children:[Me&&Hn(),ct&&On()]})]})})]})]})]})};function lg(e){return`
10352
10352
  .${e}-wrapper {
10353
10353
  position: relative;
10354
10354
  width: 100%;
@@ -10865,7 +10865,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
10865
10865
  pointer-events: auto;
10866
10866
  z-index: 10;
10867
10867
  }
10868
- `}const cg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=L.useScopedStyles(),l=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:w}=e,x=c.useRef(null),[v,m]=c.useState(!1),[f,E]=c.useState(0),$=c.useRef(!1),C=c.useRef(!1),S=c.useRef(!1),M=c.useMemo(()=>(t??[]).filter(g=>vi(g).length>0),[t]),I=v&&M.length>0,W=!n,b=c.useCallback(()=>{W&&(S.current=!0,Um(C.current,l),C.current=!1)},[W,l]),R=(g=0)=>{if(M.length===0||n&&!i&&!o)return;const T=yo(M,w),_=Math.max(0,Math.min(g,T.length-1));if(E(_),W){const H=qs();Ds(_+1,l,H),C.current=!H}m(!0)},V=c.useCallback(()=>{m(!1),S.current=!1},[]);return c.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),c.useEffect(()=>{if(!W||$.current)return;$.current=!0;const g=Ka(l);if(!g)return;const T=Ua(g,yo(M,w).length);T<0||(E(T),m(!0))},[M,l,W,w]),c.useEffect(()=>{if(!W)return;const g=()=>{if(S.current){S.current=!1,m(!1);return}const T=Ka(l);if(!T){m(!1);return}const _=Ua(T,yo(M,w).length);if(_<0){m(!1);return}C.current=!1,E(_),m(!0)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[M,l,W,w]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:lg(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${$n(u)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>R(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...$n(u)?{"--image-aspect-ratio":Ho(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${$n(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),I&&typeof document<"u"&&(()=>{const g=(s?document.getElementById(s):null)??document.body;return Ni.createPortal(r.jsx(sg,{prefix:d,entries:M,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:f,enableUrlSync:W,journalItemId:l,onBeforeClose:b,onClose:V}),g)})()]})},dg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
10868
+ `}const cg=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:s,metadata:a})=>{const{prefix:d}=E.useScopedStyles(),l=(a==null?void 0:a.itemId)??null,{cover:p,coverFit:u,type:w}=e,x=c.useRef(null),[v,m]=c.useState(!1),[y,P]=c.useState(0),$=c.useRef(!1),T=c.useRef(!1),S=c.useRef(!1),M=c.useMemo(()=>(t??[]).filter(g=>hi(g).length>0),[t]),I=v&&M.length>0,W=!n,b=c.useCallback(()=>{W&&(S.current=!0,Um(T.current,l),T.current=!1)},[W,l]),R=(g=0)=>{if(M.length===0||n&&!i&&!o)return;const L=go(M,w),A=Math.max(0,Math.min(g,L.length-1));if(P(A),W){const H=qs();Ds(A+1,l,H),T.current=!H}m(!0)},V=c.useCallback(()=>{m(!1),S.current=!1},[]);return c.useEffect(()=>{!n||i||o||m(!1)},[n,i,o]),c.useEffect(()=>{if(!W||$.current)return;$.current=!0;const g=Ka(l);if(!g)return;const L=Ua(g,go(M,w).length);L<0||(P(L),m(!0))},[M,l,W,w]),c.useEffect(()=>{if(!W)return;const g=()=>{if(S.current){S.current=!1,m(!1);return}const L=Ka(l);if(!L){m(!1);return}const A=Ua(L,go(M,w).length);if(A<0){m(!1);return}T.current=!1,P(A),m(!0)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[M,l,W,w]),r.jsxs(r.Fragment,{children:[r.jsxs("div",{ref:x,className:`${d}-wrapper`,children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:lg(d)}}),p?r.jsx("button",{type:"button",className:`${d}-cover ${vn(u)?`${d}-ratio-wrapper-cover`:`${d}-ratio-wrapper-fit`}`,onClick:()=>R(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...vn(u)?{"--image-aspect-ratio":Wo(u)}:{}},"aria-label":"Open journal gallery",children:r.jsx("img",{className:`${d}-cover-image ${vn(u)?`${d}-cover-image-cover`:`${d}-cover-image-fit`}`,src:p,alt:"cover"})}):null]}),I&&typeof document<"u"&&(()=>{const g=(s?document.getElementById(s):null)??document.body;return ki.createPortal(r.jsx(sg,{prefix:d,entries:M,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:y,enableUrlSync:W,journalItemId:l,onBeforeClose:b,onClose:V}),g)})()]})},dg=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
10869
10869
  import { createPortal } from 'react-dom';
10870
10870
  import { CommonComponentProps } from '../props';
10871
10871
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -11616,4 +11616,4 @@ export type LightboxJournalSettings = {
11616
11616
  closeIconColor: string;
11617
11617
  closeIconHoverColor: string;
11618
11618
  };
11619
- `,ug="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Un={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function pg(e){const t={};return t[pt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[pt(e,"fontSettings")]={...Un.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[pt(e,"fontSize")]={...Un.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[pt(e,"lineHeight")]={...Un.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[pt(e,"letterSpacing")]={...Un.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[pt(e,"wordSpacing")]={...Un.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[pt(e,"textAlign")]={...Un.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[pt(e,"textAppearance")]={...Un.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mg=Ui.reduce((e,t)=>({...e,...pg(t)}),{}),gg=Ui.reduce((e,t)=>({...e,[pt(t,"fontFamily")]:"Arial",[pt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[pt(t,"letterSpacing")]:0,[pt(t,"wordSpacing")]:0,[pt(t,"textAlign")]:"left",[pt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Xa(e){return Ui.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[pt(n,"fontSize")]=i),o!==void 0&&(t[pt(n,"lineHeight")]=o),t},{})}const hg=og(),fg={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...mg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/LightboxJournal_1.jpg",coverFit:{display:"cover",ratioValue:"16:9",reversed:!1},closeIcon:ug,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#ffffff",...gg},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Xa({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.015,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Xa({title1FontSize:.01,title1LineHeight:.01,title2FontSize:.01,title2LineHeight:.01,title3FontSize:.01,title3LineHeight:.01,countFontSize:.01,countLineHeight:.01})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Journal Entry 1",title2:"summer vacation",title3:"July 1978",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_1.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_2.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 2",title2:"spring break",title3:"March 1979",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_3.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_4.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 3",title2:"winter vacation",title3:"January 1980",image:[{url:"https://cdn.cntrl.site/component-assets/LightboxStrip_5.jpg",name:"",objectFit:"contain"}]}]}},yg={element:cg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:fg,sourceCode:dg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Ui.map(e=>({path:`styles.${pt(e,"fontSettings")}`}))}},vg=[nd,cd,Jd,au,fu,Pu,ku,Bu,Zu,em,cm,Dm,yg];exports.components=vg;exports.isSchemaV1=Us;
11619
+ `,ug="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="#000000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>'),Kn={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},fontSize:{type:"number",display:{type:"font-size"}},lineHeight:{type:"number",display:{type:"line-height-input"}},letterSpacing:{type:"number",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",display:{type:"word-spacing-input"}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textAppearance:{type:"object",display:{type:"text-appearance",useTabDesign:!0},properties:{textTransform:{type:"string",enum:["none","uppercase","lowercase","capitalize"]},textDecoration:{type:"string",enum:["none","underline"]},fontVariant:{type:"string",enum:["normal","small-caps"]}}}};function pg(e){const t={};return t[gt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSettings")]={...Kn.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[gt(e,"fontSize")]={...Kn.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[gt(e,"lineHeight")]={...Kn.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[gt(e,"letterSpacing")]={...Kn.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[gt(e,"wordSpacing")]={...Kn.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[gt(e,"textAlign")]={...Kn.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[gt(e,"textAppearance")]={...Kn.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const mg=Vi.reduce((e,t)=>({...e,...pg(t)}),{}),gg=Vi.reduce((e,t)=>({...e,[gt(t,"fontFamily")]:"Arial",[gt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[gt(t,"letterSpacing")]:0,[gt(t,"wordSpacing")]:0,[gt(t,"textAlign")]:"left",[gt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function Xa(e){return Vi.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[gt(n,"fontSize")]=i),o!==void 0&&(t[gt(n,"lineHeight")]=o),t},{})}const hg=og(),fg={type:"object",version:1,settings:{sizing:"auto manual",properties:{cover:{type:"string",scope:"common",title:"",display:{type:"settings-image-input"}},coverFit:{type:"object",scope:"common",title:"Display",display:{type:"image-ratio-control"},properties:{display:{type:"string",enum:["fit","cover"]},ratioValue:{type:"string",enum:["1:1","2:3","3:4","4:5","16:9"]},reversed:{type:"boolean"}}},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["A","B"]},maxHeight:{type:"number",scope:"layout",title:"Max Height (%)",min:0,max:100,display:{type:"percentage-input"}},maxWidth:{type:"number",scope:"layout",title:"Max Width (%)",min:0,max:100,display:{type:"percentage-input"}},imageGap:{type:"number",scope:"layout",title:"Image Gap",min:0,display:{type:"range-control",visible:!1}},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"settings-color-picker"}},closeIcon:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},closeIconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"full-width-input"},min:0,max:1},closeIconColor:{type:"string",scope:"common",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"common",title:"Icon Hover",display:{type:"settings-color-picker"}},textTransition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["none","fade"]}},title1Width:{type:"number",scope:"layout",title:"Title 1 width",min:0,display:{type:"range-control"}},title2Width:{type:"number",scope:"layout",title:"Title 2 width",min:0,display:{type:"range-control"}},title3Width:{type:"number",scope:"layout",title:"Title 3 width",min:0,display:{type:"range-control"}},title2MarginLeft:{type:"number",scope:"layout",title:"Title 2 margin left",min:0,display:{type:"range-control"}},title3MarginLeft:{type:"number",scope:"layout",title:"Title 3 margin left",min:0,display:{type:"range-control"}},titleHeaderLayout:{type:"string",scope:"layout",title:"Title header layout",display:{type:"toggle-cycle",enum:["desktop","mobile"]}},title1MarginLeft:{type:"number",scope:"layout",title:"Title 1 margin left",min:0,display:{type:"range-control"}},titleRowMarginBottom:{type:"number",scope:"layout",title:"Title row margin bottom",min:0,display:{type:"range-control"}},countCloseGap:{type:"number",scope:"layout",title:"Count / Close Gap",min:0,display:{type:"range-control"}},title1Color:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Default",display:{type:"palette-color-picker"}},countColor:{type:"string",scope:"common",title:"Count Default",display:{type:"palette-color-picker"}},...mg,contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}}},defaults:{cover:"https://cdn.cntrl.site/component-assets/lightbox_journal_1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:ug,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#ffffff",...gg},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.05,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.005,...Xa({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.015,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.13,title2Width:.13,title3Width:.14,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...Xa({title1FontSize:.01,title1LineHeight:.01,title2FontSize:.01,title2LineHeight:.01,title3FontSize:.01,title3LineHeight:.01,countFontSize:.01,countLineHeight:.01})}},layout:["__componentName__","maxWidth","maxHeight","imageGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","countCloseGap","contentMarginTop","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["type"]},{type:"row",title:"Image",items:["maxWidth","maxHeight"]},{type:"row",title:"Text",items:["textTransition"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]},{type:"row",title:"Cover Image",items:["cover","coverFit"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[hg]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",max:2,display:{type:"media-list-input"},properties:{url:{type:"string"},name:{type:"string"},objectFit:{type:"string",enum:["cover","contain"]}},required:["url","name"]}}},default:[{title1:"Journal Entry 1",title2:"summer vacation",title3:"July 1978",image:[{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_3.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 2",title2:"spring break",title3:"March 1979",image:[{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_4.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_5.jpg",name:"",objectFit:"contain"}]},{title1:"Journal Entry 3",title2:"winter vacation",title3:"January 1980",image:[{url:"https://cdn.cntrl.site/component-assets/lightbox_journal_6.jpg",name:"",objectFit:"contain"}]}]}},yg={element:cg,id:"lightbox-journal",name:"Lightbox Journal",category:"galleries",version:1,defaultSize:{d:{width:350,height:350},m:{width:300,height:350}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:fg,sourceCode:dg,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:Vi.map(e=>({path:`styles.${gt(e,"fontSettings")}`}))}},vg=[nd,cd,Jd,au,fu,Pu,ku,Bu,Zu,em,cm,Dm,yg];exports.components=vg;exports.isSchemaV1=Us;