@cntrl-site/components 1.0.96 → 1.0.97-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Ct=require("classnames"),F=require("./panelAvailability-D8c7cdbu.js"),Gn=require("react-dom");function Yp(e){return e.type==="object"&&e.version===1}const Zp="ControlSlider-module__wrapper___sHEkd",Jp="ControlSlider-module__hoverArrow___A-dOH",Qp="ControlSlider-module__sliderItem___QQSkR",em="ControlSlider-module__sliderImage___9hRl-",tm="ControlSlider-module__arrow___05ghY",nm="ControlSlider-module__arrowVertical___tBfVN",im="ControlSlider-module__nextArrow___-30Yc",om="ControlSlider-module__arrowInner___aEra3",rm="ControlSlider-module__arrowIcon___S4ztF",am="ControlSlider-module__arrowImg___2dwJW",sm="ControlSlider-module__mirror___brd6U",lm="ControlSlider-module__pagination___bicLF",cm="ControlSlider-module__paginationInner___bT-P-",dm="ControlSlider-module__paginationVertical___zYqKw",um="ControlSlider-module__paginationItem___nTRbk",pm="ControlSlider-module__dot___p1Qun",mm="ControlSlider-module__activeDot___LHFaj",gm="ControlSlider-module__paginationInsideBottom___R3FWn",hm="ControlSlider-module__paginationInsideTop___V-qb-",fm="ControlSlider-module__paginationOutsideBottom___14w8D",ym="ControlSlider-module__paginationOutsideTop___SCLqB",vm="ControlSlider-module__paginationInsideLeft___yOBRZ",xm="ControlSlider-module__paginationInsideRight___Rtt3o",bm="ControlSlider-module__paginationOutsideLeft___lahaw",Sm="ControlSlider-module__paginationOutsideRight___EtuQa",wm="ControlSlider-module__imgWrapper___UjEgB",$m="ControlSlider-module__captionBlock___dJ6-j",Cm="ControlSlider-module__captionTextWrapper___HFlpf",Tm="ControlSlider-module__captionText___uGBVc",Lm="ControlSlider-module__active___WZK4G",Pm="ControlSlider-module__withPointerEvents___t-18M",Im="ControlSlider-module__topLeftAlignment___zjnGM",Rm="ControlSlider-module__topCenterAlignment___gD1xW",km="ControlSlider-module__topRightAlignment___NMapS",Em="ControlSlider-module__middleLeftAlignment___OnUrY",Mm="ControlSlider-module__middleCenterAlignment___Tdkl0",Am="ControlSlider-module__middleRightAlignment___wEbfX",Fm="ControlSlider-module__bottomLeftAlignment___cTP2-",Nm="ControlSlider-module__bottomCenterAlignment___c54fB",_m="ControlSlider-module__bottomRightAlignment___kEwrz",Hm="ControlSlider-module__clickOverlay___DZA28",Wm="ControlSlider-module__contain___pLyq7",Om="ControlSlider-module__cover___KdDat",$t={wrapper:Zp,hoverArrow:Jp,sliderItem:Qp,sliderImage:em,arrow:tm,arrowVertical:nm,nextArrow:im,arrowInner:om,arrowIcon:rm,arrowImg:am,mirror:sm,pagination:lm,paginationInner:cm,paginationVertical:dm,paginationItem:um,dot:pm,activeDot:mm,paginationInsideBottom:gm,paginationInsideTop:hm,paginationOutsideBottom:fm,paginationOutsideTop:ym,paginationInsideLeft:vm,paginationInsideRight:xm,paginationOutsideLeft:bm,paginationOutsideRight:Sm,imgWrapper:wm,captionBlock:$m,captionTextWrapper:Cm,captionText:Tm,active:Lm,withPointerEvents:Pm,topLeftAlignment:Im,topCenterAlignment:Rm,topRightAlignment:km,middleLeftAlignment:Em,middleCenterAlignment:Mm,middleRightAlignment:Am,bottomLeftAlignment:Fm,bottomCenterAlignment:Nm,bottomRightAlignment:_m,clickOverlay:Hm,contain:Wm,cover:Om};function Dm(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 zm(e,t,n){return t&&Dm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ul="(prefers-reduced-motion: reduce)",mo=1,Bm=2,$o=3,Ho=4,$r=5,ia=6,pa=7,jm={CREATED:mo,MOUNTED:Bm,IDLE:$o,MOVING:Ho,SCROLLING:$r,DRAGGING:ia,DESTROYED:pa};function ai(e){e.length=0}function Ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ri(arguments,1)))}var Zd=setTimeout,Ms=function(){};function Kl(e){return requestAnimationFrame(e)}function Ta(e,t){return typeof t===e}function dr(e){return!sl(e)&&Ta("object",e)}var al=Array.isArray,Jd=Jt(Ta,"function"),Ci=Jt(Ta,"string"),Cr=Jt(Ta,"undefined");function sl(e){return e===null}function Qd(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Tr(e){return al(e)?e:[e]}function Rn(e,t){Tr(e).forEach(t)}function ll(e,t){return e.indexOf(t)>-1}function oa(e,t){return e.push.apply(e,Tr(t)),e}function ti(e,t,n){e&&Rn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Bn(e,t){ti(e,Ci(t)?t.split(" "):t,!0)}function Lr(e,t){Rn(t,e.appendChild.bind(e))}function cl(e,t){Rn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return Qd(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function eu(e,t){var n=e?Ri(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?eu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Gi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){e[i]=t[i]})}),e}function bi(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){al(n)?e[i]=n.slice():dr(n)?e[i]=bi({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function Yl(e,t){Rn(t||pr(e),function(n){delete e[n]})}function jn(e,t){Rn(e,function(n){Rn(t,function(i){n&&n.removeAttribute(i)})})}function Nt(e,t,n){dr(t)?Gi(t,function(i,o){Nt(e,o,i)}):Rn(e,function(i){sl(n)||n===""?jn(i,t):i.setAttribute(t,String(n))})}function vo(e,t,n){var i=document.createElement(e);return t&&(Ci(t)?Bn(i,t):Nt(i,t)),n&&Lr(n,i),i}function Mn(e,t,n){if(Cr(n))return getComputedStyle(e)[t];sl(n)||(e.style[t]=""+n)}function gr(e,t){Mn(e,"display",t)}function tu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function An(e,t){return e.getAttribute(t)}function Zl(e,t){return e&&e.classList.contains(t)}function Tn(e){return e.getBoundingClientRect()}function qi(e){Rn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function nu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function Qn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function iu(e,t){return e&&e.querySelector(t)}function dl(e,t){return t?Ri(e.querySelectorAll(t)):[]}function ni(e,t){ti(e,t,!1)}function As(e){return e.timeStamp}function Ai(e){return Ci(e)?e:e?e+"px":""}var Ir="splide",ul="data-"+Ir;function ar(e,t){if(!e)throw new Error("["+Ir+"] "+(t||""))}var Ti=Math.min,ma=Math.max,ga=Math.floor,hr=Math.ceil,vn=Math.abs;function ou(e,t,n){return vn(e-t)<n}function ra(e,t,n,i){var o=Ti(t,n),r=ma(t,n);return i?o<e&&e<r:o<=e&&e<=r}function lo(e,t,n){var i=Ti(t,n),o=ma(t,n);return Ti(ma(i,e),o)}function Fs(e){return+(e>0)-+(e<0)}function Ns(e,t){return Rn(t,function(n){e=e.replace("%s",""+n)}),e}function pl(e){return e<10?"0"+e:""+e}var Jl={};function Vm(e){return""+e+pl(Jl[e]=(Jl[e]||0)+1)}function ru(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,v){var m="addEventListener"in p,g=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,v,d,g])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(v){return v[0]===u&&v[1]===p&&v[2]===y&&(!d||v[3]===d)?(v[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){Rn(l,function(u){u&&Rn(c,function(p){p.split(" ").forEach(function(y){var v=y.split(".");d(u,v[0],v[1])})})})}function r(){e.forEach(function(l){l[4]()}),ai(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ki="mounted",_s="ready",si="move",Wo="moved",ml="click",au="active",su="inactive",lu="visible",cu="hidden",sn="refresh",gn="updated",Co="resize",La="resized",du="drag",uu="dragging",pu="dragged",Pa="scroll",Yi="scrolled",Gm="overflow",gl="destroy",mu="arrows:mounted",gu="arrows:updated",hu="pagination:mounted",fu="pagination:updated",hl="navigation:mounted",fl="autoplay:play",yu="autoplay:playing",yl="autoplay:pause",vl="lazyload:loaded",vu="sk",xu="sh",ha="ei";function on(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ru();function i(r,l){n.bind(t,Tr(r).join(" "),function(c){l.apply(l,al(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ri(arguments,1))}return e&&e.event.on(gl,n.destroy),mr(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function Ia(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Ti((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return v();c=Kl(p)}}function y(k){k||g(),r=o()-(k?l*e:0),d=!1,c=Kl(p)}function v(){d=!0}function m(){r=o(),l=0,n&&n(l)}function g(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function x(k){e=k}function b(){return d}return{start:y,rewind:m,pause:v,cancel:g,set:x,isPaused:b}}function Xm(e){var t=e;function n(o){t=o}function i(o){return ll(Tr(o),t)}return{set:n,is:i}}function qm(e,t){var n=Ia(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Um(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=ru(),c=[];function d(){var g=n.mediaQuery==="min";pr(o).sort(function(x,b){return g?+x-+b:+b-+x}).forEach(function(x){p(o[x],"("+(g?"min":"max")+"-width:"+x+"px)")}),p(r,Ul),y()}function u(g){g&&l.destroy()}function p(g,x){var b=matchMedia(x);l.bind(b,"change",y),c.push([g,b])}function y(){var g=i.is(pa),x=n.direction,b=c.reduce(function(k,f){return bi(k,f[1].matches?f[0]:{})},{});Yl(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):g?(u(!0),e.mount()):x!==n.direction&&e.refresh()}function v(g){matchMedia(Ul).matches&&(g?bi(n,r):Yl(n,pr(r)))}function m(g,x,b){bi(n,g),x&&bi(Object.getPrototypeOf(n),g),(b||!i.is(mo))&&e.emit(gn,n)}return{setup:d,destroy:u,reduce:v,set:m}}var Ra="Arrow",ka=Ra+"Left",Ea=Ra+"Right",bu=Ra+"Up",Su=Ra+"Down",Ql="rtl",Ma="ttb",Ga={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bu,Ea],ArrowRight:[Su,ka]};function Km(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===Ql&&!l?1:c===Ma?0:-1;return Ga[r]&&Ga[r][d]||r.replace(/width|left|right/i,function(u,p){var y=Ga[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===Ql?1:-1)}return{resolve:i,orient:o}}var ii="role",xo="tabindex",Ym="disabled",Fn="aria-",Rr=Fn+"controls",wu=Fn+"current",ec=Fn+"selected",Pn=Fn+"label",xl=Fn+"labelledby",$u=Fn+"hidden",bl=Fn+"orientation",fr=Fn+"roledescription",tc=Fn+"live",nc=Fn+"busy",ic=Fn+"atomic",Sl=[ii,xo,Ym,Rr,wu,Pn,xl,$u,bl,fr],Xn=Ir+"__",Ei="is-",Xa=Ir,oc=Xn+"track",Zm=Xn+"list",Aa=Xn+"slide",Cu=Aa+"--clone",Jm=Aa+"__container",wl=Xn+"arrows",Fa=Xn+"arrow",Tu=Fa+"--prev",Lu=Fa+"--next",Na=Xn+"pagination",Pu=Na+"__page",Qm=Xn+"progress",eg=Qm+"__bar",tg=Xn+"toggle",ng=Xn+"spinner",ig=Xn+"sr",og=Ei+"initialized",Ui=Ei+"active",Iu=Ei+"prev",Ru=Ei+"next",Hs=Ei+"visible",Ws=Ei+"loading",ku=Ei+"focus-in",Eu=Ei+"overflow",rg=[Ui,Hs,Iu,Ru,Ws,ku,Eu],ag={slide:Aa,clone:Cu,arrows:wl,arrow:Fa,prev:Tu,next:Lu,pagination:Na,page:Pu,spinner:ng};function sg(e,t){if(Jd(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var lg=5,rc=200,Mu="touchstart mousedown",qa="touchmove mousemove",Ua="touchend touchcancel mouseup click";function cg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],v,m,g;function x(){S(),W(),f()}function b(){o(sn,k),o(sn,x),o(gn,f),r(document,Mu+" keydown",function(P){g=P.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ti(l,ku,!!g)})}function k(P){var _=Sl.concat("style");ai(u),ni(l,p),ni(v,y),jn([v,m],_),jn(l,P?_:["style",fr])}function f(){ni(l,p),ni(v,y),p=B(Xa),y=B(oc),Bn(l,p),Bn(v,y),Nt(l,Pn,n.label),Nt(l,xl,n.labelledby)}function S(){v=U("."+oc),m=Pr(v,"."+Zm),ar(v&&m,"A track/list element is missing."),oa(u,eu(m,"."+Aa+":not(."+Cu+")")),Gi({arrows:wl,pagination:Na,prev:Tu,next:Lu,bar:eg,toggle:tg},function(P,_){d[_]=U("."+P)}),mr(d,{root:l,track:v,list:m,slides:u})}function W(){var P=l.id||Vm(Ir),_=n.role;l.id=P,v.id=v.id||P+"-track",m.id=m.id||P+"-list",!An(l,ii)&&l.tagName!=="SECTION"&&_&&Nt(l,ii,_),Nt(l,fr,c.carousel),Nt(m,ii,"presentation")}function U(P){var _=iu(l,P);return _&&sg(_,"."+Xa)===l?_:void 0}function B(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Xa&&Ui]}return mr(d,{setup:x,mount:b,destroy:k})}var To="slide",Oo="loop",kr="fade";function dg(e,t,n,i){var o=on(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,v=p.updateOnMove,m=p.i18n,g=p.pagination,x=p.slideFocus,b=d.Direction.resolve,k=An(i,"style"),f=An(i,Pn),S=n>-1,W=Pr(i,"."+Jm),U;function B(){S||(i.id=u.id+"-slide"+pl(t+1),Nt(i,ii,g?"tabpanel":"group"),Nt(i,fr,m.slide),Nt(i,Pn,f||Ns(m.slideLabel,[t+1,e.length]))),P()}function P(){c(i,"click",Jt(l,ml,q)),c(i,"keydown",Jt(l,vu,q)),r([Wo,xu,Yi],L),r(hl,G),v&&r(si,$)}function _(){U=!0,o.destroy(),ni(i,rg),jn(i,Sl),Nt(i,"style",k),Nt(i,Pn,f||"")}function G(){var I=e.splides.map(function(A){var j=A.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");Nt(i,Pn,Ns(m.slideX,(S?n:t)+1)),Nt(i,Rr,I),Nt(i,ii,x?"button":""),x&&jn(i,fr)}function $(){U||L()}function L(){if(!U){var I=e.index;D(),E(),ti(i,Iu,t===I-1),ti(i,Ru,t===I+1)}}function D(){var I=C();I!==Zl(i,Ui)&&(ti(i,Ui,I),Nt(i,wu,y&&I||""),l(I?au:su,q))}function E(){var I=V(),A=!I&&(!C()||S);if(e.state.is([Ho,$r])||Nt(i,$u,A||""),Nt(dl(i,p.focusableNodes||""),xo,A?-1:""),x&&Nt(i,xo,A?-1:0),I!==Zl(i,Hs)&&(ti(i,Hs,I),l(I?lu:cu,q)),!I&&document.activeElement===i){var j=d.Slides.getAt(e.index);j&&tu(j.slide)}}function T(I,A,j){Mn(j&&W||i,I,A)}function C(){var I=e.index;return I===t||p.cloneStatus&&I===n}function V(){if(e.is(kr))return C();var I=Tn(d.Elements.track),A=Tn(i),j=b("left",!0),ie=b("right",!0);return ga(I[j])<=hr(A[j])&&ga(A[ie])<=hr(I[ie])}function w(I,A){var j=vn(I-t);return!S&&(p.rewind||e.is(Oo))&&(j=Ti(j,e.length-j)),j<=A}var q={index:t,slideIndex:n,slide:i,container:W,isClone:S,mount:B,destroy:_,update:L,style:T,isWithin:w};return q}function ug(e,t,n){var i=on(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){v(),o(sn,m),o(sn,v)}function v(){d.forEach(function(L,D){x(L,D,-1)})}function m(){U(function(L){L.destroy()}),ai(p)}function g(){U(function(L){L.update()})}function x(L,D,E){var T=dg(e,D,E,L);T.mount(),p.push(T),p.sort(function(C,V){return C.index-V.index})}function b(L){return L?B(function(D){return!D.isClone}):p}function k(L){var D=t.Controller,E=D.toIndex(L),T=D.hasFocus()?1:n.perPage;return B(function(C){return ra(C.index,E,E+T-1)})}function f(L){return B(L)[0]}function S(L,D){Rn(L,function(E){if(Ci(E)&&(E=nu(E)),Qd(E)){var T=d[D];T?cl(E,T):Lr(u,E),Bn(E,n.classes.slide),_(E,Jt(r,Co))}}),r(sn)}function W(L){qi(B(L).map(function(D){return D.slide})),r(sn)}function U(L,D){b(D).forEach(L)}function B(L){return p.filter(Jd(L)?L:function(D){return Ci(L)?ur(D.slide,L):ll(Tr(L),D.index)})}function P(L,D,E){U(function(T){T.style(L,D,E)})}function _(L,D){var E=dl(L,"img"),T=E.length;T?E.forEach(function(C){l(C,"load error",function(){--T||D()})}):D()}function G(L){return L?d.length:p.length}function $(){return p.length>n.perPage}return{mount:y,destroy:m,update:g,register:x,get:b,getIn:k,getAt:f,add:S,remove:W,forEach:U,filter:B,style:P,getLength:G,isEnough:$}}function pg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,v=u.list,m=c.getAt,g=c.style,x,b,k;function f(){S(),r(window,"resize load",qm(Jt(l,Co))),o([gn,sn],S),o(Co,W)}function S(){x=n.direction===Ma,Mn(p,"maxWidth",Ai(n.width)),Mn(y,d("paddingLeft"),U(!1)),Mn(y,d("paddingRight"),U(!0)),W(!0)}function W(q){var I=Tn(p);(q||b.width!==I.width||b.height!==I.height)&&(Mn(y,"height",B()),g(d("marginRight"),Ai(n.gap)),g("width",_()),g("height",G(),!0),b=I,l(La),k!==(k=w())&&(ti(p,Eu,k),l(Gm,k)))}function U(q){var I=n.padding,A=d(q?"right":"left");return I&&Ai(I[A]||(dr(I)?0:I))||"0px"}function B(){var q="";return x&&(q=P(),ar(q,"height or heightRatio is missing."),q="calc("+q+" - "+U(!1)+" - "+U(!0)+")"),q}function P(){return Ai(n.height||Tn(v).width*n.heightRatio)}function _(){return n.autoWidth?null:Ai(n.fixedWidth)||(x?"":$())}function G(){return Ai(n.fixedHeight)||(x?n.autoHeight?null:$():P())}function $(){var q=Ai(n.gap);return"calc((100%"+(q&&" + "+q)+")/"+(n.perPage||1)+(q&&" - "+q)+")"}function L(){return Tn(v)[d("width")]}function D(q,I){var A=m(q||0);return A?Tn(A.slide)[d("width")]+(I?0:C()):0}function E(q,I){var A=m(q);if(A){var j=Tn(A.slide)[d("right")],ie=Tn(v)[d("left")];return vn(j-ie)+(I?0:C())}return 0}function T(q){return E(e.length-1)-E(0)+D(0,q)}function C(){var q=m(0);return q&&parseFloat(Mn(q.slide,d("marginRight")))||0}function V(q){return parseFloat(Mn(y,d("padding"+(q?"Right":"Left"))))||0}function w(){return e.is(kr)||T(!0)>L()}return{mount:f,resize:W,listSize:L,slideSize:D,sliderSize:T,totalSize:E,getPadding:V,isOverflow:w}}var mg=2;function gg(e,t,n){var i=on(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(sn,y),o([gn,Co],m),(u=b())&&(g(u),t.Layout.resize(!0))}function y(){v(),p()}function v(){qi(d),ai(d),i.destroy()}function m(){var k=b();u!==k&&(u<k||!k)&&i.emit(sn)}function g(k){var f=l.get().slice(),S=f.length;if(S){for(;f.length<k;)oa(f,f);oa(f.slice(-k),f.slice(0,k)).forEach(function(W,U){var B=U<k,P=x(W.slide,U);B?cl(P,f[0].slide):Lr(r.list,P),oa(d,P),l.register(P,U-k+(B?0:S),W.index)})}}function x(k,f){var S=k.cloneNode(!0);return Bn(S,n.classes.clone),S.id=e.root.id+"-clone"+pl(f+1),S}function b(){var k=n.clones;if(!e.is(Oo))k=0;else if(Cr(k)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),S=f&&hr(Tn(r.track)[c("width")]/f);k=S||n[c("autoWidth")]&&e.length||n.perPage*mg}return k}return{mount:p,destroy:v}}function hg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,v=c.sliderSize,m=t.Direction,g=m.resolve,x=m.orient,b=t.Elements,k=b.list,f=b.track,S;function W(){S=t.Transition,o([ki,La,gn,sn],U)}function U(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function B(A,j,ie,ae){A!==j&&q(A>ie)&&(L(),_($(T(),A>ie),!0)),l(Ho),r(si,j,ie,A),S.start(j,function(){l($o),r(Wo,j,ie,A),ae&&ae()})}function P(A){_(E(A,!0))}function _(A,j){if(!e.is(kr)){var ie=j?A:G(A);Mn(k,"transform","translate"+g("X")+"("+ie+"px)"),A!==ie&&r(xu)}}function G(A){if(e.is(Oo)){var j=D(A),ie=j>t.Controller.getEnd(),ae=j<0;(ae||ie)&&(A=$(A,ie))}return A}function $(A,j){var ie=A-w(j),ae=v();return A-=x(ae*(hr(vn(ie)/ae)||1))*(j?1:-1),A}function L(){_(T(),!0),S.cancel()}function D(A){for(var j=t.Slides.get(),ie=0,ae=1/0,O=0;O<j.length;O++){var oe=j[O].index,N=vn(E(oe,!0)-A);if(N<=ae)ae=N,ie=oe;else break}return ie}function E(A,j){var ie=x(p(A-1)-V(A));return j?C(ie):ie}function T(){var A=g("left");return Tn(k)[A]-Tn(f)[A]+x(u(!1))}function C(A){return n.trimSpace&&e.is(To)&&(A=lo(A,0,x(v(!0)-y()))),A}function V(A){var j=n.focus;return j==="center"?(y()-d(A,!0))/2:+j*d(A)||0}function w(A){return E(A?t.Controller.getEnd():0,!!n.trimSpace)}function q(A){var j=x($(T(),A));return A?j>=0:j<=k[g("scrollWidth")]-Tn(f)[g("width")]}function I(A,j){j=Cr(j)?T():j;var ie=A!==!0&&x(j)<x(w(!1)),ae=A!==!1&&x(j)>x(w(!0));return ie||ae}return{mount:W,move:B,jump:P,translate:_,shift:$,cancel:L,toIndex:D,toPosition:E,getPosition:T,getLimit:w,exceededLimit:I,reposition:U}}function fg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,v=p.getLength,m=n.omitEnd,g=e.is(Oo),x=e.is(To),b=Jt(T,!1),k=Jt(T,!0),f=n.start||0,S,W=f,U,B,P;function _(){G(),o([gn,sn,ha],G),o(La,$)}function G(){U=v(!0),B=n.perMove,P=n.perPage,S=q();var N=lo(f,0,m?S:U-1);N!==f&&(f=N,l.reposition())}function $(){S!==q()&&r(ha)}function L(N,le,Q){if(!oe()){var be=E(N),Pe=w(be);Pe>-1&&(le||Pe!==f)&&(ie(Pe),l.move(be,Pe,W,Q))}}function D(N,le,Q,be){t.Scroll.scroll(N,le,Q,function(){var Pe=w(l.toIndex(c()));ie(m?Ti(Pe,S):Pe),be&&be()})}function E(N){var le=f;if(Ci(N)){var Q=N.match(/([+\-<>])(\d+)?/)||[],be=Q[1],Pe=Q[2];be==="+"||be==="-"?le=C(f+ +(""+be+(+Pe||1)),f):be===">"?le=Pe?I(+Pe):b(!0):be==="<"&&(le=k(!0))}else le=g?N:lo(N,0,S);return le}function T(N,le){var Q=B||(O()?1:P),be=C(f+Q*(N?-1:1),f,!(B||O()));return be===-1&&x&&!ou(c(),d(!N),1)?N?0:S:le?be:w(be)}function C(N,le,Q){if(y()||O()){var be=V(N);be!==N&&(le=N,N=be,Q=!1),N<0||N>S?!B&&(ra(0,N,le,!0)||ra(S,le,N,!0))?N=I(A(N)):g?N=Q?N<0?-(U%P||P):U:N:n.rewind?N=N<0?S:0:N=-1:Q&&N!==le&&(N=I(A(le)+(N<le?-1:1)))}else N=-1;return N}function V(N){if(x&&n.trimSpace==="move"&&N!==f)for(var le=c();le===u(N,!0)&&ra(N,0,e.length-1,!n.rewind);)N<f?--N:++N;return N}function w(N){return g?(N+U)%U||0:N}function q(){for(var N=U-(O()||g&&B?1:P);m&&N-- >0;)if(u(U-1,!0)!==u(N,!0)){N++;break}return lo(N,0,U-1)}function I(N){return lo(O()?N:P*N,0,S)}function A(N){return O()?Ti(N,S):ga((N>=S?U-1:N)/P)}function j(N){var le=l.toIndex(N);return x?lo(le,0,S):le}function ie(N){N!==f&&(W=f,f=N)}function ae(N){return N?W:f}function O(){return!Cr(n.focus)||n.isNavigation}function oe(){return e.state.is([Ho,$r])&&!!n.waitForTransition}return{mount:_,go:L,scroll:D,getNext:b,getPrev:k,getAdjacent:T,getEnd:q,setIndex:ie,getIndex:ae,toIndex:I,toPage:A,toDest:j,hasFocus:O,isBusy:oe}}var yg="http://www.w3.org/2000/svg",vg="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",Ar=40;function xg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,v=u.track,m=y,g=u.prev,x=u.next,b,k,f={};function S(){U(),o(gn,W)}function W(){B(),S()}function U(){var D=n.arrows;D&&!(g&&x)&&G(),g&&x&&(mr(f,{prev:g,next:x}),gr(m,D?"":"none"),Bn(m,k=wl+"--"+n.direction),D&&(P(),L(),Nt([g,x],Rr,v.id),l(mu,g,x)))}function B(){i.destroy(),ni(m,k),b?(qi(y?[g,x]:m),g=x=null):jn([g,x],Sl)}function P(){o([ki,Wo,sn,Yi,ha],L),r(x,"click",Jt(_,">")),r(g,"click",Jt(_,"<"))}function _(D){p.go(D,!0)}function G(){m=y||vo("div",c.arrows),g=$(!0),x=$(!1),b=!0,Lr(m,[g,x]),!y&&cl(m,v)}function $(D){var E='<button class="'+c.arrow+" "+(D?c.prev:c.next)+'" type="button"><svg xmlns="'+yg+'" viewBox="0 0 '+Ar+" "+Ar+'" width="'+Ar+'" height="'+Ar+'" focusable="false"><path d="'+(n.arrowPath||vg)+'" />';return nu(E)}function L(){if(g&&x){var D=e.index,E=p.getPrev(),T=p.getNext(),C=E>-1&&D<E?d.last:d.prev,V=T>-1&&D>T?d.first:d.next;g.disabled=E<0,x.disabled=T<0,Nt(g,Pn,C),Nt(x,Pn,V),l(gu,g,x,E,T)}}return{arrows:f,mount:S,destroy:B,update:L}}var bg=ul+"-interval";function Sg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.emit,c=Ia(n.interval,e.go.bind(e,">"),P),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,v=p.toggle,m=n.autoplay,g,x,b=m==="pause";function k(){m&&(f(),v&&Nt(v,Rr,u.track.id),b||S(),B())}function f(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(G){g=G.type==="mouseenter",U()}),n.pauseOnFocus&&r(y,"focusin focusout",function(G){x=G.type==="focusin",U()}),v&&r(v,"click",function(){b?S():W(!0)}),o([si,Pa,sn],c.rewind),o(si,_)}function S(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),x=g=b=!1,B(),l(fl))}function W(G){G===void 0&&(G=!0),b=!!G,B(),d()||(c.pause(),l(yl))}function U(){b||(g||x?W(!1):S())}function B(){v&&(ti(v,Ui,!b),Nt(v,Pn,n.i18n[b?"play":"pause"]))}function P(G){var $=u.bar;$&&Mn($,"width",G*100+"%"),l(yu,G)}function _(G){var $=t.Slides.getAt(G);c.set($&&+An($.slide,bg)||n.interval)}return{mount:k,destroy:c.cancel,play:S,pause:W,isPaused:d}}function wg(e,t,n){var i=on(e),o=i.on;function r(){n.cover&&(o(vl,Jt(c,!0)),o([ki,gn,sn],Jt(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var $g=10,Cg=600,Tg=.6,Lg=1.5,Pg=800;function Ig(e,t,n){var i=on(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,v=e.is(To),m,g,x=1;function b(){o(si,W),o([gn,sn],U)}function k(P,_,G,$,L){var D=d();if(W(),G&&(!v||!p())){var E=t.Layout.sliderSize(),T=Fs(P)*E*ga(vn(P)/E)||0;P=c.toPosition(t.Controller.toDest(P%E))+T}var C=ou(D,P,1);x=1,_=C?0:_||ma(vn(P-D)/Lg,Pg),g=$,m=Ia(_,f,Jt(S,D,P,L),1),l($r),r(Pa),m.start()}function f(){l($o),g&&g(),r(Yi)}function S(P,_,G,$){var L=d(),D=P+(_-P)*B($),E=(D-L)*x;y(L+E),v&&!G&&p()&&(x*=Tg,vn(E)<$g&&k(u(p(!0)),Cg,!1,g,!0))}function W(){m&&m.cancel()}function U(){m&&!m.isPaused()&&(W(),f())}function B(P){var _=n.easingFunc;return _?_(P):1-Math.pow(1-P,4)}return{mount:b,destroy:W,scroll:k,cancel:U}}var co={passive:!1,capture:!0};function Rg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,v=t.Elements.track,m=t.Media.reduce,g=t.Direction,x=g.resolve,b=g.orient,k=u.getPosition,f=u.exceededLimit,S,W,U,B,P,_=!1,G,$,L;function D(){l(v,qa,Ms,co),l(v,Ua,Ms,co),l(v,Mu,T,co),l(v,"click",w,{capture:!0}),l(v,"dragstart",Qn),o([ki,gn],E)}function E(){var Y=n.drag;ce(!Y),B=Y==="free"}function T(Y){if(G=!1,!$){var se=Pe(Y);be(Y.target)&&(se||!Y.button)&&(y.isBusy()?Qn(Y,!0):(L=se?v:window,P=d.is([Ho,$r]),U=null,l(L,qa,C,co),l(L,Ua,V,co),u.cancel(),p.cancel(),q(Y)))}}function C(Y){if(d.is(ia)||(d.set(ia),r(du)),Y.cancelable)if(P){u.translate(S+Q(O(Y)));var se=oe(Y)>rc,pe=_!==(_=f());(se||pe)&&q(Y),G=!0,r(uu),Qn(Y)}else j(Y)&&(P=A(Y),Qn(Y))}function V(Y){d.is(ia)&&(d.set($o),r(pu)),P&&(I(Y),Qn(Y)),c(L,qa,C),c(L,Ua,V),P=!1}function w(Y){!$&&G&&Qn(Y,!0)}function q(Y){U=W,W=Y,S=k()}function I(Y){var se=ie(Y),pe=ae(se),fe=n.rewind&&n.rewindByDrag;m(!1),B?y.scroll(pe,0,n.snap):e.is(kr)?y.go(b(Fs(se))<0?fe?"<":"-":fe?">":"+"):e.is(To)&&_&&fe?y.go(f(!0)?">":"<"):y.go(y.toDest(pe),!0),m(!0)}function A(Y){var se=n.dragMinThreshold,pe=dr(se),fe=pe&&se.mouse||0,we=(pe?se.touch:+se)||10;return vn(O(Y))>(Pe(Y)?we:fe)}function j(Y){return vn(O(Y))>vn(O(Y,!0))}function ie(Y){if(e.is(Oo)||!_){var se=oe(Y);if(se&&se<rc)return O(Y)/se}return 0}function ae(Y){return k()+Fs(Y)*Ti(vn(Y)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(Y,se){return le(Y,se)-le(N(Y),se)}function oe(Y){return As(Y)-As(N(Y))}function N(Y){return W===Y&&U||W}function le(Y,se){return(Pe(Y)?Y.changedTouches[0]:Y)["page"+x(se?"Y":"X")]}function Q(Y){return Y/(_&&e.is(To)?lg:1)}function be(Y){var se=n.noDrag;return!ur(Y,"."+Pu+", ."+Fa)&&(!se||!ur(Y,se))}function Pe(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function ye(){return P}function ce(Y){$=Y}return{mount:D,disable:ce,isDragging:ye}}var kg={Spacebar:" ",Right:Ea,Left:ka,Up:bu,Down:Su};function $l(e){return e=Ci(e)?e:e.key,kg[e]||e}var ac="keydown";function Eg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){v(),o(gn,m),o(gn,v),o(si,x)}function v(){var k=n.keyboard;k&&(u=k==="global"?window:c,r(u,ac,b))}function m(){l(u,ac)}function g(k){p=k}function x(){var k=p;p=!0,Zd(function(){p=k})}function b(k){if(!p){var f=$l(k);f===d(ka)?e.go("<"):f===d(Ea)&&e.go(">")}}return{mount:y,destroy:m,disable:g}}var sr=ul+"-lazy",aa=sr+"-srcset",Mg="["+sr+"], ["+aa+"]";function Ag(e,t,n){var i=on(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Wo,Yi],p=[];function y(){n.lazyLoad&&(v(),o(sn,v))}function v(){ai(p),m(),d?k():(r(u),o(u,g),g())}function m(){t.Slides.forEach(function(f){dl(f.slide,Mg).forEach(function(S){var W=An(S,sr),U=An(S,aa);if(W!==S.src||U!==S.srcset){var B=n.classes.spinner,P=S.parentElement,_=Pr(P,"."+B)||vo("span",B,P);p.push([S,f,_]),S.src||gr(S,"none")}})})}function g(){p=p.filter(function(f){var S=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,S)?x(f):!0}),p.length||r(u)}function x(f){var S=f[0];Bn(f[1].slide,Ws),l(S,"load error",Jt(b,f)),Nt(S,"src",An(S,sr)),Nt(S,"srcset",An(S,aa)),jn(S,sr),jn(S,aa)}function b(f,S){var W=f[0],U=f[1];ni(U.slide,Ws),S.type!=="error"&&(qi(f[2]),gr(W,""),c(vl,W,U),c(Co)),d&&k()}function k(){p.length&&x(p.shift())}return{mount:y,destroy:Jt(ai,p),check:g}}function Fg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,v=u.go,m=t.Direction.resolve,g=d.pagination,x=[],b,k;function f(){S(),o([gn,sn,ha],f);var $=n.pagination;g&&gr(g,$?"":"none"),$&&(o([si,Pa,Yi],G),W(),G(),r(hu,{list:b,items:x},_(e.index)))}function S(){b&&(qi(g?Ri(b.children):b),ni(b,k),ai(x),b=null),i.destroy()}function W(){var $=e.length,L=n.classes,D=n.i18n,E=n.perPage,T=p()?u.getEnd()+1:hr($/E);b=g||vo("ul",L.pagination,d.track.parentElement),Bn(b,k=Na+"--"+P()),Nt(b,ii,"tablist"),Nt(b,Pn,D.select),Nt(b,bl,P()===Ma?"vertical":"");for(var C=0;C<T;C++){var V=vo("li",null,b),w=vo("button",{class:L.page,type:"button"},V),q=c.getIn(C).map(function(A){return A.slide.id}),I=!p()&&E>1?D.pageX:D.slideX;l(w,"click",Jt(U,C)),n.paginationKeyboard&&l(w,"keydown",Jt(B,C)),Nt(V,ii,"presentation"),Nt(w,ii,"tab"),Nt(w,Rr,q.join(" ")),Nt(w,Pn,Ns(I,C+1)),Nt(w,xo,-1),x.push({li:V,button:w,page:C})}}function U($){v(">"+$,!0)}function B($,L){var D=x.length,E=$l(L),T=P(),C=-1;E===m(Ea,!1,T)?C=++$%D:E===m(ka,!1,T)?C=(--$+D)%D:E==="Home"?C=0:E==="End"&&(C=D-1);var V=x[C];V&&(tu(V.button),v(">"+C),Qn(L,!0))}function P(){return n.paginationDirection||n.direction}function _($){return x[u.toPage($)]}function G(){var $=_(y(!0)),L=_(y());if($){var D=$.button;ni(D,Ui),jn(D,ec),Nt(D,xo,-1)}if(L){var E=L.button;Bn(E,Ui),Nt(E,ec,!0),Nt(E,xo,"")}r(fu,{list:b,items:x},$,L)}return{items:x,mount:f,destroy:S,getAt:_,update:G}}var Ng=[" ","Enter"];function _g(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(g){g.isParent||(u(e,g.splide),u(g.splide,e))}),i&&p()}function c(){r.forEach(function(g){g.destroy()}),ai(r)}function d(){c(),l()}function u(g,x){var b=on(g);b.on(si,function(k,f,S){x.go(x.is(Oo)?S:k)}),r.push(b)}function p(){var g=on(e),x=g.on;x(ml,v),x(vu,m),x([ki,gn],y),r.push(g),g.emit(hl,e.splides)}function y(){Nt(t.Elements.list,bl,n.direction===Ma?"vertical":"")}function v(g){e.go(g.index)}function m(g,x){ll(Ng,$l(x))&&(v(g),Qn(x))}return{setup:Jt(t.Media.set,{slideFocus:Cr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Hg(e,t,n){var i=on(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,co)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,v=As(u),m=n.wheelMinThreshold||0,g=n.wheelSleep||0;vn(p)>m&&v-r>g&&(e.go(y?"<":">"),r=v),d(y)&&Qn(u)}}function d(u){return!n.releaseWheel||e.state.is(Ho)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Wg=90;function Og(e,t,n){var i=on(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=vo("span",ig),d=Ia(Wg,Jt(p,!1));function u(){l&&(v(!t.Autoplay.isPaused()),Nt(r,ic,!0),c.textContent="…",o(fl,Jt(v,!0)),o(yl,Jt(v,!1)),o([Wo,Yi],Jt(p,!0)))}function p(m){Nt(r,nc,m),m?(Lr(r,c),d.start()):(qi(c),d.cancel())}function y(){jn(r,[tc,ic,nc]),qi(c)}function v(m){l&&Nt(r,tc,m?"off":"polite")}return{mount:u,disable:v,destroy:y}}var Dg=Object.freeze({__proto__:null,Media:Um,Direction:Km,Elements:cg,Slides:ug,Layout:pg,Clones:gg,Move:hg,Controller:fg,Arrows:xg,Autoplay:Sg,Cover:wg,Scroll:Ig,Drag:Rg,Keyboard:Eg,LazyLoad:Ag,Pagination:Fg,Sync:_g,Wheel:Hg,Live:Og}),zg={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"},Bg={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:ag,i18n:zg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function jg(e,t,n){var i=t.Slides;function o(){on(e).on([ki,sn],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),Zd(d)}return{mount:o,start:l,cancel:Ms}}function Vg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=Jt(Mn,l,"transition"),d;function u(){on(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,g){var x=i.toPosition(m,!0),b=i.getPosition(),k=v(m);vn(x-b)>=1&&k>=1?n.useScroll?r.scroll(x,k,!1,g):(c("transform "+k+"ms "+n.easing),i.translate(x,!0),d=g):(i.jump(m),g())}function y(){c(""),r.cancel()}function v(m){var g=n.rewindSpeed;if(e.is(To)&&g){var x=o.getIndex(!0),b=o.getEnd();if(x===0&&m>=b||x>=b&&m===0)return g}return n.speed}return{mount:u,start:p,cancel:y}}var Gg=(function(){function e(n,i){this.event=on(),this.Components={},this.state=Xm(mo),this.splides=[],this._o={},this._E={};var o=Ci(n)?iu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=bi({label:An(o,Pn)||"",labelledby:An(o,xl)||""},Bg,e.defaults,i||{});try{bi(i,JSON.parse(An(o,ul)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(bi({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([mo,pa]),"Already mounted!"),l.set(mo),this._C=c,this._T=o||this._T||(this.is(kr)?jg:Vg),this._E=i||this._E;var d=mr({},Dg,this._E,{Transition:this._T});return Gi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(ki),Bn(this.root,og),l.set($o),this.emit(_s),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is($o)&&(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(Ri(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(sn),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(mo)?on(this).on(_s,this.destroy.bind(this,i)):(Gi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(gl),o.destroy(),i&&ai(this.splides),r.set(pa)),this},zm(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})(),Cl=Gg;Cl.defaults={};Cl.STATES=jm;var sc=[[ki,"onMounted"],[_s,"onReady"],[si,"onMove"],[Wo,"onMoved"],[ml,"onClick"],[au,"onActive"],[su,"onInactive"],[lu,"onVisible"],[cu,"onHidden"],[sn,"onRefresh"],[gn,"onUpdated"],[Co,"onResize"],[La,"onResized"],[du,"onDrag"],[uu,"onDragging"],[pu,"onDragged"],[Pa,"onScroll"],[Yi,"onScrolled"],[gl,"onDestroy"],[mu,"onArrowsMounted"],[gu,"onArrowsUpdated"],[hu,"onPaginationMounted"],[fu,"onPaginationUpdated"],[hl,"onNavigationMounted"],[fl,"onAutoplayPlay"],[yu,"onAutoplayPlaying"],[yl,"onAutoplayPause"],[vl,"onLazyLoadLoaded"]];function Tl(...e){return e.filter(Boolean).join(" ")}function fa(e){return e!==null&&typeof e=="object"}function Os(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Os(n,t[i]));if(fa(e)&&fa(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Os(e[o],t[o]))}return e===t}function Xg(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function qg(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 Ds(e,t){const n=e;return qg(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():fa(i)?n[o]=Ds(fa(n[o])?n[o]:{},i):n[o]=i}),n}var Ug=({children:e,className:t,...n})=>s.createElement("div",{className:Tl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Ll=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Cl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ds({},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&&!Os(this.options,e)&&(this.splide.options=e,this.options=Ds({},e));const t=this.getSlides();Xg(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){sc.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 s.createElement(t,{className:Tl("splide",e),ref:this.splideRef,...this.omit(o,["options",...sc.map(r=>r[1])])},n?s.createElement(Ug,null,i):i)}},Pl=({children:e,className:t,...n})=>s.createElement("li",{className:Tl("splide__slide",t),...n},e);/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),Ct=require("classnames"),R=require("./LinkWrapper-CM1Wd42k.js"),Gn=require("react-dom");function Yp(e){return e.type==="object"&&e.version===1}const Zp="ControlSlider-module__wrapper___sHEkd",Jp="ControlSlider-module__hoverArrow___A-dOH",Qp="ControlSlider-module__sliderItem___QQSkR",em="ControlSlider-module__sliderImage___9hRl-",tm="ControlSlider-module__arrow___05ghY",nm="ControlSlider-module__arrowVertical___tBfVN",im="ControlSlider-module__nextArrow___-30Yc",om="ControlSlider-module__arrowInner___aEra3",rm="ControlSlider-module__arrowIcon___S4ztF",am="ControlSlider-module__arrowImg___2dwJW",sm="ControlSlider-module__mirror___brd6U",lm="ControlSlider-module__pagination___bicLF",cm="ControlSlider-module__paginationInner___bT-P-",dm="ControlSlider-module__paginationVertical___zYqKw",um="ControlSlider-module__paginationItem___nTRbk",pm="ControlSlider-module__dot___p1Qun",mm="ControlSlider-module__activeDot___LHFaj",gm="ControlSlider-module__paginationInsideBottom___R3FWn",hm="ControlSlider-module__paginationInsideTop___V-qb-",fm="ControlSlider-module__paginationOutsideBottom___14w8D",ym="ControlSlider-module__paginationOutsideTop___SCLqB",vm="ControlSlider-module__paginationInsideLeft___yOBRZ",xm="ControlSlider-module__paginationInsideRight___Rtt3o",bm="ControlSlider-module__paginationOutsideLeft___lahaw",Sm="ControlSlider-module__paginationOutsideRight___EtuQa",wm="ControlSlider-module__imgWrapper___UjEgB",$m="ControlSlider-module__captionBlock___dJ6-j",Cm="ControlSlider-module__captionTextWrapper___HFlpf",Tm="ControlSlider-module__captionText___uGBVc",Lm="ControlSlider-module__active___WZK4G",Pm="ControlSlider-module__withPointerEvents___t-18M",Im="ControlSlider-module__topLeftAlignment___zjnGM",Rm="ControlSlider-module__topCenterAlignment___gD1xW",km="ControlSlider-module__topRightAlignment___NMapS",Em="ControlSlider-module__middleLeftAlignment___OnUrY",Mm="ControlSlider-module__middleCenterAlignment___Tdkl0",Am="ControlSlider-module__middleRightAlignment___wEbfX",Fm="ControlSlider-module__bottomLeftAlignment___cTP2-",Nm="ControlSlider-module__bottomCenterAlignment___c54fB",_m="ControlSlider-module__bottomRightAlignment___kEwrz",Hm="ControlSlider-module__clickOverlay___DZA28",Wm="ControlSlider-module__contain___pLyq7",Om="ControlSlider-module__cover___KdDat",wt={wrapper:Zp,hoverArrow:Jp,sliderItem:Qp,sliderImage:em,arrow:tm,arrowVertical:nm,nextArrow:im,arrowInner:om,arrowIcon:rm,arrowImg:am,mirror:sm,pagination:lm,paginationInner:cm,paginationVertical:dm,paginationItem:um,dot:pm,activeDot:mm,paginationInsideBottom:gm,paginationInsideTop:hm,paginationOutsideBottom:fm,paginationOutsideTop:ym,paginationInsideLeft:vm,paginationInsideRight:xm,paginationOutsideLeft:bm,paginationOutsideRight:Sm,imgWrapper:wm,captionBlock:$m,captionTextWrapper:Cm,captionText:Tm,active:Lm,withPointerEvents:Pm,topLeftAlignment:Im,topCenterAlignment:Rm,topRightAlignment:km,middleLeftAlignment:Em,middleCenterAlignment:Mm,middleRightAlignment:Am,bottomLeftAlignment:Fm,bottomCenterAlignment:Nm,bottomRightAlignment:_m,clickOverlay:Hm,contain:Wm,cover:Om};function Dm(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 zm(e,t,n){return t&&Dm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}var Ul="(prefers-reduced-motion: reduce)",po=1,Bm=2,wo=3,_o=4,$r=5,ia=6,pa=7,jm={CREATED:po,MOUNTED:Bm,IDLE:wo,MOVING:_o,SCROLLING:$r,DRAGGING:ia,DESTROYED:pa};function ai(e){e.length=0}function Ri(e,t,n){return Array.prototype.slice.call(e,t,n)}function Jt(e){return e.bind.apply(e,[null].concat(Ri(arguments,1)))}var Zd=setTimeout,Ms=function(){};function Kl(e){return requestAnimationFrame(e)}function Ta(e,t){return typeof t===e}function dr(e){return!sl(e)&&Ta("object",e)}var al=Array.isArray,Jd=Jt(Ta,"function"),Ci=Jt(Ta,"string"),Cr=Jt(Ta,"undefined");function sl(e){return e===null}function Qd(e){try{return e instanceof(e.ownerDocument.defaultView||window).HTMLElement}catch{return!1}}function Tr(e){return al(e)?e:[e]}function Rn(e,t){Tr(e).forEach(t)}function ll(e,t){return e.indexOf(t)>-1}function oa(e,t){return e.push.apply(e,Tr(t)),e}function ti(e,t,n){e&&Rn(t,function(i){i&&e.classList[n?"add":"remove"](i)})}function Bn(e,t){ti(e,Ci(t)?t.split(" "):t,!0)}function Lr(e,t){Rn(t,e.appendChild.bind(e))}function cl(e,t){Rn(e,function(n){var i=(t||n).parentNode;i&&i.insertBefore(n,t)})}function ur(e,t){return Qd(e)&&(e.msMatchesSelector||e.matches).call(e,t)}function eu(e,t){var n=e?Ri(e.children):[];return t?n.filter(function(i){return ur(i,t)}):n}function Pr(e,t){return t?eu(e,t)[0]:e.firstElementChild}var pr=Object.keys;function Gi(e,t,n){return e&&(n?pr(e).reverse():pr(e)).forEach(function(i){i!=="__proto__"&&t(e[i],i)}),e}function mr(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){e[i]=t[i]})}),e}function bi(e){return Ri(arguments,1).forEach(function(t){Gi(t,function(n,i){al(n)?e[i]=n.slice():dr(n)?e[i]=bi({},dr(e[i])?e[i]:{},n):e[i]=n})}),e}function Yl(e,t){Rn(t||pr(e),function(n){delete e[n]})}function jn(e,t){Rn(e,function(n){Rn(t,function(i){n&&n.removeAttribute(i)})})}function _t(e,t,n){dr(t)?Gi(t,function(i,o){_t(e,o,i)}):Rn(e,function(i){sl(n)||n===""?jn(i,t):i.setAttribute(t,String(n))})}function yo(e,t,n){var i=document.createElement(e);return t&&(Ci(t)?Bn(i,t):_t(i,t)),n&&Lr(n,i),i}function Mn(e,t,n){if(Cr(n))return getComputedStyle(e)[t];sl(n)||(e.style[t]=""+n)}function gr(e,t){Mn(e,"display",t)}function tu(e){e.setActive&&e.setActive()||e.focus({preventScroll:!0})}function An(e,t){return e.getAttribute(t)}function Zl(e,t){return e&&e.classList.contains(t)}function Tn(e){return e.getBoundingClientRect()}function qi(e){Rn(e,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function nu(e){return Pr(new DOMParser().parseFromString(e,"text/html").body)}function Qn(e,t){e.preventDefault(),t&&(e.stopPropagation(),e.stopImmediatePropagation())}function iu(e,t){return e&&e.querySelector(t)}function dl(e,t){return t?Ri(e.querySelectorAll(t)):[]}function ni(e,t){ti(e,t,!1)}function As(e){return e.timeStamp}function Ai(e){return Ci(e)?e:e?e+"px":""}var Ir="splide",ul="data-"+Ir;function ar(e,t){if(!e)throw new Error("["+Ir+"] "+(t||""))}var Ti=Math.min,ma=Math.max,ga=Math.floor,hr=Math.ceil,vn=Math.abs;function ou(e,t,n){return vn(e-t)<n}function ra(e,t,n,i){var o=Ti(t,n),r=ma(t,n);return i?o<e&&e<r:o<=e&&e<=r}function so(e,t,n){var i=Ti(t,n),o=ma(t,n);return Ti(ma(i,e),o)}function Fs(e){return+(e>0)-+(e<0)}function Ns(e,t){return Rn(t,function(n){e=e.replace("%s",""+n)}),e}function pl(e){return e<10?"0"+e:""+e}var Jl={};function Vm(e){return""+e+pl(Jl[e]=(Jl[e]||0)+1)}function ru(){var e=[];function t(l,c,d,u){o(l,c,function(p,y,x){var m="addEventListener"in p,g=m?p.removeEventListener.bind(p,y,d,u):p.removeListener.bind(p,d);m?p.addEventListener(y,d,u):p.addListener(d),e.push([p,y,x,d,g])})}function n(l,c,d){o(l,c,function(u,p,y){e=e.filter(function(x){return x[0]===u&&x[1]===p&&x[2]===y&&(!d||x[3]===d)?(x[4](),!1):!0})})}function i(l,c,d){var u,p=!0;return typeof CustomEvent=="function"?u=new CustomEvent(c,{bubbles:p,detail:d}):(u=document.createEvent("CustomEvent"),u.initCustomEvent(c,p,!1,d)),l.dispatchEvent(u),u}function o(l,c,d){Rn(l,function(u){u&&Rn(c,function(p){p.split(" ").forEach(function(y){var x=y.split(".");d(u,x[0],x[1])})})})}function r(){e.forEach(function(l){l[4]()}),ai(e)}return{bind:t,unbind:n,dispatch:i,destroy:r}}var ki="mounted",_s="ready",si="move",Ho="moved",ml="click",au="active",su="inactive",lu="visible",cu="hidden",sn="refresh",gn="updated",$o="resize",La="resized",du="drag",uu="dragging",pu="dragged",Pa="scroll",Yi="scrolled",Gm="overflow",gl="destroy",mu="arrows:mounted",gu="arrows:updated",hu="pagination:mounted",fu="pagination:updated",hl="navigation:mounted",fl="autoplay:play",yu="autoplay:playing",yl="autoplay:pause",vl="lazyload:loaded",vu="sk",xu="sh",ha="ei";function on(e){var t=e?e.event.bus:document.createDocumentFragment(),n=ru();function i(r,l){n.bind(t,Tr(r).join(" "),function(c){l.apply(l,al(c.detail)?c.detail:[])})}function o(r){n.dispatch(t,r,Ri(arguments,1))}return e&&e.event.on(gl,n.destroy),mr(n,{bus:t,on:i,off:Jt(n.unbind,t),emit:o})}function Ia(e,t,n,i){var o=Date.now,r,l=0,c,d=!0,u=0;function p(){if(!d){if(l=e?Ti((o()-r)/e,1):1,n&&n(l),l>=1&&(t(),r=o(),i&&++u>=i))return x();c=Kl(p)}}function y(M){M||g(),r=o()-(M?l*e:0),d=!1,c=Kl(p)}function x(){d=!0}function m(){r=o(),l=0,n&&n(l)}function g(){c&&cancelAnimationFrame(c),l=0,c=0,d=!0}function v(M){e=M}function b(){return d}return{start:y,rewind:m,pause:x,cancel:g,set:v,isPaused:b}}function Xm(e){var t=e;function n(o){t=o}function i(o){return ll(Tr(o),t)}return{set:n,is:i}}function qm(e,t){var n=Ia(0,e,null,1);return function(){n.isPaused()&&n.start()}}function Um(e,t,n){var i=e.state,o=n.breakpoints||{},r=n.reducedMotion||{},l=ru(),c=[];function d(){var g=n.mediaQuery==="min";pr(o).sort(function(v,b){return g?+v-+b:+b-+v}).forEach(function(v){p(o[v],"("+(g?"min":"max")+"-width:"+v+"px)")}),p(r,Ul),y()}function u(g){g&&l.destroy()}function p(g,v){var b=matchMedia(v);l.bind(b,"change",y),c.push([g,b])}function y(){var g=i.is(pa),v=n.direction,b=c.reduce(function(M,f){return bi(M,f[1].matches?f[0]:{})},{});Yl(n),m(b),n.destroy?e.destroy(n.destroy==="completely"):g?(u(!0),e.mount()):v!==n.direction&&e.refresh()}function x(g){matchMedia(Ul).matches&&(g?bi(n,r):Yl(n,pr(r)))}function m(g,v,b){bi(n,g),v&&bi(Object.getPrototypeOf(n),g),(b||!i.is(po))&&e.emit(gn,n)}return{setup:d,destroy:u,reduce:x,set:m}}var Ra="Arrow",ka=Ra+"Left",Ea=Ra+"Right",bu=Ra+"Up",Su=Ra+"Down",Ql="rtl",Ma="ttb",Ga={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[bu,Ea],ArrowRight:[Su,ka]};function Km(e,t,n){function i(r,l,c){c=c||n.direction;var d=c===Ql&&!l?1:c===Ma?0:-1;return Ga[r]&&Ga[r][d]||r.replace(/width|left|right/i,function(u,p){var y=Ga[u.toLowerCase()][d]||u;return p>0?y.charAt(0).toUpperCase()+y.slice(1):y})}function o(r){return r*(n.direction===Ql?1:-1)}return{resolve:i,orient:o}}var ii="role",vo="tabindex",Ym="disabled",Fn="aria-",Rr=Fn+"controls",wu=Fn+"current",ec=Fn+"selected",Pn=Fn+"label",xl=Fn+"labelledby",$u=Fn+"hidden",bl=Fn+"orientation",fr=Fn+"roledescription",tc=Fn+"live",nc=Fn+"busy",ic=Fn+"atomic",Sl=[ii,vo,Ym,Rr,wu,Pn,xl,$u,bl,fr],Xn=Ir+"__",Ei="is-",Xa=Ir,oc=Xn+"track",Zm=Xn+"list",Aa=Xn+"slide",Cu=Aa+"--clone",Jm=Aa+"__container",wl=Xn+"arrows",Fa=Xn+"arrow",Tu=Fa+"--prev",Lu=Fa+"--next",Na=Xn+"pagination",Pu=Na+"__page",Qm=Xn+"progress",eg=Qm+"__bar",tg=Xn+"toggle",ng=Xn+"spinner",ig=Xn+"sr",og=Ei+"initialized",Ui=Ei+"active",Iu=Ei+"prev",Ru=Ei+"next",Hs=Ei+"visible",Ws=Ei+"loading",ku=Ei+"focus-in",Eu=Ei+"overflow",rg=[Ui,Hs,Iu,Ru,Ws,ku,Eu],ag={slide:Aa,clone:Cu,arrows:wl,arrow:Fa,prev:Tu,next:Lu,pagination:Na,page:Pu,spinner:ng};function sg(e,t){if(Jd(e.closest))return e.closest(t);for(var n=e;n&&n.nodeType===1&&!ur(n,t);)n=n.parentElement;return n}var lg=5,rc=200,Mu="touchstart mousedown",qa="touchmove mousemove",Ua="touchend touchcancel mouseup click";function cg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=e.root,c=n.i18n,d={},u=[],p=[],y=[],x,m,g;function v(){S(),W(),f()}function b(){o(sn,M),o(sn,v),o(gn,f),r(document,Mu+" keydown",function(P){g=P.type==="keydown"},{capture:!0}),r(l,"focusin",function(){ti(l,ku,!!g)})}function M(P){var H=Sl.concat("style");ai(u),ni(l,p),ni(x,y),jn([x,m],H),jn(l,P?H:["style",fr])}function f(){ni(l,p),ni(x,y),p=B(Xa),y=B(oc),Bn(l,p),Bn(x,y),_t(l,Pn,n.label),_t(l,xl,n.labelledby)}function S(){x=U("."+oc),m=Pr(x,"."+Zm),ar(x&&m,"A track/list element is missing."),oa(u,eu(m,"."+Aa+":not(."+Cu+")")),Gi({arrows:wl,pagination:Na,prev:Tu,next:Lu,bar:eg,toggle:tg},function(P,H){d[H]=U("."+P)}),mr(d,{root:l,track:x,list:m,slides:u})}function W(){var P=l.id||Vm(Ir),H=n.role;l.id=P,x.id=x.id||P+"-track",m.id=m.id||P+"-list",!An(l,ii)&&l.tagName!=="SECTION"&&H&&_t(l,ii,H),_t(l,fr,c.carousel),_t(m,ii,"presentation")}function U(P){var H=iu(l,P);return H&&sg(H,"."+Xa)===l?H:void 0}function B(P){return[P+"--"+n.type,P+"--"+n.direction,n.drag&&P+"--draggable",n.isNavigation&&P+"--nav",P===Xa&&Ui]}return mr(d,{setup:v,mount:b,destroy:M})}var Co="slide",Wo="loop",kr="fade";function dg(e,t,n,i){var o=on(e),r=o.on,l=o.emit,c=o.bind,d=e.Components,u=e.root,p=e.options,y=p.isNavigation,x=p.updateOnMove,m=p.i18n,g=p.pagination,v=p.slideFocus,b=d.Direction.resolve,M=An(i,"style"),f=An(i,Pn),S=n>-1,W=Pr(i,"."+Jm),U;function B(){S||(i.id=u.id+"-slide"+pl(t+1),_t(i,ii,g?"tabpanel":"group"),_t(i,fr,m.slide),_t(i,Pn,f||Ns(m.slideLabel,[t+1,e.length]))),P()}function P(){c(i,"click",Jt(l,ml,q)),c(i,"keydown",Jt(l,vu,q)),r([Ho,xu,Yi],L),r(hl,V),x&&r(si,$)}function H(){U=!0,o.destroy(),ni(i,rg),jn(i,Sl),_t(i,"style",M),_t(i,Pn,f||"")}function V(){var k=e.splides.map(function(N){var j=N.splide.Components.Slides.getAt(t);return j?j.slide.id:""}).join(" ");_t(i,Pn,Ns(m.slideX,(S?n:t)+1)),_t(i,Rr,k),_t(i,ii,v?"button":""),v&&jn(i,fr)}function $(){U||L()}function L(){if(!U){var k=e.index;D(),A(),ti(i,Iu,t===k-1),ti(i,Ru,t===k+1)}}function D(){var k=C();k!==Zl(i,Ui)&&(ti(i,Ui,k),_t(i,wu,y&&k||""),l(k?au:su,q))}function A(){var k=X(),N=!k&&(!C()||S);if(e.state.is([_o,$r])||_t(i,$u,N||""),_t(dl(i,p.focusableNodes||""),vo,N?-1:""),v&&_t(i,vo,N?-1:0),k!==Zl(i,Hs)&&(ti(i,Hs,k),l(k?lu:cu,q)),!k&&document.activeElement===i){var j=d.Slides.getAt(e.index);j&&tu(j.slide)}}function T(k,N,j){Mn(j&&W||i,k,N)}function C(){var k=e.index;return k===t||p.cloneStatus&&k===n}function X(){if(e.is(kr))return C();var k=Tn(d.Elements.track),N=Tn(i),j=b("left",!0),ie=b("right",!0);return ga(k[j])<=hr(N[j])&&ga(N[ie])<=hr(k[ie])}function w(k,N){var j=vn(k-t);return!S&&(p.rewind||e.is(Wo))&&(j=Ti(j,e.length-j)),j<=N}var q={index:t,slideIndex:n,slide:i,container:W,isClone:S,mount:B,destroy:H,update:L,style:T,isWithin:w};return q}function ug(e,t,n){var i=on(e),o=i.on,r=i.emit,l=i.bind,c=t.Elements,d=c.slides,u=c.list,p=[];function y(){x(),o(sn,m),o(sn,x)}function x(){d.forEach(function(L,D){v(L,D,-1)})}function m(){U(function(L){L.destroy()}),ai(p)}function g(){U(function(L){L.update()})}function v(L,D,A){var T=dg(e,D,A,L);T.mount(),p.push(T),p.sort(function(C,X){return C.index-X.index})}function b(L){return L?B(function(D){return!D.isClone}):p}function M(L){var D=t.Controller,A=D.toIndex(L),T=D.hasFocus()?1:n.perPage;return B(function(C){return ra(C.index,A,A+T-1)})}function f(L){return B(L)[0]}function S(L,D){Rn(L,function(A){if(Ci(A)&&(A=nu(A)),Qd(A)){var T=d[D];T?cl(A,T):Lr(u,A),Bn(A,n.classes.slide),H(A,Jt(r,$o))}}),r(sn)}function W(L){qi(B(L).map(function(D){return D.slide})),r(sn)}function U(L,D){b(D).forEach(L)}function B(L){return p.filter(Jd(L)?L:function(D){return Ci(L)?ur(D.slide,L):ll(Tr(L),D.index)})}function P(L,D,A){U(function(T){T.style(L,D,A)})}function H(L,D){var A=dl(L,"img"),T=A.length;T?A.forEach(function(C){l(C,"load error",function(){--T||D()})}):D()}function V(L){return L?d.length:p.length}function $(){return p.length>n.perPage}return{mount:y,destroy:m,update:g,register:v,get:b,getIn:M,getAt:f,add:S,remove:W,forEach:U,filter:B,style:P,getLength:V,isEnough:$}}function pg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.emit,c=t.Slides,d=t.Direction.resolve,u=t.Elements,p=u.root,y=u.track,x=u.list,m=c.getAt,g=c.style,v,b,M;function f(){S(),r(window,"resize load",qm(Jt(l,$o))),o([gn,sn],S),o($o,W)}function S(){v=n.direction===Ma,Mn(p,"maxWidth",Ai(n.width)),Mn(y,d("paddingLeft"),U(!1)),Mn(y,d("paddingRight"),U(!0)),W(!0)}function W(q){var k=Tn(p);(q||b.width!==k.width||b.height!==k.height)&&(Mn(y,"height",B()),g(d("marginRight"),Ai(n.gap)),g("width",H()),g("height",V(),!0),b=k,l(La),M!==(M=w())&&(ti(p,Eu,M),l(Gm,M)))}function U(q){var k=n.padding,N=d(q?"right":"left");return k&&Ai(k[N]||(dr(k)?0:k))||"0px"}function B(){var q="";return v&&(q=P(),ar(q,"height or heightRatio is missing."),q="calc("+q+" - "+U(!1)+" - "+U(!0)+")"),q}function P(){return Ai(n.height||Tn(x).width*n.heightRatio)}function H(){return n.autoWidth?null:Ai(n.fixedWidth)||(v?"":$())}function V(){return Ai(n.fixedHeight)||(v?n.autoHeight?null:$():P())}function $(){var q=Ai(n.gap);return"calc((100%"+(q&&" + "+q)+")/"+(n.perPage||1)+(q&&" - "+q)+")"}function L(){return Tn(x)[d("width")]}function D(q,k){var N=m(q||0);return N?Tn(N.slide)[d("width")]+(k?0:C()):0}function A(q,k){var N=m(q);if(N){var j=Tn(N.slide)[d("right")],ie=Tn(x)[d("left")];return vn(j-ie)+(k?0:C())}return 0}function T(q){return A(e.length-1)-A(0)+D(0,q)}function C(){var q=m(0);return q&&parseFloat(Mn(q.slide,d("marginRight")))||0}function X(q){return parseFloat(Mn(y,d("padding"+(q?"Right":"Left"))))||0}function w(){return e.is(kr)||T(!0)>L()}return{mount:f,resize:W,listSize:L,slideSize:D,sliderSize:T,totalSize:A,getPadding:X,isOverflow:w}}var mg=2;function gg(e,t,n){var i=on(e),o=i.on,r=t.Elements,l=t.Slides,c=t.Direction.resolve,d=[],u;function p(){o(sn,y),o([gn,$o],m),(u=b())&&(g(u),t.Layout.resize(!0))}function y(){x(),p()}function x(){qi(d),ai(d),i.destroy()}function m(){var M=b();u!==M&&(u<M||!M)&&i.emit(sn)}function g(M){var f=l.get().slice(),S=f.length;if(S){for(;f.length<M;)oa(f,f);oa(f.slice(-M),f.slice(0,M)).forEach(function(W,U){var B=U<M,P=v(W.slide,U);B?cl(P,f[0].slide):Lr(r.list,P),oa(d,P),l.register(P,U-M+(B?0:S),W.index)})}}function v(M,f){var S=M.cloneNode(!0);return Bn(S,n.classes.clone),S.id=e.root.id+"-clone"+pl(f+1),S}function b(){var M=n.clones;if(!e.is(Wo))M=0;else if(Cr(M)){var f=n[c("fixedWidth")]&&t.Layout.slideSize(0),S=f&&hr(Tn(r.track)[c("width")]/f);M=S||n[c("autoWidth")]&&e.length||n.perPage*mg}return M}return{mount:p,destroy:x}}function hg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=e.state.set,c=t.Layout,d=c.slideSize,u=c.getPadding,p=c.totalSize,y=c.listSize,x=c.sliderSize,m=t.Direction,g=m.resolve,v=m.orient,b=t.Elements,M=b.list,f=b.track,S;function W(){S=t.Transition,o([ki,La,gn,sn],U)}function U(){t.Controller.isBusy()||(t.Scroll.cancel(),P(e.index),t.Slides.update())}function B(N,j,ie,ae){N!==j&&q(N>ie)&&(L(),H($(T(),N>ie),!0)),l(_o),r(si,j,ie,N),S.start(j,function(){l(wo),r(Ho,j,ie,N),ae&&ae()})}function P(N){H(A(N,!0))}function H(N,j){if(!e.is(kr)){var ie=j?N:V(N);Mn(M,"transform","translate"+g("X")+"("+ie+"px)"),N!==ie&&r(xu)}}function V(N){if(e.is(Wo)){var j=D(N),ie=j>t.Controller.getEnd(),ae=j<0;(ae||ie)&&(N=$(N,ie))}return N}function $(N,j){var ie=N-w(j),ae=x();return N-=v(ae*(hr(vn(ie)/ae)||1))*(j?1:-1),N}function L(){H(T(),!0),S.cancel()}function D(N){for(var j=t.Slides.get(),ie=0,ae=1/0,O=0;O<j.length;O++){var oe=j[O].index,_=vn(A(oe,!0)-N);if(_<=ae)ae=_,ie=oe;else break}return ie}function A(N,j){var ie=v(p(N-1)-X(N));return j?C(ie):ie}function T(){var N=g("left");return Tn(M)[N]-Tn(f)[N]+v(u(!1))}function C(N){return n.trimSpace&&e.is(Co)&&(N=so(N,0,v(x(!0)-y()))),N}function X(N){var j=n.focus;return j==="center"?(y()-d(N,!0))/2:+j*d(N)||0}function w(N){return A(N?t.Controller.getEnd():0,!!n.trimSpace)}function q(N){var j=v($(T(),N));return N?j>=0:j<=M[g("scrollWidth")]-Tn(f)[g("width")]}function k(N,j){j=Cr(j)?T():j;var ie=N!==!0&&v(j)<v(w(!1)),ae=N!==!1&&v(j)>v(w(!0));return ie||ae}return{mount:W,move:B,jump:P,translate:H,shift:$,cancel:L,toIndex:D,toPosition:A,getPosition:T,getLimit:w,exceededLimit:k,reposition:U}}function fg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=t.Move,c=l.getPosition,d=l.getLimit,u=l.toPosition,p=t.Slides,y=p.isEnough,x=p.getLength,m=n.omitEnd,g=e.is(Wo),v=e.is(Co),b=Jt(T,!1),M=Jt(T,!0),f=n.start||0,S,W=f,U,B,P;function H(){V(),o([gn,sn,ha],V),o(La,$)}function V(){U=x(!0),B=n.perMove,P=n.perPage,S=q();var _=so(f,0,m?S:U-1);_!==f&&(f=_,l.reposition())}function $(){S!==q()&&r(ha)}function L(_,le,Q){if(!oe()){var be=A(_),Le=w(be);Le>-1&&(le||Le!==f)&&(ie(Le),l.move(be,Le,W,Q))}}function D(_,le,Q,be){t.Scroll.scroll(_,le,Q,function(){var Le=w(l.toIndex(c()));ie(m?Ti(Le,S):Le),be&&be()})}function A(_){var le=f;if(Ci(_)){var Q=_.match(/([+\-<>])(\d+)?/)||[],be=Q[1],Le=Q[2];be==="+"||be==="-"?le=C(f+ +(""+be+(+Le||1)),f):be===">"?le=Le?k(+Le):b(!0):be==="<"&&(le=M(!0))}else le=g?_:so(_,0,S);return le}function T(_,le){var Q=B||(O()?1:P),be=C(f+Q*(_?-1:1),f,!(B||O()));return be===-1&&v&&!ou(c(),d(!_),1)?_?0:S:le?be:w(be)}function C(_,le,Q){if(y()||O()){var be=X(_);be!==_&&(le=_,_=be,Q=!1),_<0||_>S?!B&&(ra(0,_,le,!0)||ra(S,le,_,!0))?_=k(N(_)):g?_=Q?_<0?-(U%P||P):U:_:n.rewind?_=_<0?S:0:_=-1:Q&&_!==le&&(_=k(N(le)+(_<le?-1:1)))}else _=-1;return _}function X(_){if(v&&n.trimSpace==="move"&&_!==f)for(var le=c();le===u(_,!0)&&ra(_,0,e.length-1,!n.rewind);)_<f?--_:++_;return _}function w(_){return g?(_+U)%U||0:_}function q(){for(var _=U-(O()||g&&B?1:P);m&&_-- >0;)if(u(U-1,!0)!==u(_,!0)){_++;break}return so(_,0,U-1)}function k(_){return so(O()?_:P*_,0,S)}function N(_){return O()?Ti(_,S):ga((_>=S?U-1:_)/P)}function j(_){var le=l.toIndex(_);return v?so(le,0,S):le}function ie(_){_!==f&&(W=f,f=_)}function ae(_){return _?W:f}function O(){return!Cr(n.focus)||n.isNavigation}function oe(){return e.state.is([_o,$r])&&!!n.waitForTransition}return{mount:H,go:L,scroll:D,getNext:b,getPrev:M,getAdjacent:T,getEnd:q,setIndex:ie,getIndex:ae,toIndex:k,toPage:N,toDest:j,hasFocus:O,isBusy:oe}}var yg="http://www.w3.org/2000/svg",vg="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",Ar=40;function xg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.emit,c=n.classes,d=n.i18n,u=t.Elements,p=t.Controller,y=u.arrows,x=u.track,m=y,g=u.prev,v=u.next,b,M,f={};function S(){U(),o(gn,W)}function W(){B(),S()}function U(){var D=n.arrows;D&&!(g&&v)&&V(),g&&v&&(mr(f,{prev:g,next:v}),gr(m,D?"":"none"),Bn(m,M=wl+"--"+n.direction),D&&(P(),L(),_t([g,v],Rr,x.id),l(mu,g,v)))}function B(){i.destroy(),ni(m,M),b?(qi(y?[g,v]:m),g=v=null):jn([g,v],Sl)}function P(){o([ki,Ho,sn,Yi,ha],L),r(v,"click",Jt(H,">")),r(g,"click",Jt(H,"<"))}function H(D){p.go(D,!0)}function V(){m=y||yo("div",c.arrows),g=$(!0),v=$(!1),b=!0,Lr(m,[g,v]),!y&&cl(m,x)}function $(D){var A='<button class="'+c.arrow+" "+(D?c.prev:c.next)+'" type="button"><svg xmlns="'+yg+'" viewBox="0 0 '+Ar+" "+Ar+'" width="'+Ar+'" height="'+Ar+'" focusable="false"><path d="'+(n.arrowPath||vg)+'" />';return nu(A)}function L(){if(g&&v){var D=e.index,A=p.getPrev(),T=p.getNext(),C=A>-1&&D<A?d.last:d.prev,X=T>-1&&D>T?d.first:d.next;g.disabled=A<0,v.disabled=T<0,_t(g,Pn,C),_t(v,Pn,X),l(gu,g,v,A,T)}}return{arrows:f,mount:S,destroy:B,update:L}}var bg=ul+"-interval";function Sg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.emit,c=Ia(n.interval,e.go.bind(e,">"),P),d=c.isPaused,u=t.Elements,p=t.Elements,y=p.root,x=p.toggle,m=n.autoplay,g,v,b=m==="pause";function M(){m&&(f(),x&&_t(x,Rr,u.track.id),b||S(),B())}function f(){n.pauseOnHover&&r(y,"mouseenter mouseleave",function(V){g=V.type==="mouseenter",U()}),n.pauseOnFocus&&r(y,"focusin focusout",function(V){v=V.type==="focusin",U()}),x&&r(x,"click",function(){b?S():W(!0)}),o([si,Pa,sn],c.rewind),o(si,H)}function S(){d()&&t.Slides.isEnough()&&(c.start(!n.resetProgress),v=g=b=!1,B(),l(fl))}function W(V){V===void 0&&(V=!0),b=!!V,B(),d()||(c.pause(),l(yl))}function U(){b||(g||v?W(!1):S())}function B(){x&&(ti(x,Ui,!b),_t(x,Pn,n.i18n[b?"play":"pause"]))}function P(V){var $=u.bar;$&&Mn($,"width",V*100+"%"),l(yu,V)}function H(V){var $=t.Slides.getAt(V);c.set($&&+An($.slide,bg)||n.interval)}return{mount:M,destroy:c.cancel,play:S,pause:W,isPaused:d}}function wg(e,t,n){var i=on(e),o=i.on;function r(){n.cover&&(o(vl,Jt(c,!0)),o([ki,gn,sn],Jt(l,!0)))}function l(d){t.Slides.forEach(function(u){var p=Pr(u.container||u.slide,"img");p&&p.src&&c(d,p,u)})}function c(d,u,p){p.style("background",d?'center/cover no-repeat url("'+u.src+'")':"",!0),gr(u,d?"none":"")}return{mount:r,destroy:Jt(l,!1)}}var $g=10,Cg=600,Tg=.6,Lg=1.5,Pg=800;function Ig(e,t,n){var i=on(e),o=i.on,r=i.emit,l=e.state.set,c=t.Move,d=c.getPosition,u=c.getLimit,p=c.exceededLimit,y=c.translate,x=e.is(Co),m,g,v=1;function b(){o(si,W),o([gn,sn],U)}function M(P,H,V,$,L){var D=d();if(W(),V&&(!x||!p())){var A=t.Layout.sliderSize(),T=Fs(P)*A*ga(vn(P)/A)||0;P=c.toPosition(t.Controller.toDest(P%A))+T}var C=ou(D,P,1);v=1,H=C?0:H||ma(vn(P-D)/Lg,Pg),g=$,m=Ia(H,f,Jt(S,D,P,L),1),l($r),r(Pa),m.start()}function f(){l(wo),g&&g(),r(Yi)}function S(P,H,V,$){var L=d(),D=P+(H-P)*B($),A=(D-L)*v;y(L+A),x&&!V&&p()&&(v*=Tg,vn(A)<$g&&M(u(p(!0)),Cg,!1,g,!0))}function W(){m&&m.cancel()}function U(){m&&!m.isPaused()&&(W(),f())}function B(P){var H=n.easingFunc;return H?H(P):1-Math.pow(1-P,4)}return{mount:b,destroy:W,scroll:M,cancel:U}}var lo={passive:!1,capture:!0};function Rg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=i.bind,c=i.unbind,d=e.state,u=t.Move,p=t.Scroll,y=t.Controller,x=t.Elements.track,m=t.Media.reduce,g=t.Direction,v=g.resolve,b=g.orient,M=u.getPosition,f=u.exceededLimit,S,W,U,B,P,H=!1,V,$,L;function D(){l(x,qa,Ms,lo),l(x,Ua,Ms,lo),l(x,Mu,T,lo),l(x,"click",w,{capture:!0}),l(x,"dragstart",Qn),o([ki,gn],A)}function A(){var Y=n.drag;ce(!Y),B=Y==="free"}function T(Y){if(V=!1,!$){var se=Le(Y);be(Y.target)&&(se||!Y.button)&&(y.isBusy()?Qn(Y,!0):(L=se?x:window,P=d.is([_o,$r]),U=null,l(L,qa,C,lo),l(L,Ua,X,lo),u.cancel(),p.cancel(),q(Y)))}}function C(Y){if(d.is(ia)||(d.set(ia),r(du)),Y.cancelable)if(P){u.translate(S+Q(O(Y)));var se=oe(Y)>rc,pe=H!==(H=f());(se||pe)&&q(Y),V=!0,r(uu),Qn(Y)}else j(Y)&&(P=N(Y),Qn(Y))}function X(Y){d.is(ia)&&(d.set(wo),r(pu)),P&&(k(Y),Qn(Y)),c(L,qa,C),c(L,Ua,X),P=!1}function w(Y){!$&&V&&Qn(Y,!0)}function q(Y){U=W,W=Y,S=M()}function k(Y){var se=ie(Y),pe=ae(se),fe=n.rewind&&n.rewindByDrag;m(!1),B?y.scroll(pe,0,n.snap):e.is(kr)?y.go(b(Fs(se))<0?fe?"<":"-":fe?">":"+"):e.is(Co)&&H&&fe?y.go(f(!0)?">":"<"):y.go(y.toDest(pe),!0),m(!0)}function N(Y){var se=n.dragMinThreshold,pe=dr(se),fe=pe&&se.mouse||0,we=(pe?se.touch:+se)||10;return vn(O(Y))>(Le(Y)?we:fe)}function j(Y){return vn(O(Y))>vn(O(Y,!0))}function ie(Y){if(e.is(Wo)||!H){var se=oe(Y);if(se&&se<rc)return O(Y)/se}return 0}function ae(Y){return M()+Fs(Y)*Ti(vn(Y)*(n.flickPower||600),B?1/0:t.Layout.listSize()*(n.flickMaxPages||1))}function O(Y,se){return le(Y,se)-le(_(Y),se)}function oe(Y){return As(Y)-As(_(Y))}function _(Y){return W===Y&&U||W}function le(Y,se){return(Le(Y)?Y.changedTouches[0]:Y)["page"+v(se?"Y":"X")]}function Q(Y){return Y/(H&&e.is(Co)?lg:1)}function be(Y){var se=n.noDrag;return!ur(Y,"."+Pu+", ."+Fa)&&(!se||!ur(Y,se))}function Le(Y){return typeof TouchEvent<"u"&&Y instanceof TouchEvent}function ye(){return P}function ce(Y){$=Y}return{mount:D,disable:ce,isDragging:ye}}var kg={Spacebar:" ",Right:Ea,Left:ka,Up:bu,Down:Su};function $l(e){return e=Ci(e)?e:e.key,kg[e]||e}var ac="keydown";function Eg(e,t,n){var i=on(e),o=i.on,r=i.bind,l=i.unbind,c=e.root,d=t.Direction.resolve,u,p;function y(){x(),o(gn,m),o(gn,x),o(si,v)}function x(){var M=n.keyboard;M&&(u=M==="global"?window:c,r(u,ac,b))}function m(){l(u,ac)}function g(M){p=M}function v(){var M=p;p=!0,Zd(function(){p=M})}function b(M){if(!p){var f=$l(M);f===d(ka)?e.go("<"):f===d(Ea)&&e.go(">")}}return{mount:y,destroy:m,disable:g}}var sr=ul+"-lazy",aa=sr+"-srcset",Mg="["+sr+"], ["+aa+"]";function Ag(e,t,n){var i=on(e),o=i.on,r=i.off,l=i.bind,c=i.emit,d=n.lazyLoad==="sequential",u=[Ho,Yi],p=[];function y(){n.lazyLoad&&(x(),o(sn,x))}function x(){ai(p),m(),d?M():(r(u),o(u,g),g())}function m(){t.Slides.forEach(function(f){dl(f.slide,Mg).forEach(function(S){var W=An(S,sr),U=An(S,aa);if(W!==S.src||U!==S.srcset){var B=n.classes.spinner,P=S.parentElement,H=Pr(P,"."+B)||yo("span",B,P);p.push([S,f,H]),S.src||gr(S,"none")}})})}function g(){p=p.filter(function(f){var S=n.perPage*((n.preloadPages||1)+1)-1;return f[1].isWithin(e.index,S)?v(f):!0}),p.length||r(u)}function v(f){var S=f[0];Bn(f[1].slide,Ws),l(S,"load error",Jt(b,f)),_t(S,"src",An(S,sr)),_t(S,"srcset",An(S,aa)),jn(S,sr),jn(S,aa)}function b(f,S){var W=f[0],U=f[1];ni(U.slide,Ws),S.type!=="error"&&(qi(f[2]),gr(W,""),c(vl,W,U),c($o)),d&&M()}function M(){p.length&&v(p.shift())}return{mount:y,destroy:Jt(ai,p),check:g}}function Fg(e,t,n){var i=on(e),o=i.on,r=i.emit,l=i.bind,c=t.Slides,d=t.Elements,u=t.Controller,p=u.hasFocus,y=u.getIndex,x=u.go,m=t.Direction.resolve,g=d.pagination,v=[],b,M;function f(){S(),o([gn,sn,ha],f);var $=n.pagination;g&&gr(g,$?"":"none"),$&&(o([si,Pa,Yi],V),W(),V(),r(hu,{list:b,items:v},H(e.index)))}function S(){b&&(qi(g?Ri(b.children):b),ni(b,M),ai(v),b=null),i.destroy()}function W(){var $=e.length,L=n.classes,D=n.i18n,A=n.perPage,T=p()?u.getEnd()+1:hr($/A);b=g||yo("ul",L.pagination,d.track.parentElement),Bn(b,M=Na+"--"+P()),_t(b,ii,"tablist"),_t(b,Pn,D.select),_t(b,bl,P()===Ma?"vertical":"");for(var C=0;C<T;C++){var X=yo("li",null,b),w=yo("button",{class:L.page,type:"button"},X),q=c.getIn(C).map(function(N){return N.slide.id}),k=!p()&&A>1?D.pageX:D.slideX;l(w,"click",Jt(U,C)),n.paginationKeyboard&&l(w,"keydown",Jt(B,C)),_t(X,ii,"presentation"),_t(w,ii,"tab"),_t(w,Rr,q.join(" ")),_t(w,Pn,Ns(k,C+1)),_t(w,vo,-1),v.push({li:X,button:w,page:C})}}function U($){x(">"+$,!0)}function B($,L){var D=v.length,A=$l(L),T=P(),C=-1;A===m(Ea,!1,T)?C=++$%D:A===m(ka,!1,T)?C=(--$+D)%D:A==="Home"?C=0:A==="End"&&(C=D-1);var X=v[C];X&&(tu(X.button),x(">"+C),Qn(L,!0))}function P(){return n.paginationDirection||n.direction}function H($){return v[u.toPage($)]}function V(){var $=H(y(!0)),L=H(y());if($){var D=$.button;ni(D,Ui),jn(D,ec),_t(D,vo,-1)}if(L){var A=L.button;Bn(A,Ui),_t(A,ec,!0),_t(A,vo,"")}r(fu,{list:b,items:v},$,L)}return{items:v,mount:f,destroy:S,getAt:H,update:V}}var Ng=[" ","Enter"];function _g(e,t,n){var i=n.isNavigation,o=n.slideFocus,r=[];function l(){e.splides.forEach(function(g){g.isParent||(u(e,g.splide),u(g.splide,e))}),i&&p()}function c(){r.forEach(function(g){g.destroy()}),ai(r)}function d(){c(),l()}function u(g,v){var b=on(g);b.on(si,function(M,f,S){v.go(v.is(Wo)?S:M)}),r.push(b)}function p(){var g=on(e),v=g.on;v(ml,x),v(vu,m),v([ki,gn],y),r.push(g),g.emit(hl,e.splides)}function y(){_t(t.Elements.list,bl,n.direction===Ma?"vertical":"")}function x(g){e.go(g.index)}function m(g,v){ll(Ng,$l(v))&&(x(g),Qn(v))}return{setup:Jt(t.Media.set,{slideFocus:Cr(o)?i:o},!0),mount:l,destroy:c,remount:d}}function Hg(e,t,n){var i=on(e),o=i.bind,r=0;function l(){n.wheel&&o(t.Elements.track,"wheel",c,lo)}function c(u){if(u.cancelable){var p=u.deltaY,y=p<0,x=As(u),m=n.wheelMinThreshold||0,g=n.wheelSleep||0;vn(p)>m&&x-r>g&&(e.go(y?"<":">"),r=x),d(y)&&Qn(u)}}function d(u){return!n.releaseWheel||e.state.is(_o)||t.Controller.getAdjacent(u)!==-1}return{mount:l}}var Wg=90;function Og(e,t,n){var i=on(e),o=i.on,r=t.Elements.track,l=n.live&&!n.isNavigation,c=yo("span",ig),d=Ia(Wg,Jt(p,!1));function u(){l&&(x(!t.Autoplay.isPaused()),_t(r,ic,!0),c.textContent="…",o(fl,Jt(x,!0)),o(yl,Jt(x,!1)),o([Ho,Yi],Jt(p,!0)))}function p(m){_t(r,nc,m),m?(Lr(r,c),d.start()):(qi(c),d.cancel())}function y(){jn(r,[tc,ic,nc]),qi(c)}function x(m){l&&_t(r,tc,m?"off":"polite")}return{mount:u,disable:x,destroy:y}}var Dg=Object.freeze({__proto__:null,Media:Um,Direction:Km,Elements:cg,Slides:ug,Layout:pg,Clones:gg,Move:hg,Controller:fg,Arrows:xg,Autoplay:Sg,Cover:wg,Scroll:Ig,Drag:Rg,Keyboard:Eg,LazyLoad:Ag,Pagination:Fg,Sync:_g,Wheel:Hg,Live:Og}),zg={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"},Bg={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:ag,i18n:zg,reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function jg(e,t,n){var i=t.Slides;function o(){on(e).on([ki,sn],r)}function r(){i.forEach(function(c){c.style("transform","translateX(-"+100*c.index+"%)")})}function l(c,d){i.style("transition","opacity "+n.speed+"ms "+n.easing),Zd(d)}return{mount:o,start:l,cancel:Ms}}function Vg(e,t,n){var i=t.Move,o=t.Controller,r=t.Scroll,l=t.Elements.list,c=Jt(Mn,l,"transition"),d;function u(){on(e).bind(l,"transitionend",function(m){m.target===l&&d&&(y(),d())})}function p(m,g){var v=i.toPosition(m,!0),b=i.getPosition(),M=x(m);vn(v-b)>=1&&M>=1?n.useScroll?r.scroll(v,M,!1,g):(c("transform "+M+"ms "+n.easing),i.translate(v,!0),d=g):(i.jump(m),g())}function y(){c(""),r.cancel()}function x(m){var g=n.rewindSpeed;if(e.is(Co)&&g){var v=o.getIndex(!0),b=o.getEnd();if(v===0&&m>=b||v>=b&&m===0)return g}return n.speed}return{mount:u,start:p,cancel:y}}var Gg=(function(){function e(n,i){this.event=on(),this.Components={},this.state=Xm(po),this.splides=[],this._o={},this._E={};var o=Ci(n)?iu(document,n):n;ar(o,o+" is invalid."),this.root=o,i=bi({label:An(o,Pn)||"",labelledby:An(o,xl)||""},Bg,e.defaults,i||{});try{bi(i,JSON.parse(An(o,ul)))}catch{ar(!1,"Invalid JSON")}this._o=Object.create(bi({},i))}var t=e.prototype;return t.mount=function(i,o){var r=this,l=this.state,c=this.Components;ar(l.is([po,pa]),"Already mounted!"),l.set(po),this._C=c,this._T=o||this._T||(this.is(kr)?jg:Vg),this._E=i||this._E;var d=mr({},Dg,this._E,{Transition:this._T});return Gi(d,function(u,p){var y=u(r,c,r._o);c[p]=y,y.setup&&y.setup()}),Gi(c,function(u){u.mount&&u.mount()}),this.emit(ki),Bn(this.root,og),l.set(wo),this.emit(_s),this},t.sync=function(i){return this.splides.push({splide:i}),i.splides.push({splide:this,isParent:!0}),this.state.is(wo)&&(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(Ri(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(sn),this},t.destroy=function(i){i===void 0&&(i=!0);var o=this.event,r=this.state;return r.is(po)?on(this).on(_s,this.destroy.bind(this,i)):(Gi(this._C,function(l){l.destroy&&l.destroy(i)},!0),o.emit(gl),o.destroy(),i&&ai(this.splides),r.set(pa)),this},zm(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})(),Cl=Gg;Cl.defaults={};Cl.STATES=jm;var sc=[[ki,"onMounted"],[_s,"onReady"],[si,"onMove"],[Ho,"onMoved"],[ml,"onClick"],[au,"onActive"],[su,"onInactive"],[lu,"onVisible"],[cu,"onHidden"],[sn,"onRefresh"],[gn,"onUpdated"],[$o,"onResize"],[La,"onResized"],[du,"onDrag"],[uu,"onDragging"],[pu,"onDragged"],[Pa,"onScroll"],[Yi,"onScrolled"],[gl,"onDestroy"],[mu,"onArrowsMounted"],[gu,"onArrowsUpdated"],[hu,"onPaginationMounted"],[fu,"onPaginationUpdated"],[hl,"onNavigationMounted"],[fl,"onAutoplayPlay"],[yu,"onAutoplayPlaying"],[yl,"onAutoplayPause"],[vl,"onLazyLoadLoaded"]];function Tl(...e){return e.filter(Boolean).join(" ")}function fa(e){return e!==null&&typeof e=="object"}function Os(e,t){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&!e.some((n,i)=>!Os(n,t[i]));if(fa(e)&&fa(t)){const n=Object.keys(e),i=Object.keys(t);return n.length===i.length&&!n.some(o=>!Object.prototype.hasOwnProperty.call(t,o)||!Os(e[o],t[o]))}return e===t}function Xg(e,t){return e.length===t.length&&!e.some((n,i)=>n!==t[i])}function qg(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 Ds(e,t){const n=e;return qg(t,(i,o)=>{Array.isArray(i)?n[o]=i.slice():fa(i)?n[o]=Ds(fa(n[o])?n[o]:{},i):n[o]=i}),n}var Ug=({children:e,className:t,...n})=>s.createElement("div",{className:Tl("splide__track",t),...n},s.createElement("ul",{className:"splide__list"},e)),Ll=class extends s.Component{constructor(){super(...arguments),this.splideRef=s.createRef(),this.slides=[]}componentDidMount(){const{options:e,extensions:t,transition:n}=this.props,{current:i}=this.splideRef;i&&(this.splide=new Cl(i,e),this.bind(this.splide),this.splide.mount(t,n),this.options=Ds({},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&&!Os(this.options,e)&&(this.splide.options=e,this.options=Ds({},e));const t=this.getSlides();Xg(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){sc.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 s.createElement(t,{className:Tl("splide",e),ref:this.splideRef,...this.omit(o,["options",...sc.map(r=>r[1])])},n?s.createElement(Ug,null,i):i)}},Pl=({children:e,className:t,...n})=>s.createElement("li",{className:Tl("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 Kg="RichTextRenderer-module__link___BWeZ2",Yg={link:Kg},Zg=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))},Do=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Zg(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Do(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:F.scalingValue(e.letterSpacing,t),wordSpacing:F.scalingValue(e.wordSpacing,t),fontSize:F.scalingValue(n,t),lineHeight:i!==void 0?F.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function Au(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Au(t.children):!!t.text):!1}const Ki=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx("a",{className:Yg.link,href:i.value,target:i.target,children:t(i.children)},o):a.jsx("span",{style:Jg(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Au(o)?t(o):" "},i)})})};function Jg(e){return{...e.fontFamily&&{fontFamily:Do(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 Qg="SvgImage-module__svg___q3xE-",eh="SvgImage-module__img___VsTm-",lc={svg:Qg,img:eh},th=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},nh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(c)}},[]),!th(e)||!r?a.jsx("img",{src:e,alt:"",className:Ct(lc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Ct(lc.svg,i),style:{"--svg":nh(e),"--fill":t,"--hover-fill":n,...o??{}}})},ih={"top-left":$t.topLeftAlignment,"top-center":$t.topCenterAlignment,"top-right":$t.topRightAlignment,"middle-left":$t.middleLeftAlignment,"middle-center":$t.middleCenterAlignment,"middle-right":$t.middleRightAlignment,"bottom-left":$t.bottomLeftAlignment,"bottom-center":$t.bottomCenterAlignment,"bottom-right":$t.bottomRightAlignment};function oh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:v,color:m}=n.imageCaption??{},[g,x]=s.useState(void 0),[b,k]=s.useState(null),[f,S]=s.useState(0),[W,U]=s.useState(0),{direction:B,transition:P,controls:_,pagination:G,imageCaption:$,triggers:L}=e,D=s.useRef(P.type),{x:E,y:T}=e.controls.offset,C=V=>{o&&o.go(V)};return s.useEffect(()=>{if(!b)return;const V=new ResizeObserver(w=>{if(!o)return;const[q]=w;x({width:Math.round(q.contentRect.width),height:Math.round(q.contentRect.height)})});return V.observe(b),()=>V.unobserve(b)},[b]),s.useEffect(()=>{!o||D.current===P.type||(U(V=>V+1),D.current=P.type)},[P.type]),a.jsx("div",{className:Ct($t.wrapper,{[$t.editor]:i}),ref:k,children:a.jsxs("div",{className:$t.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ct($t.captionBlock),children:a.jsx("div",{className:$t.captionTextWrapper,children:t.map((V,w)=>a.jsx("div",{className:Ct($t.captionText,ih[$.alignment],{[$t.withPointerEvents]:w===f&&i,[$t.active]:w===f}),style:{fontFamily:Do(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":F.scalingValue(l.width,i),letterSpacing:F.scalingValue(d,i),wordSpacing:F.scalingValue(p,i),textAlign:u,fontSize:F.scalingValue(y.fontSize,i),lineHeight:F.scalingValue(y.lineHeight,i),textTransform:v.textTransform??"none",textDecoration:v.textDecoration??"none",fontVariant:v.fontVariant??"normal",color:m,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:$t.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:F.scalingValue($.offset.y,i),left:F.scalingValue($.offset.x,i)},children:a.jsx(Ki,{content:V.imageCaption})})},w))})}),a.jsx(Ll,{onMove:V=>{S(V.index)},ref:r,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:B==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((V,w)=>a.jsx(Pl,{children:a.jsx("div",{className:$t.sliderItem,children:a.jsx("div",{className:$t.imgWrapper,children:a.jsx("img",{className:Ct($t.sliderImage,{[$t.contain]:V.image.objectFit==="contain",[$t.cover]:V.image.objectFit==="cover"}),src:V.image.url,alt:V.image.name??""})})})},w))},W),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct($t.arrow,{[$t.arrowVertical]:B==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{onClick:()=>{C("-1")},className:$t.arrowInner,style:{transform:`translate(${F.scalingValue(E,i)}, ${F.scalingValue(T*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Ct($t.arrowImg,$t.mirror)}),!_.arrowsImgUrl&&a.jsx(cc,{color:_.color,className:Ct($t.arrowIcon,$t.arrowImg,$t.mirror)})]})}),a.jsx("div",{className:Ct($t.arrow,$t.nextArrow,{[$t.arrowVertical]:B==="vert",[$t.hoverArrow]:_.show==="on hover"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:$t.arrowInner,onClick:()=>C("+1"),style:{transform:`translate(${F.scalingValue(E*(B==="horiz"?-1:1),i)}, ${F.scalingValue(T,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:$t.arrowImg}),!_.arrowsImgUrl&&a.jsx(cc,{color:_.color,className:Ct($t.arrowIcon,$t.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:$t.clickOverlay,onClick:()=>{o&&o.go("+1")}}),G.isActive&&a.jsx("div",{className:Ct($t.pagination,{[$t.paginationInsideBottom]:G.position==="inside-1"&&B==="horiz",[$t.paginationInsideTop]:G.position==="inside-2"&&B==="horiz",[$t.paginationOutsideBottom]:G.position==="outside-1"&&B==="horiz",[$t.paginationOutsideTop]:G.position==="outside-2"&&B==="horiz",[$t.paginationInsideLeft]:G.position==="inside-1"&&B==="vert",[$t.paginationInsideRight]:G.position==="inside-2"&&B==="vert",[$t.paginationOutsideLeft]:G.position==="outside-1"&&B==="vert",[$t.paginationOutsideRight]:G.position==="outside-2"&&B==="vert",[$t.paginationVertical]:B==="vert"}),children:a.jsx("div",{className:$t.paginationInner,style:{backgroundColor:G.colors[2],transform:`scale(${G.scale/100}) translate(${F.scalingValue(G.offset.x,i)}, ${F.scalingValue(G.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((V,w)=>a.jsx("button",{onClick:()=>{o&&o.go(w)},className:Ct($t.paginationItem),children:a.jsx("div",{className:Ct($t.dot,{[$t.activeDot]:w===f}),style:{backgroundColor:w===f?G.colors[0]:G.colors[1],"--pagination-hover-color":G.hover}})},w))})})]})})}function cc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const rh={element:oh,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"]}},ah="ImageRevealSlider-module__imageRevealSlider___UE5Ob",sh="ImageRevealSlider-module__image___Qjt-e",lh="ImageRevealSlider-module__link___N-iLG",ch="ImageRevealSlider-module__cursor___2U03d",no={imageRevealSlider:ah,image:sh,link:lh,cursor:ch};function dc(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ka(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function dh(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ka(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ka(e);r=l.height/l.width*o}else{const l=await Ka(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function uh({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[v,m]=s.useState(1),[g,x]=s.useState("none"),b=s.useRef({x:0,y:0}),[k,f]=s.useState(!1),{sizeType:S,imageWidth:W,randomRangeImageWidth:U}=e.imageSize,{revealPosition:B,visible:P}=e.position,{cursorType:_,target:G,defaultCursorScale:$,defaultCursor:L,hoverCursorScale:D,hoverCursor:E}=e.cursor;s.useEffect(()=>{if(!i)return;const V=(I,A)=>{const j=i.getBoundingClientRect(),ie=I-j.left,ae=A-j.top;if(y({x:ie,y:ae}),_==="system"){x("none"),m(1);return}const O=ie,oe=ae,N=document.elementFromPoint(j.left+O,j.top+oe);if(N&&N.closest("a")){x("none"),m(1);return}const le=dc(O,oe,r)||G==="area"?{img:E??"none",scale:D}:{img:L??"none",scale:$};x(le.img),m(le.scale)},w=I=>{I.stopPropagation(),b.current={x:I.clientX,y:I.clientY},V(I.clientX,I.clientY)},q=()=>{k&&V(b.current.x,b.current.y)};return i.addEventListener("mousemove",w),window.addEventListener("scroll",q,!0),()=>{i.removeEventListener("mousemove",w),window.removeEventListener("scroll",q,!0)}},[i,k,p,_,G,E,L,D,$,r]),s.useEffect(()=>{k||(x("none"),m(0))},[k]);const T=async(V,w,q,I={})=>{const{width:A,height:j,finalWidth:ie}=await dh(V.image.url,S,W,U);let ae=0,O=0;B==="same"?(ae=w/2,O=q/2):(ae=I.x??Math.random()*w,O=I.y??Math.random()*q);const oe=Math.min(Math.max(ae,A/2),w-A/2),N=Math.min(Math.max(O,j/2),q-j/2);return{id:u.current++,url:V.image.url,link:V.link,name:V.image.name,x:oe,y:N,width:ie}};s.useEffect(()=>{if(!i||t.length===0)return;const V=i.getBoundingClientRect(),w=V.width,q=V.height,I=[];(async()=>{const j=t[0],ie=await T(j,w,q);I.push(ie),l(I),d(1)})()},[S,W,U,B,i]),s.useEffect(()=>{P==="last One"&&l(V=>V.length>0?[V[V.length-1]]:[])},[P]);const C=async V=>{if(!i)return;const w=i.getBoundingClientRect(),q=V.clientX-w.left,I=V.clientY-w.top;if(G==="image"&&!dc(q,I,r))return;let A=0,j=0;B==="on Click"?(A=q,j=I):B==="same"?(A=w.width/2,j=w.height/2):(A=Math.random()*w.width,j=Math.random()*w.height);const ie=t[c],ae=await T(ie,w.width,w.height,{x:A,y:j});l(O=>P==="all"?[...O,ae]:[ae]),d(O=>O>=t.length-1?0:O+1)};return a.jsxs("div",{ref:o,onClick:C,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:no.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[r.map(V=>a.jsx("div",{className:no.wrapper,style:{top:`${V.y}px`,left:`${V.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:V.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:G==="area"&&V.link?a.jsx("a",{href:V.link,target:"_blank",className:no.link,children:a.jsx("img",{src:V.url,alt:V.name,className:no.image},V.id)}):a.jsx("img",{src:V.url,alt:V.name,className:no.image},V.id)},V.id)),k&&a.jsx("div",{className:no.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${v})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ph={element:uh,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:""}]}}}},mh="LightBox-module__hidden___9s-9x",gh="LightBox-module__heroImage___sTxNF",hh="LightBox-module__background___rm9ml",fh="LightBox-module__editor___4ACaY",yh="LightBox-module__contentStyle___Bgnsq",vh="LightBox-module__imageStyle___tLIlB",xh="LightBox-module__imgWrapper___LuFUp",bh="LightBox-module__contain___8-yaS",Sh="LightBox-module__cover___hNvOG",wh="LightBox-module__caption___b6L2I",$h="LightBox-module__captionTextInner___rCGNH",Ch="LightBox-module__lightboxSplide___XFuWC",Th="LightBox-module__arrow___iz38X",Lh="LightBox-module__arrowVertical___Zfz81",Ph="LightBox-module__nextArrow___zkAQN",Ih="LightBox-module__arrowInner___p48sW",Rh="LightBox-module__arrowIcon___3VaFf",kh="LightBox-module__arrowImg___pNV88",Eh="LightBox-module__mirror___pjeXc",Mh="LightBox-module__thumbsWrapper___GB-nU",Ah="LightBox-module__thumbsContainerVertical___wttk5",Fh="LightBox-module__thumbsContainer___osSma",Nh="LightBox-module__thumbsAlignStart___MO6tY",_h="LightBox-module__thumbsAlignCenter___Q4sUx",Hh="LightBox-module__thumbsAlignEnd___p4y9R",Wh="LightBox-module__thumbItem___HvnF3",Oh="LightBox-module__closeButton___g2khP",Dh="LightBox-module__fadeIn___0m5GW",zh="LightBox-module__slideInLeft___gPYwC",Bh="LightBox-module__slideInRight___S-pPp",jh="LightBox-module__slideInTop___DFdAj",Vh="LightBox-module__slideInBottom___m27kZ",Gh="LightBox-module__fadeOut___55qBR",Xh="LightBox-module__slideOutLeft___NvU7P",qh="LightBox-module__slideOutRight___SK7eC",Uh="LightBox-module__slideOutTop___Vgg0z",Kh="LightBox-module__slideOutBottom___nJ0Ef",Yh="LightBox-module__scaleSlide___vZriG",at={hidden:mh,heroImage:gh,background:hh,editor:fh,contentStyle:yh,imageStyle:vh,imgWrapper:xh,contain:bh,cover:Sh,caption:wh,captionTextInner:$h,lightboxSplide:Ch,arrow:Th,arrowVertical:Lh,nextArrow:Ph,arrowInner:Ih,arrowIcon:Rh,arrowImg:kh,mirror:Eh,thumbsWrapper:Mh,thumbsContainerVertical:Ah,thumbsContainer:Fh,thumbsAlignStart:Nh,thumbsAlignCenter:_h,thumbsAlignEnd:Hh,thumbItem:Wh,closeButton:Oh,fadeIn:Dh,slideInLeft:zh,slideInRight:Bh,slideInTop:jh,slideInBottom:Vh,fadeOut:Gh,slideOutLeft:Xh,slideOutRight:qh,slideOutTop:Uh,slideOutBottom:Kh,scaleSlide:Yh},Fr=(e,t,n)=>{const i={},[o,r]=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"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${F.scalingValue(t.x,n)}), calc(-50% + ${F.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${F.scalingValue(t.x,n)}, calc(-50% + ${F.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${F.scalingValue(t.x,n)}), ${F.scalingValue(t.y,n)})`:i.transform=`translate(${F.scalingValue(t.x,n)}, ${F.scalingValue(t.y,n)})`,i};function Fu(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 Zh(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Nu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function Jh(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function _u(e,t,n,i,o){const{x:r,y:l}=Zh(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Qh(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?Jh:Nu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:v}=_u(n,i,u,p,c),m=(y+u/2)/n*100,g=(v+p/2)/i*100;return`${m}% ${g}%`}function ef(e){return Qh(e)}function ya(e){const t=e.getBoundingClientRect(),n=Fu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Nu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=_u(i,o,c,d,u),v=t.left+n.left,m=t.top+n.top;return{x:p+v,y:y+m,width:c,height:d}}function uc(e){const t=e.getBoundingClientRect(),n=Fu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function tf(e,t){const n=(()=>{if(e==="fade in")return at.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return at.fadeIn;if(e==="slide in")switch(t){case"left":return at.slideInLeft;case"right":return at.slideInRight;case"top":return at.slideInTop;case"bottom":return at.slideInBottom;default:return at.slideInRight}return at.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return at.fadeOut;if(e==="slide in")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})(),r=(()=>{if(e==="fade in")return at.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return at.slideOutLeft;case"right":return at.slideOutRight;case"top":return at.slideOutTop;case"bottom":return at.slideOutBottom;default:return at.slideOutRight}return at.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const nf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:at.heroImage,onClick:()=>d(!0)}),a.jsx(of,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},of=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Ce;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:v,fontSizeLineHeight:m,textAppearance:g,color:x}=i.imageCaption??{},[b,k]=s.useState(0),[f,S]=s.useState(0),[W,U]=s.useState(!1),[B,P]=s.useState(!1),[_,G]=s.useState({}),$=s.useRef(null),L=s.useRef(null),D=s.useRef(null),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(null),q=s.useRef(!1),I=s.useRef(null),[A,j]=s.useState(!1),{appear:ie,triggers:ae,slider:O,thumbnail:oe,controls:N,area:le,caption:Q,layout:be}=o.lightboxBlock,{appearClass:Pe,backdropAppearClass:ye,backdropDisappearClass:ce,disappearClass:Y}=tf(ie.type,ie.direction),se=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const h=()=>{setTimeout(()=>{var Z,ne;(ne=(Z=$.current)==null?void 0:Z.splide)==null||ne.refresh()},16)},K=()=>{S(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",K),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",K)}},[]),s.useEffect(()=>{if(!e||!oe.isActive){j(!1);return}const h=I.current;if(!h)return;const K=()=>{O.direction==="horiz"?j(h.scrollWidth>h.clientWidth):j(h.scrollHeight>h.clientHeight)};K();const Z=new ResizeObserver(K);return Z.observe(h),()=>Z.disconnect()},[e,oe.isActive,n.length,_,O.direction]);const pe=s.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,K=F.getColorAlpha(le.color);h&&!l&&K>.9&&(document.body.style.backgroundColor=""),U(!0),E.current=!0;const Z=ne=>{ne.target===T.current&&ne.animationName&&(T.current&&C.current&&T.current.removeEventListener("animationend",C.current),C.current=null,E.current&&(E.current=!1,t()),U(!1))};T.current&&(C.current=Z,T.current.addEventListener("animationend",Z))},[t,le.color,l]),fe=(h,K,Z)=>{var ne,de;if(h){if(ae.type==="click"&&ae.switch==="image")ae.repeat==="close"&&b===n.length-1?pe():(ne=$.current)==null||ne.go("+1");else if(ae.type==="click"&&ae.switch==="50/50"){const z=h.getBoundingClientRect(),R=K-z.left,ee=Z-z.top,te=z.width,me=z.height;let X;O.direction==="horiz"?X=R<te/2?"-1":"+1":X=ee<me/2?"-1":"+1",(de=$.current)==null||de.go(X)}}},we=h=>{if(q.current){q.current=!1;return}const K=n[b],Z=(K==null?void 0:K.image.objectFit)==="cover";let ne,de;if("changedTouches"in h&&h.changedTouches.length>0)ne=h.changedTouches[0].clientX,de=h.changedTouches[0].clientY;else if("clientX"in h)ne=h.clientX,de=h.clientY;else return;let z;if(Z&&D.current){const R=uc(D.current);z=ne>=R.left&&ne<=R.right&&de>=R.top&&de<=R.bottom}else{const R=D.current?ya(D.current):null;if(!R){h.target===h.currentTarget&&pe();return}z=ne>=R.x&&ne<=R.x+R.width&&de>=R.y&&de<=R.y+R.height}z?fe(D.current,ne,de):pe()},Re=h=>{const K=h.target;(K.classList.contains(at.thumbsWrapper)||K.classList.contains(at.thumbsContainer))&&we(h)};s.useEffect(()=>{if(!e)return;const h=K=>{var Z,ne;if(K.key==="Escape"){pe();return}if(K.key==="ArrowRight"){k(de=>(de+1)%Math.max(n.length,1)),(Z=$.current)==null||Z.go("+1");return}K.key==="ArrowLeft"&&(k(de=>(de-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=$.current)==null||ne.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,pe,n.length]),s.useEffect(()=>{if(e){if(k(0),S(K=>K+1),E.current=!1,U(!1),P(!1),G({}),!se)return;const h=new CustomEvent("page-overlay",{detail:{itemId:se}});window.dispatchEvent(h)}return()=>{T.current&&C.current&&(T.current.removeEventListener("animationend",C.current),C.current=null),P(!1)}},[e,se]),s.useEffect(()=>{L.current!==null&&L.current!==O.type&&S(h=>h+1),L.current=O.type},[O.type]),s.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,K=window.matchMedia("(max-width: 768px)").matches,Z=F.getColorAlpha(le.color);document.body.style.overflow="hidden",P(!1);const ne=z=>{z.target===T.current&&!E.current&&z.animationName&&(K&&!l&&Z>.9&&(document.body.style.backgroundColor=le.color),P(!0),T.current&&V.current&&T.current.removeEventListener("animationend",V.current),V.current=null)};T.current&&(V.current=ne,T.current.addEventListener("animationend",ne));const de=z=>{const R=z.target;R&&(R.closest(`.${at.thumbsWrapper}`)||R.closest(`.${at.thumbsContainer}`))||O.type!=="slide"&&z.preventDefault()};return document.addEventListener("touchmove",de,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",de),T.current&&V.current&&(T.current.removeEventListener("animationend",V.current),V.current=null),P(!1)}},[e,l,le.color,O.type]),s.useEffect(()=>{if(!e)return;const h=K=>{var ne,de;if(E.current){K.stopPropagation();return}if(q.current){q.current=!1;return}const Z=K.target;if(!(Z&&(Z.closest(`.${at.thumbsContainer}`)||Z.closest(`.${at.thumbItem}`)||Z.closest(`.${at.arrow}`)||Z.closest(`.${at.closeButton}`)||Z.closest(`.${at.caption}`)))){if(O.type==="slide"&&ae.type==="drag"&&((de=(ne=$.current)==null?void 0:ne.splide)!=null&&de.root)){const z=$.current.splide.root;if(Z&&(z.contains(Z)||z===Z))return}if(K.touches.length===0&&K.changedTouches.length>0){const z=n[b],R=(z==null?void 0:z.image.objectFit)==="cover",ee=K.changedTouches[0];let te;if(R&&D.current){const me=uc(D.current);te=ee.clientX>=me.left&&ee.clientX<=me.right&&ee.clientY>=me.top&&ee.clientY<=me.bottom}else{const me=D.current?ya(D.current):null;if(!me)return;te=ee.clientX>=me.x&&ee.clientX<=me.x+me.width&&ee.clientY>=me.y&&ee.clientY<=me.y+me.height}if(!te){K.stopPropagation(),E.current=!0;const me=X=>{X.stopPropagation(),X.preventDefault(),document.removeEventListener("click",me,!0)};document.addEventListener("click",me,!0),pe()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,pe,b,n]);const ge=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&ae.type==="drag";s.useEffect(()=>{var X,Ie;if(!e||!ge||!((Ie=(X=$.current)==null?void 0:X.splide)!=null&&Ie.root))return;const h=$.current.splide.root,K=30,Z=(Se,J)=>{if(w.current){const He=Math.abs(Se-w.current.x),We=Math.abs(J-w.current.y);(He>0||We>0)&&(q.current=!0)}},ne=Se=>{w.current&&(Se.preventDefault(),Z(Se.clientX,Se.clientY))},de=Se=>{w.current&&Se.touches.length>0&&(Se.preventDefault(),Z(Se.touches[0].clientX,Se.touches[0].clientY))},z=(Se,J)=>{if(!w.current||!$.current){w.current=null;return}const He=Math.abs(Se-w.current.x),We=Math.abs(J-w.current.y);We>K&&We>He&&$.current.go(J<w.current.y?"+1":"-1"),w.current=null},R=Se=>{w.current&&z(Se.clientX,Se.clientY),document.removeEventListener("pointerup",R),document.removeEventListener("pointercancel",R),document.removeEventListener("pointermove",ne)},ee=Se=>{if(w.current){if(Se.changedTouches.length>0){const J=Se.changedTouches[0];z(J.clientX,J.clientY)}document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),document.removeEventListener("touchmove",de)}},te=Se=>{w.current={x:Se.clientX,y:Se.clientY},q.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",R),document.addEventListener("pointercancel",R)},me=Se=>{Se.touches.length>0&&(w.current={x:Se.touches[0].clientX,y:Se.touches[0].clientY},q.current=!1,document.addEventListener("touchmove",de,{passive:!1}),document.addEventListener("touchend",ee),document.addEventListener("touchcancel",ee))};return h.addEventListener("pointerdown",te),h.addEventListener("touchstart",me),()=>{h.removeEventListener("pointerdown",te),h.removeEventListener("touchstart",me),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",R),document.removeEventListener("pointercancel",R),document.removeEventListener("touchmove",de),document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),w.current=null,q.current=!1}},[e,ge,f]);const xe={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Gn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:T,className:Ct(at.background,W?ce:ye,{[at.editor]:l},{[at.hidden]:!e}),style:{...xe,...B&&!l&&!W?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?T:null,className:Ct(at.contentStyle,W?Y:Pe,{[at.editor]:l},{[at.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Ll,{onMove:h=>k(h.index),ref:$,className:at.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:ae.type==="drag"&&!ge,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:ae.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((h,K)=>{const Z=Fr(be.position,be.offset,l),ne=`${F.scalingValue(be.padding.top,l)} ${F.scalingValue(be.padding.right,l)} ${F.scalingValue(be.padding.bottom,l)} ${F.scalingValue(be.padding.left,l)}`,de=O.type==="scale"?(()=>{const{transform:z,...R}=Z;return{...R,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":z||"none"}})():{...Z,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(Pl,{children:a.jsx("div",{className:at.imgWrapper,onClick:we,children:a.jsx("img",{ref:K===b?D:null,className:Ct(at.imageStyle,{[at.contain]:h.image.objectFit==="contain",[at.cover]:h.image.objectFit==="cover",[at.scaleSlide]:O.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...de,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},K)})},f),N.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(at.arrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(N.offset.x,l)}, ${F.scalingValue(N.offset.y*(O.direction==="horiz"?1:-1),l)}) scale(${N.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[N.arrowsImgUrl&&a.jsx(mn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:Ct(at.arrowImg,at.mirror)}),!N.arrowsImgUrl&&a.jsx(pc,{color:N.color,className:Ct(at.arrowIcon,at.arrowImg,at.mirror)})]})}),a.jsx("div",{className:Ct(at.arrow,at.nextArrow,{[at.arrowVertical]:O.direction==="vert"}),style:{color:N.color,"--arrow-hover-color":N.hover},children:a.jsxs("button",{className:at.arrowInner,style:{transform:`translate(${F.scalingValue(N.offset.x*(O.direction==="horiz"?-1:1),l)}, ${F.scalingValue(N.offset.y,l)}) scale(${N.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[N.arrowsImgUrl&&a.jsx(mn,{url:N.arrowsImgUrl,fill:N.color,hoverFill:N.hover,className:at.arrowImg}),!N.arrowsImgUrl&&a.jsx(pc,{color:N.color,className:Ct(at.arrowIcon,at.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const h=Fr(le.closeIconAlign,le.closeIconOffset,l),K=`scale(${le.closeIconScale})`,Z=h.transform?`${h.transform} ${K}`:K;return a.jsx("button",{className:at.closeButton,style:{...h,transform:Z},onClick:pe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),Q&&Q.isActive&&i.imageCaption&&((Ce=n[b])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:at.caption,style:{...Fr(Q.alignment,Q.offset,l),fontFamily:Do(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":F.scalingValue(d.width,l),letterSpacing:F.scalingValue(p,l),wordSpacing:F.scalingValue(v,l),textAlign:y,fontSize:F.scalingValue(m.fontSize,l),lineHeight:F.scalingValue(m.lineHeight,l),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:x},onClick:h=>h.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:at.captionTextInner,style:{"--link-color":Q.linkColor,"--link-hover-color":Q.linkHoverColor},children:a.jsx(Ki,{content:n[b].imageCaption})})}),oe.isActive&&(()=>{const[h,K]=oe.position.split("-"),Z=O.direction==="horiz"?`${h}-left`:oe.position,ne=Fr(Z,oe.offset,l),de=()=>{if(O.direction==="horiz"){if(K==="left")return"flex-start";if(K==="center")return"center";if(K==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:I,className:at.thumbsWrapper,onClick:z=>Re(z),style:{position:l?"absolute":"fixed",...ne,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ct(at.thumbsContainer,{[at.thumbsContainerVertical]:O.direction==="vert",[at.thumbsAlignStart]:oe.align==="start",[at.thumbsAlignCenter]:oe.align==="center",[at.thumbsAlignEnd]:oe.align==="end"}),style:{gap:F.scalingValue(oe.grid.gap,l),justifyContent:A?"flex-start":de()},children:n.map((z,R)=>{const ee=R===b,te=_[R],X=oe.grid.size*(ee?oe.activeState.scale:1),Ie=()=>{if(oe.fit!=="fit")return{};if(!te)return O.direction==="horiz"?{height:F.scalingValue(X,l)}:{width:F.scalingValue(X,l)};const Se=te.width/te.height;if(O.direction==="horiz"){const J=X,He=J*Se;return{width:F.scalingValue(He,l),height:F.scalingValue(J,l)}}else{const J=X,He=J/Se;return{width:F.scalingValue(J,l),height:F.scalingValue(He,l)}}};return a.jsx("button",{className:at.thumbItem,style:{...O.direction==="horiz"&&oe.fit!=="fit"?{height:F.scalingValue(X,l)}:{},...O.direction==="vert"&&oe.fit!=="fit"?{width:F.scalingValue(X,l)}:{},...oe.fit==="cover"?{width:F.scalingValue(X,l),height:F.scalingValue(X,l)}:{},...Ie(),transition:ee?"all 0.25s ease-out":"none",opacity:ee?oe.activeState.opacity/100:oe.opacity/100,"--thumb-hover":oe.activeState.opacity/100},onClick:Se=>{var J;Se.stopPropagation(),k(R),(J=$.current)==null||J.go(R)},onMouseEnter:()=>{var Se;oe.triggers==="hov"&&((Se=$.current)==null||Se.go(R))},children:a.jsx("img",{src:z.image.url,alt:z.image.name??"",onLoad:Se=>{const J=Se.currentTarget;J.naturalWidth&&J.naturalHeight&&G(He=>({...He,[R]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:oe.fit==="cover"?"cover":"contain",...oe.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...oe.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${z.image.name}-${R}`)})})})})()]})]}),document.getElementById(r))};function pc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const rf={element:nf,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 Nr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function af(e){return`
6
+ */const Kg="RichTextRenderer-module__link___BWeZ2",Yg={link:Kg},Zg=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))},Oo=e=>e&&e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>Zg(n)?`"${n.replace(/"/g,'\\"')}"`:n).join(", ");function dn(e){const{color:t,...n}=e;return n}function Qt(e,t){var o,r,l;const{fontSize:n,lineHeight:i}=e;return{fontFamily:Oo(e.fontSettings.fontFamily),fontWeight:e.fontSettings.fontWeight,fontStyle:e.fontSettings.fontStyle,letterSpacing:R.scalingValue(e.letterSpacing,t),wordSpacing:R.scalingValue(e.wordSpacing,t),fontSize:R.scalingValue(n,t),lineHeight:i!==void 0?R.scalingValue(i,t):void 0,textTransform:(o=e.textAppearance)==null?void 0:o.textTransform,textDecoration:(r=e.textAppearance)==null?void 0:r.textDecoration,fontVariant:(l=e.textAppearance)==null?void 0:l.fontVariant,textAlign:e.textAlign,color:e.color}}function Au(e){return e!=null&&e.length?e.some(t=>t.type==="link"?Au(t.children):!!t.text):!1}const Ki=({content:e})=>{const t=n=>n.map((i,o)=>i.type==="link"?a.jsx(R.LinkWrapper,{className:Yg.link,link:i,children:t(i.children)},o):a.jsx("span",{style:Jg(i),children:i.text},o));return a.jsx(a.Fragment,{children:e.map((n,i)=>{const o=n.children;return a.jsx("div",{children:Au(o)?t(o):" "},i)})})};function Jg(e){return{...e.fontFamily&&{fontFamily:Oo(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 Qg="SvgImage-module__svg___q3xE-",eh="SvgImage-module__img___VsTm-",lc={svg:Qg,img:eh},th=e=>{const t=e.trim().toLowerCase();return!!(t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")||t.includes(".svg")||t.startsWith("blob:"))},nh=e=>`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`,mn=({url:e,fill:t="#000000",hoverFill:n="#CCCCCC",className:i="",style:o})=>{const[r,l]=s.useState(()=>typeof window>"u"?!0:CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")'));return s.useEffect(()=>{if(typeof window<"u"&&window.CSS){const c=CSS.supports("mask-image",'url("")')||CSS.supports("-webkit-mask-image",'url("")');l(c)}},[]),!th(e)||!r?a.jsx("img",{src:e,alt:"",className:Ct(lc.img,i),style:o}):a.jsx("span",{"data-supports-mask":r,className:Ct(lc.svg,i),style:{"--svg":nh(e),"--fill":t,"--hover-fill":n,...o??{}}})},ih={"top-left":wt.topLeftAlignment,"top-center":wt.topCenterAlignment,"top-right":wt.topRightAlignment,"middle-left":wt.middleLeftAlignment,"middle-center":wt.middleCenterAlignment,"middle-right":wt.middleRightAlignment,"bottom-left":wt.bottomLeftAlignment,"bottom-center":wt.bottomCenterAlignment,"bottom-right":wt.bottomRightAlignment};function oh({settings:e,content:t,styles:n,isEditor:i}){const[o,r]=s.useState(null),{widthSettings:l,fontSettings:c,letterSpacing:d,textAlign:u,wordSpacing:p,fontSizeLineHeight:y,textAppearance:x,color:m}=n.imageCaption??{},[g,v]=s.useState(void 0),[b,M]=s.useState(null),[f,S]=s.useState(0),[W,U]=s.useState(0),{direction:B,transition:P,controls:H,pagination:V,imageCaption:$,triggers:L}=e,D=s.useRef(P.type),{x:A,y:T}=e.controls.offset,C=X=>{o&&o.go(X)};return s.useEffect(()=>{if(!b)return;const X=new ResizeObserver(w=>{if(!o)return;const[q]=w;v({width:Math.round(q.contentRect.width),height:Math.round(q.contentRect.height)})});return X.observe(b),()=>X.unobserve(b)},[b]),s.useEffect(()=>{!o||D.current===P.type||(U(X=>X+1),D.current=P.type)},[P.type]),a.jsx("div",{className:Ct(wt.wrapper,{[wt.editor]:i}),ref:M,children:a.jsxs("div",{className:wt.sliderInner,style:{width:g?g.width:"100%",height:g?g.height:"100%",backgroundColor:P.backgroundColor&&P.type==="fade in"?P.backgroundColor:"transparent"},children:[e.imageCaption.isActive&&a.jsx("div",{className:Ct(wt.captionBlock),children:a.jsx("div",{className:wt.captionTextWrapper,children:t.map((X,w)=>a.jsx("div",{className:Ct(wt.captionText,ih[$.alignment],{[wt.withPointerEvents]:w===f&&i,[wt.active]:w===f}),style:{fontFamily:Oo(c.fontFamily),fontWeight:c.fontWeight,fontStyle:c.fontStyle,width:l.sizing==="auto"?"max-content":R.scalingValue(l.width,i),letterSpacing:R.scalingValue(d,i),wordSpacing:R.scalingValue(p,i),textAlign:u,fontSize:R.scalingValue(y.fontSize,i),lineHeight:R.scalingValue(y.lineHeight,i),textTransform:x.textTransform??"none",textDecoration:x.textDecoration??"none",fontVariant:x.fontVariant??"normal",color:m,transitionDuration:P.duration?`${Math.round(parseInt(P.duration)/2)}ms`:"500ms"},children:a.jsx("div",{"data-styles":"imageCaption",className:wt.captionTextInner,style:{"--link-hover-color":$.linkHoverColor,"--link-color":$.linkColor,position:"relative",top:R.scalingValue($.offset.y,i),left:R.scalingValue($.offset.x,i)},children:a.jsx(Ki,{content:X.imageCaption})})},w))})}),a.jsx(Ll,{onMove:X=>{S(X.index)},ref:r,options:{arrows:!1,speed:P.duration?parseInt(P.duration):500,autoplay:L.autoPlay!==null,...L.autoPlay!==null&&{interval:parseInt(L.autoPlay)*1e3},direction:B==="horiz"||P.type==="fade in"?"ltr":"ttb",pagination:!1,drag:L.triggersList.drag,perPage:1,width:g?g.width:"100%",height:g?g.height:"100%",type:P.type==="fade in"?"fade":"loop",rewind:!0},children:t.map((X,w)=>a.jsx(Pl,{children:a.jsx("div",{className:wt.sliderItem,children:a.jsx("div",{className:wt.imgWrapper,children:a.jsx("img",{className:Ct(wt.sliderImage,{[wt.contain]:X.image.objectFit==="contain",[wt.cover]:X.image.objectFit==="cover"}),src:X.image.url,alt:X.image.name??""})})})},w))},W),H.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(wt.arrow,{[wt.arrowVertical]:B==="vert",[wt.hoverArrow]:H.show==="on hover"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:a.jsxs("button",{onClick:()=>{C("-1")},className:wt.arrowInner,style:{transform:`translate(${R.scalingValue(A,i)}, ${R.scalingValue(T*(B==="horiz"?1:-1),i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[H.arrowsImgUrl&&a.jsx(mn,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:Ct(wt.arrowImg,wt.mirror)}),!H.arrowsImgUrl&&a.jsx(cc,{color:H.color,className:Ct(wt.arrowIcon,wt.arrowImg,wt.mirror)})]})}),a.jsx("div",{className:Ct(wt.arrow,wt.nextArrow,{[wt.arrowVertical]:B==="vert",[wt.hoverArrow]:H.show==="on hover"}),style:{color:H.color,"--arrow-hover-color":H.hover},children:a.jsxs("button",{className:wt.arrowInner,onClick:()=>C("+1"),style:{transform:`translate(${R.scalingValue(A*(B==="horiz"?-1:1),i)}, ${R.scalingValue(T,i)}) scale(${e.controls.scale/100}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:[H.arrowsImgUrl&&a.jsx(mn,{url:H.arrowsImgUrl,fill:H.color,hoverFill:H.hover,className:wt.arrowImg}),!H.arrowsImgUrl&&a.jsx(cc,{color:H.color,className:Ct(wt.arrowIcon,wt.arrowImg)})]})})]}),L.triggersList.click&&a.jsx("div",{className:wt.clickOverlay,onClick:()=>{o&&o.go("+1")}}),V.isActive&&a.jsx("div",{className:Ct(wt.pagination,{[wt.paginationInsideBottom]:V.position==="inside-1"&&B==="horiz",[wt.paginationInsideTop]:V.position==="inside-2"&&B==="horiz",[wt.paginationOutsideBottom]:V.position==="outside-1"&&B==="horiz",[wt.paginationOutsideTop]:V.position==="outside-2"&&B==="horiz",[wt.paginationInsideLeft]:V.position==="inside-1"&&B==="vert",[wt.paginationInsideRight]:V.position==="inside-2"&&B==="vert",[wt.paginationOutsideLeft]:V.position==="outside-1"&&B==="vert",[wt.paginationOutsideRight]:V.position==="outside-2"&&B==="vert",[wt.paginationVertical]:B==="vert"}),children:a.jsx("div",{className:wt.paginationInner,style:{backgroundColor:V.colors[2],transform:`scale(${V.scale/100}) translate(${R.scalingValue(V.offset.x,i)}, ${R.scalingValue(V.offset.y,i)}) rotate(${B==="horiz"?"0deg":"90deg"})`},children:t.map((X,w)=>a.jsx("button",{onClick:()=>{o&&o.go(w)},className:Ct(wt.paginationItem),children:a.jsx("div",{className:Ct(wt.dot,{[wt.activeDot]:w===f}),style:{backgroundColor:w===f?V.colors[0]:V.colors[1],"--pagination-hover-color":V.hover}})},w))})})]})})}function cc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const rh={element:oh,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"]}},ah="ImageRevealSlider-module__imageRevealSlider___UE5Ob",sh="ImageRevealSlider-module__image___Qjt-e",lh="ImageRevealSlider-module__link___N-iLG",ch="ImageRevealSlider-module__cursor___2U03d",qo={imageRevealSlider:ah,image:sh,link:lh,cursor:ch};function dc(e,t,n){for(const i of n){const o=new Image;o.src=i.url;const r=i.width?Number.parseFloat(i.width):o.naturalWidth,l=o.naturalHeight/o.naturalWidth*r,c=r/2,d=l/2;if(e>=i.x-c&&e<=i.x+c&&t>=i.y-d&&t<=i.y+d)return!0}return!1}function Ka(e){return new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t({width:n.naturalWidth,height:n.naturalHeight})}})}async function dh(e,t,n,i){let o,r;if(t==="custom"){o=n;const l=await Ka(e);r=l.height/l.width*o}else if(t==="random"){o=Math.random()*(i.max-i.min)+i.min;const l=await Ka(e);r=l.height/l.width*o}else{const l=await Ka(e);o=l.width,r=l.height}return{width:o,height:r,finalWidth:`${o}px`}}function uh({settings:e,content:t,isEditor:n}){const[i,o]=s.useState(null),[r,l]=s.useState([]),[c,d]=s.useState(0),u=s.useRef(0),[p,y]=s.useState({x:0,y:0}),[x,m]=s.useState(1),[g,v]=s.useState("none"),b=s.useRef({x:0,y:0}),[M,f]=s.useState(!1),{sizeType:S,imageWidth:W,randomRangeImageWidth:U}=e.imageSize,{revealPosition:B,visible:P}=e.position,{cursorType:H,target:V,defaultCursorScale:$,defaultCursor:L,hoverCursorScale:D,hoverCursor:A}=e.cursor;s.useEffect(()=>{if(!i)return;const X=(k,N)=>{const j=i.getBoundingClientRect(),ie=k-j.left,ae=N-j.top;if(y({x:ie,y:ae}),H==="system"){v("none"),m(1);return}const O=ie,oe=ae,_=document.elementFromPoint(j.left+O,j.top+oe);if(_&&_.closest("a")){v("none"),m(1);return}const le=dc(O,oe,r)||V==="area"?{img:A??"none",scale:D}:{img:L??"none",scale:$};v(le.img),m(le.scale)},w=k=>{k.stopPropagation(),b.current={x:k.clientX,y:k.clientY},X(k.clientX,k.clientY)},q=()=>{M&&X(b.current.x,b.current.y)};return i.addEventListener("mousemove",w),window.addEventListener("scroll",q,!0),()=>{i.removeEventListener("mousemove",w),window.removeEventListener("scroll",q,!0)}},[i,M,p,H,V,A,L,D,$,r]),s.useEffect(()=>{M||(v("none"),m(0))},[M]);const T=async(X,w,q,k={})=>{const{width:N,height:j,finalWidth:ie}=await dh(X.image.url,S,W,U);let ae=0,O=0;B==="same"?(ae=w/2,O=q/2):(ae=k.x??Math.random()*w,O=k.y??Math.random()*q);const oe=Math.min(Math.max(ae,N/2),w-N/2),_=Math.min(Math.max(O,j/2),q-j/2);return{id:u.current++,url:X.image.url,link:X.link,name:X.image.name,x:oe,y:_,width:ie}};s.useEffect(()=>{if(!i||t.length===0)return;const X=i.getBoundingClientRect(),w=X.width,q=X.height,k=[];(async()=>{const j=t[0],ie=await T(j,w,q);k.push(ie),l(k),d(1)})()},[S,W,U,B,i]),s.useEffect(()=>{P==="last One"&&l(X=>X.length>0?[X[X.length-1]]:[])},[P]);const C=async X=>{if(!i)return;const w=i.getBoundingClientRect(),q=X.clientX-w.left,k=X.clientY-w.top;if(V==="image"&&!dc(q,k,r))return;let N=0,j=0;B==="on Click"?(N=q,j=k):B==="same"?(N=w.width/2,j=w.height/2):(N=Math.random()*w.width,j=Math.random()*w.height);const ie=t[c],ae=await T(ie,w.width,w.height,{x:N,y:j});l(O=>P==="all"?[...O,ae]:[ae]),d(O=>O>=t.length-1?0:O+1)};return a.jsxs("div",{ref:o,onClick:C,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:qo.imageRevealSlider,style:{cursor:g==="none"?"default":"none"},children:[r.map(X=>a.jsx("div",{className:qo.wrapper,style:{top:`${X.y}px`,left:`${X.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:X.width??"auto",height:"auto",cursor:g==="none"?"default":"none"},children:a.jsx(R.LinkWrapper,{link:V==="area"?X.link:void 0,className:qo.link,children:a.jsx("img",{src:X.url,alt:X.name,className:qo.image},X.id)})},X.id)),M&&a.jsx("div",{className:qo.cursor,style:{left:`${p.x}px`,top:`${p.y}px`,transform:`translate(-50%, -50%) scale(${x})`,backgroundImage:`url('${g}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}const ph={element:uh,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:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQK9211QXBE9W284ZNKB8.png",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQMFT72JD18WKP0Q2DVAT.png",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQNEVRXPSRX5K1YTMJQY9.png",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01K7ERQP84JKRDT7WNWDQZR4Y9.png",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}}]}}}},mh="LightBox-module__hidden___9s-9x",gh="LightBox-module__heroImage___sTxNF",hh="LightBox-module__background___rm9ml",fh="LightBox-module__editor___4ACaY",yh="LightBox-module__contentStyle___Bgnsq",vh="LightBox-module__imageStyle___tLIlB",xh="LightBox-module__imgWrapper___LuFUp",bh="LightBox-module__contain___8-yaS",Sh="LightBox-module__cover___hNvOG",wh="LightBox-module__caption___b6L2I",$h="LightBox-module__captionTextInner___rCGNH",Ch="LightBox-module__lightboxSplide___XFuWC",Th="LightBox-module__arrow___iz38X",Lh="LightBox-module__arrowVertical___Zfz81",Ph="LightBox-module__nextArrow___zkAQN",Ih="LightBox-module__arrowInner___p48sW",Rh="LightBox-module__arrowIcon___3VaFf",kh="LightBox-module__arrowImg___pNV88",Eh="LightBox-module__mirror___pjeXc",Mh="LightBox-module__thumbsWrapper___GB-nU",Ah="LightBox-module__thumbsContainerVertical___wttk5",Fh="LightBox-module__thumbsContainer___osSma",Nh="LightBox-module__thumbsAlignStart___MO6tY",_h="LightBox-module__thumbsAlignCenter___Q4sUx",Hh="LightBox-module__thumbsAlignEnd___p4y9R",Wh="LightBox-module__thumbItem___HvnF3",Oh="LightBox-module__closeButton___g2khP",Dh="LightBox-module__fadeIn___0m5GW",zh="LightBox-module__slideInLeft___gPYwC",Bh="LightBox-module__slideInRight___S-pPp",jh="LightBox-module__slideInTop___DFdAj",Vh="LightBox-module__slideInBottom___m27kZ",Gh="LightBox-module__fadeOut___55qBR",Xh="LightBox-module__slideOutLeft___NvU7P",qh="LightBox-module__slideOutRight___SK7eC",Uh="LightBox-module__slideOutTop___Vgg0z",Kh="LightBox-module__slideOutBottom___nJ0Ef",Yh="LightBox-module__scaleSlide___vZriG",rt={hidden:mh,heroImage:gh,background:hh,editor:fh,contentStyle:yh,imageStyle:vh,imgWrapper:xh,contain:bh,cover:Sh,caption:wh,captionTextInner:$h,lightboxSplide:Ch,arrow:Th,arrowVertical:Lh,nextArrow:Ph,arrowInner:Ih,arrowIcon:Rh,arrowImg:kh,mirror:Eh,thumbsWrapper:Mh,thumbsContainerVertical:Ah,thumbsContainer:Fh,thumbsAlignStart:Nh,thumbsAlignCenter:_h,thumbsAlignEnd:Hh,thumbItem:Wh,closeButton:Oh,fadeIn:Dh,slideInLeft:zh,slideInRight:Bh,slideInTop:jh,slideInBottom:Vh,fadeOut:Gh,slideOutLeft:Xh,slideOutRight:qh,slideOutTop:Uh,slideOutBottom:Kh,scaleSlide:Yh},Fr=(e,t,n)=>{const i={},[o,r]=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"),r==="left"?(i.left="0",i.right="auto"):r==="center"?(i.left="50%",i.right="auto"):r==="right"&&(i.left="auto",i.right="0"),o==="middle"&&r==="center"?i.transform=`translate(calc(-50% + ${R.scalingValue(t.x,n)}), calc(-50% + ${R.scalingValue(t.y,n)}))`:o==="middle"?i.transform=`translate(${R.scalingValue(t.x,n)}, calc(-50% + ${R.scalingValue(t.y,n)}))`:r==="center"?i.transform=`translate(calc(-50% + ${R.scalingValue(t.x,n)}), ${R.scalingValue(t.y,n)})`:i.transform=`translate(${R.scalingValue(t.x,n)}, ${R.scalingValue(t.y,n)})`,i};function Fu(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 Zh(e){const t=e.trim().split(/\s+/),n=i=>{if(i.endsWith("%"))return parseFloat(i)/100;switch(i){case"left":case"top":return 0;case"right":case"bottom":return 1;case"center":return .5;default:return .5}};if(t.length===1){const i=t[0];return i==="center"?{x:.5,y:.5}:i==="top"||i==="bottom"?{x:.5,y:n(i)}:i==="left"||i==="right"?{x:n(i),y:.5}:{x:n(i),y:.5}}return{x:n(t[0]),y:n(t[1])}}function Nu(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=e;return{renderedW:c,renderedH:c/r}}const l=t;return{renderedW:l*r,renderedH:l}}function Jh(e,t,n,i){if(!n||!i||!e||!t)return{renderedW:e,renderedH:t};const o=e/t,r=n/i;if(r>o){const c=t;return{renderedW:c*r,renderedH:c}}const l=e;return{renderedW:l,renderedH:l/r}}function _u(e,t,n,i,o){const{x:r,y:l}=Zh(o);return{offsetX:r*(e-n),offsetY:l*(t-i)}}function Qh(e){const t=e.getBoundingClientRect(),n=t.width,i=t.height;if(!n||!i)return"center center";const o=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,r=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight,{objectFit:l,objectPosition:c}=window.getComputedStyle(e),d=l==="cover"?Jh:Nu,{renderedW:u,renderedH:p}=d(n,i,o,r),{offsetX:y,offsetY:x}=_u(n,i,u,p,c),m=(y+u/2)/n*100,g=(x+p/2)/i*100;return`${m}% ${g}%`}function ef(e){return Qh(e)}function ya(e){const t=e.getBoundingClientRect(),n=Fu(e),i=Math.max(0,t.width-n.left-n.right),o=Math.max(0,t.height-n.top-n.bottom),r=e.naturalWidth,l=e.naturalHeight,{renderedW:c,renderedH:d}=Nu(i,o,r,l),u=window.getComputedStyle(e).objectPosition,{offsetX:p,offsetY:y}=_u(i,o,c,d,u),x=t.left+n.left,m=t.top+n.top;return{x:p+x,y:y+m,width:c,height:d}}function uc(e){const t=e.getBoundingClientRect(),n=Fu(e);return{left:t.left+n.left,right:t.right-n.right,top:t.top+n.top,bottom:t.bottom-n.bottom}}function tf(e,t){const n=(()=>{if(e==="fade in")return rt.fadeIn;if(e==="slide in"||e==="mix")switch(t){case"left":return rt.slideInLeft;case"right":return rt.slideInRight;case"top":return rt.slideInTop;case"bottom":return rt.slideInBottom;default:return rt.slideInRight}return rt.fadeIn})(),i=(()=>{if(e==="fade in"||e==="mix")return rt.fadeIn;if(e==="slide in")switch(t){case"left":return rt.slideInLeft;case"right":return rt.slideInRight;case"top":return rt.slideInTop;case"bottom":return rt.slideInBottom;default:return rt.slideInRight}return rt.fadeIn})(),o=(()=>{if(e==="fade in"||e==="mix")return rt.fadeOut;if(e==="slide in")switch(t){case"left":return rt.slideOutLeft;case"right":return rt.slideOutRight;case"top":return rt.slideOutTop;case"bottom":return rt.slideOutBottom;default:return rt.slideOutRight}return rt.fadeOut})(),r=(()=>{if(e==="fade in")return rt.fadeOut;if(e==="slide in"||e==="mix")switch(t){case"left":return rt.slideOutLeft;case"right":return rt.slideOutRight;case"top":return rt.slideOutTop;case"bottom":return rt.slideOutBottom;default:return rt.slideOutRight}return rt.fadeOut})();return{appearClass:n,backdropAppearClass:i,backdropDisappearClass:o,disappearClass:r}}const nf=({settings:e,content:t,styles:n,portalId:i,activeEvent:o,isEditor:r,isPreviewMode:l})=>{const[c,d]=s.useState(!1),{url:u}=e.thumbnailBlock.cover;return s.useEffect(()=>{o==="close"&&d(!1),o==="open"&&d(!0)},[o]),a.jsxs(a.Fragment,{children:[a.jsx("img",{src:u,alt:"Cover",className:rt.heroImage,onClick:()=>d(!0)}),a.jsx(of,{isOpen:c,onClose:()=>d(!1),content:t,settings:e,lightboxStyles:n,portalId:i,isEditor:r})]})},of=({isOpen:e,onClose:t,content:n,lightboxStyles:i,settings:o,portalId:r,isEditor:l,metadata:c})=>{var Ce;const{widthSettings:d,fontSettings:u,letterSpacing:p,textAlign:y,wordSpacing:x,fontSizeLineHeight:m,textAppearance:g,color:v}=i.imageCaption??{},[b,M]=s.useState(0),[f,S]=s.useState(0),[W,U]=s.useState(!1),[B,P]=s.useState(!1),[H,V]=s.useState({}),$=s.useRef(null),L=s.useRef(null),D=s.useRef(null),A=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),X=s.useRef(null),w=s.useRef(null),q=s.useRef(!1),k=s.useRef(null),[N,j]=s.useState(!1),{appear:ie,triggers:ae,slider:O,thumbnail:oe,controls:_,area:le,caption:Q,layout:be}=o.lightboxBlock,{appearClass:Le,backdropAppearClass:ye,backdropDisappearClass:ce,disappearClass:Y}=tf(ie.type,ie.direction),se=(c==null?void 0:c.itemId)??null;s.useEffect(()=>{const h=()=>{setTimeout(()=>{var Z,ne;(ne=(Z=$.current)==null?void 0:Z.splide)==null||ne.refresh()},16)},K=()=>{S(Z=>Z+1)};return window.addEventListener("ArticleEditor.Layout:change",h),window.addEventListener("ArticleEditor.ComponentContent:change",K),()=>{window.removeEventListener("ArticleEditor.Layout:change",h),window.removeEventListener("ArticleEditor.ComponentContent:change",K)}},[]),s.useEffect(()=>{if(!e||!oe.isActive){j(!1);return}const h=k.current;if(!h)return;const K=()=>{O.direction==="horiz"?j(h.scrollWidth>h.clientWidth):j(h.scrollHeight>h.clientHeight)};K();const Z=new ResizeObserver(K);return Z.observe(h),()=>Z.disconnect()},[e,oe.isActive,n.length,H,O.direction]);const pe=s.useCallback(()=>{const h=window.matchMedia("(max-width: 768px)").matches,K=R.getColorAlpha(le.color);h&&!l&&K>.9&&(document.body.style.backgroundColor=""),U(!0),A.current=!0;const Z=ne=>{ne.target===T.current&&ne.animationName&&(T.current&&C.current&&T.current.removeEventListener("animationend",C.current),C.current=null,A.current&&(A.current=!1,t()),U(!1))};T.current&&(C.current=Z,T.current.addEventListener("animationend",Z))},[t,le.color,l]),fe=(h,K,Z)=>{var ne,de;if(h){if(ae.type==="click"&&ae.switch==="image")ae.repeat==="close"&&b===n.length-1?pe():(ne=$.current)==null||ne.go("+1");else if(ae.type==="click"&&ae.switch==="50/50"){const z=h.getBoundingClientRect(),I=K-z.left,ee=Z-z.top,te=z.width,me=z.height;let G;O.direction==="horiz"?G=I<te/2?"-1":"+1":G=ee<me/2?"-1":"+1",(de=$.current)==null||de.go(G)}}},we=h=>{if(q.current){q.current=!1;return}const K=n[b],Z=(K==null?void 0:K.image.objectFit)==="cover";let ne,de;if("changedTouches"in h&&h.changedTouches.length>0)ne=h.changedTouches[0].clientX,de=h.changedTouches[0].clientY;else if("clientX"in h)ne=h.clientX,de=h.clientY;else return;let z;if(Z&&D.current){const I=uc(D.current);z=ne>=I.left&&ne<=I.right&&de>=I.top&&de<=I.bottom}else{const I=D.current?ya(D.current):null;if(!I){h.target===h.currentTarget&&pe();return}z=ne>=I.x&&ne<=I.x+I.width&&de>=I.y&&de<=I.y+I.height}z?fe(D.current,ne,de):pe()},Re=h=>{const K=h.target;(K.classList.contains(rt.thumbsWrapper)||K.classList.contains(rt.thumbsContainer))&&we(h)};s.useEffect(()=>{if(!e)return;const h=K=>{var Z,ne;if(K.key==="Escape"){pe();return}if(K.key==="ArrowRight"){M(de=>(de+1)%Math.max(n.length,1)),(Z=$.current)==null||Z.go("+1");return}K.key==="ArrowLeft"&&(M(de=>(de-1+Math.max(n.length,1))%Math.max(n.length,1)),(ne=$.current)==null||ne.go("-1"))};return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[e,pe,n.length]),s.useEffect(()=>{if(e){if(M(0),S(K=>K+1),A.current=!1,U(!1),P(!1),V({}),!se)return;const h=new CustomEvent("page-overlay",{detail:{itemId:se}});window.dispatchEvent(h)}return()=>{T.current&&C.current&&(T.current.removeEventListener("animationend",C.current),C.current=null),P(!1)}},[e,se]),s.useEffect(()=>{L.current!==null&&L.current!==O.type&&S(h=>h+1),L.current=O.type},[O.type]),s.useEffect(()=>{if(!e)return;const h=document.body.style.overflow,K=window.matchMedia("(max-width: 768px)").matches,Z=R.getColorAlpha(le.color);document.body.style.overflow="hidden",P(!1);const ne=z=>{z.target===T.current&&!A.current&&z.animationName&&(K&&!l&&Z>.9&&(document.body.style.backgroundColor=le.color),P(!0),T.current&&X.current&&T.current.removeEventListener("animationend",X.current),X.current=null)};T.current&&(X.current=ne,T.current.addEventListener("animationend",ne));const de=z=>{const I=z.target;I&&(I.closest(`.${rt.thumbsWrapper}`)||I.closest(`.${rt.thumbsContainer}`))||O.type!=="slide"&&z.preventDefault()};return document.addEventListener("touchmove",de,{passive:!1}),()=>{document.body.style.overflow=h,document.removeEventListener("touchmove",de),T.current&&X.current&&(T.current.removeEventListener("animationend",X.current),X.current=null),P(!1)}},[e,l,le.color,O.type]),s.useEffect(()=>{if(!e)return;const h=K=>{var ne,de;if(A.current){K.stopPropagation();return}if(q.current){q.current=!1;return}const Z=K.target;if(!(Z&&(Z.closest(`.${rt.thumbsContainer}`)||Z.closest(`.${rt.thumbItem}`)||Z.closest(`.${rt.arrow}`)||Z.closest(`.${rt.closeButton}`)||Z.closest(`.${rt.caption}`)))){if(O.type==="slide"&&ae.type==="drag"&&((de=(ne=$.current)==null?void 0:ne.splide)!=null&&de.root)){const z=$.current.splide.root;if(Z&&(z.contains(Z)||z===Z))return}if(K.touches.length===0&&K.changedTouches.length>0){const z=n[b],I=(z==null?void 0:z.image.objectFit)==="cover",ee=K.changedTouches[0];let te;if(I&&D.current){const me=uc(D.current);te=ee.clientX>=me.left&&ee.clientX<=me.right&&ee.clientY>=me.top&&ee.clientY<=me.bottom}else{const me=D.current?ya(D.current):null;if(!me)return;te=ee.clientX>=me.x&&ee.clientX<=me.x+me.width&&ee.clientY>=me.y&&ee.clientY<=me.y+me.height}if(!te){K.stopPropagation(),A.current=!0;const me=G=>{G.stopPropagation(),G.preventDefault(),document.removeEventListener("click",me,!0)};document.addEventListener("click",me,!0),pe()}}}};return document.addEventListener("touchend",h,{passive:!0}),()=>{document.removeEventListener("touchend",h)}},[e,pe,b,n]);const ge=(O.type==="scale"||O.type==="fade")&&O.direction==="vert"&&ae.type==="drag";s.useEffect(()=>{var G,Ie;if(!e||!ge||!((Ie=(G=$.current)==null?void 0:G.splide)!=null&&Ie.root))return;const h=$.current.splide.root,K=30,Z=(Se,J)=>{if(w.current){const He=Math.abs(Se-w.current.x),We=Math.abs(J-w.current.y);(He>0||We>0)&&(q.current=!0)}},ne=Se=>{w.current&&(Se.preventDefault(),Z(Se.clientX,Se.clientY))},de=Se=>{w.current&&Se.touches.length>0&&(Se.preventDefault(),Z(Se.touches[0].clientX,Se.touches[0].clientY))},z=(Se,J)=>{if(!w.current||!$.current){w.current=null;return}const He=Math.abs(Se-w.current.x),We=Math.abs(J-w.current.y);We>K&&We>He&&$.current.go(J<w.current.y?"+1":"-1"),w.current=null},I=Se=>{w.current&&z(Se.clientX,Se.clientY),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("pointermove",ne)},ee=Se=>{if(w.current){if(Se.changedTouches.length>0){const J=Se.changedTouches[0];z(J.clientX,J.clientY)}document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),document.removeEventListener("touchmove",de)}},te=Se=>{w.current={x:Se.clientX,y:Se.clientY},q.current=!1,document.addEventListener("pointermove",ne,{passive:!1}),document.addEventListener("pointerup",I),document.addEventListener("pointercancel",I)},me=Se=>{Se.touches.length>0&&(w.current={x:Se.touches[0].clientX,y:Se.touches[0].clientY},q.current=!1,document.addEventListener("touchmove",de,{passive:!1}),document.addEventListener("touchend",ee),document.addEventListener("touchcancel",ee))};return h.addEventListener("pointerdown",te),h.addEventListener("touchstart",me),()=>{h.removeEventListener("pointerdown",te),h.removeEventListener("touchstart",me),document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",de),document.removeEventListener("touchend",ee),document.removeEventListener("touchcancel",ee),w.current=null,q.current=!1}},[e,ge,f]);const xe={backgroundColor:le.color,backdropFilter:`blur(${le.blur}px)`,animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"};return typeof document>"u"||!document.getElementById(r)?null:Gn.createPortal(a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:l?null:T,className:Ct(rt.background,W?ce:ye,{[rt.editor]:l},{[rt.hidden]:!e}),style:{...xe,...B&&!l&&!W?{position:"absolute"}:{}}}),a.jsxs("div",{ref:l?T:null,className:Ct(rt.contentStyle,W?Y:Le,{[rt.editor]:l},{[rt.hidden]:!e}),style:{animationDuration:`${parseInt(ie.duration)}ms`,animationTimingFunction:"ease",animationFillMode:"both"},children:[a.jsx(Ll,{onMove:h=>M(h.index),ref:$,className:rt.lightboxSplide,options:{arrows:!1,speed:O.duration?parseInt(O.duration):500,direction:O.direction==="horiz"||O.type==="fade"||O.type==="scale"?"ltr":"ttb",pagination:!1,drag:ae.type==="drag"&&!ge,perPage:1,width:"100%",height:"100%",type:O.type==="fade"||O.type==="scale"?"fade":"loop",padding:0,rewind:ae.repeat!=="close",start:0},style:{"--splide-speed":O.duration},children:n.map((h,K)=>{const Z=Fr(be.position,be.offset,l),ne=`${R.scalingValue(be.padding.top,l)} ${R.scalingValue(be.padding.right,l)} ${R.scalingValue(be.padding.bottom,l)} ${R.scalingValue(be.padding.left,l)}`,de=O.type==="scale"?(()=>{const{transform:z,...I}=Z;return{...I,position:"absolute",padding:ne,boxSizing:"border-box","--position-transform":z||"none"}})():{...Z,position:"absolute",padding:ne,boxSizing:"border-box"};return a.jsx(Pl,{children:a.jsx("div",{className:rt.imgWrapper,onClick:we,children:a.jsx("img",{ref:K===b?D:null,className:Ct(rt.imageStyle,{[rt.contain]:h.image.objectFit==="contain",[rt.cover]:h.image.objectFit==="cover",[rt.scaleSlide]:O.type==="scale"}),src:h.image.url,alt:h.image.name??"",style:{...de,pointerEvents:h.image.objectFit==="contain"?"none":"auto"}})})},K)})},f),_.isActive&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(rt.arrow,{[rt.arrowVertical]:O.direction==="vert"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:rt.arrowInner,style:{transform:`translate(${R.scalingValue(_.offset.x,l)}, ${R.scalingValue(_.offset.y*(O.direction==="horiz"?1:-1),l)}) scale(${_.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("-1")},"aria-label":"Previous",children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:Ct(rt.arrowImg,rt.mirror)}),!_.arrowsImgUrl&&a.jsx(pc,{color:_.color,className:Ct(rt.arrowIcon,rt.arrowImg,rt.mirror)})]})}),a.jsx("div",{className:Ct(rt.arrow,rt.nextArrow,{[rt.arrowVertical]:O.direction==="vert"}),style:{color:_.color,"--arrow-hover-color":_.hover},children:a.jsxs("button",{className:rt.arrowInner,style:{transform:`translate(${R.scalingValue(_.offset.x*(O.direction==="horiz"?-1:1),l)}, ${R.scalingValue(_.offset.y,l)}) scale(${_.scale}) rotate(${O.direction==="horiz"?"0deg":"90deg"})`},onClick:()=>{var h;return(h=$.current)==null?void 0:h.go("+1")},"aria-label":"Next",children:[_.arrowsImgUrl&&a.jsx(mn,{url:_.arrowsImgUrl,fill:_.color,hoverFill:_.hover,className:rt.arrowImg}),!_.arrowsImgUrl&&a.jsx(pc,{color:_.color,className:Ct(rt.arrowIcon,rt.arrowImg)})]})})]}),le.closeIconUrl&&(()=>{const h=Fr(le.closeIconAlign,le.closeIconOffset,l),K=`scale(${le.closeIconScale})`,Z=h.transform?`${h.transform} ${K}`:K;return a.jsx("button",{className:rt.closeButton,style:{...h,transform:Z},onClick:pe,"aria-label":"Close lightbox",children:a.jsx(mn,{url:le.closeIconUrl,fill:le.closeIconColor??"#000000",hoverFill:le.closeIconHover??"#cccccc"})})})(),Q&&Q.isActive&&i.imageCaption&&((Ce=n[b])==null?void 0:Ce.imageCaption)&&a.jsx("div",{className:rt.caption,style:{...Fr(Q.alignment,Q.offset,l),fontFamily:Oo(u.fontFamily),fontWeight:u.fontWeight,fontStyle:u.fontStyle,width:d.sizing==="auto"?"max-content":R.scalingValue(d.width,l),letterSpacing:R.scalingValue(p,l),wordSpacing:R.scalingValue(x,l),textAlign:y,fontSize:R.scalingValue(m.fontSize,l),lineHeight:R.scalingValue(m.lineHeight,l),textTransform:g.textTransform??"none",textDecoration:g.textDecoration??"none",fontVariant:g.fontVariant??"normal",color:v},onClick:h=>h.stopPropagation(),children:a.jsx("div",{"data-styles":"imageCaption",className:rt.captionTextInner,style:{"--link-color":Q.linkColor,"--link-hover-color":Q.linkHoverColor},children:a.jsx(Ki,{content:n[b].imageCaption})})}),oe.isActive&&(()=>{const[h,K]=oe.position.split("-"),Z=O.direction==="horiz"?`${h}-left`:oe.position,ne=Fr(Z,oe.offset,l),de=()=>{if(O.direction==="horiz"){if(K==="left")return"flex-start";if(K==="center")return"center";if(K==="right")return"flex-end"}else{if(h==="top")return"flex-start";if(h==="middle")return"center";if(h==="bottom")return"flex-end"}return"flex-start"};return a.jsx("div",{ref:k,className:rt.thumbsWrapper,onClick:z=>Re(z),style:{position:l?"absolute":"fixed",...ne,...O.direction==="horiz"?{maxWidth:"100vw",width:"100%",overflowX:"auto",overflowY:"hidden"}:{maxHeight:"100vh",overflowY:"auto",overflowX:"hidden"}},children:a.jsx("div",{className:Ct(rt.thumbsContainer,{[rt.thumbsContainerVertical]:O.direction==="vert",[rt.thumbsAlignStart]:oe.align==="start",[rt.thumbsAlignCenter]:oe.align==="center",[rt.thumbsAlignEnd]:oe.align==="end"}),style:{gap:R.scalingValue(oe.grid.gap,l),justifyContent:N?"flex-start":de()},children:n.map((z,I)=>{const ee=I===b,te=H[I],G=oe.grid.size*(ee?oe.activeState.scale:1),Ie=()=>{if(oe.fit!=="fit")return{};if(!te)return O.direction==="horiz"?{height:R.scalingValue(G,l)}:{width:R.scalingValue(G,l)};const Se=te.width/te.height;if(O.direction==="horiz"){const J=G,He=J*Se;return{width:R.scalingValue(He,l),height:R.scalingValue(J,l)}}else{const J=G,He=J/Se;return{width:R.scalingValue(J,l),height:R.scalingValue(He,l)}}};return a.jsx("button",{className:rt.thumbItem,style:{...O.direction==="horiz"&&oe.fit!=="fit"?{height:R.scalingValue(G,l)}:{},...O.direction==="vert"&&oe.fit!=="fit"?{width:R.scalingValue(G,l)}:{},...oe.fit==="cover"?{width:R.scalingValue(G,l),height:R.scalingValue(G,l)}:{},...Ie(),transition:ee?"all 0.25s ease-out":"none",opacity:ee?oe.activeState.opacity/100:oe.opacity/100,"--thumb-hover":oe.activeState.opacity/100},onClick:Se=>{var J;Se.stopPropagation(),M(I),(J=$.current)==null||J.go(I)},onMouseEnter:()=>{var Se;oe.triggers==="hov"&&((Se=$.current)==null||Se.go(I))},children:a.jsx("img",{src:z.image.url,alt:z.image.name??"",onLoad:Se=>{const J=Se.currentTarget;J.naturalWidth&&J.naturalHeight&&V(He=>({...He,[I]:{width:J.naturalWidth,height:J.naturalHeight}}))},style:{objectFit:oe.fit==="cover"?"cover":"contain",...oe.fit==="fit"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{},...oe.fit==="cover"?{width:"100%",height:"100%"}:{}}})},`${z.image.name}-${I}`)})})})})()]})]}),document.getElementById(r))};function pc({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const rf={element:nf,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 Nr(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function af(e){return`
7
7
  .${e}-wrapper {
8
8
  display: flex;
9
9
  flex-direction: column;
@@ -155,7 +155,7 @@
155
155
  pointer-events: auto;
156
156
  z-index: 10;
157
157
  }
158
- `}function sf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=F.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:v=[],buttonLabel:m,gap:g,fieldsGap:x,buttonCorners:b,buttonStroke:k,buttonPadding:f,isButtonFullWidth:S,inputCorners:W,inputStroke:U,inputPadding:B,inputColor:P,inputTextColor:_,inputBorderColor:G,placeholderColor:$,buttonColor:L,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V,fontFamily:w,inputFontSettings:q,inputFontSize:I,inputLineHeight:A,inputLetterSpacing:j,inputWordSpacing:ie,inputTextAppearance:ae,buttonFontSettings:O,buttonFontSize:oe,buttonLineHeight:N,buttonLetterSpacing:le,buttonWordSpacing:Q,buttonTextAppearance:be,labelFontSettings:Pe,labelFontSize:ye,labelLineHeight:ce,labelLetterSpacing:Y,labelWordSpacing:se,labelTextAppearance:pe,statusFontSettings:fe,statusFontSize:we,statusLineHeight:Re,statusLetterSpacing:ge,statusWordSpacing:xe,statusTextAppearance:Ce,successMessage:h,errorMessage:K,stateOverrides:Z}=e,ne=u==="B",de=v.slice(0,Math.min(p,v.length)),z={fontSettings:{fontFamily:w,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:I??.01,lineHeight:A,letterSpacing:j??0,wordSpacing:ie??0,textAppearance:ae,color:_},R=dn(Qt(z,t)),ee=F.scalingValue(U??0,t),te=Xe=>F.scalingValue((A??I??.01)*Xe+((B==null?void 0:B.top)??0)+((B==null?void 0:B.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),me=te(1),X=te(Math.max(1,y)),Ie={...R,borderStyle:"solid",borderRadius:u==="C"?0:F.scalingValue(W??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ee,borderLeftWidth:0}:{borderWidth:ee},paddingTop:F.scalingValue((B==null?void 0:B.top)??0,t),paddingRight:F.scalingValue((B==null?void 0:B.right)??0,t),paddingBottom:F.scalingValue((B==null?void 0:B.bottom)??0,t),paddingLeft:F.scalingValue((B==null?void 0:B.left)??0,t),height:me,minHeight:me},Se={fontSettings:{fontFamily:w,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:oe??.01,lineHeight:N,letterSpacing:le??0,wordSpacing:Q??0,textAppearance:be,color:D},J=dn(Qt(Se,t)),He=F.scalingValue(k??0,t),We={fontSettings:{fontFamily:w,fontWeight:(Pe==null?void 0:Pe.fontWeight)??400,fontStyle:(Pe==null?void 0:Pe.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:ce,letterSpacing:Y??0,wordSpacing:se??0,textAppearance:pe,color:T},ot=Qt(We,t),qe={fontSettings:{fontFamily:w,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:we??.01,lineHeight:Re,letterSpacing:ge??0,wordSpacing:xe??0,textAppearance:Ce,color:C},tt=dn(Qt(qe,t)),et=F.buildColorVars(d,{inputColor:P,inputTextColor:_,inputBorderColor:G,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:L,buttonTextColor:D,buttonBorderColor:E,labelTextColor:T,successColor:C,errorColor:V},lf,cf,Z),[Ge,ve]=s.useState(()=>Object.fromEntries(de.map(Xe=>[Xe.name,""]))),[_e,Be]=s.useState("idle"),[Ze,$e]=s.useState(null),Ne=r==="success"?"success":r==="error"?"error":_e,Ue=r==="error"?K:Ze,Je=r==="filled",st=s.useMemo(()=>{if(!Je)return Ge;let Xe=null;for(const ct of de)(Ge[ct.name]??"").trim().length>0||(Xe=Xe??{...Ge},Xe[ct.name]="Filled");return Xe??Ge},[Ge,Je,de]),it=Ne==="error"?F.getFormFieldValidationError(de,st):null,Ae=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),gt=o==null?void 0:o.submitUrl,ze=(Xe,ct)=>{ve(he=>({...he,[Xe]:ct}))},De=async Xe=>{if(Xe.preventDefault(),!c)return;const ct=Object.fromEntries(de.map(Ee=>{var nt;return[Ee.name,((nt=Ge[Ee.name])==null?void 0:nt.trim())??""]}).filter(([,Ee])=>Ee));if(!gt){Be("error"),$e("No integrations were found for this form.");return}if(Object.keys(ct).length===0)return;const he=F.getFormFieldValidationError(de,Ge);if(he){Be("error"),$e(he);return}Be("submitting"),$e(null);try{const Ee=await fetch(gt,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ct)});if(!Ee.ok){const nt=await Ee.text();throw new Error(nt||`Request failed: ${Ee.status}`)}Be("success"),ve(Object.fromEntries(de.map(nt=>[nt.name,""])))}catch(Ee){Be("error"),$e(Ee instanceof Error?Ee.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Ae}`.trim(),style:et,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:af(d)}}),a.jsxs("form",{onSubmit:De,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:de.map((Xe,ct)=>a.jsxs(s.Fragment,{children:[ct>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(x??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ne?` ${d}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${d}-field-label`,style:ot?{...ot,lineHeight:ot.fontSize}:void 0,children:Xe.label||Xe.name}),Xe.type==="textarea"?a.jsx("textarea",{name:Xe.name,autoComplete:"off",value:st[Xe.name]??"",onChange:he=>ze(Xe.name,he.target.value),placeholder:Xe.placeholder,className:`${d}-input`,style:{...Ie,height:X,minHeight:X},rows:y,"data-filled":Je||(st[Xe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Xe.type==="phone"?"tel":Xe.type==="email"?"email":"text",name:Xe.name,autoComplete:"off",value:st[Xe.name]??"",onChange:he=>ze(Xe.name,he.target.value),placeholder:Xe.placeholder,required:Xe.isRequired??Xe.type==="email",className:`${d}-input`,style:Ie,"data-filled":Je||(st[Xe.name]??"").trim().length>0})]})]},ct))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:F.scalingValue(g??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:F.scalingValue(b??0,t),borderWidth:He,paddingTop:F.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:F.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:F.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:F.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:c?"auto":void 0,...J,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:_e==="submitting"?"...":m})})})]}),Ne==="success"&&a.jsx("p",{className:`${d}-success`,style:{...tt},children:h}),Ne==="error"&&a.jsx("p",{className:`${d}-error`,style:{...tt},role:"alert",children:it??Ue??K})]})}const lf={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"},cf=["hover","focus","filled","success","error"],df=`import React, { useMemo, useState } from 'react';
158
+ `}function sf({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,metadata:o,activeEvent:r}){const l=!!n,c=i&&t||!t,{prefix:d}=R.useScopedStyles(),{type:u="A",fieldsToShow:p=2,textareaRows:y=1,fields:x=[],buttonLabel:m,gap:g,fieldsGap:v,buttonCorners:b,buttonStroke:M,buttonPadding:f,isButtonFullWidth:S,inputCorners:W,inputStroke:U,inputPadding:B,inputColor:P,inputTextColor:H,inputBorderColor:V,placeholderColor:$,buttonColor:L,buttonTextColor:D,buttonBorderColor:A,labelTextColor:T,successColor:C,errorColor:X,fontFamily:w,inputFontSettings:q,inputFontSize:k,inputLineHeight:N,inputLetterSpacing:j,inputWordSpacing:ie,inputTextAppearance:ae,buttonFontSettings:O,buttonFontSize:oe,buttonLineHeight:_,buttonLetterSpacing:le,buttonWordSpacing:Q,buttonTextAppearance:be,labelFontSettings:Le,labelFontSize:ye,labelLineHeight:ce,labelLetterSpacing:Y,labelWordSpacing:se,labelTextAppearance:pe,statusFontSettings:fe,statusFontSize:we,statusLineHeight:Re,statusLetterSpacing:ge,statusWordSpacing:xe,statusTextAppearance:Ce,successMessage:h,errorMessage:K,stateOverrides:Z}=e,ne=u==="B",de=x.slice(0,Math.min(p,x.length)),z={fontSettings:{fontFamily:w,fontWeight:(q==null?void 0:q.fontWeight)??400,fontStyle:(q==null?void 0:q.fontStyle)??"normal"},fontSize:k??.01,lineHeight:N,letterSpacing:j??0,wordSpacing:ie??0,textAppearance:ae,color:H},I=dn(Qt(z,t)),ee=R.scalingValue(U??0,t),te=Xe=>R.scalingValue((N??k??.01)*Xe+((B==null?void 0:B.top)??0)+((B==null?void 0:B.bottom)??0)+(u==="C"?U??0:(U??0)*2),t),me=te(1),G=te(Math.max(1,y)),Ie={...I,borderStyle:"solid",borderRadius:u==="C"?0:R.scalingValue(W??0,t),...u==="C"?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:ee,borderLeftWidth:0}:{borderWidth:ee},paddingTop:R.scalingValue((B==null?void 0:B.top)??0,t),paddingRight:R.scalingValue((B==null?void 0:B.right)??0,t),paddingBottom:R.scalingValue((B==null?void 0:B.bottom)??0,t),paddingLeft:R.scalingValue((B==null?void 0:B.left)??0,t),height:me,minHeight:me},Se={fontSettings:{fontFamily:w,fontWeight:(O==null?void 0:O.fontWeight)??400,fontStyle:(O==null?void 0:O.fontStyle)??"normal"},fontSize:oe??.01,lineHeight:_,letterSpacing:le??0,wordSpacing:Q??0,textAppearance:be,color:D},J=dn(Qt(Se,t)),He=R.scalingValue(M??0,t),We={fontSettings:{fontFamily:w,fontWeight:(Le==null?void 0:Le.fontWeight)??400,fontStyle:(Le==null?void 0:Le.fontStyle)??"normal"},fontSize:ye??.01,lineHeight:ce,letterSpacing:Y??0,wordSpacing:se??0,textAppearance:pe,color:T},ot=Qt(We,t),qe={fontSettings:{fontFamily:w,fontWeight:(fe==null?void 0:fe.fontWeight)??400,fontStyle:(fe==null?void 0:fe.fontStyle)??"normal"},fontSize:we??.01,lineHeight:Re,letterSpacing:ge??0,wordSpacing:xe??0,textAppearance:Ce,color:C},tt=dn(Qt(qe,t)),et=R.buildColorVars(d,{inputColor:P,inputTextColor:H,inputBorderColor:V,placeholderColor:$!=null&&$.trim()?$:"#cccccc",buttonColor:L,buttonTextColor:D,buttonBorderColor:A,labelTextColor:T,successColor:C,errorColor:X},lf,cf,Z),[Ge,ve]=s.useState(()=>Object.fromEntries(de.map(Xe=>[Xe.name,""]))),[_e,je]=s.useState("idle"),[Ze,$e]=s.useState(null),Ne=r==="success"?"success":r==="error"?"error":_e,Ue=r==="error"?K:Ze,Je=r==="filled",st=s.useMemo(()=>{if(!Je)return Ge;let Xe=null;for(const pt of de)(Ge[pt.name]??"").trim().length>0||(Xe=Xe??{...Ge},Xe[pt.name]="Filled");return Xe??Ge},[Ge,Je,de]),it=Ne==="error"?R.getFormFieldValidationError(de,st):null,Fe=`${r&&r!=="default"?`${d}-state-${r}`:""}`.trim(),ut=o==null?void 0:o.submitUrl,ze=(Xe,pt)=>{ve(he=>({...he,[Xe]:pt}))},De=async Xe=>{if(Xe.preventDefault(),!c)return;const pt=Object.fromEntries(de.map(Me=>{var nt;return[Me.name,((nt=Ge[Me.name])==null?void 0:nt.trim())??""]}).filter(([,Me])=>Me));if(!ut){je("error"),$e("No integrations were found for this form.");return}if(Object.keys(pt).length===0)return;const he=R.getFormFieldValidationError(de,Ge);if(he){je("error"),$e(he);return}je("submitting"),$e(null);try{const Me=await fetch(ut,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(pt)});if(!Me.ok){const nt=await Me.text();throw new Error(nt||`Request failed: ${Me.status}`)}je("success"),ve(Object.fromEntries(de.map(nt=>[nt.name,""])))}catch(Me){je("error"),$e(Me instanceof Error?Me.message:"Something went wrong")}};return a.jsxs("div",{className:`${d}-wrapper ${d}-type-${u} ${Fe}`.trim(),style:et,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:af(d)}}),a.jsxs("form",{onSubmit:De,className:`${d}-form`,children:[a.jsx("div",{className:`${d}-fields`,children:de.map((Xe,pt)=>a.jsxs(s.Fragment,{children:[pt>0&&a.jsx("div",{"data-controls":l?"fieldsGap":void 0,className:l?`${d}-control`:void 0,style:{height:R.scalingValue(v??0,t)}}),a.jsxs("div",{className:`${d}-field-group${ne?` ${d}-labeled`:""}`,children:[ne&&a.jsx("span",{className:`${d}-field-label`,style:ot?{...ot,lineHeight:ot.fontSize}:void 0,children:Xe.label||Xe.name}),Xe.type==="textarea"?a.jsx("textarea",{name:Xe.name,autoComplete:"off",value:st[Xe.name]??"",onChange:he=>ze(Xe.name,he.target.value),placeholder:Xe.placeholder,className:`${d}-input`,style:{...Ie,height:G,minHeight:G},rows:y,"data-filled":Je||(st[Xe.name]??"").trim().length>0,"data-field-type":"textarea"}):a.jsx("input",{type:Xe.type==="phone"?"tel":Xe.type==="email"?"email":"text",name:Xe.name,autoComplete:"off",value:st[Xe.name]??"",onChange:he=>ze(Xe.name,he.target.value),placeholder:Xe.placeholder,required:Xe.isRequired??Xe.type==="email",className:`${d}-input`,style:Ie,"data-filled":Je||(st[Xe.name]??"").trim().length>0})]})]},pt))}),a.jsx("div",{"data-controls":l?"gap":void 0,className:l?`${d}-control`:void 0,style:{height:R.scalingValue(g??0,t)}}),a.jsx("div",{className:`${d}-overlay-anchor`,children:a.jsx("button",{type:c?"submit":"button",className:`${d}-button`,style:{borderStyle:"solid",borderRadius:R.scalingValue(b??0,t),borderWidth:He,paddingTop:R.scalingValue((f==null?void 0:f.top)??0,t),paddingRight:R.scalingValue((f==null?void 0:f.right)??0,t),paddingBottom:R.scalingValue((f==null?void 0:f.bottom)??0,t),paddingLeft:R.scalingValue((f==null?void 0:f.left)??0,t),pointerEvents:c?"auto":void 0,...J,...S?{width:"100%",textAlign:"center",whiteSpace:"normal"}:{}},children:a.jsx("span",{className:`${d}-overlay-anchor`,style:S?{display:"inline-block",maxWidth:"100%",whiteSpace:"normal",textAlign:"center"}:void 0,children:_e==="submitting"?"...":m})})})]}),Ne==="success"&&a.jsx("p",{className:`${d}-success`,style:{...tt},children:h}),Ne==="error"&&a.jsx("p",{className:`${d}-error`,style:{...tt},role:"alert",children:it??Ue??K})]})}const lf={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"},cf=["hover","focus","filled","success","error"],df=`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';
@@ -986,7 +986,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
986
986
  font-size: ${Hr(14)};
987
987
  color: var(--${e}-error-error-color, var(--${e}-error-color));
988
988
  }
989
- `}const ff=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=F.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:v,inputFontSize:m,inputLineHeight:g,inputLetterSpacing:x,inputWordSpacing:b,inputTextAppearance:k,buttonFontSettings:f,buttonFontSize:S,buttonLineHeight:W,buttonLetterSpacing:U,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:_,statusFontSize:G,statusLineHeight:$,statusLetterSpacing:L,statusWordSpacing:D,statusTextAppearance:E,iconMaxWidth:T,minHeight:C,corners:V,stroke:w,stateOverrides:q,inputPadding:I,buttonPadding:A,successMessage:j="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,ae=c.slice(0,Math.min(p,c.length)),[O,oe]=s.useState(()=>Object.fromEntries(ae.map(Se=>[Se.name,""]))),[N,le]=s.useState("idle"),[Q,be]=s.useState(null),Pe=o==="success"?"success":o==="error"?"error":N,ye=o==="error"?ie:Q,ce=o==="filled",Y=s.useMemo(()=>{if(!ce)return O;let Se=null;for(const J of ae)(O[J.name]??"").trim().length>0||(Se=Se??{...O},Se[J.name]="Filled");return Se??O},[ce,O,ae]),se=Pe==="error"?F.getFormFieldValidationError(ae,Y):null,pe=o&&o!=="default"?`${r}-state-${o}`:"",fe=ae.some(Se=>(Y[Se.name]??"").trim().length>0),we=pe!==`${r}-state-filled`&&fe?`${r}-state-filled`:"",Re=`${pe} ${we}`.trim(),ge=i==null?void 0:i.submitUrl,xe=u??"",Ce=(d==null?void 0:d.icon)??"",h=(d==null?void 0:d.mode)==="On",K=xe||"Submit",Z={fontSettings:{fontFamily:y,fontWeight:(v==null?void 0:v.fontWeight)??400,fontStyle:(v==null?void 0:v.fontStyle)??"normal"},fontSize:m??.01,lineHeight:g,letterSpacing:x??0,wordSpacing:b??0,textAppearance:k,color:e.inputTextColor??"#111111"},ne={fontSettings:{fontFamily:y,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:S??.01,lineHeight:W,letterSpacing:U??0,wordSpacing:B??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},de={fontSettings:{fontFamily:y,fontWeight:(_==null?void 0:_.fontWeight)??400,fontStyle:(_==null?void 0:_.fontStyle)??"normal"},fontSize:G??.01,lineHeight:$,letterSpacing:L??0,wordSpacing:D??0,textAppearance:E,color:e.successColor??"#22c55e"},z=dn(Qt(Z,t)),R=dn(Qt(ne,t)),ee=dn(Qt(de,t)),te=F.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Z==null?void 0:Z.color)??"#111111",buttonTextColor:e.buttonTextColor??(ne==null?void 0:ne.color)??"#ffffff"},yf,vf,q),me={borderRadius:F.scalingValue(V,t),borderWidth:F.scalingValue(w,t),borderStyle:"solid"},X={borderLeftWidth:F.scalingValue(w,t)},Ie=async Se=>{if(Se.preventDefault(),!l)return;const J=Object.fromEntries(ae.map(We=>{var ot;return[We.name,((ot=O[We.name])==null?void 0:ot.trim())??""]}).filter(([,We])=>We));if(!ge){le("error"),be("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const He=F.getFormFieldValidationError(ae,O);if(He){le("error"),be(He);return}le("submitting"),be(null);try{const We=await fetch(ge,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!We.ok){const ot=await We.text();throw new Error(ot||`Request failed: ${We.status}`)}le("success"),oe(Object.fromEntries(ae.map(ot=>[ot.name,""])))}catch(We){le("error"),be(We instanceof Error?We.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:te,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hf(r)}}),a.jsxs("form",{onSubmit:Ie,className:`${r}-form`,style:{...me,height:F.scalingValue(C,t),minHeight:F.scalingValue(C,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ae.map(Se=>a.jsx("input",{type:Se.type==="email"?"email":Se.type==="phone"?"tel":"text",name:Se.name,autoComplete:"off",value:Y[Se.name]??"",onChange:J=>oe(He=>({...He,[Se.name]:J.target.value})),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${r}-input`,style:{...z,paddingRight:F.scalingValue(I.right,t),paddingLeft:F.scalingValue(I.left,t),paddingTop:F.scalingValue(I.top,t),paddingBottom:F.scalingValue(I.bottom,t)}},Se.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":K,style:{...R,...X,paddingRight:F.scalingValue(A.right,t),paddingLeft:F.scalingValue(A.left,t),paddingTop:F.scalingValue(A.top,t),paddingBottom:F.scalingValue(A.bottom,t),pointerEvents:l?"auto":void 0},children:N==="submitting"?"...":h?Ce&&a.jsx(mn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:F.scalingValue(T??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):xe})})]}),Pe==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ee},children:j}),Pe==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ee},role:"alert",children:se??ye??ie})]})},yf={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"},vf=["hover","focus","filled","success","error"],xf=`import React, { useMemo, useState } from 'react';
989
+ `}const ff=({settings:e,isEditor:t,isPreviewMode:n,metadata:i,activeEvent:o})=>{const{prefix:r}=R.useScopedStyles(),l=n&&t||!t,{fields:c=[{name:"email",type:"email",placeholder:"Your email"}],buttonIcon:d,buttonLabel:u,fieldsToShow:p=1,fontFamily:y,inputFontSettings:x,inputFontSize:m,inputLineHeight:g,inputLetterSpacing:v,inputWordSpacing:b,inputTextAppearance:M,buttonFontSettings:f,buttonFontSize:S,buttonLineHeight:W,buttonLetterSpacing:U,buttonWordSpacing:B,buttonTextAppearance:P,statusFontSettings:H,statusFontSize:V,statusLineHeight:$,statusLetterSpacing:L,statusWordSpacing:D,statusTextAppearance:A,iconMaxWidth:T,minHeight:C,corners:X,stroke:w,stateOverrides:q,inputPadding:k,buttonPadding:N,successMessage:j="Thanks for subscribing!",errorMessage:ie="Please, fill all required fields."}=e,ae=c.slice(0,Math.min(p,c.length)),[O,oe]=s.useState(()=>Object.fromEntries(ae.map(Se=>[Se.name,""]))),[_,le]=s.useState("idle"),[Q,be]=s.useState(null),Le=o==="success"?"success":o==="error"?"error":_,ye=o==="error"?ie:Q,ce=o==="filled",Y=s.useMemo(()=>{if(!ce)return O;let Se=null;for(const J of ae)(O[J.name]??"").trim().length>0||(Se=Se??{...O},Se[J.name]="Filled");return Se??O},[ce,O,ae]),se=Le==="error"?R.getFormFieldValidationError(ae,Y):null,pe=o&&o!=="default"?`${r}-state-${o}`:"",fe=ae.some(Se=>(Y[Se.name]??"").trim().length>0),we=pe!==`${r}-state-filled`&&fe?`${r}-state-filled`:"",Re=`${pe} ${we}`.trim(),ge=i==null?void 0:i.submitUrl,xe=u??"",Ce=(d==null?void 0:d.icon)??"",h=(d==null?void 0:d.mode)==="On",K=xe||"Submit",Z={fontSettings:{fontFamily:y,fontWeight:(x==null?void 0:x.fontWeight)??400,fontStyle:(x==null?void 0:x.fontStyle)??"normal"},fontSize:m??.01,lineHeight:g,letterSpacing:v??0,wordSpacing:b??0,textAppearance:M,color:e.inputTextColor??"#111111"},ne={fontSettings:{fontFamily:y,fontWeight:(f==null?void 0:f.fontWeight)??400,fontStyle:(f==null?void 0:f.fontStyle)??"normal"},fontSize:S??.01,lineHeight:W,letterSpacing:U??0,wordSpacing:B??0,textAppearance:P,color:e.buttonTextColor??"#ffffff"},de={fontSettings:{fontFamily:y,fontWeight:(H==null?void 0:H.fontWeight)??400,fontStyle:(H==null?void 0:H.fontStyle)??"normal"},fontSize:V??.01,lineHeight:$,letterSpacing:L??0,wordSpacing:D??0,textAppearance:A,color:e.successColor??"#22c55e"},z=dn(Qt(Z,t)),I=dn(Qt(ne,t)),ee=dn(Qt(de,t)),te=R.buildColorVars(r,{strokeColor:e.strokeColor,inputColor:e.inputColor,placeholderColor:e.placeholderColor,buttonColor:e.buttonColor,successColor:e.successColor,errorColor:e.errorColor,inputTextColor:e.inputTextColor??(Z==null?void 0:Z.color)??"#111111",buttonTextColor:e.buttonTextColor??(ne==null?void 0:ne.color)??"#ffffff"},yf,vf,q),me={borderRadius:R.scalingValue(X,t),borderWidth:R.scalingValue(w,t),borderStyle:"solid"},G={borderLeftWidth:R.scalingValue(w,t)},Ie=async Se=>{if(Se.preventDefault(),!l)return;const J=Object.fromEntries(ae.map(We=>{var ot;return[We.name,((ot=O[We.name])==null?void 0:ot.trim())??""]}).filter(([,We])=>We));if(!ge){le("error"),be("No integrations were found for this form.");return}if(Object.keys(J).length===0)return;const He=R.getFormFieldValidationError(ae,O);if(He){le("error"),be(He);return}le("submitting"),be(null);try{const We=await fetch(ge,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(J)});if(!We.ok){const ot=await We.text();throw new Error(ot||`Request failed: ${We.status}`)}le("success"),oe(Object.fromEntries(ae.map(ot=>[ot.name,""])))}catch(We){le("error"),be(We instanceof Error?We.message:"Something went wrong")}};return a.jsxs("div",{className:`${r}-wrapper ${Re}`.trim(),style:te,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:hf(r)}}),a.jsxs("form",{onSubmit:Ie,className:`${r}-form`,style:{...me,height:R.scalingValue(C,t),minHeight:R.scalingValue(C,t)},children:[a.jsx("div",{className:`${r}-inputWrap ${r}-overlayAnchor`,style:{flex:1,minWidth:0},children:ae.map(Se=>a.jsx("input",{type:Se.type==="email"?"email":Se.type==="phone"?"tel":"text",name:Se.name,autoComplete:"off",value:Y[Se.name]??"",onChange:J=>oe(He=>({...He,[Se.name]:J.target.value})),placeholder:Se.placeholder,required:Se.isRequired??Se.type==="email",className:`${r}-input`,style:{...z,paddingRight:R.scalingValue(k.right,t),paddingLeft:R.scalingValue(k.left,t),paddingTop:R.scalingValue(k.top,t),paddingBottom:R.scalingValue(k.bottom,t)}},Se.name))}),a.jsx("div",{className:`${r}-overlayAnchor`,children:a.jsx("button",{type:l?"submit":"button",className:`${r}-submitBtn`,"aria-label":K,style:{...I,...G,paddingRight:R.scalingValue(N.right,t),paddingLeft:R.scalingValue(N.left,t),paddingTop:R.scalingValue(N.top,t),paddingBottom:R.scalingValue(N.bottom,t),pointerEvents:l?"auto":void 0},children:_==="submitting"?"...":h?Ce&&a.jsx(mn,{url:Ce,className:`${r}-submitBtnIcon`,style:{maxWidth:R.scalingValue(T??0,t)},fill:`var(--${r}-button-text-color)`,hoverFill:`var(--${r}-button-text-color)`}):xe})})]}),Le==="success"&&a.jsx("p",{className:`${r}-success`,style:{...ee},children:j}),Le==="error"&&a.jsx("p",{className:`${r}-error`,style:{...ee},role:"alert",children:se??ye??ie})]})},yf={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"},vf=["hover","focus","filled","success","error"],xf=`import React, { useMemo, useState } from 'react';
990
990
  import { CommonComponentProps } from '../props';
991
991
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
992
992
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -1697,11 +1697,10 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
1697
1697
  .${e}-image-hover-grayscale:hover video {
1698
1698
  filter: grayscale(100%);
1699
1699
  }
1700
- `}const Lf=30,Pf=20,Za=3,If=12,Rf=32,kf=3,Ef=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Mf=(e,t)=>Array.from({length:t},()=>e).flat(),Af=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Hu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),mc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Hu(c);return d<=0?0:d+r*Math.max(0,t-1)},Ff=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Hu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Nf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},_f=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Nf(i,e))},Hf=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??"")},Wf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Of=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var D,E,T,C;const p=s.useRef(null),y=!!((D=e.image)!=null&&D.url&&Hf(e.image));s.useLayoutEffect(()=>{c&&Wf(p.current)&&(u==null||u())},[c,(E=e.image)==null?void 0:E.url,u]);const v=n.display==="cover",m=n.ratioValue??"1:1",g=n.reversed??!1,[x,b]=m.split(":").map(Number),S=(g?b:x)/(g?x:b),W=i/S,U=W>o?o:W,B=W>o?o*S:i,P=d(B),_=d(U),G={borderRadius:d(r)},$=v?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...G}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...G},L=((T=e.image)==null?void 0:T.url)&&(y?a.jsx("video",{ref:V=>{p.current=V},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:V=>{p.current=V},src:e.image.url,alt:((C=e.image)==null?void 0:C.name)??"",style:$,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...v?{width:P}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...v?{width:P,height:_,overflow:"hidden",...G}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:L&&e.link?a.jsx("a",{href:e.link,target:"_self",rel:"noopener noreferrer",className:Ct(`${t}-marquee-link`,!v&&`${t}-marquee-link-contain`),children:L}):L})})},Df=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Tf(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:v,gap:m,imageMaxWidth:g,imageMaxHeight:x,hoverEffect:b,cornerRadius:k=0}=e,f=s.useMemo(()=>Af(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,W=!!o,U=!n||!!i,B=U&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,P=n?!!i:!0,G=((t==null?void 0:t.length)??0)>0&&(P||!!n),$=Math.max(0,p)*Lf,L=we=>F.scalingValue(we,n??!1),D=s.useRef(null),E=s.useRef(null),T=s.useRef(null),[C,V]=s.useState(0),w=P&&v==="on",[q,I]=s.useState(!1),[A,j]=s.useState({}),ie=s.useRef(A);ie.current=A;const ae=s.useRef(null),O=s.useRef(0),oe=s.useRef(null),N=s.useMemo(()=>(t??[]).map(we=>{var Re;return((Re=we.image)==null?void 0:Re.url)??""}).join("\0"),[t]),[le,Q]=s.useState(Za),be=s.useMemo(()=>{const we=t??[];return we.length===0||!(P||!!n)?we:Mf(we,le)},[t,P,le,n]),Pe=s.useMemo(()=>(t??[]).filter(we=>{var Re;return!!((Re=we.image)!=null&&Re.url)}).length,[t]),ye=G?kf:1;s.useLayoutEffect(()=>{O.current=0,j({}),ae.current=null,Q(Za),c(0)},[N]),s.useEffect(()=>{if(!U||b!=="randomize")return;const we=D.current;if(!we)return;const Re=h=>{j(K=>{const Z=Array.from(h).filter(de=>de in K&&!_f(we,de));if(Z.length===0)return K;const ne={...K};return Z.forEach(de=>{delete ne[de]}),ne})},ge=new IntersectionObserver(h=>{const K=new Set;for(const Z of h){const ne=Z.target.dataset.marqueeItemIndex,de=ne!==void 0?Number(ne):NaN;Number.isNaN(de)||K.add(de)}K.size>0&&Re(K)},{root:we,threshold:0});Object.keys(A).forEach(h=>{const K=Number(h);we.querySelectorAll(`[data-marquee-item-index="${K}"]`).forEach(Z=>ge.observe(Z))});const xe={current:0},Ce=()=>{const h=Object.keys(ie.current);h.length!==0&&(Re(h.map(Number)),xe.current=requestAnimationFrame(Ce))};return Object.keys(ie.current).length>0&&(xe.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(xe.current),ge.disconnect()}},[b,A,U]),s.useEffect(()=>{const we=D.current;if(!we||typeof IntersectionObserver>"u")return;const Re=we.querySelectorAll("video");if(Re.length===0)return;const ge=new IntersectionObserver(xe=>{for(const Ce of xe){const h=Ce.target;Ce.isIntersecting?h.paused&&h.play().catch(()=>{}):h.paused||h.pause()}},{threshold:0});return Re.forEach(xe=>ge.observe(xe)),()=>ge.disconnect()},[G,be,ye,A]),s.useLayoutEffect(()=>{if(!G)return;const we=D.current,Re=T.current;if(!we||!Re)return;const ge={current:0},xe=()=>{const K=we.getBoundingClientRect().width||we.offsetWidth,Z=Ff(Re),ne=ae.current,de=typeof ne=="number"&&Math.abs(ne-Z)<=.25;ae.current=Z;let z=le,R=0;if((P||n)&&S>0&&K>0){const me=mc(Re,S);if(me>=Rf){R=me;const X=Math.min(If,Math.max(Za,Math.ceil(K/me)+1));z=X,X!==le&&Q(X)}}const te=z!==le&&R>0?R*z:Z>0?Z:R>0?R*z:(()=>{const me=mc(Re,S);return me>0?me*z:0})();te>0?c(me=>me<=0?te:!de||Math.round(me)===Math.round(te)?me:te):!de&&l<=0&&(cancelAnimationFrame(ge.current),ge.current=requestAnimationFrame(xe))},Ce=()=>{cancelAnimationFrame(ge.current),ge.current=requestAnimationFrame(xe)};oe.current=Ce,Ce();const h=new ResizeObserver(Ce);return h.observe(we),h.observe(Re),()=>{oe.current=null,cancelAnimationFrame(ge.current),h.disconnect()}},[P,G,l,N,le,S,n]),s.useLayoutEffect(()=>{if(!G||d<=0)return;const we=E.current;we&&Ef(we)},[G,d,y,$]),s.useLayoutEffect(()=>{if(!G||l<=0){V(0);return}const we=E.current,Re=T.current;if(!we||!Re)return;const ge=()=>{const Ce=we.offsetHeight||we.getBoundingClientRect().height,h=Array.from(Re.children).reduce((Z,ne)=>Math.max(Z,ne.offsetHeight||ne.getBoundingClientRect().height),0),K=Ce>0?Ce:h;V(K>0?K:0)};ge();const xe=new ResizeObserver(ge);return xe.observe(we),xe.observe(Re),()=>xe.disconnect()},[G,ye,be,n,m,g,x,l,f,A]),s.useLayoutEffect(()=>{if(!n||!W||!G||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,W,G,y,l,C,m,be]);const ce=()=>{w&&I(!0)},Y=()=>{w&&I(!1)},se=s.useCallback(()=>{var we;O.current=Math.min(Pe,O.current+1),(we=oe.current)==null||we.call(oe)},[Pe]),pe=s.useCallback((we,Re)=>{j(ge=>{const xe=ge[we]??Re,Ce=(t??[]).filter(K=>K!==xe);if(Ce.length===0)return ge;const h=Ce[Math.floor(Math.random()*Ce.length)];return{...ge,[we]:h}})},[t]),fe=(we,Re,ge,xe)=>{const Ce=U&&b==="randomize"&&f.display==="cover"?A[ge]??we:we,h=`max(${L(m)}, ${Pf}px)`,K=`calc(-0.5 * (${h} + ${L(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ge,onMouseEnter:U&&b==="randomize"&&f.display==="cover"?()=>pe(ge,we):void 0,children:[a.jsx(Of,{item:Ce,prefix:r,imageFit:f,imageMaxWidth:g,imageMaxHeight:x,cornerRadius:k,imageHoverClass:B,isEditor:n,isFirstSet:xe,scaled:L,onFirstSetImageDone:se}),W&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:K,width:h,height:"100%"}})]},`${Re}-${ge}`)};if(G){const we=P?w&&q?"paused":"running":"paused",Re=d>0&&$>0?d/$*1e3:0,ge=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:D,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:C>0?{height:C}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:E,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ce,onMouseLeave:Y,style:{WebkitAnimationDuration:ge,animationDuration:ge,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:ye},(xe,Ce)=>a.jsx("div",{ref:Ce===0?T:void 0,className:Ct(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(m),paddingRight:L(m)},"aria-hidden":Ce>0,children:be.map((h,K)=>fe(h,Ce,K,Ce===0&&K<S))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:D,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Ct(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Re)=>fe(we,0,Re))},"marquee-static")]})},zf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1700
+ `}const Lf=30,Pf=20,Za=3,If=12,Rf=32,kf=3,Ef=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Mf=(e,t)=>Array.from({length:t},()=>e).flat(),Af=e=>typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"16:9",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"16:9",reversed:(e==null?void 0:e.reversed)??!1},Hu=e=>e.reduce((t,n)=>t+(n.offsetWidth||n.getBoundingClientRect().width),0),mc=(e,t)=>{if(t<=0||e.children.length<t)return 0;const n=e.children[0],i=e.children[t-1];if(!n||!i)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=i.getBoundingClientRect().right-n.getBoundingClientRect().left;if(l>0)return l;const c=Array.from({length:t},(u,p)=>e.children[p]),d=Hu(c);return d<=0?0:d+r*Math.max(0,t-1)},Ff=e=>{const t=e.getBoundingClientRect().width;if(t>0)return t;const n=e.offsetWidth;if(n>0)return n;const i=Hu(Array.from(e.children));if(i<=0)return 0;const o=getComputedStyle(e),r=Number.parseFloat(o.columnGap||o.gap||"0")||0,l=Number.parseFloat(o.paddingRight)||0;return i+r*Math.max(0,e.children.length-1)+l},Nf=(e,t)=>{const n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.right>n.left&&i.left<n.right},_f=(e,t)=>{const n=e.querySelectorAll(`[data-marquee-item-index="${t}"]`);return Array.from(n).some(i=>Nf(i,e))},Hf=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??"")},Wf=e=>e?e instanceof HTMLVideoElement?e.readyState>=2:e.complete:!1,Of=({item:e,prefix:t,imageFit:n,imageMaxWidth:i,imageMaxHeight:o,cornerRadius:r,imageHoverClass:l,isFirstSet:c,scaled:d,onFirstSetImageDone:u})=>{var D,A,T,C;const p=s.useRef(null),y=!!((D=e.image)!=null&&D.url&&Hf(e.image));s.useLayoutEffect(()=>{c&&Wf(p.current)&&(u==null||u())},[c,(A=e.image)==null?void 0:A.url,u]);const x=n.display==="cover",m=n.ratioValue??"1:1",g=n.reversed??!1,[v,b]=m.split(":").map(Number),S=(g?b:v)/(g?v:b),W=i/S,U=W>o?o:W,B=W>o?o*S:i,P=d(B),H=d(U),V={borderRadius:d(r)},$=x?{pointerEvents:"auto",display:"block",width:"100%",height:"100%",objectFit:"cover",...V}:{pointerEvents:"auto",display:"block",width:"auto",height:"auto",maxWidth:d(i),maxHeight:d(o),objectFit:"contain",...V},L=((T=e.image)==null?void 0:T.url)&&(y?a.jsx("video",{ref:X=>{p.current=X},src:e.image.url,style:$,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto",onLoadedData:c?u:void 0,onError:c?u:void 0}):a.jsx("img",{ref:X=>{p.current=X},src:e.image.url,alt:((C=e.image)==null?void 0:C.name)??"",style:$,onLoad:c?u:void 0,onError:c?u:void 0}));return a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"start",...x?{width:P}:{width:"max-content",maxWidth:d(i),minWidth:0}},children:a.jsx("div",{className:l,style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flexShrink:0,...x?{width:P,height:H,overflow:"hidden",...V}:{width:"max-content",maxWidth:d(i),height:d(o)}},children:L&&a.jsx(R.LinkWrapper,{link:e.link,className:Ct(`${t}-marquee-link`,!x&&`${t}-marquee-link-contain`),children:L})})})},Df=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=R.useScopedStyles(),[l,c]=s.useState(0),d=l>0?Math.round(l):0,u=s.useMemo(()=>Tf(r,d),[r,d]),{speed:p,direction:y,pauseOnHover:x,gap:m,imageMaxWidth:g,imageMaxHeight:v,hoverEffect:b,cornerRadius:M=0}=e,f=s.useMemo(()=>Af(e.imageFit),[e.imageFit]),S=(t==null?void 0:t.length)??0,W=!!o,U=!n||!!i,B=U&&b!=="off"&&b!=="randomize"?`${r}-image-hover-${b}`:void 0,P=n?!!i:!0,V=((t==null?void 0:t.length)??0)>0&&(P||!!n),$=Math.max(0,p)*Lf,L=we=>R.scalingValue(we,n??!1),D=s.useRef(null),A=s.useRef(null),T=s.useRef(null),[C,X]=s.useState(0),w=P&&x==="on",[q,k]=s.useState(!1),[N,j]=s.useState({}),ie=s.useRef(N);ie.current=N;const ae=s.useRef(null),O=s.useRef(0),oe=s.useRef(null),_=s.useMemo(()=>(t??[]).map(we=>{var Re;return((Re=we.image)==null?void 0:Re.url)??""}).join("\0"),[t]),[le,Q]=s.useState(Za),be=s.useMemo(()=>{const we=t??[];return we.length===0||!(P||!!n)?we:Mf(we,le)},[t,P,le,n]),Le=s.useMemo(()=>(t??[]).filter(we=>{var Re;return!!((Re=we.image)!=null&&Re.url)}).length,[t]),ye=V?kf:1;s.useLayoutEffect(()=>{O.current=0,j({}),ae.current=null,Q(Za),c(0)},[_]),s.useEffect(()=>{if(!U||b!=="randomize")return;const we=D.current;if(!we)return;const Re=h=>{j(K=>{const Z=Array.from(h).filter(de=>de in K&&!_f(we,de));if(Z.length===0)return K;const ne={...K};return Z.forEach(de=>{delete ne[de]}),ne})},ge=new IntersectionObserver(h=>{const K=new Set;for(const Z of h){const ne=Z.target.dataset.marqueeItemIndex,de=ne!==void 0?Number(ne):NaN;Number.isNaN(de)||K.add(de)}K.size>0&&Re(K)},{root:we,threshold:0});Object.keys(N).forEach(h=>{const K=Number(h);we.querySelectorAll(`[data-marquee-item-index="${K}"]`).forEach(Z=>ge.observe(Z))});const xe={current:0},Ce=()=>{const h=Object.keys(ie.current);h.length!==0&&(Re(h.map(Number)),xe.current=requestAnimationFrame(Ce))};return Object.keys(ie.current).length>0&&(xe.current=requestAnimationFrame(Ce)),()=>{cancelAnimationFrame(xe.current),ge.disconnect()}},[b,N,U]),s.useEffect(()=>{const we=D.current;if(!we||typeof IntersectionObserver>"u")return;const Re=we.querySelectorAll("video");if(Re.length===0)return;const ge=new IntersectionObserver(xe=>{for(const Ce of xe){const h=Ce.target;Ce.isIntersecting?h.paused&&h.play().catch(()=>{}):h.paused||h.pause()}},{threshold:0});return Re.forEach(xe=>ge.observe(xe)),()=>ge.disconnect()},[V,be,ye,N]),s.useLayoutEffect(()=>{if(!V)return;const we=D.current,Re=T.current;if(!we||!Re)return;const ge={current:0},xe=()=>{const K=we.getBoundingClientRect().width||we.offsetWidth,Z=Ff(Re),ne=ae.current,de=typeof ne=="number"&&Math.abs(ne-Z)<=.25;ae.current=Z;let z=le,I=0;if((P||n)&&S>0&&K>0){const me=mc(Re,S);if(me>=Rf){I=me;const G=Math.min(If,Math.max(Za,Math.ceil(K/me)+1));z=G,G!==le&&Q(G)}}const te=z!==le&&I>0?I*z:Z>0?Z:I>0?I*z:(()=>{const me=mc(Re,S);return me>0?me*z:0})();te>0?c(me=>me<=0?te:!de||Math.round(me)===Math.round(te)?me:te):!de&&l<=0&&(cancelAnimationFrame(ge.current),ge.current=requestAnimationFrame(xe))},Ce=()=>{cancelAnimationFrame(ge.current),ge.current=requestAnimationFrame(xe)};oe.current=Ce,Ce();const h=new ResizeObserver(Ce);return h.observe(we),h.observe(Re),()=>{oe.current=null,cancelAnimationFrame(ge.current),h.disconnect()}},[P,V,l,_,le,S,n]),s.useLayoutEffect(()=>{if(!V||d<=0)return;const we=A.current;we&&Ef(we)},[V,d,y,$]),s.useLayoutEffect(()=>{if(!V||l<=0){X(0);return}const we=A.current,Re=T.current;if(!we||!Re)return;const ge=()=>{const Ce=we.offsetHeight||we.getBoundingClientRect().height,h=Array.from(Re.children).reduce((Z,ne)=>Math.max(Z,ne.offsetHeight||ne.getBoundingClientRect().height),0),K=Ce>0?Ce:h;X(K>0?K:0)};ge();const xe=new ResizeObserver(ge);return xe.observe(we),xe.observe(Re),()=>xe.disconnect()},[V,ye,be,n,m,g,v,l,f,N]),s.useLayoutEffect(()=>{if(!n||!W||!V||typeof window>"u")return;const we=requestAnimationFrame(()=>{window.dispatchEvent(new Event("scroll"))});return()=>cancelAnimationFrame(we)},[n,W,V,y,l,C,m,be]);const ce=()=>{w&&k(!0)},Y=()=>{w&&k(!1)},se=s.useCallback(()=>{var we;O.current=Math.min(Le,O.current+1),(we=oe.current)==null||we.call(oe)},[Le]),pe=s.useCallback((we,Re)=>{j(ge=>{const xe=ge[we]??Re,Ce=(t??[]).filter(K=>K!==xe);if(Ce.length===0)return ge;const h=Ce[Math.floor(Math.random()*Ce.length)];return{...ge,[we]:h}})},[t]),fe=(we,Re,ge,xe)=>{const Ce=U&&b==="randomize"&&f.display==="cover"?N[ge]??we:we,h=`max(${L(m)}, ${Pf}px)`,K=`calc(-0.5 * (${h} + ${L(m)}))`;return a.jsxs("div",{className:`${r}-marquee-card`,"data-marquee-item-index":ge,onMouseEnter:U&&b==="randomize"&&f.display==="cover"?()=>pe(ge,we):void 0,children:[a.jsx(Of,{item:Ce,prefix:r,imageFit:f,imageMaxWidth:g,imageMaxHeight:v,cornerRadius:M,imageHoverClass:B,isEditor:n,isFirstSet:xe,scaled:L,onFirstSetImageDone:se}),W&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",className:`${r}-gap-control`,style:{position:"absolute",top:0,right:K,width:h,height:"100%"}})]},`${Re}-${ge}`)};if(V){const we=P?w&&q?"paused":"running":"paused",Re=d>0&&$>0?d/$*1e3:0,ge=`${Math.max(0,Re)/1e3}s`;return a.jsxs("div",{ref:D,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Marquee",style:C>0?{height:C}:void 0,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{ref:A,className:`${r}-marquee-track`,"data-direction":y,onMouseEnter:ce,onMouseLeave:Y,style:{WebkitAnimationDuration:ge,animationDuration:ge,WebkitAnimationPlayState:we,animationPlayState:we},children:Array.from({length:ye},(xe,Ce)=>a.jsx("div",{ref:Ce===0?T:void 0,className:Ct(`${r}-marquee-row`,`${r}-marquee-set`),style:{gap:L(m),paddingRight:L(m)},"aria-hidden":Ce>0,children:be.map((h,K)=>fe(h,Ce,K,Ce===0&&K<S))},`set-${Ce}`))})]})}return a.jsxs("div",{ref:D,className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:u}}),a.jsx("div",{className:Ct(`${r}-marquee-row`,`${r}-marquee-static`),style:{gap:L(m),transform:"none"},"aria-label":"Marquee",children:t==null?void 0:t.map((we,Re)=>fe(we,0,Re))},"marquee-static")]})},zf=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
1701
1701
  import cn from 'classnames';
1702
1702
  import { CommonComponentProps } from '../props';
1703
- import { scalingValue } from '../utils/scalingValue';
1704
- import { useScopedStyles } from '../utils/useScopedStyles';
1703
+ import { LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
1705
1704
 
1706
1705
  function getCSS(P: string, setWidthPx: number): string {
1707
1706
  const distance = setWidthPx > 0 ? \`\${setWidthPx}px\` : '0px';
@@ -2068,14 +2067,11 @@ const MarqueeItemCard = ({
2068
2067
  }),
2069
2068
  }}
2070
2069
  >
2071
- {imageNode && item.link
2072
- ? (
2073
- <a href={item.link} target='_self' rel='noopener noreferrer' className={cn(\`\${P}-marquee-link\`, !isCover && \`\${P}-marquee-link-contain\`)}>
2074
- {imageNode}
2075
- </a>
2076
- )
2077
- : imageNode
2078
- }
2070
+ {imageNode && (
2071
+ <LinkWrapper link={item.link} className={cn(\`\${P}-marquee-link\`, !isCover && \`\${P}-marquee-link-contain\`)}>
2072
+ {imageNode}
2073
+ </LinkWrapper>
2074
+ )}
2079
2075
  </div>
2080
2076
  </div>
2081
2077
  );
@@ -2475,7 +2471,7 @@ export type MarqueeItem = {
2475
2471
  name?: string;
2476
2472
  type?: 'image' | 'video';
2477
2473
  };
2478
- link?: string;
2474
+ link?: ContentLink;
2479
2475
  };
2480
2476
 
2481
2477
  export type MarqueeSettings = {
@@ -2501,7 +2497,7 @@ type MarqueeProps = {
2501
2497
  isPreviewMode?: boolean;
2502
2498
  isEditMode?: boolean;
2503
2499
  } & CommonComponentProps;
2504
- `,Bf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},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"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:""}]}},jf={element:Df,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:Bf,sourceCode:zf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Vf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2500
+ `,Bf={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},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"]}},hoverEffect:{type:"string",scope:"common",title:"Effect",display:{type:"toggle-cycle",enum:["off","brightness","grayscale"]}},gap:{type:"number",scope:"layout",title:"Gap",min:0,display:{type:"numeric-input"}},imageMaxWidth:{type:"number",scope:"layout",title:"Max width",min:10,display:{type:"numeric-input"}},imageMaxHeight:{type:"number",scope:"layout",title:"Max height",min:10,display:{type:"numeric-input"}},imageFit:{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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}}},defaults:{direction:"left",pauseOnHover:"off",hoverEffect:"off",imageFit:{display:"fit",ratioValue:"16:9",reversed:!1}},layoutDefaults:{m:{speed:.55,gap:.04,imageMaxWidth:.8,imageMaxHeight:.8,cornerRadius:0},t:{speed:1.64,gap:.02,imageMaxWidth:.5208,imageMaxHeight:.5208,cornerRadius:0},d:{speed:1.64,gap:.02,imageMaxWidth:.208,imageMaxHeight:.278,cornerRadius:0}},displayRules:[{if:{name:"imageFit.display",value:"cover"},then:{name:"properties.hoverEffect.display.enum",value:["off","brightness","grayscale","randomize"]}}],layout:["__componentName__","speed","direction","pauseOnHover","hoverEffect","gap","imageMaxWidth","imageMaxHeight","imageFit","cornerRadius"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction"]},{type:"row",items:["speed","imageFit"]},{type:"row",items:["imageMaxWidth","imageMaxHeight"]},{type:"row",items:["cornerRadius"]},{type:"row",title:"Hover Settings",items:[{type:"row",title:"",items:["hoverEffect","pauseOnHover"]}]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}},link:{type:"object",label:"URL",contentKey:"link",display:{type:"link-input"}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""},link:{type:"url",value:"",target:"self"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""},link:{type:"url",value:"",target:"self"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""},link:{type:"url",value:"",target:"self"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""},link:{type:"url",value:"",target:"self"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""},link:{type:"url",value:"",target:"self"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""},link:{type:"url",value:"",target:"self"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""},link:{type:"url",value:"",target:"self"}}]}},jf={element:Df,id:"marquee",name:"Simple Marquee",category:"galleries",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple-Marquee.mp4"},schema:Bf,sourceCode:zf,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}};function Vf(e,t,n){const i=t>0?`${t}px`:"0px",o=n?`
2505
2501
  .${e}-item-image-wrap {
2506
2502
  display: flex;
2507
2503
  flex: 0 0 auto;
@@ -2632,11 +2628,10 @@ ${o}
2632
2628
  left: -9999px;
2633
2629
  top: 0;
2634
2630
  }
2635
- `}const Gf=30,Ja=3,Xf=12,qf=96,gc=3,sa=.72,Uf=100,Kf=10,Yf=e=>e/Uf,Zf=e=>Math.max(0,e)/Kf,Jf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Qf=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),io={ctx:void 0},ey=()=>io.ctx!==void 0?io.ctx:typeof document>"u"?(io.ctx=null,io.ctx):(io.ctx=document.createElement("canvas").getContext("2d"),io.ctx),ty=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},hc=e=>{e.style.transform=""},ny=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},iy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Wu=96,Ou=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,v=y+d;o[p+1]=v,r[p+1]=r[p]+(c(y)+c(v))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},oy=(e,t)=>{const n=Ou(e,t,Wu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},ry=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,g)=>{if(g-m<=1)return[m,g];const x=m+g>>1;return l[x]<=r?d(x,g):d(m,x)},[u,p]=d(0,l.length-1),y=l[p]-l[u],v=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*v)},ay=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=g=>i+t*Math.sin(l*g),d=g=>t*l*Math.cos(l*g),u=-o,y=e+o-u,v=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:v},(g,x)=>{const b=u+x/v*y,k=u+(x+1)/v*y,f=k-b,S=c(b),W=c(k),U=b+f/3,B=S+d(b)*f/3,P=k-f/3,_=W-d(k)*f/3;return`C${U.toFixed(2)} ${B.toFixed(2)} ${P.toFixed(2)} ${_.toFixed(2)} ${k.toFixed(2)} ${W.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},sy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${sa}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((g,x)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:g===" "?" ":g})},x))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),v=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:e.link?a.jsx("a",{href:e.link,className:`${t}-item-link`,style:{gap:r},children:v}):v})},ly=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=F.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:v,curveAmplitude:m,curveFrequency:g,textFontFamily:x,textFontSettings:b,textFontSize:k,textLetterSpacing:f,textWordSpacing:S,textTextAppearance:W,textColor:U,backgroundColor:B,ribbonWidth:P}=e,_=P??k,G=v==="curve",$=Yf(m),L=Zf(g),D=s.useMemo(()=>Vf(o,c,G),[o,c,G]),E=s.useMemo(()=>Qt({fontSettings:{fontFamily:x,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:f,wordSpacing:S,fontSize:k,lineHeight:k,textAppearance:W,color:U},n),[x,b,f,S,k,W,U,n]),T=Oe=>F.scalingValue(Oe,n??!1),C=((t==null?void 0:t.length)??0)>0,V=n?!!i:!0,w=C&&(V||!!n),q=Math.max(0,d)*Gf,I=V&&p==="on",[A,j]=s.useState(!1),ie=V?I&&A?"paused":"running":"paused",ae=ie==="running"&&q>0&&c>0,O=c>0&&q>0?c/q*1e3:0,oe=s.useRef(null),N=s.useRef(null),le=s.useRef(null),Q=s.useRef(null),be=s.useRef(null),Pe=s.useRef(null),ye=s.useRef(ae),ce=s.useRef(null),Y=s.useRef(null),se=s.useRef($),pe=s.useRef(L);ye.current=ae,se.current=$,pe.current=L;const[fe,we]=s.useState(0),[Re,ge]=s.useState(0),[xe,Ce]=s.useState(0),[h,K]=s.useState(0),[Z,ne]=s.useState(0),de=s.useMemo(()=>(t??[]).map(Oe=>{var Ae;return`${Oe.text}\0${((Ae=Oe.image)==null?void 0:Ae.url)??""}\0${Oe.link??""}`}).join("\0"),[t]),[z,R]=s.useState(Ja),ee=s.useMemo(()=>{const Oe=t??[];return Oe.length===0||!(V||n)?Oe:Qf(Oe,z)},[t,V,z,n]),te=w?gc:1;s.useLayoutEffect(()=>{R(Ja),l(0)},[de]),s.useLayoutEffect(()=>{var De;const Oe=Pe.current;if(!Oe)return;const Ae=()=>{const Xe=getComputedStyle(Oe),ct=parseFloat(Xe.fontSize)||0;if(ct<=0)return;const he=ey();if(!he){we(ct*sa),ge(0);return}he.font=`${Xe.fontStyle} ${Xe.fontWeight} ${ct}px ${Xe.fontFamily}`;const Ee=he.measureText("H"),nt=Ee.actualBoundingBoxAscent>0?Ee.actualBoundingBoxAscent:ct*sa,pt=Math.max(0,Ee.actualBoundingBoxDescent||0),Ve=Ee.fontBoundingBoxAscent||0,vt=Ee.fontBoundingBoxDescent||0;we(At=>Math.abs(At-nt)>.5?nt:At);const Rt=Ve>0||vt>0?(vt-pt-(Ve-nt))/2:0;ge(At=>Math.abs(At-Rt)>.25?Rt:At)};Ae();const gt=typeof document<"u"?document.fonts:void 0;(De=gt==null?void 0:gt.ready)==null||De.then(Ae).catch(()=>{});const ze=new ResizeObserver(Ae);return ze.observe(Oe),()=>ze.disconnect()},[E.fontFamily,E.fontWeight,E.fontStyle,E.fontSize,E.lineHeight]),s.useLayoutEffect(()=>{if(!w)return;const Oe=oe.current,Ae=Q.current;if(!Oe||!Ae)return;const gt={id:0},ze=()=>{const he=Oe.offsetWidth||Oe.getBoundingClientRect().width,Ee=Ae.offsetWidth||Ae.getBoundingClientRect().width;if(C&&he>0&&Ee>0){const nt=Ee/z;if(nt>0){let pt=he,Ve=Xf;if(G){const Rt=he*se.current,At=pe.current,wt=At>0?2*Math.PI*At/he:0,Vt=oy(Rt,wt);pt=Math.max(he,Vt*he/(gc-1)),Ve=qf}const vt=Math.min(Ve,Math.max(Ja,Math.ceil(pt/nt)+1));if(vt!==z){R(vt);return}}}Ee>0&&l(Ee)},De=()=>{cancelAnimationFrame(gt.id),gt.id=requestAnimationFrame(ze)};De();const Xe=new ResizeObserver(De);Xe.observe(Oe),Xe.observe(Ae);const ct=()=>{document.hidden||De()};return document.addEventListener("visibilitychange",ct),window.addEventListener("pageshow",ct),window.addEventListener("focus",ct),()=>{cancelAnimationFrame(gt.id),Xe.disconnect(),document.removeEventListener("visibilitychange",ct),window.removeEventListener("pageshow",ct),window.removeEventListener("focus",ct)}},[w,de,z,C,fe,G,$,L]),s.useLayoutEffect(()=>{const Oe=be.current;if(!Oe)return;const Ae={id:0},gt=()=>{const De=Oe.offsetHeight;De>0&&ne(Xe=>Math.abs(Xe-De)>.5?De:Xe)};Ae.id=requestAnimationFrame(gt);const ze=new ResizeObserver(()=>{cancelAnimationFrame(Ae.id),Ae.id=requestAnimationFrame(gt)});return ze.observe(Oe),()=>{cancelAnimationFrame(Ae.id),ze.disconnect()}},[_,n]),s.useLayoutEffect(()=>{if(!G){Ce(0),K(0);return}const Oe=oe.current,Ae=Q.current;if(!Oe||!Ae)return;const gt={id:0},ze=()=>{const Xe=Oe.offsetWidth,ct=Ae.offsetHeight;Xe>0&&K(he=>Math.abs(he-Xe)>.5?Xe:he),ct>0&&Ce(he=>Math.abs(he-ct)>.5?ct:he)};gt.id=requestAnimationFrame(ze);const De=new ResizeObserver(()=>{cancelAnimationFrame(gt.id),gt.id=requestAnimationFrame(ze)});return De.observe(Oe),De.observe(Ae),()=>{cancelAnimationFrame(gt.id),De.disconnect()}},[G,de,fe,k,w]),s.useLayoutEffect(()=>{if(!w||c<=0)return;const Oe=le.current;Oe&&Jf(Oe)},[w,c,u,q]),s.useLayoutEffect(()=>{if(!G||!C)return;const Oe=oe.current;if(!Oe)return;const Ae={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},gt=()=>{for(const nt of Ae.itemsCache)for(const pt of nt.glyphs)hc(pt.inner)},ze=()=>{const nt=N.current??Oe;Ae.itemsCache=Array.from(Oe.querySelectorAll("[data-marquee-text-item]"),pt=>{const Ve=[];return pt.querySelectorAll("[data-marquee-wave-node]").forEach(vt=>{const Rt=vt.firstElementChild;Rt&&Ve.push({inner:Rt,layoutLocalX:iy(vt,nt)})}),{item:pt,glyphs:Ve}}),Ae.cacheDirty=!1},De=()=>{Ae.cacheDirty&&ze();const pt=(N.current??Oe).offsetWidth||1,Ve=pt*se.current,vt=pe.current,Rt=2*Math.PI*vt/pt,At=`${pt}|${Ve}|${Rt}`;if(At!==Ae.lutKey&&(Ae.lutKey=At,Ae.lut=Ou(Ve,Rt,Wu)),Math.abs(Ve)<=0||Rt<=0){gt();return}const wt=le.current,Vt=wt?ny(getComputedStyle(wt).transform):0,jt=Oe.getBoundingClientRect(),Kt=jt.left,Yt=jt.right,kt=Ae.lut&&Ae.lut.wavelength>0?Math.max(0,(Ae.lut.periodArc/Ae.lut.wavelength-1)*pt):0;for(const{item:Bt,glyphs:rn}of Ae.itemsCache){const xt=Bt.getBoundingClientRect();if(xt.right<Kt||xt.left>Yt+kt){for(const yt of rn)hc(yt.inner);continue}for(const yt of rn){const Me=yt.layoutLocalX+Vt,Qe=Ae.lut?ry(Ae.lut,Me):Me,rt=Rt*Qe,dt=Ve*Math.sin(rt),Pt=Ve*Rt*Math.cos(rt),St=Math.atan(Pt)*(180/Math.PI);ty(yt.inner,Qe-Me,dt,St)}}},Xe=()=>{Ae.cancelled||(Ae.raf=0,De(),ye.current&&!document.hidden&&(Ae.raf=requestAnimationFrame(Xe)))},ct=()=>{Ae.cancelled||Ae.raf||(Ae.raf=requestAnimationFrame(Xe))},he=()=>{Ae.cacheDirty=!0,De(),ct()};ce.current=ct,Y.current=he,De(),ct();const Ee=()=>{if(document.hidden){cancelAnimationFrame(Ae.raf),Ae.raf=0;return}cancelAnimationFrame(Ae.raf),Ae.raf=0,he()};return document.addEventListener("visibilitychange",Ee),window.addEventListener("pageshow",Ee),window.addEventListener("focus",Ee),()=>{Ae.cancelled=!0,ce.current=null,Y.current=null,cancelAnimationFrame(Ae.raf),document.removeEventListener("visibilitychange",Ee),window.removeEventListener("pageshow",Ee),window.removeEventListener("focus",Ee),gt()}},[G,C]),s.useLayoutEffect(()=>{var Oe;!G||!C||(Oe=Y.current)==null||Oe.call(Y)},[G,C,r,de,z,fe,$,L,h]),s.useLayoutEffect(()=>{var Oe;(Oe=ce.current)==null||Oe.call(ce)},[ae,u]);const me=Oe=>{I&&Oe.pointerType==="mouse"&&j(!0)},X=()=>{I&&j(!1)},Ie=G?Math.abs($)*100:0,Se=T(_),J={minHeight:Se,...G?{paddingTop:`${Ie}%`,paddingBottom:`${Ie}%`}:{}},He={height:Se,...G?{visibility:"hidden"}:{backgroundColor:B}},We={gap:T(y),minHeight:Se},ot=h*$,qe=Math.abs(ot),tt=Z>0?Z:xe,et=Math.max(xe,tt),Ge=qe+et/2,ve=Math.max(tt,1),_e=G&&h>0&&et>0?ay(h,ot,L,Ge,ve):"",Be=qe*2+et,Ze=_e?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${h} ${Be}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:_e,fill:"none",stroke:B,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,$e=a.jsx("div",{ref:be,className:`${o}-ribbon`,style:He,"aria-hidden":!0}),Ne={...E,lineHeight:fe>0?`${fe}px`:`${sa}em`},Ue=(Oe,Ae,gt)=>a.jsx(sy,{item:Oe,prefix:o,textCss:Ne,capHeightPx:fe,opticalOffsetY:Re,imageGapPx:T(y),isCurve:G},`${Ae}-${gt}`),Je=a.jsx("span",{ref:Pe,"aria-hidden":!0,className:`${o}-cap-ref`,style:E,children:"H"}),st=`${Math.max(0,O)/1e3}s`,it=w?a.jsx("div",{ref:le,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:me,onPointerLeave:X,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:te},(Oe,Ae)=>a.jsx("div",{ref:Ae===0?Q:void 0,className:`${o}-marquee-set`,style:{...We,paddingRight:T(y)},"aria-hidden":Ae>0,children:ee.map((gt,ze)=>Ue(gt,Ae,ze))},`set-${Ae}`))}):a.jsx("div",{ref:Q,className:Ct(`${o}-marquee-set`,`${o}-marquee-static`),style:We,children:t==null?void 0:t.map((Oe,Ae)=>Ue(Oe,0,Ae))});return a.jsxs("div",{ref:oe,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),Je,a.jsxs("div",{ref:N,className:`${o}-marquee-wrapper`,style:J,children:[$e,Ze,it]})]})},cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2631
+ `}const Gf=30,Ja=3,Xf=12,qf=96,gc=3,sa=.72,Uf=100,Kf=10,Yf=e=>e/Uf,Zf=e=>Math.max(0,e)/Kf,Jf=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},Qf=(e,t)=>Array.from({length:t*e.length},(n,i)=>e[i%e.length]),no={ctx:void 0},ey=()=>no.ctx!==void 0?no.ctx:typeof document>"u"?(no.ctx=null,no.ctx):(no.ctx=document.createElement("canvas").getContext("2d"),no.ctx),ty=(e,t,n,i)=>{e.style.transform=`translate3d(${t}px, ${n}px, 0) rotate(${i}deg)`},hc=e=>{e.style.transform=""},ny=e=>{if(!e||e==="none")return 0;try{return new DOMMatrixReadOnly(e).m41}catch{return 0}},iy=(e,t)=>{const n=(i,o)=>{if(!i||i===t)return o;const r=o+i.offsetLeft,l=i.offsetParent;return!l||l===i?r:n(l,r)};return n(e,e.offsetWidth/2)},Wu=96,Ou=(e,t,n)=>{if(t<=0||Math.abs(e)<=0||n<2)return null;const i=2*Math.PI/t,o=new Float64Array(n+1),r=new Float64Array(n+1),l=e*t,c=u=>Math.sqrt(1+(l*Math.cos(t*u))**2),d=i/n;return Array.from({length:n},(u,p)=>{const y=p*d,x=y+d;o[p+1]=x,r[p+1]=r[p]+(c(y)+c(x))*.5*d}),{wavelength:i,periodArc:r[n],x:o,s:r}},oy=(e,t)=>{const n=Ou(e,t,Wu);return!n||n.wavelength<=0?1:n.periodArc/n.wavelength},ry=(e,t)=>{if(e.periodArc<=0)return t;const n=t<0?-1:1,i=Math.abs(t),o=Math.floor(i/e.periodArc),r=i-o*e.periodArc,{s:l,x:c}=e,d=(m,g)=>{if(g-m<=1)return[m,g];const v=m+g>>1;return l[v]<=r?d(v,g):d(m,v)},[u,p]=d(0,l.length-1),y=l[p]-l[u],x=y>0?(r-l[u])/y:0;return n*(o*e.wavelength+c[u]+(c[p]-c[u])*x)},ay=(e,t,n,i,o=0)=>{const r=Math.max(0,n),l=e>0?2*Math.PI*r/e:0,c=g=>i+t*Math.sin(l*g),d=g=>t*l*Math.cos(l*g),u=-o,y=e+o-u,x=Math.max(4,Math.ceil(r*4*(y/Math.max(e,1)))),m=Array.from({length:x},(g,v)=>{const b=u+v/x*y,M=u+(v+1)/x*y,f=M-b,S=c(b),W=c(M),U=b+f/3,B=S+d(b)*f/3,P=M-f/3,H=W-d(M)*f/3;return`C${U.toFixed(2)} ${B.toFixed(2)} ${P.toFixed(2)} ${H.toFixed(2)} ${M.toFixed(2)} ${W.toFixed(2)}`});return[`M${u.toFixed(2)} ${c(u).toFixed(2)}`,...m].join(" ")},sy=({item:e,prefix:t,textCss:n,capHeightPx:i,opticalOffsetY:o,imageGapPx:r,isCurve:l})=>{var m;const c=o!==0?{...n,transform:`translateY(${o}px)`}:n,d=i>0?{height:`${i}px`}:{fontSize:n.fontSize,height:`${sa}em`},u=((m=e.image)==null?void 0:m.url)&&a.jsx("img",{src:e.image.url,alt:e.image.name??"",className:`${t}-item-image`,style:d}),p=u&&(l?a.jsx("span",{className:`${t}-item-image-wrap`,"data-marquee-wave-node":!0,children:u}):u),y=l?a.jsx("span",{className:`${t}-text`,style:c,children:Array.from(e.text).map((g,v)=>a.jsx("span",{className:`${t}-glyph`,"data-marquee-wave-node":!0,children:a.jsx("span",{className:`${t}-glyph-inner`,children:g===" "?" ":g})},v))}):a.jsx("span",{className:`${t}-text`,style:c,children:e.text}),x=a.jsxs(a.Fragment,{children:[p,y]});return a.jsx("div",{className:`${t}-item`,"data-marquee-text-item":!0,style:{gap:r},children:a.jsx(R.LinkWrapper,{link:e.link,className:`${t}-item-link`,style:{gap:r},children:x})})},ly=({settings:e,content:t,isEditor:n,isPreviewMode:i})=>{const{prefix:o}=R.useScopedStyles(),[r,l]=s.useState(0),c=r>0?Math.round(r):0,{speed:d,direction:u,pauseOnHover:p,gap:y,layoutType:x,curveAmplitude:m,curveFrequency:g,textFontFamily:v,textFontSettings:b,textFontSize:M,textLetterSpacing:f,textWordSpacing:S,textTextAppearance:W,textColor:U,backgroundColor:B,ribbonWidth:P}=e,H=P??M,V=x==="curve",$=Yf(m),L=Zf(g),D=s.useMemo(()=>Vf(o,c,V),[o,c,V]),A=s.useMemo(()=>Qt({fontSettings:{fontFamily:v,fontWeight:b.fontWeight,fontStyle:b.fontStyle},letterSpacing:f,wordSpacing:S,fontSize:M,lineHeight:M,textAppearance:W,color:U},n),[v,b,f,S,M,W,U,n]),T=Oe=>R.scalingValue(Oe,n??!1),C=((t==null?void 0:t.length)??0)>0,X=n?!!i:!0,w=C&&(X||!!n),q=Math.max(0,d)*Gf,k=X&&p==="on",[N,j]=s.useState(!1),ie=X?k&&N?"paused":"running":"paused",ae=ie==="running"&&q>0&&c>0,O=c>0&&q>0?c/q*1e3:0,oe=s.useRef(null),_=s.useRef(null),le=s.useRef(null),Q=s.useRef(null),be=s.useRef(null),Le=s.useRef(null),ye=s.useRef(ae),ce=s.useRef(null),Y=s.useRef(null),se=s.useRef($),pe=s.useRef(L);ye.current=ae,se.current=$,pe.current=L;const[fe,we]=s.useState(0),[Re,ge]=s.useState(0),[xe,Ce]=s.useState(0),[h,K]=s.useState(0),[Z,ne]=s.useState(0),de=s.useMemo(()=>(t??[]).map(Oe=>{var Fe,ut;return`${Oe.text}\0${((Fe=Oe.image)==null?void 0:Fe.url)??""}\0${((ut=Oe.link)==null?void 0:ut.value)??""}`}).join("\0"),[t]),[z,I]=s.useState(Ja),ee=s.useMemo(()=>{const Oe=t??[];return Oe.length===0||!(X||n)?Oe:Qf(Oe,z)},[t,X,z,n]),te=w?gc:1;s.useLayoutEffect(()=>{I(Ja),l(0)},[de]),s.useLayoutEffect(()=>{var De;const Oe=Le.current;if(!Oe)return;const Fe=()=>{const Xe=getComputedStyle(Oe),pt=parseFloat(Xe.fontSize)||0;if(pt<=0)return;const he=ey();if(!he){we(pt*sa),ge(0);return}he.font=`${Xe.fontStyle} ${Xe.fontWeight} ${pt}px ${Xe.fontFamily}`;const Me=he.measureText("H"),nt=Me.actualBoundingBoxAscent>0?Me.actualBoundingBoxAscent:pt*sa,gt=Math.max(0,Me.actualBoundingBoxDescent||0),Ve=Me.fontBoundingBoxAscent||0,yt=Me.fontBoundingBoxDescent||0;we(At=>Math.abs(At-nt)>.5?nt:At);const It=Ve>0||yt>0?(yt-gt-(Ve-nt))/2:0;ge(At=>Math.abs(At-It)>.25?It:At)};Fe();const ut=typeof document<"u"?document.fonts:void 0;(De=ut==null?void 0:ut.ready)==null||De.then(Fe).catch(()=>{});const ze=new ResizeObserver(Fe);return ze.observe(Oe),()=>ze.disconnect()},[A.fontFamily,A.fontWeight,A.fontStyle,A.fontSize,A.lineHeight]),s.useLayoutEffect(()=>{if(!w)return;const Oe=oe.current,Fe=Q.current;if(!Oe||!Fe)return;const ut={id:0},ze=()=>{const he=Oe.offsetWidth||Oe.getBoundingClientRect().width,Me=Fe.offsetWidth||Fe.getBoundingClientRect().width;if(C&&he>0&&Me>0){const nt=Me/z;if(nt>0){let gt=he,Ve=Xf;if(V){const It=he*se.current,At=pe.current,St=At>0?2*Math.PI*At/he:0,Vt=oy(It,St);gt=Math.max(he,Vt*he/(gc-1)),Ve=qf}const yt=Math.min(Ve,Math.max(Ja,Math.ceil(gt/nt)+1));if(yt!==z){I(yt);return}}}Me>0&&l(Me)},De=()=>{cancelAnimationFrame(ut.id),ut.id=requestAnimationFrame(ze)};De();const Xe=new ResizeObserver(De);Xe.observe(Oe),Xe.observe(Fe);const pt=()=>{document.hidden||De()};return document.addEventListener("visibilitychange",pt),window.addEventListener("pageshow",pt),window.addEventListener("focus",pt),()=>{cancelAnimationFrame(ut.id),Xe.disconnect(),document.removeEventListener("visibilitychange",pt),window.removeEventListener("pageshow",pt),window.removeEventListener("focus",pt)}},[w,de,z,C,fe,V,$,L]),s.useLayoutEffect(()=>{const Oe=be.current;if(!Oe)return;const Fe={id:0},ut=()=>{const De=Oe.offsetHeight;De>0&&ne(Xe=>Math.abs(Xe-De)>.5?De:Xe)};Fe.id=requestAnimationFrame(ut);const ze=new ResizeObserver(()=>{cancelAnimationFrame(Fe.id),Fe.id=requestAnimationFrame(ut)});return ze.observe(Oe),()=>{cancelAnimationFrame(Fe.id),ze.disconnect()}},[H,n]),s.useLayoutEffect(()=>{if(!V){Ce(0),K(0);return}const Oe=oe.current,Fe=Q.current;if(!Oe||!Fe)return;const ut={id:0},ze=()=>{const Xe=Oe.offsetWidth,pt=Fe.offsetHeight;Xe>0&&K(he=>Math.abs(he-Xe)>.5?Xe:he),pt>0&&Ce(he=>Math.abs(he-pt)>.5?pt:he)};ut.id=requestAnimationFrame(ze);const De=new ResizeObserver(()=>{cancelAnimationFrame(ut.id),ut.id=requestAnimationFrame(ze)});return De.observe(Oe),De.observe(Fe),()=>{cancelAnimationFrame(ut.id),De.disconnect()}},[V,de,fe,M,w]),s.useLayoutEffect(()=>{if(!w||c<=0)return;const Oe=le.current;Oe&&Jf(Oe)},[w,c,u,q]),s.useLayoutEffect(()=>{if(!V||!C)return;const Oe=oe.current;if(!Oe)return;const Fe={raf:0,cancelled:!1,lut:null,lutKey:"",itemsCache:[],cacheDirty:!0},ut=()=>{for(const nt of Fe.itemsCache)for(const gt of nt.glyphs)hc(gt.inner)},ze=()=>{const nt=_.current??Oe;Fe.itemsCache=Array.from(Oe.querySelectorAll("[data-marquee-text-item]"),gt=>{const Ve=[];return gt.querySelectorAll("[data-marquee-wave-node]").forEach(yt=>{const It=yt.firstElementChild;It&&Ve.push({inner:It,layoutLocalX:iy(yt,nt)})}),{item:gt,glyphs:Ve}}),Fe.cacheDirty=!1},De=()=>{Fe.cacheDirty&&ze();const gt=(_.current??Oe).offsetWidth||1,Ve=gt*se.current,yt=pe.current,It=2*Math.PI*yt/gt,At=`${gt}|${Ve}|${It}`;if(At!==Fe.lutKey&&(Fe.lutKey=At,Fe.lut=Ou(Ve,It,Wu)),Math.abs(Ve)<=0||It<=0){ut();return}const St=le.current,Vt=St?ny(getComputedStyle(St).transform):0,jt=Oe.getBoundingClientRect(),Ut=jt.left,Kt=jt.right,Rt=Fe.lut&&Fe.lut.wavelength>0?Math.max(0,(Fe.lut.periodArc/Fe.lut.wavelength-1)*gt):0;for(const{item:zt,glyphs:rn}of Fe.itemsCache){const vt=zt.getBoundingClientRect();if(vt.right<Ut||vt.left>Kt+Rt){for(const ft of rn)hc(ft.inner);continue}for(const ft of rn){const Ae=ft.layoutLocalX+Vt,Qe=Fe.lut?ry(Fe.lut,Ae):Ae,at=It*Qe,mt=Ve*Math.sin(at),Lt=Ve*It*Math.cos(at),bt=Math.atan(Lt)*(180/Math.PI);ty(ft.inner,Qe-Ae,mt,bt)}}},Xe=()=>{Fe.cancelled||(Fe.raf=0,De(),ye.current&&!document.hidden&&(Fe.raf=requestAnimationFrame(Xe)))},pt=()=>{Fe.cancelled||Fe.raf||(Fe.raf=requestAnimationFrame(Xe))},he=()=>{Fe.cacheDirty=!0,De(),pt()};ce.current=pt,Y.current=he,De(),pt();const Me=()=>{if(document.hidden){cancelAnimationFrame(Fe.raf),Fe.raf=0;return}cancelAnimationFrame(Fe.raf),Fe.raf=0,he()};return document.addEventListener("visibilitychange",Me),window.addEventListener("pageshow",Me),window.addEventListener("focus",Me),()=>{Fe.cancelled=!0,ce.current=null,Y.current=null,cancelAnimationFrame(Fe.raf),document.removeEventListener("visibilitychange",Me),window.removeEventListener("pageshow",Me),window.removeEventListener("focus",Me),ut()}},[V,C]),s.useLayoutEffect(()=>{var Oe;!V||!C||(Oe=Y.current)==null||Oe.call(Y)},[V,C,r,de,z,fe,$,L,h]),s.useLayoutEffect(()=>{var Oe;(Oe=ce.current)==null||Oe.call(ce)},[ae,u]);const me=Oe=>{k&&Oe.pointerType==="mouse"&&j(!0)},G=()=>{k&&j(!1)},Ie=V?Math.abs($)*100:0,Se=T(H),J={minHeight:Se,...V?{paddingTop:`${Ie}%`,paddingBottom:`${Ie}%`}:{}},He={height:Se,...V?{visibility:"hidden"}:{backgroundColor:B}},We={gap:T(y),minHeight:Se},ot=h*$,qe=Math.abs(ot),tt=Z>0?Z:xe,et=Math.max(xe,tt),Ge=qe+et/2,ve=Math.max(tt,1),_e=V&&h>0&&et>0?ay(h,ot,L,Ge,ve):"",je=qe*2+et,Ze=_e?a.jsx("svg",{className:`${o}-curve-bg`,viewBox:`0 0 ${h} ${je}`,preserveAspectRatio:"none","aria-hidden":!0,children:a.jsx("path",{d:_e,fill:"none",stroke:B,strokeWidth:tt,strokeLinecap:"butt",strokeLinejoin:"round"})}):null,$e=a.jsx("div",{ref:be,className:`${o}-ribbon`,style:He,"aria-hidden":!0}),Ne={...A,lineHeight:fe>0?`${fe}px`:`${sa}em`},Ue=(Oe,Fe,ut)=>a.jsx(sy,{item:Oe,prefix:o,textCss:Ne,capHeightPx:fe,opticalOffsetY:Re,imageGapPx:T(y),isCurve:V},`${Fe}-${ut}`),Je=a.jsx("span",{ref:Le,"aria-hidden":!0,className:`${o}-cap-ref`,style:A,children:"H"}),st=`${Math.max(0,O)/1e3}s`,it=w?a.jsx("div",{ref:le,className:`${o}-marquee-track`,"data-direction":u,onPointerEnter:me,onPointerLeave:G,style:{WebkitAnimationDuration:st,animationDuration:st,WebkitAnimationPlayState:ie,animationPlayState:ie},children:Array.from({length:te},(Oe,Fe)=>a.jsx("div",{ref:Fe===0?Q:void 0,className:`${o}-marquee-set`,style:{...We,paddingRight:T(y)},"aria-hidden":Fe>0,children:ee.map((ut,ze)=>Ue(ut,Fe,ze))},`set-${Fe}`))}):a.jsx("div",{ref:Q,className:Ct(`${o}-marquee-set`,`${o}-marquee-static`),style:We,children:t==null?void 0:t.map((Oe,Fe)=>Ue(Oe,0,Fe))});return a.jsxs("div",{ref:oe,className:`${o}-wrapper`,"aria-label":"Marquee text",children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:D}}),Je,a.jsxs("div",{ref:_,className:`${o}-marquee-wrapper`,style:J,children:[$e,Ze,it]})]})},cy=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
2636
2632
  import cn from 'classnames';
2637
2633
  import { CommonComponentProps } from '../props';
2638
- import { scalingValue } from '../utils/scalingValue';
2639
- import { useScopedStyles } from '../utils/useScopedStyles';
2634
+ import { LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
2640
2635
  import { textStylesToCss } from '../utils/textStylesToCss';
2641
2636
 
2642
2637
  function getCSS(P: string, setWidthPx: number, isCurve: boolean): string {
@@ -2975,9 +2970,7 @@ const MarqueeTextItemView = ({ item, prefix: P, textCss, capHeightPx, opticalOff
2975
2970
  );
2976
2971
  return (
2977
2972
  <div className={\`\${P}-item\`} data-marquee-text-item style={{ gap: imageGapPx }}>
2978
- {item.link
2979
- ? <a href={item.link} className={\`\${P}-item-link\`} style={{ gap: imageGapPx }}>{content}</a>
2980
- : content}
2973
+ <LinkWrapper link={item.link} className={\`\${P}-item-link\`} style={{ gap: imageGapPx }}>{content}</LinkWrapper>
2981
2974
  </div>
2982
2975
  );
2983
2976
  };
@@ -3060,7 +3053,7 @@ export const MarqueeText = ({ settings, content, isEditor, isPreviewMode }: Marq
3060
3053
  const [ribbonHeightPx, setRibbonHeightPx] = useState(0);
3061
3054
 
3062
3055
  const contentKey = useMemo(
3063
- () => (content ?? []).map((i) => \`\${i.text}\\0\${i.image?.url ?? ''}\\0\${i.link ?? ''}\`).join('\\0'),
3056
+ () => (content ?? []).map((i) => \`\${i.text}\\0\${i.image?.url ?? ''}\\0\${i.link?.value ?? ''}\`).join('\\0'),
3064
3057
  [content],
3065
3058
  );
3066
3059
  const [contentSequenceRepeat, setContentSequenceRepeat] = useState(MIN_CONTENT_SEQUENCE_REPEAT);
@@ -3531,7 +3524,7 @@ export type MarqueeTextItem = {
3531
3524
  url?: string;
3532
3525
  name?: string;
3533
3526
  };
3534
- link?: string;
3527
+ link?: ContentLink;
3535
3528
  };
3536
3529
 
3537
3530
  export type MarqueeTextSettings = {
@@ -3567,7 +3560,7 @@ type MarqueeTextProps = {
3567
3560
  isPreviewMode?: boolean;
3568
3561
  isEditMode?: boolean;
3569
3562
  } & CommonComponentProps;
3570
- `,dy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},uy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},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,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...dy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{type:"media-input"}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:""}]}},py={element:ly,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:uy,sourceCode:cy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function my(e,t){const n=t>0?`${t}px`:"0px";return`
3563
+ `,dy={fontSettings:{type:"object",scope:"common",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},uy={type:"object",version:1,settings:{sizing:"auto manual",properties:{speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},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,display:{type:"numeric-input"}},ribbonWidth:{type:"number",scope:"layout",title:"Ribbon Width",min:0,display:{type:"numeric-input"}},layoutType:{type:"string",scope:"common",title:"Path Type",display:{type:"toggle-cycle",enum:["straight","curve"]}},curveAmplitude:{type:"number",scope:"layout",title:"Amplitude",min:-30,max:30,step:1,display:{type:"common-numeric-input",visible:!1}},curveFrequency:{type:"number",scope:"layout",title:"Frequency",min:0,max:100,step:1,display:{type:"common-numeric-input",visible:!1}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...dy.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Color"},backgroundColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Ribbon Color"}},defaults:{direction:"left",pauseOnHover:"off",layoutType:"curve",textFontFamily:"Antique Série",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},textColor:"#FFFFFF",backgroundColor:"#2E12F0"},layoutDefaults:{m:{speed:.55,gap:.04,ribbonWidth:.08,curveAmplitude:6,curveFrequency:15,textFontSize:.08},t:{speed:1.3,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:15,textFontSize:.07},d:{speed:2.5,gap:.02,ribbonWidth:.11,curveAmplitude:5,curveFrequency:18,textFontSize:.071}},displayRules:[{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveAmplitude.display.visible",value:!0}},{if:{name:"layoutType",value:"curve"},then:{name:"properties.curveFrequency.display.visible",value:!0}}],layout:["__componentName__","speed","direction","pauseOnHover","gap","ribbonWidth","layoutType","curveAmplitude","curveFrequency"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["direction","speed"]},{type:"row",items:["ribbonWidth","gap"]},{type:"row",items:["pauseOnHover","layoutType"]},{type:"row",items:["curveAmplitude","curveFrequency"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLetterSpacing","textWordSpacing"]},"textTextAppearance"]}],paletteBookmark:{items:["textColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!1},items:{type:"object",properties:{text:{placeholder:"Add text...",label:"Text",contentKey:"title",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input"}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}}},default:[{text:"NEW WORK",image:{url:"https://cdn.cntrl.site/component-assets/marquee_text_icon.svg",name:""},link:{type:"url",value:"",target:"self"}}]}},py={element:ly,id:"marquee-text",name:"Marquee Text",category:"typography",version:1,defaultSize:{d:{width:"100%"},t:{width:"100%"},m:{width:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Text_Marquee.mp4"},schema:uy,sourceCode:cy,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}};function my(e,t){const n=t>0?`${t}px`:"0px";return`
3571
3564
  .${e}-marquee-wrapper {
3572
3565
  overflow: hidden;
3573
3566
  width: 100%;
@@ -3656,7 +3649,7 @@ type MarqueeTextProps = {
3656
3649
  pointer-events: auto;
3657
3650
  z-index: 10;
3658
3651
  }
3659
- `}const gy=30,fc=2,hy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},fy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:v,stroke:m,strokeColor:g,bgColor:x,padding:b,logoMarginTop:k,logoWidth:f,logoHeight:S,captionMarginTop:W}=e,U=!!o,B=((t==null?void 0:t.length)??0)>0,P=c>0&&(!n||i),_=B&&(P||n),G=Math.max(0,c)*gy,$=R=>F.scalingValue(R,n??!1),L=s.useRef(null),D=s.useRef(null),E=s.useRef(null),[T,C]=s.useState(0),[V,w]=s.useState(0),q=V>0?V:0,I=s.useMemo(()=>my(r,q),[r,q]),[A,j]=s.useState(0),ie=P&&u==="on",[ae,O]=s.useState(!1),oe=s.useRef(null),[N,le]=s.useState(0),[Q,be]=s.useState(0),Pe=s.useRef(null),ye=R=>{var te,me,X,Ie,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${R}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${R}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((me=e==null?void 0:e[`${R}FontSettings`])==null?void 0:me.fontStyle)??"normal"},textAppearance:{textTransform:((X=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:X.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${R}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${R}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${R}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${R}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${R}LineHeight`])??.01,color:(e==null?void 0:e[`${R}Color`])??"#000000"}},ce=ye("text"),Y=ye("caption"),se=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(R=>{var ee,te;return(((ee=R.text)==null?void 0:ee.length)??0)>0||(((te=R.caption)==null?void 0:te.length)??0)>0}),[t]),pe=s.useMemo(()=>!_||(t==null?void 0:t.length)===0?1:V<=0||T<=0?fc:Math.max(fc,Math.ceil(T/V)+1),[_,t==null?void 0:t.length,V,T]);s.useLayoutEffect(()=>{if(!_)return;const R=L.current,ee=E.current;if(!R||!ee)return;let te=0;const me=()=>{const Se=R.getBoundingClientRect().width,J=ee.getBoundingClientRect().width,He=Pe.current,We=typeof He=="number"&&Math.abs(He-J)<=.25;if(Pe.current=J,C(Se),typeof J=="number"&&J>0&&V<=0){w(J);return}We&&J!==V?w(J):!We&&V<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(me))},X=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(me)};X();const Ie=new ResizeObserver(X);return Ie.observe(R),Ie.observe(ee),()=>{cancelAnimationFrame(te),Ie.disconnect()}},[P,_,V]);const fe=q>0&&G>0?q/G*1e3:0,we=`${Math.max(0,fe)/1e3}s`;s.useLayoutEffect(()=>{if(!_||q<=0)return;const R=D.current;R&&hy(R)},[_,q,d]),s.useLayoutEffect(()=>{if(!_){j(0);return}const R=E.current,ee=D.current;if(!R||!ee)return;const te=()=>{let X=0;for(let Ie=0;Ie<R.children.length;Ie++){const J=R.children[Ie].firstElementChild;J&&(X=Math.max(X,J.offsetHeight))}X<=0&&(X=ee.offsetHeight),j(X>0?X:0)};te();const me=new ResizeObserver(te);return me.observe(R),me.observe(ee),()=>{me.disconnect()}},[_,pe,t,n,p,y,b,m,v,f,S,N,Q]);const Re=()=>{ie&&O(!0)},ge=()=>{ie&&O(!1)},xe=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),h=s.useCallback((R,ee,te,me)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":U?me==null?void 0:me.controlsName:void 0,"data-controls-axis":U?"y":void 0,className:U?`${r}-control`:void 0,style:{height:$((me==null?void 0:me.marginTop)??0)}}),a.jsx("div",{...me!=null&&me.dataMeasureKind?{"data-testimonial-measure":me.dataMeasureKind}:{},style:{...Qt(R,n),textAlign:Ce,pointerEvents:"auto",...typeof(me==null?void 0:me.minHeightPx)=="number"&&me.minHeightPx>0?{minHeight:me.minHeightPx}:{}},children:a.jsx(Ki,{content:ee})})]},te),[xe,Ce,n,U,r,$]),K=s.useCallback((R,ee,te)=>{var me,X,Ie;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(y+m*2),height:"100%",borderRadius:$(v),border:`${$(m)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:x}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:xe,textAlign:Ce},children:[R.text&&h(ce,R.text,"text",te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(te==null?void 0:te.textMinHeightPx)=="number"&&te.textMinHeightPx>0?{minHeightPx:te.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":U&&!(te!=null&&te.dataMeasureAttrs)?"logoMarginTop":void 0,className:U&&!(te!=null&&te.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(k)}}),a.jsx("div",{style:{width:$(f),height:$(S)},children:((me=R.logo)==null?void 0:me.url)&&a.jsx("img",{src:R.logo.url,alt:((X=R.logo)==null?void 0:X.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=R.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),R.caption&&h(Y,R.caption,"caption",{...te!=null&&te.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:W,...te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(te==null?void 0:te.captionMinHeightPx)=="number"&&te.captionMinHeightPx>0?{minHeightPx:te.captionMinHeightPx}:{}})]})]},ee)},[x,W,Y,y,v,S,k,f,xe,Ce,b.bottom,b.left,b.right,b.top,h,m,g,ce,n,U,r]),Z=s.useCallback(R=>{le(R.maxTextPx),be(R.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!se){Z({maxTextPx:0,maxCaptionPx:0});return}const R=oe.current;if(!R)return;const ee=()=>{F.readTestimonialTextMeasure(R,Z)};ee();const te=new ResizeObserver(ee);return te.observe(R),()=>{te.disconnect()}},[se,Z,t,K]);const ne=se?{textMinHeightPx:N,captionMinHeightPx:Q}:void 0,de=se?a.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((R,ee)=>K(R,`measure-${ee}`,{dataMeasureAttrs:!0}))}):null,z=(R,ee)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[K(R,`card-${ee}`,ne),U&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ee);if(_){const R=P?ie&&ae?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...A>0?{height:A}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:I}}),de,a.jsx("div",{ref:D,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Re,onMouseLeave:ge,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:we,WebkitAnimationDuration:we,animationPlayState:R,WebkitAnimationPlayState:R},children:Array.from({length:pe},(ee,te)=>a.jsx("div",{ref:te===0?E:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":te>0,children:t==null?void 0:t.map((me,X)=>z(me,`${te}-${X}`))},`set-${te}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:I}}),de,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((R,ee)=>z(R,ee))})]})},yy=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3652
+ `}const gy=30,fc=2,hy=e=>{e.style.setProperty("animation-name","none"),e.style.setProperty("-webkit-animation-name","none"),e.offsetHeight,e.style.removeProperty("animation-name"),e.style.removeProperty("-webkit-animation-name")},fy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=R.useScopedStyles(),{align:l,speed:c,direction:d,pauseOnHover:u,gap:p,cardWidth:y,corners:x,stroke:m,strokeColor:g,bgColor:v,padding:b,logoMarginTop:M,logoWidth:f,logoHeight:S,captionMarginTop:W}=e,U=!!o,B=((t==null?void 0:t.length)??0)>0,P=c>0&&(!n||i),H=B&&(P||n),V=Math.max(0,c)*gy,$=I=>R.scalingValue(I,n??!1),L=s.useRef(null),D=s.useRef(null),A=s.useRef(null),[T,C]=s.useState(0),[X,w]=s.useState(0),q=X>0?X:0,k=s.useMemo(()=>my(r,q),[r,q]),[N,j]=s.useState(0),ie=P&&u==="on",[ae,O]=s.useState(!1),oe=s.useRef(null),[_,le]=s.useState(0),[Q,be]=s.useState(0),Le=s.useRef(null),ye=I=>{var te,me,G,Ie,Se;return{fontSettings:{fontFamily:(e==null?void 0:e[`${I}FontFamily`])??"Arial",fontWeight:((te=e==null?void 0:e[`${I}FontSettings`])==null?void 0:te.fontWeight)??400,fontStyle:((me=e==null?void 0:e[`${I}FontSettings`])==null?void 0:me.fontStyle)??"normal"},textAppearance:{textTransform:((G=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:G.textTransform)??"none",textDecoration:((Ie=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Ie.textDecoration)??"none",fontVariant:((Se=e==null?void 0:e[`${I}TextAppearance`])==null?void 0:Se.fontVariant)??"normal"},letterSpacing:(e==null?void 0:e[`${I}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${I}WordSpacing`])??0,fontSize:(e==null?void 0:e[`${I}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${I}LineHeight`])??.01,color:(e==null?void 0:e[`${I}Color`])??"#000000"}},ce=ye("text"),Y=ye("caption"),se=s.useMemo(()=>((t==null?void 0:t.length)??0)>1&&(t??[]).some(I=>{var ee,te;return(((ee=I.text)==null?void 0:ee.length)??0)>0||(((te=I.caption)==null?void 0:te.length)??0)>0}),[t]),pe=s.useMemo(()=>!H||(t==null?void 0:t.length)===0?1:X<=0||T<=0?fc:Math.max(fc,Math.ceil(T/X)+1),[H,t==null?void 0:t.length,X,T]);s.useLayoutEffect(()=>{if(!H)return;const I=L.current,ee=A.current;if(!I||!ee)return;let te=0;const me=()=>{const Se=I.getBoundingClientRect().width,J=ee.getBoundingClientRect().width,He=Le.current,We=typeof He=="number"&&Math.abs(He-J)<=.25;if(Le.current=J,C(Se),typeof J=="number"&&J>0&&X<=0){w(J);return}We&&J!==X?w(J):!We&&X<=0&&(cancelAnimationFrame(te),te=requestAnimationFrame(me))},G=()=>{cancelAnimationFrame(te),te=requestAnimationFrame(me)};G();const Ie=new ResizeObserver(G);return Ie.observe(I),Ie.observe(ee),()=>{cancelAnimationFrame(te),Ie.disconnect()}},[P,H,X]);const fe=q>0&&V>0?q/V*1e3:0,we=`${Math.max(0,fe)/1e3}s`;s.useLayoutEffect(()=>{if(!H||q<=0)return;const I=D.current;I&&hy(I)},[H,q,d]),s.useLayoutEffect(()=>{if(!H){j(0);return}const I=A.current,ee=D.current;if(!I||!ee)return;const te=()=>{let G=0;for(let Ie=0;Ie<I.children.length;Ie++){const J=I.children[Ie].firstElementChild;J&&(G=Math.max(G,J.offsetHeight))}G<=0&&(G=ee.offsetHeight),j(G>0?G:0)};te();const me=new ResizeObserver(te);return me.observe(I),me.observe(ee),()=>{me.disconnect()}},[H,pe,t,n,p,y,b,m,x,f,S,_,Q]);const Re=()=>{ie&&O(!0)},ge=()=>{ie&&O(!1)},xe=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[l]),Ce=s.useMemo(()=>{switch(l){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[l]),h=s.useCallback((I,ee,te,me)=>a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":U?me==null?void 0:me.controlsName:void 0,"data-controls-axis":U?"y":void 0,className:U?`${r}-control`:void 0,style:{height:$((me==null?void 0:me.marginTop)??0)}}),a.jsx("div",{...me!=null&&me.dataMeasureKind?{"data-testimonial-measure":me.dataMeasureKind}:{},style:{...Qt(I,n),textAlign:Ce,pointerEvents:"auto",...typeof(me==null?void 0:me.minHeightPx)=="number"&&me.minHeightPx>0?{minHeight:me.minHeightPx}:{}},children:a.jsx(Ki,{content:ee})})]},te),[xe,Ce,n,U,r,$]),K=s.useCallback((I,ee,te)=>{var me,G,Ie;return a.jsxs("div",{style:{padding:`${$(b.top)} ${$(b.right)} ${$(b.bottom)} ${$(b.left)}`,width:$(y+m*2),height:"100%",borderRadius:$(x),border:`${$(m)} solid ${g}`,boxSizing:"border-box",position:"relative",overflow:"hidden"},children:[a.jsx("div",{className:`${r}-cover`,style:{background:v}}),a.jsxs("div",{className:`${r}-elements-overlay`,style:{alignItems:xe,textAlign:Ce},children:[I.text&&h(ce,I.text,"text",te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"text"}:typeof(te==null?void 0:te.textMinHeightPx)=="number"&&te.textMinHeightPx>0?{minHeightPx:te.textMinHeightPx}:void 0),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:xe,width:"100%"},children:[a.jsx("div",{"data-controls":U&&!(te!=null&&te.dataMeasureAttrs)?"logoMarginTop":void 0,className:U&&!(te!=null&&te.dataMeasureAttrs)?`${r}-control`:void 0,style:{height:$(M)}}),a.jsx("div",{style:{width:$(f),height:$(S)},children:((me=I.logo)==null?void 0:me.url)&&a.jsx("img",{src:I.logo.url,alt:((G=I.logo)==null?void 0:G.name)??"",style:{pointerEvents:"auto",width:"100%",height:"100%",objectFit:((Ie=I.logo)==null?void 0:Ie.objectFit)||"contain"}})})]}),I.caption&&h(Y,I.caption,"caption",{...te!=null&&te.dataMeasureAttrs?{}:{controlsName:"captionMarginTop"},marginTop:W,...te!=null&&te.dataMeasureAttrs?{dataMeasureKind:"caption"}:typeof(te==null?void 0:te.captionMinHeightPx)=="number"&&te.captionMinHeightPx>0?{minHeightPx:te.captionMinHeightPx}:{}})]})]},ee)},[v,W,Y,y,x,S,M,f,xe,Ce,b.bottom,b.left,b.right,b.top,h,m,g,ce,n,U,r]),Z=s.useCallback(I=>{le(I.maxTextPx),be(I.maxCaptionPx)},[]);s.useLayoutEffect(()=>{if(!se){Z({maxTextPx:0,maxCaptionPx:0});return}const I=oe.current;if(!I)return;const ee=()=>{R.readTestimonialTextMeasure(I,Z)};ee();const te=new ResizeObserver(ee);return te.observe(I),()=>{te.disconnect()}},[se,Z,t,K]);const ne=se?{textMinHeightPx:_,captionMinHeightPx:Q}:void 0,de=se?a.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((I,ee)=>K(I,`measure-${ee}`,{dataMeasureAttrs:!0}))}):null,z=(I,ee)=>a.jsxs("div",{style:{position:"relative",flex:"0 0 auto",height:"100%",transform:"translateZ(0)",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",willChange:"transform"},children:[K(I,`card-${ee}`,ne),U&&a.jsx("div",{"data-controls":"gap","data-controls-axis":"x",style:{position:"absolute",top:0,right:`calc(-1 * ${$(p)})`,width:$(p),height:"100%",pointerEvents:"auto",zIndex:2}})]},ee);if(H){const I=P?ie&&ae?"paused":"running":"paused";return a.jsxs("div",{ref:L,className:Ct(`${r}-wrapper`,`${r}-marquee-wrapper`),"aria-label":"Testimonials",style:{overflow:"hidden",width:"100%",...N>0?{height:N}:{}},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),de,a.jsx("div",{ref:D,className:`${r}-marquee-track`,"data-direction":d,onMouseEnter:Re,onMouseLeave:ge,style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",width:"max-content",willChange:"transform",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",transform:"translateZ(0)",WebkitTransform:"translateZ(0)",perspective:"1000px",animationDuration:we,WebkitAnimationDuration:we,animationPlayState:I,WebkitAnimationPlayState:I},children:Array.from({length:pe},(ee,te)=>a.jsx("div",{ref:te===0?A:void 0,className:`${r}-marquee-set`,style:{display:"flex",flexDirection:"row",flex:"0 0 auto",gap:$(p),paddingRight:$(p)},"aria-hidden":te>0,children:t==null?void 0:t.map((me,G)=>z(me,`${te}-${G}`))},`set-${te}`))})]})}return a.jsxs("div",{className:`${r}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:k}}),de,a.jsx("div",{style:{gap:$(p),justifyContent:"center",overflowX:"auto",display:"flex",flexDirection:"row"},"aria-label":"Testimonials",children:t==null?void 0:t.map((I,ee)=>z(I,ee))})]})},yy=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
3660
3653
  import cn from 'classnames';
3661
3654
  import { CommonComponentProps } from '../props';
3662
3655
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4411,7 +4404,7 @@ type TestimonialsSettings = {
4411
4404
  width: 100%;
4412
4405
  height: 100%;
4413
4406
  }
4414
- `}const Sy=3e3,wy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=F.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:v,imageWidth:m,imageHeight:g,controlsWidth:x,controlsColor:b,controlsHoverColor:k}=e,f=c>0&&(!n||!!i),[S,W]=s.useState(0),[U,B]=s.useState(null),[P,_]=s.useState(!1),G=s.useRef(null),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),L=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{W(0),B(null),_(!1)},[l.length]);const D=l[S],E=U===null?null:l[U],T=ye=>{var Y,se,pe,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((pe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:pe.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ye}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ye}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ye}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ye}WordSpacing`])??0,color:(e==null?void 0:e[`${ye}Color`])??"#000000"}},C=T("text"),V=T("caption"),w=l.length>1&&l.some(ye=>{var ce,Y;return(((ce=ye.text)==null?void 0:ce.length)??0)>0||(((Y=ye.caption)==null?void 0:Y.length)??0)>0}),q=s.useRef(null),[I,A]=s.useState(0),[j,ie]=s.useState(0),ae=e.controls??{mode:"Off",icon:null},O=l.length>1,oe=s.useCallback((ye,ce)=>!O||ce===ye?ye:(G.current&&window.clearTimeout(G.current),B(ye),_(!0),G.current=window.setTimeout(()=>{B(null),_(!1),G.current=null},300),ce),[O]),N=s.useCallback(()=>{O&&W(ye=>oe(ye,(ye-1+l.length)%l.length))},[O,oe,l.length]),le=s.useCallback(()=>{O&&W(ye=>oe(ye,(ye+1)%l.length))},[O,oe,l.length]);s.useEffect(()=>{if(!f||!O)return;const ye=Math.max(300,Sy/c),ce=window.setInterval(()=>{W(Y=>oe(Y,(Y+1)%l.length))},ye);return()=>{window.clearInterval(ce)}},[f,O,oe,l.length,c]),s.useEffect(()=>()=>{G.current&&window.clearTimeout(G.current)},[]);const Q=(ye,ce)=>{var we,Re,ge,xe;const Y=ce==null?void 0:ce.textMinHeightPx,se=ce==null?void 0:ce.captionMinHeightPx,pe=ce==null?void 0:ce.dataMeasureAttrs,fe=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[ye.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"textMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(y??0,n??!1)}}),a.jsx("div",{...pe&&{"data-testimonial-measure":"text"},style:{...Qt(C,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Ki,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"imageMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:F.scalingValue(m??0,n??!1),height:F.scalingValue(g??0,n??!1)},children:((we=ye.image)==null?void 0:we.url)&&a.jsx("img",{src:(Re=ye.image)==null?void 0:Re.url,alt:((ge=ye.image)==null?void 0:ge.name)??"",className:`${r}-icon`,style:{objectFit:((xe=ye.image)==null?void 0:xe.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"captionMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:F.scalingValue(v??0,n??!1)}}),a.jsx("div",{...pe?{"data-testimonial-measure":"caption"}:{},style:{...Qt(V,n),...se&&se>0?{minHeight:se}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Ki,{content:ye.caption})})]})]})},be=s.useCallback(ye=>{A(ye.maxTextPx),ie(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!w){be({maxTextPx:0,maxCaptionPx:0});return}const ye=q.current;if(!ye)return;const ce=()=>{F.readTestimonialTextMeasure(ye,be)};ce();const Y=new ResizeObserver(ce);return Y.observe(ye),()=>{Y.disconnect()}},[w,be,t]),!D)return a.jsx(a.Fragment,{});const Pe=w?{textMinHeightPx:I,captionMinHeightPx:j}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:by(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:F.scalingValue(u??0,n??!1),alignItems:$},children:[w&&a.jsx("div",{ref:q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ce)=>a.jsx("div",{style:{width:"100%"},children:Q(ye,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[E&&P&&a.jsx("div",{className:Ct(`${r}-fade-item-prev`,`${r}-fade-out`),children:Q(E,{...Pe,hideControls:!0})}),a.jsx("div",{className:Ct(`${r}-fade-item-current`,P?`${r}-fade-in`:void 0),children:Q(D,Pe)})]})]}),ae.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":k},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:N,disabled:!O,"aria-label":"Previous testimonial",children:ae.icon&&a.jsx(mn,{url:ae.icon,fill:b,hoverFill:k,className:Ct(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Ct(`${r}-arrow`,`${r}-next-arrow`),style:{width:F.scalingValue(x??.02,n??!1),height:F.scalingValue(x??.02,n??!1),"--arrow-hover-color":k},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!O,"aria-label":"Next testimonial",children:ae.icon&&a.jsx(mn,{url:ae.icon,fill:b,hoverFill:k,className:`${r}-arrow-img`})})})]})]})})},$y=`import cn from 'classnames';
4407
+ `}const Sy=3e3,wy=({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o})=>{const{prefix:r}=R.useScopedStyles(),l=t||[],{speed:c,align:d,width:u,imageMarginTop:p,textMarginTop:y,captionMarginTop:x,imageWidth:m,imageHeight:g,controlsWidth:v,controlsColor:b,controlsHoverColor:M}=e,f=c>0&&(!n||!!i),[S,W]=s.useState(0),[U,B]=s.useState(null),[P,H]=s.useState(!1),V=s.useRef(null),$=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"flex-end";case"start":default:return"flex-start"}},[d]),L=s.useMemo(()=>{switch(d){case"center":return"center";case"end":return"right";case"start":default:return"left"}},[d]);s.useEffect(()=>{W(0),B(null),H(!1)},[l.length]);const D=l[S],A=U===null?null:l[U],T=ye=>{var Y,se,pe,fe,we;return{fontSettings:{fontFamily:(e==null?void 0:e[`${ye}FontFamily`])??"Arial",fontWeight:((Y=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:Y.fontWeight)??400,fontStyle:((se=e==null?void 0:e[`${ye}FontSettings`])==null?void 0:se.fontStyle)??"normal"},textAppearance:{textTransform:((pe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:pe.textTransform)??"none",textDecoration:((fe=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:fe.textDecoration)??"none",fontVariant:((we=e==null?void 0:e[`${ye}TextAppearance`])==null?void 0:we.fontVariant)??"normal"},fontSize:(e==null?void 0:e[`${ye}FontSize`])??.01,lineHeight:(e==null?void 0:e[`${ye}LineHeight`])??.01,letterSpacing:(e==null?void 0:e[`${ye}LetterSpacing`])??0,wordSpacing:(e==null?void 0:e[`${ye}WordSpacing`])??0,color:(e==null?void 0:e[`${ye}Color`])??"#000000"}},C=T("text"),X=T("caption"),w=l.length>1&&l.some(ye=>{var ce,Y;return(((ce=ye.text)==null?void 0:ce.length)??0)>0||(((Y=ye.caption)==null?void 0:Y.length)??0)>0}),q=s.useRef(null),[k,N]=s.useState(0),[j,ie]=s.useState(0),ae=e.controls??{mode:"Off",icon:null},O=l.length>1,oe=s.useCallback((ye,ce)=>!O||ce===ye?ye:(V.current&&window.clearTimeout(V.current),B(ye),H(!0),V.current=window.setTimeout(()=>{B(null),H(!1),V.current=null},300),ce),[O]),_=s.useCallback(()=>{O&&W(ye=>oe(ye,(ye-1+l.length)%l.length))},[O,oe,l.length]),le=s.useCallback(()=>{O&&W(ye=>oe(ye,(ye+1)%l.length))},[O,oe,l.length]);s.useEffect(()=>{if(!f||!O)return;const ye=Math.max(300,Sy/c),ce=window.setInterval(()=>{W(Y=>oe(Y,(Y+1)%l.length))},ye);return()=>{window.clearInterval(ce)}},[f,O,oe,l.length,c]),s.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]);const Q=(ye,ce)=>{var we,Re,ge,xe;const Y=ce==null?void 0:ce.textMinHeightPx,se=ce==null?void 0:ce.captionMinHeightPx,pe=ce==null?void 0:ce.dataMeasureAttrs,fe=o&&!(ce!=null&&ce.dataMeasureAttrs)&&!(ce!=null&&ce.hideControls);return a.jsxs(a.Fragment,{children:[ye.text&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"textMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:R.scalingValue(y??0,n??!1)}}),a.jsx("div",{...pe&&{"data-testimonial-measure":"text"},style:{...Qt(C,n),...Y&&Y>0?{minHeight:Y}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Ki,{content:ye.text})})]}),a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"imageMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:R.scalingValue(p??0,n??!1)}}),a.jsx("div",{style:{width:R.scalingValue(m??0,n??!1),height:R.scalingValue(g??0,n??!1)},children:((we=ye.image)==null?void 0:we.url)&&a.jsx("img",{src:(Re=ye.image)==null?void 0:Re.url,alt:((ge=ye.image)==null?void 0:ge.name)??"",className:`${r}-icon`,style:{objectFit:((xe=ye.image)==null?void 0:xe.objectFit)||"contain"}})})]}),ye.caption&&a.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:$,width:"100%"},children:[a.jsx("div",{"data-controls":fe?"captionMarginTop":void 0,className:fe?`${r}-control`:void 0,style:{height:R.scalingValue(x??0,n??!1)}}),a.jsx("div",{...pe?{"data-testimonial-measure":"caption"}:{},style:{...Qt(X,n),...se&&se>0?{minHeight:se}:{},textAlign:L,pointerEvents:"auto"},children:a.jsx(Ki,{content:ye.caption})})]})]})},be=s.useCallback(ye=>{N(ye.maxTextPx),ie(ye.maxCaptionPx)},[]);if(s.useLayoutEffect(()=>{if(!w){be({maxTextPx:0,maxCaptionPx:0});return}const ye=q.current;if(!ye)return;const ce=()=>{R.readTestimonialTextMeasure(ye,be)};ce();const Y=new ResizeObserver(ce);return Y.observe(ye),()=>{Y.disconnect()}},[w,be,t]),!D)return a.jsx(a.Fragment,{});const Le=w?{textMinHeightPx:k,captionMinHeightPx:j}:void 0;return a.jsx(a.Fragment,{children:a.jsxs("div",{className:`${r}-container`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:by(r)}}),a.jsxs("div",{className:`${r}-wrapper`,style:{width:R.scalingValue(u??0,n??!1),alignItems:$},children:[w&&a.jsx("div",{ref:q,"aria-hidden":!0,style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",visibility:"hidden",pointerEvents:"none",zIndex:-1},children:l.map((ye,ce)=>a.jsx("div",{style:{width:"100%"},children:Q(ye,{dataMeasureAttrs:!0})},ce))}),a.jsxs("div",{className:`${r}-fade-stack`,children:[A&&P&&a.jsx("div",{className:Ct(`${r}-fade-item-prev`,`${r}-fade-out`),children:Q(A,{...Le,hideControls:!0})}),a.jsx("div",{className:Ct(`${r}-fade-item-current`,P?`${r}-fade-in`:void 0),children:Q(D,Le)})]})]}),ae.mode==="On"&&a.jsxs("div",{className:`${r}-controls`,children:[a.jsx("div",{className:`${r}-arrow`,style:{width:R.scalingValue(v??.02,n??!1),height:R.scalingValue(v??.02,n??!1),"--arrow-hover-color":M},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:_,disabled:!O,"aria-label":"Previous testimonial",children:ae.icon&&a.jsx(mn,{url:ae.icon,fill:b,hoverFill:M,className:Ct(`${r}-arrow-img`,`${r}-mirror`)})})}),a.jsx("div",{className:Ct(`${r}-arrow`,`${r}-next-arrow`),style:{width:R.scalingValue(v??.02,n??!1),height:R.scalingValue(v??.02,n??!1),"--arrow-hover-color":M},children:a.jsx("button",{type:"button",className:`${r}-arrow-inner`,onClick:le,disabled:!O,"aria-label":"Next testimonial",children:ae.icon&&a.jsx(mn,{url:ae.icon,fill:b,hoverFill:M,className:`${r}-arrow-img`})})})]})]})})},$y=`import cn from 'classnames';
4415
4408
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4416
4409
  import { CommonComponentProps } from '../props';
4417
4410
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -4907,7 +4900,7 @@ type TestimonialsSettings = {
4907
4900
  icon?: string | null;
4908
4901
  };
4909
4902
  };
4910
- `,Cy="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>'),vc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ty={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:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...vc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...vc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Cy},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},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},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"}]}]}]}},Ly={element:wy,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},t:{width:700},m:{width:334}},schema:Ty,sourceCode:$y,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Py(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function xc(e){return((e==null?void 0:e.trim().length)??0)>0}function Qa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function es(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:F.scalingValue((o-t)/2,i)}}function Iy(e){return`
4903
+ `,Cy="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>'),vc={fontSettings:{type:"object",scope:"common",display:{type:"font-settings"},properties:{fontWeight:{type:"number",scope:"common"},fontStyle:{type:"string",scope:"common"}}}},Ty={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:"Controls Default",display:{type:"settings-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"settings-color-picker"}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:200,display:{type:"range-control"}},captionFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},captionFontSettings:{...vc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},captionFontSize:{type:"number",scope:"layout",title:"Caption Font Size",display:{type:"font-size"}},captionLineHeight:{type:"number",scope:"layout",title:"Caption Line Height",display:{type:"line-height-input"}},captionLetterSpacing:{type:"number",scope:"layout",title:"Caption Letter Spacing",display:{type:"letter-spacing-input"}},captionWordSpacing:{type:"number",scope:"layout",title:"Caption Word Spacing",display:{type:"word-spacing-input"}},captionTextAppearance:{type:"object",scope:"layout",title:"Caption Text Appearance",display:{type:"text-appearance"}},captionColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Caption Default"},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...vc.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Text Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Text Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Text Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Text Word Spacing",display:{type:"word-spacing-input"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Text Appearance",display:{type:"text-appearance"}},textColor:{display:{type:"style-panel-color-picker"},type:"string",scope:"common",title:"Text Default"}},defaults:{controls:{mode:"On",icon:Cy},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},t:{speed:1,width:.65,imageMarginTop:.026,captionMarginTop:.01,textMarginTop:0,textFontSize:.035,captionFontSize:.023,textLineHeight:.04,captionLineHeight:.029,imageWidth:.05,imageHeight:.05,controlsWidth:.026},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"}]}]}]}},Ly={element:wy,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},t:{width:700},m:{width:334}},schema:Ty,sourceCode:$y,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls.icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"},{path:"captionFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily",captionFontSettings:"captionFontFamily"}};function Py(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function xc(e){return((e==null?void 0:e.trim().length)??0)>0}function Qa(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function es(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-title-leading-gap`]:R.scalingValue((o-t)/2,i)}}function Iy(e){return`
4911
4904
  .${e}-wrapper {
4912
4905
  display: grid;
4913
4906
  align-items: start;
@@ -5254,12 +5247,13 @@ type TestimonialsSettings = {
5254
5247
  z-index: 2;
5255
5248
  width: 100%;
5256
5249
  }
5257
- `}function Ry(){return Math.random()<.5?"ltr":"ttb"}function ky(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Ey(e){const t=Ry();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ky(e)})})}const En=500,My=750,ui="cubic-bezier(0.22, 1, 0.36, 1)",Ay=72,Fy=50;function Ny(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function _y(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Hy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Du(e){return!Array.isArray(e)||e.length===0?[]:Ny(e)?e.flatMap(t=>{const n=_y(t);if(!n)return[];const i=Hy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xi(e){return e.type==="video"}function Wy(e){const t=new Set,n=[];for(const i of e){const o=Du(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function Oy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Xi(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Dy(e){e.pause(),e.removeAttribute("src"),e.load()}function bc({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Sc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function zy(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function By({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Dy(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function jy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",y=s.useRef(null),v=s.useRef(null),m=s.useRef(null),g=s.useRef(null),x=s.useRef(0),b=s.useRef(0),k=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(null),U=s.useRef(0),B=s.useRef(null),P=s.useRef(!1),_=s.useRef(null),G=s.useRef(null),$=s.useRef(null),L=s.useRef(()=>{}),[D,E]=s.useState(null),[T,C]=s.useState(null),[V,w]=s.useState("opening"),[q,I]=s.useState(0),[A,j]=s.useState(0),[ie,ae]=s.useState(null),[O,oe]=s.useState(!1),[N,le]=s.useState(!1),[Q,be]=s.useState(!1),[Pe,ye]=s.useState(null),ce=s.useRef(n),Y=s.useRef(void 0),se=t[n],pe=se?Xi(se):!1,fe=A!==0||O,we=ie!==null,Re=s.useCallback($e=>{const Ne=$e.currentTarget,Ue=Ne instanceof HTMLVideoElement?{width:Ne.videoWidth,height:Ne.videoHeight}:{width:Ne.naturalWidth,height:Ne.naturalHeight};!Ue.width||!Ue.height||ye(Ue)},[]);s.useEffect(()=>{W.current=T},[T]),s.useEffect(()=>{const $e=y.current;if(!$e)return;const Ne=()=>C(Sc($e));Ne();const Ue=new ResizeObserver(Ne);return Ue.observe($e),()=>Ue.disconnect()},[]);const ge=s.useCallback(()=>{_.current!==null&&(window.clearTimeout(_.current),_.current=null)},[]),xe=s.useCallback(()=>{const $e=G.current;G.current=null,ge(),B.current=null,P.current=!1,ae(null),oe(!1),j(0),U.current=0,le(!1),f.current=!1,b.current=0,k.current="none",$e===1?c():$e===-1&&l()},[ge,c,l]),Ce=s.useCallback(()=>{ge(),G.current=null,B.current=null,P.current=!1,ae(null),oe(!1),j(0),U.current=0},[ge]),h=s.useCallback(()=>{ge(),_.current=window.setTimeout(()=>{G.current!==null&&xe()},En+32)},[ge,xe]),K=s.useCallback(($e,Ne)=>{var Je;const Ue=((Je=W.current)==null?void 0:Je.width)??0;if(ge(),B.current=$e,ae($e),P.current=!0,oe(!0),Ne){G.current=$e;const st=-$e*Ue;U.current=st,j(st),h();return}U.current=0,j(0),_.current=window.setTimeout(()=>{_.current=null,Ce()},En+32)},[ge,Ce,h]),Z=s.useCallback($e=>{if(!(t.length<=1)){if(P.current){if(G.current===$e){$.current=$e,xe();return}Ce()}ge(),B.current=$e,ae($e),P.current=!1,oe(!1),U.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{K($e,!0)})})}},[t.length,K,xe,Ce,ge]);L.current=Z;const ne=s.useCallback($e=>{$e.propertyName!=="transform"||!P.current||G.current!==null&&xe()},[xe]),de=s.useCallback(()=>{const $e=v.current;if(!$e)return;const Ne=Sc($e);!Ne.width||!Ne.height||E(Ne)},[]);s.useEffect(()=>{de();const $e=v.current;if(!$e)return;const Ne=new ResizeObserver(()=>de());return Ne.observe($e),()=>Ne.disconnect()},[de]),s.useEffect(()=>{V==="opening"&&D&&w("open")},[V,D]),s.useEffect(()=>{if(V!=="closing")return;const $e=setTimeout(()=>r(),En);return()=>clearTimeout($e)},[V,r]),s.useEffect(()=>()=>{ge()},[ge]),s.useLayoutEffect(()=>{ce.current===n&&Y.current===(se==null?void 0:se.url)||(ge(),G.current=null,ae(null),I(0),j(0),oe(!1),be(!1),le(!1),ye(null),x.current=0,b.current=0,k.current="none",f.current=!1,P.current=!1,U.current=0,B.current=null,g.current=null,S.current=!1,ce.current=n,Y.current=se==null?void 0:se.url)},[n,se==null?void 0:se.url,ge]),s.useLayoutEffect(()=>{const $e=$.current;$e!==null&&($.current=null,requestAnimationFrame(()=>{L.current($e)}))},[n,se==null?void 0:se.url]),s.useEffect(()=>{if(V!=="open")return;let $e=null;const Ne=()=>{$e&&(document.removeEventListener("click",$e,!0),$e=null)},Ue=()=>{Ne(),$e=Ae=>{Ae.stopPropagation(),Ae.preventDefault(),Ne()},document.addEventListener("click",$e,!0)},Je=Ae=>{const gt=Ae<0?1:-1;if(Math.abs(Ae)>Fy&&t.length>1){K(gt,!0);return}K(gt,!1)},st=Ae=>{if(Ae.touches.length!==1||P.current)return;const gt=Ae.touches[0];S.current=!0,g.current={x:gt.clientX,y:gt.clientY},k.current="none",b.current=0,f.current=!1},it=Ae=>{if(!g.current||Ae.touches.length!==1||P.current)return;const gt=Ae.touches[0],ze=gt.clientX-g.current.x,De=gt.clientY-g.current.y;if(k.current==="none"){if(Math.abs(ze)<10&&Math.abs(De)<10)return;if(Math.abs(ze)>Math.abs(De)){if(t.length<=1)return;k.current="horizontal"}else if(De>0)k.current="vertical";else return}if(k.current==="horizontal"){f.current=!0,le(!0),b.current=ze;const Xe=ze<0?1:-1;B.current!==Xe&&(B.current=Xe,ae(Xe)),U.current=ze,j(ze),Ae.preventDefault();return}k.current==="vertical"&&(f.current=!0,le(!0),x.current=De,I(De),Ae.preventDefault())},Oe=()=>{if(!g.current)return;const Ae=k.current,gt=f.current;if(gt&&Ae==="horizontal")Je(b.current),Ue();else if(gt&&Ae==="vertical")if(x.current>Ay){const De=window.innerHeight;x.current=De,be(!0),I(De),w("closing")}else x.current=0,I(0),Ue();else Ae==="horizontal"&&Math.abs(b.current)>0&&(Je(b.current),Ue());g.current=null,k.current="none",b.current=0,f.current=!1,le(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",Oe),document.addEventListener("touchcancel",Oe),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",Oe),document.removeEventListener("touchcancel",Oe),Ne()}},[V,t.length,K]),s.useEffect(()=>{const $e=Ne=>{Ne.key==="Escape"&&(Ne.preventDefault(),Ne.stopPropagation(),V!=="closing"&&w("closing"))};return window.addEventListener("keydown",$e,!0),()=>window.removeEventListener("keydown",$e,!0)},[V]);const z=()=>{V!=="closing"&&w("closing")},R=V==="open",ee=V==="closing",te=q>0?Math.max(0,1-q/500):1,me=q>0?Math.max(.35,1-q/500):1,X=D?p?D:zy(D,Pe):null,Ie=$e=>{if($e.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const Ne=X??$e.currentTarget.getBoundingClientRect(),Ue=$e.clientY-Ne.top,Je=Math.min(52,Ne.height*.2);if(!(Ue>Ne.height-Je)){if($e.clientX-Ne.left<Ne.width/2){Z(-1);return}Z(1)}},Se=$e=>{if(t.length<=1)return;const Ne=X??$e.currentTarget.getBoundingClientRect(),Ue=$e.clientX-Ne.left,Je=$e.clientY-Ne.top,st=Math.min(52,Ne.height*.2);if(Je>Ne.height-st){$e.currentTarget.style.cursor="default";return}$e.currentTarget.style.cursor=Ue<Ne.width/2?"w-resize":"e-resize"},J={position:"fixed",top:T==null?void 0:T.top,left:T==null?void 0:T.left,width:T==null?void 0:T.width,height:T==null?void 0:T.height,zIndex:9998},He=p?"cover":"contain",We=A!==0||q>0?`translate(${A}px, ${q}px)`:void 0,ot=N&&!O?"none":O?`transform ${En}ms ${ui}`:Q?`transform ${En}ms ${ui}, opacity ${En}ms ${ui}`:V==="opening"||ee?`opacity ${En}ms ${ui}`:"none",qe={...J,transform:We,opacity:q>0?me:V==="opening"||ee?0:1,transition:ot,pointerEvents:"none"},tt={position:"absolute",top:((X==null?void 0:X.top)??0)-((T==null?void 0:T.top)??0),left:((X==null?void 0:X.left)??0)-((T==null?void 0:T.left)??0),width:X==null?void 0:X.width,height:X==null?void 0:X.height,objectFit:He,pointerEvents:pe&&R&&!fe?"auto":"none",touchAction:pe&&R?"none":void 0},et=(T==null?void 0:T.width)??0,Ge=we?(n+ie+t.length)%t.length:null,ve=Ge!==null?t[Ge]:null,_e={...J,transform:we?`translateX(${ie*et+A}px)`:void 0,opacity:1,transition:O?`transform ${En}ms ${ui}`:"none",pointerEvents:"none"},Be={position:"absolute",top:((D==null?void 0:D.top)??0)-((T==null?void 0:T.top)??0),left:((D==null?void 0:D.left)??0)-((T==null?void 0:T.left)??0),width:D==null?void 0:D.width,height:D==null?void 0:D.height,objectFit:He,pointerEvents:"none"},Ze=X?{position:"fixed",top:X.top,height:X.height,width:X.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:y,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:V==="open"?"none":void 0},onClick:z,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:R?te:0,transition:N?"none":`opacity ${En}ms ${ui}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:R?1:0,transition:`opacity ${En}ms ${ui}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:R?1:0,transition:`opacity ${En}ms ${ui}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),D&&T&&ve&&a.jsx("div",{style:_e,onTransitionEnd:ne,children:Xi(ve)?a.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:Be},`neighbor-${Ge}-${ve.url}`):a.jsx("img",{src:ve.url,alt:ve.name,style:Be},`neighbor-${Ge}-${ve.url}`)}),D&&T&&se&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:pe?a.jsx(By,{src:se.url,phase:V,mediaRef:m,mediaStyle:tt,onLoadedMetadata:Re,onClick:Ie,onMouseMove:Se},`${n}-${se.url}`):a.jsx("img",{ref:m,src:se.url,alt:se.name,onLoad:Re,style:tt},`${n}-${se.url}`)}),R&&Ze&&t.length>1&&!pe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ze,left:X.left,cursor:"w-resize",pointerEvents:N?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Z(-1)}}),a.jsx("div",{style:{...Ze,left:X.left+X.width/2,cursor:"e-resize",pointerEvents:N?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Z(1)}})]})]})}function Vy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Gy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=F.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:v=100,verticalGap:m,entriesCount:g,lightbox:x,imageDisplay:b,imageCorners:k,lightboxImageDisplay:f,slider:S,sliderTiming:W,direction:U,transition:B,titleMarginTop:P,subtitleMarginTop:_,titleColor:G,subtitleColor:$,lightboxCounterColor:L,titleFontFamily:D,titleFontSettings:E,titleFontSize:T,titleLineHeight:C,titleLetterSpacing:V,titleWordSpacing:w,titleTextAppearance:q,subtitleFontFamily:I,subtitleFontSettings:A,subtitleFontSize:j,subtitleLineHeight:ie,subtitleLetterSpacing:ae,subtitleWordSpacing:O,subtitleTextAppearance:oe,lightboxCounterFontFamily:N,lightboxCounterFontSettings:le,lightboxCounterFontSize:Q,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:Pe,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ce,showText:Y="always",alignEntries:se="off",align:pe="top"}=e,fe={fontSettings:{fontFamily:D,fontWeight:(E==null?void 0:E.fontWeight)??400,fontStyle:(E==null?void 0:E.fontStyle)??"normal"},fontSize:T??.01,lineHeight:C,letterSpacing:V??0,wordSpacing:w??0,textAppearance:q,color:G},Re={...dn(Qt(fe,n))},ge={fontSettings:{fontFamily:I,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ie,letterSpacing:ae??0,wordSpacing:O??0,textAppearance:oe,color:$},Ce={...dn(Qt(ge,n))},h={fontSettings:{fontFamily:N,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:be,letterSpacing:Pe??0,wordSpacing:ye??0,textAppearance:ce,color:L},Z={...dn(Qt(h,n)),...es(Q,be,u,n)},ne=Qa(T,C,`${u}-item-title`,`${u}-text-tight-leading`),de=Qa(j,ie,`${u}-item-subtitle`,`${u}-text-tight-leading`),z=es(T,C,u,n),R=es(j,ie,u,n),ee=Qa(Q,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),te=F.buildColorVars(u,{titleColor:G,subtitleColor:$,lightboxCounterColor:L},Xy,qy),Ie=`${l&&l!=="default"?`${u}-state-${l}`:""}${Y==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Se=g===0?1/0:g,J=(t??[]).slice(0,Se),He=s.useMemo(()=>x==="on"?Wy(J):[],[J,x]),We=y.entryWidth??.2,ot=(b==null?void 0:b.display)==="cover",qe=(b==null?void 0:b.ratioValue)??"1:1",tt=(b==null?void 0:b.reversed)??!1,[et,Ge]=qe.split(":").map(Number),Be=`${tt?Ge:et} / ${tt?et:Ge}`,Ze=y.columnsCount,$e=F.scalingValue(We??0,n),Ne=$e,Ue=!ot&&S!=="off",Je=J.length%Ze||Ze,st=Je<Ze&&J.length>0,it=J.length-Je,Oe=st?Math.floor((Ze-Je)/2)+1:1,Ae=k?F.scalingValue(k,n):void 0,gt={width:Ne,...ot?{aspectRatio:Be,height:"auto",overflow:"hidden"}:{height:"auto"},...Ae?{borderRadius:Ae,overflow:"hidden"}:{}},ze=`${u}-item-image-wrapper${Ue?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",Xe=se==="on",ct=`calc(${F.scalingValue(We??0,n)} * (${v} / 100))`,he=F.scalingValue(We*v/100,n),Ee=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Ae?{borderRadius:Ae}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Ae?{borderRadius:Ae}:{}},[nt,pt]=s.useState(0),Ve=s.useRef(null),vt=B==="fade"||U==="horizontal"?"ltr":U==="vertical"?"ttb":"ltr";s.useEffect(()=>{const xt=Ve.current;if(!xt)return;const yt=new ResizeObserver(Me=>{pt(Math.round(Me[0].contentRect.width))});return yt.observe(xt),()=>yt.disconnect()},[]);const Rt=(()=>{const xt={...te},yt=Ve.current?getComputedStyle(Ve.current).getPropertyValue("--cntrl-article-width").trim():"";return yt&&(xt["--cntrl-article-width"]=yt),xt})(),[At,wt]=s.useState(!1),[Vt,jt]=s.useState([]),[Kt,Yt]=s.useState(0),kt=x==="on"&&(!n||i),Bt=(xt,yt)=>{n&&!i||x!=="off"&&(jt(xt),Yt(yt),wt(!0))};s.useEffect(()=>{if(!At||x!=="on"||typeof document>"u")return;const xt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xt}},[At,x]),s.useEffect(()=>{!n||i||wt(!1)},[n,i]);const rn=s.useMemo(()=>Iy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),x==="on"&&a.jsx(Oy,{mediaList:He}),a.jsx("div",{style:te,children:a.jsx("div",{ref:Ve,className:`${u}-wrapper ${u}-type-${p}${Xe?` ${u}-align-entries`:""} ${u}-image-align-${pe} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${Ze}, ${$e})`,rowGap:Xe?0:F.scalingValue(m??0,n),columnGap:F.scalingValue(y.horizontalGap??0,n),width:F.scalingValue(y.wrapperWidth??0,n),...Xe?{[`--${u}-align-entries-row-gap`]:F.scalingValue(m??0,n)}:{}},children:J.map((xt,yt)=>{var Ft;const Me=xc(xt.title),Qe=xc(xt.subtitle),rt=(((Ft=xt.link)==null?void 0:Ft.length)??0)>0&&x==="off"?xt.link:void 0,dt=Math.floor(yt/Ze)===Math.ceil(J.length/Ze)-1,Pt=st&&yt>=it?`${Oe+(yt-it)}`:void 0,St=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[Me&&a.jsx("p",{className:ne,style:{width:ct,...Re,...z},children:xt.title}),Me&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(P??0,n),width:he}}),Qe&&a.jsx("p",{className:de,style:{width:ct,...Ce,...R},children:xt.subtitle}),Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(_??0,n),width:he}})]}):null,ht=Xe?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?F.scalingValue(P??0,n):0,width:he}}),Me&&a.jsx("p",{className:ne,style:{width:ct,...Re,...z},children:xt.title}),De&&Me&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(P??0,n),width:he}})]}):null,Wt=Xe?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?F.scalingValue(_??0,n):0,width:he}}),Qe&&a.jsx("p",{className:de,style:{width:ct,...Ce,...R},children:xt.subtitle}),De&&Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:F.scalingValue(_??0,n),width:he}})]}):null,Tt=rt?a.jsxs("a",{href:rt,target:"_blank",className:`${u}-item-text-link`,children:[ht,Wt]}):a.jsxs(a.Fragment,{children:[ht,Wt]}),Ot=Du(xt.gallery),Gt=Ot.filter(ut=>ut.lightboxMedia).map(ut=>ut.lightboxMedia),Mt=a.jsx("div",{className:ze,style:gt,children:Ot.length===0?null:S==="off"?(()=>{const{displayMedia:ut,lightboxMedia:H}=Ot[0],Le=H?Gt.findIndex(je=>je.url===H.url):-1;return a.jsx(bc,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Ee,onMediaClick:kt&&Le>=0?()=>Bt(Gt,Le):void 0})})():a.jsxs(a.Fragment,{children:[Ue&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ot.map(({displayMedia:ut})=>Xi(ut)?a.jsx("video",{src:ut.url,muted:!0,playsInline:!0},`sizer-${ut.url}`):a.jsx("img",{src:ut.url,alt:""},`sizer-${ut.url}`))}),a.jsx(Ll,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:W*1e3,width:"100%",height:"100%",speed:My,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:vt},onMoved:ut=>{U!=="random"||B==="fade"||Ey(ut)},children:Ot.map(({displayMedia:ut,lightboxMedia:H},Le)=>{const je=H?Gt.findIndex(Fe=>Fe.url===H.url):-1;return a.jsx(Pl,{children:a.jsx(bc,{media:ut,className:`${u}-item-${Xi(ut)?"video":"image"}`.trim(),style:Ee,onMediaClick:kt&&je>=0?()=>Bt(Gt,je):void 0})},Le)})},`${B}-${We}-${U}-${W}-${nt}-${c}`)]})}),_t=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Me?"titleMarginTop":void 0,className:o&&Me?`${u}-control`:void 0,style:{height:Me?F.scalingValue(P??0,n):0,width:he}}),a.jsx("p",{className:ne,style:{width:ct,...Re,...z},children:xt.title}),a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?F.scalingValue(_??0,n):0,width:he}}),a.jsx("p",{className:de,style:{width:ct,...Ce,...R},children:xt.subtitle})]});return a.jsx("div",{className:`${u}-item`.trim(),style:Pt&&!Xe?{gridColumn:Pt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Xe&&dt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(v??0)>100?`calc(${$e} * (${v} / 100))`:$e,...Pt&&Xe?{gridColumn:Pt}:{}},children:Xe?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[Tt,a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:Mt})]}):a.jsxs(a.Fragment,{children:[a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:Mt}),Tt]})}):rt?a.jsxs(a.Fragment,{children:[a.jsxs("a",{href:rt,target:"_blank",className:`${u}-item-image-link`,children:[St,Mt]}),!De&&a.jsx("a",{href:rt,target:"_blank",className:`${u}-item-text-link`,children:_t})]}):a.jsxs(a.Fragment,{children:[St,Mt,_t]})})},yt)})})}),(!n||i)&&At&&typeof document<"u"&&x==="on"&&(()=>{const xt=(d?document.getElementById(d):null)??document.body;return Gn.createPortal(a.jsx("div",{style:Rt,"data-selection":"none",children:a.jsx(jy,{prefix:u,items:Vt,index:Kt,imageDisplay:Vy(f),isEditor:n,onClose:()=>wt(!1),onPrev:()=>Yt(yt=>(yt-1+Vt.length)%Vt.length),onNext:()=>Yt(yt=>(yt+1)%Vt.length),counterClassName:ee,counterStyle:Z})}),xt)})()]})}const Xy={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},qy=["hover","focus","filled","success","error"],Uy=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5250
+ `}function Ry(){return Math.random()<.5?"ltr":"ttb"}function ky(e){const t=e.Components.Autoplay;t&&(t.pause(!1),t.play())}function Ey(e){const t=Ry();e.options.direction!==t&&(e.options={...e.options,direction:t}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{ky(e)})})}const En=500,My=750,ui="cubic-bezier(0.22, 1, 0.36, 1)",Ay=72,Fy=50;function Ny(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function _y(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function Hy(e){const[t]=e.media;return t!=null&&t.url?t:null}function Du(e){return!Array.isArray(e)||e.length===0?[]:Ny(e)?e.flatMap(t=>{const n=_y(t);if(!n)return[];const i=Hy(t);return[{displayMedia:n,lightboxMedia:i!=null&&i.url?i:null}]}):e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xi(e){return e.type==="video"}function Wy(e){const t=new Set,n=[];for(const i of e){const o=Du(i.gallery);for(const r of o){const l=r.lightboxMedia;l!=null&&l.url&&!t.has(l.url)&&(t.add(l.url),n.push(l))}}return n}function Oy({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Xi(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Dy(e){e.pause(),e.removeAttribute("src"),e.load()}function bc({media:e,className:t,style:n,onMediaClick:i}){return Xi(e)?a.jsx("video",{src:e.url,className:t,style:{...n,cursor:i?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,onClick:i}):a.jsx("img",{src:e.url,alt:e.name,className:t,style:{...n,cursor:i?"pointer":"default"},onClick:i})}function Sc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function zy(e,t){if(!t||!t.width||!t.height||!e.width||!e.height)return e;const n=t.width/t.height,i=e.width/e.height;if(n>i){const r=e.width/n;return{width:e.width,height:r,left:e.left,top:e.top+(e.height-r)/2}}const o=e.height*n;return{width:o,height:e.height,left:e.left+(e.width-o)/2,top:e.top}}function By({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l}){return s.useEffect(()=>{const c=n.current;if(c)return()=>{Dy(c)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,style:i})}function jy({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u}){const p=i==="cover",y=s.useRef(null),x=s.useRef(null),m=s.useRef(null),g=s.useRef(null),v=s.useRef(0),b=s.useRef(0),M=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(null),U=s.useRef(0),B=s.useRef(null),P=s.useRef(!1),H=s.useRef(null),V=s.useRef(null),$=s.useRef(null),L=s.useRef(()=>{}),[D,A]=s.useState(null),[T,C]=s.useState(null),[X,w]=s.useState("opening"),[q,k]=s.useState(0),[N,j]=s.useState(0),[ie,ae]=s.useState(null),[O,oe]=s.useState(!1),[_,le]=s.useState(!1),[Q,be]=s.useState(!1),[Le,ye]=s.useState(null),ce=s.useRef(n),Y=s.useRef(void 0),se=t[n],pe=se?Xi(se):!1,fe=N!==0||O,we=ie!==null,Re=s.useCallback($e=>{const Ne=$e.currentTarget,Ue=Ne instanceof HTMLVideoElement?{width:Ne.videoWidth,height:Ne.videoHeight}:{width:Ne.naturalWidth,height:Ne.naturalHeight};!Ue.width||!Ue.height||ye(Ue)},[]);s.useEffect(()=>{W.current=T},[T]),s.useEffect(()=>{const $e=y.current;if(!$e)return;const Ne=()=>C(Sc($e));Ne();const Ue=new ResizeObserver(Ne);return Ue.observe($e),()=>Ue.disconnect()},[]);const ge=s.useCallback(()=>{H.current!==null&&(window.clearTimeout(H.current),H.current=null)},[]),xe=s.useCallback(()=>{const $e=V.current;V.current=null,ge(),B.current=null,P.current=!1,ae(null),oe(!1),j(0),U.current=0,le(!1),f.current=!1,b.current=0,M.current="none",$e===1?c():$e===-1&&l()},[ge,c,l]),Ce=s.useCallback(()=>{ge(),V.current=null,B.current=null,P.current=!1,ae(null),oe(!1),j(0),U.current=0},[ge]),h=s.useCallback(()=>{ge(),H.current=window.setTimeout(()=>{V.current!==null&&xe()},En+32)},[ge,xe]),K=s.useCallback(($e,Ne)=>{var Je;const Ue=((Je=W.current)==null?void 0:Je.width)??0;if(ge(),B.current=$e,ae($e),P.current=!0,oe(!0),Ne){V.current=$e;const st=-$e*Ue;U.current=st,j(st),h();return}U.current=0,j(0),H.current=window.setTimeout(()=>{H.current=null,Ce()},En+32)},[ge,Ce,h]),Z=s.useCallback($e=>{if(!(t.length<=1)){if(P.current){if(V.current===$e){$.current=$e,xe();return}Ce()}ge(),B.current=$e,ae($e),P.current=!1,oe(!1),U.current=0,j(0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{K($e,!0)})})}},[t.length,K,xe,Ce,ge]);L.current=Z;const ne=s.useCallback($e=>{$e.propertyName!=="transform"||!P.current||V.current!==null&&xe()},[xe]),de=s.useCallback(()=>{const $e=x.current;if(!$e)return;const Ne=Sc($e);!Ne.width||!Ne.height||A(Ne)},[]);s.useEffect(()=>{de();const $e=x.current;if(!$e)return;const Ne=new ResizeObserver(()=>de());return Ne.observe($e),()=>Ne.disconnect()},[de]),s.useEffect(()=>{X==="opening"&&D&&w("open")},[X,D]),s.useEffect(()=>{if(X!=="closing")return;const $e=setTimeout(()=>r(),En);return()=>clearTimeout($e)},[X,r]),s.useEffect(()=>()=>{ge()},[ge]),s.useLayoutEffect(()=>{ce.current===n&&Y.current===(se==null?void 0:se.url)||(ge(),V.current=null,ae(null),k(0),j(0),oe(!1),be(!1),le(!1),ye(null),v.current=0,b.current=0,M.current="none",f.current=!1,P.current=!1,U.current=0,B.current=null,g.current=null,S.current=!1,ce.current=n,Y.current=se==null?void 0:se.url)},[n,se==null?void 0:se.url,ge]),s.useLayoutEffect(()=>{const $e=$.current;$e!==null&&($.current=null,requestAnimationFrame(()=>{L.current($e)}))},[n,se==null?void 0:se.url]),s.useEffect(()=>{if(X!=="open")return;let $e=null;const Ne=()=>{$e&&(document.removeEventListener("click",$e,!0),$e=null)},Ue=()=>{Ne(),$e=Fe=>{Fe.stopPropagation(),Fe.preventDefault(),Ne()},document.addEventListener("click",$e,!0)},Je=Fe=>{const ut=Fe<0?1:-1;if(Math.abs(Fe)>Fy&&t.length>1){K(ut,!0);return}K(ut,!1)},st=Fe=>{if(Fe.touches.length!==1||P.current)return;const ut=Fe.touches[0];S.current=!0,g.current={x:ut.clientX,y:ut.clientY},M.current="none",b.current=0,f.current=!1},it=Fe=>{if(!g.current||Fe.touches.length!==1||P.current)return;const ut=Fe.touches[0],ze=ut.clientX-g.current.x,De=ut.clientY-g.current.y;if(M.current==="none"){if(Math.abs(ze)<10&&Math.abs(De)<10)return;if(Math.abs(ze)>Math.abs(De)){if(t.length<=1)return;M.current="horizontal"}else if(De>0)M.current="vertical";else return}if(M.current==="horizontal"){f.current=!0,le(!0),b.current=ze;const Xe=ze<0?1:-1;B.current!==Xe&&(B.current=Xe,ae(Xe)),U.current=ze,j(ze),Fe.preventDefault();return}M.current==="vertical"&&(f.current=!0,le(!0),v.current=De,k(De),Fe.preventDefault())},Oe=()=>{if(!g.current)return;const Fe=M.current,ut=f.current;if(ut&&Fe==="horizontal")Je(b.current),Ue();else if(ut&&Fe==="vertical")if(v.current>Ay){const De=window.innerHeight;v.current=De,be(!0),k(De),w("closing")}else v.current=0,k(0),Ue();else Fe==="horizontal"&&Math.abs(b.current)>0&&(Je(b.current),Ue());g.current=null,M.current="none",b.current=0,f.current=!1,le(!1)};return document.addEventListener("touchstart",st,{passive:!0}),document.addEventListener("touchmove",it,{passive:!1}),document.addEventListener("touchend",Oe),document.addEventListener("touchcancel",Oe),()=>{document.removeEventListener("touchstart",st),document.removeEventListener("touchmove",it),document.removeEventListener("touchend",Oe),document.removeEventListener("touchcancel",Oe),Ne()}},[X,t.length,K]),s.useEffect(()=>{const $e=Ne=>{Ne.key==="Escape"&&(Ne.preventDefault(),Ne.stopPropagation(),X!=="closing"&&w("closing"))};return window.addEventListener("keydown",$e,!0),()=>window.removeEventListener("keydown",$e,!0)},[X]);const z=()=>{X!=="closing"&&w("closing")},I=X==="open",ee=X==="closing",te=q>0?Math.max(0,1-q/500):1,me=q>0?Math.max(.35,1-q/500):1,G=D?p?D:zy(D,Le):null,Ie=$e=>{if($e.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const Ne=G??$e.currentTarget.getBoundingClientRect(),Ue=$e.clientY-Ne.top,Je=Math.min(52,Ne.height*.2);if(!(Ue>Ne.height-Je)){if($e.clientX-Ne.left<Ne.width/2){Z(-1);return}Z(1)}},Se=$e=>{if(t.length<=1)return;const Ne=G??$e.currentTarget.getBoundingClientRect(),Ue=$e.clientX-Ne.left,Je=$e.clientY-Ne.top,st=Math.min(52,Ne.height*.2);if(Je>Ne.height-st){$e.currentTarget.style.cursor="default";return}$e.currentTarget.style.cursor=Ue<Ne.width/2?"w-resize":"e-resize"},J={position:"fixed",top:T==null?void 0:T.top,left:T==null?void 0:T.left,width:T==null?void 0:T.width,height:T==null?void 0:T.height,zIndex:9998},He=p?"cover":"contain",We=N!==0||q>0?`translate(${N}px, ${q}px)`:void 0,ot=_&&!O?"none":O?`transform ${En}ms ${ui}`:Q?`transform ${En}ms ${ui}, opacity ${En}ms ${ui}`:X==="opening"||ee?`opacity ${En}ms ${ui}`:"none",qe={...J,transform:We,opacity:q>0?me:X==="opening"||ee?0:1,transition:ot,pointerEvents:"none"},tt={position:"absolute",top:((G==null?void 0:G.top)??0)-((T==null?void 0:T.top)??0),left:((G==null?void 0:G.left)??0)-((T==null?void 0:T.left)??0),width:G==null?void 0:G.width,height:G==null?void 0:G.height,objectFit:He,pointerEvents:pe&&I&&!fe?"auto":"none",touchAction:pe&&I?"none":void 0},et=(T==null?void 0:T.width)??0,Ge=we?(n+ie+t.length)%t.length:null,ve=Ge!==null?t[Ge]:null,_e={...J,transform:we?`translateX(${ie*et+N}px)`:void 0,opacity:1,transition:O?`transform ${En}ms ${ui}`:"none",pointerEvents:"none"},je={position:"absolute",top:((D==null?void 0:D.top)??0)-((T==null?void 0:T.top)??0),left:((D==null?void 0:D.left)??0)-((T==null?void 0:T.left)??0),width:D==null?void 0:D.width,height:D==null?void 0:D.height,objectFit:He,pointerEvents:"none"},Ze=G?{position:"fixed",top:G.top,height:G.height,width:G.width/2,zIndex:9999}:null;return a.jsxs("div",{ref:y,className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:X==="open"?"none":void 0},onClick:z,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:"rgba(28,31,34,0.9)",opacity:I?te:0,transition:_?"none":`opacity ${En}ms ${ui}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:p?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${En}ms ${ui}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:I?1:0,transition:`opacity ${En}ms ${ui}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),D&&T&&ve&&a.jsx("div",{style:_e,onTransitionEnd:ne,children:Xi(ve)?a.jsx("video",{src:ve.url,muted:!0,playsInline:!0,preload:"auto",style:je},`neighbor-${Ge}-${ve.url}`):a.jsx("img",{src:ve.url,alt:ve.name,style:je},`neighbor-${Ge}-${ve.url}`)}),D&&T&&se&&a.jsx("div",{style:qe,onTransitionEnd:ne,children:pe?a.jsx(By,{src:se.url,phase:X,mediaRef:m,mediaStyle:tt,onLoadedMetadata:Re,onClick:Ie,onMouseMove:Se},`${n}-${se.url}`):a.jsx("img",{ref:m,src:se.url,alt:se.name,onLoad:Re,style:tt},`${n}-${se.url}`)}),I&&Ze&&t.length>1&&!pe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Ze,left:G.left,cursor:"w-resize",pointerEvents:_?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Z(-1)}}),a.jsx("div",{style:{...Ze,left:G.left+G.width/2,cursor:"e-resize",pointerEvents:_?"none":"auto"},onClick:$e=>{if(S.current){S.current=!1;return}$e.stopPropagation(),Z(1)}})]})]})}function Vy(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function Gy({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,metadata:r,activeEvent:l,layoutId:c,portalId:d}){const{prefix:u}=R.useScopedStyles(),{type:p="a",gridLayout:y,textBoxWidth:x=100,verticalGap:m,entriesCount:g,lightbox:v,imageDisplay:b,imageCorners:M,lightboxImageDisplay:f,slider:S,sliderTiming:W,direction:U,transition:B,titleMarginTop:P,subtitleMarginTop:H,titleColor:V,subtitleColor:$,lightboxCounterColor:L,titleFontFamily:D,titleFontSettings:A,titleFontSize:T,titleLineHeight:C,titleLetterSpacing:X,titleWordSpacing:w,titleTextAppearance:q,subtitleFontFamily:k,subtitleFontSettings:N,subtitleFontSize:j,subtitleLineHeight:ie,subtitleLetterSpacing:ae,subtitleWordSpacing:O,subtitleTextAppearance:oe,lightboxCounterFontFamily:_,lightboxCounterFontSettings:le,lightboxCounterFontSize:Q,lightboxCounterLineHeight:be,lightboxCounterLetterSpacing:Le,lightboxCounterWordSpacing:ye,lightboxCounterTextAppearance:ce,showText:Y="always",alignEntries:se="off",align:pe="top"}=e,fe={fontSettings:{fontFamily:D,fontWeight:(A==null?void 0:A.fontWeight)??400,fontStyle:(A==null?void 0:A.fontStyle)??"normal"},fontSize:T??.01,lineHeight:C,letterSpacing:X??0,wordSpacing:w??0,textAppearance:q,color:V},Re={...dn(Qt(fe,n))},ge={fontSettings:{fontFamily:k,fontWeight:(N==null?void 0:N.fontWeight)??400,fontStyle:(N==null?void 0:N.fontStyle)??"normal"},fontSize:j??.01,lineHeight:ie,letterSpacing:ae??0,wordSpacing:O??0,textAppearance:oe,color:$},Ce={...dn(Qt(ge,n))},h={fontSettings:{fontFamily:_,fontWeight:(le==null?void 0:le.fontWeight)??400,fontStyle:(le==null?void 0:le.fontStyle)??"normal"},fontSize:Q??.01,lineHeight:be,letterSpacing:Le??0,wordSpacing:ye??0,textAppearance:ce,color:L},Z={...dn(Qt(h,n)),...es(Q,be,u,n)},ne=Qa(T,C,`${u}-item-title`,`${u}-text-tight-leading`),de=Qa(j,ie,`${u}-item-subtitle`,`${u}-text-tight-leading`),z=es(T,C,u,n),I=es(j,ie,u,n),ee=Qa(Q,be,`${u}-lightbox-counter`,`${u}-text-tight-leading`),te=R.buildColorVars(u,{titleColor:V,subtitleColor:$,lightboxCounterColor:L},Xy,qy),Ie=`${l&&l!=="default"?`${u}-state-${l}`:""}${Y==="on hover"&&(!n||i)?` ${u}-show-text-hover`:""}`.trim(),Se=g===0?1/0:g,J=(t??[]).slice(0,Se),He=s.useMemo(()=>v==="on"?Wy(J):[],[J,v]),We=y.entryWidth??.2,ot=(b==null?void 0:b.display)==="cover",qe=(b==null?void 0:b.ratioValue)??"1:1",tt=(b==null?void 0:b.reversed)??!1,[et,Ge]=qe.split(":").map(Number),je=`${tt?Ge:et} / ${tt?et:Ge}`,Ze=y.columnsCount,$e=R.scalingValue(We??0,n),Ne=$e,Ue=!ot&&S!=="off",Je=J.length%Ze||Ze,st=Je<Ze&&J.length>0,it=J.length-Je,Oe=st?Math.floor((Ze-Je)/2)+1:1,Fe=M?R.scalingValue(M,n):void 0,ut={width:Ne,...ot?{aspectRatio:je,height:"auto",overflow:"hidden"}:{height:"auto"},...Fe?{borderRadius:Fe,overflow:"hidden"}:{}},ze=`${u}-item-image-wrapper${Ue?` ${u}-item-image-wrapper-fit-slider`:""}`.trim(),De=p==="d"||p==="e"||p==="f",Xe=se==="on",pt=`calc(${R.scalingValue(We??0,n)} * (${x} / 100))`,he=R.scalingValue(We*x/100,n),Me=ot?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%",...Fe?{borderRadius:Fe}:{}}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%",...Fe?{borderRadius:Fe}:{}},[nt,gt]=s.useState(0),Ve=s.useRef(null),yt=B==="fade"||U==="horizontal"?"ltr":U==="vertical"?"ttb":"ltr";s.useEffect(()=>{const vt=Ve.current;if(!vt)return;const ft=new ResizeObserver(Ae=>{gt(Math.round(Ae[0].contentRect.width))});return ft.observe(vt),()=>ft.disconnect()},[]);const It=(()=>{const vt={...te},ft=Ve.current?getComputedStyle(Ve.current).getPropertyValue("--cntrl-article-width").trim():"";return ft&&(vt["--cntrl-article-width"]=ft),vt})(),[At,St]=s.useState(!1),[Vt,jt]=s.useState([]),[Ut,Kt]=s.useState(0),Rt=v==="on"&&(!n||i),zt=(vt,ft)=>{n&&!i||v!=="off"&&(jt(vt),Kt(ft),St(!0))};s.useEffect(()=>{if(!At||v!=="on"||typeof document>"u")return;const vt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=vt}},[At,v]),s.useEffect(()=>{!n||i||St(!1)},[n,i]);const rn=s.useMemo(()=>Iy(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:rn}}),v==="on"&&a.jsx(Oy,{mediaList:He}),a.jsx("div",{style:te,children:a.jsx("div",{ref:Ve,className:`${u}-wrapper ${u}-type-${p}${Xe?` ${u}-align-entries`:""} ${u}-image-align-${pe} ${Ie}`.trim(),style:{gridTemplateColumns:`repeat(${Ze}, ${$e})`,rowGap:Xe?0:R.scalingValue(m??0,n),columnGap:R.scalingValue(y.horizontalGap??0,n),width:R.scalingValue(y.wrapperWidth??0,n),...Xe?{[`--${u}-align-entries-row-gap`]:R.scalingValue(m??0,n)}:{}},children:J.map((vt,ft)=>{var $t;const Ae=xc(vt.title),Qe=xc(vt.subtitle),at=v==="off"&&(($t=vt.link)!=null&&$t.value)?vt.link:void 0,mt=Math.floor(ft/Ze)===Math.ceil(J.length/Ze)-1,Lt=st&&ft>=it?`${Oe+(ft-it)}`:void 0,bt=De?a.jsxs("div",{className:`${u}-item-text-block`,children:[Ae&&a.jsx("p",{className:ne,style:{width:pt,...Re,...z},children:vt.title}),Ae&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:R.scalingValue(P??0,n),width:he}}),Qe&&a.jsx("p",{className:de,style:{width:pt,...Ce,...I},children:vt.subtitle}),Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:R.scalingValue(H??0,n),width:he}})]}):null,kt=Xe?a.jsxs("div",{className:`${u}-item-title-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Ae?"titleMarginTop":void 0,className:o&&Ae?`${u}-control`:void 0,style:{height:Ae?R.scalingValue(P??0,n):0,width:he}}),Ae&&a.jsx("p",{className:ne,style:{width:pt,...Re,...z},children:vt.title}),De&&Ae&&a.jsx("div",{"data-controls":o?"titleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:R.scalingValue(P??0,n),width:he}})]}):null,Bt=Xe?a.jsxs("div",{className:`${u}-item-subtitle-row`,children:[!De&&a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?R.scalingValue(H??0,n):0,width:he}}),Qe&&a.jsx("p",{className:de,style:{width:pt,...Ce,...I},children:vt.subtitle}),De&&Qe&&a.jsx("div",{"data-controls":o?"subtitleMarginTop":void 0,className:o?`${u}-control`:void 0,style:{height:R.scalingValue(H??0,n),width:he}})]}):null,lt=a.jsxs(R.LinkWrapper,{link:at,className:`${u}-item-text-link`,children:[kt,Bt]}),Ht=Du(vt.gallery),Yt=Ht.filter(E=>E.lightboxMedia).map(E=>E.lightboxMedia),Mt=a.jsx("div",{className:ze,style:ut,children:Ht.length===0?null:S==="off"?(()=>{const{displayMedia:E,lightboxMedia:Pe}=Ht[0],Be=Pe?Yt.findIndex(Ee=>Ee.url===Pe.url):-1;return a.jsx(bc,{media:E,className:`${u}-item-${Xi(E)?"video":"image"}`.trim(),style:Me,onMediaClick:Rt&&Be>=0?()=>zt(Yt,Be):void 0})})():a.jsxs(a.Fragment,{children:[Ue&&a.jsx("div",{className:`${u}-item-image-wrapper-sizer`,"aria-hidden":"true",children:Ht.map(({displayMedia:E})=>Xi(E)?a.jsx("video",{src:E.url,muted:!0,playsInline:!0},`sizer-${E.url}`):a.jsx("img",{src:E.url,alt:""},`sizer-${E.url}`))}),a.jsx(Ll,{className:`${u}-item-slider`,options:{arrows:!1,pagination:!1,drag:!1,perPage:1,autoplay:!0,interval:W*1e3,width:"100%",height:"100%",speed:My,type:B==="fade"?"fade":"loop",rewind:B==="fade",pauseOnHover:!1,pauseOnFocus:!1,direction:yt},onMoved:E=>{U!=="random"||B==="fade"||Ey(E)},children:Ht.map(({displayMedia:E,lightboxMedia:Pe},Be)=>{const Ee=Pe?Yt.findIndex(ct=>ct.url===Pe.url):-1;return a.jsx(Pl,{children:a.jsx(bc,{media:E,className:`${u}-item-${Xi(E)?"video":"image"}`.trim(),style:Me,onMediaClick:Rt&&Ee>=0?()=>zt(Yt,Ee):void 0})},Be)})},`${B}-${We}-${U}-${W}-${nt}-${c}`)]})}),Nt=De?null:a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":o&&Ae?"titleMarginTop":void 0,className:o&&Ae?`${u}-control`:void 0,style:{height:Ae?R.scalingValue(P??0,n):0,width:he}}),a.jsx("p",{className:ne,style:{width:pt,...Re,...z},children:vt.title}),a.jsx("div",{"data-controls":o&&Qe?"subtitleMarginTop":void 0,className:o&&Qe?`${u}-control`:void 0,style:{height:Qe?R.scalingValue(H??0,n):0,width:he}}),a.jsx("p",{className:de,style:{width:pt,...Ce,...I},children:vt.subtitle})]}),Ft=at?a.jsx(R.LinkWrapper,{link:at,className:`${u}-item-image-link`,children:Mt}):a.jsx("a",{className:`${u}-item-image-link`,children:Mt});return a.jsx("div",{className:`${u}-item`.trim(),style:Lt&&!Xe?{gridColumn:Lt}:void 0,children:a.jsx("div",{className:`${o?`${u}-item-inner`:`${u}-item-inner-hidden`}${Xe&&mt?` ${u}-item-inner-last-row`:""}`.trim(),style:{width:(x??0)>100?`calc(${$e} * (${x} / 100))`:$e,...Lt&&Xe?{gridColumn:Lt}:{}},children:Xe?a.jsx(a.Fragment,{children:De?a.jsxs(a.Fragment,{children:[lt,Ft]}):a.jsxs(a.Fragment,{children:[Ft,lt]})}):at?a.jsxs(a.Fragment,{children:[a.jsxs(R.LinkWrapper,{link:at,className:`${u}-item-image-link`,children:[bt,Mt]}),!De&&a.jsx(R.LinkWrapper,{link:at,className:`${u}-item-text-link`,children:Nt})]}):a.jsxs(a.Fragment,{children:[bt,Mt,Nt]})})},ft)})})}),(!n||i)&&At&&typeof document<"u"&&v==="on"&&(()=>{const vt=(d?document.getElementById(d):null)??document.body;return Gn.createPortal(a.jsx("div",{style:It,"data-selection":"none",children:a.jsx(jy,{prefix:u,items:Vt,index:Ut,imageDisplay:Vy(f),isEditor:n,onClose:()=>St(!1),onPrev:()=>Kt(ft=>(ft-1+Vt.length)%Vt.length),onNext:()=>Kt(ft=>(ft+1)%Vt.length),counterClassName:ee,counterStyle:Z})}),vt)})()]})}const Xy={titleColor:"title-color",subtitleColor:"subtitle-color",lightboxCounterColor:"lightbox-counter-color"},qy=["hover","focus","filled","success","error"],Uy=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5258
5251
  import '@splidejs/react-splide/css/core';
5259
5252
  import { CommonComponentProps } from '../props';
5260
5253
  import {
5261
5254
  buildColorVars,
5262
5255
  getFormFieldValidationError,
5256
+ LinkWrapper,
5263
5257
  scalingValue,
5264
5258
  useScopedStyles,
5265
5259
  } from '../utils/index';
@@ -6920,7 +6914,7 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
6920
6914
  {cropContent.map((item: any, index: number) => {
6921
6915
  const hasTitle = hasText(item.title);
6922
6916
  const hasSubtitle = hasText(item.subtitle);
6923
- const itemLink = (item.link?.length ?? 0) > 0 && lightbox === 'off' ? item.link : undefined;
6917
+ const itemLink = lightbox === 'off' && item.link?.value ? item.link : undefined;
6924
6918
  const isLastRow = Math.floor(index / columnsCount)
6925
6919
  === Math.ceil(cropContent.length / columnsCount) - 1;
6926
6920
  const gridColumn = isPartialLastRow && index >= lastRowStartIndex
@@ -7022,16 +7016,11 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
7022
7016
  </div>
7023
7017
  ) : null;
7024
7018
 
7025
- const alignedTextRows = itemLink ? (
7026
- <a href={itemLink} target="_blank" className={\`\${P}-item-text-link\`}>
7019
+ const alignedTextRows = (
7020
+ <LinkWrapper link={itemLink} className={\`\${P}-item-text-link\`}>
7027
7021
  {titleRow}
7028
7022
  {subtitleRow}
7029
- </a>
7030
- ) : (
7031
- <>
7032
- {titleRow}
7033
- {subtitleRow}
7034
- </>
7023
+ </LinkWrapper>
7035
7024
  );
7036
7025
 
7037
7026
  const displayItems = getGridDisplayItems(item.gallery);
@@ -7154,6 +7143,15 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
7154
7143
  </>
7155
7144
  ) : null;
7156
7145
 
7146
+ // the aligned layout sizes this box whether or not it links anywhere
7147
+ const alignedImage = itemLink ? (
7148
+ <LinkWrapper link={itemLink} className={\`\${P}-item-image-link\`}>
7149
+ {imageContent}
7150
+ </LinkWrapper>
7151
+ ) : (
7152
+ <a className={\`\${P}-item-image-link\`}>{imageContent}</a>
7153
+ );
7154
+
7157
7155
  return (
7158
7156
  <div
7159
7157
  key={index}
@@ -7176,29 +7174,25 @@ export function Grid({ settings, content, isEditor, isPreviewMode, isEditMode, m
7176
7174
  {isTextBeforeImage ? (
7177
7175
  <>
7178
7176
  {alignedTextRows}
7179
- <a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
7180
- {imageContent}
7181
- </a>
7177
+ {alignedImage}
7182
7178
  </>
7183
7179
  ) : (
7184
7180
  <>
7185
- <a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
7186
- {imageContent}
7187
- </a>
7181
+ {alignedImage}
7188
7182
  {alignedTextRows}
7189
7183
  </>
7190
7184
  )}
7191
7185
  </>
7192
7186
  ) : itemLink ? (
7193
7187
  <>
7194
- <a href={itemLink} target="_blank" className={\`\${P}-item-image-link\`}>
7188
+ <LinkWrapper link={itemLink} className={\`\${P}-item-image-link\`}>
7195
7189
  {typeCTextBlock}
7196
7190
  {imageContent}
7197
- </a>
7191
+ </LinkWrapper>
7198
7192
  {!isTextBeforeImage && (
7199
- <a href={itemLink} target="_blank" className={\`\${P}-item-text-link\`}>
7193
+ <LinkWrapper link={itemLink} className={\`\${P}-item-text-link\`}>
7200
7194
  {typeABText}
7201
- </a>
7195
+ </LinkWrapper>
7202
7196
  )}
7203
7197
  </>
7204
7198
  ) : (
@@ -7307,7 +7301,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7307
7301
  };
7308
7302
 
7309
7303
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7310
- `,ts={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ky=["titleColor","subtitleColor","lightboxCounterColor"],Yy={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"string",label:"Link",placeholder:"Add link...",display:{type:"text-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:""}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},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:"Gutter",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"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...ts.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:{...ts.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:{...ts.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:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",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:"b",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,imageCorners:0,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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,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:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","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","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","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:[...Ky],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zy={element:Gy,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:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Yy,sourceCode:Uy},Jy=50,wc=10,Il="cntrl-lightbox-journal",_a=Il,zs=`${Il}-`,Ha=e=>`${Il}-${e}`,Rl=e=>e===_a||e.startsWith(zs),$c=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Cc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=$c(t.get(Ha(e)));if(i)return i}const n=$c(t.get(_a));if(n)return n;for(const[i]of t){if(!i.startsWith(zs))continue;const o=i.slice(zs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Tc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},zu=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Rl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ha(t),String(e)):i.searchParams.set(_a,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Qy=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ha(e)||i===_a:Rl(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)}},Bu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ha(e)):[...t.keys()].some(n=>Rl(n))},ev=(e,t)=>{if(Bu(t)){if(e){window.history.back();return}Qy(t)}},tv=20,nv=2,ns=e=>`max(${e}, ${tv}px)`,Lo=e=>((e==null?void 0:e.image)??[]).slice(0,nv),ju=e=>e.reduce((t,n)=>t+Lo(n).length,0),iv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+Lo(r).length,1),i=Lo(e[t]).length;return{start:n,end:n+i-1}},ov=(e,t)=>{const n=ju(e),{start:i,end:o}=iv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},la=(e,t)=>t==="B"?e.flatMap((n,i)=>Lo(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:Lo(n)})),rv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return ov(i,o)},Lc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",av=(e,t,n)=>e==="B"?t.length>1:ju(n)>1,Ln=.004,ei=.004,bo={title1Width:.13,title2Width:.13,title3Width:.14},Si=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Po=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},yr=(e,t)=>Po(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},wi=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Po(e.length,n),effective:yr(e.length,n)}},Vu=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Gu=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Li=["title1","title2","title3","count"],bt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,kl={title1:"1",title2:"2",title3:"3",count:"Count"},El=e=>[bt(e,"fontFamily"),bt(e,"fontSettings"),{type:"row",items:[bt(e,"fontSize"),bt(e,"lineHeight"),bt(e,"letterSpacing"),bt(e,"wordSpacing")]},bt(e,"textAlign"),bt(e,"textAppearance")],sv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Li.map(e=>[kl[e],El(e)]))}),lv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},cv={title1:.02,title2:.02,title3:.02,count:.017},zi=(e,t)=>{const n=i=>{const o=bt(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[lv[t]]}},Bi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??cv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Xu({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:v=0,titleRowMarginBottom:m=0,titleHeaderLayout:g="desktop",contentMarginTop:x=0,iconMarginRight:b=0,closeIcon:k=null,closeIconMaxWidth:f=0,closeIconColor:S="#000000",closeIconHoverColor:W="#cccccc"}=n,U=F.scalingValue(x,i),B=F.scalingValue(Math.max(x,ei),i),P=F.scalingValue(b,i),_=F.scalingValue(m,i),G=g==="mobile",$=Bi("title1",zi(n,"title1"),i),L=Bi("title2",zi(n,"title2"),i),D=Bi("title3",zi(n,"title3"),i),E=s.useMemo(()=>({title1Width:c??bo.title1Width,title2Width:d??bo.title2Width,title3Width:u??bo.title3Width}),[c,d,u]),T=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:v}),[y,v]),C=s.useMemo(()=>Si(e,t,$,L,D),[e,t,$,L,D]),V=s.useMemo(()=>C.map(X=>E[X.widthKey]),[C,E]),w=s.useMemo(()=>Po(C.length,V),[C.length,V]),q=s.useMemo(()=>yr(C.length,V),[C.length,V]),I=s.useMemo(()=>C.filter(X=>X.prefix==="title1"),[C]),A=s.useMemo(()=>C.filter(X=>X.prefix==="title2"||X.prefix==="title3"),[C]),j=s.useMemo(()=>wi(I,E),[I,E]),ie=s.useMemo(()=>wi(A,E),[A,E]),ae=!!(t.title1||t.title2||t.title3),O=k!==null;if(!(ae||O))return null;const N=(p??0)>0||o,le=(X,Ie)=>{const Se=C.findIndex(He=>He.prefix===X.prefix);if(!G||Ie==="single-row")return{effectiveWidth:q[Se]??0,resolvedWidth:w[Se]??0,maxWidth:yn(Se,w)};if(Ie==="two-row-top"){const He=I.findIndex(We=>We.prefix===X.prefix);return{effectiveWidth:j.effective[He]??0,resolvedWidth:j.resolved[He]??0,maxWidth:yn(He,j.resolved)}}const J=A.findIndex(He=>He.prefix===X.prefix);return{effectiveWidth:ie.effective[J]??0,resolvedWidth:ie.resolved[J]??0,maxWidth:yn(J,ie.resolved)}},Q=(X,Ie,Se)=>{if(!G||Se==="single-row"){const qe=X.findIndex(ve=>ve.prefix===Ie.prefix),tt=X.map(ve=>E[ve.widthKey]),et=Po(X.length,tt);return{effectiveWidth:yr(X.length,tt)[qe]??0,resolvedWidth:et[qe]??0,maxWidth:yn(qe,et)}}if(Se==="two-row-top"){const qe=X.filter(ve=>ve.prefix==="title1"),tt=qe.findIndex(ve=>ve.prefix===Ie.prefix),{resolved:et,effective:Ge}=wi(qe,E);return{effectiveWidth:Ge[tt]??0,resolvedWidth:et[tt]??0,maxWidth:yn(tt,et)}}const J=X.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),He=J.findIndex(qe=>qe.prefix===Ie.prefix),{resolved:We,effective:ot}=wi(J,E);return{effectiveWidth:ot[He]??0,resolvedWidth:We[He]??0,maxWidth:yn(He,We)}},be=X=>Gu(C,w,T,X)+(G?0:p??0),Pe=()=>G?0:p??0,ye=X=>A.slice(0,X).reduce((Ie,Se,J)=>Ie+(Se.marginLeftKey?T[Se.marginLeftKey]??0:0)+(ie.resolved[J]??0),0),ce=X=>{const Ie=A[X];return ye(X)+(Ie.marginLeftKey?T[Ie.marginLeftKey]??0:0)+(ie.resolved[X]??0)},Y=(X,Ie,Se)=>{const J=X.marginLeftKey?T[X.marginLeftKey]??0:0,{effectiveWidth:He,resolvedWidth:We,maxWidth:ot}=Se??le(X,Ie),qe=Math.max(J,ei),tt=o&&Ie==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":X.prefix,style:{width:F.scalingValue(He,i),...J>0?{marginLeft:F.scalingValue(J,i)}:{}},children:[a.jsx("p",{className:X.className,style:X.style,children:X.text}),tt&&X.marginLeftKey?a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(-J,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,tt?a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ot),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:F.scalingValue(-Ln/2,i),width:F.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}}):null]},X.className)},se=(X="two-row")=>{const Ie=C.findIndex(He=>He.prefix==="title1"),Se=Ie>=0?w[Ie]:E.title1Width,J=X==="two-row"&&o;return a.jsx("div",{...J?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se)}:{},style:{width:F.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...J?{pointerEvents:"auto"}:{}}})},pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),fe=X=>{const Ie=Si(e,X,$,L,D);return a.jsx(a.Fragment,{children:Ie.map(Se=>Y(Se,"single-row",Q(Ie,Se,"single-row")))})},we=X=>{const Ie=Si(e,X,$,L,D),Se=Ie.find(J=>J.prefix==="title1");return Se?Y(Se,"two-row-top",Q(Ie,Se,"two-row-top")):null},Re=(X,Ie=!1)=>{const Se=Si(e,X,$,L,D),J=Se.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),He=o&&Ie;return J.length>0||He||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[J.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:J.map(ot=>Y(ot,"two-row-bottom",Q(Se,ot,"two-row-bottom")))}),Ie&&o?a.jsxs(a.Fragment,{children:[de(),z()]}):null]}):null,(m??0)>0||He?a.jsx("div",{"data-controls":He?"titleRowMarginBottom":void 0,"data-controls-axis":He?"y":void 0,"data-controls-reverse":He?"":void 0,className:He?`${e}-control`:void 0,style:{height:_,width:"100%",flexShrink:0,pointerEvents:He?"auto":"none"}}):null]}):null},ge=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(f??0,i),height:F.scalingValue(f??0,i),marginRight:P,"--close-icon-hover-color":W},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:X=>{X.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:k??"",fill:S,hoverFill:i&&!r?S:W,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:P,height:"100%",pointerEvents:"auto"}})]}),xe=()=>O?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:ge()}):null,Ce=X=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:X})}),h=X=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[O||ae?pe():null,N?se("two-row"):null,Ce(X),xe()]}),K=(X,Ie=!1)=>a.jsxs(a.Fragment,{children:[h(we(X)),Re(X,Ie)]}),Z=()=>{const X=G?-1:C.findIndex(J=>J.prefix==="title1"),Ie=!G&&(o||(p??0)>0)?(()=>{const J=p??0,He=X>=0?w[X]:E.title1Width,We=Math.max(J,ei);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:0,width:F.scalingValue(We,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Se=C.flatMap((J,He)=>{if(!J.marginLeftKey)return[];const We=T[J.marginLeftKey]??0,ot=Vu(C,w,T,He)+Pe(),qe=Math.max(We,ei);return a.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(w[He]),style:{position:"absolute",top:0,left:F.scalingValue(ot,i),width:F.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},J.marginLeftKey)});return Ie?[Ie,...Se]:Se},ne=()=>C.map((X,Ie)=>{const Se=yn(Ie,w),He=be(Ie)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),de=()=>A.flatMap((X,Ie)=>{if(!X.marginLeftKey)return[];const Se=T[X.marginLeftKey]??0,J=ye(Ie),He=Math.max(Se,ei),{resolvedWidth:We}=le(X,"two-row-bottom");return a.jsx("div",{"data-controls":X.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:F.scalingValue(J,i),width:F.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},X.marginLeftKey)}),z=()=>A.map((X,Ie)=>{const{maxWidth:Se}=le(X,"two-row-bottom"),He=ce(Ie)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":X.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:F.scalingValue(He,i),width:F.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${X.widthKey}-junction`)}),R=()=>!o||G?null:a.jsxs(a.Fragment,{children:[Z(),ne()]}),ee=!!(t.title2||t.title3||(m??0)>0||o),te=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[O||ae?pe():null,N?se("single-row"):null,ae?Ce(fe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),xe(),R()]}),me=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ee?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ee?void 0:{flex:"0 0 auto",height:"auto"},children:K(t,!0)}),R()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:B,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...G?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${G?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${G?` ${e}-text-bar-cell-stacked`:""}`,style:G?void 0:{flex:1,minWidth:0,width:"100%"},children:G?me():te()})})})]})}function dv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uv(e){return`
7304
+ `,ts={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Ky=["titleColor","subtitleColor","lightboxCounterColor"],Yy={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",contentKey:"title",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},gallery:{type:"array",contentKey:"gallery",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}},link:{type:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["gallery"]},default:[{title:"Earth-orbital mission",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Salton Sea from Above",subtitle:"Hasselblad 500 EL / Zeiss Sonnar 250 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module Pilot",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Lunar Module 3 porch",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Command Module",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"CSM and Lunar Module LM",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"David R. Scott during EVA",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Fourth day of the mission",subtitle:"Hasselblad 500 EL / Zeiss Planar 80 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}},{title:"Landing of the Spider1",subtitle:"Hasselblad SWC/ Zeiss Biogon 38 mm / SO-368 Ektachrome",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}],link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c","d","e","f"]},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:"Gutter",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"]}},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},imageCorners:{type:"number",scope:"layout",title:"Round corners",min:0,display:{type:"numeric-input"}},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:{...ts.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:{...ts.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:{...ts.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:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",slider:"on",sliderTiming:3,direction:"horizontal",transition:"fade",showText:"always",alignEntries:"off",align:"top",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:"b",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,imageCorners:0,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:.064,lightboxCounterFontSize:.0373,lightboxCounterLineHeight:.0373},t:{type:"b",gridLayout:{entryWidth:.1041,horizontalGap:.26041,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:250,verticalGap:.09722,entriesCount:0,titleMarginTop:.01953125,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,subtitlePadding:{top:.01,right:.01,bottom:.01,left:.01},titlePadding:{top:.01,right:.01,bottom:.01,left:.01},titleFontSize:.03255,titleLineHeight:.03255,titleLetterSpacing:-.00118,subtitleFontSize:.01822,subtitleLineHeight:.02083,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},d:{type:"b",gridLayout:{entryWidth:.0833,horizontalGap:.25,wrapperWidth:1,columnsCount:3,lockedParam:null},textBoxWidth:200,verticalGap:.09722,entriesCount:0,titleMarginTop:.008,subtitleMarginTop:.008,titleStroke:.001,titleCorners:.05,imageCorners:0,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:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","name","type","gridLayout","textBoxWidth","verticalGap","showText","alignEntries","align","entriesCount","lightbox","imageDisplay","imageCorners","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","verticalGap"]},{type:"row",title:"",items:["entriesCount","showText"]},{type:"row",title:"",items:["alignEntries","align"]}]},{id:"imageSettings",icon:"cover",title:"Image settings",tooltip:"Image settings",layout:["__componentName__",{type:"row",title:"Image",items:["imageDisplay","imageCorners"]},{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",title:"Slider",items:[{type:"group",title:"",items:["slider","direction"]},{type:"group",title:"",items:["sliderTiming","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:[...Ky],panelIds:["general","typeStyle"],stateItems:{default:["titleColor","subtitleColor","lightboxCounterColor"]}}},Zy={element:Gy,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:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"subtitleFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",subtitleFontSettings:"subtitleFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"},schema:Yy,sourceCode:Uy},Jy=50,wc=10,Il="cntrl-lightbox-journal",_a=Il,zs=`${Il}-`,Ha=e=>`${Il}-${e}`,Rl=e=>e===_a||e.startsWith(zs),$c=e=>{if(!e)return null;const t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=1?t:null},Cc=e=>{if(typeof window>"u")return null;const t=new URLSearchParams(window.location.search);if(e){const i=$c(t.get(Ha(e)));if(i)return i}const n=$c(t.get(_a));if(n)return n;for(const[i]of t){if(!i.startsWith(zs))continue;const o=i.slice(zs.length);if(!/^\d+$/.test(o))continue;const r=Number.parseInt(o,10);if(Number.isFinite(r)&&r>=1)return r}return null},Tc=(e,t)=>{if(t<=0)return-1;const n=e-1;return n<0||n>=t?-1:n},zu=(e,t,n=!0)=>{if(typeof window>"u")return;const i=new URL(window.location.href);[...i.searchParams.keys()].forEach(l=>{Rl(l)&&i.searchParams.delete(l)}),t?i.searchParams.set(Ha(t),String(e)):i.searchParams.set(_a,String(e));const o=n?"replaceState":"pushState",r=`${i.pathname}${i.search}${i.hash}`;window.history[o](window.history.state,"",r)},Qy=e=>{if(typeof window>"u")return;const t=new URL(window.location.href),n=[...t.searchParams.keys()].filter(i=>e?i===Ha(e)||i===_a:Rl(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)}},Bu=e=>{if(typeof window>"u")return!1;const t=new URLSearchParams(window.location.search);return e?t.has(Ha(e)):[...t.keys()].some(n=>Rl(n))},ev=(e,t)=>{if(Bu(t)){if(e){window.history.back();return}Qy(t)}},tv=20,nv=2,ns=e=>`max(${e}, ${tv}px)`,To=e=>((e==null?void 0:e.image)??[]).slice(0,nv),ju=e=>e.reduce((t,n)=>t+To(n).length,0),iv=(e,t)=>{const n=e.slice(0,t).reduce((o,r)=>o+To(r).length,1),i=To(e[t]).length;return{start:n,end:n+i-1}},ov=(e,t)=>{const n=ju(e),{start:i,end:o}=iv(e,t);return i===o?`${i} / ${n}`:`${i}-${o} / ${n}`},la=(e,t)=>t==="B"?e.flatMap((n,i)=>To(n).map(o=>({entry:n,entryIndex:i,images:[o]}))):e.map((n,i)=>({entry:n,entryIndex:i,images:To(n)})),rv=(e,t,n,i)=>{var r;if(n==="B")return`${t+1} / ${e.length}`;const o=((r=e[t])==null?void 0:r.entryIndex)??0;return ov(i,o)},Lc=e=>e?`${e.title1??""}|${e.title2??""}|${e.title3??""}`:"",av=(e,t,n)=>e==="B"?t.length>1:ju(n)>1,Ln=.004,ei=.004,xo={title1Width:.13,title2Width:.13,title3Width:.14},Si=(e,t,n,i,o)=>{const r=[];return t.title1&&r.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:n,text:t.title1}),t.title2&&r.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:i,text:t.title2}),t.title3&&r.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:o,text:t.title3}),r},Lo=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},yr=(e,t)=>Lo(e,t),yn=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},wi=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Lo(e.length,n),effective:yr(e.length,n)}},Vu=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Gu=(e,t,n,i)=>e.slice(0,i+1).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),Li=["title1","title2","title3","count"],xt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,kl={title1:"1",title2:"2",title3:"3",count:"Count"},El=e=>[xt(e,"fontFamily"),xt(e,"fontSettings"),{type:"row",items:[xt(e,"fontSize"),xt(e,"lineHeight"),xt(e,"letterSpacing"),xt(e,"wordSpacing")]},xt(e,"textAlign"),xt(e,"textAppearance")],sv=()=>({type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Li.map(e=>[kl[e],El(e)]))}),lv={title1:"title1Color",title2:"title2Color",title3:"title3Color",count:"countColor"},cv={title1:.02,title2:.02,title3:.02,count:.017},zi=(e,t)=>{const n=i=>{const o=xt(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[lv[t]]}},Bi=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??cv[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)};function Xu({prefix:e,entry:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l}){const{title1Width:c,title2Width:d,title3Width:u,title1MarginLeft:p=0,title2MarginLeft:y=0,title3MarginLeft:x=0,titleRowMarginBottom:m=0,titleHeaderLayout:g="desktop",contentMarginTop:v=0,iconMarginRight:b=0,closeIcon:M=null,closeIconMaxWidth:f=0,closeIconColor:S="#000000",closeIconHoverColor:W="#cccccc"}=n,U=R.scalingValue(v,i),B=R.scalingValue(Math.max(v,ei),i),P=R.scalingValue(b,i),H=R.scalingValue(m,i),V=g==="mobile",$=Bi("title1",zi(n,"title1"),i),L=Bi("title2",zi(n,"title2"),i),D=Bi("title3",zi(n,"title3"),i),A=s.useMemo(()=>({title1Width:c??xo.title1Width,title2Width:d??xo.title2Width,title3Width:u??xo.title3Width}),[c,d,u]),T=s.useMemo(()=>({title2MarginLeft:y,title3MarginLeft:x}),[y,x]),C=s.useMemo(()=>Si(e,t,$,L,D),[e,t,$,L,D]),X=s.useMemo(()=>C.map(G=>A[G.widthKey]),[C,A]),w=s.useMemo(()=>Lo(C.length,X),[C.length,X]),q=s.useMemo(()=>yr(C.length,X),[C.length,X]),k=s.useMemo(()=>C.filter(G=>G.prefix==="title1"),[C]),N=s.useMemo(()=>C.filter(G=>G.prefix==="title2"||G.prefix==="title3"),[C]),j=s.useMemo(()=>wi(k,A),[k,A]),ie=s.useMemo(()=>wi(N,A),[N,A]),ae=!!(t.title1||t.title2||t.title3),O=M!==null;if(!(ae||O))return null;const _=(p??0)>0||o,le=(G,Ie)=>{const Se=C.findIndex(He=>He.prefix===G.prefix);if(!V||Ie==="single-row")return{effectiveWidth:q[Se]??0,resolvedWidth:w[Se]??0,maxWidth:yn(Se,w)};if(Ie==="two-row-top"){const He=k.findIndex(We=>We.prefix===G.prefix);return{effectiveWidth:j.effective[He]??0,resolvedWidth:j.resolved[He]??0,maxWidth:yn(He,j.resolved)}}const J=N.findIndex(He=>He.prefix===G.prefix);return{effectiveWidth:ie.effective[J]??0,resolvedWidth:ie.resolved[J]??0,maxWidth:yn(J,ie.resolved)}},Q=(G,Ie,Se)=>{if(!V||Se==="single-row"){const qe=G.findIndex(ve=>ve.prefix===Ie.prefix),tt=G.map(ve=>A[ve.widthKey]),et=Lo(G.length,tt);return{effectiveWidth:yr(G.length,tt)[qe]??0,resolvedWidth:et[qe]??0,maxWidth:yn(qe,et)}}if(Se==="two-row-top"){const qe=G.filter(ve=>ve.prefix==="title1"),tt=qe.findIndex(ve=>ve.prefix===Ie.prefix),{resolved:et,effective:Ge}=wi(qe,A);return{effectiveWidth:Ge[tt]??0,resolvedWidth:et[tt]??0,maxWidth:yn(tt,et)}}const J=G.filter(qe=>qe.prefix==="title2"||qe.prefix==="title3"),He=J.findIndex(qe=>qe.prefix===Ie.prefix),{resolved:We,effective:ot}=wi(J,A);return{effectiveWidth:ot[He]??0,resolvedWidth:We[He]??0,maxWidth:yn(He,We)}},be=G=>Gu(C,w,T,G)+(V?0:p??0),Le=()=>V?0:p??0,ye=G=>N.slice(0,G).reduce((Ie,Se,J)=>Ie+(Se.marginLeftKey?T[Se.marginLeftKey]??0:0)+(ie.resolved[J]??0),0),ce=G=>{const Ie=N[G];return ye(G)+(Ie.marginLeftKey?T[Ie.marginLeftKey]??0:0)+(ie.resolved[G]??0)},Y=(G,Ie,Se)=>{const J=G.marginLeftKey?T[G.marginLeftKey]??0:0,{effectiveWidth:He,resolvedWidth:We,maxWidth:ot}=Se??le(G,Ie),qe=Math.max(J,ei),tt=o&&Ie==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":G.prefix,style:{width:R.scalingValue(He,i),...J>0?{marginLeft:R.scalingValue(J,i)}:{}},children:[a.jsx("p",{className:G.className,style:G.style,children:G.text}),tt&&G.marginLeftKey?a.jsx("div",{"data-controls":G.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:R.scalingValue(-J,i),width:R.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}}):null,tt?a.jsx("div",{"data-controls":G.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ot),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:R.scalingValue(-Ln/2,i),width:R.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}}):null]},G.className)},se=(G="two-row")=>{const Ie=C.findIndex(He=>He.prefix==="title1"),Se=Ie>=0?w[Ie]:A.title1Width,J=G==="two-row"&&o;return a.jsx("div",{...J?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Se)}:{},style:{width:R.scalingValue(p??0,i),flexShrink:0,alignSelf:"stretch",...J?{pointerEvents:"auto"}:{}}})},pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:$,"aria-hidden":"true",children:" "}),fe=G=>{const Ie=Si(e,G,$,L,D);return a.jsx(a.Fragment,{children:Ie.map(Se=>Y(Se,"single-row",Q(Ie,Se,"single-row")))})},we=G=>{const Ie=Si(e,G,$,L,D),Se=Ie.find(J=>J.prefix==="title1");return Se?Y(Se,"two-row-top",Q(Ie,Se,"two-row-top")):null},Re=(G,Ie=!1)=>{const Se=Si(e,G,$,L,D),J=Se.filter(ot=>ot.prefix==="title2"||ot.prefix==="title3"),He=o&&Ie;return J.length>0||He||(m??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[J.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[a.jsx("div",{className:`${e}-titles-stack`,children:J.map(ot=>Y(ot,"two-row-bottom",Q(Se,ot,"two-row-bottom")))}),Ie&&o?a.jsxs(a.Fragment,{children:[de(),z()]}):null]}):null,(m??0)>0||He?a.jsx("div",{"data-controls":He?"titleRowMarginBottom":void 0,"data-controls-axis":He?"y":void 0,"data-controls-reverse":He?"":void 0,className:He?`${e}-control`:void 0,style:{height:H,width:"100%",flexShrink:0,pointerEvents:He?"auto":"none"}}):null]}):null},ge=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:R.scalingValue(f??0,i),height:R.scalingValue(f??0,i),marginRight:P,"--close-icon-hover-color":W},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:G=>{G.stopPropagation(),l==null||l()},"aria-label":"Close",children:a.jsx(mn,{url:M??"",fill:S,hoverFill:i&&!r?S:W,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:P,height:"100%",pointerEvents:"auto"}})]}),xe=()=>O?a.jsx("div",{className:`${e}-titles-row-header-controls`,children:ge()}):null,Ce=G=>a.jsx("div",{className:`${e}-titles-row-titles`,children:a.jsx("div",{className:`${e}-titles-stack`,children:G})}),h=G=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[O||ae?pe():null,_?se("two-row"):null,Ce(G),xe()]}),K=(G,Ie=!1)=>a.jsxs(a.Fragment,{children:[h(we(G)),Re(G,Ie)]}),Z=()=>{const G=V?-1:C.findIndex(J=>J.prefix==="title1"),Ie=!V&&(o||(p??0)>0)?(()=>{const J=p??0,He=G>=0?w[G]:A.title1Width,We=Math.max(J,ei);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(He),style:{position:"absolute",top:0,left:0,width:R.scalingValue(We,i),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,Se=C.flatMap((J,He)=>{if(!J.marginLeftKey)return[];const We=T[J.marginLeftKey]??0,ot=Vu(C,w,T,He)+Le(),qe=Math.max(We,ei);return a.jsx("div",{"data-controls":J.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(w[He]),style:{position:"absolute",top:0,left:R.scalingValue(ot,i),width:R.scalingValue(qe,i),height:"100%",pointerEvents:"auto"}},J.marginLeftKey)});return Ie?[Ie,...Se]:Se},ne=()=>C.map((G,Ie)=>{const Se=yn(Ie,w),He=be(Ie)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":G.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:R.scalingValue(He,i),width:R.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${G.widthKey}-junction`)}),de=()=>N.flatMap((G,Ie)=>{if(!G.marginLeftKey)return[];const Se=T[G.marginLeftKey]??0,J=ye(Ie),He=Math.max(Se,ei),{resolvedWidth:We}=le(G,"two-row-bottom");return a.jsx("div",{"data-controls":G.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(We),style:{position:"absolute",top:0,left:R.scalingValue(J,i),width:R.scalingValue(He,i),height:"100%",pointerEvents:"auto"}},G.marginLeftKey)}),z=()=>N.map((G,Ie)=>{const{maxWidth:Se}=le(G,"two-row-bottom"),He=ce(Ie)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":G.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Se),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:R.scalingValue(He,i),width:R.scalingValue(Ln,i),height:"100%",pointerEvents:"auto"}})},`${G.widthKey}-junction`)}),I=()=>!o||V?null:a.jsxs(a.Fragment,{children:[Z(),ne()]}),ee=!!(t.title2||t.title3||(m??0)>0||o),te=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[O||ae?pe():null,_?se("single-row"):null,ae?Ce(fe(t)):a.jsx("div",{className:`${e}-titles-row-titles`,"aria-hidden":"true"}),xe(),I()]}),me=()=>a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...ee?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:ee?void 0:{flex:"0 0 auto",height:"auto"},children:K(t,!0)}),I()]});return a.jsxs("div",{className:`${e}-lightbox-overlay-content`,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:U,flexShrink:0},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-min":"0",className:`${e}-control`,style:{position:"absolute",top:0,left:0,width:"100%",height:B,pointerEvents:"auto"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...V?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${V?` ${e}-lightbox-content-area-stacked`:""}`,children:a.jsx("div",{className:`${e}-text-bar-cell${V?` ${e}-text-bar-cell-stacked`:""}`,style:V?void 0:{flex:1,minWidth:0,width:"100%"},children:V?me():te()})})})]})}function dv(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function uv(e){return`
7311
7305
  .${e}-wrapper {
7312
7306
  display: grid;
7313
7307
  align-items: start;
@@ -7627,7 +7621,7 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7627
7621
  pointer-events: auto;
7628
7622
  flex-shrink: 0;
7629
7623
  }
7630
- `}const Pc={url:"",name:"",objectFit:"cover"},_n=500,Uo=650,Sn="cubic-bezier(0.22, 1, 0.36, 1)",pv=72,mv=50,gv=1e4,hv=650,fv=500;function yv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function qu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ya(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function vv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?qu(i,n):null}function xv(e){return e.reduce((t,n,i)=>{const o=Ml(n.gallery),l=Al(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Ic(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const bv=.03;function Uu(e){return e.width*bv}const is={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Wr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Rc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Sv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Bs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function wv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Bs(e,t.width,t.height)}function $v(e,t){if(zo(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Cv(e){const t=new Set,n=[];for(const i of e){const o=Ml(i.gallery),r=Al(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.url&&!t.has(c.url)&&(t.add(c.url),n.push(c))}return n}function Tv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>zo(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Io(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Uu(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function va(e,t,n){const i=Io(e,t,n);return{...i,left:2*i.left-e.left}}function Lv(e,t,n){const{left:i,width:o}=n,r=Uu(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ku(e,t,n,i){const o=Io(e,"left",i),r=Io(e,"right",i),l=va(e,"left",i),c=va(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Pv(e,t,n,i){const{start:o,end:r}=Ku(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Iv(e,t,n){const i=Io(e,t,n),o=va(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Yu(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Ml(e){if(!e)return;if(Yu(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Pc,i??o??Pc]}]}function Rv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function kv(e){const[t]=e.media;return t!=null&&t.url?t:null}function Al(e){if(!Array.isArray(e)||e.length===0)return[];if(Yu(e)){const t=[];for(const n of e){const i=Rv(n);if(!i)continue;const o=kv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function zo(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Ev({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return zo(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Mv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Or({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return zo(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Av({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:v,resolveCloseSourceRect:m,onClose:g,onPrev:x,onNext:b}){const k=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[U,B]=s.useState(0),P=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(()=>{}),q=s.useRef(null),I=s.useRef(null),A=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,oe]=s.useState(is),[N,le]=s.useState(0),[Q,be]=s.useState("opening"),[Pe,ye]=s.useState(0),[ce,Y]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Re,ge]=s.useState(null),[xe,Ce]=s.useState(null),[h,K]=s.useState(!1),[Z,ne]=s.useState(null),[de,z]=s.useState(!1),R=s.useRef(!1),[ee,te]=s.useState(!1),[me,X]=s.useState(!1),Ie=s.useRef(n),Se=s.useRef(void 0),J=t[n],He=J?zo(J):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((H,Le)=>t.length<=1?null:t[(H+Le+t.length)%t.length]??null,[t]),Ge=tt?ir(u,p,-1):et(n,-1),ve=tt?ir(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Re!==null?ir(u,Re,-1):xe!==null?et(xe,-1):null:null,Be=fe===1&&We?tt&&Re!==null?ir(u,Re,1):xe!==null?et(xe,1):null:null,Ze=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=Be&&Be.url!==(ve==null?void 0:ve.url)?Be:null,Ne=Ge&&qe?(()=>{const H=tt?Ic(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return H&&H.url!==Ge.url?H:null})():null,Ue=ve&&qe?(()=>{const H=tt?Ic(u,p,1):t.length>2?et((n+1)%t.length,1):null;return H&&H.url!==ve.url?H:null})():null,Je=Ze??Ne,st=$e??Ue,it=s.useCallback((H,Le,je)=>{if(!H||!Le||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Le&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Le,height:je}),B(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.url))return null;const Le=W.current.get(H.url);return wv(f.current,Le)},[U,N]),Ae=s.useCallback(()=>{if(!J)return;const H=Oe(J);if(H){ae(H);return}const Le=f.current;Le&&ae(Rc(Le))},[J,Oe]),gt=s.useCallback(H=>{if(tt){const Le=u.length;ge((p+H+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+H+t.length)%t.length),ge(null))},[tt,u.length,p,t.length,n]),ze=s.useCallback(H=>{E.current=H,pe(H)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Xe=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),ze(!1)},Uo+32)},[De,ze]),ct=s.useCallback(()=>{const H=k.current;if(!H){oe({left:0,top:0,width:typeof window<"u"?window.innerWidth:is.width,height:typeof window<"u"?window.innerHeight:is.height});return}const Le=H.getBoundingClientRect();oe({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),he=s.useCallback((H,Le)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const je=Oe(H);if(!je)return;const{x:Fe,y:ft}=Pv(je,Le,fe,O);return`translate(${Fe}px, ${ft}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Ee=s.useCallback(()=>{const H=C.current;C.current=null,De(),ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,G.current=0,$.current="none",H===-1?x():H===1&&b()},[De,ze,x,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Ee()},Uo+32)},[De,Ee]),pt=s.useCallback(()=>{De(),C.current=null,ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,G.current=0,$.current="none"},[De,ze]),Ve=s.useCallback(H=>{if(!(!qe||!ie)){if(E.current){if(C.current===H){V.current=H,Ee();return}pt()}De(),gt(H),C.current=H,we(H),ze(!0),nt()}},[qe,ie,Ee,pt,De,gt,ze,nt]);w.current=Ve;const vt=s.useCallback(()=>{q.current=null,j.current=!1,I.current!==null&&(window.clearInterval(I.current),I.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Rt=s.useCallback(H=>{I.current!==null&&window.clearInterval(I.current);const Le=j.current?fv:hv;I.current=window.setInterval(()=>{w.current(H)},Le)},[]),At=s.useCallback(H=>{q.current!==H&&(vt(),q.current=H,j.current=!1,w.current(H),Rt(H),A.current=window.setTimeout(()=>{A.current=null,q.current===H&&(j.current=!0,Rt(H))},gv))},[vt,Rt]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Le=J==null?void 0:J.url,je=Le?W.current.get(Le):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){ae(Bs(H,je.width,je.height));return}const Fe=S.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Ht,height:mt}=Sv(Fe);if(Ht&&mt){it(Le,Ht,mt),ae(Bs(H,Ht,mt));return}}const ft=Rc(H);!ft.width||!ft.height||ae(ft)},[J==null?void 0:J.url,it]),Vt=s.useCallback(H=>{if(S.current=H,!!H){if(H instanceof HTMLVideoElement){H.readyState>=1&&H.videoWidth>0&&wt();return}H.complete&&H.naturalWidth>0&&wt()}},[wt]),jt=s.useCallback(()=>{ct(),wt(),le(H=>H+1)},[ct,wt]);s.useEffect(()=>{jt();const H=f.current,Le=k.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Le&&je.observe(Le),window.addEventListener("resize",jt),()=>{je.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const H=S.current;if(H){if(H instanceof HTMLImageElement&&H.complete&&H.naturalWidth>0){wt();return}H instanceof HTMLVideoElement&&H.readyState>=1&&H.videoWidth>0&&wt()}},[J==null?void 0:J.url,n,wt]),s.useEffect(()=>{Ae()},[Ae,U]),s.useEffect(()=>{const H=new Set,Le=[],je=Fe=>{!(Fe!=null&&Fe.url)||H.has(Fe.url)||(H.add(Fe.url),Le.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Le.forEach(Fe=>{W.current.has(Fe.url)||$v(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(Q!=="opening"||!ie)return;if(!v){be("open");return}K(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),be("open")})});return()=>cancelAnimationFrame(H)},[Q,ie,v]),s.useEffect(()=>{if(Q!=="closing")return;const H=setTimeout(()=>g(),_n);return()=>clearTimeout(H)},[Q,g]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Ie.current===n&&Se.current===(J==null?void 0:J.url)||(De(),C.current=null,we(null),ge(null),Ce(null),ye(0),Y(0),ze(!1),X(!1),te(!1),_.current=0,G.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Ae(),Ie.current=n,Se.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ze,De,Ae]),s.useLayoutEffect(()=>{const H=V.current;H!==null&&(V.current=null,requestAnimationFrame(()=>{w.current(H)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(Q==="opening"){R.current=!1,z(!1);return}if(Q!=="open"||R.current)return;if(!Ge&&!ve){R.current=!0;return}z(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),R.current=!0})});return()=>cancelAnimationFrame(H)},[Q,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(Q!=="open")return;const H=()=>{const mt=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),document.removeEventListener("click",mt,!0)};document.addEventListener("click",mt,!0)},Le=mt=>{const Lt=mt<0?1:-1;De(),gt(Lt),C.current=Lt,we(Lt),ze(!0),nt()},je=mt=>{if(Math.abs(mt)>mv&&qe){Le(mt);return}C.current=null,we(null),ge(null),Ce(null),ze(!0),Y(0),Xe()},Fe=mt=>{if(mt.touches.length!==1||E.current)return;const Lt=mt.touches[0];D.current=!0,P.current={x:Lt.clientX,y:Lt.clientY},$.current="none",G.current=0,L.current=!1},ft=mt=>{if(!P.current||mt.touches.length!==1||E.current)return;const Lt=mt.touches[0],Ut=Lt.clientX-P.current.x,Dt=Lt.clientY-P.current.y;if($.current==="none"){if(Math.abs(Ut)<10&&Math.abs(Dt)<10)return;if(Math.abs(Ut)>Math.abs(Dt)){if(!qe)return;$.current="horizontal"}else if(Dt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),G.current=Ut,Y(Ut),mt.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),_.current=Dt,ye(Dt),mt.preventDefault())},Ht=()=>{if(!P.current)return;const mt=$.current,Lt=L.current;if(Lt&&mt==="horizontal")je(G.current),H();else if(Lt&&mt==="vertical"){const Ut=_.current;if(ot&&Ut>pv){const Dt=window.innerHeight;_.current=Dt,X(!0),ye(Dt),be("closing")}else _.current=0,ye(0);H()}else mt==="horizontal"&&Math.abs(G.current)>0&&(je(G.current),H());P.current=null,$.current="none",G.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht)}},[Q,qe,ze,Xe,De,ot,nt,gt]);const Kt=s.useCallback(()=>{const H=(m==null?void 0:m())??v??null;H&&ie&&(ne(H),K(!0)),be("closing")},[m,v,ie]);s.useEffect(()=>{const H=Fe=>{if(Fe.key==="Escape"){if(r&&c||Q==="closing")return;vt(),Kt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||Q!=="open"||!qe)return;Fe.preventDefault();const ft=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&q.current===ft||At(ft)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const ft=Fe.key==="ArrowLeft"?-1:1;q.current===ft&&vt()},je=()=>{vt()};return window.addEventListener("keydown",H),window.addEventListener("keyup",Le),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Le),window.removeEventListener("blur",je),vt()}},[Q,r,c,Kt,qe,At,vt]),s.useEffect(()=>{Q!=="open"&&vt()},[Q,vt]);const Yt=()=>{Q==="closing"||l||Kt()},kt=Q==="open",Bt=Q==="closing",rn=Pe>0?Math.max(0,1-Pe/500):1,xt=Pe>0?Math.max(.35,1-Pe/500):1,yt=s.useCallback(H=>{if(!(H.propertyName!=="transform"||!E.current)){if(C.current!==null){Ee();return}De(),ze(!1)}},[De,ze,Ee]),Me=Q==="closing"?Z??v:v,Qe=Me&&ie&&(Q==="opening"||Bt)?yv(Me,ie):void 0,rt=We&&J?he(J,"center"):Pe>0?`translateY(${Pe}px)`:Qe,dt=ie?Wr(ie,O):null,Pt=!!(Me&&ie),St=Pt&&(Q==="closing"||Q==="open"&&h),ht={position:"absolute",top:dt==null?void 0:dt.top,left:dt==null?void 0:dt.left,width:dt==null?void 0:dt.width,height:dt==null?void 0:dt.height,objectFit:"contain",transformOrigin:"top left",transform:rt,opacity:Pe>0?xt:Pt?1:Q==="opening"||Bt?0:1,transition:ee&&!se?"none":se?`transform ${Uo}ms ${Sn}`:me?`transform ${_n}ms ${Sn}, opacity ${_n}ms ${Sn}`:St?`transform ${_n}ms ${Sn}`:Q==="opening"||Bt?`opacity ${_n}ms ${Sn}`:"none",pointerEvents:He&&kt&&!We?"auto":"none",touchAction:He&&kt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:kt&&!We?"auto":"none"},Tt=(H,Le,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?Ku(Fe,ft,fe,O):{start:je==="far"?va(Fe,Le,O):Io(Fe,Le,O)},mt=Wr(Ht,O),Lt=he(H,ft),Ut=!We&&je==="adjacent"&&kt&&!de?Iv(Fe,Le,O):null,Dt=je==="far"&&We&&fe===(Le==="left"?-1:1),an=ee&&!se?!1:se,ln=je==="adjacent"&&kt&&de&&!We;return{position:"absolute",top:mt.top,left:mt.left,width:mt.width,height:mt.height,objectFit:"contain",transform:Lt??(Ut?`translate(${Ut.x}px, ${Ut.y}px)`:void 0),opacity:je==="far"?kt&&Dt?1:0:kt?1:0,transition:an?je==="far"?`transform ${Uo}ms ${Sn}`:`transform ${Uo}ms ${Sn}, opacity ${_n}ms ${Sn}`:ln?`transform ${_n}ms ${Sn}`:Q==="opening"||Bt?`opacity ${_n}ms ${Sn}`:"none",pointerEvents:"none",zIndex:1}},Ot=(H,Le)=>{const je=Oe(H);return je?Lv(Io(je,Le,O),Le,O):null},Gt=H=>Le=>{if(!l){if(D.current){D.current=!1;return}Le.stopPropagation(),Ve(H)}},Mt=Ge?Ot(Ge,"left"):null,_t=ve?Ot(ve,"right"):null,Ft=Mt?Wr(Mt,O):null,ut=_t?Wr(_t,O):null;return a.jsxs("div",{ref:k,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:Yt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:kt?rn:0,transition:ee?"none":`opacity ${_n}ms ${Sn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:kt?1:0,transition:ee?"none":`opacity ${_n}ms ${Sn}`,pointerEvents:"none"},children:a.jsx(Xu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Yt})})]}),kt&&Je&&a.jsx(Or,{media:Je,style:Tt(Je,"left","far"),onMeasure:it,onTransitionEnd:yt},`far-prev-${Je.url}`),kt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Or,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),kt&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Or,{media:ve,style:Tt(ve,"right"),onMeasure:it,onTransitionEnd:yt},`next-${ve.url}`),ut&&a.jsx("div",{style:{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(1)})]}),kt&&st&&a.jsx(Or,{media:st,style:Tt(st,"right","far"),onMeasure:it,onTransitionEnd:yt},`far-next-${st.url}`),ie&&J&&(He?a.jsx(Mv,{src:J.url,phase:Q,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${J.url}`):a.jsx("img",{ref:Vt,src:J.url,alt:J.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${J.url}`))]})}function Fv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,v=(y==null?void 0:y.display)==="cover",m=(y==null?void 0:y.ratioValue)??"1:1",g=(y==null?void 0:y.reversed)??!1,[x,b]=m.split(":").map(Number),S=`${g?b:x} / ${g?x:b}`,W=d.entryWidth??.2,U=d.columnsCount,B=F.scalingValue(W,n),P=F.scalingValue(d.horizontalGap??0,n),_=B,G=B,$={width:_,...v?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},L=v?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},D=s.useRef(null),[E,T]=s.useState(!1),[C,V]=s.useState([]),[w,q]=s.useState(0),[I,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState({title1:"",title2:"",title3:""}),oe=(()=>{const xe={},Ce=D.current?getComputedStyle(D.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(xe["--cntrl-article-width"]=Ce),xe})(),N=!n||i||o,le=s.useMemo(()=>uv(c),[c]),Q=t??[],be=Q.length%U||U,Pe=be<U&&Q.length>0,ye=Q.length-be,ce=Pe?Math.floor((U-be)/2)+1:1,Y=s.useMemo(()=>xv(Q),[Q]),se=s.useMemo(()=>Cv(Q),[Q]),pe=(xe,Ce,h)=>{if(n&&!o&&!i)return;const K=Y.findIndex(ne=>ne.gridIndex===xe);if(K<0)return;const Z=Y[K];A(K),V(Z.items),q(Ce),O(Z.entry),ie(h??null),T(!0)},fe=s.useCallback(()=>{T(!1),ie(null)},[]),we=s.useCallback(()=>{const xe=Y[I];return!xe||!D.current?j:vv(D.current,xe.gridIndex,v?"cover":"contain")??j},[Y,I,j,v]),Re=s.useCallback(xe=>{if(Y.length>1){const Ce=Y.length,h=(I+xe+Ce)%Ce,K=Y[h],Z=Math.min(w,K.items.length-1);A(h),V(K.items),q(Z),O(K.entry);return}q(Ce=>(Ce+xe+C.length)%C.length)},[Y,I,w,C.length]),ge=Y.length>1||C.length>1;return s.useEffect(()=>{if(!E||typeof document>"u")return;const xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xe}},[E]),s.useEffect(()=>{!n||o||i||T(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(Tv,{mediaList:se}),a.jsx("div",{ref:D,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${U}, ${B})`,rowGap:0,columnGap:P,width:F.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:F.scalingValue(u??0,n)},children:Q.map((xe,Ce)=>{const h=Ml(xe.gallery),K=Al(h),Z=K.filter(te=>te.lightboxMedia).map(te=>te.lightboxMedia),ne=Math.floor(Ce/U)===Math.ceil(Q.length/U)-1,de=Pe&&Ce>=ye?`${ce+(Ce-ye)}`:void 0,z=K[0],R=z!=null&&z.lightboxMedia?Z.findIndex(te=>te.url===z.lightboxMedia.url):-1,ee=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:K.length>0&&a.jsx(Ev,{media:z.displayMedia,gridIndex:Ce,className:`${c}-item-${zo(z.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:N&&R>=0?te=>pe(Ce,R,qu(te.currentTarget,v?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ne?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...de?{gridColumn:de}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:G}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ee}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:G}})})]})},Ce)})}),E&&typeof document<"u"&&(()=>{const xe=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:oe,"data-selection":"none",children:a.jsx(Av,{prefix:c,items:C,index:w,entry:ae,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ge,lightboxEntries:Y,entryIdx:I,layoutId:r,sourceRect:j,resolveCloseSourceRect:we,onClose:fe,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),xe)})()]})}const Nv=`import { CommonComponentProps } from '../props';
7624
+ `}const Pc={url:"",name:"",objectFit:"cover"},_n=500,Uo=650,Sn="cubic-bezier(0.22, 1, 0.36, 1)",pv=72,mv=50,gv=1e4,hv=650,fv=500;function yv(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function qu(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ya(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function vv(e,t,n){const i=e.querySelector(`[data-hive-grid-index="${t}"]`);return i instanceof HTMLElement?qu(i,n):null}function xv(e){return e.reduce((t,n,i)=>{const o=Ml(n.gallery),l=Al(o).filter(c=>c.lightboxMedia).map(c=>c.lightboxMedia);return l.length===0||t.push({gridIndex:i,items:l,entry:{title1:n.title1??"",title2:n.title2??"",title3:n.title3??""}}),t},[])}function ir(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function Ic(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return ir(e,i,n)}const bv=.03;function Uu(e){return e.width*bv}const is={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Wr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function Rc(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Sv(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Bs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function wv(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Bs(e,t.width,t.height)}function $v(e,t){if(Do(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Cv(e){const t=new Set,n=[];for(const i of e){const o=Ml(i.gallery),r=Al(o);for(const l of r)for(const c of[l.displayMedia,l.lightboxMedia])c!=null&&c.url&&!t.has(c.url)&&(t.add(c.url),n.push(c))}return n}function Tv({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Do(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Po(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=Uu(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function va(e,t,n){const i=Po(e,t,n);return{...i,left:2*i.left-e.left}}function Lv(e,t,n){const{left:i,width:o}=n,r=Uu(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function Ku(e,t,n,i){const o=Po(e,"left",i),r=Po(e,"right",i),l=va(e,"left",i),c=va(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Pv(e,t,n,i){const{start:o,end:r}=Ku(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Iv(e,t,n){const i=Po(e,t,n),o=va(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Yu(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function Ml(e){if(!e)return;if(Yu(e))return e;if(!Array.isArray(e))return;const[t,n]=e,i=t!=null&&t.url?t:void 0,o=n!=null&&n.url?n:void 0;if(!(!i&&!o))return[{media:[o??i??Pc,i??o??Pc]}]}function Rv(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function kv(e){const[t]=e.media;return t!=null&&t.url?t:null}function Al(e){if(!Array.isArray(e)||e.length===0)return[];if(Yu(e)){const t=[];for(const n of e){const i=Rv(n);if(!i)continue;const o=kv(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Do(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Ev({media:e,className:t,style:n,gridIndex:i,onMediaClick:o}){return Do(e)?a.jsx("video",{src:e.url,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},muted:!0,autoPlay:!0,loop:!0,playsInline:!0,preload:"auto",onClick:o}):a.jsx("img",{src:e.url,alt:e.name,className:t,"data-hive-grid-index":i,style:{...n,cursor:o?"pointer":"default"},onClick:o})}function Mv({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Or({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Do(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Av({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:g,onPrev:v,onNext:b}){const M=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[U,B]=s.useState(0),P=s.useRef(null),H=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),A=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),X=s.useRef(null),w=s.useRef(()=>{}),q=s.useRef(null),k=s.useRef(null),N=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,oe]=s.useState(is),[_,le]=s.useState(0),[Q,be]=s.useState("opening"),[Le,ye]=s.useState(0),[ce,Y]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Re,ge]=s.useState(null),[xe,Ce]=s.useState(null),[h,K]=s.useState(!1),[Z,ne]=s.useState(null),[de,z]=s.useState(!1),I=s.useRef(!1),[ee,te]=s.useState(!1),[me,G]=s.useState(!1),Ie=s.useRef(n),Se=s.useRef(void 0),J=t[n],He=J?Do(J):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((E,Pe)=>t.length<=1?null:t[(E+Pe+t.length)%t.length]??null,[t]),Ge=tt?ir(u,p,-1):et(n,-1),ve=tt?ir(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Re!==null?ir(u,Re,-1):xe!==null?et(xe,-1):null:null,je=fe===1&&We?tt&&Re!==null?ir(u,Re,1):xe!==null?et(xe,1):null:null,Ze=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=je&&je.url!==(ve==null?void 0:ve.url)?je:null,Ne=Ge&&qe?(()=>{const E=tt?Ic(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return E&&E.url!==Ge.url?E:null})():null,Ue=ve&&qe?(()=>{const E=tt?Ic(u,p,1):t.length>2?et((n+1)%t.length,1):null;return E&&E.url!==ve.url?E:null})():null,Je=Ze??Ne,st=$e??Ue,it=s.useCallback((E,Pe,Be)=>{if(!E||!Pe||!Be)return;const Ee=W.current,ct=Ee.get(E);(ct==null?void 0:ct.width)===Pe&&(ct==null?void 0:ct.height)===Be||(Ee.set(E,{width:Pe,height:Be}),B(Wt=>Wt+1))},[]),Oe=s.useCallback(E=>{if(!(E!=null&&E.url))return null;const Pe=W.current.get(E.url);return wv(f.current,Pe)},[U,_]),Fe=s.useCallback(()=>{if(!J)return;const E=Oe(J);if(E){ae(E);return}const Pe=f.current;Pe&&ae(Rc(Pe))},[J,Oe]),ut=s.useCallback(E=>{if(tt){const Pe=u.length;ge((p+E+Pe)%Pe),Ce(null);return}t.length>1&&(Ce((n+E+t.length)%t.length),ge(null))},[tt,u.length,p,t.length,n]),ze=s.useCallback(E=>{A.current=E,pe(E)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Xe=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),ze(!1)},Uo+32)},[De,ze]),pt=s.useCallback(()=>{const E=M.current;if(!E){oe({left:0,top:0,width:typeof window<"u"?window.innerWidth:is.width,height:typeof window<"u"?window.innerHeight:is.height});return}const Pe=E.getBoundingClientRect();oe({left:Pe.left,top:Pe.top,width:Pe.width,height:Pe.height})},[]),he=s.useCallback((E,Pe)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const Be=Oe(E);if(!Be)return;const{x:Ee,y:ct}=Pv(Be,Pe,fe,O);return`translate(${Ee}px, ${ct}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Me=s.useCallback(()=>{const E=C.current;C.current=null,De(),ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,V.current=0,$.current="none",E===-1?v():E===1&&b()},[De,ze,v,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Me()},Uo+32)},[De,Me]),gt=s.useCallback(()=>{De(),C.current=null,ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,V.current=0,$.current="none"},[De,ze]),Ve=s.useCallback(E=>{if(!(!qe||!ie)){if(A.current){if(C.current===E){X.current=E,Me();return}gt()}De(),ut(E),C.current=E,we(E),ze(!0),nt()}},[qe,ie,Me,gt,De,ut,ze,nt]);w.current=Ve;const yt=s.useCallback(()=>{q.current=null,j.current=!1,k.current!==null&&(window.clearInterval(k.current),k.current=null),N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),It=s.useCallback(E=>{k.current!==null&&window.clearInterval(k.current);const Pe=j.current?fv:hv;k.current=window.setInterval(()=>{w.current(E)},Pe)},[]),At=s.useCallback(E=>{q.current!==E&&(yt(),q.current=E,j.current=!1,w.current(E),It(E),N.current=window.setTimeout(()=>{N.current=null,q.current===E&&(j.current=!0,It(E))},gv))},[yt,It]),St=s.useCallback(()=>{const E=f.current;if(!E)return;const Pe=J==null?void 0:J.url,Be=Pe?W.current.get(Pe):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){ae(Bs(E,Be.width,Be.height));return}const Ee=S.current;if(Ee&&Pe&&(Ee.src===Pe||Ee.currentSrc===Pe)){const{width:Wt,height:ht}=Sv(Ee);if(Wt&&ht){it(Pe,Wt,ht),ae(Bs(E,Wt,ht));return}}const ct=Rc(E);!ct.width||!ct.height||ae(ct)},[J==null?void 0:J.url,it]),Vt=s.useCallback(E=>{if(S.current=E,!!E){if(E instanceof HTMLVideoElement){E.readyState>=1&&E.videoWidth>0&&St();return}E.complete&&E.naturalWidth>0&&St()}},[St]),jt=s.useCallback(()=>{pt(),St(),le(E=>E+1)},[pt,St]);s.useEffect(()=>{jt();const E=f.current,Pe=M.current,Be=new ResizeObserver(()=>jt());return E&&Be.observe(E),Pe&&Be.observe(Pe),window.addEventListener("resize",jt),()=>{Be.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const E=S.current;if(E){if(E instanceof HTMLImageElement&&E.complete&&E.naturalWidth>0){St();return}E instanceof HTMLVideoElement&&E.readyState>=1&&E.videoWidth>0&&St()}},[J==null?void 0:J.url,n,St]),s.useEffect(()=>{Fe()},[Fe,U]),s.useEffect(()=>{const E=new Set,Pe=[],Be=Ee=>{!(Ee!=null&&Ee.url)||E.has(Ee.url)||(E.add(Ee.url),Pe.push(Ee))};t.forEach(Be),u.forEach(Ee=>Ee.items.forEach(Be)),Pe.forEach(Ee=>{W.current.has(Ee.url)||$v(Ee,it)})},[t,u,it]),s.useEffect(()=>{if(Q!=="opening"||!ie)return;if(!x){be("open");return}K(!1);const E=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),be("open")})});return()=>cancelAnimationFrame(E)},[Q,ie,x]),s.useEffect(()=>{if(Q!=="closing")return;const E=setTimeout(()=>g(),_n);return()=>clearTimeout(E)},[Q,g]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Ie.current===n&&Se.current===(J==null?void 0:J.url)||(De(),C.current=null,we(null),ge(null),Ce(null),ye(0),Y(0),ze(!1),G(!1),te(!1),H.current=0,V.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Fe(),Ie.current=n,Se.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ze,De,Fe]),s.useLayoutEffect(()=>{const E=X.current;E!==null&&(X.current=null,requestAnimationFrame(()=>{w.current(E)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(Q==="opening"){I.current=!1,z(!1);return}if(Q!=="open"||I.current)return;if(!Ge&&!ve){I.current=!0;return}z(!1);const E=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),I.current=!0})});return()=>cancelAnimationFrame(E)},[Q,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(Q!=="open")return;const E=()=>{const ht=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ht,!0)};document.addEventListener("click",ht,!0)},Pe=ht=>{const Tt=ht<0?1:-1;De(),ut(Tt),C.current=Tt,we(Tt),ze(!0),nt()},Be=ht=>{if(Math.abs(ht)>mv&&qe){Pe(ht);return}C.current=null,we(null),ge(null),Ce(null),ze(!0),Y(0),Xe()},Ee=ht=>{if(ht.touches.length!==1||A.current)return;const Tt=ht.touches[0];D.current=!0,P.current={x:Tt.clientX,y:Tt.clientY},$.current="none",V.current=0,L.current=!1},ct=ht=>{if(!P.current||ht.touches.length!==1||A.current)return;const Tt=ht.touches[0],qt=Tt.clientX-P.current.x,Ot=Tt.clientY-P.current.y;if($.current==="none"){if(Math.abs(qt)<10&&Math.abs(Ot)<10)return;if(Math.abs(qt)>Math.abs(Ot)){if(!qe)return;$.current="horizontal"}else if(Ot>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),V.current=qt,Y(qt),ht.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),H.current=Ot,ye(Ot),ht.preventDefault())},Wt=()=>{if(!P.current)return;const ht=$.current,Tt=L.current;if(Tt&&ht==="horizontal")Be(V.current),E();else if(Tt&&ht==="vertical"){const qt=H.current;if(ot&&qt>pv){const Ot=window.innerHeight;H.current=Ot,G(!0),ye(Ot),be("closing")}else H.current=0,ye(0);E()}else ht==="horizontal"&&Math.abs(V.current)>0&&(Be(V.current),E());P.current=null,$.current="none",V.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Ee,{passive:!0}),document.addEventListener("touchmove",ct,{passive:!1}),document.addEventListener("touchend",Wt),document.addEventListener("touchcancel",Wt),()=>{document.removeEventListener("touchstart",Ee),document.removeEventListener("touchmove",ct),document.removeEventListener("touchend",Wt),document.removeEventListener("touchcancel",Wt)}},[Q,qe,ze,Xe,De,ot,nt,ut]);const Ut=s.useCallback(()=>{const E=(m==null?void 0:m())??x??null;E&&ie&&(ne(E),K(!0)),be("closing")},[m,x,ie]);s.useEffect(()=>{const E=Ee=>{if(Ee.key==="Escape"){if(r&&c||Q==="closing")return;yt(),Ut();return}if(Ee.key!=="ArrowLeft"&&Ee.key!=="ArrowRight"||Q!=="open"||!qe)return;Ee.preventDefault();const ct=Ee.key==="ArrowLeft"?-1:1;Ee.repeat&&q.current===ct||At(ct)},Pe=Ee=>{if(Ee.key!=="ArrowLeft"&&Ee.key!=="ArrowRight")return;const ct=Ee.key==="ArrowLeft"?-1:1;q.current===ct&&yt()},Be=()=>{yt()};return window.addEventListener("keydown",E),window.addEventListener("keyup",Pe),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",E),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",Be),yt()}},[Q,r,c,Ut,qe,At,yt]),s.useEffect(()=>{Q!=="open"&&yt()},[Q,yt]);const Kt=()=>{Q==="closing"||l||Ut()},Rt=Q==="open",zt=Q==="closing",rn=Le>0?Math.max(0,1-Le/500):1,vt=Le>0?Math.max(.35,1-Le/500):1,ft=s.useCallback(E=>{if(!(E.propertyName!=="transform"||!A.current)){if(C.current!==null){Me();return}De(),ze(!1)}},[De,ze,Me]),Ae=Q==="closing"?Z??x:x,Qe=Ae&&ie&&(Q==="opening"||zt)?yv(Ae,ie):void 0,at=We&&J?he(J,"center"):Le>0?`translateY(${Le}px)`:Qe,mt=ie?Wr(ie,O):null,Lt=!!(Ae&&ie),bt=Lt&&(Q==="closing"||Q==="open"&&h),kt={position:"absolute",top:mt==null?void 0:mt.top,left:mt==null?void 0:mt.left,width:mt==null?void 0:mt.width,height:mt==null?void 0:mt.height,objectFit:"contain",transformOrigin:"top left",transform:at,opacity:Le>0?vt:Lt?1:Q==="opening"||zt?0:1,transition:ee&&!se?"none":se?`transform ${Uo}ms ${Sn}`:me?`transform ${_n}ms ${Sn}, opacity ${_n}ms ${Sn}`:bt?`transform ${_n}ms ${Sn}`:Q==="opening"||zt?`opacity ${_n}ms ${Sn}`:"none",pointerEvents:He&&Rt&&!We?"auto":"none",touchAction:He&&Rt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Bt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Rt&&!We?"auto":"none"},lt=(E,Pe,Be="adjacent")=>{const Ee=Oe(E);if(!Ee)return{display:"none"};const ct=Be==="far"?Pe==="left"?"far-left":"far-right":Pe==="left"?"left-adjacent":"right-adjacent",{start:Wt}=fe!==null?Ku(Ee,ct,fe,O):{start:Be==="far"?va(Ee,Pe,O):Po(Ee,Pe,O)},ht=Wr(Wt,O),Tt=he(E,ct),qt=!We&&Be==="adjacent"&&Rt&&!de?Iv(Ee,Pe,O):null,Ot=Be==="far"&&We&&fe===(Pe==="left"?-1:1),an=ee&&!se?!1:se,ln=Be==="adjacent"&&Rt&&de&&!We;return{position:"absolute",top:ht.top,left:ht.left,width:ht.width,height:ht.height,objectFit:"contain",transform:Tt??(qt?`translate(${qt.x}px, ${qt.y}px)`:void 0),opacity:Be==="far"?Rt&&Ot?1:0:Rt?1:0,transition:an?Be==="far"?`transform ${Uo}ms ${Sn}`:`transform ${Uo}ms ${Sn}, opacity ${_n}ms ${Sn}`:ln?`transform ${_n}ms ${Sn}`:Q==="opening"||zt?`opacity ${_n}ms ${Sn}`:"none",pointerEvents:"none",zIndex:1}},Ht=(E,Pe)=>{const Be=Oe(E);return Be?Lv(Po(Be,Pe,O),Pe,O):null},Yt=E=>Pe=>{if(!l){if(D.current){D.current=!1;return}Pe.stopPropagation(),Ve(E)}},Mt=Ge?Ht(Ge,"left"):null,Nt=ve?Ht(ve,"right"):null,Ft=Mt?Wr(Mt,O):null,$t=Nt?Wr(Nt,O):null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Rt?rn:0,transition:ee?"none":`opacity ${_n}ms ${Sn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Rt?1:0,transition:ee?"none":`opacity ${_n}ms ${Sn}`,pointerEvents:"none"},children:a.jsx(Xu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Kt})})]}),Rt&&Je&&a.jsx(Or,{media:Je,style:lt(Je,"left","far"),onMeasure:it,onTransitionEnd:ft},`far-prev-${Je.url}`),Rt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Or,{media:Ge,style:lt(Ge,"left"),onMeasure:it,onTransitionEnd:ft},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Yt(-1)})]}),Rt&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Or,{media:ve,style:lt(ve,"right"),onMeasure:it,onTransitionEnd:ft},`next-${ve.url}`),$t&&a.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Yt(1)})]}),Rt&&st&&a.jsx(Or,{media:st,style:lt(st,"right","far"),onMeasure:it,onTransitionEnd:ft},`far-next-${st.url}`),ie&&J&&(He?a.jsx(Mv,{src:J.url,phase:Q,onMediaElement:Vt,wrapperStyle:kt,videoStyle:Bt,onLoadedMetadata:St,onTransitionEnd:ft},`${n}-${J.url}`):a.jsx("img",{ref:Vt,src:J.url,alt:J.name,onLoad:St,onTransitionEnd:ft,style:kt},`${n}-${J.url}`))]})}function Fv({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=R.useScopedStyles(),{gridLayout:d,verticalGap:u,align:p="top",imageDisplay:y}=e,x=(y==null?void 0:y.display)==="cover",m=(y==null?void 0:y.ratioValue)??"1:1",g=(y==null?void 0:y.reversed)??!1,[v,b]=m.split(":").map(Number),S=`${g?b:v} / ${g?v:b}`,W=d.entryWidth??.2,U=d.columnsCount,B=R.scalingValue(W,n),P=R.scalingValue(d.horizontalGap??0,n),H=B,V=B,$={width:H,...x?{aspectRatio:S,height:"auto",overflow:"hidden"}:{height:"auto"}},L=x?{objectFit:"cover",pointerEvents:"auto",width:"100%",height:"100%",maxWidth:"100%"}:{objectFit:"contain",pointerEvents:"auto",width:"auto",height:"auto",maxWidth:"100%"},D=s.useRef(null),[A,T]=s.useState(!1),[C,X]=s.useState([]),[w,q]=s.useState(0),[k,N]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState({title1:"",title2:"",title3:""}),oe=(()=>{const xe={},Ce=D.current?getComputedStyle(D.current).getPropertyValue("--cntrl-article-width").trim():"";return Ce&&(xe["--cntrl-article-width"]=Ce),xe})(),_=!n||i||o,le=s.useMemo(()=>uv(c),[c]),Q=t??[],be=Q.length%U||U,Le=be<U&&Q.length>0,ye=Q.length-be,ce=Le?Math.floor((U-be)/2)+1:1,Y=s.useMemo(()=>xv(Q),[Q]),se=s.useMemo(()=>Cv(Q),[Q]),pe=(xe,Ce,h)=>{if(n&&!o&&!i)return;const K=Y.findIndex(ne=>ne.gridIndex===xe);if(K<0)return;const Z=Y[K];N(K),X(Z.items),q(Ce),O(Z.entry),ie(h??null),T(!0)},fe=s.useCallback(()=>{T(!1),ie(null)},[]),we=s.useCallback(()=>{const xe=Y[k];return!xe||!D.current?j:vv(D.current,xe.gridIndex,x?"cover":"contain")??j},[Y,k,j,x]),Re=s.useCallback(xe=>{if(Y.length>1){const Ce=Y.length,h=(k+xe+Ce)%Ce,K=Y[h],Z=Math.min(w,K.items.length-1);N(h),X(K.items),q(Z),O(K.entry);return}q(Ce=>(Ce+xe+C.length)%C.length)},[Y,k,w,C.length]),ge=Y.length>1||C.length>1;return s.useEffect(()=>{if(!A||typeof document>"u")return;const xe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=xe}},[A]),s.useEffect(()=>{!n||o||i||T(!1)},[n,o,i]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:le}}),a.jsx(Tv,{mediaList:se}),a.jsx("div",{ref:D,className:`${c}-wrapper ${c}-align-entries ${c}-image-align-${p}`.trim(),style:{gridTemplateColumns:`repeat(${U}, ${B})`,rowGap:0,columnGap:P,width:R.scalingValue(d.wrapperWidth??0,n),[`--${c}-align-entries-row-gap`]:R.scalingValue(u??0,n)},children:Q.map((xe,Ce)=>{const h=Ml(xe.gallery),K=Al(h),Z=K.filter(te=>te.lightboxMedia).map(te=>te.lightboxMedia),ne=Math.floor(Ce/U)===Math.ceil(Q.length/U)-1,de=Le&&Ce>=ye?`${ce+(Ce-ye)}`:void 0,z=K[0],I=z!=null&&z.lightboxMedia?Z.findIndex(te=>te.url===z.lightboxMedia.url):-1,ee=a.jsx("div",{className:`${c}-item-image-wrapper`,style:$,children:K.length>0&&a.jsx(Ev,{media:z.displayMedia,gridIndex:Ce,className:`${c}-item-${Do(z.displayMedia)?"video":"image"}`.trim(),style:L,onMediaClick:_&&I>=0?te=>pe(Ce,I,qu(te.currentTarget,x?"cover":"contain")):void 0})});return a.jsx("div",{className:`${c}-item`,children:a.jsxs("div",{className:[o?`${c}-item-inner`:`${c}-item-inner-hidden`,ne?`${c}-item-inner-last-row`:""].filter(Boolean).join(" "),style:{width:B,...de?{gridColumn:de}:{}},children:[a.jsx("div",{className:`${c}-item-title-row`,children:a.jsx("div",{style:{height:0,width:V}})}),a.jsx("a",{className:`${c}-item-image-link`,children:ee}),a.jsx("div",{className:`${c}-item-subtitle-row`,children:a.jsx("div",{style:{height:0,width:V}})})]})},Ce)})}),A&&typeof document<"u"&&(()=>{const xe=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:oe,"data-selection":"none",children:a.jsx(Av,{prefix:c,items:C,index:w,entry:ae,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ge,lightboxEntries:Y,entryIdx:k,layoutId:r,sourceRect:j,resolveCloseSourceRect:we,onClose:fe,onPrev:()=>Re(-1),onNext:()=>Re(1)})}),xe)})()]})}const Nv=`import { CommonComponentProps } from '../props';
7631
7625
  import { scalingValue, useScopedStyles } from '../utils/index';
7632
7626
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
7633
7627
  import { createPortal } from 'react-dom';
@@ -9970,7 +9964,7 @@ export function Hive({
9970
9964
  </>
9971
9965
  );
9972
9966
  }
9973
- `,_v="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Fi={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 Hv(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Ro=Li.filter(e=>e!=="count"),Wv=Ro.reduce((e,t)=>({...e,...Hv(t)}),{}),Ov=Ro.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function os(e){return Ro.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const Dv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Ro.map(e=>[kl[e],El(e)]))},zv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Bv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...zv,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),jv={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},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"}},gallery:{type:"array",label:"Gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Bv},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},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"}},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"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Wv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:_v,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Ov},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...os({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...os({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...os({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Dv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Vv={element:Fv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Ro.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Ro.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:jv,sourceCode:Nv};function Gv(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 Xv({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function rs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qv(e){return String(e??"").trim().length>0}function kc(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 Ec(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 Mc(e,t,n,i,o,r,l){const c=F.scalingValue(r,l),d=F.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function Uv(e,t,n){const i=F.scalingValue(t,n),o=F.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ac=10,Fc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Kv(e,t,n){return Math.max(t,Math.min(n,e))}function as(e,t,n){return e+(t-e)*n}function Yv(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Ac,y:n.clientY+Ac};switch(e){case"left":return{x:o.left+Fc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Fc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function Zv(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,g=i.current;m&&(m.style.transform=`translate3d(${g.x}px, ${g.y}px, 0) translate(-50%, -50%) rotate(${g.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=as(m.x,m.targetX,Ko.positionEase),m.y=as(m.y,m.targetY,Ko.positionEase),m.rotation=as(m.rotation,m.targetRotation,Ko.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const g=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,x=Math.abs(m.rotation-m.targetRotation)<.08;!g||!x?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,g)=>{const x=i.current;x.targetX=m,x.targetY=g,x.targetRotation=0,x.x=m,x.y=g,x.rotation=0,x.lastX=m,x.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,g)=>{if(!e)return;const x=i.current;if(t&&x.hasLastX){const b=m-x.lastX;x.targetRotation=Kv(b*Ko.rotationFactor,-20,Ko.maxRotation)}else x.targetRotation=0;if(x.lastX=m,x.hasLastX=!0,x.targetX=m,x.targetY=g,t){d();return}x.x=m,x.y=g,x.rotation=x.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),v=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||v(),l),[e,v,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:v}}function Jv(e){return`
9967
+ `,_v="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Fi={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 Hv(e){const t={};return t[xt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[xt(e,"fontSettings")]={...Fi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[xt(e,"fontSize")]={...Fi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[xt(e,"lineHeight")]={...Fi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[xt(e,"letterSpacing")]={...Fi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[xt(e,"wordSpacing")]={...Fi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[xt(e,"textAlign")]={...Fi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[xt(e,"textAppearance")]={...Fi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Io=Li.filter(e=>e!=="count"),Wv=Io.reduce((e,t)=>({...e,...Hv(t)}),{}),Ov=Io.reduce((e,t)=>({...e,[xt(t,"fontFamily")]:"Arial",[xt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[xt(t,"letterSpacing")]:0,[xt(t,"wordSpacing")]:0,[xt(t,"textAlign")]:"left",[xt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function os(e){return Io.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[xt(n,"fontSize")]=i),o!==void 0&&(t[xt(n,"lineHeight")]=o),t},{})}const Dv={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Io.map(e=>[kl[e],El(e)]))},zv={title1:"NASA",title2:"Ames Research Center",title3:"Archive Footage"},Bv=(()=>{const e=[];for(let t=1;t<=24;t+=1)e.push({...zv,gallery:[{media:[{url:`https://cdn.cntrl.site/component-assets/hive_${t}.jpg`,name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]});return e})(),jv={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},title3:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"gallery",max:1,display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:Bv},settings:{sizing:"auto auto",properties:{gridLayout:{type:"grid-layout",scope:"layout",display:{type:"grid-layout"},gridParams:{type:"object",properties:{columnsCount:{type:"number",title:"Columns",min:1,max:9999,display:{type:"numeric-input"}},wrapperWidth:{type:"number",title:"Width",min:0},entryWidth:{type:"number",title:"Entry",min:0},horizontalGap:{type:"number",title:"Gutter",min:0}}}},verticalGap:{type:"number",scope:"layout",title:"Vertical Gap",display:{type:"numeric-input"},min:0,max:1e3},align:{type:"string",scope:"layout",title:"Align",display:{type:"toggle-cycle",enum:["top","center","bottom"]}},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"}}},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"}},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"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},...Wv},defaults:{imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},align:"top",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:_v,closeIconColor:"#000000",closeIconHoverColor:"#999999",...Ov},layoutDefaults:{m:{gridLayout:{entryWidth:.37837,horizontalGap:.081,wrapperWidth:1,columnsCount:2,lockedParam:"wrapperWidth"},verticalGap:.081,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,...os({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{gridLayout:{entryWidth:.10416,horizontalGap:.013,wrapperWidth:1,columnsCount:8,lockedParam:"wrapperWidth"},verticalGap:.013,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.039,iconMarginRight:.026,...os({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})},d:{gridLayout:{entryWidth:.06944,horizontalGap:.006944,wrapperWidth:1,columnsCount:12,lockedParam:"wrapperWidth"},verticalGap:.00694,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,...os({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})}},displayRules:[{if:{name:"imageDisplay.display",value:"cover"},then:{name:"properties.align.display.enabled",value:!1}}],layout:["__componentName__","gridLayout","verticalGap","align","imageDisplay","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:[{type:"group",title:"",items:["gridLayout"]}]},{type:"row",title:"",items:["verticalGap"]},{type:"row",title:"",items:["imageDisplay","align"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[Dv]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]}},Vv={element:Fv,id:"hive",name:"Catalogue",category:"grids",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/hive.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...Io.map(e=>({path:`${xt(e,"fontFamily")}`}))]},fontRelations:{...Io.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${xt(t,"fontFamily")}`}),{})},schema:jv,sourceCode:Nv};function Gv(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 Xv({media:e,className:t,style:n}){const i=s.useRef(null);return s.useEffect(()=>{if(!e.isVideo)return;const o=i.current;if(!o)return;const r=o.play();r&&r.catch(()=>{})},[e.isVideo,e.url]),e.isVideo?a.jsx("video",{ref:i,className:t,src:e.url,style:n,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:t,src:e.url,alt:"",style:n})}function rs(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function qv(e){return String(e??"").trim().length>0}function kc(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 Ec(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 Mc(e,t,n,i,o,r,l){const c=R.scalingValue(r,l),d=R.scalingValue(0,l),u=e===0,p=e===t-1&&!o;return{borderTopWidth:u&&n?c:d,borderBottomWidth:!p||i?c:d}}function Uv(e,t,n){const i=R.scalingValue(t,n),o=R.scalingValue(0,n);return{borderTopWidth:o,borderBottomWidth:e?i:o}}const Ac=10,Fc=10,Ko={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Kv(e,t,n){return Math.max(t,Math.min(n,e))}function as(e,t,n){return e+(t-e)*n}function Yv(e,t,n,i){if(!t)return{x:0,y:0};const o=t.getBoundingClientRect(),r=o.top+o.height/2;if(e==="cursor"&&n)return{x:n.clientX+Ac,y:n.clientY+Ac};switch(e){case"left":return{x:o.left+Fc+i/2,y:r};case"center":return{x:o.left+o.width/2,y:r};case"right":return{x:o.right-Fc-i/2,y:r};default:return{x:o.left+o.width/2,y:r}}}function Zv(e,t){const n=s.useRef(null),i=s.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),o=s.useRef(null),r=s.useCallback(()=>{const m=n.current,g=i.current;m&&(m.style.transform=`translate3d(${g.x}px, ${g.y}px, 0) translate(-50%, -50%) rotate(${g.rotation.toFixed(3)}deg)`)},[]),l=s.useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)},[]),c=s.useCallback(()=>{const m=i.current;t?(m.x=as(m.x,m.targetX,Ko.positionEase),m.y=as(m.y,m.targetY,Ko.positionEase),m.rotation=as(m.rotation,m.targetRotation,Ko.rotationEase)):(m.x=m.targetX,m.y=m.targetY,m.rotation=m.targetRotation),r();const g=Math.abs(m.x-m.targetX)<.4&&Math.abs(m.y-m.targetY)<.4,v=Math.abs(m.rotation-m.targetRotation)<.08;!g||!v?o.current=requestAnimationFrame(c):o.current=null},[r,t]),d=s.useCallback(()=>{o.current===null&&(o.current=requestAnimationFrame(c))},[c]),u=s.useCallback((m,g)=>{const v=i.current;v.targetX=m,v.targetY=g,v.targetRotation=0,v.x=m,v.y=g,v.rotation=0,v.lastX=m,v.hasLastX=!0,r(),t&&d()},[r,t,d]),p=s.useCallback((m,g)=>{if(!e)return;const v=i.current;if(t&&v.hasLastX){const b=m-v.lastX;v.targetRotation=Kv(b*Ko.rotationFactor,-20,Ko.maxRotation)}else v.targetRotation=0;if(v.lastX=m,v.hasLastX=!0,v.targetX=m,v.targetY=g,t){d();return}v.x=m,v.y=g,v.rotation=v.targetRotation,r()},[e,r,t,d]),y=s.useCallback(m=>{l(),i.current.hasLastX=!1,m==null||m()},[l]),x=s.useCallback(()=>{l(),i.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},n.current&&(n.current.style.transform="")},[l]);return s.useEffect(()=>(e||x(),l),[e,x,l]),{anchorRef:n,onShow:u,onCursorMove:p,exit:y,reset:x}}function Jv(e){return`
9974
9968
  .${e}-wrapper {
9975
9969
  display: grid;
9976
9970
  align-items: start;
@@ -10346,10 +10340,10 @@ a.${e}-list-item {
10346
10340
  overflow-wrap: anywhere;
10347
10341
  word-break: break-word;
10348
10342
  }
10349
- `}const Pi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Fl=["AColumn","BColumn","CColumn","DColumn","EColumn"],oi="cutLabel",vr=[...Fl,oi],Wa=["A","B","C","D","E"];function Zu(e){return`${e}ColumnVerticalAlign`}const js=["Top","Center","Bottom"];function Nl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Wa.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Qv(e){const t=Nl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function e0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Wa.includes(n)?n:null}function Ju(e,t,n){const i=e0(e);return i?i===t?!1:Qv(n[Zu(i)]):!0}function xr(e){const t=Nl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Wa.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function t0(e,t,n){if(Qu(e,t,n))return xr(e);const i=xr(e);return i.kind==="baseline"?{kind:"top"}:i}function n0(e){const t=xr(e);return t.kind==="baseline"?{kind:"top"}:t}function Qu(e,t,n){return Ju(e,n,t)?xr(e).kind==="baseline":!1}function i0(e){const t={};let n=!1;for(const i of Wa){const o=Zu(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Ju(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function o0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function r0(e){const t=xr(e).kind;return t==="baseline"?"center":t}function a0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Nc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function s0(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(),r=o-i;return n.remove(),r}function ss(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=s0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function l0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function c0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const d0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function qt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const u0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function p0(e){return[qt(e,"textFontFamily"),qt(e,"textFontSettings"),{type:"row",items:[qt(e,"textFontSize"),qt(e,"textLineHeight"),qt(e,"textLetterSpacing"),qt(e,"textWordSpacing")]},qt(e,"textTextAlign"),qt(e,"textTextAppearance"),`${e}VerticalAlign`]}function m0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(vr.map(e=>[u0[e],p0(e)]))}}function xa(e,t){const n=i=>{const o=qt(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===oi?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function _c(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 dn(Qt(n,t))}function Hc(e,t,n,i){const o=xa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Wc(e,t,n,i){const o=xa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:F.scalingValue((r-l)/2,i)}}const In=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ko=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],Eo=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Mo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],g0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},h0=["hover","focus","filled","success","error"],Oc=.004,uo=.004,ls=uo,_l=50,br=1440,Sr=_l/br;function ep(e){const t=typeof e=="number"&&e>0?e:br;return _l/t}function f0(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 br}const tp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function y0(e,t=1){const n=t/e;return Object.fromEntries(In.map(i=>[i,n]))}function v0(){return Object.fromEntries([...ko.map(e=>[e,0]),...Eo.map(e=>[e,0])])}function x0(){return Object.fromEntries(Mo.map(e=>[e,0]))}function Dr(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:tp[t]]))}function np(e,t,n){const i=e-Sr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ca(e,t,n){const i=Hl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function b0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=ko[o],l=Eo[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=np(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Hl(e,t,n){if(e<=0)return[];const i=In.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+Sr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-Sr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function S0(e,t,n){if(e<=1)return{};const i=Hl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=In[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Dc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pi]}function w0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function $0(e,t,n,i){const o=Math.min(i,e.length,In.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=In[d],p=ko[d],y=Eo[d],v=Mo[d],m=In[l],g=ko[l],x=Eo[l],b=Mo[l],k=n[u],f=n[p],S=n[y],W=n[v];typeof k=="number"&&(r[m]=k),typeof f=="number"&&(r[g]=f),typeof S=="number"&&(r[x]=S),typeof W=="number"&&(r[b]=W)}return r}function ip(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 C0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...y0(n,o),...v0()};if(r)for(const c of Mo)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,x0());return ip(e,l)?l:e}function T0(e,t,n){const i=i0(e);i&&(e={...e,...i});const o=ep(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Pi.length,y=S=>{if(u)return S;const W=Dr({...t,...S}),U=lr(S),B=ca(p,U,W),P=b0(p,B,{...t,...S});return Object.keys(P).length===0?S:{...S,...P}};if(typeof r=="number"&&r!==l)return e;const v=Dc(e),m=Dc(t);if(!w0(v,m))return y({...e,...$0(v,m,t,p)});if(c<d&&typeof p=="number"&&!u){const S=Dr({...t,...e});return y({...e,...S0(p,c,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,W=Math.max(0,(c-o)/2);return S>W?{...e,textPaddingLR:W}:e}const g=Dr({...t,...e}),x=ca(p,d,Dr(t)),k=ca(p,c,g).some((S,W)=>S<(x[W]??S)),f=In.some(S=>{const W=e[S],U=t[S];return typeof W=="number"&&typeof U=="number"&&W!==U});return k||f?y(e):e}function L0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(Sr,i-o-r-Sr)}function P0(e,t){return Math.random()*(t-e)+e}function I0(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:tp[t]]))}function cs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function R0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=ko[c],u=Eo[c],p=Mo[c];return{key:l,textPrefix:d0[l],widthKey:In[c],width:n[In[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function k0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=F.useScopedStyles(),p=!!o,{columns:y,type:v,wrapperWidth:m,entriesCount:g,cellMinHeight:x,dividerWidth:b,showVisibility:k,cut:f,showCut:S,cutCellMinHeight:W,cutLabel:U,imageSize:B,imageOnHover:P,imagePosition:_="cursor",imageInterpolation:G="on",entryHoverEffect:$,entryHoverShowOption:L,rowPaddingTop:D,rowPaddingBottom:E,rowPaddingTopB:T,columnsOrder:C,textPaddingLR:V,textColor:w,backgroundColor:q,dividerColor:I,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie}=e,[ae,O]=s.useState(void 0),[oe,N]=s.useState(null),le=s.useRef(null),Q=P==="on"&&(!n||i),be=_==="cursor",Pe=be&&G==="on",{anchorRef:ye,onShow:ce,onCursorMove:Y,exit:se}=Zv(!!(Q&&oe!==null),Pe),pe=(f??0)>0,fe=v==="b",we=s.useRef(null),Re=s.useRef(null),[ge,xe]=s.useState(null),[Ce,h]=s.useState(br),K=ep(Ce),Z=Math.max(0,((m??0)-K)/2),ne=Math.min(V??0,Z),de=Math.max(ne,uo),z=((m??0)+K)/2;s.useLayoutEffect(()=>{if(!n){h(br);return}const Me=()=>{h(f0(we.current))};Me();const Qe=we.current;if(!Qe)return;const rt=new ResizeObserver(Me);rt.observe(Qe);let dt=Qe;for(;dt&&!dt.style.getPropertyValue("--cntrl-article-width");)dt=dt.parentElement;return dt&&rt.observe(dt),()=>rt.disconnect()},[n,l]),s.useEffect(()=>{O(void 0)},[f,S,t,g]),s.useEffect(()=>{n&&!i&&O(void 0)},[n,i]);const R=F.buildColorVars(u,{textColor:w,backgroundColor:q,dividerColor:I,textHoverColor:A,backgroundHoverColor:j,dividerHoverColor:ie},g0,h0),ee=r&&r!=="default"?`${u}-state-${r}`:"",me=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ee}`.trim(),X=$==="reveal"&&(!n||i),Ie=(k==null?void 0:k[0])??!1,Se=(k==null?void 0:k[1])??!1,J=s.useRef(e),He=s.useRef(l);s.useEffect(()=>{if(!d||!n){J.current=e,He.current=l;return}if(He.current!==l){J.current=e,He.current=l;return}const Me=J.current;if(!(Me!==e))return;if(typeof Me.columns=="number"&&typeof e.columns=="number"&&Me.columns!==e.columns){J.current=e;return}const rt=T0(e,Me,{designWidth:Ce});J.current=e,ip(e,rt)&&d(rt)},[e,d,n,l,Ce]);const We=s.useMemo(()=>I0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ot=s.useMemo(()=>cs(e,ko),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>cs(e,Eo),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),tt=s.useMemo(()=>cs(e,Mo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),et=s.useMemo(()=>Array.isArray(C)&&C.length>0?C:[...Pi],[C]),Ge=s.useMemo(()=>R0(et,y,We,ot,qe,tt),[et,y,We,ot,qe,tt]),ve=lr(e),_e=s.useMemo(()=>In.slice(0,y).map(Me=>We[Me]),[y,We]),Be=s.useMemo(()=>Hl(y,ve,We),[y,ve,We]),Ze=s.useMemo(()=>ca(y,ve,We),[y,ve,We]),$e=s.useMemo(()=>Ge.map((Me,Qe)=>np(Ze[Qe]??0,Me.paddingLeft,Me.paddingRight)),[Ge,Ze]),Ne=s.useMemo(()=>{const Me=g===0?1/0:g;return(t??[]).slice(0,Me).map((rt,dt)=>({id:dt,cells:Object.fromEntries(Pi.map(Pt=>[Pt,rt[Pt]??""])),image:rt.image,link:rt.link}))},[t,g]),Ue=pe?ae??f:Ne.length,Je=s.useMemo(()=>pe?Ne.slice(0,Ue):Ne,[Ne,pe,Ue]),st=pe&&Ue<Ne.length,it=Je.length>1||st,Oe=[Ie?`${u}-divider-top`:"",Se||it?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Ae=!n||i,gt=()=>{if(!Ae)return;const Me=ae??f;if(!S){O(Ne.length);return}O(Math.min(Me+S,Ne.length))},ze=Me=>F.scalingValue(Me,n??!1),De=fe?T??0:D??0,Xe=E??0,ct=x??0,he=Math.max(Xe,ls),Ee=Mc(0,Je.length,Ie,Se,st,b??0,n??!1).borderTopWidth,nt=fe?"rowPaddingTopB":"rowPaddingTop",pt=Ge[0],Ve=Ge[Ge.length-1],vt=$e[0],Rt=$e[$e.length-1],At=pt&&vt?Math.max(vt.paddingLeft,uo):0,wt=Ve&&Rt?Math.max(Rt.paddingRight,uo):0,Vt=ve,jt=(Me,Qe)=>Yv(_,we.current,be?Me:null,Qe),Kt=(Me,Qe)=>{if(!Q)return;const rt=Me.image;if(!(rt!=null&&rt.url)){se(()=>N(null));return}const dt=(B==null?void 0:B.min)??80,Pt=(B==null?void 0:B.max)??320,St=(oe==null?void 0:oe.rowId)===Me.id,ht=St?oe.widthPx:P0(dt,Pt),{x:Wt,y:Tt}=jt(Qe,ht);if(St&&be){Y(Wt,Tt);return}N({rowId:Me.id,url:rt.url,objectFit:"contain",isVideo:Gv(rt),widthPx:ht}),le.current={x:Wt,y:Tt}},Yt=Me=>{if(!Q||!oe||!be)return;const{x:Qe,y:rt}=jt(Me,oe.widthPx);Y(Qe,rt)},kt=()=>{oe&&se(()=>N(null))},Bt=Me=>{X&&kc(Me,u),!(!Q||!oe)&&se(()=>N(null))},rn=Me=>{X&&Ec(Me,u)};s.useLayoutEffect(()=>{if(!oe||!le.current)return;const{x:Me,y:Qe}=le.current;le.current=null,ce(Me,Qe)},[oe==null?void 0:oe.rowId,oe==null?void 0:oe.url,ce]),s.useLayoutEffect(()=>{if(!p||fe){xe(null);return}const Me=Re.current,Qe=Me==null?void 0:Me.parentElement;if(!Me||!Qe){xe(null);return}const rt=()=>{const Pt=Me.querySelector("[data-list-row]");if(!Pt){xe(null);return}const St=Qe.getBoundingClientRect(),ht=Pt.getBoundingClientRect();xe(ht.top-St.top+ht.height/2)};rt();const dt=new ResizeObserver(rt);return dt.observe(Me),dt.observe(Qe),()=>dt.disconnect()},[p,fe,Je,De,Xe,ct,t,e,Ge,Ze,Ce,b,Ie,Se,st]);const xt=s.useMemo(()=>!fe&&Fl.some(Me=>{const Qe=Me.charAt(0),rt=e[`${Me}VerticalAlign`];return Qu(rt,e,Qe)}),[fe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Wt;const Me=we.current;if(!Me)return;const Qe=()=>{Me.querySelectorAll("[data-list-col]").forEach(Tt=>{Tt.style.transform="";const Ot=Tt.querySelector(`.${u}-list-col`);Ot&&(Ot.style.minHeight="",Ot.style.height="");const Gt=Tt.querySelector(`.${u}-list-col-title`);Gt&&(Gt.style.transform="")})};if(fe||!xt){Qe();return}const rt=()=>{const Tt=Array.from(Me.querySelectorAll("[data-list-row]")),Ot=`${u}-list-col`,Gt=`${u}-baseline-probe`;Tt.forEach(Mt=>{Mt.querySelectorAll("[data-list-col]").forEach(_t=>{_t.style.transform="";const Ft=_t.querySelector(`.${Ot}`);Ft&&(Ft.style.minHeight="",Ft.style.height="");const ut=_t.querySelector(`.${u}-list-col-title`);ut&&(ut.style.transform="")})}),Tt.forEach(Mt=>{const _t=Array.from(Mt.querySelectorAll("[data-list-col]"));l0(Mt,_t,Ot)}),Me.offsetHeight,Tt.forEach(Mt=>{const _t=Array.from(Mt.querySelectorAll("[data-list-col]")),Ft=Mt.getBoundingClientRect().top,ut=new Map,H=_t.map(Fe=>{const ft=Fe.querySelector(`.${u}-list-col-title`),Ht={el:Fe,titleEl:ft,letter:Fe.getAttribute("data-col-letter")??"",kind:Fe.getAttribute("data-valign")??"top",anchor:Fe.getAttribute("data-valign-anchor")};return ut.set(Ht.letter,Ht),Ht}),Le=new Map,je=(Fe,ft)=>{const Ht=Le.get(Fe.letter);if(Ht!==void 0)return Ht;const mt=Fe.anchor?ut.get(Fe.anchor):void 0;if(Fe.kind!=="baseline"||!mt||ft.has(Fe.letter)){const ln=ss(Fe,Ft,Ot,Gt);return Le.set(Fe.letter,ln),ln}ft.add(Fe.letter);const Lt=je(mt,ft);ft.delete(Fe.letter);const Ut=ss(Fe,Ft,Ot,Gt),Dt=Lt-Ut;c0(Fe.titleEl,Dt);const an=ss(Fe,Ft,Ot,Gt);return Le.set(Fe.letter,an),an};H.forEach(Fe=>je(Fe,new Set))})};let dt=null;const Pt=()=>{dt===null&&(dt=requestAnimationFrame(()=>{dt=null,rt()}))};rt();const St=new ResizeObserver(()=>Pt());St.observe(Me);let ht=!1;return typeof document<"u"&&((Wt=document.fonts)!=null&&Wt.ready)&&document.fonts.ready.then(()=>{ht||Pt()}),()=>{ht=!0,dt!==null&&(cancelAnimationFrame(dt),dt=null),St.disconnect(),Qe()}},[xt,fe,e,t,Ce,Je,Ze]);const yt=s.useMemo(()=>Jv(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:yt}}),a.jsx("div",{style:R,children:a.jsxs("div",{ref:we,className:`${u}-wrapper ${me}${Oe?` ${Oe}`:""}${fe?` ${u}-type-b`:""}`.trim(),style:{width:F.scalingValue(m??0,n)},onMouseMove:Q?Yt:void 0,onMouseLeave:Q?kt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Je.map((Me,Qe)=>{var St;const rt=(((St=Me.link)==null?void 0:St.length)??0)>0,dt=rt&&(!n||i)?"a":"div",Pt=Mc(Qe,Je.length,Ie,Se,st,b??0,n??!1);return a.jsxs(dt,{ref:Qe===0?ht=>{Re.current=ht}:void 0,className:`${u}-list-item${rt||L==="always"?` ${u}-list-item-has-link`:""}${st&&Qe===Je.length-1?` ${u}-list-item-before-cut`:""}`,...rt?{href:Me.link,target:"_blank"}:{},style:Pt,onMouseEnter:ht=>{X&&(rt||L==="always")&&kc(ht,u),Q&&Kt(Me,ht)},onMouseLeave:ht=>{X&&(rt||L==="always")&&Ec(ht,u)},children:[De>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(De)}}),a.jsxs("div",{className:`${u}-list-cols-row${fe?"":` ${u}-list-cols-row-h`}${p&&Qe===0&&fe?` ${u}-list-cols-row-controls`:""}`,...fe?{}:{"data-list-row":""},style:fe?void 0:{minHeight:ze(ct)},children:[Ge.map((ht,Wt)=>{const Tt=Wt===Ge.length-1,Ot=$e[Wt],Gt=ht.paddingBottom,Mt=qv(Me.cells[ht.key]),_t=fe&&Mt&&Gt>0,Ft=fe?{minHeight:ze(ct)}:{width:ze(Ze[Wt])},ut=fe?{paddingLeft:ze(ne),paddingRight:ze(ne)}:{paddingLeft:ze(Ot.paddingLeft),paddingRight:ze(Ot.paddingRight)},H=ht.textPrefix.charAt(0),Le=fe?n0(e[`${ht.textPrefix}VerticalAlign`]):t0(e[`${ht.textPrefix}VerticalAlign`],e,H),je=fe&&Mt&&p&&Qe===0;return fe&&!Mt?null:a.jsxs("div",{className:fe?`${u}-list-col-wrap`:void 0,...fe?{}:{"data-list-col":"","data-col-letter":H,"data-valign":Le.kind,...Le.kind==="baseline"?{"data-valign-anchor":Le.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Tt?` ${u}-list-col-last`:""}`,style:{...ut,...Ft,...fe?{justifyContent:Nc(Le.kind)}:{}},"data-test":ht.width,children:a.jsx("span",{className:Hc(e,ht.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{..._c(xa(e,ht.textPrefix),n),...Wc(e,ht.textPrefix,u,n),...fe?{}:o0(Le.kind)},children:Me.cells[ht.key]??null})}),_t&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Gt)}}),je&&a.jsx("div",{"data-controls":ht.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ze(Math.max(Gt,ls))}})]},ht.key)}),p&&Qe===0&&fe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:ze(de),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:ze(Math.max(de,ve-de)),width:ze(de),height:"100%"}})]})]}),!fe&&Xe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Xe)}}),p&&Qe===0&&!fe&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ze(he)}})]},Me.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":nt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":fe?"center":"left-y",className:`${u}-control-anchor`,style:{top:Ee,left:0,width:"100%",height:ze(Math.max(De,ls))}})},"row-padding-handles"),p&&!fe&&pt&&Ve&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":pt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((vt==null?void 0:vt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:ze(At),height:"100%"}}),a.jsx("div",{"data-controls":Ve.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[Ge.length-1]-((Rt==null?void 0:Rt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(Vt-wt),width:ze(wt),height:"100%"}})]},"column-edge-padding-handles"),p&&!fe&&Ge.slice(0,-1).map((Me,Qe)=>{const rt=Ge[Qe+1],dt=Be.slice(0,Qe+1).reduce((Tt,Ot)=>Tt+Ot,0),Pt=$e[Qe],St=$e[Qe+1],ht=Math.max(Pt.paddingRight,uo),Wt=Math.max(St.paddingLeft,uo);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Me.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[Qe]-Pt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(dt-ht),width:ze(ht),height:"100%"}}),a.jsx("div",{"data-controls":rt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[Qe+1]-St.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(dt),width:ze(Wt),height:"100%"}})]},`${Me.paddingRightKey}-padding`)}),p&&!fe&&Ge.slice(0,-1).map((Me,Qe)=>{const rt=L0(Qe,Be,_e,ve),Pt=Be.slice(0,Qe+1).reduce((St,ht)=>St+ht,0)-Oc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Me.widthKey,"data-controls-axis":"x","data-controls-min":String(_l),"data-controls-max-fraction":String(rt),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ze(Pt),width:ze(Oc),height:"calc(100%)",pointerEvents:"auto"}})},`${Me.widthKey}-junction`)})]}),st&&(()=>{const Me=xa(e,oi),Qe=r0(e.cutLabelVerticalAlign),rt=Me.textTextAlign==="justify"||fe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:ze(W??0),cursor:Ae?"pointer":"default",...Uv(Se,b??0,n??!1)},onClick:Ae?gt:void 0,onMouseEnter:X||Q?Bt:void 0,onMouseLeave:X?rn:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...fe?{paddingLeft:ze(ne),paddingRight:ze(ne)}:{},justifyContent:a0(Me.textTextAlign),alignItems:Nc(Qe)},children:a.jsx("span",{className:Hc(e,oi,`${u}-cut-label`,`${u}-text-tight-leading`),style:{..._c(Me,n),...Wc(e,oi,u,n),...rt?{width:"100%"}:{}},children:U})})})})(),Q&&oe&&typeof document<"u"&&(()=>{const Me=`${oe.widthPx}px`,Qe={width:Me,height:"auto",maxHeight:Me,objectFit:"contain"},rt=(c?document.getElementById(c):null)??document.body;return Gn.createPortal(a.jsx("div",{ref:ye,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(Xv,{media:oe,className:oe.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:Qe},`${oe.rowId}-${oe.url}`)}),rt)})()]})})]})}const E0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10343
+ `}const Pi=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Fl=["AColumn","BColumn","CColumn","DColumn","EColumn"],oi="cutLabel",vr=[...Fl,oi],Wa=["A","B","C","D","E"];function Zu(e){return`${e}ColumnVerticalAlign`}const js=["Top","Center","Bottom"];function Nl(e){const t=String(e??"Top").trim();if(t.toLowerCase().startsWith("baseline")){const i=t.slice(-1).toUpperCase();return Wa.includes(i)?`Baseline ${i}`:"Top"}const n=t.toLowerCase();return n==="center"?"Center":n==="bottom"?"Bottom":n==="top"?"Top":t}function Qv(e){const t=Nl(e);return t.toLowerCase().startsWith("baseline")?!1:t==="Top"||t==="Center"||t==="Bottom"}function e0(e){const t=String(e??"").trim();if(!t.toLowerCase().startsWith("baseline"))return null;const n=t.slice(-1).toUpperCase();return Wa.includes(n)?n:null}function Ju(e,t,n){const i=e0(e);return i?i===t?!1:Qv(n[Zu(i)]):!0}function xr(e){const t=Nl(e);if(t.toLowerCase().startsWith("baseline")){const n=t.slice(-1).toUpperCase();return Wa.includes(n)?{kind:"baseline",anchorLetter:n}:{kind:"top"}}return t==="Center"?{kind:"center"}:t==="Bottom"?{kind:"bottom"}:{kind:"top"}}function t0(e,t,n){if(Qu(e,t,n))return xr(e);const i=xr(e);return i.kind==="baseline"?{kind:"top"}:i}function n0(e){const t=xr(e);return t.kind==="baseline"?{kind:"top"}:t}function Qu(e,t,n){return Ju(e,n,t)?xr(e).kind==="baseline":!1}function i0(e){const t={};let n=!1;for(const i of Wa){const o=Zu(i),r=e[o];if(e.type==="b"){const l=String(r??"Top").trim();l!=="Top"&&l!=="Center"&&l!=="Bottom"&&(t[o]="Top",n=!0);continue}Ju(r,i,e)||(t[o]="Top",n=!0)}return n?t:null}function o0(e){return e==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:e==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function r0(e){const t=xr(e).kind;return t==="baseline"?"center":t}function a0(e){return e==="right"?"flex-end":e==="center"?"center":"flex-start"}function Nc(e){return e==="center"?"center":e==="bottom"?"flex-end":"flex-start"}function s0(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(),r=o-i;return n.remove(),r}function ss(e,t,n,i){const o=e.titleEl;if(!o)return 0;const r=o.closest(`.${n}`);if(!r)return 0;const l=s0(o,i);if(e.kind==="baseline")return o.getBoundingClientRect().top-t+l;const c=r.getBoundingClientRect(),d=o.getBoundingClientRect().height;let u=0;return e.kind==="center"?u=(c.height-d)/2:e.kind==="bottom"&&(u=c.height-d),c.top-t+u+l}function l0(e,t,n){const i=e.getBoundingClientRect().height;return i<=0?0:(t.forEach(o=>{const r=o.querySelector(`.${n}`);r&&(r.style.minHeight=`${i}px`,r.style.height=`${i}px`)}),i)}function c0(e,t){return!e||!t?(e&&(e.style.transform=""),0):(e.style.transform=`translateY(${t}px)`,t)}const d0={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function Xt(e,t){return`${e}${t.replace(/^text/,"Text")}`}const u0={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function p0(e){return[Xt(e,"textFontFamily"),Xt(e,"textFontSettings"),{type:"row",items:[Xt(e,"textFontSize"),Xt(e,"textLineHeight"),Xt(e,"textLetterSpacing"),Xt(e,"textWordSpacing")]},Xt(e,"textTextAlign"),Xt(e,"textTextAppearance"),`${e}VerticalAlign`]}function m0(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(vr.map(e=>[u0[e],p0(e)]))}}function xa(e,t){const n=i=>{const o=Xt(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===oi?"center":"left"),textTextAppearance:n("textTextAppearance"),textColor:e.textColor}}function _c(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 dn(Qt(n,t))}function Hc(e,t,n,i){const o=xa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l!==void 0&&l<r?`${n} ${i}`:n}function Wc(e,t,n,i){const o=xa(e,t),r=o.textFontSize??.01,l=o.textLineHeight;return l===void 0||l>=r?{}:{[`--${n}-title-leading-gap`]:R.scalingValue((r-l)/2,i)}}const In=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],Ro=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ko=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],Eo=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],g0={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},h0=["hover","focus","filled","success","error"],Oc=.004,co=.004,ls=co,_l=50,br=1440,Sr=_l/br;function ep(e){const t=typeof e=="number"&&e>0?e:br;return _l/t}function f0(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 br}const tp={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lr(e){const t=typeof e.wrapperWidth=="number"?e.wrapperWidth:1;return Math.max(0,t)}function y0(e,t=1){const n=t/e;return Object.fromEntries(In.map(i=>[i,n]))}function v0(){return Object.fromEntries([...Ro.map(e=>[e,0]),...ko.map(e=>[e,0])])}function x0(){return Object.fromEntries(Eo.map(e=>[e,0]))}function Dr(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:tp[t]]))}function np(e,t,n){const i=e-Sr,o=t+n;if(o<=0||o<=i)return{paddingLeft:t,paddingRight:n};if(i<=0)return{paddingLeft:0,paddingRight:0};const r=i/o;return{paddingLeft:t*r,paddingRight:n*r}}function ca(e,t,n){const i=Hl(e,t,n);if(e<=0)return[];const o=i.slice(0,e-1).reduce((r,l)=>r+l,0);return[...i.slice(0,e-1),Math.max(0,t-o)]}function b0(e,t,n){const i={};for(let o=0;o<e;o+=1){const r=Ro[o],l=ko[o],c=typeof n[r]=="number"?n[r]:0,d=typeof n[l]=="number"?n[l]:0,u=np(t[o]??0,c,d);u.paddingLeft!==c&&(i[r]=u.paddingLeft),u.paddingRight!==d&&(i[l]=u.paddingRight)}return i}function Hl(e,t,n){if(e<=0)return[];const i=In.slice(0,e).map(u=>n[u]);if(e===1)return i;const o=i.slice(0,e-1),l=o.reduce((u,p)=>u+p,0)+Sr;if(t>=l)return i;const c=[...o];let d=l-t;for(let u=c.length-1;u>=0&&d>0;u-=1){const p=c[u]-Sr;if(p<=0)continue;const y=Math.min(d,p);c[u]-=y,d-=y}return[...c,i[e-1]]}function S0(e,t,n){if(e<=1)return{};const i=Hl(e,t,n),o={};for(let r=0;r<e-1;r+=1){const l=In[r];i[r]!==n[l]&&(o[l]=i[r])}return o}function Dc(e){return Array.isArray(e.columnsOrder)&&e.columnsOrder.length>0?e.columnsOrder:[...Pi]}function w0(e,t){return e.length!==t.length?!1:e.every((n,i)=>n===t[i])}function $0(e,t,n,i){const o=Math.min(i,e.length,In.length),r={};for(let l=0;l<o;l+=1){const c=e[l],d=t.indexOf(c);if(d===-1)continue;const u=In[d],p=Ro[d],y=ko[d],x=Eo[d],m=In[l],g=Ro[l],v=ko[l],b=Eo[l],M=n[u],f=n[p],S=n[y],W=n[x];typeof M=="number"&&(r[m]=M),typeof f=="number"&&(r[g]=f),typeof S=="number"&&(r[v]=S),typeof W=="number"&&(r[b]=W)}return r}function ip(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 C0(e,t){const n=e.columns,i=t.columns;if(typeof n!="number"||n===i)return e;const o=lr(e),r=e.type==="b"||e.type===void 0&&t.type==="b",l={...e,...y0(n,o),...v0()};if(r)for(const c of Eo)typeof t[c]=="number"&&(l[c]=t[c]);else Object.assign(l,x0());return ip(e,l)?l:e}function T0(e,t,n){const i=i0(e);i&&(e={...e,...i});const o=ep(n==null?void 0:n.designWidth),r=e.columns,l=t.columns,c=lr(e),d=lr(t),u=e.type==="b"||e.type===void 0&&t.type==="b",p=typeof r=="number"?r:typeof l=="number"?l:Pi.length,y=S=>{if(u)return S;const W=Dr({...t,...S}),U=lr(S),B=ca(p,U,W),P=b0(p,B,{...t,...S});return Object.keys(P).length===0?S:{...S,...P}};if(typeof r=="number"&&r!==l)return e;const x=Dc(e),m=Dc(t);if(!w0(x,m))return y({...e,...$0(x,m,t,p)});if(c<d&&typeof p=="number"&&!u){const S=Dr({...t,...e});return y({...e,...S0(p,c,S)})}if(u){const S=typeof e.textPaddingLR=="number"?e.textPaddingLR:0,W=Math.max(0,(c-o)/2);return S>W?{...e,textPaddingLR:W}:e}const g=Dr({...t,...e}),v=ca(p,d,Dr(t)),M=ca(p,c,g).some((S,W)=>S<(v[W]??S)),f=In.some(S=>{const W=e[S],U=t[S];return typeof W=="number"&&typeof U=="number"&&W!==U});return M||f?y(e):e}function L0(e,t,n,i){const o=t.slice(0,e).reduce((l,c)=>l+c,0),r=n.slice(e+1,t.length-1).reduce((l,c)=>l+c,0);return Math.max(Sr,i-o-r-Sr)}function P0(e,t){return Math.random()*(t-e)+e}function I0(e){return Object.fromEntries(In.map(t=>[t,typeof e[t]=="number"?e[t]:tp[t]]))}function cs(e,t,n=0){return Object.fromEntries(t.map(i=>[i,typeof e[i]=="number"?e[i]:n]))}function R0(e,t,n,i,o,r){return e.slice(0,t).map((l,c)=>{const d=Ro[c],u=ko[c],p=Eo[c];return{key:l,textPrefix:d0[l],widthKey:In[c],width:n[In[c]],paddingLeftKey:d,paddingRightKey:u,paddingBottomKey:p,paddingLeft:i[d],paddingRight:o[u],paddingBottom:r[p]}})}function k0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r,layoutId:l,portalId:c,onUpdateSettings:d}){const{prefix:u}=R.useScopedStyles(),p=!!o,{columns:y,type:x,wrapperWidth:m,entriesCount:g,cellMinHeight:v,dividerWidth:b,showVisibility:M,cut:f,showCut:S,cutCellMinHeight:W,cutLabel:U,imageSize:B,imageOnHover:P,imagePosition:H="cursor",imageInterpolation:V="on",entryHoverEffect:$,entryHoverShowOption:L,rowPaddingTop:D,rowPaddingBottom:A,rowPaddingTopB:T,columnsOrder:C,textPaddingLR:X,textColor:w,backgroundColor:q,dividerColor:k,textHoverColor:N,backgroundHoverColor:j,dividerHoverColor:ie}=e,[ae,O]=s.useState(void 0),[oe,_]=s.useState(null),le=s.useRef(null),Q=P==="on"&&(!n||i),be=H==="cursor",Le=be&&V==="on",{anchorRef:ye,onShow:ce,onCursorMove:Y,exit:se}=Zv(!!(Q&&oe!==null),Le),pe=(f??0)>0,fe=x==="b",we=s.useRef(null),Re=s.useRef(null),[ge,xe]=s.useState(null),[Ce,h]=s.useState(br),K=ep(Ce),Z=Math.max(0,((m??0)-K)/2),ne=Math.min(X??0,Z),de=Math.max(ne,co),z=((m??0)+K)/2;s.useLayoutEffect(()=>{if(!n){h(br);return}const Ae=()=>{h(f0(we.current))};Ae();const Qe=we.current;if(!Qe)return;const at=new ResizeObserver(Ae);at.observe(Qe);let mt=Qe;for(;mt&&!mt.style.getPropertyValue("--cntrl-article-width");)mt=mt.parentElement;return mt&&at.observe(mt),()=>at.disconnect()},[n,l]),s.useEffect(()=>{O(void 0)},[f,S,t,g]),s.useEffect(()=>{n&&!i&&O(void 0)},[n,i]);const I=R.buildColorVars(u,{textColor:w,backgroundColor:q,dividerColor:k,textHoverColor:N,backgroundHoverColor:j,dividerHoverColor:ie},g0,h0),ee=r&&r!=="default"?`${u}-state-${r}`:"",me=`${!n||i?$==="default"?`${u}-entry-hover-default`:$==="blinds"?`${u}-entry-hover-blinds`:$==="reveal"?`${u}-entry-hover-reveal`:"":""} ${ee}`.trim(),G=$==="reveal"&&(!n||i),Ie=(M==null?void 0:M[0])??!1,Se=(M==null?void 0:M[1])??!1,J=s.useRef(e),He=s.useRef(l);s.useEffect(()=>{if(!d||!n){J.current=e,He.current=l;return}if(He.current!==l){J.current=e,He.current=l;return}const Ae=J.current;if(!(Ae!==e))return;if(typeof Ae.columns=="number"&&typeof e.columns=="number"&&Ae.columns!==e.columns){J.current=e;return}const at=T0(e,Ae,{designWidth:Ce});J.current=e,ip(e,at)&&d(at)},[e,d,n,l,Ce]);const We=s.useMemo(()=>I0(e),[e.AColumnWidth,e.BColumnWidth,e.CColumnWidth,e.DColumnWidth,e.EColumnWidth]),ot=s.useMemo(()=>cs(e,Ro),[e.AColumnPaddingLeft,e.BColumnPaddingLeft,e.CColumnPaddingLeft,e.DColumnPaddingLeft,e.EColumnPaddingLeft]),qe=s.useMemo(()=>cs(e,ko),[e.AColumnPaddingRight,e.BColumnPaddingRight,e.CColumnPaddingRight,e.DColumnPaddingRight,e.EColumnPaddingRight]),tt=s.useMemo(()=>cs(e,Eo),[e.AColumnPaddingBottom,e.BColumnPaddingBottom,e.CColumnPaddingBottom,e.DColumnPaddingBottom,e.EColumnPaddingBottom]),et=s.useMemo(()=>Array.isArray(C)&&C.length>0?C:[...Pi],[C]),Ge=s.useMemo(()=>R0(et,y,We,ot,qe,tt),[et,y,We,ot,qe,tt]),ve=lr(e),_e=s.useMemo(()=>In.slice(0,y).map(Ae=>We[Ae]),[y,We]),je=s.useMemo(()=>Hl(y,ve,We),[y,ve,We]),Ze=s.useMemo(()=>ca(y,ve,We),[y,ve,We]),$e=s.useMemo(()=>Ge.map((Ae,Qe)=>np(Ze[Qe]??0,Ae.paddingLeft,Ae.paddingRight)),[Ge,Ze]),Ne=s.useMemo(()=>{const Ae=g===0?1/0:g;return(t??[]).slice(0,Ae).map((at,mt)=>({id:mt,cells:Object.fromEntries(Pi.map(Lt=>[Lt,at[Lt]??""])),image:at.image,link:at.link}))},[t,g]),Ue=pe?ae??f:Ne.length,Je=s.useMemo(()=>pe?Ne.slice(0,Ue):Ne,[Ne,pe,Ue]),st=pe&&Ue<Ne.length,it=Je.length>1||st,Oe=[Ie?`${u}-divider-top`:"",Se||it?`${u}-divider-bottom`:""].filter(Boolean).join(" "),Fe=!n||i,ut=()=>{if(!Fe)return;const Ae=ae??f;if(!S){O(Ne.length);return}O(Math.min(Ae+S,Ne.length))},ze=Ae=>R.scalingValue(Ae,n??!1),De=fe?T??0:D??0,Xe=A??0,pt=v??0,he=Math.max(Xe,ls),Me=Mc(0,Je.length,Ie,Se,st,b??0,n??!1).borderTopWidth,nt=fe?"rowPaddingTopB":"rowPaddingTop",gt=Ge[0],Ve=Ge[Ge.length-1],yt=$e[0],It=$e[$e.length-1],At=gt&&yt?Math.max(yt.paddingLeft,co):0,St=Ve&&It?Math.max(It.paddingRight,co):0,Vt=ve,jt=(Ae,Qe)=>Yv(H,we.current,be?Ae:null,Qe),Ut=(Ae,Qe)=>{if(!Q)return;const at=Ae.image;if(!(at!=null&&at.url)){se(()=>_(null));return}const mt=(B==null?void 0:B.min)??80,Lt=(B==null?void 0:B.max)??320,bt=(oe==null?void 0:oe.rowId)===Ae.id,kt=bt?oe.widthPx:P0(mt,Lt),{x:Bt,y:lt}=jt(Qe,kt);if(bt&&be){Y(Bt,lt);return}_({rowId:Ae.id,url:at.url,objectFit:"contain",isVideo:Gv(at),widthPx:kt}),le.current={x:Bt,y:lt}},Kt=Ae=>{if(!Q||!oe||!be)return;const{x:Qe,y:at}=jt(Ae,oe.widthPx);Y(Qe,at)},Rt=()=>{oe&&se(()=>_(null))},zt=Ae=>{G&&kc(Ae,u),!(!Q||!oe)&&se(()=>_(null))},rn=Ae=>{G&&Ec(Ae,u)};s.useLayoutEffect(()=>{if(!oe||!le.current)return;const{x:Ae,y:Qe}=le.current;le.current=null,ce(Ae,Qe)},[oe==null?void 0:oe.rowId,oe==null?void 0:oe.url,ce]),s.useLayoutEffect(()=>{if(!p||fe){xe(null);return}const Ae=Re.current,Qe=Ae==null?void 0:Ae.parentElement;if(!Ae||!Qe){xe(null);return}const at=()=>{const Lt=Ae.querySelector("[data-list-row]");if(!Lt){xe(null);return}const bt=Qe.getBoundingClientRect(),kt=Lt.getBoundingClientRect();xe(kt.top-bt.top+kt.height/2)};at();const mt=new ResizeObserver(at);return mt.observe(Ae),mt.observe(Qe),()=>mt.disconnect()},[p,fe,Je,De,Xe,pt,t,e,Ge,Ze,Ce,b,Ie,Se,st]);const vt=s.useMemo(()=>!fe&&Fl.some(Ae=>{const Qe=Ae.charAt(0),at=e[`${Ae}VerticalAlign`];return Qu(at,e,Qe)}),[fe,e,e.AColumnVerticalAlign,e.BColumnVerticalAlign,e.CColumnVerticalAlign,e.DColumnVerticalAlign,e.EColumnVerticalAlign]);s.useLayoutEffect(()=>{var Bt;const Ae=we.current;if(!Ae)return;const Qe=()=>{Ae.querySelectorAll("[data-list-col]").forEach(lt=>{lt.style.transform="";const Ht=lt.querySelector(`.${u}-list-col`);Ht&&(Ht.style.minHeight="",Ht.style.height="");const Yt=lt.querySelector(`.${u}-list-col-title`);Yt&&(Yt.style.transform="")})};if(fe||!vt){Qe();return}const at=()=>{const lt=Array.from(Ae.querySelectorAll("[data-list-row]")),Ht=`${u}-list-col`,Yt=`${u}-baseline-probe`;lt.forEach(Mt=>{Mt.querySelectorAll("[data-list-col]").forEach(Nt=>{Nt.style.transform="";const Ft=Nt.querySelector(`.${Ht}`);Ft&&(Ft.style.minHeight="",Ft.style.height="");const $t=Nt.querySelector(`.${u}-list-col-title`);$t&&($t.style.transform="")})}),lt.forEach(Mt=>{const Nt=Array.from(Mt.querySelectorAll("[data-list-col]"));l0(Mt,Nt,Ht)}),Ae.offsetHeight,lt.forEach(Mt=>{const Nt=Array.from(Mt.querySelectorAll("[data-list-col]")),Ft=Mt.getBoundingClientRect().top,$t=new Map,E=Nt.map(Ee=>{const ct=Ee.querySelector(`.${u}-list-col-title`),Wt={el:Ee,titleEl:ct,letter:Ee.getAttribute("data-col-letter")??"",kind:Ee.getAttribute("data-valign")??"top",anchor:Ee.getAttribute("data-valign-anchor")};return $t.set(Wt.letter,Wt),Wt}),Pe=new Map,Be=(Ee,ct)=>{const Wt=Pe.get(Ee.letter);if(Wt!==void 0)return Wt;const ht=Ee.anchor?$t.get(Ee.anchor):void 0;if(Ee.kind!=="baseline"||!ht||ct.has(Ee.letter)){const ln=ss(Ee,Ft,Ht,Yt);return Pe.set(Ee.letter,ln),ln}ct.add(Ee.letter);const Tt=Be(ht,ct);ct.delete(Ee.letter);const qt=ss(Ee,Ft,Ht,Yt),Ot=Tt-qt;c0(Ee.titleEl,Ot);const an=ss(Ee,Ft,Ht,Yt);return Pe.set(Ee.letter,an),an};E.forEach(Ee=>Be(Ee,new Set))})};let mt=null;const Lt=()=>{mt===null&&(mt=requestAnimationFrame(()=>{mt=null,at()}))};at();const bt=new ResizeObserver(()=>Lt());bt.observe(Ae);let kt=!1;return typeof document<"u"&&((Bt=document.fonts)!=null&&Bt.ready)&&document.fonts.ready.then(()=>{kt||Lt()}),()=>{kt=!0,mt!==null&&(cancelAnimationFrame(mt),mt=null),bt.disconnect(),Qe()}},[vt,fe,e,t,Ce,Je,Ze]);const ft=s.useMemo(()=>Jv(u),[u]);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:ft}}),a.jsx("div",{style:I,children:a.jsxs("div",{ref:we,className:`${u}-wrapper ${me}${Oe?` ${Oe}`:""}${fe?` ${u}-type-b`:""}`.trim(),style:{width:R.scalingValue(m??0,n)},onMouseMove:Q?Kt:void 0,onMouseLeave:Q?Rt:void 0,children:[a.jsxs("div",{style:{width:"100%",position:"relative"},children:[Je.map((Ae,Qe)=>{var bt,kt,Bt;const at=(((bt=Ae.link)==null?void 0:bt.value.length)??0)>0,mt=at&&(!n||i)?"a":"div",Lt=Mc(Qe,Je.length,Ie,Se,st,b??0,n??!1);return a.jsxs(mt,{ref:Qe===0?lt=>{Re.current=lt}:void 0,className:`${u}-list-item${at||L==="always"?` ${u}-list-item-has-link`:""}${st&&Qe===Je.length-1?` ${u}-list-item-before-cut`:""}`,...at?{href:(kt=Ae.link)==null?void 0:kt.value,target:((Bt=Ae.link)==null?void 0:Bt.target)==="blank"?"_blank":"_self"}:{},style:Lt,onMouseEnter:lt=>{G&&(at||L==="always")&&kc(lt,u),Q&&Ut(Ae,lt)},onMouseLeave:lt=>{G&&(at||L==="always")&&Ec(lt,u)},children:[De>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(De)}}),a.jsxs("div",{className:`${u}-list-cols-row${fe?"":` ${u}-list-cols-row-h`}${p&&Qe===0&&fe?` ${u}-list-cols-row-controls`:""}`,...fe?{}:{"data-list-row":""},style:fe?void 0:{minHeight:ze(pt)},children:[Ge.map((lt,Ht)=>{const Yt=Ht===Ge.length-1,Mt=$e[Ht],Nt=lt.paddingBottom,Ft=qv(Ae.cells[lt.key]),$t=fe&&Ft&&Nt>0,E=fe?{minHeight:ze(pt)}:{width:ze(Ze[Ht])},Pe=fe?{paddingLeft:ze(ne),paddingRight:ze(ne)}:{paddingLeft:ze(Mt.paddingLeft),paddingRight:ze(Mt.paddingRight)},Be=lt.textPrefix.charAt(0),Ee=fe?n0(e[`${lt.textPrefix}VerticalAlign`]):t0(e[`${lt.textPrefix}VerticalAlign`],e,Be),ct=fe&&Ft&&p&&Qe===0;return fe&&!Ft?null:a.jsxs("div",{className:fe?`${u}-list-col-wrap`:void 0,...fe?{}:{"data-list-col":"","data-col-letter":Be,"data-valign":Ee.kind,...Ee.kind==="baseline"?{"data-valign-anchor":Ee.anchorLetter}:{}},children:[a.jsx("div",{className:`${u}-list-col${Yt?` ${u}-list-col-last`:""}`,style:{...Pe,...E,...fe?{justifyContent:Nc(Ee.kind)}:{}},"data-test":lt.width,children:a.jsx("span",{className:Hc(e,lt.textPrefix,`${u}-list-col-title`,`${u}-text-tight-leading`),style:{..._c(xa(e,lt.textPrefix),n),...Wc(e,lt.textPrefix,u,n),...fe?{}:o0(Ee.kind)},children:Ae.cells[lt.key]??null})}),$t&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Nt)}}),ct&&a.jsx("div",{"data-controls":lt.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ze(Math.max(Nt,ls))}})]},lt.key)}),p&&Qe===0&&fe&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:0,width:ze(de),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${u}-control-anchor`,style:{top:0,left:ze(Math.max(de,ve-de)),width:ze(de),height:"100%"}})]})]}),!fe&&Xe>0&&a.jsx("div",{className:`${u}-row-padding-handle`,style:{height:ze(Xe)}}),p&&Qe===0&&!fe&&a.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${u}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:ze(he)}})]},Ae.id)}),p&&a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":nt,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":fe?"center":"left-y",className:`${u}-control-anchor`,style:{top:Me,left:0,width:"100%",height:ze(Math.max(De,ls))}})},"row-padding-handles"),p&&!fe&&gt&&Ve&&a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":gt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[0]-((yt==null?void 0:yt.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:0,width:ze(At),height:"100%"}}),a.jsx("div",{"data-controls":Ve.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[Ge.length-1]-((It==null?void 0:It.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(Vt-St),width:ze(St),height:"100%"}})]},"column-edge-padding-handles"),p&&!fe&&Ge.slice(0,-1).map((Ae,Qe)=>{const at=Ge[Qe+1],mt=je.slice(0,Qe+1).reduce((lt,Ht)=>lt+Ht,0),Lt=$e[Qe],bt=$e[Qe+1],kt=Math.max(Lt.paddingRight,co),Bt=Math.max(bt.paddingLeft,co);return a.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[a.jsx("div",{"data-controls":Ae.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(Ze[Qe]-Lt.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(mt-kt),width:ze(kt),height:"100%"}}),a.jsx("div",{"data-controls":at.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Ze[Qe+1]-bt.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":ge??void 0,className:`${u}-control-anchor`,style:{top:0,left:ze(mt),width:ze(Bt),height:"100%"}})]},`${Ae.paddingRightKey}-padding`)}),p&&!fe&&Ge.slice(0,-1).map((Ae,Qe)=>{const at=L0(Qe,je,_e,ve),Lt=je.slice(0,Qe+1).reduce((bt,kt)=>bt+kt,0)-Oc/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Ae.widthKey,"data-controls-axis":"x","data-controls-min":String(_l),"data-controls-max-fraction":String(at),"data-controls-variant":"column-width",className:`${u}-col-resize-handle`,style:{position:"absolute",top:"0px",left:ze(Lt),width:ze(Oc),height:"calc(100%)",pointerEvents:"auto"}})},`${Ae.widthKey}-junction`)})]}),st&&(()=>{const Ae=xa(e,oi),Qe=r0(e.cutLabelVerticalAlign),at=Ae.textTextAlign==="justify"||fe;return a.jsx("button",{type:"button",className:`${u}-cut-item`,style:{minHeight:ze(W??0),cursor:Fe?"pointer":"default",...Uv(Se,b??0,n??!1)},onClick:Fe?ut:void 0,onMouseEnter:G||Q?zt:void 0,onMouseLeave:G?rn:void 0,children:a.jsx("div",{className:`${u}-list-cols-row`,style:{...fe?{paddingLeft:ze(ne),paddingRight:ze(ne)}:{},justifyContent:a0(Ae.textTextAlign),alignItems:Nc(Qe)},children:a.jsx("span",{className:Hc(e,oi,`${u}-cut-label`,`${u}-text-tight-leading`),style:{..._c(Ae,n),...Wc(e,oi,u,n),...at?{width:"100%"}:{}},children:U})})})})(),Q&&oe&&typeof document<"u"&&(()=>{const Ae=`${oe.widthPx}px`,Qe={width:Ae,height:"auto",maxHeight:Ae,objectFit:"contain"},at=(c?document.getElementById(c):null)??document.body;return Gn.createPortal(a.jsx("div",{ref:ye,className:`${u}-hover-media-anchor`,"data-selection":"none",children:a.jsx(Xv,{media:oe,className:oe.isVideo?`${u}-hover-video`:`${u}-hover-image`,style:Qe},`${oe.rowId}-${oe.url}`)}),at)})()]})})]})}const E0=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
10350
10344
  import { createPortal } from 'react-dom';
10351
10345
  import { CommonComponentProps } from '../props';
10352
- import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
10346
+ import { buildColorVars, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
10353
10347
  import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
10354
10348
  import type { LayoutItem, LayoutTab } from '../../types/SchemaV1';
10355
10349
 
@@ -10489,14 +10483,14 @@ type ListContentItem = {
10489
10483
  DColumnWidth?: string;
10490
10484
  EColumnWidth?: string;
10491
10485
  image?: ListMedia;
10492
- link?: string;
10486
+ link?: ContentLink;
10493
10487
  };
10494
10488
 
10495
10489
  type ListItemRow = {
10496
10490
  id: string | number;
10497
10491
  cells: Record<string, React.ReactNode>;
10498
10492
  image?: ListContentItem['image'];
10499
- link?: string;
10493
+ link?: ContentLink;
10500
10494
  };
10501
10495
 
10502
10496
  type HoverImageState = {
@@ -12984,7 +12978,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
12984
12978
  >
12985
12979
  <div style={{ width: '100%', position: 'relative' }}>
12986
12980
  {visibleRows.map((row, rowIdx) => {
12987
- const hasLink = (row.link?.length ?? 0) > 0;
12981
+ const hasLink = (row.link?.value.length ?? 0) > 0;
12988
12982
  const RowElement = hasLink && (!isEditor || isPreviewMode) ? 'a' : 'div';
12989
12983
  const rowStyle = getEntryDividerWidths(
12990
12984
  rowIdx,
@@ -13001,7 +12995,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13001
12995
  key={row.id}
13002
12996
  ref={rowIdx === 0 ? (el: HTMLElement | null) => { firstRowRef.current = el; } : undefined}
13003
12997
  className={\`\${P}-list-item\${hasLink || entryHoverShowOption === 'always' ? \` \${P}-list-item-has-link\` : ''}\${showCutLabel && rowIdx === visibleRows.length - 1 ? \` \${P}-list-item-before-cut\` : ''}\`}
13004
- {...(hasLink ? { href: row.link, target: '_blank' } : {})}
12998
+ {...(hasLink ? { href: row.link?.value, target: row.link?.target === 'blank' ? '_blank' : '_self' } : {})}
13005
12999
  style={rowStyle}
13006
13000
  onMouseEnter={(event) => {
13007
13001
  if (revealHoverActive && (hasLink || entryHoverShowOption === 'always')) {
@@ -13436,7 +13430,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13436
13430
  </>
13437
13431
  );
13438
13432
  }
13439
- `,Bo=["A","B","C","D","E"],zc=[...js,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={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 M0(e){return{type:"string",label:e,placeholder:"Add Title...",display:{type:"text-input"}}}function zr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}function A0(){return Object.fromEntries(Bo.map((e,t)=>{const n=Pi[t],i=`${e} column`;return[n,M0(i)]}))}function F0(){const e={};for(const t of Bo)e[`${t}ColumnWidth`]=zr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=zr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=zr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=zr(`${t} column padding bottom`);return e}function Bc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Pi]};for(const r of Bo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function N0(e){const t={};if(e===oi)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...js]},enum:[...js]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...zc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...zc]}}return t[qt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[qt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[qt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[qt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[qt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[qt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[qt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[qt(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const _0=vr.reduce((e,t)=>({...e,...N0(t)}),{});function H0(e){return{verticalAlign:e===oi?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===oi?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function W0(e,t={}){var n;return{...H0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const jc=new Set(["textFontFamily","textFontSettings"]);function O0(e,t,n){const i=r=>n===void 0?!0:n==="common"?jc.has(r):!jc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Nl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[qt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[qt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[qt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[qt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[qt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[qt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[qt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[qt(e,"textTextAppearance")]=t.textTextAppearance),o}function da(e={},t){return vr.reduce((n,i)=>({...n,...O0(i,W0(i,e),t)}),{})}const D0=da(),z0=m0();function op(e){return[qt(e,"textFontFamily"),qt(e,"textFontSettings"),qt(e,"textFontSize"),qt(e,"textLineHeight"),qt(e,"textLetterSpacing"),qt(e,"textWordSpacing"),qt(e,"textTextAlign"),qt(e,"textTextAppearance"),`${e}VerticalAlign`]}function B0(){const e=[];return Fl.forEach((t,n)=>{const i=Pi[n],o=op(t);for(let r=1;r<Pi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const j0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];op(oi);const V0=[...Bo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],G0=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:""},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:""},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:""},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:""},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:""},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:""},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:""}],X0=[...Bo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],q0={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...A0(),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:G0},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"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",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"}},...F0(),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"}},..._0,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",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...D0,...da({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Bc({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},...da({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Bc({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},...da({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...B0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...V0.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}},...Bo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...X0]},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:"",items:["imagePosition","imageInterpolation"]},{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__",z0]}],paletteBookmark:{items:[...j0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},U0={element:k0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>C0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...vr.map(e=>({path:`${qt(e,"textFontFamily")}`}))]},fontRelations:{...vr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${qt(t,"textFontFamily")}`}),{})},schema:q0,sourceCode:E0},Vc=300,pi=.004,K0={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"},Y0=["hover","focus","filled","success","error"];function Z0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Gc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Xc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:F.scalingValue((o-t)/2,i)}}function J0(e){return`
13433
+ `,zo=["A","B","C","D","E"],zc=[...js,"Baseline A","Baseline B","Baseline C","Baseline D","Baseline E"],Ni={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 M0(e,t){return{type:"string",label:e,placeholder:"Add Title...",...t&&{contentKey:t},display:{type:"text-input"}}}function zr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const A0={A:"title",B:"subtitle",C:"date"};function F0(){return Object.fromEntries(zo.map((e,t)=>{const n=Pi[t],i=`${e} column`;return[n,M0(i,A0[e])]}))}function N0(){const e={};for(const t of zo)e[`${t}ColumnWidth`]=zr(`${t} column width`),e[`${t}ColumnPaddingLeft`]=zr(`${t} column padding left`),e[`${t}ColumnPaddingRight`]=zr(`${t} column padding right`),e[`${t}ColumnPaddingBottom`]=zr(`${t} column padding bottom`);return e}function Bc(e={}){const{typeBDefaults:t,...n}=e,i={wrapperWidth:1,columnsOrder:[...Pi]};for(const r of zo)i[`${r}ColumnWidth`]=r==="A"?.0798:.32,i[`${r}ColumnPaddingLeft`]=0,i[`${r}ColumnPaddingRight`]=0,i[`${r}ColumnPaddingBottom`]=0;const o=n.type==="b"&&t?t:{};return{...i,...o,...n}}function _0(e){const t={};if(e===oi)t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...js]},enum:[...js]};else{const n=e.charAt(0);t[`${e}VerticalAlign`]={type:"string",scope:"layout",title:"",display:{type:"drop-down",label:"Vertical alignment",enum:[...zc],filterBaselineByTopAnchor:!0,columnLetter:n},enum:[...zc]}}return t[Xt(e,"textFontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0}},t[Xt(e,"textFontSettings")]={...Ni.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0}},t[Xt(e,"textFontSize")]={...Ni.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Xt(e,"textLineHeight")]={...Ni.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Xt(e,"textLetterSpacing")]={...Ni.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Xt(e,"textWordSpacing")]={...Ni.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Xt(e,"textTextAlign")]={...Ni.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Xt(e,"textTextAppearance")]={...Ni.textAppearance,scope:"layout",title:"",display:{type:"text-appearance"}},t}const H0=vr.reduce((e,t)=>({...e,..._0(t)}),{});function W0(e){return{verticalAlign:e===oi?"Center":"Top",textFontFamily:"Arial",textFontSettings:{fontWeight:400,fontStyle:"normal"},textLetterSpacing:0,textWordSpacing:0,textTextAlign:e===oi?"center":"left",textTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}}function O0(e,t={}){var n;return{...W0(e),...t.default,...(n=t.byPrefix)==null?void 0:n[e]}}const jc=new Set(["textFontFamily","textFontSettings"]);function D0(e,t,n){const i=r=>n===void 0?!0:n==="common"?jc.has(r):!jc.has(r),o={};return i("verticalAlign")&&t.verticalAlign!==void 0&&(o[`${e}VerticalAlign`]=Nl(t.verticalAlign)),i("textFontFamily")&&t.textFontFamily!==void 0&&(o[Xt(e,"textFontFamily")]=t.textFontFamily),i("textFontSettings")&&t.textFontSettings!==void 0&&(o[Xt(e,"textFontSettings")]=t.textFontSettings),i("textFontSize")&&t.textFontSize!==void 0&&(o[Xt(e,"textFontSize")]=t.textFontSize),i("textLineHeight")&&t.textLineHeight!==void 0&&(o[Xt(e,"textLineHeight")]=t.textLineHeight),i("textLetterSpacing")&&t.textLetterSpacing!==void 0&&(o[Xt(e,"textLetterSpacing")]=t.textLetterSpacing),i("textWordSpacing")&&t.textWordSpacing!==void 0&&(o[Xt(e,"textWordSpacing")]=t.textWordSpacing),i("textTextAlign")&&t.textTextAlign!==void 0&&(o[Xt(e,"textTextAlign")]=t.textTextAlign),i("textTextAppearance")&&t.textTextAppearance!==void 0&&(o[Xt(e,"textTextAppearance")]=t.textTextAppearance),o}function da(e={},t){return vr.reduce((n,i)=>({...n,...D0(i,O0(i,e),t)}),{})}const z0=da(),B0=m0();function op(e){return[Xt(e,"textFontFamily"),Xt(e,"textFontSettings"),Xt(e,"textFontSize"),Xt(e,"textLineHeight"),Xt(e,"textLetterSpacing"),Xt(e,"textWordSpacing"),Xt(e,"textTextAlign"),Xt(e,"textTextAppearance"),`${e}VerticalAlign`]}function j0(){const e=[];return Fl.forEach((t,n)=>{const i=Pi[n],o=op(t);for(let r=1;r<Pi.length;r+=1){const l=[{name:"columns",value:r},...Array.from({length:r},(c,d)=>({name:`columnsOrder.${d}`,value:i,isNotEqual:!0}))];o.forEach(c=>{e.push({if:l,then:{name:`properties.${c}.display.visible`,value:!1}})})}}),e}const V0=["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"];op(oi);const G0=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`]),"rowPaddingTop","rowPaddingBottom"],_i=[{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg"},{objectFit:"contain",url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg"}],X0=[{AColumn:"01",BColumnWidth:"Ethan Parker",CColumnWidth:"Midnight Atlas",DColumnWidth:"Portland, OR",EColumnWidth:"On Display",image:_i[0],link:{type:"url",value:"",target:"blank"}},{AColumn:"02",BColumnWidth:"Madison Reed",CColumnWidth:"Echoes in Vermilion",DColumnWidth:"Savannah, GA",EColumnWidth:"Scheduled",image:_i[1],link:{type:"url",value:"",target:"blank"}},{AColumn:"03",BColumnWidth:"Noah Bennett",CColumnWidth:"Paper and scissors",DColumnWidth:"Madison, WI",EColumnWidth:"On Display",image:_i[2],link:{type:"url",value:"",target:"blank"}},{AColumn:"04",BColumnWidth:"Olivia Carter",CColumnWidth:"The Quiet Frequency",DColumnWidth:"Boise, ID",EColumnWidth:"On Display",image:_i[3],link:{type:"url",value:"",target:"blank"}},{AColumn:"05",BColumnWidth:"Mason Brooks",CColumnWidth:"Sights of Tomorrow",DColumnWidth:"Tampa, FL",EColumnWidth:"Postponed",image:_i[4],link:{type:"url",value:"",target:"blank"}},{AColumn:"06",BColumnWidth:"Sophia Mitchell",CColumnWidth:"Velvet Horizons",DColumnWidth:"Albuquerque, NM",EColumnWidth:"Scheduled",image:_i[5],link:{type:"url",value:"",target:"blank"}},{AColumn:"07",BColumnWidth:"Jackson Turner",CColumnWidth:"Ink & Aurora",DColumnWidth:"Pittsburgh, PA",EColumnWidth:"On Display",image:_i[6],link:{type:"url",value:"",target:"blank"}}],q0=[...zo.flatMap(e=>[`${e}ColumnWidth`,`${e}ColumnPaddingLeft`,`${e}ColumnPaddingRight`,`${e}ColumnPaddingBottom`]),"columnsOrder"],U0={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array",ref:{columnsOrder:"settings.properties.columnsOrder",columnsCount:"settings.properties.columns"}},items:{type:"object",properties:{...F0(),image:{type:"object",label:"Image",contentKey:"gallery",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:"object",label:"Link",contentKey:"link",display:{type:"link-input"}}},required:["image"]},default:X0},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"]}},imagePosition:{type:"string",scope:"layout",title:"Image Position",display:{type:"toggle-cycle",enum:["left","center","right","cursor"]}},imageInterpolation:{type:"boolean",scope:"common",title:"Interpolation",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"}},...N0(),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"}},...H0,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",imagePosition:"cursor",imageInterpolation:"on",entryHoverEffect:"default",entryHoverShowOption:"always",cutLabel:"SEE ALL",showVisibility:[!0,!0],textColor:"#000000",textHoverColor:"#FFFFFF",...z0,...da({},"common"),backgroundColor:"#FFFFFF00",dividerColor:"#373737",backgroundHoverColor:"#000000",dividerHoverColor:"#000000"},layoutDefaults:{m:Bc({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},...da({default:{textFontSize:.0906,textLineHeight:.0426,textTextAlign:"left"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")}),d:Bc({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},...da({default:{textFontSize:.0333,textLineHeight:.0333,textLetterSpacing:-9e-4,textTextAlign:"left",verticalAlign:"center"},byPrefix:{cutLabel:{textTextAlign:"center"}}},"layout")})},displayRules:[...j0(),{if:{name:"type",value:"a"},then:{name:"properties.textPaddingLR.display.visible",value:!1}},...G0.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}},...zo.map(e=>({if:{name:"type",value:"a"},then:{name:`properties.${e}ColumnPaddingBottom.display.visible`,value:!1}})),{if:{name:"imagePosition",value:"cursor",isNotEqual:!0},then:{name:"properties.imageInterpolation.display.enabled",value:!1}}],layout:["__componentName__","name","type","columns","wrapperWidth","textPaddingLR","entriesCount","cellMinHeight","imageOnHover","imagePosition","imageInterpolation","imageSize","dividerWidth","showVisibility","cut","showCut","cutCellMinHeight","entryHoverEffect","entryHoverShowOption","cutLabel","rowPaddingTop","rowPaddingBottom","rowPaddingTopB",...q0]},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:"",items:["imagePosition","imageInterpolation"]},{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__",B0]}],paletteBookmark:{items:[...V0],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","dividerColor","textHoverColor","backgroundHoverColor","dividerHoverColor"]}}},K0={element:k0,id:"list",name:"Programme",category:"lists",layoutMode:"structured",normalizeLayoutSettingsUpdate:(e,t)=>C0(e,t),preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Programme-list-default.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[...vr.map(e=>({path:`${Xt(e,"textFontFamily")}`}))]},fontRelations:{...vr.reduce((e,t)=>({...e,[`${t}TextFontSettings`]:`${Xt(t,"textFontFamily")}`}),{})},schema:U0,sourceCode:E0},Vc=300,pi=.004,Y0={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"},Z0=["hover","focus","filled","success","error"];function J0(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function Gc(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function Xc(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:R.scalingValue((o-t)/2,i)}}function Q0(e){return`
13440
13434
  .${e}-wrapper {
13441
13435
  box-sizing: border-box;
13442
13436
  display: flex;
@@ -13498,7 +13492,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13498
13492
  display: flex;
13499
13493
  align-items: center;
13500
13494
  justify-content: space-between;
13501
- gap: ${Z0(20)};
13495
+ gap: ${J0(20)};
13502
13496
  width: 100%;
13503
13497
  min-width: 0;
13504
13498
  min-height: var(--${e}-question-min-height, unset);
@@ -13601,7 +13595,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
13601
13595
  pointer-events: none;
13602
13596
  z-index: 2;
13603
13597
  }
13604
- `}function qc(e,t,n,i,o,r,l,c){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:r??0,textAppearance:l,color:c??"#000000"}}function Q0({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=F.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:v="default",autoclose:m="off",icon:g,iconMaxWidth:x=.00833,iconPaddingRight:b=0,iconAnimation:k="rotate 45",questionColor:f="#000000",answerColor:S="#000000",dividerColor:W="#0000001F",iconColor:U="#000000",questionHoverColor:B="#666666",iconHoverColor:P="#666666",iconActiveColor:_="#000000",dividerHoverColor:G="#000000",questionFontFamily:$,questionFontSettings:L,questionFontSize:D,questionLineHeight:E,questionLetterSpacing:T,questionWordSpacing:C,questionTextAppearance:V,answerFontFamily:w,answerFontSettings:q,answerFontSize:I,answerLineHeight:A,answerLetterSpacing:j,answerWordSpacing:ie,answerTextAppearance:ae,questionPaddingLeft:O=0,questionPaddingTop:oe=0,questionPaddingBottom:N=0,answerPaddingLeft:le=0,answerPaddingRight:Q=0,answerPaddingTop:be=0,answerPaddingBottom:Pe=0}=e,ye=t??[],[ce,Y]=s.useState(()=>new Set),se=!n||i;s.useEffect(()=>{Y(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const pe=Ze=>F.scalingValue(Ze,n??!1),fe=Math.max(O,pi),we=Math.max(oe,pi),Re=Math.max(N,pi),ge=Math.max(le,pi),xe=Math.max(Q,pi),Ce=Math.max(be,pi),h=Math.max(Pe,pi),K=Math.max(0,(d??1)-b-x),Z=Math.max(0,(d??1)-Q),ne=Math.max(0,(d??1)-le),de=Math.max(b,pi),z=Math.max(0,(d??1)-O-x),R=s.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),ee=s.useCallback(Ze=>ce.has(Ze),[ce]),te=se&&v==="default"?`${l}-entry-hover-default`:"",me=g??"",X=me!=="",Ie=k.replace(/^rotate /,""),Se=`${l}-icon-anim-${Ie}`,J=dn(Qt(qc($,L,D,E,T,C,V,f),n)),He=dn(Qt(qc(w,q,I,A,j,ie,ae,S),n)),We=Gc(D,E,`${l}-question`,`${l}-text-tight-leading`),ot=Gc(I,A,`${l}-answer-text`,`${l}-text-tight-leading`),qe=Xc(D,E,l,n),tt=Xc(I,A,l,n),et=F.buildColorVars(l,{questionColor:f,answerColor:S,dividerColor:W,iconColor:U,questionHoverColor:B,iconHoverColor:P,iconActiveColor:_,dividerHoverColor:G},K0,Y0),Ge=r&&r!=="default"?`${l}-state-${r}`:"",ve=s.useCallback(Ze=>{se&&Y($e=>{if($e.has(Ze)){const Ue=new Set($e);return Ue.delete(Ze),Ue}if(m==="on")return new Set([Ze]);const Ne=new Set($e);return Ne.add(Ze),Ne})},[se,m]),_e=s.useMemo(()=>J0(l),[l]),Be={[`--${l}-divider-width`]:F.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:F.scalingValue(x,n??!1),...u>0?{[`--${l}-question-min-height`]:F.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),a.jsx("div",{style:et,children:a.jsx("div",{className:Ct(`${l}-wrapper`,n&&!i&&`${l}-editor`,te,Ge),style:{width:F.scalingValue(d,n??!1),maxWidth:"100%",...Be},children:ye.map((Ze,$e)=>{var Oe;const Ne=ee($e),Ue=((Oe=Ze.question)==null?void 0:Oe.trim())??"",Je=Ze.answer,st=((Je==null?void 0:Je.length)??0)>0,it=c&&$e===R;return a.jsxs("div",{className:Ct(`${l}-item`,Ne&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[it&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:pe(we)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:pe(fe),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(de),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Ne,style:{...J,...qe,paddingLeft:pe(O),paddingRight:pe(b)},onClick:()=>ve($e),children:[oe>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(oe)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:We,children:Ue}),st&&(X?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${Se}`,"aria-hidden":"true",children:a.jsx(mn,{url:me,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${Se}`,"aria-hidden":"true"}))]}),N>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(N)},"aria-hidden":"true"})]}),it&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:pe(Re)}})]}),st&&Je&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!Ne,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[it&&Ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:pe(Ce)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:pe(ge),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(xe),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...He,...tt,paddingLeft:pe(le),paddingRight:pe(Q)},children:a.jsx("div",{className:ot,children:a.jsx(Ki,{content:Je})})}),Pe>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(Pe)}}),it&&Ne&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:pe(h)}})]})})})]},$e)})})})]})}const ex=`import { useCallback, useEffect, useMemo, useState } from 'react';
13598
+ `}function qc(e,t,n,i,o,r,l,c){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:r??0,textAppearance:l,color:c??"#000000"}}function ex({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,activeEvent:r}){const{prefix:l}=R.useScopedStyles(),c=o??!1,{wrapperWidth:d=1,cellMinHeight:u=0,dividerWidth:p=694e-6,dividerStyle:y="solid",entryHoverEffect:x="default",autoclose:m="off",icon:g,iconMaxWidth:v=.00833,iconPaddingRight:b=0,iconAnimation:M="rotate 45",questionColor:f="#000000",answerColor:S="#000000",dividerColor:W="#0000001F",iconColor:U="#000000",questionHoverColor:B="#666666",iconHoverColor:P="#666666",iconActiveColor:H="#000000",dividerHoverColor:V="#000000",questionFontFamily:$,questionFontSettings:L,questionFontSize:D,questionLineHeight:A,questionLetterSpacing:T,questionWordSpacing:C,questionTextAppearance:X,answerFontFamily:w,answerFontSettings:q,answerFontSize:k,answerLineHeight:N,answerLetterSpacing:j,answerWordSpacing:ie,answerTextAppearance:ae,questionPaddingLeft:O=0,questionPaddingTop:oe=0,questionPaddingBottom:_=0,answerPaddingLeft:le=0,answerPaddingRight:Q=0,answerPaddingTop:be=0,answerPaddingBottom:Le=0}=e,ye=t??[],[ce,Y]=s.useState(()=>new Set),se=!n||i;s.useEffect(()=>{Y(new Set)},[m]),s.useEffect(()=>{n&&!o&&!i&&Y(new Set)},[n,o,i]);const pe=Ze=>R.scalingValue(Ze,n??!1),fe=Math.max(O,pi),we=Math.max(oe,pi),Re=Math.max(_,pi),ge=Math.max(le,pi),xe=Math.max(Q,pi),Ce=Math.max(be,pi),h=Math.max(Le,pi),K=Math.max(0,(d??1)-b-v),Z=Math.max(0,(d??1)-Q),ne=Math.max(0,(d??1)-le),de=Math.max(b,pi),z=Math.max(0,(d??1)-O-v),I=s.useMemo(()=>ce.size===0?0:Math.min(...ce),[ce]),ee=s.useCallback(Ze=>ce.has(Ze),[ce]),te=se&&x==="default"?`${l}-entry-hover-default`:"",me=g??"",G=me!=="",Ie=M.replace(/^rotate /,""),Se=`${l}-icon-anim-${Ie}`,J=dn(Qt(qc($,L,D,A,T,C,X,f),n)),He=dn(Qt(qc(w,q,k,N,j,ie,ae,S),n)),We=Gc(D,A,`${l}-question`,`${l}-text-tight-leading`),ot=Gc(k,N,`${l}-answer-text`,`${l}-text-tight-leading`),qe=Xc(D,A,l,n),tt=Xc(k,N,l,n),et=R.buildColorVars(l,{questionColor:f,answerColor:S,dividerColor:W,iconColor:U,questionHoverColor:B,iconHoverColor:P,iconActiveColor:H,dividerHoverColor:V},Y0,Z0),Ge=r&&r!=="default"?`${l}-state-${r}`:"",ve=s.useCallback(Ze=>{se&&Y($e=>{if($e.has(Ze)){const Ue=new Set($e);return Ue.delete(Ze),Ue}if(m==="on")return new Set([Ze]);const Ne=new Set($e);return Ne.add(Ze),Ne})},[se,m]),_e=s.useMemo(()=>Q0(l),[l]),je={[`--${l}-divider-width`]:R.scalingValue(p,n??!1),[`--${l}-divider-style`]:y,[`--${l}-icon-max-width`]:R.scalingValue(v,n??!1),...u>0?{[`--${l}-question-min-height`]:R.scalingValue(u,n??!1)}:{}};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:_e}}),a.jsx("div",{style:et,children:a.jsx("div",{className:Ct(`${l}-wrapper`,n&&!i&&`${l}-editor`,te,Ge),style:{width:R.scalingValue(d,n??!1),maxWidth:"100%",...je},children:ye.map((Ze,$e)=>{var Oe;const Ne=ee($e),Ue=((Oe=Ze.question)==null?void 0:Oe.trim())??"",Je=Ze.answer,st=((Je==null?void 0:Je.length)??0)>0,it=c&&$e===I;return a.jsxs("div",{className:Ct(`${l}-item`,Ne&&`${l}-item-open`),"data-faq-item":"",children:[a.jsxs("div",{className:`${l}-question-controls`,children:[it&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"questionPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:pe(we)}}),a.jsx("div",{"data-controls":"questionPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(K),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:pe(fe),height:"100%"}}),a.jsx("div",{"data-controls":"iconPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(de),height:"100%"}})]}),a.jsxs("button",{type:"button",className:`${l}-question-button`,"aria-expanded":Ne,style:{...J,...qe,paddingLeft:pe(O),paddingRight:pe(b)},onClick:()=>ve($e),children:[oe>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(oe)},"aria-hidden":"true"}),a.jsxs("span",{className:`${l}-question-row`,children:[a.jsx("span",{className:We,children:Ue}),st&&(G?a.jsx("span",{className:`${l}-icon ${l}-icon-custom ${Se}`,"aria-hidden":"true",children:a.jsx(mn,{url:me,fill:`var(--${l}-icon-color)`,hoverFill:`var(--${l}-icon-hover-color, var(--${l}-icon-color))`,className:`${l}-icon-image`})}):a.jsx("span",{className:`${l}-icon ${l}-icon-default ${Se}`,"aria-hidden":"true"}))]}),_>0&&a.jsx("span",{className:`${l}-padding-handle`,style:{height:pe(_)},"aria-hidden":"true"})]}),it&&a.jsx("div",{"data-controls":"questionPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:pe(Re)}})]}),st&&Je&&a.jsx("div",{className:`${l}-panel`,"aria-hidden":!Ne,children:a.jsx("div",{className:`${l}-panel-inner`,children:a.jsxs("div",{className:`${l}-answer-controls`,children:[it&&Ne&&a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"answerPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{top:0,left:0,width:"100%",height:pe(Ce)}}),a.jsx("div",{"data-controls":"answerPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(Z),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,left:0,width:pe(ge),height:"100%"}}),a.jsx("div",{"data-controls":"answerPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(ne),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x",className:`${l}-control-anchor`,style:{top:0,right:0,width:pe(xe),height:"100%"}})]}),be>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(be)}}),a.jsx("div",{className:`${l}-answer`,style:{...He,...tt,paddingLeft:pe(le),paddingRight:pe(Q)},children:a.jsx("div",{className:ot,children:a.jsx(Ki,{content:Je})})}),Le>0&&a.jsx("div",{className:`${l}-padding-handle`,style:{height:pe(Le)}}),it&&Ne&&a.jsx("div",{"data-controls":"answerPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${l}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:pe(h)}})]})})})]},$e)})})})]})}const tx=`import { useCallback, useEffect, useMemo, useState } from 'react';
13605
13599
  import cn from 'classnames';
13606
13600
  import { CommonComponentProps } from '../props';
13607
13601
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -14349,7 +14343,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14349
14343
  </>
14350
14344
  );
14351
14345
  }
14352
- `;function mi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Uc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},tx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],nx={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",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:mi("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:{...Uc.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:{...Uc.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:mi("Question Padding Left"),questionPaddingTop:mi("Question Padding Top"),questionPaddingBottom:mi("Question Padding Bottom"),answerPaddingLeft:mi("Answer Padding Left"),answerPaddingRight:mi("Answer Padding Right"),answerPaddingTop:mi("Answer Padding Top"),answerPaddingBottom:mi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...tx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},ix={element:Q0,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"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:nx,sourceCode:ex},ri=e=>e.display==="cover",Oa=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Kc=100,ox=.2,Yc=8,rp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Kc:Math.max(Kc,window.innerHeight*ox),[]),y=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),v=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const L=typeof window<"u"?window.innerHeight:800,D=Math.max(.88,1-$/L*.12);return`translateY(${$}px) scale(${D})`},[]),g=s.useCallback(()=>{d.current=null},[]),x=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),g()},[n,g]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),g(),c(!1)},Math.min(n,200))},[n,t,g]),k=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(d.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),f=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=$.clientX-L.startX,E=$.clientY-L.startY;if(L.isLocked===null){if(Math.abs(D)<Yc&&Math.abs(E)<Yc)return;if(E>0&&E>Math.abs(D))L.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{L.isLocked=!1,g();return}}if(!L.isLocked)return;$.preventDefault();const T=Math.max(0,E);u.current=T,r(T)},[e,g]),S=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=L.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!D){g();return}$.clientY-L.startY>=p?b():x()},[p,b,e,g,x]),W=s.useCallback($=>{S($)},[S]),U=s.useCallback($=>{S($)},[S]),B=o>0,P=l?`transform ${n}ms ease`:"none",_=l?`opacity ${n}ms ease`:"none",G=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:y(o),transition:_},mediaAreaStyle:{transform:m(o),transition:P,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:G?{opacity:v(o),transition:_}:void 0,swipeHandlers:e?{onPointerDown:k,onPointerMove:f,onPointerUp:W,onPointerCancel:U}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},rx="[data-lightbox-scrollable]",Wl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(rx)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},ax=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},sx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},lx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},cx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(g,x)=>{sx(t),e.scrollLeft=g,x&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const v=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,v(),u(n,!0))};return t.addEventListener("transitionend",m),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(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,v(),u(n,!0))},i+64),()=>{p||(p=!0,v(),u(l-lx(t),!1))}},cr=300,dx=900,ux=1500,px="cubic-bezier(0.16, 1, 0.3, 1)",mx=3e3,gx=2,hx=16,fx=.05,yx=1,Br=.3,vx=50,xx=20,oo=.004,Ao=["title1","title2","title3"],bx={title1:"1",title2:"2",title3:"3"},Sx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},wx={title1:.02,title2:.02,title3:.02},jr=e=>`max(${e}, ${xx}px)`,$x=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]}},Cx=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=$x(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Zt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Tx=e=>[Zt(e,"fontFamily"),Zt(e,"fontSettings"),{type:"row",items:[Zt(e,"fontSize"),Zt(e,"lineHeight"),Zt(e,"letterSpacing"),Zt(e,"wordSpacing")]},Zt(e,"textAlign"),Zt(e,"textAppearance")],Lx=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Ao.map(e=>[bx[e],Tx(e)]))}),Ol=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},ap=(e,t)=>Ol(e,t),Vr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ol(e.length,n),effective:ap(e.length,n)}},Px=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},ds=(e,t)=>{const n=i=>{const o=Zt(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[Sx[t]]}},Ix=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),us=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??wx[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},Rx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:v,closeIconMaxWidth:m,closeIconColor:g,closeIconHoverColor:x,thumbnailTrigger:b,thumbnailVisibility:k,thumbnailObjectFit:f,thumbnailActive:S,thumbnailActiveColor:W,title1Width:U,title2Width:B,title3Width:P,title1MarginLeft:_=0,title2MarginLeft:G=0,title3MarginLeft:$=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="desktop",contentMarginTop:E,iconMarginLeft:T}=n,C=M=>F.scalingValue(M,i??!1),V=d??n.thumnailSize??.03,w=C(V),q=C(u),I=C(p??.02),A=C(y??0),j=C(E??0),ie=jr(j),ae=C(T??0),[O,oe]=s.useState(0),N=s.useRef(O);N.current=O;const le=t[O],{title1:Q,title2:be,title3:Pe}=Cx(le),ye=us("title1",ds(n,"title1"),i),ce=us("title2",ds(n,"title2"),i),Y=us("title3",ds(n,"title3"),i),se=D==="mobile",pe=!o&&(!i||r),fe=pe,we=pe,Re=pe,ge=ri(f),xe=ge?{"--image-aspect-ratio":Oa(f)}:void 0,Ce=!!(Q||be||Pe),h=s.useMemo(()=>Px(e,Q,be,Pe,ye,ce,Y),[e,O,Q,be,Pe,ye,ce,Y]),K=s.useMemo(()=>({title1Width:U,title2Width:B,title3Width:P}),[U,B,P]),Z=s.useMemo(()=>h.map(M=>K[M.widthKey]),[h,K]),ne=s.useMemo(()=>Ol(h.length,Z),[h.length,Z]),de=s.useMemo(()=>ap(h.length,Z),[h.length,Z]),z=s.useMemo(()=>h.filter(M=>M.prefix==="title1"),[h]),R=s.useMemo(()=>h.filter(M=>M.prefix==="title2"||M.prefix==="title3"),[h]),ee=s.useMemo(()=>Zc(z,K),[z,K]),te=s.useMemo(()=>Zc(R,K),[R,K]),me=s.useCallback((M,re)=>{const ue=h.indexOf(M);if(!se||re==="single-row")return{effectiveWidth:de[ue]??0,resolvedWidth:ne[ue]??0,maxWidth:Vr(ue,ne)};if(re==="two-row-top"){const Ke=z.indexOf(M);return{effectiveWidth:ee.effective[Ke]??0,resolvedWidth:ee.resolved[Ke]??0,maxWidth:Vr(Ke,ee.resolved)}}const ke=R.indexOf(M);return{effectiveWidth:te.effective[ke]??0,resolvedWidth:te.resolved[ke]??0,maxWidth:Vr(ke,te.resolved)}},[R,te,de,ne,h,z,ee,se]),X=s.useCallback(M=>F.scalingValue(M,i??!1),[i]),Ie=X(L??0),Se=s.useMemo(()=>({title1MarginLeft:_,title2MarginLeft:G,title3MarginLeft:$}),[_,G,$]),J=s.useCallback(M=>h.slice(0,M+1).reduce((re,ue,ke)=>re+(ue!=null&&ue.marginLeftKey?Se[ue.marginLeftKey]??0:0)+(ne[ke]??0),0)+(se?0:_??0),[h,Se,ne,se,_]),He=s.useCallback(()=>se?0:_??0,[se,_]),We=s.useCallback(M=>R.slice(0,M).reduce((re,ue,ke)=>re+(ue.marginLeftKey?Se[ue.marginLeftKey]??0:0)+(te.resolved[ke]??0),0),[R,te.resolved,Se]),ot=s.useCallback(M=>{const re=R[M];return We(M)+(re.marginLeftKey?Se[re.marginLeftKey]??0:0)+(te.resolved[M]??0)},[R,te.resolved,We,Se]),qe=(M,re)=>{const ue=M.marginLeftKey?Se[M.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Ke,maxWidth:lt}=me(M,re),Et=o&&re==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":M.prefix,style:{...re==="single-row"?{gridArea:M.prefix}:{},width:X(ke),...ue>0?{marginLeft:X(ue)}:{}},children:[a.jsx("p",{className:M.className,style:M.style,children:M.text}),Et&&M.marginLeftKey&&a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:X(-ue),width:`max(${X(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Et&&a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(lt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:X(-oo/2),width:X(oo),height:"100%",pointerEvents:"auto"}})]},M.className)},tt=()=>{const M=se?-1:h.findIndex(ke=>ke.prefix==="title1"),re=!se&&(o||(_??0)>0)?(()=>{const ke=_??0,Ke=M>=0?ne[M]:U??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:0,width:`max(${X(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ue=h.flatMap((ke,Ke)=>{if(!ke.marginLeftKey)return[];const lt=Se[ke.marginLeftKey]??0,Et=Ix(h,ne,Se,Ke)+He();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Ke]),style:{position:"absolute",top:0,left:X(Et),width:`max(${X(lt)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return re?[re,...ue]:ue},et=()=>h.map((M,re)=>{const ue=Vr(re,ne),Ke=J(re)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Ke),width:X(oo),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),Ge=()=>R.flatMap((M,re)=>{if(!M.marginLeftKey)return[];const ue=Se[M.marginLeftKey]??0,ke=We(re),{resolvedWidth:Ke}=me(M,"two-row-bottom");return a.jsx("div",{"data-controls":M.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:X(ke),width:`max(${X(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}},M.marginLeftKey)}),ve=()=>R.map((M,re)=>{const{maxWidth:ue}=me(M,"two-row-bottom"),Ke=ot(re)-oo/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":M.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:X(Ke),width:X(oo),height:"100%",pointerEvents:"auto"}})},`${M.widthKey}-junction`)}),_e=s.useRef(null),Be=s.useRef(null),Ze=s.useRef(null),$e=s.useRef(null),Ne=s.useRef([]),Ue=s.useRef([]),Je=s.useRef(0),st=s.useRef(null),it=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Oe=s.useRef(null),Ae=s.useRef(null),gt=s.useRef(0),ze=s.useRef("forward"),De=s.useRef(0),Xe=s.useRef(null),ct=s.useRef(!1),he=t.length>1&&(!o||!!r),Ee=he?3:1,nt=s.useMemo(()=>Array.from({length:Ee},()=>t).flat(),[t,Ee]),[pt,Ve]=s.useState(!1),[vt,Rt]=s.useState(!1),[At,wt]=s.useState(!0),Vt=s.useRef(null),jt=s.useRef(null),Kt=s.useRef(!1),Yt=s.useRef(!1),kt=s.useRef(null),Bt=s.useRef(null),rn=fe&&!At,xt=s.useCallback(()=>{fe&&(wt(!0),Bt.current&&clearTimeout(Bt.current),Bt.current=setTimeout(()=>{it.current.isActive||wt(!1)},mx))},[fe]),yt=s.useCallback(()=>{o||Yt.current||(Yt.current=!0,Rt(!1),kt.current=setTimeout(()=>{l()},cr))},[o,l]),Me=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:F.scalingValue(m??0,i),height:F.scalingValue(m??0,i),marginRight:ae,"--close-icon-hover-color":x},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:yt,"aria-label":"Close",children:a.jsx(mn,{url:v,fill:g,hoverFill:i&&!r?g:x,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ae,height:"100%",pointerEvents:"auto"}})]}),Qe=(M="two-row")=>a.jsx("div",{...M==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:X(_??0),flexShrink:0,...M==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...M==="two-row"&&o?{pointerEvents:"auto"}:{}}}),rt=()=>{const M=h.find(ke=>ke.prefix==="title1"),re=h.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),ue=re.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(_??0)>0||o?Qe():null,M&&qe(M,"two-row-top"),v&&Me()]}),ue?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[re.map(ke=>qe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ge(),ve()]})]}):null,a.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:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},dt=()=>a.jsxs(a.Fragment,{children:[(_??0)>0||o?Qe("single-row"):null,h.map(M=>qe(M,"single-row")),o?a.jsxs(a.Fragment,{children:[tt(),et()]}):null,v?Me():null]}),Pt=s.useCallback(M=>!!(M.closest("[data-controls]")||M.closest(`.${e}-thumbnails`)||M.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:St,backdropStyle:ht,mediaAreaStyle:Wt,overlayContentStyle:Tt,swipeHandlers:Ot,dismissAreaStyle:Gt}=rp({enabled:pe??!1,onClose:yt,animMs:cr,isBlockedTarget:Pt}),Mt=()=>{if(!he||t.length===0)return Je.current=0,0;const M=Ue.current[0],re=Ue.current[t.length];if(!M||!re)return Je.current;const ue=re.offsetLeft-M.offsetLeft;return ue>0&&(Je.current=ue),Je.current},_t=(M=!1)=>{if(!he)return;const re=Be.current,ue=Mt();!re||ue<=0||ue<re.clientWidth*.25||(re.scrollLeft<=0?(re.scrollLeft+=ue,M&&(it.current.scrollLeft+=ue),ct.current&&(De.current+=ue)):re.scrollLeft>=ue*2&&(re.scrollLeft-=ue,M&&(it.current.scrollLeft-=ue),ct.current&&(De.current-=ue)))},Ft=(M,re=(ue=>(ue=Be.current)==null?void 0:ue.scrollLeft)()??0)=>{if(!he)return M;let ke=t.length+M,Ke=1/0;for(let lt=0;lt<Ee;lt++){const Et=lt*t.length+M,zt=Ue.current[Et];if(!zt)continue;const en=Math.abs(zt.offsetLeft-re);en<Ke&&(Ke=en,ke=Et)}return ke},ut=M=>{const re=Be.current;return!M||!re?!1:M.offsetWidth>re.clientWidth+1},H=M=>{const re=Be.current;if(!M||!re||!ut(M))return!1;const ue=M.offsetLeft,ke=ue+M.offsetWidth;return re.scrollLeft>=ue-1&&re.scrollLeft+re.clientWidth<=ke+1},Le=(M=(re=>(re=Be.current)==null?void 0:re.scrollLeft)()??0)=>{for(let ke=0;ke<Ue.current.length;ke+=1){const Ke=Ue.current[ke];if(Ke&&H(Ke))return ke}let ue={flatIndex:0,distance:1/0};return Ue.current.forEach((ke,Ke)=>{if(!ke)return;const lt=Math.abs(ke.offsetLeft-M);lt<ue.distance&&(ue={flatIndex:Ke,distance:lt})}),ue.flatIndex},je=M=>{Be.current&&Ue.current.forEach(re=>{re&&(re.style.scrollSnapAlign=ut(re)&&M==="backward"?"end":"start")})},Fe=(M,re,ue)=>{const ke=M-re,Ke=Le(re),lt=Ue.current[Ke];if(H(lt))return Le(M)%t.length;const Et=Ue.current[Ke+1],zt=lt?Et?Et.offsetLeft-lt.offsetLeft:lt.offsetWidth:0,en=zt>0?ke>zt*Br?1:ke<-zt*Br?-1:0:0;return en===0?ue:he?(ue+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,ue+en))},ft=s.useCallback((M=!1)=>{if(k!=="on"||o)return;const re=$e.current,ue=N.current,ke=Ne.current[ue];if(!re||!ke||re.scrollWidth<=re.clientWidth)return;const Ke=re.scrollLeft,lt=Ke+re.clientWidth,Et=ke.offsetLeft,zt=Et+ke.offsetWidth;if(Et>=Ke&&zt<=lt)return;const en=re.scrollWidth-re.clientWidth;let tn=Ke;if(!M&&Vt.current===null){const ci=Ne.current[ue-1],to=Ne.current[ue+1],di=ci?ke.offsetLeft-ci.offsetLeft:to?to.offsetLeft-ke.offsetLeft:ke.offsetWidth;zt>lt?tn+=di:Et<Ke&&(tn-=di)}else zt>lt?tn=zt-re.clientWidth:tn=Et;re.scrollLeft=Math.max(0,Math.min(en,tn))},[o,k]),Ht=s.useCallback((M=!1)=>{M&&(Kt.current=!0),jt.current===null&&(jt.current=requestAnimationFrame(()=>{jt.current=null;const re=Kt.current;Kt.current=!1,ft(re)}))},[ft]),mt=s.useCallback(M=>{if(M===N.current)return;const re=N.current;N.current=M;const ue=Math.abs(M-re)>1,ke=he&&t.length>1&&(re===t.length-1&&M===0||re===0&&M===t.length-1);oe(M),Ht(ue||ke)},[t.length,he,Ht]),Lt=()=>{if(!Be.current||t.length===0||Vt.current!==null||it.current.isActive&&it.current.hasMoved)return;const M=Be.current.scrollLeft,re=Le(M)%t.length;re!==N.current&&mt(re)},Ut=()=>{Vt.current=null},Dt=M=>{const re=Be.current;re&&(re.style.scrollSnapType=M?"":"none")},an=()=>{var M;(M=Ae.current)==null||M.call(Ae),Ae.current=null},ln=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),ct.current=!1},qn=()=>{const M=Be.current;if(!M){Xe.current=null,ct.current=!1;return}const re=De.current-M.scrollLeft;if(Math.abs(re)<.5){M.scrollLeft=De.current,_t(),Lt(),Xe.current=null,ct.current=!1;return}M.scrollLeft+=re*fx,_t(),Lt(),xt(),Xe.current=requestAnimationFrame(qn)},Un=()=>{const M=Ze.current;M&&(M.style.transition="",M.style.transform="",M.style.willChange="")},Zi=(M,re,ue,ke)=>{Un(),M.scrollLeft=re,gt.current=M.scrollLeft,_t(),ue!==void 0?(N.current=ue,oe(ue)):Lt(),Dt(!0),ke==null||ke()},hn=(M,{behavior:re="smooth",activeIndex:ue,onComplete:ke}={})=>{const Ke=Be.current,lt=Ze.current;if(!Ke||!lt)return;if(ln(),an(),Dt(!1),re==="auto"){Zi(Ke,M,ue,ke);return}const Et=Math.abs(M-Ke.scrollLeft),zt=ax(Et,dx,ux,Ke.clientWidth*.55);Ae.current=cx(Ke,lt,M,{duration:zt,easing:px,onComplete:()=>{Ae.current=null,Zi(Ke,M,ue,ke)}})},Vo=(M="smooth")=>{const re=Be.current;if(!re||t.length===0)return;const ue=Le()%t.length,ke=Ft(ue,re.scrollLeft),Ke=Ue.current[ke];Ke&&hn(Ke.offsetLeft,{behavior:M,activeIndex:ue})},Go=(M,re="smooth",ue,ke)=>{const Ke=Be.current;if(!Ke||t.length===0)return;const lt=(ke??Ke.scrollLeft)-M,Et=Le(M),zt=Ue.current[Et];if(H(zt)){Dt(!0),Lt();return}const en=Ue.current[Et+1],tn=zt?en?en.offsetLeft-zt.offsetLeft:zt.offsetWidth:0;if((tn>0?lt>tn*Br?1:lt<-tn*Br?-1:0:0)!==0){const qo=ue??Et%t.length,za=Fe(ke??Ke.scrollLeft,M,qo);xn(za,re);return}const to=ke??Ke.scrollLeft,di=Le(to),Xo=Ue.current[di];if(Xo&&Math.abs(Xo.offsetLeft-to)<1){Dt(!0),Lt();return}Vo("auto")},xn=(M,re="smooth")=>{const ue=Be.current;if(!ue||t.length===0)return;const ke=Ft(M,ue.scrollLeft),Ke=Ue.current[ke];Ke&&(re==="smooth"?Vt.current=M:Vt.current=null,N.current=M,oe(M),Ht(!0),hn(Ke.offsetLeft,{behavior:re,activeIndex:M,onComplete:re==="smooth"?Ut:void 0}))},li=()=>{Oe.current&&(window.removeEventListener("pointerup",Oe.current),window.removeEventListener("pointercancel",Oe.current),Oe.current=null)},Ji=(M,re,ue,ke,Ke)=>{const lt=ue-M,Et=ke-re,zt=Math.abs(lt),en=Math.abs(Et);if(zt<vx||zt<=en)return!1;const tn=lt<0?1:-1,ci=he?(Ke+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ke+tn));return ci===Ke?!1:(xn(ci),!0)},bn=M=>{if(!it.current.isActive)return;li();const re=Be.current;if(!re)return;const{scrollLeft:ue,startActiveIndex:ke,hasMoved:Ke}=it.current,lt=re.scrollLeft;_t(!0),it.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ve(!1),M!==void 0&&re.hasPointerCapture(M)&&re.releasePointerCapture(M),Ke?Go(ue,"smooth",ke,lt):(Dt(!0),Lt()),xt()},Kn=(M,re)=>{const ue=st.current;st.current=null,ue&&(Ji(ue.startX,ue.startY,M,re,ue.startActiveIndex),xt())},Qi=M=>{if(!we)return;if(M.pointerType==="touch"){if(ln(),Dt(!0),Pt(M.target))return;st.current={startX:M.clientX,startY:M.clientY,startActiveIndex:N.current};return}if(M.pointerType!=="mouse"||M.button!==0||Pt(M.target))return;const re=Be.current;if(!re)return;ln(),an(),Un(),Vt.current=null,it.current={isActive:!0,startX:M.clientX,scrollLeft:re.scrollLeft,startActiveIndex:N.current,hasMoved:!1},Dt(!1),xt(),re.setPointerCapture(M.pointerId),li();const ue=ke=>{ke.pointerType==="mouse"&&bn(ke.pointerId)};Oe.current=ue,window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue)},eo=M=>{if(!we||M.pointerType!=="mouse")return;const re=Be.current;if(!re||!it.current.isActive)return;if(M.buttons===0){bn(M.pointerId);return}const ue=M.clientX-it.current.startX;Math.abs(ue)>yx&&(it.current.hasMoved=!0,Ve(!0)),it.current.hasMoved&&(M.preventDefault(),re.scrollLeft=it.current.scrollLeft-ue,_t(!0),Lt(),xt())},Te=M=>{if(we){if(M.pointerType==="touch"){M.type==="pointerup"?Kn(M.clientX,M.clientY):st.current=null;return}M.pointerType==="mouse"&&bn(M.pointerId)}},Ye=M=>{!we||M.pointerType!=="mouse"||bn(M.pointerId)};return Wl(),s.useEffect(()=>{const M=requestAnimationFrame(()=>Rt(!0));return()=>{cancelAnimationFrame(M),an(),li(),jt.current!==null&&(cancelAnimationFrame(jt.current),jt.current=null),kt.current&&clearTimeout(kt.current),Bt.current&&clearTimeout(Bt.current)}},[]),s.useEffect(()=>{if(!fe){wt(!0);return}xt();const M=()=>xt();return document.addEventListener("pointermove",M,{passive:!0}),document.addEventListener("pointerdown",M,{passive:!0}),()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerdown",M),Bt.current&&clearTimeout(Bt.current)}},[fe,xt]),s.useEffect(()=>{const M=re=>{re.key==="Escape"&&yt()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[yt]),s.useLayoutEffect(()=>{Mt()},[A,t.length,he]),s.useLayoutEffect(()=>{o||xn(N.current,"auto")},[A,o]),s.useLayoutEffect(()=>{xn(0,"auto")},[t.length,he]),s.useEffect(()=>{const M=Be.current;if(!M||o||!pe)return;const re=ue=>{if(ue.preventDefault(),Math.abs(ue.deltaY)<=Math.abs(ue.deltaX))return;const ke=ue.deltaMode===1?hx:ue.deltaMode===2?M.clientHeight:1,Ke=ue.deltaY*ke*gx;if(Ke!==0){if(an(),ct.current||(ct.current=!0,De.current=M.scrollLeft,Vt.current=null,Dt(!1)),De.current+=Ke,!he){const lt=M.scrollWidth-M.clientWidth;De.current=Math.max(0,Math.min(lt,De.current))}xt(),Xe.current===null&&(Xe.current=requestAnimationFrame(qn))}};return M.addEventListener("wheel",re,{passive:!1}),()=>{M.removeEventListener("wheel",re),ln()}},[o,pe,he]),s.useEffect(()=>{const M=Be.current;if(!M)return;const re=()=>{_t(it.current.isActive);const ke=M.scrollLeft,Ke=ke-gt.current;gt.current=ke;const lt=Je.current>0?Je.current*.5:1/0;if(Ke!==0&&Math.abs(Ke)<lt){const Et=Ke>0?"forward":"backward";Et!==ze.current&&(ze.current=Et,je(Et))}it.current.isActive&&it.current.hasMoved||Lt()};M.addEventListener("scroll",re,{passive:!0});const ue=new ResizeObserver(()=>{Mt(),_t(it.current.isActive),je(ze.current),Lt()});return ue.observe(M),()=>{an(),M.removeEventListener("scroll",re),ue.disconnect()}},[t.length,he]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{St||yt()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:vt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:vt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...ht}}),a.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Gt,...Ot,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Wt,onClick:M=>M.stopPropagation(),children:a.jsx("div",{ref:Be,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":pt?"true":"false",onPointerDown:Qi,onPointerMove:eo,onPointerUp:Te,onPointerCancel:Te,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:A},children:nt.map((M,re)=>{const ue=M.image.objectFit??"contain",ke=re%t.length,Ke=Math.floor(re/t.length),lt=jr(A),Et=`calc(-0.5 * (${lt} + ${A}))`;return a.jsxs("div",{ref:zt=>Ue.current[re]=zt,className:`${e}-strip-item`,style:{height:D==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:M.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ue}}),o&&ke<t.length-1&&Ke===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Et,width:lt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ke}-${M.image.url}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:Tt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:j,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:ie,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${se?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||v)&&a.jsx("div",{className:`${e}-header ${se?`${e}-header-two-row`:`${e}-header-single-row`}`,children:se?rt():Ce||v?dt():null})})})]}),t.length>1&&k==="on"&&(()=>{const M=jr(I),re=`calc(-0.5 * (${I} + ${M}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:I},children:a.jsx("div",{ref:$e,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ue=>ue.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:q,"--thumbnail-active-color":W},children:[t.map((ue,ke)=>{const Ke=jr(q),lt=`calc(-0.5 * (${Ke} + ${q}))`;return a.jsxs("div",{ref:Et=>{Ne.current[ke]=Et},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===ke?"true":"false",onClick:()=>pe&&b==="click"&&xn(ke),onMouseEnter:()=>Re&&b==="hover"&&xn(ke),"aria-label":ue.image.name?`View ${ue.image.name}`:`View image ${ke+1}`,"aria-current":O===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ge?` ${e}-thumb-image-cover`:""}`,src:ue.image.url,alt:"",draggable:!1,style:{...xe,maxWidth:w,maxHeight:w,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:lt,width:Ke,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ue.image.url}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:re,height:M,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function kx(e){return`
14346
+ `;function mi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Uc={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},nx=["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","iconHoverColor","iconActiveColor","dividerHoverColor"],ix={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",display:{type:"settings-image-input"}},iconMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},iconPaddingRight:mi("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:{...Uc.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:{...Uc.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:mi("Question Padding Left"),questionPaddingTop:mi("Question Padding Top"),questionPaddingBottom:mi("Question Padding Bottom"),answerPaddingLeft:mi("Answer Padding Left"),answerPaddingRight:mi("Answer Padding Right"),answerPaddingTop:mi("Answer Padding Top"),answerPaddingBottom:mi("Answer Padding Bottom")},defaults:{dividerStyle:"dotted",entryHoverEffect:"default",autoclose:"off",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01M0GB8Z9EQFMGYA20F2J0ACA8.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:[...nx],panelIds:["general","typeStyle"],stateItems:{default:["questionColor","answerColor","dividerColor","iconColor","questionHoverColor","dividerHoverColor","iconHoverColor","iconActiveColor"]}}},ox={element:ex,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"}]},fontSettingsPaths:{content:[],parameters:[{path:"questionFontFamily"},{path:"answerFontFamily"}]},fontRelations:{questionFontSettings:"questionFontFamily",answerFontSettings:"answerFontFamily"},schema:ix,sourceCode:tx},ri=e=>e.display==="cover",Oa=e=>{const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`},Kc=100,rx=.2,Yc=8,rp=({enabled:e,onClose:t,animMs:n=300,isBlockedTarget:i})=>{const[o,r]=s.useState(0),[l,c]=s.useState(!1),d=s.useRef(null),u=s.useRef(0);u.current=o;const p=s.useMemo(()=>typeof window>"u"?Kc:Math.max(Kc,window.innerHeight*rx),[]),y=s.useCallback($=>Math.max(0,1-$/(p*1.5)),[p]),x=s.useCallback($=>Math.max(0,1-$/(p*.45)),[p]),m=s.useCallback($=>{const L=typeof window<"u"?window.innerHeight:800,D=Math.max(.88,1-$/L*.12);return`translateY(${$}px) scale(${D})`},[]),g=s.useCallback(()=>{d.current=null},[]),v=s.useCallback(()=>{c(!0),r(0),window.setTimeout(()=>c(!1),n),g()},[n,g]),b=s.useCallback(()=>{const $=typeof window<"u"?window.innerHeight:800;c(!0),r($),window.setTimeout(()=>{t(),g(),c(!1)},Math.min(n,200))},[n,t,g]),M=s.useCallback($=>{!e||l||$.pointerType==="touch"&&(i!=null&&i($.target)||(d.current={startX:$.clientX,startY:$.clientY,isLocked:null,pointerId:$.pointerId}))},[e,l,i]),f=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=$.clientX-L.startX,A=$.clientY-L.startY;if(L.isLocked===null){if(Math.abs(D)<Yc&&Math.abs(A)<Yc)return;if(A>0&&A>Math.abs(D))L.isLocked=!0,$.currentTarget.setPointerCapture($.pointerId);else{L.isLocked=!1,g();return}}if(!L.isLocked)return;$.preventDefault();const T=Math.max(0,A);u.current=T,r(T)},[e,g]),S=s.useCallback($=>{const L=d.current;if(!e||!L||$.pointerType!=="touch"||L.pointerId!==$.pointerId)return;const D=L.isLocked===!0;if($.currentTarget.hasPointerCapture($.pointerId)&&$.currentTarget.releasePointerCapture($.pointerId),!D){g();return}$.clientY-L.startY>=p?b():v()},[p,b,e,g,v]),W=s.useCallback($=>{S($)},[S]),U=s.useCallback($=>{S($)},[S]),B=o>0,P=l?`transform ${n}ms ease`:"none",H=l?`opacity ${n}ms ease`:"none",V=o>0||l;return{isSwipeDragging:B,backdropStyle:{opacity:y(o),transition:H},mediaAreaStyle:{transform:m(o),transition:P,touchAction:B?"none":void 0,willChange:B?"transform":void 0},overlayContentStyle:V?{opacity:x(o),transition:H}:void 0,swipeHandlers:e?{onPointerDown:M,onPointerMove:f,onPointerUp:W,onPointerCancel:U}:{},dismissAreaStyle:e?{touchAction:B?"none":"pan-x"}:void 0}},ax="[data-lightbox-scrollable]",Wl=(e=!0)=>{s.useEffect(()=>{if(!e)return;const t=window.scrollY,n=document.body.style.overflow,i=document.body.style.position,o=document.body.style.top,r=document.body.style.width,l=document.documentElement.style.overflow;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top=`-${t}px`,document.body.style.width="100%",document.documentElement.style.overflow="hidden";const c=d=>{const u=d.target;u instanceof Element&&u.closest(ax)||d.preventDefault()};return document.addEventListener("touchmove",c,{passive:!1}),()=>{document.removeEventListener("touchmove",c),document.body.style.overflow=n,document.body.style.position=i,document.body.style.top=o,document.body.style.width=r,document.documentElement.style.overflow=l,window.scrollTo({top:t,left:0,behavior:"instant"})}},[e])},sx=(e,t,n,i)=>{const o=Math.min(Math.abs(e)/Math.max(i,1),1);return t+(n-t)*o},lx=e=>{e.style.transition="",e.style.transform="",e.style.willChange=""},cx=e=>{const t=getComputedStyle(e).transform;return t==="none"?0:new DOMMatrixReadOnly(t).m41},dx=(e,t,n,{duration:i,easing:o,onComplete:r})=>{const l=e.scrollLeft,c=n-l,d=l-n,u=(g,v)=>{lx(t),e.scrollLeft=g,v&&(r==null||r())};if(Math.abs(c)<.5)return u(n,!0),()=>{};let p=!1,y=0;const x=()=>{t.removeEventListener("transitionend",m),clearTimeout(y)},m=g=>{g.target!==t||g.propertyName!=="transform"||p||(p=!0,x(),u(n,!0))};return t.addEventListener("transitionend",m),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(${d}px, 0, 0)`,y=window.setTimeout(()=>{p||(p=!0,x(),u(n,!0))},i+64),()=>{p||(p=!0,x(),u(l-cx(t),!1))}},cr=300,ux=900,px=1500,mx="cubic-bezier(0.16, 1, 0.3, 1)",gx=3e3,hx=2,fx=16,yx=.05,vx=1,Br=.3,xx=50,bx=20,io=.004,Mo=["title1","title2","title3"],Sx={title1:"1",title2:"2",title3:"3"},wx={title1:"title1Color",title2:"title2Color",title3:"title3Color"},$x={title1:.02,title2:.02,title3:.02},jr=e=>`max(${e}, ${bx}px)`,Cx=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]}},Tx=e=>{if(!e)return{title1:"",title2:"",title3:""};if(e.title1||e.title2||e.title3)return{title1:e.title1??"",title2:e.title2??"",title3:e.title3??""};const t=Cx(e.text);return{title1:t.title1??"",title2:t.title2??"",title3:t.title3??""}},Zt=(e,t)=>`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`,Lx=e=>[Zt(e,"fontFamily"),Zt(e,"fontSettings"),{type:"row",items:[Zt(e,"fontSize"),Zt(e,"lineHeight"),Zt(e,"letterSpacing"),Zt(e,"wordSpacing")]},Zt(e,"textAlign"),Zt(e,"textAppearance")],Px=()=>({type:"tab",id:"stripTextStyle",tabs:Object.fromEntries(Mo.map(e=>[Sx[e],Lx(e)]))}),Ol=(e,t)=>{if(e<=0)return[];const n=t.slice(0,e),i=n.reduce((r,l)=>r+l,0);if(i<=1)return n;const{widths:o}=[...n].reverse().reduce(({overflow:r,widths:l},c)=>{if(r<=0||c<=0)return{overflow:r,widths:[c,...l]};const d=Math.min(r,c);return{overflow:r-d,widths:[c-d,...l]}},{overflow:i-1,widths:[]});return o},ap=(e,t)=>Ol(e,t),Vr=(e,t)=>{const n=t.filter((i,o)=>o!==e).reduce((i,o)=>i+o,0);return Math.max(1-n,0)},Zc=(e,t)=>{const n=e.map(i=>t[i.widthKey]??0);return{resolved:Ol(e.length,n),effective:ap(e.length,n)}},Ix=(e,t,n,i,o,r,l)=>{const c=[];return t&&c.push({prefix:"title1",widthKey:"title1Width",className:`${e}-title1`,style:o,text:t}),n&&c.push({prefix:"title2",widthKey:"title2Width",marginLeftKey:"title2MarginLeft",className:`${e}-title2`,style:r,text:n}),i&&c.push({prefix:"title3",widthKey:"title3Width",marginLeftKey:"title3MarginLeft",className:`${e}-title3`,style:l,text:i}),c},ds=(e,t)=>{const n=i=>{const o=Zt(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[wx[t]]}},Rx=(e,t,n,i)=>e.slice(0,i).reduce((o,r,l)=>o+(r!=null&&r.marginLeftKey?n[r.marginLeftKey]??0:0)+(t[l]??0),0),us=(e,t,n)=>{var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??$x[e],lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,wordSpacing:t.wordSpacing,textAlign:t.textAlign,textAppearance:t.textAppearance,color:t.color??"#ffffff"};return Qt(i,n)},kx=({prefix:e,images:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,onClose:l})=>{const{backgroundColor:c,thumbnailSize:d,thumbnailGap:u,thumbnailMarginBottom:p,imageGap:y,closeIcon:x,closeIconMaxWidth:m,closeIconColor:g,closeIconHoverColor:v,thumbnailTrigger:b,thumbnailVisibility:M,thumbnailObjectFit:f,thumbnailActive:S,thumbnailActiveColor:W,title1Width:U,title2Width:B,title3Width:P,title1MarginLeft:H=0,title2MarginLeft:V=0,title3MarginLeft:$=0,titleRowMarginBottom:L=0,titleHeaderLayout:D="desktop",contentMarginTop:A,iconMarginLeft:T}=n,C=F=>R.scalingValue(F,i??!1),X=d??n.thumnailSize??.03,w=C(X),q=C(u),k=C(p??.02),N=C(y??0),j=C(A??0),ie=jr(j),ae=C(T??0),[O,oe]=s.useState(0),_=s.useRef(O);_.current=O;const le=t[O],{title1:Q,title2:be,title3:Le}=Tx(le),ye=us("title1",ds(n,"title1"),i),ce=us("title2",ds(n,"title2"),i),Y=us("title3",ds(n,"title3"),i),se=D==="mobile",pe=!o&&(!i||r),fe=pe,we=pe,Re=pe,ge=ri(f),xe=ge?{"--image-aspect-ratio":Oa(f)}:void 0,Ce=!!(Q||be||Le),h=s.useMemo(()=>Ix(e,Q,be,Le,ye,ce,Y),[e,O,Q,be,Le,ye,ce,Y]),K=s.useMemo(()=>({title1Width:U,title2Width:B,title3Width:P}),[U,B,P]),Z=s.useMemo(()=>h.map(F=>K[F.widthKey]),[h,K]),ne=s.useMemo(()=>Ol(h.length,Z),[h.length,Z]),de=s.useMemo(()=>ap(h.length,Z),[h.length,Z]),z=s.useMemo(()=>h.filter(F=>F.prefix==="title1"),[h]),I=s.useMemo(()=>h.filter(F=>F.prefix==="title2"||F.prefix==="title3"),[h]),ee=s.useMemo(()=>Zc(z,K),[z,K]),te=s.useMemo(()=>Zc(I,K),[I,K]),me=s.useCallback((F,re)=>{const ue=h.indexOf(F);if(!se||re==="single-row")return{effectiveWidth:de[ue]??0,resolvedWidth:ne[ue]??0,maxWidth:Vr(ue,ne)};if(re==="two-row-top"){const Ke=z.indexOf(F);return{effectiveWidth:ee.effective[Ke]??0,resolvedWidth:ee.resolved[Ke]??0,maxWidth:Vr(Ke,ee.resolved)}}const ke=I.indexOf(F);return{effectiveWidth:te.effective[ke]??0,resolvedWidth:te.resolved[ke]??0,maxWidth:Vr(ke,te.resolved)}},[I,te,de,ne,h,z,ee,se]),G=s.useCallback(F=>R.scalingValue(F,i??!1),[i]),Ie=G(L??0),Se=s.useMemo(()=>({title1MarginLeft:H,title2MarginLeft:V,title3MarginLeft:$}),[H,V,$]),J=s.useCallback(F=>h.slice(0,F+1).reduce((re,ue,ke)=>re+(ue!=null&&ue.marginLeftKey?Se[ue.marginLeftKey]??0:0)+(ne[ke]??0),0)+(se?0:H??0),[h,Se,ne,se,H]),He=s.useCallback(()=>se?0:H??0,[se,H]),We=s.useCallback(F=>I.slice(0,F).reduce((re,ue,ke)=>re+(ue.marginLeftKey?Se[ue.marginLeftKey]??0:0)+(te.resolved[ke]??0),0),[I,te.resolved,Se]),ot=s.useCallback(F=>{const re=I[F];return We(F)+(re.marginLeftKey?Se[re.marginLeftKey]??0:0)+(te.resolved[F]??0)},[I,te.resolved,We,Se]),qe=(F,re)=>{const ue=F.marginLeftKey?Se[F.marginLeftKey]??0:0,{effectiveWidth:ke,resolvedWidth:Ke,maxWidth:dt}=me(F,re),Et=o&&re==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":F.prefix,style:{...re==="single-row"?{gridArea:F.prefix}:{},width:G(ke),...ue>0?{marginLeft:G(ue)}:{}},children:[a.jsx("p",{className:F.className,style:F.style,children:F.text}),Et&&F.marginLeftKey&&a.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:G(-ue),width:`max(${G(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}}),Et&&a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(dt),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:G(-io/2),width:G(io),height:"100%",pointerEvents:"auto"}})]},F.className)},tt=()=>{const F=se?-1:h.findIndex(ke=>ke.prefix==="title1"),re=!se&&(o||(H??0)>0)?(()=>{const ke=H??0,Ke=F>=0?ne[F]:U??0;return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:0,width:`max(${G(ke)}, 10px)`,height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,ue=h.flatMap((ke,Ke)=>{if(!ke.marginLeftKey)return[];const dt=Se[ke.marginLeftKey]??0,Et=Rx(h,ne,Se,Ke)+He();return a.jsx("div",{"data-controls":ke.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ne[Ke]),style:{position:"absolute",top:0,left:G(Et),width:`max(${G(dt)}, 10px)`,height:"100%",pointerEvents:"auto"}},ke.marginLeftKey)});return re?[re,...ue]:ue},et=()=>h.map((F,re)=>{const ue=Vr(re,ne),Ke=J(re)-io/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(Ke),width:G(io),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),Ge=()=>I.flatMap((F,re)=>{if(!F.marginLeftKey)return[];const ue=Se[F.marginLeftKey]??0,ke=We(re),{resolvedWidth:Ke}=me(F,"two-row-bottom");return a.jsx("div",{"data-controls":F.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(Ke),style:{position:"absolute",top:0,left:G(ke),width:`max(${G(ue)}, 10px)`,height:"100%",pointerEvents:"auto"}},F.marginLeftKey)}),ve=()=>I.map((F,re)=>{const{maxWidth:ue}=me(F,"two-row-bottom"),Ke=ot(re)-io/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":F.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(ue),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:G(Ke),width:G(io),height:"100%",pointerEvents:"auto"}})},`${F.widthKey}-junction`)}),_e=s.useRef(null),je=s.useRef(null),Ze=s.useRef(null),$e=s.useRef(null),Ne=s.useRef([]),Ue=s.useRef([]),Je=s.useRef(0),st=s.useRef(null),it=s.useRef({isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1}),Oe=s.useRef(null),Fe=s.useRef(null),ut=s.useRef(0),ze=s.useRef("forward"),De=s.useRef(0),Xe=s.useRef(null),pt=s.useRef(!1),he=t.length>1&&(!o||!!r),Me=he?3:1,nt=s.useMemo(()=>Array.from({length:Me},()=>t).flat(),[t,Me]),[gt,Ve]=s.useState(!1),[yt,It]=s.useState(!1),[At,St]=s.useState(!0),Vt=s.useRef(null),jt=s.useRef(null),Ut=s.useRef(!1),Kt=s.useRef(!1),Rt=s.useRef(null),zt=s.useRef(null),rn=fe&&!At,vt=s.useCallback(()=>{fe&&(St(!0),zt.current&&clearTimeout(zt.current),zt.current=setTimeout(()=>{it.current.isActive||St(!1)},gx))},[fe]),ft=s.useCallback(()=>{o||Kt.current||(Kt.current=!0,It(!1),Rt.current=setTimeout(()=>{l()},cr))},[o,l]),Ae=()=>a.jsxs("div",{className:`${e}-close-icon`,"data-overlay-content-hidden":rn?"true":"false",style:{width:R.scalingValue(m??0,i),height:R.scalingValue(m??0,i),marginRight:ae,"--close-icon-hover-color":v},children:[a.jsx("button",{type:"button",className:`${e}-close-icon-inner`,onClick:ft,"aria-label":"Close",children:a.jsx(mn,{url:x,fill:g,hoverFill:i&&!r?g:v,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginLeft","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ae,height:"100%",pointerEvents:"auto"}})]}),Qe=(F="two-row")=>a.jsx("div",{...F==="two-row"&&o?{"data-controls":"title1MarginLeft","data-controls-axis":"x"}:{},style:{width:G(H??0),flexShrink:0,...F==="single-row"?{gridArea:"margin"}:{alignSelf:"stretch"},...F==="two-row"&&o?{pointerEvents:"auto"}:{}}}),at=()=>{const F=h.find(ke=>ke.prefix==="title1"),re=h.filter(ke=>ke.prefix==="title2"||ke.prefix==="title3"),ue=re.length>0||o||(L??0)>0;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`${e}-header-row-top`,children:[(H??0)>0||o?Qe():null,F&&qe(F,"two-row-top"),x&&Ae()]}),ue?a.jsxs("div",{className:`${e}-header-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-header-row-bottom`,children:[re.map(ke=>qe(ke,"two-row-bottom")),o&&a.jsxs(a.Fragment,{children:[Ge(),ve()]})]}):null,a.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:Ie,width:"100%",flexShrink:0,pointerEvents:o?"auto":"none"}})]}):null]})},mt=()=>a.jsxs(a.Fragment,{children:[(H??0)>0||o?Qe("single-row"):null,h.map(F=>qe(F,"single-row")),o?a.jsxs(a.Fragment,{children:[tt(),et()]}):null,x?Ae():null]}),Lt=s.useCallback(F=>!!(F.closest("[data-controls]")||F.closest(`.${e}-thumbnails`)||F.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:bt,backdropStyle:kt,mediaAreaStyle:Bt,overlayContentStyle:lt,swipeHandlers:Ht,dismissAreaStyle:Yt}=rp({enabled:pe??!1,onClose:ft,animMs:cr,isBlockedTarget:Lt}),Mt=()=>{if(!he||t.length===0)return Je.current=0,0;const F=Ue.current[0],re=Ue.current[t.length];if(!F||!re)return Je.current;const ue=re.offsetLeft-F.offsetLeft;return ue>0&&(Je.current=ue),Je.current},Nt=(F=!1)=>{if(!he)return;const re=je.current,ue=Mt();!re||ue<=0||ue<re.clientWidth*.25||(re.scrollLeft<=0?(re.scrollLeft+=ue,F&&(it.current.scrollLeft+=ue),pt.current&&(De.current+=ue)):re.scrollLeft>=ue*2&&(re.scrollLeft-=ue,F&&(it.current.scrollLeft-=ue),pt.current&&(De.current-=ue)))},Ft=(F,re=(ue=>(ue=je.current)==null?void 0:ue.scrollLeft)()??0)=>{if(!he)return F;let ke=t.length+F,Ke=1/0;for(let dt=0;dt<Me;dt++){const Et=dt*t.length+F,Dt=Ue.current[Et];if(!Dt)continue;const en=Math.abs(Dt.offsetLeft-re);en<Ke&&(Ke=en,ke=Et)}return ke},$t=F=>{const re=je.current;return!F||!re?!1:F.offsetWidth>re.clientWidth+1},E=F=>{const re=je.current;if(!F||!re||!$t(F))return!1;const ue=F.offsetLeft,ke=ue+F.offsetWidth;return re.scrollLeft>=ue-1&&re.scrollLeft+re.clientWidth<=ke+1},Pe=(F=(re=>(re=je.current)==null?void 0:re.scrollLeft)()??0)=>{for(let ke=0;ke<Ue.current.length;ke+=1){const Ke=Ue.current[ke];if(Ke&&E(Ke))return ke}let ue={flatIndex:0,distance:1/0};return Ue.current.forEach((ke,Ke)=>{if(!ke)return;const dt=Math.abs(ke.offsetLeft-F);dt<ue.distance&&(ue={flatIndex:Ke,distance:dt})}),ue.flatIndex},Be=F=>{je.current&&Ue.current.forEach(re=>{re&&(re.style.scrollSnapAlign=$t(re)&&F==="backward"?"end":"start")})},Ee=(F,re,ue)=>{const ke=F-re,Ke=Pe(re),dt=Ue.current[Ke];if(E(dt))return Pe(F)%t.length;const Et=Ue.current[Ke+1],Dt=dt?Et?Et.offsetLeft-dt.offsetLeft:dt.offsetWidth:0,en=Dt>0?ke>Dt*Br?1:ke<-Dt*Br?-1:0:0;return en===0?ue:he?(ue+en+t.length)%t.length:Math.max(0,Math.min(t.length-1,ue+en))},ct=s.useCallback((F=!1)=>{if(M!=="on"||o)return;const re=$e.current,ue=_.current,ke=Ne.current[ue];if(!re||!ke||re.scrollWidth<=re.clientWidth)return;const Ke=re.scrollLeft,dt=Ke+re.clientWidth,Et=ke.offsetLeft,Dt=Et+ke.offsetWidth;if(Et>=Ke&&Dt<=dt)return;const en=re.scrollWidth-re.clientWidth;let tn=Ke;if(!F&&Vt.current===null){const ci=Ne.current[ue-1],to=Ne.current[ue+1],di=ci?ke.offsetLeft-ci.offsetLeft:to?to.offsetLeft-ke.offsetLeft:ke.offsetWidth;Dt>dt?tn+=di:Et<Ke&&(tn-=di)}else Dt>dt?tn=Dt-re.clientWidth:tn=Et;re.scrollLeft=Math.max(0,Math.min(en,tn))},[o,M]),Wt=s.useCallback((F=!1)=>{F&&(Ut.current=!0),jt.current===null&&(jt.current=requestAnimationFrame(()=>{jt.current=null;const re=Ut.current;Ut.current=!1,ct(re)}))},[ct]),ht=s.useCallback(F=>{if(F===_.current)return;const re=_.current;_.current=F;const ue=Math.abs(F-re)>1,ke=he&&t.length>1&&(re===t.length-1&&F===0||re===0&&F===t.length-1);oe(F),Wt(ue||ke)},[t.length,he,Wt]),Tt=()=>{if(!je.current||t.length===0||Vt.current!==null||it.current.isActive&&it.current.hasMoved)return;const F=je.current.scrollLeft,re=Pe(F)%t.length;re!==_.current&&ht(re)},qt=()=>{Vt.current=null},Ot=F=>{const re=je.current;re&&(re.style.scrollSnapType=F?"":"none")},an=()=>{var F;(F=Fe.current)==null||F.call(Fe),Fe.current=null},ln=()=>{Xe.current!==null&&(cancelAnimationFrame(Xe.current),Xe.current=null),pt.current=!1},qn=()=>{const F=je.current;if(!F){Xe.current=null,pt.current=!1;return}const re=De.current-F.scrollLeft;if(Math.abs(re)<.5){F.scrollLeft=De.current,Nt(),Tt(),Xe.current=null,pt.current=!1;return}F.scrollLeft+=re*yx,Nt(),Tt(),vt(),Xe.current=requestAnimationFrame(qn)},Un=()=>{const F=Ze.current;F&&(F.style.transition="",F.style.transform="",F.style.willChange="")},Zi=(F,re,ue,ke)=>{Un(),F.scrollLeft=re,ut.current=F.scrollLeft,Nt(),ue!==void 0?(_.current=ue,oe(ue)):Tt(),Ot(!0),ke==null||ke()},hn=(F,{behavior:re="smooth",activeIndex:ue,onComplete:ke}={})=>{const Ke=je.current,dt=Ze.current;if(!Ke||!dt)return;if(ln(),an(),Ot(!1),re==="auto"){Zi(Ke,F,ue,ke);return}const Et=Math.abs(F-Ke.scrollLeft),Dt=sx(Et,ux,px,Ke.clientWidth*.55);Fe.current=dx(Ke,dt,F,{duration:Dt,easing:mx,onComplete:()=>{Fe.current=null,Zi(Ke,F,ue,ke)}})},jo=(F="smooth")=>{const re=je.current;if(!re||t.length===0)return;const ue=Pe()%t.length,ke=Ft(ue,re.scrollLeft),Ke=Ue.current[ke];Ke&&hn(Ke.offsetLeft,{behavior:F,activeIndex:ue})},Vo=(F,re="smooth",ue,ke)=>{const Ke=je.current;if(!Ke||t.length===0)return;const dt=(ke??Ke.scrollLeft)-F,Et=Pe(F),Dt=Ue.current[Et];if(E(Dt)){Ot(!0),Tt();return}const en=Ue.current[Et+1],tn=Dt?en?en.offsetLeft-Dt.offsetLeft:Dt.offsetWidth:0;if((tn>0?dt>tn*Br?1:dt<-tn*Br?-1:0:0)!==0){const Xo=ue??Et%t.length,za=Ee(ke??Ke.scrollLeft,F,Xo);xn(za,re);return}const to=ke??Ke.scrollLeft,di=Pe(to),Go=Ue.current[di];if(Go&&Math.abs(Go.offsetLeft-to)<1){Ot(!0),Tt();return}jo("auto")},xn=(F,re="smooth")=>{const ue=je.current;if(!ue||t.length===0)return;const ke=Ft(F,ue.scrollLeft),Ke=Ue.current[ke];Ke&&(re==="smooth"?Vt.current=F:Vt.current=null,_.current=F,oe(F),Wt(!0),hn(Ke.offsetLeft,{behavior:re,activeIndex:F,onComplete:re==="smooth"?qt:void 0}))},li=()=>{Oe.current&&(window.removeEventListener("pointerup",Oe.current),window.removeEventListener("pointercancel",Oe.current),Oe.current=null)},Ji=(F,re,ue,ke,Ke)=>{const dt=ue-F,Et=ke-re,Dt=Math.abs(dt),en=Math.abs(Et);if(Dt<xx||Dt<=en)return!1;const tn=dt<0?1:-1,ci=he?(Ke+tn+t.length)%t.length:Math.max(0,Math.min(t.length-1,Ke+tn));return ci===Ke?!1:(xn(ci),!0)},bn=F=>{if(!it.current.isActive)return;li();const re=je.current;if(!re)return;const{scrollLeft:ue,startActiveIndex:ke,hasMoved:Ke}=it.current,dt=re.scrollLeft;Nt(!0),it.current={isActive:!1,startX:0,scrollLeft:0,startActiveIndex:0,hasMoved:!1},Ve(!1),F!==void 0&&re.hasPointerCapture(F)&&re.releasePointerCapture(F),Ke?Vo(ue,"smooth",ke,dt):(Ot(!0),Tt()),vt()},Kn=(F,re)=>{const ue=st.current;st.current=null,ue&&(Ji(ue.startX,ue.startY,F,re,ue.startActiveIndex),vt())},Qi=F=>{if(!we)return;if(F.pointerType==="touch"){if(ln(),Ot(!0),Lt(F.target))return;st.current={startX:F.clientX,startY:F.clientY,startActiveIndex:_.current};return}if(F.pointerType!=="mouse"||F.button!==0||Lt(F.target))return;const re=je.current;if(!re)return;ln(),an(),Un(),Vt.current=null,it.current={isActive:!0,startX:F.clientX,scrollLeft:re.scrollLeft,startActiveIndex:_.current,hasMoved:!1},Ot(!1),vt(),re.setPointerCapture(F.pointerId),li();const ue=ke=>{ke.pointerType==="mouse"&&bn(ke.pointerId)};Oe.current=ue,window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue)},eo=F=>{if(!we||F.pointerType!=="mouse")return;const re=je.current;if(!re||!it.current.isActive)return;if(F.buttons===0){bn(F.pointerId);return}const ue=F.clientX-it.current.startX;Math.abs(ue)>vx&&(it.current.hasMoved=!0,Ve(!0)),it.current.hasMoved&&(F.preventDefault(),re.scrollLeft=it.current.scrollLeft-ue,Nt(!0),Tt(),vt())},Te=F=>{if(we){if(F.pointerType==="touch"){F.type==="pointerup"?Kn(F.clientX,F.clientY):st.current=null;return}F.pointerType==="mouse"&&bn(F.pointerId)}},Ye=F=>{!we||F.pointerType!=="mouse"||bn(F.pointerId)};return Wl(),s.useEffect(()=>{const F=requestAnimationFrame(()=>It(!0));return()=>{cancelAnimationFrame(F),an(),li(),jt.current!==null&&(cancelAnimationFrame(jt.current),jt.current=null),Rt.current&&clearTimeout(Rt.current),zt.current&&clearTimeout(zt.current)}},[]),s.useEffect(()=>{if(!fe){St(!0);return}vt();const F=()=>vt();return document.addEventListener("pointermove",F,{passive:!0}),document.addEventListener("pointerdown",F,{passive:!0}),()=>{document.removeEventListener("pointermove",F),document.removeEventListener("pointerdown",F),zt.current&&clearTimeout(zt.current)}},[fe,vt]),s.useEffect(()=>{const F=re=>{re.key==="Escape"&&ft()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[ft]),s.useLayoutEffect(()=>{Mt()},[N,t.length,he]),s.useLayoutEffect(()=>{o||xn(_.current,"auto")},[N,o]),s.useLayoutEffect(()=>{xn(0,"auto")},[t.length,he]),s.useEffect(()=>{const F=je.current;if(!F||o||!pe)return;const re=ue=>{if(ue.preventDefault(),Math.abs(ue.deltaY)<=Math.abs(ue.deltaX))return;const ke=ue.deltaMode===1?fx:ue.deltaMode===2?F.clientHeight:1,Ke=ue.deltaY*ke*hx;if(Ke!==0){if(an(),pt.current||(pt.current=!0,De.current=F.scrollLeft,Vt.current=null,Ot(!1)),De.current+=Ke,!he){const dt=F.scrollWidth-F.clientWidth;De.current=Math.max(0,Math.min(dt,De.current))}vt(),Xe.current===null&&(Xe.current=requestAnimationFrame(qn))}};return F.addEventListener("wheel",re,{passive:!1}),()=>{F.removeEventListener("wheel",re),ln()}},[o,pe,he]),s.useEffect(()=>{const F=je.current;if(!F)return;const re=()=>{Nt(it.current.isActive);const ke=F.scrollLeft,Ke=ke-ut.current;ut.current=ke;const dt=Je.current>0?Je.current*.5:1/0;if(Ke!==0&&Math.abs(Ke)<dt){const Et=Ke>0?"forward":"backward";Et!==ze.current&&(ze.current=Et,Be(Et))}it.current.isActive&&it.current.hasMoved||Tt()};F.addEventListener("scroll",re,{passive:!0});const ue=new ResizeObserver(()=>{Mt(),Nt(it.current.isActive),Be(ze.current),Tt()});return ue.observe(F),()=>{an(),F.removeEventListener("scroll",re),ue.disconnect()}},[t.length,he]),a.jsxs("div",{"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{bt||ft()},role:"dialog","aria-modal":"true","aria-label":"Image gallery",style:{opacity:yt?1:0,transition:`opacity ${cr}ms ease`,pointerEvents:yt?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:c,...kt}}),a.jsxs("div",{ref:_e,className:`${e}-lightbox-dismiss-area`,style:Yt,...Ht,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Bt,onClick:F=>F.stopPropagation(),children:a.jsx("div",{ref:je,className:`${e}-lightbox-strip`,"data-lightbox-scrollable":"","data-mouse-draggable":we&&t.length>0?"true":"false","data-mouse-dragging":gt?"true":"false",onPointerDown:Qi,onPointerMove:eo,onPointerUp:Te,onPointerCancel:Te,onLostPointerCapture:Ye,children:a.jsx("div",{ref:Ze,className:`${e}-lightbox-strip-track`,style:{gap:N},children:nt.map((F,re)=>{const ue=F.image.objectFit??"contain",ke=re%t.length,Ke=Math.floor(re/t.length),dt=jr(N),Et=`calc(-0.5 * (${dt} + ${N}))`;return a.jsxs("div",{ref:Dt=>Ue.current[re]=Dt,className:`${e}-strip-item`,style:{height:D==="mobile"?"calc(0.75 * var(--cntrl-viewport-height, 100vh))":"100%"},children:[a.jsx("img",{src:F.image.url,draggable:!1,style:{display:"block",maxWidth:"100%",height:"100%",objectFit:ue}}),o&&ke<t.length-1&&Ke===0&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:Et,width:dt,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${Ke}-${F.image.url}-${ke}`)})})})}),a.jsxs("div",{className:`${e}-lightbox-content-inner`,"data-overlay-content-hidden":rn?"true":"false",style:lt,children:[a.jsx("div",{style:{position:"relative",width:"100%",height:j,flexShrink:0,pointerEvents:"none"},children:o&&a.jsx("div",{"data-controls":"contentMarginTop","data-controls-axis":"y","data-controls-handle-left-fraction":"0.05",style:{position:"absolute",left:0,right:0,top:0,height:ie,pointerEvents:"auto",zIndex:3}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",flex:1,minHeight:0,pointerEvents:"none"},children:a.jsx("div",{className:`${e}-lightbox-content-area${se?` ${e}-lightbox-content-area-stacked`:""}`,children:(Ce||x)&&a.jsx("div",{className:`${e}-header ${se?`${e}-header-two-row`:`${e}-header-single-row`}`,children:se?at():Ce||x?mt():null})})})]}),t.length>1&&M==="on"&&(()=>{const F=jr(k),re=`calc(-0.5 * (${k} + ${F}))`;return a.jsx("div",{className:`${e}-thumbnails-wrap`,style:{bottom:k},children:a.jsx("div",{ref:$e,className:`${e}-thumbnails`,"data-lightbox-scrollable":"",onClick:ue=>ue.stopPropagation(),children:a.jsxs("div",{className:`${e}-thumbnails-track`,"data-thumbnail-active":S,style:{gap:q,"--thumbnail-active-color":W},children:[t.map((ue,ke)=>{const Ke=jr(q),dt=`calc(-0.5 * (${Ke} + ${q}))`;return a.jsxs("div",{ref:Et=>{Ne.current[ke]=Et},style:{position:"relative",flex:"0 0 auto"},children:[a.jsx("button",{type:"button",className:`${e}-thumb`,"data-active":O===ke?"true":"false",onClick:()=>pe&&b==="click"&&xn(ke),onMouseEnter:()=>Re&&b==="hover"&&xn(ke),"aria-label":ue.image.name?`View ${ue.image.name}`:`View image ${ke+1}`,"aria-current":O===ke?"true":void 0,children:a.jsx("img",{className:`${e}-thumb-image${ge?` ${e}-thumb-image-cover`:""}`,src:ue.image.url,alt:"",draggable:!1,style:{...xe,maxWidth:w,maxHeight:w,width:f.display==="cover"?"auto":"100%",height:"auto",objectFit:f.display==="cover"?"cover":"contain"}})}),o&&ke<t.length-1&&a.jsx("div",{"data-controls":"thumbnailGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:dt,width:Ke,height:"100%",pointerEvents:"auto",zIndex:3}})]},`thumb-${ue.image.url}-${ke}`)}),o&&a.jsx("div",{"data-controls":"thumbnailMarginBottom","data-controls-axis":"y","data-controls-reverse":o?"":void 0,style:{position:"absolute",left:0,right:0,bottom:re,height:F,pointerEvents:"auto",zIndex:3}})]})})})})()]})]})};function Ex(e){return`
14353
14347
  .${e}-wrapper {
14354
14348
  position: relative;
14355
14349
  width: 100%;
@@ -14734,7 +14728,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
14734
14728
  pointer-events: auto;
14735
14729
  z-index: 10;
14736
14730
  }
14737
- `}const Ex=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=F.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),v=t??[],m=p&&v.length>0,g=()=>{v.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:kx(l)}}),c&&a.jsx("div",{className:`${l}-cover ${ri(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...ri(d)?{"--image-aspect-ratio":Oa(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${ri(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const x=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(Rx,{prefix:l,images:v,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),x)})()]})},Mx=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14731
+ `}const Mx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r})=>{const{prefix:l}=R.useScopedStyles(),{cover:c,coverFit:d}=e,u=s.useRef(null),[p,y]=s.useState(!1),x=t??[],m=p&&x.length>0,g=()=>{x.length!==0&&y(!0)};return s.useEffect(()=>{!n||i||o||y(!1)},[n,i,o]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:u,className:`${l}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Ex(l)}}),c&&a.jsx("div",{className:`${l}-cover ${ri(d)?`${l}-ratio-wrapper-cover`:`${l}-ratio-wrapper-fit`}`,onClick:()=>g(),style:{...ri(d)?{"--image-aspect-ratio":Oa(d)}:{}},"aria-label":"Open image gallery",children:a.jsx("img",{className:`${l}-cover-image ${ri(d)?`${l}-cover-image-cover`:`${l}-cover-image-fit`}`,src:c,alt:"cover"})})]}),m&&typeof document<"u"&&(()=>{const v=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(kx,{prefix:l,images:x,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,onClose:()=>y(!1)}),v)})()]})},Ax=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
14738
14732
  import { createPortal } from 'react-dom';
14739
14733
  import { CommonComponentProps } from '../props';
14740
14734
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -15280,7 +15274,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15280
15274
  </>
15281
15275
  );
15282
15276
  };
15283
- `,Ax="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Hi={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 Fx(e){const t={};return t[Zt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Nx=Ao.reduce((e,t)=>({...e,...Fx(t)}),{}),_x=Ao.reduce((e,t)=>({...e,[Zt(t,"fontFamily")]:"Goudy Bookletter 1911",[Zt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Zt(t,"letterSpacing")]:0,[Zt(t,"wordSpacing")]:0,[Zt(t,"textAlign")]:"left",[Zt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ps(e){return Ao.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Zt(n,"fontSize")]=i),o!==void 0&&(t[Zt(n,"lineHeight")]=o),t},{})}const Hx=Lx(),Wx={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"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},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:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",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","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",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:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},...Nx,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Ax,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",..._x},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...ps({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...ps({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...ps({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,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:[Hx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},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/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Ox={element:Ex,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Wx,sourceCode:Mx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Ao.map(e=>({path:`${Zt(e,"fontFamily")}`}))]},fontRelations:{...Ao.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Zt(t,"fontFamily")}`}),{})}},Dx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:v,backgroundColor:m,imageGap:g,maxWidth:x,maxHeight:b,textTransition:k,title1Width:f,title2Width:S,title3Width:W,title1MarginLeft:U=0,title2MarginLeft:B=0,title3MarginLeft:P=0,titleRowMarginBottom:_=0,titleHeaderLayout:G="single-row",countCloseGap:$=0,closeIcon:L,closeIconMaxWidth:D,closeIconColor:E,closeIconHoverColor:T,contentMarginTop:C=0,iconMarginRight:V=0}=n,w=s.useCallback(Te=>F.scalingValue(Te,i??!1),[i]),q=w(g??0),I=`${x}%`,A=`${b}%`,j=w($),ie=w(C),ae=w(V),O=Bi("title1",zi(n,"title1"),i),oe=Bi("title2",zi(n,"title2"),i),N=Bi("title3",zi(n,"title3"),i),le=Bi("count",zi(n,"count"),i),Q=G==="mobile",be=!i||!!r,Pe=!o&&(!i||!!r),ye=s.useMemo(()=>la(t,y),[t,y]),[ce,Y]=s.useState(l),se=ye[ce],pe=se==null?void 0:se.entry,[fe,we]=s.useState(!1),[Re,ge]=s.useState(null),[xe,Ce]=s.useState(!1),[h,K]=s.useState(null),[Z,ne]=s.useState(!1),[de,z]=s.useState(0),[R,ee]=s.useState(),[te,me]=s.useState(),[X,Ie]=s.useState(null),Se=s.useRef(null),J=s.useRef(0),He=s.useRef(0),We=s.useRef(0),ot=s.useRef(!1),qe=s.useRef(null),tt=s.useRef(null),et=s.useRef(null),Ge=s.useRef(null),ve=s.useRef(null),_e=s.useRef(null),Be=s.useRef(null),Ze=s.useCallback(()=>{const Te=tt.current;if(!Te)return;const Ye=Te.closest(`.${e}-lightbox-content-area`);if(!Ye)return Te.getBoundingClientRect().width;const M=Array.from(Ye.children).reduce((re,ue)=>!(ue instanceof HTMLElement)||ue.contains(Te)?re:re+ue.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-M},[e]),$e=s.useCallback(()=>{Se.current&&(clearTimeout(Se.current),Se.current=null)},[]),Ne=s.useCallback(Te=>{Te===J.current&&(K(null),ne(!1))},[]),Ue=s.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),we(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Je=s.useCallback(Te=>!!(Te.closest("[data-controls]")||Te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:it,mediaAreaStyle:Oe,overlayContentStyle:Ae,swipeHandlers:gt,dismissAreaStyle:ze}=rp({enabled:Pe,onClose:Ue,animMs:300,isBlockedTarget:Je}),De=s.useCallback(Te=>{c&&zu(Te+1,d,!0)},[c,d]),Xe=s.useCallback(Te=>{if(Te)return Te.getBoundingClientRect().height},[]),ct=s.useCallback(Te=>{if(ye.length===0)return;const Ye=(Te%ye.length+ye.length)%ye.length;if(Ye===ce)return;const M=ye[ce],re=ye[Ye];J.current+=1;const ue=J.current,ke=k==="fade"&&Lc(M==null?void 0:M.entry)!==Lc(re==null?void 0:re.entry),Ke=Xe(et.current),lt=ke?(()=>{const zt=Ze();Gn.flushSync(()=>{Ie(re.entry)}),et.current&&zt&&(et.current.style.width=`${zt}px`);const en=Xe(et.current);return et.current&&(et.current.style.width=""),{measuredIncomingTitlesHeight:en,incomingTitlesMeasureWidth:zt}})():void 0,Et=Math.max(Ke??0,(lt==null?void 0:lt.measuredIncomingTitlesHeight)??0)||void 0;z(ue),K(ce),ne(!0),Y(Ye),De(Ye),We.current=Ye,ke?($e(),Et&&ee(Et),lt!=null&&lt.incomingTitlesMeasureWidth&&me(lt.incomingTitlesMeasureWidth),ge((M==null?void 0:M.entryIndex)??null),Ce(!0),He.current=re.entryIndex,Se.current=setTimeout(()=>{ge(null),Ce(!1),ee(void 0),me(void 0),Ie(null),Se.current=null},400)):($e(),ge(null),Ce(!1),ee(void 0),me(void 0),Ie(null),He.current=re.entryIndex)},[ce,$e,Ze,Xe,ye,De,k]),he=s.useCallback(()=>{Be.current=null},[]),Ee=s.useCallback(Te=>{!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0||Te.target.closest("[data-controls]")||(Be.current={startX:Te.clientX,startY:Te.clientY,pointerId:Te.pointerId})},[be,ye.length]),nt=s.useCallback(Te=>{var zt;if(!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0)return;if(st){he();return}const Ye=Be.current;if(!Ye||Ye.pointerId!==Te.pointerId||(he(),Te.target.closest("[data-controls]")))return;const re=Te.clientX-Ye.startX,ue=Te.clientY-Ye.startY,ke=Math.abs(re),Ke=Math.abs(ue);if(ke>=Jy&&ke>Ke){ct(re>0?ce-1:ce+1);return}if(ke>wc||Ke>wc)return;const lt=(zt=Ge.current)==null?void 0:zt.getBoundingClientRect(),Et=lt?lt.left+lt.width/2:window.innerWidth/2;ct(Te.clientX<Et?ce-1:ce+1)},[ce,be,ct,st,he,ye.length]),pt=s.useCallback(Te=>{const Ye=Be.current;(Ye==null?void 0:Ye.pointerId)===Te.pointerId&&he()},[he]);Wl(),s.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Te=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ge.current&&Ge.current.focus()})});return()=>{cancelAnimationFrame(Te),qe.current&&clearTimeout(qe.current),Se.current&&clearTimeout(Se.current);const Ye=_e.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Te;k!=="fade"&&(He.current=((Te=ye[ce])==null?void 0:Te.entryIndex)??0,$e(),ge(null),Ce(!1),ee(void 0),me(void 0))},[ce,$e,ye,k]),s.useEffect(()=>{const Te=Ye=>{if(Ye.key==="Escape"){Ue();return}if(Ye.key==="ArrowLeft"&&ye.length>1){ct(ce-1);return}if(Ye.key==="ArrowRight"&&ye.length>1){ct(ce+1);return}if(Ye.key==="Tab"&&Ge.current){const M=Ge.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),re=Array.from(M).filter(lt=>!lt.closest('[aria-hidden="true"]'));if(re.length===0)return;const ue=re[0],ke=re[re.length-1],Ke=document.activeElement;Ye.shiftKey?(Ke===ue||!Ge.current.contains(Ke))&&(Ye.preventDefault(),ke.focus()):(Ke===ke||!Ge.current.contains(Ke))&&(Ye.preventDefault(),ue.focus())}};return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[ct,Ue,ce,ye.length]),s.useLayoutEffect(()=>{$e(),J.current=0,z(0),K(null),ne(!1),ge(null),Ce(!1),ee(void 0),me(void 0),Ie(null),Y(Te=>{const Ye=Math.max(0,ye.length-1);return Math.min(Te,Ye)})},[$e,t.length,y,ye.length]),s.useLayoutEffect(()=>{var M;const Te=Math.max(0,ye.length-1),Ye=Math.min(Math.max(0,l),Te);We.current=Ye,He.current=((M=ye[Ye])==null?void 0:M.entryIndex)??0,Y(Ye)},[l]);const Ve=Re!==null?t[Re]:null,vt=h!==null?ye[h]:null,Rt=(pe==null?void 0:pe.title1)||(pe==null?void 0:pe.title2)||(pe==null?void 0:pe.title3)||(Ve==null?void 0:Ve.title1)||(Ve==null?void 0:Ve.title2)||(Ve==null?void 0:Ve.title3),At=av(y,ye,t),wt=L!==null,Vt=Rt||At||wt,jt=At&&wt?{gap:j}:void 0,Kt=`${e}-titles-stack${Q?` ${e}-titles-stack-stacked`:""}`,Yt=`${e}-titles-layer-out${Q?` ${e}-titles-layer-out-stacked`:""}`,kt=`${e}-titles-layer-out`,Bt=(U??0)>0||o,rn=w(_),xt=s.useMemo(()=>({title1Width:f??bo.title1Width,title2Width:S??bo.title2Width,title3Width:W??bo.title3Width}),[f,S,W]),yt=s.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:P}),[B,P]),Me=s.useMemo(()=>pe?Si(e,pe,O,oe,N):[],[e,pe,O,oe,N]),Qe=s.useMemo(()=>Me.map(Te=>xt[Te.widthKey]),[Me,xt]),rt=s.useMemo(()=>Po(Me.length,Qe),[Me.length,Qe]),dt=s.useMemo(()=>yr(Me.length,Qe),[Me.length,Qe]),Pt=s.useMemo(()=>Me.filter(Te=>Te.prefix==="title1"),[Me]),St=s.useMemo(()=>Me.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),[Me]),ht=s.useMemo(()=>wi(Pt,xt),[Pt,xt]),Wt=s.useMemo(()=>wi(St,xt),[St,xt]),Tt=s.useCallback((Te,Ye)=>{const M=Me.findIndex(ue=>ue.prefix===Te.prefix);if(!Q||Ye==="single-row")return{effectiveWidth:dt[M]??0,resolvedWidth:rt[M]??0,maxWidth:yn(M,rt)};if(Ye==="two-row-top"){const ue=Pt.findIndex(ke=>ke.prefix===Te.prefix);return{effectiveWidth:ht.effective[ue]??0,resolvedWidth:ht.resolved[ue]??0,maxWidth:yn(ue,ht.resolved)}}const re=St.findIndex(ue=>ue.prefix===Te.prefix);return{effectiveWidth:Wt.effective[re]??0,resolvedWidth:Wt.resolved[re]??0,maxWidth:yn(re,Wt.resolved)}},[Me,St,Wt,dt,rt,Pt,ht,Q]),Ot=s.useCallback(Te=>Gu(Me,rt,yt,Te)+(Q?0:U??0),[Me,rt,yt,Q,U]),Gt=s.useCallback(()=>Q?0:U??0,[Q,U]),Mt=s.useCallback(Te=>St.slice(0,Te).reduce((Ye,M,re)=>Ye+(M.marginLeftKey?yt[M.marginLeftKey]??0:0)+(Wt.resolved[re]??0),0),[St,Wt.resolved,yt]),_t=s.useCallback(Te=>{const Ye=St[Te];return Mt(Te)+(Ye.marginLeftKey?yt[Ye.marginLeftKey]??0:0)+(Wt.resolved[Te]??0)},[St,Wt.resolved,Mt,yt]),Ft=s.useCallback((Te,Ye,M)=>{if(!Q||M==="single-row"){const lt=Te.findIndex(tn=>tn.prefix===Ye.prefix),Et=Te.map(tn=>xt[tn.widthKey]),zt=Po(Te.length,Et);return{effectiveWidth:yr(Te.length,Et)[lt]??0,resolvedWidth:zt[lt]??0,maxWidth:yn(lt,zt)}}if(M==="two-row-top"){const lt=Te.filter(tn=>tn.prefix==="title1"),Et=lt.findIndex(tn=>tn.prefix===Ye.prefix),{resolved:zt,effective:en}=wi(lt,xt);return{effectiveWidth:en[Et]??0,resolvedWidth:zt[Et]??0,maxWidth:yn(Et,zt)}}const re=Te.filter(lt=>lt.prefix==="title2"||lt.prefix==="title3"),ue=re.findIndex(lt=>lt.prefix===Ye.prefix),{resolved:ke,effective:Ke}=wi(re,xt);return{effectiveWidth:Ke[ue]??0,resolvedWidth:ke[ue]??0,maxWidth:yn(ue,ke)}},[xt,Q]),ut=(Te,Ye,M)=>{const re=Te.marginLeftKey?yt[Te.marginLeftKey]??0:0,{effectiveWidth:ue,resolvedWidth:ke,maxWidth:Ke}=M??Tt(Te,Ye),lt=Math.max(re,ei),Et=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Te.prefix,style:{width:w(ue),...re>0?{marginLeft:w(re)}:{}},children:[a.jsx("p",{className:Te.className,style:Te.style,children:Te.text}),Et&&Te.marginLeftKey?a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:w(-re),width:w(lt),height:"100%",pointerEvents:"auto"}}):null,Et?a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:w(-Ln/2),width:w(Ln),height:"100%",pointerEvents:"auto"}}):null]},Te.className)},H=(Te="two-row")=>{const Ye=Me.findIndex(ue=>ue.prefix==="title1"),M=Ye>=0?rt[Ye]:xt.title1Width,re=Te==="two-row"&&o;return a.jsx("div",{...re?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(M)}:{},style:{width:w(U??0),flexShrink:0,alignSelf:"stretch",...re?{pointerEvents:"auto"}:{}}})},Le=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),je=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:rv(ye,ce,y,t)}),Fe=()=>At?o&&wt?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[je(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ns(j)} + ${j}))`,width:ns(j),height:"100%",pointerEvents:"auto",zIndex:3}})]}):je():null,ft=()=>!At&&!wt?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:jt,children:[Fe(),wt?Lt():null]}),Ht=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Rt?Le():null,Bt?H("single-row"):null,Dt(pe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ft(),xn()]}),mt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||Rt?Le():null,Bt?H("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:xe&&R?{minHeight:R}:void 0,children:[a.jsx("div",{ref:et,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Un(X||pe)}),a.jsxs("div",{ref:tt,className:Kt,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%",...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[Ve&&xe?a.jsx("div",{className:`${Yt} ${e}-titles-fade-out`,children:Un(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Un(pe)})]})]}),ft(),xn()]}),Lt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:F.scalingValue(D??0,i),height:F.scalingValue(D??0,i),marginRight:ae,"--close-icon-hover-color":T},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ue,"aria-label":"Close",children:a.jsx(mn,{url:L??"",fill:E,hoverFill:i&&!r?E:T,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ae,height:"100%",pointerEvents:"auto"}})]}),Ut=(Te,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||Rt?Le():null,Bt?H("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:Te}):a.jsxs(a.Fragment,{children:[Te,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ft()]}),Dt=Te=>{if(!Te)return null;const Ye=Si(e,Te,O,oe,N);return a.jsx(a.Fragment,{children:Ye.map(M=>ut(M,"single-row",Ft(Ye,M,"single-row")))})},an=Te=>{if(!Te)return null;const Ye=Si(e,Te,O,oe,N),M=Ye.find(re=>re.prefix==="title1");return M?ut(M,"two-row-top",Ft(Ye,M,"two-row-top")):null},ln=(Te,Ye=!1)=>{const M=Te?Si(e,Te,O,oe,N):[],re=M.filter(Ke=>Ke.prefix==="title2"||Ke.prefix==="title3"),ue=o&&Ye;return re.length>0||ue||(_??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[re.map(Ke=>ut(Ke,"two-row-bottom",Ft(M,Ke,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[Vo(),Go()]}):null]}):null,(_??0)>0||ue?a.jsx("div",{"data-controls":ue?"titleRowMarginBottom":void 0,"data-controls-axis":ue?"y":void 0,"data-controls-reverse":ue?"":void 0,className:ue?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:ue?"auto":"none"}}):null]}):null},qn=(Te,Ye=!1)=>a.jsxs(a.Fragment,{children:[Ut(an(Te)),ln(Te,Ye)]}),Un=Te=>Q?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn(Te)}):Te?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Dt(Te)}):null,Zi=()=>{const Te=Q?-1:Me.findIndex(re=>re.prefix==="title1"),Ye=!Q&&(o||(U??0)>0)?(()=>{const re=U??0,ue=Te>=0?rt[Te]:xt.title1Width,ke=Math.max(re,ei);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:0,width:w(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,M=Me.flatMap((re,ue)=>{if(!re.marginLeftKey)return[];const ke=yt[re.marginLeftKey]??0,Ke=Vu(Me,rt,yt,ue)+Gt(),lt=Math.max(ke,ei);return a.jsx("div",{"data-controls":re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(rt[ue]),style:{position:"absolute",top:0,left:w(Ke),width:w(lt),height:"100%",pointerEvents:"auto"}},re.marginLeftKey)});return Ye?[Ye,...M]:M},hn=()=>Me.map((Te,Ye)=>{const M=yn(Ye,rt),ue=Ot(Ye)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(M),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(ue),width:w(Ln),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),Vo=()=>St.flatMap((Te,Ye)=>{if(!Te.marginLeftKey)return[];const M=yt[Te.marginLeftKey]??0,re=Mt(Ye),ue=Math.max(M,ei),{resolvedWidth:ke}=Tt(Te,"two-row-bottom");return a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:w(re),width:w(ue),height:"100%",pointerEvents:"auto"}},Te.marginLeftKey)}),Go=()=>St.map((Te,Ye)=>{const{maxWidth:M}=Tt(Te,"two-row-bottom"),ue=_t(Ye)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(M),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(ue),width:w(Ln),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),xn=()=>!o||Q?null:a.jsxs(a.Fragment,{children:[Zi(),hn()]}),li=Te=>{const Ye=!Te.objectFit&&ri(v);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:I,maxHeight:A,...Ye?{"--image-aspect-ratio":Oa(v)}:{}}}},Ji=Te=>Te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Te.objectFit}}:ri(v)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},bn=Te=>{if(Te.length===0)return null;const Ye=Te.length>1,M=ns(q),re=`calc(-0.5 * (${M} + ${q}))`;if(Te.length===1){const ue=Te[0];return a.jsx("div",{...li(ue),children:a.jsx("img",{...Ji(ue),src:ue.url,alt:ue.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:q}:void 0,children:Te.map((ue,ke)=>a.jsxs("div",{...li(ue),children:[a.jsx("img",{...Ji(ue),src:ue.url,alt:ue.name??"",draggable:!1}),o&&Ye&&ke<Te.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:re,width:M,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ue.url}-${ke}`))})},Kn=!!(pe!=null&&pe.title2||pe!=null&&pe.title3||Ve!=null&&Ve.title2||Ve!=null&&Ve.title3||(_??0)>0||o),Qi=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:et,className:Kt,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(X||pe)}),a.jsxs("div",{ref:tt,className:`${e}-titles-row-two-row`,style:{...xe&&R?{minHeight:R}:void 0,...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[Ut(a.jsxs("div",{className:Kt,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%"},children:[Ve&&xe?a.jsx("div",{className:`${kt} ${e}-titles-fade-out`,children:an(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:an(pe)})]}),xe&&R?R:void 0),Kn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ve&&xe?a.jsx("div",{className:`${Yt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:ln(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Q?` ${e}-titles-layer-in-stacked`:""}`,children:ln(pe,!0)})]}):null]})]}),eo=()=>{const Te=Kn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Te?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Te?void 0:{flex:"0 0 auto",height:"auto"},children:qn(pe,!0)}),xn()]})};return a.jsxs("div",{ref:Ge,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Ue()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:wt?void 0:-1,style:{opacity:fe?1:0,transition:"opacity 300ms ease",pointerEvents:fe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...it}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:ze,...gt,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Oe,onClick:Te=>Te.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ye.length>1?"true":"false",onPointerDown:be?Ee:void 0,onPointerUp:be?nt:void 0,onPointerCancel:be?pt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[vt&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Te=>{Te.target===Te.currentTarget&&Ne(de)},children:a.jsx("div",{className:`${e}-slide-area`,children:bn(vt.images)})},`slide-out-${de}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:se?bn(se.images):null})},`slide-in-${de}-${ce}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Ae,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Q?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:Vt&&a.jsx("div",{className:`${e}-text-bar-cell${Q?` ${e}-text-bar-cell-stacked`:""}`,style:Q?void 0:{flex:1,minWidth:0,width:"100%"},children:Q?k==="fade"?Qi():eo():k==="fade"?mt():Ht()})})})]})]})]})};function zx(e){return`
15277
+ `,Fx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Hi={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 Nx(e){const t={};return t[Zt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSettings")]={...Hi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[Zt(e,"fontSize")]={...Hi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[Zt(e,"lineHeight")]={...Hi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[Zt(e,"letterSpacing")]={...Hi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[Zt(e,"wordSpacing")]={...Hi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[Zt(e,"textAlign")]={...Hi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[Zt(e,"textAppearance")]={...Hi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const _x=Mo.reduce((e,t)=>({...e,...Nx(t)}),{}),Hx=Mo.reduce((e,t)=>({...e,[Zt(t,"fontFamily")]:"Goudy Bookletter 1911",[Zt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[Zt(t,"letterSpacing")]:0,[Zt(t,"wordSpacing")]:0,[Zt(t,"textAlign")]:"left",[Zt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ps(e){return Mo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[Zt(n,"fontSize")]=i),o!==void 0&&(t[Zt(n,"lineHeight")]=o),t},{})}const Wx=Px(),Ox={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"}}},thumbnailSize:{type:"number",scope:"layout",title:"Thumbnail Size",min:0,display:{type:"range-control"}},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:"layout",title:"Icon Default",display:{type:"settings-color-picker"}},closeIconHoverColor:{type:"string",scope:"layout",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","none"]}},thumbnailActiveColor:{type:"string",scope:"layout",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:"layout",title:"Title Default",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"layout",title:"Subtitle Default",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"layout",title:"Caption Default",display:{type:"palette-color-picker"}},..._x,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Fx,thumbnailObjectFit:{display:"fit",ratioValue:"16:9",reversed:!1},thumbnailTrigger:"click",thumbnailActive:"color",...Hx},layoutDefaults:{m:{thumbnailSize:.1,thumbnailVisibility:"off",titleHeaderLayout:"mobile",thumbnailGap:.04,thumbnailMarginBottom:.04,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",title1Width:.25,title2Width:.6,title3Width:.25,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.04,titleRowMarginBottom:.08,closeIconMaxWidth:.04,contentMarginTop:.08,iconMarginLeft:.02,...ps({title1FontSize:.042,title1LineHeight:.042,title2FontSize:.042,title2LineHeight:.042,title3FontSize:.042,title3LineHeight:.042})},t:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.039,contentMarginTop:.015,iconMarginLeft:.02,...ps({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208})},d:{thumbnailSize:.03,thumbnailVisibility:"on",titleHeaderLayout:"desktop",thumbnailGap:.02,thumbnailMarginBottom:.007,imageGap:.005,backgroundColor:"#FFFFFF",closeIconColor:"#FFFFFF",closeIconHoverColor:"#cccccc",thumbnailActiveColor:"#ffffff",title1Color:"#FFFFFF",title2Color:"#FFFFFF",title3Color:"#FFFFFF",title1Width:.29,title2Width:.13,title3Width:.14,title1MarginLeft:.015,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,closeIconMaxWidth:.02,contentMarginTop:.015,iconMarginLeft:.02,...ps({title1FontSize:.011,title1LineHeight:.02,title2FontSize:.011,title2LineHeight:.02,title3FontSize:.011,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:[Wx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor","thumbnailActiveColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"contain",type:"media-input"}},title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"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/Component-default-2.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"},title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage"}]}},Dx={element:Mx,id:"lightbox-strip",name:"Strip",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Strip.mp4"},schema:Ox,sourceCode:Ax,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Mo.map(e=>({path:`${Zt(e,"fontFamily")}`}))]},fontRelations:{...Mo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${Zt(t,"fontFamily")}`}),{})}},zx=({prefix:e,entries:t,settings:n,isEditor:i,isEditMode:o,isPreviewMode:r,initialSlideIndex:l=0,enableUrlSync:c=!1,journalItemId:d=null,onBeforeClose:u,onClose:p})=>{const{type:y,coverFit:x,backgroundColor:m,imageGap:g,maxWidth:v,maxHeight:b,textTransition:M,title1Width:f,title2Width:S,title3Width:W,title1MarginLeft:U=0,title2MarginLeft:B=0,title3MarginLeft:P=0,titleRowMarginBottom:H=0,titleHeaderLayout:V="single-row",countCloseGap:$=0,closeIcon:L,closeIconMaxWidth:D,closeIconColor:A,closeIconHoverColor:T,contentMarginTop:C=0,iconMarginRight:X=0}=n,w=s.useCallback(Te=>R.scalingValue(Te,i??!1),[i]),q=w(g??0),k=`${v}%`,N=`${b}%`,j=w($),ie=w(C),ae=w(X),O=Bi("title1",zi(n,"title1"),i),oe=Bi("title2",zi(n,"title2"),i),_=Bi("title3",zi(n,"title3"),i),le=Bi("count",zi(n,"count"),i),Q=V==="mobile",be=!i||!!r,Le=!o&&(!i||!!r),ye=s.useMemo(()=>la(t,y),[t,y]),[ce,Y]=s.useState(l),se=ye[ce],pe=se==null?void 0:se.entry,[fe,we]=s.useState(!1),[Re,ge]=s.useState(null),[xe,Ce]=s.useState(!1),[h,K]=s.useState(null),[Z,ne]=s.useState(!1),[de,z]=s.useState(0),[I,ee]=s.useState(),[te,me]=s.useState(),[G,Ie]=s.useState(null),Se=s.useRef(null),J=s.useRef(0),He=s.useRef(0),We=s.useRef(0),ot=s.useRef(!1),qe=s.useRef(null),tt=s.useRef(null),et=s.useRef(null),Ge=s.useRef(null),ve=s.useRef(null),_e=s.useRef(null),je=s.useRef(null),Ze=s.useCallback(()=>{const Te=tt.current;if(!Te)return;const Ye=Te.closest(`.${e}-lightbox-content-area`);if(!Ye)return Te.getBoundingClientRect().width;const F=Array.from(Ye.children).reduce((re,ue)=>!(ue instanceof HTMLElement)||ue.contains(Te)?re:re+ue.getBoundingClientRect().width,0);return Ye.getBoundingClientRect().width-F},[e]),$e=s.useCallback(()=>{Se.current&&(clearTimeout(Se.current),Se.current=null)},[]),Ne=s.useCallback(Te=>{Te===J.current&&(K(null),ne(!1))},[]),Ue=s.useCallback(()=>{o||ot.current||(ot.current=!0,u==null||u(),we(!1),qe.current=setTimeout(()=>{p()},300))},[o,u,p]),Je=s.useCallback(Te=>!!(Te.closest("[data-controls]")||Te.closest(`.${e}-close-icon`)),[e]),{isSwipeDragging:st,backdropStyle:it,mediaAreaStyle:Oe,overlayContentStyle:Fe,swipeHandlers:ut,dismissAreaStyle:ze}=rp({enabled:Le,onClose:Ue,animMs:300,isBlockedTarget:Je}),De=s.useCallback(Te=>{c&&zu(Te+1,d,!0)},[c,d]),Xe=s.useCallback(Te=>{if(Te)return Te.getBoundingClientRect().height},[]),pt=s.useCallback(Te=>{if(ye.length===0)return;const Ye=(Te%ye.length+ye.length)%ye.length;if(Ye===ce)return;const F=ye[ce],re=ye[Ye];J.current+=1;const ue=J.current,ke=M==="fade"&&Lc(F==null?void 0:F.entry)!==Lc(re==null?void 0:re.entry),Ke=Xe(et.current),dt=ke?(()=>{const Dt=Ze();Gn.flushSync(()=>{Ie(re.entry)}),et.current&&Dt&&(et.current.style.width=`${Dt}px`);const en=Xe(et.current);return et.current&&(et.current.style.width=""),{measuredIncomingTitlesHeight:en,incomingTitlesMeasureWidth:Dt}})():void 0,Et=Math.max(Ke??0,(dt==null?void 0:dt.measuredIncomingTitlesHeight)??0)||void 0;z(ue),K(ce),ne(!0),Y(Ye),De(Ye),We.current=Ye,ke?($e(),Et&&ee(Et),dt!=null&&dt.incomingTitlesMeasureWidth&&me(dt.incomingTitlesMeasureWidth),ge((F==null?void 0:F.entryIndex)??null),Ce(!0),He.current=re.entryIndex,Se.current=setTimeout(()=>{ge(null),Ce(!1),ee(void 0),me(void 0),Ie(null),Se.current=null},400)):($e(),ge(null),Ce(!1),ee(void 0),me(void 0),Ie(null),He.current=re.entryIndex)},[ce,$e,Ze,Xe,ye,De,M]),he=s.useCallback(()=>{je.current=null},[]),Me=s.useCallback(Te=>{!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0||Te.target.closest("[data-controls]")||(je.current={startX:Te.clientX,startY:Te.clientY,pointerId:Te.pointerId})},[be,ye.length]),nt=s.useCallback(Te=>{var Dt;if(!be||ye.length<=1||Te.pointerType==="mouse"&&Te.button!==0)return;if(st){he();return}const Ye=je.current;if(!Ye||Ye.pointerId!==Te.pointerId||(he(),Te.target.closest("[data-controls]")))return;const re=Te.clientX-Ye.startX,ue=Te.clientY-Ye.startY,ke=Math.abs(re),Ke=Math.abs(ue);if(ke>=Jy&&ke>Ke){pt(re>0?ce-1:ce+1);return}if(ke>wc||Ke>wc)return;const dt=(Dt=Ge.current)==null?void 0:Dt.getBoundingClientRect(),Et=dt?dt.left+dt.width/2:window.innerWidth/2;pt(Te.clientX<Et?ce-1:ce+1)},[ce,be,pt,st,he,ye.length]),gt=s.useCallback(Te=>{const Ye=je.current;(Ye==null?void 0:Ye.pointerId)===Te.pointerId&&he()},[he]);Wl(),s.useEffect(()=>{_e.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const Te=requestAnimationFrame(()=>{we(!0),requestAnimationFrame(()=>{ve.current?ve.current.focus():Ge.current&&Ge.current.focus()})});return()=>{cancelAnimationFrame(Te),qe.current&&clearTimeout(qe.current),Se.current&&clearTimeout(Se.current);const Ye=_e.current;Ye&&document.contains(Ye)&&Ye.focus({preventScroll:!0})}},[]),s.useEffect(()=>{var Te;M!=="fade"&&(He.current=((Te=ye[ce])==null?void 0:Te.entryIndex)??0,$e(),ge(null),Ce(!1),ee(void 0),me(void 0))},[ce,$e,ye,M]),s.useEffect(()=>{const Te=Ye=>{if(Ye.key==="Escape"){Ue();return}if(Ye.key==="ArrowLeft"&&ye.length>1){pt(ce-1);return}if(Ye.key==="ArrowRight"&&ye.length>1){pt(ce+1);return}if(Ye.key==="Tab"&&Ge.current){const F=Ge.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),re=Array.from(F).filter(dt=>!dt.closest('[aria-hidden="true"]'));if(re.length===0)return;const ue=re[0],ke=re[re.length-1],Ke=document.activeElement;Ye.shiftKey?(Ke===ue||!Ge.current.contains(Ke))&&(Ye.preventDefault(),ke.focus()):(Ke===ke||!Ge.current.contains(Ke))&&(Ye.preventDefault(),ue.focus())}};return window.addEventListener("keydown",Te),()=>window.removeEventListener("keydown",Te)},[pt,Ue,ce,ye.length]),s.useLayoutEffect(()=>{$e(),J.current=0,z(0),K(null),ne(!1),ge(null),Ce(!1),ee(void 0),me(void 0),Ie(null),Y(Te=>{const Ye=Math.max(0,ye.length-1);return Math.min(Te,Ye)})},[$e,t.length,y,ye.length]),s.useLayoutEffect(()=>{var F;const Te=Math.max(0,ye.length-1),Ye=Math.min(Math.max(0,l),Te);We.current=Ye,He.current=((F=ye[Ye])==null?void 0:F.entryIndex)??0,Y(Ye)},[l]);const Ve=Re!==null?t[Re]:null,yt=h!==null?ye[h]:null,It=(pe==null?void 0:pe.title1)||(pe==null?void 0:pe.title2)||(pe==null?void 0:pe.title3)||(Ve==null?void 0:Ve.title1)||(Ve==null?void 0:Ve.title2)||(Ve==null?void 0:Ve.title3),At=av(y,ye,t),St=L!==null,Vt=It||At||St,jt=At&&St?{gap:j}:void 0,Ut=`${e}-titles-stack${Q?` ${e}-titles-stack-stacked`:""}`,Kt=`${e}-titles-layer-out${Q?` ${e}-titles-layer-out-stacked`:""}`,Rt=`${e}-titles-layer-out`,zt=(U??0)>0||o,rn=w(H),vt=s.useMemo(()=>({title1Width:f??xo.title1Width,title2Width:S??xo.title2Width,title3Width:W??xo.title3Width}),[f,S,W]),ft=s.useMemo(()=>({title2MarginLeft:B,title3MarginLeft:P}),[B,P]),Ae=s.useMemo(()=>pe?Si(e,pe,O,oe,_):[],[e,pe,O,oe,_]),Qe=s.useMemo(()=>Ae.map(Te=>vt[Te.widthKey]),[Ae,vt]),at=s.useMemo(()=>Lo(Ae.length,Qe),[Ae.length,Qe]),mt=s.useMemo(()=>yr(Ae.length,Qe),[Ae.length,Qe]),Lt=s.useMemo(()=>Ae.filter(Te=>Te.prefix==="title1"),[Ae]),bt=s.useMemo(()=>Ae.filter(Te=>Te.prefix==="title2"||Te.prefix==="title3"),[Ae]),kt=s.useMemo(()=>wi(Lt,vt),[Lt,vt]),Bt=s.useMemo(()=>wi(bt,vt),[bt,vt]),lt=s.useCallback((Te,Ye)=>{const F=Ae.findIndex(ue=>ue.prefix===Te.prefix);if(!Q||Ye==="single-row")return{effectiveWidth:mt[F]??0,resolvedWidth:at[F]??0,maxWidth:yn(F,at)};if(Ye==="two-row-top"){const ue=Lt.findIndex(ke=>ke.prefix===Te.prefix);return{effectiveWidth:kt.effective[ue]??0,resolvedWidth:kt.resolved[ue]??0,maxWidth:yn(ue,kt.resolved)}}const re=bt.findIndex(ue=>ue.prefix===Te.prefix);return{effectiveWidth:Bt.effective[re]??0,resolvedWidth:Bt.resolved[re]??0,maxWidth:yn(re,Bt.resolved)}},[Ae,bt,Bt,mt,at,Lt,kt,Q]),Ht=s.useCallback(Te=>Gu(Ae,at,ft,Te)+(Q?0:U??0),[Ae,at,ft,Q,U]),Yt=s.useCallback(()=>Q?0:U??0,[Q,U]),Mt=s.useCallback(Te=>bt.slice(0,Te).reduce((Ye,F,re)=>Ye+(F.marginLeftKey?ft[F.marginLeftKey]??0:0)+(Bt.resolved[re]??0),0),[bt,Bt.resolved,ft]),Nt=s.useCallback(Te=>{const Ye=bt[Te];return Mt(Te)+(Ye.marginLeftKey?ft[Ye.marginLeftKey]??0:0)+(Bt.resolved[Te]??0)},[bt,Bt.resolved,Mt,ft]),Ft=s.useCallback((Te,Ye,F)=>{if(!Q||F==="single-row"){const dt=Te.findIndex(tn=>tn.prefix===Ye.prefix),Et=Te.map(tn=>vt[tn.widthKey]),Dt=Lo(Te.length,Et);return{effectiveWidth:yr(Te.length,Et)[dt]??0,resolvedWidth:Dt[dt]??0,maxWidth:yn(dt,Dt)}}if(F==="two-row-top"){const dt=Te.filter(tn=>tn.prefix==="title1"),Et=dt.findIndex(tn=>tn.prefix===Ye.prefix),{resolved:Dt,effective:en}=wi(dt,vt);return{effectiveWidth:en[Et]??0,resolvedWidth:Dt[Et]??0,maxWidth:yn(Et,Dt)}}const re=Te.filter(dt=>dt.prefix==="title2"||dt.prefix==="title3"),ue=re.findIndex(dt=>dt.prefix===Ye.prefix),{resolved:ke,effective:Ke}=wi(re,vt);return{effectiveWidth:Ke[ue]??0,resolvedWidth:ke[ue]??0,maxWidth:yn(ue,ke)}},[vt,Q]),$t=(Te,Ye,F)=>{const re=Te.marginLeftKey?ft[Te.marginLeftKey]??0:0,{effectiveWidth:ue,resolvedWidth:ke,maxWidth:Ke}=F??lt(Te,Ye),dt=Math.max(re,ei),Et=o&&Ye==="two-row-top";return a.jsxs("div",{className:`${e}-title-cell`,"data-title":Te.prefix,style:{width:w(ue),...re>0?{marginLeft:w(re)}:{}},children:[a.jsx("p",{className:Te.className,style:Te.style,children:Te.text}),Et&&Te.marginLeftKey?a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:w(-re),width:w(dt),height:"100%",pointerEvents:"auto"}}):null,Et?a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(Ke),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,right:w(-Ln/2),width:w(Ln),height:"100%",pointerEvents:"auto"}}):null]},Te.className)},E=(Te="two-row")=>{const Ye=Ae.findIndex(ue=>ue.prefix==="title1"),F=Ye>=0?at[Ye]:vt.title1Width,re=Te==="two-row"&&o;return a.jsx("div",{...re?{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(F)}:{},style:{width:w(U??0),flexShrink:0,alignSelf:"stretch",...re?{pointerEvents:"auto"}:{}}})},Pe=()=>a.jsx("span",{className:`${e}-titles-baseline-strut`,style:O,"aria-hidden":"true",children:" "}),Be=()=>a.jsx("span",{className:`${e}-entry-counter`,style:le,"aria-live":"polite","aria-atomic":"true",children:rv(ye,ce,y,t)}),Ee=()=>At?o&&St?a.jsxs("div",{className:`${e}-text-bar-cell`,style:{flexShrink:0},children:[Be(),a.jsx("div",{"data-controls":"countCloseGap","data-controls-axis":"x","data-controls-reverse":"true",style:{position:"absolute",top:0,right:`calc(-0.5 * (${ns(j)} + ${j}))`,width:ns(j),height:"100%",pointerEvents:"auto",zIndex:3}})]}):Be():null,ct=()=>!At&&!St?null:a.jsxs("div",{className:`${e}-titles-row-header-controls`,style:jt,children:[Ee(),St?Tt():null]}),Wt=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||It?Pe():null,zt?E("single-row"):null,Ot(pe),a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"}),ct(),xn()]}),ht=()=>a.jsxs("div",{className:`${e}-titles-row ${e}-titles-row-header`,style:{width:"100%",position:"relative"},children:[At||It?Pe():null,zt?E("single-row"):null,a.jsxs("div",{className:`${e}-titles-row-titles`,style:xe&&I?{minHeight:I}:void 0,children:[a.jsx("div",{ref:et,className:Ut,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:Un(G||pe)}),a.jsxs("div",{ref:tt,className:Ut,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%",...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[Ve&&xe?a.jsx("div",{className:`${Kt} ${e}-titles-fade-out`,children:Un(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:Un(pe)})]})]}),ct(),xn()]}),Tt=()=>a.jsxs("div",{className:`${e}-close-icon`,style:{width:R.scalingValue(D??0,i),height:R.scalingValue(D??0,i),marginRight:ae,"--close-icon-hover-color":T},children:[a.jsx("button",{ref:ve,type:"button",className:`${e}-close-icon-inner`,onClick:Ue,"aria-label":"Close",children:a.jsx(mn,{url:L??"",fill:A,hoverFill:i&&!r?A:T,className:`${e}-close-icon-img`})}),o&&a.jsx("div",{"data-controls":"iconMarginRight","data-controls-axis":"x","data-controls-reverse":"",className:`${e}-control`,style:{position:"absolute",top:0,left:"100%",width:ae,height:"100%",pointerEvents:"auto"}})]}),qt=(Te,Ye)=>a.jsxs("div",{className:`${e}-titles-row-top`,children:[At||It?Pe():null,zt?E("two-row"):null,Ye!==void 0?a.jsx("div",{className:`${e}-titles-row-titles`,style:{position:"relative",flex:1,minWidth:0,minHeight:Ye},children:Te}):a.jsxs(a.Fragment,{children:[Te,a.jsx("div",{style:{flex:1,minWidth:0},"aria-hidden":"true"})]}),ct()]}),Ot=Te=>{if(!Te)return null;const Ye=Si(e,Te,O,oe,_);return a.jsx(a.Fragment,{children:Ye.map(F=>$t(F,"single-row",Ft(Ye,F,"single-row")))})},an=Te=>{if(!Te)return null;const Ye=Si(e,Te,O,oe,_),F=Ye.find(re=>re.prefix==="title1");return F?$t(F,"two-row-top",Ft(Ye,F,"two-row-top")):null},ln=(Te,Ye=!1)=>{const F=Te?Si(e,Te,O,oe,_):[],re=F.filter(Ke=>Ke.prefix==="title2"||Ke.prefix==="title3"),ue=o&&Ye;return re.length>0||ue||(H??0)>0?a.jsxs("div",{className:`${e}-titles-row-bottom-wrap`,children:[re.length>0?a.jsxs("div",{className:`${e}-titles-row-bottom`,children:[re.map(Ke=>$t(Ke,"two-row-bottom",Ft(F,Ke,"two-row-bottom"))),Ye&&o?a.jsxs(a.Fragment,{children:[jo(),Vo()]}):null]}):null,(H??0)>0||ue?a.jsx("div",{"data-controls":ue?"titleRowMarginBottom":void 0,"data-controls-axis":ue?"y":void 0,"data-controls-reverse":ue?"":void 0,className:ue?`${e}-control`:void 0,style:{height:rn,width:"100%",flexShrink:0,pointerEvents:ue?"auto":"none"}}):null]}):null},qn=(Te,Ye=!1)=>a.jsxs(a.Fragment,{children:[qt(an(Te)),ln(Te,Ye)]}),Un=Te=>Q?a.jsx("div",{className:`${e}-titles-row-two-row`,children:qn(Te)}):Te?a.jsx("div",{className:`${e}-titles-row`,style:{width:"100%"},children:Ot(Te)}):null,Zi=()=>{const Te=Q?-1:Ae.findIndex(re=>re.prefix==="title1"),Ye=!Q&&(o||(U??0)>0)?(()=>{const re=U??0,ue=Te>=0?at[Te]:vt.title1Width,ke=Math.max(re,ei);return a.jsx("div",{"data-controls":"title1MarginLeft","data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ue),style:{position:"absolute",top:0,left:0,width:w(ke),height:"100%",pointerEvents:"auto"}},"title1MarginLeft")})():null,F=Ae.flatMap((re,ue)=>{if(!re.marginLeftKey)return[];const ke=ft[re.marginLeftKey]??0,Ke=Vu(Ae,at,ft,ue)+Yt(),dt=Math.max(ke,ei);return a.jsx("div",{"data-controls":re.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(at[ue]),style:{position:"absolute",top:0,left:w(Ke),width:w(dt),height:"100%",pointerEvents:"auto"}},re.marginLeftKey)});return Ye?[Ye,...F]:F},hn=()=>Ae.map((Te,Ye)=>{const F=yn(Ye,at),ue=Ht(Ye)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(ue),width:w(Ln),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),jo=()=>bt.flatMap((Te,Ye)=>{if(!Te.marginLeftKey)return[];const F=ft[Te.marginLeftKey]??0,re=Mt(Ye),ue=Math.max(F,ei),{resolvedWidth:ke}=lt(Te,"two-row-bottom");return a.jsx("div",{"data-controls":Te.marginLeftKey,"data-controls-axis":"x","data-controls-min":"0","data-controls-max-fraction":String(ke),style:{position:"absolute",top:0,left:w(re),width:w(ue),height:"100%",pointerEvents:"auto"}},Te.marginLeftKey)}),Vo=()=>bt.map((Te,Ye)=>{const{maxWidth:F}=lt(Te,"two-row-bottom"),ue=Nt(Ye)-Ln/2;return a.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:a.jsx("div",{"data-controls":Te.widthKey,"data-controls-axis":"x","data-controls-max-fraction":String(F),"data-controls-variant":"column-width",className:`${e}-title-resize-handle`,style:{position:"absolute",top:0,left:w(ue),width:w(Ln),height:"100%",pointerEvents:"auto"}})},`${Te.widthKey}-junction`)}),xn=()=>!o||Q?null:a.jsxs(a.Fragment,{children:[Zi(),hn()]}),li=Te=>{const Ye=!Te.objectFit&&ri(x);return{className:`${e}-slide-image-cell${Ye?` ${e}-slide-image-cell-cover`:""}`,style:{maxWidth:k,maxHeight:N,...Ye?{"--image-aspect-ratio":Oa(x)}:{}}}},Ji=Te=>Te.objectFit?{className:`${e}-slide-image ${e}-slide-image-custom`,style:{"--image-object-fit":Te.objectFit}}:ri(x)?{className:`${e}-slide-image ${e}-slide-image-cover`}:{className:`${e}-slide-image ${e}-slide-image-fit`},bn=Te=>{if(Te.length===0)return null;const Ye=Te.length>1,F=ns(q),re=`calc(-0.5 * (${F} + ${q}))`;if(Te.length===1){const ue=Te[0];return a.jsx("div",{...li(ue),children:a.jsx("img",{...Ji(ue),src:ue.url,alt:ue.name??"",draggable:!1})})}return a.jsx("div",{className:`${e}-slide-inner`,style:Ye?{gap:q}:void 0,children:Te.map((ue,ke)=>a.jsxs("div",{...li(ue),children:[a.jsx("img",{...Ji(ue),src:ue.url,alt:ue.name??"",draggable:!1}),o&&Ye&&ke<Te.length-1&&a.jsx("div",{"data-controls":"imageGap","data-controls-axis":"x",style:{position:"absolute",top:0,right:re,width:F,height:"100%",pointerEvents:"auto",zIndex:3}})]},`${ue.url}-${ke}`))})},Kn=!!(pe!=null&&pe.title2||pe!=null&&pe.title3||Ve!=null&&Ve.title2||Ve!=null&&Ve.title3||(H??0)>0||o),Qi=()=>a.jsxs("div",{style:{position:"relative",width:"100%",flex:1,alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,height:"100%"},children:[a.jsx("div",{ref:et,className:Ut,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,right:0,top:0,width:"100%",height:"auto"},"aria-hidden":"true",children:qn(G||pe)}),a.jsxs("div",{ref:tt,className:`${e}-titles-row-two-row`,style:{...xe&&I?{minHeight:I}:void 0,...xe&&te?{width:te,maxWidth:"100%"}:void 0},children:[qt(a.jsxs("div",{className:Ut,style:{position:xe?"absolute":"relative",inset:xe?0:void 0,width:"100%"},children:[Ve&&xe?a.jsx("div",{className:`${Rt} ${e}-titles-fade-out`,children:an(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}`,children:an(pe)})]}),xe&&I?I:void 0),Kn?a.jsxs("div",{className:`${e}-titles-row-bottom-area`,children:[Ve&&xe?a.jsx("div",{className:`${Kt} ${e}-titles-layer-out-bottom ${e}-titles-fade-out`,children:ln(Ve)}):null,a.jsx("div",{className:`${e}-titles-layer-in${xe?` ${e}-titles-layer-in-fading ${e}-titles-fade-in`:""}${Q?` ${e}-titles-layer-in-stacked`:""}`,children:ln(pe,!0)})]}):null]})]}),eo=()=>{const Te=Kn;return a.jsxs("div",{style:{position:"relative",width:"100%",alignSelf:"stretch",display:"flex",flexDirection:"column",minHeight:0,...Te?{flex:1,height:"100%"}:{}},children:[a.jsx("div",{className:`${e}-titles-row-two-row`,style:Te?void 0:{flex:"0 0 auto",height:"auto"},children:qn(pe,!0)}),xn()]})};return a.jsxs("div",{ref:Ge,"data-selection":"none",className:`${e}-lightbox${i?` ${e}-lightbox-editor`:""}${o?` ${e}-lightbox-edit-mode`:""}`,onClick:()=>{st||Ue()},role:"dialog","aria-modal":"true","aria-label":"Journal gallery",tabIndex:St?void 0:-1,style:{opacity:fe?1:0,transition:"opacity 300ms ease",pointerEvents:fe?"auto":"none"},children:[a.jsx("div",{className:`${e}-lightbox-backdrop`,style:{backgroundColor:m,...it}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,style:ze,...ut,children:[a.jsx("div",{className:`${e}-lightbox-content`,style:Oe,onClick:Te=>Te.stopPropagation(),children:a.jsx("div",{className:`${e}-lightbox-strip`,"data-desktop-nav":be&&ye.length>1?"true":"false",onPointerDown:be?Me:void 0,onPointerUp:be?nt:void 0,onPointerCancel:be?gt:void 0,children:a.jsxs("div",{className:`${e}-slide-stack`,children:[yt&&Z?a.jsx("div",{className:`${e}-slide-layer-out ${e}-slide-fade-out`,onAnimationEnd:Te=>{Te.target===Te.currentTarget&&Ne(de)},children:a.jsx("div",{className:`${e}-slide-area`,children:bn(yt.images)})},`slide-out-${de}`):null,a.jsx("div",{className:`${e}-slide-layer-in${Z?` ${e}-slide-fade-in`:""}`,children:a.jsx("div",{className:`${e}-slide-area`,children:se?bn(se.images):null})},`slide-in-${de}-${ce}`)]})})}),a.jsxs("div",{className:`${e}-lightbox-overlay-content`,style:Fe,children:[a.jsx("div",{"data-controls":o?"contentMarginTop":void 0,className:o?`${e}-control`:void 0,style:{height:ie,width:"100%"}}),a.jsx("div",{style:{display:"flex",flexDirection:"row",width:"100%",...Q?{flex:1,minHeight:0}:{}},children:a.jsx("div",{className:`${e}-lightbox-content-area${Q?` ${e}-lightbox-content-area-stacked`:""}`,children:Vt&&a.jsx("div",{className:`${e}-text-bar-cell${Q?` ${e}-text-bar-cell-stacked`:""}`,style:Q?void 0:{flex:1,minWidth:0,width:"100%"},children:Q?M==="fade"?Qi():eo():M==="fade"?ht():Wt()})})})]})]})]})};function Bx(e){return`
15284
15278
  .${e}-wrapper {
15285
15279
  position: relative;
15286
15280
  width: 100%;
@@ -15802,7 +15796,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
15802
15796
  pointer-events: auto;
15803
15797
  z-index: 10;
15804
15798
  }
15805
- `}const Bx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=F.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,v=s.useRef(null),[m,g]=s.useState(!1),[x,b]=s.useState(0),k=s.useRef(!1),f=s.useRef(!1),S=s.useRef(!1),W=s.useMemo(()=>(t??[]).filter($=>Lo($).length>0),[t]),U=m&&W.length>0,B=!n,P=s.useCallback(()=>{B&&(S.current=!0,ev(f.current,d),f.current=!1)},[B,d]),_=($=0)=>{if(W.length===0||n&&!i&&!o)return;const L=la(W,y),D=Math.max(0,Math.min($,L.length-1));if(b(D),B){const E=Bu();zu(D+1,d,E),f.current=!E}g(!0)},G=s.useCallback(()=>{g(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),s.useEffect(()=>{if(!B||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[B]),s.useEffect(()=>{if(!B||k.current)return;k.current=!0;const $=Cc(d);if(!$)return;const L=Tc($,la(W,y).length);L<0||(b(L),g(!0))},[W,d,B,y]),s.useEffect(()=>{if(!B)return;const $=()=>{if(S.current){S.current=!1,g(!1);return}const L=Cc(d);if(!L){g(!1);return}const D=Tc(L,la(W,y).length);if(D<0){g(!1);return}f.current=!1,b(D),g(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[W,d,B,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:v,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:zx(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${ri(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>_(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...ri(p)?{"--image-aspect-ratio":Oa(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${ri(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),U&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(Dx,{prefix:c,entries:W,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:x,enableUrlSync:B,journalItemId:d,onBeforeClose:P,onClose:G}),$)})()]})},jx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15799
+ `}const jx=({settings:e,content:t,isEditor:n,isEditMode:i,isPreviewMode:o,portalId:r,metadata:l})=>{const{prefix:c}=R.useScopedStyles(),d=(l==null?void 0:l.itemId)??null,{cover:u,coverFit:p,type:y}=e,x=s.useRef(null),[m,g]=s.useState(!1),[v,b]=s.useState(0),M=s.useRef(!1),f=s.useRef(!1),S=s.useRef(!1),W=s.useMemo(()=>(t??[]).filter($=>To($).length>0),[t]),U=m&&W.length>0,B=!n,P=s.useCallback(()=>{B&&(S.current=!0,ev(f.current,d),f.current=!1)},[B,d]),H=($=0)=>{if(W.length===0||n&&!i&&!o)return;const L=la(W,y),D=Math.max(0,Math.min($,L.length-1));if(b(D),B){const A=Bu();zu(D+1,d,A),f.current=!A}g(!0)},V=s.useCallback(()=>{g(!1),S.current=!1},[]);return s.useEffect(()=>{!n||i||o||g(!1)},[n,i,o]),s.useEffect(()=>{if(!B||typeof window>"u")return;const $=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=$}},[B]),s.useEffect(()=>{if(!B||M.current)return;M.current=!0;const $=Cc(d);if(!$)return;const L=Tc($,la(W,y).length);L<0||(b(L),g(!0))},[W,d,B,y]),s.useEffect(()=>{if(!B)return;const $=()=>{if(S.current){S.current=!1,g(!1);return}const L=Cc(d);if(!L){g(!1);return}const D=Tc(L,la(W,y).length);if(D<0){g(!1);return}f.current=!1,b(D),g(!0)};return window.addEventListener("popstate",$),()=>window.removeEventListener("popstate",$)},[W,d,B,y]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:x,className:`${c}-wrapper`,children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:Bx(c)}}),u?a.jsx("button",{type:"button",className:`${c}-cover ${ri(p)?`${c}-ratio-wrapper-cover`:`${c}-ratio-wrapper-fit`}`,onClick:()=>H(),style:{display:"block",padding:0,border:"none",background:"transparent",pointerEvents:n&&!i&&!o?"none":void 0,...ri(p)?{"--image-aspect-ratio":Oa(p)}:{}},"aria-label":"Open journal gallery",children:a.jsx("img",{className:`${c}-cover-image ${ri(p)?`${c}-cover-image-cover`:`${c}-cover-image-fit`}`,src:u,alt:"cover"})}):null]}),U&&typeof document<"u"&&(()=>{const $=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx(zx,{prefix:c,entries:W,settings:e,isEditor:n,isEditMode:i,isPreviewMode:o,initialSlideIndex:v,enableUrlSync:B,journalItemId:d,onBeforeClose:P,onClose:V}),$)})()]})},Vx=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
15806
15800
  import { createPortal } from 'react-dom';
15807
15801
  import { CommonComponentProps } from '../props';
15808
15802
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -16567,7 +16561,7 @@ export type LightboxJournalSettings = {
16567
16561
  closeIconColor: string;
16568
16562
  closeIconHoverColor: string;
16569
16563
  };
16570
- `,Vx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Wi={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 Gx(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Xx=Li.reduce((e,t)=>({...e,...Gx(t)}),{}),qx=Li.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Goudy Bookletter 1911",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ms(e){return Li.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const Ux=sv(),Kx={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"}},...Xx,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Vx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...qx,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...ms({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...ms({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ms({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},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:[Ux]}],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:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Yx={element:Bx,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Kx,sourceCode:jx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Li.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{...Li.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})}},Zx={sizeType:"custom",value:700,min:400,max:700};function ba(e,t){return{widthPx:e,heightPx:e*t}}function Vs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function Jc(e,t,n,i){const{heightPx:o}=ba(n,i);return Vs(e/2,t/2,e,t,n,o)}function sp(e,t,n){for(const i of n){const{heightPx:o}=ba(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Jx(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":sp(e,t,n)||r==="area"?l??"none":c??"none"}function Qc(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function Qx(e){return`
16564
+ `,Gx="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),Wi={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 Xx(e){const t={};return t[xt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[xt(e,"fontSettings")]={...Wi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[xt(e,"fontSize")]={...Wi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[xt(e,"lineHeight")]={...Wi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[xt(e,"letterSpacing")]={...Wi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[xt(e,"wordSpacing")]={...Wi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[xt(e,"textAlign")]={...Wi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[xt(e,"textAppearance")]={...Wi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const qx=Li.reduce((e,t)=>({...e,...Xx(t)}),{}),Ux=Li.reduce((e,t)=>({...e,[xt(t,"fontFamily")]:"Goudy Bookletter 1911",[xt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[xt(t,"letterSpacing")]:0,[xt(t,"wordSpacing")]:0,[xt(t,"textAlign")]:"left",[xt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ms(e){return Li.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[xt(n,"fontSize")]=i),o!==void 0&&(t[xt(n,"lineHeight")]=o),t},{})}const Kx=sv(),Yx={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"}},...qx,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/Component-default-1.jpg",coverFit:{display:"fit",ratioValue:"1:1",reversed:!1},closeIcon:Gx,backgroundColor:"rgb(255, 255, 255)",closeIconColor:"#000000",closeIconHoverColor:"#cccccc",textTransition:"fade",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",countColor:"#000000",...Ux,countFontFamily:"Arial"},layoutDefaults:{m:{type:"B",imageGap:.01,maxHeight:80,maxWidth:80,closeIconMaxWidth:.08,contentMarginTop:.04,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.55,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,iconMarginRight:.01,countCloseGap:.04,...ms({title1FontSize:.04,title1LineHeight:.04,title2FontSize:.04,title2LineHeight:.04,title3FontSize:.04,title3LineHeight:.04,countFontSize:.04,countLineHeight:.04})},t:{type:"A",imageGap:.05,maxHeight:80,maxWidth:40,closeIconMaxWidth:.03,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.16,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.03,...ms({title1FontSize:.0208,title1LineHeight:.0208,title2FontSize:.0208,title2LineHeight:.0208,title3FontSize:.0208,title3LineHeight:.0208,countFontSize:.0208,countLineHeight:.0208})},d:{type:"A",maxHeight:80,maxWidth:40,imageGap:.05,closeIconMaxWidth:.0125,contentMarginTop:.01,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,iconMarginRight:.01,countCloseGap:.02,...ms({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098,countFontSize:.008,countLineHeight:.0098})}},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:[Kx]}],paletteBookmark:{items:["title1Color","title2Color","title3Color","backgroundColor","countColor","closeIconColor","closeIconHoverColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0},items:{type:"object",properties:{title1:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},title2:{type:"string",label:"Subtitle",contentKey:"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",contentKey:"gallery",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:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"contain"},{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"contain"}]},{title1:"NASA",title2:"Apollo 9 Mission, 1969",title3:"Archival Footage",image:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"contain"}]}]}},Zx={element:jx,id:"lightbox-journal",name:"Journal",category:"galleries",version:1,defaultSize:{d:{width:350},t:{width:300},m:{width:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Journal.png"},schema:Yx,sourceCode:Vx,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"cover",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[...Li.map(e=>({path:`${xt(e,"fontFamily")}`}))]},fontRelations:{...Li.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${xt(t,"fontFamily")}`}),{})}},Jx={sizeType:"custom",value:700,min:400,max:700};function ba(e,t){return{widthPx:e,heightPx:e*t}}function Vs(e,t,n,i,o,r){return{x:Math.min(Math.max(e,o/2),n-o/2),y:Math.min(Math.max(t,r/2),i-r/2)}}function Jc(e,t,n,i){const{heightPx:o}=ba(n,i);return Vs(e/2,t/2,e,t,n,o)}function sp(e,t,n){for(const i of n){const{heightPx:o}=ba(i.widthPx,i.aspectRatio),r=i.widthPx/2,l=o/2;if(e>=i.x-r&&e<=i.x+r&&t>=i.y-l&&t<=i.y+l)return!0}return!1}function Qx(e,t,n,i,o,r,l,c){if(o==="system")return"none";const d=i.getBoundingClientRect(),u=document.elementFromPoint(d.left+e,d.top+t);return u&&u.closest("a")?"none":sp(e,t,n)||r==="area"?l??"none":c??"none"}function Qc(e,t,n){var c;const{sizeType:i,value:o,min:r,max:l}=t;return i==="custom"?o:i==="as is"?((c=n.get(e))==null?void 0:c.naturalWidth)??o:Math.round(Math.random()*(l-r)+r)}function eb(e){return`
16571
16565
  .${e}-root {
16572
16566
  position: absolute;
16573
16567
  top: 0;
@@ -16602,16 +16596,16 @@ export type LightboxJournalSettings = {
16602
16596
  width: 32px;
16603
16597
  height: 32px;
16604
16598
  }
16605
- `}function eb(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function tb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await eb(i)]));return new Map(n)}function nb({settings:e,content:t=[],isEditor:n}){const{prefix:i}=F.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,v]=s.useState({x:0,y:0}),[m,g]=s.useState("none"),x=s.useRef({x:0,y:0}),[b,k]=s.useState(!1),[f,S]=s.useState(!1),W=s.useRef(new Map),{imageSize:U=Zx,cursor:B="system",target:P="area",position:_="random",visible:G="all",defaultCursor:$=null,hoverCursor:L=null}=e,D=t.filter(I=>{var A;return!!((A=I==null?void 0:I.image)!=null&&A.url)}),E=s.useMemo(()=>Qx(i),[i]),T=s.useCallback((I,A,j=l)=>{if(!o)return;const ie=o.getBoundingClientRect(),ae=I-ie.left,O=A-ie.top;v({x:ae,y:O}),g(Jx(ae,O,j,o,B,P,L,$))},[o,l,B,P,L,$]);s.useEffect(()=>{const I=[...D.map(j=>j.image.url),$,L].filter(j=>!!j);if(I.length===0){W.current=new Map,S(!0);return}let A=!1;return S(!1),tb(I).then(j=>{A||(W.current=j,S(!0))}),()=>{A=!0}},[t,$,L]),s.useEffect(()=>{if(!o)return;const I=j=>{j.stopPropagation(),x.current={x:j.clientX,y:j.clientY},T(j.clientX,j.clientY)},A=()=>{b&&T(x.current.x,x.current.y)};return o.addEventListener("mousemove",I),window.addEventListener("scroll",A,!0),()=>{o.removeEventListener("mousemove",I),window.removeEventListener("scroll",A,!0)}},[o,b,T]),s.useEffect(()=>{!o||!b||T(x.current.x,x.current.y)},[l,o,b,T]),s.useEffect(()=>{b||g("none")},[b]);const C=(I,A,j,ie={})=>{var Q,be;if(!((Q=I==null?void 0:I.image)!=null&&Q.url))return null;const ae=((be=W.current.get(I.image.url))==null?void 0:be.aspectRatio)??1,O=Qc(I.image.url,U,W.current),{heightPx:oe}=ba(O,ae);let N=0,le=0;return _==="same"?{x:N,y:le}=Jc(A,j,O,ae):(N=ie.x??Math.random()*A,le=ie.y??Math.random()*j,{x:N,y:le}=Vs(N,le,A,j,O,oe)),{id:p.current++,url:I.image.url,link:I.link,name:I.image.name,x:N,y:le,xRatio:N/A,yRatio:le/j,aspectRatio:ae,widthPx:O}},V=()=>{if(!o)return;const I=o.getBoundingClientRect(),A=I.width,j=I.height;A===0||j===0||c(ie=>ie.length===0?ie:ie.map(ae=>{const O=U.sizeType==="random"?ae.widthPx:Qc(ae.url,U,W.current),{heightPx:oe}=ba(O,ae.aspectRatio);if(_==="same"){const{x:Q,y:be}=Jc(A,j,O,ae.aspectRatio);return{...ae,x:Q,y:be,widthPx:O}}const{x:N,y:le}=Vs(ae.xRatio*A,ae.yRatio*j,A,j,O,oe);return{...ae,x:N,y:le,widthPx:O}}))};s.useEffect(()=>{if(!o||D.length===0||!f)return;const I=o.getBoundingClientRect(),A=I.width,j=I.height,ie=C(D[0],A,j);ie&&(c([ie]),u(D.length>1?1:0))},[U,_,o,t,f]),s.useEffect(()=>{if(!o)return;V();const I=new ResizeObserver(V);return I.observe(o),window.addEventListener("resize",V),()=>{I.disconnect(),window.removeEventListener("resize",V)}},[o,_,U,l.length]),s.useEffect(()=>{G==="last One"&&c(I=>I.length>0?[I[I.length-1]]:[])},[G]);const w=I=>{if(!o||D.length===0||!f)return;const A=o.getBoundingClientRect(),j=I.clientX-A.left,ie=I.clientY-A.top;if(P==="image"&&!sp(j,ie,l))return;let ae=0,O=0;_==="on Click"?(ae=j,O=ie):_==="same"?(ae=A.width/2,O=A.height/2):(ae=Math.random()*A.width,O=Math.random()*A.height);const oe=D[d%D.length],N=C(oe,A.width,A.height,{x:ae,y:O});if(!N)return;const le=G==="all"?[...l,N]:[N];c(le),u(Q=>(Q+1)%D.length),T(I.clientX,I.clientY,le)},q=B==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:E}}),a.jsxs("div",{ref:r,onClick:w,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),className:`${i}-root`,style:{cursor:q?"none":"default"},children:[l.map(I=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${I.y}px`,left:`${I.x}px`,width:`${I.widthPx}px`,cursor:q?"none":"default"},children:P==="area"&&I.link?a.jsx("a",{href:I.link,target:"_blank",rel:"noreferrer",className:`${i}-link`,children:a.jsx("img",{src:I.url,alt:I.name,className:`${i}-image`})}):a.jsx("img",{src:I.url,alt:I.name,className:`${i}-image`})},I.id)),b&&q&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const ib=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16599
+ `}function tb(e){return new Promise(t=>{const n=new Image;n.onload=()=>{t({aspectRatio:n.naturalHeight/n.naturalWidth,naturalWidth:n.naturalWidth})},n.onerror=()=>{t({aspectRatio:1,naturalWidth:700})},n.src=e})}async function nb(e){const t=[...new Set(e.filter(Boolean))],n=await Promise.all(t.map(async i=>[i,await tb(i)]));return new Map(n)}function ib({settings:e,content:t=[],isEditor:n}){const{prefix:i}=R.useScopedStyles(),[o,r]=s.useState(null),[l,c]=s.useState([]),[d,u]=s.useState(0),p=s.useRef(0),[y,x]=s.useState({x:0,y:0}),[m,g]=s.useState("none"),v=s.useRef({x:0,y:0}),[b,M]=s.useState(!1),[f,S]=s.useState(!1),W=s.useRef(new Map),{imageSize:U=Jx,cursor:B="system",target:P="area",position:H="random",visible:V="all",defaultCursor:$=null,hoverCursor:L=null}=e,D=t.filter(k=>{var N;return!!((N=k==null?void 0:k.image)!=null&&N.url)}),A=s.useMemo(()=>eb(i),[i]),T=s.useCallback((k,N,j=l)=>{if(!o)return;const ie=o.getBoundingClientRect(),ae=k-ie.left,O=N-ie.top;x({x:ae,y:O}),g(Qx(ae,O,j,o,B,P,L,$))},[o,l,B,P,L,$]);s.useEffect(()=>{const k=[...D.map(j=>j.image.url),$,L].filter(j=>!!j);if(k.length===0){W.current=new Map,S(!0);return}let N=!1;return S(!1),nb(k).then(j=>{N||(W.current=j,S(!0))}),()=>{N=!0}},[t,$,L]),s.useEffect(()=>{if(!o)return;const k=j=>{j.stopPropagation(),v.current={x:j.clientX,y:j.clientY},T(j.clientX,j.clientY)},N=()=>{b&&T(v.current.x,v.current.y)};return o.addEventListener("mousemove",k),window.addEventListener("scroll",N,!0),()=>{o.removeEventListener("mousemove",k),window.removeEventListener("scroll",N,!0)}},[o,b,T]),s.useEffect(()=>{!o||!b||T(v.current.x,v.current.y)},[l,o,b,T]),s.useEffect(()=>{b||g("none")},[b]);const C=(k,N,j,ie={})=>{var Q,be;if(!((Q=k==null?void 0:k.image)!=null&&Q.url))return null;const ae=((be=W.current.get(k.image.url))==null?void 0:be.aspectRatio)??1,O=Qc(k.image.url,U,W.current),{heightPx:oe}=ba(O,ae);let _=0,le=0;return H==="same"?{x:_,y:le}=Jc(N,j,O,ae):(_=ie.x??Math.random()*N,le=ie.y??Math.random()*j,{x:_,y:le}=Vs(_,le,N,j,O,oe)),{id:p.current++,url:k.image.url,link:k.link,name:k.image.name,x:_,y:le,xRatio:_/N,yRatio:le/j,aspectRatio:ae,widthPx:O}},X=()=>{if(!o)return;const k=o.getBoundingClientRect(),N=k.width,j=k.height;N===0||j===0||c(ie=>ie.length===0?ie:ie.map(ae=>{const O=U.sizeType==="random"?ae.widthPx:Qc(ae.url,U,W.current),{heightPx:oe}=ba(O,ae.aspectRatio);if(H==="same"){const{x:Q,y:be}=Jc(N,j,O,ae.aspectRatio);return{...ae,x:Q,y:be,widthPx:O}}const{x:_,y:le}=Vs(ae.xRatio*N,ae.yRatio*j,N,j,O,oe);return{...ae,x:_,y:le,widthPx:O}}))};s.useEffect(()=>{if(!o||D.length===0||!f)return;const k=o.getBoundingClientRect(),N=k.width,j=k.height,ie=C(D[0],N,j);ie&&(c([ie]),u(D.length>1?1:0))},[U,H,o,t,f]),s.useEffect(()=>{if(!o)return;X();const k=new ResizeObserver(X);return k.observe(o),window.addEventListener("resize",X),()=>{k.disconnect(),window.removeEventListener("resize",X)}},[o,H,U,l.length]),s.useEffect(()=>{V==="last One"&&c(k=>k.length>0?[k[k.length-1]]:[])},[V]);const w=k=>{if(!o||D.length===0||!f)return;const N=o.getBoundingClientRect(),j=k.clientX-N.left,ie=k.clientY-N.top;if(P==="image"&&!sp(j,ie,l))return;let ae=0,O=0;H==="on Click"?(ae=j,O=ie):H==="same"?(ae=N.width/2,O=N.height/2):(ae=Math.random()*N.width,O=Math.random()*N.height);const oe=D[d%D.length],_=C(oe,N.width,N.height,{x:ae,y:O});if(!_)return;const le=V==="all"?[...l,_]:[_];c(le),u(Q=>(Q+1)%D.length),T(k.clientX,k.clientY,le)},q=B==="custom"&&m!=="none";return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:A}}),a.jsxs("div",{ref:r,onClick:w,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),className:`${i}-root`,style:{cursor:q?"none":"default"},children:[l.map(k=>a.jsx("div",{className:`${i}-wrapper`,style:{top:`${k.y}px`,left:`${k.x}px`,width:`${k.widthPx}px`,cursor:q?"none":"default"},children:a.jsx(R.LinkWrapper,{link:P==="area"?k.link:void 0,className:`${i}-link`,children:a.jsx("img",{src:k.url,alt:k.name,className:`${i}-image`})})},k.id)),b&&q&&a.jsx("div",{className:`${i}-cursor`,style:{left:`${y.x}px`,top:`${y.y}px`,transform:"translate(-50%, -50%)",backgroundImage:`url('${m}')`,backgroundSize:"cover",backgroundPosition:"center"}})]})]})}const ob=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
16606
16600
  import { CommonComponentProps } from '../props';
16607
- import { useScopedStyles } from '../utils/index';
16601
+ import { LinkWrapper, useScopedStyles, type ContentLink } from '../utils/index';
16608
16602
 
16609
16603
  type ClickGallerieItem = {
16610
16604
  image: {
16611
16605
  url: string;
16612
16606
  name: string;
16613
16607
  };
16614
- link: string;
16608
+ link?: ContentLink;
16615
16609
  };
16616
16610
 
16617
16611
  type ImageSizeSettings = {
@@ -16645,7 +16639,7 @@ type ImageMeta = {
16645
16639
  interface PlacedImage {
16646
16640
  id: number;
16647
16641
  url: string;
16648
- link: string;
16642
+ link?: ContentLink;
16649
16643
  name: string;
16650
16644
  x: number;
16651
16645
  y: number;
@@ -17106,13 +17100,9 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17106
17100
  cursor: useCustomCursor ? 'none' : 'default',
17107
17101
  }}
17108
17102
  >
17109
- {target === 'area' && img.link ? (
17110
- <a href={img.link} target="_blank" rel="noreferrer" className={\`\${P}-link\`}>
17111
- <img src={img.url} alt={img.name} className={\`\${P}-image\`} />
17112
- </a>
17113
- ) : (
17103
+ <LinkWrapper link={target === 'area' ? img.link : undefined} className={\`\${P}-link\`}>
17114
17104
  <img src={img.url} alt={img.name} className={\`\${P}-image\`} />
17115
- )}
17105
+ </LinkWrapper>
17116
17106
  </div>
17117
17107
  ))}
17118
17108
  {isInside && useCustomCursor && (
@@ -17132,7 +17122,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17132
17122
  </>
17133
17123
  );
17134
17124
  }
17135
- `,ob={type:"object",version:1,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"}},required:["url","name"]},link:{label:"URL",placeholder:"Enter link...",display:{type:"text-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:""},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.png"},link:""}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},rb={element:nb,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:ob,sourceCode:ib,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},ab=100,sb=70,gi="cubic-bezier(0.86, 0, 0.07, 1)";function lb(e){return`
17125
+ `,rb={type:"object",version:1,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"}},required:["url","name"]},link:{type:"object",label:"URL",display:{type:"link-input"}}},required:["image"]},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"Slider-1.png"},link:{type:"url",value:"",target:"blank"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"Slider-2.png"},link:{type:"url",value:"",target:"blank"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"Slider-3.png"},link:{type:"url",value:"",target:"blank"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"Slider-4.png"},link:{type:"url",value:"",target:"blank"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"Slider-5.png"},link:{type:"url",value:"",target:"blank"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"Slider-6.png"},link:{type:"url",value:"",target:"blank"}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"Slider-7.png"},link:{type:"url",value:"",target:"blank"}}]},settings:{sizing:"manual",properties:{imageSize:{type:"object",scope:"layout",title:"Img Size",display:{type:"toggle-cycle-numeric-input",enum:["custom","as is","random"],inputs:{custom:"single","as is":"none",random:"range"},defaultValue:700,defaultMin:400,defaultMax:700},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},cursor:{type:"string",scope:"common",title:"Cursor",display:{type:"toggle-cycle",enum:["system","custom"]}},target:{type:"string",scope:"common",title:"Target",display:{type:"toggle-cycle",enum:["area","image"]}},position:{type:"string",scope:"common",title:"Position",display:{type:"toggle-cycle",enum:["random","same","on Click"]}},visible:{type:"string",scope:"common",title:"Visible",display:{type:"toggle-cycle",enum:["all","last One"]}},defaultCursor:{type:["string","null"],scope:"common",title:"Default",display:{type:"settings-image-input",visible:!1}},hoverCursor:{type:["string","null"],scope:"common",title:"Hover",display:{type:"settings-image-input",visible:!1}}},defaults:{imageSize:{sizeType:"custom",value:700,min:400,max:700},cursor:"system",target:"area",position:"random",visible:"all",defaultCursor:null,hoverCursor:null},layoutDefaults:{m:{imageSize:{sizeType:"custom",value:500,min:400,max:700}},t:{imageSize:{sizeType:"custom",value:600,min:400,max:700}},d:{imageSize:{sizeType:"custom",value:700,min:400,max:700}}},displayRules:[{if:{name:"cursor",value:"custom"},then:{name:"properties.defaultCursor.display.visible",value:!0}},{if:{name:"cursor",value:"custom"},then:{name:"properties.hoverCursor.display.visible",value:!0}}],layout:["__componentName__","imageSize","cursor","target","position","visible","defaultCursor","hoverCursor"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["imageSize"]},{type:"row",title:"",items:["cursor","target"]},{type:"row",title:"",items:["position","visible"]},{type:"row",title:"Custom Cursor",items:["defaultCursor","hoverCursor"]}]}]},ab={element:ib,id:"click-gallerie",name:"Click",category:"galleries",version:1,defaultSize:{d:{width:"100%",height:"100%"},t:{width:"100%",height:"100%"},m:{width:"100%",height:"100%"}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Click_Gallery.mp4"},schema:rb,sourceCode:ob,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"defaultCursor"},{path:"hoverCursor"}]},fontSettingsPaths:{content:[],parameters:[]}},sb=100,lb=70,gi="cubic-bezier(0.86, 0, 0.07, 1)";function cb(e){return`
17136
17126
  .${e}-wrapper {
17137
17127
  position: relative;
17138
17128
  width: 100%;
@@ -17242,7 +17232,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
17242
17232
  display: block;
17243
17233
  pointer-events: none;
17244
17234
  }
17245
- `}function cb(e){return e==="blur"?sb:e==="greyscale"?ab:0}function Yo(e,t=1,n=1){const i=cb(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ed(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function db(e,t){return t<=1?0:(e-1+t)%t}function ub(e,t=1){return!e||e.height===0?t:e.width/e.height}function pb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function td(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function lp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function nd(e,t,n){return{...lp(e),[`--${n}-stage-scale`]:t}}function mb(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function gb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,h,K,Z,ne,de,z;const{prefix:o}=F.useScopedStyles(),r=s.useMemo(()=>lb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],v=ed(y.length),[m,g]=s.useState(v.activeIndex),[x,b]=s.useState(v.backgroundIndex),[k,f]=s.useState(!1),[S,W]=s.useState(!1),[U,B]=s.useState(null),[P,_]=s.useState(null),[G,$]=s.useState(0),[L,D]=s.useState(1),[E,T]=s.useState("none"),[C,V]=s.useState("next"),[w,q]=s.useState({}),[I,A]=s.useState({width:0,height:0}),j=s.useRef(null),ie=s.useRef(null),ae=!n||!!i,O=l??60,oe=Math.max(10,Math.min(100,c??O)),N=Math.max(10,Math.min(100,d??O)),le=Math.max(100,u),Q=Yo(p),be=s.useCallback(R=>{const ee=ub(R?w[R]:void 0);return pb(I.width,I.height,ee,oe,N)},[I.height,I.width,w,N,oe]);s.useEffect(()=>{const R=ie.current;if(!R)return;const ee=new ResizeObserver(([te])=>{const{width:me,height:X}=te.contentRect;A({width:me,height:X})});return ee.observe(R),()=>ee.disconnect()},[]),s.useEffect(()=>{const R=(t??[]).map(ee=>{var te;return(te=ee.image)==null?void 0:te.url}).filter(ee=>!!ee);mb(R,(ee,te)=>{q(me=>{var X,Ie;return((X=me[ee])==null?void 0:X.width)===te.width&&((Ie=me[ee])==null?void 0:Ie.height)===te.height?me:{...me,[ee]:te}})})},[t]),s.useEffect(()=>{const{backgroundIndex:R,activeIndex:ee}=ed(y.length);g(ee),b(R),f(!1),W(!1),B(null),_(null),$(0),D(1),T("none"),V("next")},[y.length,t]),s.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Pe=s.useCallback(R=>{var Se,J,He,We;if(!ae||k||y.length<=1)return;const ee=R==="next"?(m+1)%y.length:(m-1+y.length)%y.length,te=be((J=(Se=y[m])==null?void 0:Se.image)==null?void 0:J.url),me=be((We=(He=y[ee])==null?void 0:He.image)==null?void 0:We.url),X=td(I.width,I.height,te),Ie=td(I.width,I.height,me);j.current&&clearTimeout(j.current),V(R),W(!0),f(!0),R==="next"?(B(m),_(ee),$(0),D(1),T(Yo(p,0,1))):(b(db(ee,y.length)),B(ee),_(m),$(1),D(Ie),T(Yo(p,1,Ie))),requestAnimationFrame(()=>{W(!1),requestAnimationFrame(()=>{R==="next"?($(1),D(X),T(Yo(p,1,X))):($(0),D(1),T(Yo(p,0,1)))})}),j.current=setTimeout(()=>{R==="next"&&b(m),g(ee),B(null),_(null),f(!1)},le)},[m,p,I.height,I.width,be,k,ae,y,le]),ye=y[m],ce=x!==null?y[x]:null,Y=U!==null?y[U]:null,se=P!==null?y[P]:null,pe=y.length<=1?0:(m-1+y.length)%y.length,fe=y.length<=1?0:(m+1)%y.length,we=be((Ce=ye==null?void 0:ye.image)==null?void 0:Ce.url),Re=be((h=Y==null?void 0:Y.image)==null?void 0:h.url),ge=be((K=se==null?void 0:se.image)==null?void 0:K.url),xe={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ie,className:Ct(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:xe,"aria-label":"Zoom gallery",children:[((Z=ce==null?void 0:ce.image)==null?void 0:Z.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:Q}})}),k&&((ne=Y==null?void 0:Y.image)==null?void 0:ne.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${C}`),style:nd(Re,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:E}})}),k&&((de=se==null?void 0:se.image)==null?void 0:de.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${C}`),style:nd(ge,G,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:se.image.url,alt:""})}),!k&&((z=ye==null?void 0:ye.image)==null?void 0:z.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-foreground`),style:lp(we),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),ae&&y.length>1&&!k&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Pe("prev"),"aria-label":`Show previous image (${pe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>Pe("next"),"aria-label":`Show next image (${fe+1} of ${y.length})`})]})]})]})}const hb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17235
+ `}function db(e){return e==="blur"?lb:e==="greyscale"?sb:0}function Yo(e,t=1,n=1){const i=db(e)*Math.max(0,Math.min(1,t));if(e==="greyscale")return`grayscale(${i}%)`;if(e==="blur"){const o=i/4;return o<=0?"none":`blur(${o/Math.max(n,1)}px)`}return"none"}function ed(e){return e<=1?{backgroundIndex:0,activeIndex:0}:{backgroundIndex:0,activeIndex:1}}function ub(e,t){return t<=1?0:(e-1+t)%t}function pb(e,t=1){return!e||e.height===0?t:e.width/e.height}function mb(e,t,n,i,o){if(e<=0||t<=0)return{widthPercent:i,heightPercent:o};const r=e*i/100,l=t*o/100;let c=r,d=c/n;return d>l&&(d=l,c=d*n),{widthPercent:c/e*100,heightPercent:d/t*100}}function td(e,t,n){if(e<=0||t<=0)return 1;const i=e*n.widthPercent/100,o=t*n.heightPercent/100;return i<=0||o<=0?1:Math.max(e/i,t/o)}function lp(e){return{width:`${e.widthPercent}%`,height:`${e.heightPercent}%`}}function nd(e,t,n){return{...lp(e),[`--${n}-stage-scale`]:t}}function gb(e,t){[...new Set(e.filter(Boolean))].forEach(i=>{const o=new Image;o.onload=()=>{o.naturalWidth>0&&o.naturalHeight>0&&t(i,{width:o.naturalWidth,height:o.naturalHeight})},o.src=i})}function hb({settings:e,content:t,isEditor:n,isPreviewMode:i}){var Ce,h,K,Z,ne,de,z;const{prefix:o}=R.useScopedStyles(),r=s.useMemo(()=>cb(o),[o]),{imageSize:l,maxWidth:c,maxHeight:d,transition:u=1e3,bgImage:p="greyscale"}=e,y=t??[],x=ed(y.length),[m,g]=s.useState(x.activeIndex),[v,b]=s.useState(x.backgroundIndex),[M,f]=s.useState(!1),[S,W]=s.useState(!1),[U,B]=s.useState(null),[P,H]=s.useState(null),[V,$]=s.useState(0),[L,D]=s.useState(1),[A,T]=s.useState("none"),[C,X]=s.useState("next"),[w,q]=s.useState({}),[k,N]=s.useState({width:0,height:0}),j=s.useRef(null),ie=s.useRef(null),ae=!n||!!i,O=l??60,oe=Math.max(10,Math.min(100,c??O)),_=Math.max(10,Math.min(100,d??O)),le=Math.max(100,u),Q=Yo(p),be=s.useCallback(I=>{const ee=pb(I?w[I]:void 0);return mb(k.width,k.height,ee,oe,_)},[k.height,k.width,w,_,oe]);s.useEffect(()=>{const I=ie.current;if(!I)return;const ee=new ResizeObserver(([te])=>{const{width:me,height:G}=te.contentRect;N({width:me,height:G})});return ee.observe(I),()=>ee.disconnect()},[]),s.useEffect(()=>{const I=(t??[]).map(ee=>{var te;return(te=ee.image)==null?void 0:te.url}).filter(ee=>!!ee);gb(I,(ee,te)=>{q(me=>{var G,Ie;return((G=me[ee])==null?void 0:G.width)===te.width&&((Ie=me[ee])==null?void 0:Ie.height)===te.height?me:{...me,[ee]:te}})})},[t]),s.useEffect(()=>{const{backgroundIndex:I,activeIndex:ee}=ed(y.length);g(ee),b(I),f(!1),W(!1),B(null),H(null),$(0),D(1),T("none"),X("next")},[y.length,t]),s.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const Le=s.useCallback(I=>{var Se,J,He,We;if(!ae||M||y.length<=1)return;const ee=I==="next"?(m+1)%y.length:(m-1+y.length)%y.length,te=be((J=(Se=y[m])==null?void 0:Se.image)==null?void 0:J.url),me=be((We=(He=y[ee])==null?void 0:He.image)==null?void 0:We.url),G=td(k.width,k.height,te),Ie=td(k.width,k.height,me);j.current&&clearTimeout(j.current),X(I),W(!0),f(!0),I==="next"?(B(m),H(ee),$(0),D(1),T(Yo(p,0,1))):(b(ub(ee,y.length)),B(ee),H(m),$(1),D(Ie),T(Yo(p,1,Ie))),requestAnimationFrame(()=>{W(!1),requestAnimationFrame(()=>{I==="next"?($(1),D(G),T(Yo(p,1,G))):($(0),D(1),T(Yo(p,0,1)))})}),j.current=setTimeout(()=>{I==="next"&&b(m),g(ee),B(null),H(null),f(!1)},le)},[m,p,k.height,k.width,be,M,ae,y,le]),ye=y[m],ce=v!==null?y[v]:null,Y=U!==null?y[U]:null,se=P!==null?y[P]:null,pe=y.length<=1?0:(m-1+y.length)%y.length,fe=y.length<=1?0:(m+1)%y.length,we=be((Ce=ye==null?void 0:ye.image)==null?void 0:Ce.url),Re=be((h=Y==null?void 0:Y.image)==null?void 0:h.url),ge=be((K=se==null?void 0:se.image)==null?void 0:K.url),xe={[`--${o}-transition-ms`]:`${le}ms`};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:r}}),a.jsxs("div",{ref:ie,className:Ct(`${o}-wrapper`,S&&`${o}-snap`,n&&!i&&`${o}-editor`),style:xe,"aria-label":"Zoom gallery",children:[((Z=ce==null?void 0:ce.image)==null?void 0:Z.url)&&a.jsx("div",{className:`${o}-background`,"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:ce.image.url,alt:"",style:{filter:Q}})}),M&&((ne=Y==null?void 0:Y.image)==null?void 0:ne.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-outgoing`,`${o}-outgoing-${C}`),style:nd(Re,L,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-effect-image`,src:Y.image.url,alt:"",style:{filter:A}})}),M&&((de=se==null?void 0:se.image)==null?void 0:de.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-incoming`,`${o}-incoming-${C}`),style:nd(ge,V,o),"aria-hidden":"true",children:a.jsx("img",{className:`${o}-image`,src:se.image.url,alt:""})}),!M&&((z=ye==null?void 0:ye.image)==null?void 0:z.url)&&a.jsx("div",{className:Ct(`${o}-stage`,`${o}-foreground`),style:lp(we),children:a.jsx("img",{className:`${o}-image`,src:ye.image.url,alt:ye.image.name??""})}),ae&&y.length>1&&!M&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-prev`),onClick:()=>Le("prev"),"aria-label":`Show previous image (${pe+1} of ${y.length})`}),a.jsx("button",{type:"button",className:Ct(`${o}-nav`,`${o}-nav-next`),onClick:()=>Le("next"),"aria-label":`Show next image (${fe+1} of ${y.length})`})]})]})]})}const fb=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
17246
17236
  import cn from 'classnames';
17247
17237
  import { CommonComponentProps } from '../props';
17248
17238
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -17761,7 +17751,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
17761
17751
  </>
17762
17752
  );
17763
17753
  }
17764
- `,fb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},yb={element:gb,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:fb,sourceCode:hb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},vb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},xb=["hover","active"],gs={left:"flex-start",center:"center",right:"flex-end"};function bb(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 Sb(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 wb(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,v=`.${e}-button:hover, ${y}`,m=g=>`.${e}-hover-effect-${g}:hover, .${e}-hover-effect-${g}:focus-visible, a:focus-visible .${e}-hover-effect-${g}`;return`
17754
+ `,yb={type:"object",version:1,settings:{sizing:"manual",properties:{maxWidth:{type:"number",scope:"common",title:"Max width (%)",display:{type:"percentage-input"},min:10,max:100},maxHeight:{type:"number",scope:"common",title:"Max height (%)",display:{type:"percentage-input"},min:10,max:100},transition:{type:"number",scope:"common",title:"Transition (ms)",display:{type:"common-numeric-input"},min:100,max:9999},bgImage:{type:"string",scope:"common",title:"BG image",display:{type:"toggle-cycle",enum:["greyscale","blur","as is"]}}},defaults:{maxWidth:60,maxHeight:60,transition:700,bgImage:"greyscale"},layout:["__componentName__","maxWidth","maxHeight","transition","bgImage"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["maxWidth","maxHeight"]},{type:"row",title:"",items:["transition","bgImage"]}]}],content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",display:{type:"media-input",isObjectFitEditable:!1}}}},default:[{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:""}},{image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:""}}]}},vb={element:hb,id:"scale",name:"Scale",category:"galleries",version:1,defaultSize:{d:{width:920,height:540},m:{width:"100%",height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Scale.mp4"},schema:yb,sourceCode:fb,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},xb={backgroundColor:"background-color",textColor:"text-color",borderColor:"border-color",iconColor:"icon-color",boxShadowColor:"box-shadow-color",innerBoxShadowColor:"inner-box-shadow-color"},bb=["hover","active"],gs={left:"flex-start",center:"center",right:"flex-end"};function Sb(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 wb(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 $b(e){const t=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-box-shadow-color, transparent)`,n=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-inner-box-shadow-color, transparent)`,i=`${t}, ${n}`,o=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-hover-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,r=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-hover-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,l=`${o}, ${r}`,c=`var(--${e}-box-shadow-x, 0) var(--${e}-box-shadow-y, 0) var(--${e}-box-shadow-blur, 0) var(--${e}-box-shadow-spread, 0) var(--${e}-active-box-shadow-color, var(--${e}-box-shadow-color, transparent))`,d=`inset var(--${e}-inner-box-shadow-x, 0) var(--${e}-inner-box-shadow-y, 0) var(--${e}-inner-box-shadow-blur, 0) var(--${e}-inner-box-shadow-spread, 0) var(--${e}-active-inner-box-shadow-color, var(--${e}-inner-box-shadow-color, transparent))`,u=`${c}, ${d}`,p=`0 4px 12px rgba(0, 0, 0, 0.15), ${n}`,y=`.${e}-button:focus-visible, a:focus-visible .${e}-button`,x=`.${e}-button:hover, ${y}`,m=g=>`.${e}-hover-effect-${g}:hover, .${e}-hover-effect-${g}:focus-visible, a:focus-visible .${e}-hover-effect-${g}`;return`
17765
17755
  .${e}-root {
17766
17756
  line-height: 0;
17767
17757
  }
@@ -17924,7 +17914,7 @@ a:focus-visible .${e}-hover-effect-content-roll .${e}-content-roll-layer-hover,
17924
17914
  transform: translateY(-50%);
17925
17915
  opacity: 1;
17926
17916
  }
17927
- ${v} {
17917
+ ${x} {
17928
17918
  background-color: var(--${e}-hover-background-color, var(--${e}-background-color));
17929
17919
  color: var(--${e}-hover-text-color, var(--${e}-text-color));
17930
17920
  border-color: var(--${e}-hover-border-color, var(--${e}-border-color));
@@ -18003,7 +17993,7 @@ a:active .${e}-button .${e}-icon-image,
18003
17993
  height: calc(1em * var(--${e}-icon-scale, 1));
18004
17994
  width: calc(1em * var(--${e}-icon-scale, 1));
18005
17995
  }
18006
- `}function hs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function id(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=F.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function $b({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=F.useScopedStyles(),l=s.useMemo(()=>wb(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:v="text-icon",gap:m=0,iconSize:g=0,iconWidthC:x=0,dimensions:b=!1,padding:k={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:W="rgba(0, 0, 0, 0)",innerBoxShadow:U={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:P=0,blur:_=0,backgroundColor:G="#000000",textColor:$="#ffffff",borderColor:L="#ffffff",iconColor:D="#ffffff",hoverEffect:E="none",fontFamily:T,fontSettings:C,fontSize:V,lineHeight:w,letterSpacing:q=0,wordSpacing:I=0,textAppearance:A,stateOverrides:j,minWidth:ie=0,minHeight:ae=0,width:O=0,height:oe=0}=e,N=F.buildColorVars(r,{backgroundColor:G,textColor:$,borderColor:L,iconColor:D,boxShadowColor:W,innerBoxShadowColor:B},vb,xb,j),le=i&&i!=="default"?`${r}-state-${i}`:"",Q=t&&!n?`${r}-editing`:"",be=E!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${E}`:"",Pe=E==="reveal"||E==="swipe",ye=E==="content-roll",ce=E==="reveal"&&(!t||n),Y=b===!0,pe=c==="a"?y??p:p,fe=c==="c",we=c!=="b",Re={fontSettings:{fontFamily:T,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:V??.01,lineHeight:w,letterSpacing:q,wordSpacing:I,textAppearance:A,color:$},xe={...we?dn(Qt(Re,t)):{},[`--${r}-box-shadow-x`]:F.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:F.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:F.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:F.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:F.scalingValue(U.left,t),[`--${r}-inner-box-shadow-y`]:F.scalingValue(U.top,t),[`--${r}-inner-box-shadow-blur`]:F.scalingValue(U.right,t),[`--${r}-inner-box-shadow-spread`]:F.scalingValue(U.bottom,t),[`--${r}-backdrop-blur`]:_>0?`blur(${F.scalingValue(_,t)})`:void 0,paddingTop:F.scalingValue(k.top,t),paddingRight:F.scalingValue(k.right,t),paddingBottom:F.scalingValue(k.bottom,t),paddingLeft:F.scalingValue(k.left,t),borderRadius:F.scalingValue(f,t),borderWidth:F.scalingValue(P,t),...fe?{}:{justifyContent:gs[pe],textAlign:pe},...fe&&!ye?{gap:F.scalingValue(m,t)}:{},...Y?{width:F.scalingValue(O,t),height:F.scalingValue(oe,t)}:{minWidth:F.scalingValue(ie,t),minHeight:F.scalingValue(ae,t),...fe?{width:"100%"}:{}}};let Ce;const h={display:"inline-flex",alignItems:"center",justifyContent:fe?gs[pe]:gs[c==="a"?pe:"center"],gap:fe?F.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:pe}:{}};if(c==="b"){const ne=()=>id(r,u,g>0?"fixed":"fill",100,g,t);Ce=ye?hs(r,ne,`${r}-icon-roll`,void 0,h):ne()}else if(c==="c"){const ne=()=>{const de=a.jsx("span",{className:`${r}-text`,style:{textAlign:pe},children:d}),z=id(r,u,x>0?"fixed":"fill",100,x,t);return v==="icon-text"?a.jsxs(a.Fragment,{children:[z,de]}):a.jsxs(a.Fragment,{children:[de,z]})};Ce=ye?hs(r,ne,`${r}-icon-text-roll`,void 0,h):ne()}else Ce=ye?hs(r,()=>d,`${r}-label-roll`,void 0,h):Pe?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const K=ce?ne=>bb(ne,r):void 0,Z=ce?ne=>Sb(ne,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:N,children:a.jsx("div",{className:`${r}-wrapper ${le} ${Q}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:xe,onMouseEnter:K,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const Cb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
17996
+ `}function hs(e,t,n="",i,o){const r=t();return a.jsxs("span",{className:`${e}-content-roll-wrap ${n}`.trim(),style:i,children:[a.jsx("span",{className:`${e}-content-roll-spacer`,"aria-hidden":"true",style:o,children:r}),a.jsxs("span",{className:`${e}-content-roll-viewport`,children:[a.jsx("span",{className:`${e}-content-roll-layer`,style:o,children:t()}),a.jsx("span",{className:`${e}-content-roll-layer ${e}-content-roll-layer-hover`,"aria-hidden":"true",style:o,children:t()})]})]})}function id(e,t,n="fill",i=100,o=0,r){if(!t)return null;const l=a.jsx(mn,{url:t,fill:`var(--${e}-icon-color)`,hoverFill:`var(--${e}-icon-color)`,className:`${e}-icon-image`});if(n==="inline")return a.jsx("span",{className:`${e}-icon ${e}-icon-inline`,style:{[`--${e}-icon-scale`]:i/100},"aria-hidden":"true",children:l});if(n==="fixed"&&o>0){const c=R.scalingValue(o,r);return a.jsx("span",{className:`${e}-icon`,style:{width:c,height:c},"aria-hidden":"true",children:l})}return a.jsx("span",{className:`${e}-icon ${e}-icon-fill`,"aria-hidden":"true",children:l})}function Cb({settings:e,isEditor:t,isPreviewMode:n,activeEvent:i,hasLink:o}){const{prefix:r}=R.useScopedStyles(),l=s.useMemo(()=>$b(r),[r]),{type:c="a",label:d="Button",icon:u,alignment:p="center",alignA:y,order:x="text-icon",gap:m=0,iconSize:g=0,iconWidthC:v=0,dimensions:b=!1,padding:M={top:0,right:0,bottom:0,left:0},cornerRadius:f=0,boxShadow:S={top:0,left:0,right:0,bottom:0},boxShadowColor:W="rgba(0, 0, 0, 0)",innerBoxShadow:U={top:0,left:0,right:0,bottom:0},innerBoxShadowColor:B="rgba(0, 0, 0, 0)",stroke:P=0,blur:H=0,backgroundColor:V="#000000",textColor:$="#ffffff",borderColor:L="#ffffff",iconColor:D="#ffffff",hoverEffect:A="none",fontFamily:T,fontSettings:C,fontSize:X,lineHeight:w,letterSpacing:q=0,wordSpacing:k=0,textAppearance:N,stateOverrides:j,minWidth:ie=0,minHeight:ae=0,width:O=0,height:oe=0}=e,_=R.buildColorVars(r,{backgroundColor:V,textColor:$,borderColor:L,iconColor:D,boxShadowColor:W,innerBoxShadowColor:B},xb,bb,j),le=i&&i!=="default"?`${r}-state-${i}`:"",Q=t&&!n?`${r}-editing`:"",be=A!=="none"&&(!t||n||i==="hover")?`${r}-hover-effect-${A}`:"",Le=A==="reveal"||A==="swipe",ye=A==="content-roll",ce=A==="reveal"&&(!t||n),Y=b===!0,pe=c==="a"?y??p:p,fe=c==="c",we=c!=="b",Re={fontSettings:{fontFamily:T,fontWeight:(C==null?void 0:C.fontWeight)??400,fontStyle:(C==null?void 0:C.fontStyle)??"normal"},fontSize:X??.01,lineHeight:w,letterSpacing:q,wordSpacing:k,textAppearance:N,color:$},xe={...we?dn(Qt(Re,t)):{},[`--${r}-box-shadow-x`]:R.scalingValue(S.left,t),[`--${r}-box-shadow-y`]:R.scalingValue(S.top,t),[`--${r}-box-shadow-blur`]:R.scalingValue(S.right,t),[`--${r}-box-shadow-spread`]:R.scalingValue(S.bottom,t),[`--${r}-inner-box-shadow-x`]:R.scalingValue(U.left,t),[`--${r}-inner-box-shadow-y`]:R.scalingValue(U.top,t),[`--${r}-inner-box-shadow-blur`]:R.scalingValue(U.right,t),[`--${r}-inner-box-shadow-spread`]:R.scalingValue(U.bottom,t),[`--${r}-backdrop-blur`]:H>0?`blur(${R.scalingValue(H,t)})`:void 0,paddingTop:R.scalingValue(M.top,t),paddingRight:R.scalingValue(M.right,t),paddingBottom:R.scalingValue(M.bottom,t),paddingLeft:R.scalingValue(M.left,t),borderRadius:R.scalingValue(f,t),borderWidth:R.scalingValue(P,t),...fe?{}:{justifyContent:gs[pe],textAlign:pe},...fe&&!ye?{gap:R.scalingValue(m,t)}:{},...Y?{width:R.scalingValue(O,t),height:R.scalingValue(oe,t)}:{minWidth:R.scalingValue(ie,t),minHeight:R.scalingValue(ae,t),...fe?{width:"100%"}:{}}};let Ce;const h={display:"inline-flex",alignItems:"center",justifyContent:fe?gs[pe]:gs[c==="a"?pe:"center"],gap:fe?R.scalingValue(m,t):void 0,width:"100%",height:"100%",...c==="a"?{textAlign:pe}:{}};if(c==="b"){const ne=()=>id(r,u,g>0?"fixed":"fill",100,g,t);Ce=ye?hs(r,ne,`${r}-icon-roll`,void 0,h):ne()}else if(c==="c"){const ne=()=>{const de=a.jsx("span",{className:`${r}-text`,style:{textAlign:pe},children:d}),z=id(r,u,v>0?"fixed":"fill",100,v,t);return x==="icon-text"?a.jsxs(a.Fragment,{children:[z,de]}):a.jsxs(a.Fragment,{children:[de,z]})};Ce=ye?hs(r,ne,`${r}-icon-text-roll`,void 0,h):ne()}else Ce=ye?hs(r,()=>d,`${r}-label-roll`,void 0,h):Le?a.jsx("span",{className:`${r}-button-inner`,children:d}):d;const K=ce?ne=>Sb(ne,r):void 0,Z=ce?ne=>wb(ne,r):void 0;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:l}}),a.jsx("div",{className:`${r}-root`,style:_,children:a.jsx("div",{className:`${r}-wrapper ${le} ${Q}`.trim(),children:a.jsx("div",{className:`${r}-button ${be}`.trim(),style:xe,onMouseEnter:K,onMouseLeave:Z,role:"button",tabIndex:o||t&&!n?void 0:0,children:Ce})})})]})}const Tb=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
18007
17997
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
18008
17998
  import { CommonComponentProps } from '../props';
18009
17999
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -18635,7 +18625,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18635
18625
  </>
18636
18626
  );
18637
18627
  }
18638
- `,Tb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Lb=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Pb={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Tb.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Lb],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Ib={element:$b,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Pb,sourceCode:Cb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function Rb(e){return`
18628
+ `,Lb={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},Pb=["backgroundColor","textColor","borderColor","iconColor","boxShadowColor","innerBoxShadowColor"],Ib={type:"object",version:1,settings:{sizing:"auto",hasLinkParameter:!0,properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},label:{type:"string",scope:"common",title:"Label",display:{type:"label-input"}},icon:{type:["string","null"],scope:"common",title:"Icon",display:{type:"settings-image-input",visible:!1}},alignment:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"]}},alignA:{type:"string",scope:"layout",title:"Alignment",display:{type:"toggle-cycle",enum:["left","center","right"],visible:!1}},order:{type:"string",scope:"layout",title:"Order",display:{type:"toggle-cycle",enum:["text-icon","icon-text"],visible:!1}},gap:{type:"number",scope:"layout",title:"Gap",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconSize:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},iconWidthC:{type:"number",scope:"layout",title:"Icon width",display:{type:"numeric-input",visible:!1},min:0,max:9999},dimensions:{type:"boolean",scope:"layout",title:"Dimensions",display:{type:"toggle",enum:["auto","fixed"]}},padding:{type:"object",scope:"layout",title:"Padding",display:{type:"padding-controls"}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",min:0,display:{type:"numeric-input"}},boxShadow:{type:"object",scope:"layout",title:"Shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},boxShadowColor:{type:"string",scope:"common",title:"Shadow Default",titleByState:{default:"Shadow Default",hover:"Shadow Hover",active:"Shadow Active"},display:{type:"palette-color-picker"}},innerBoxShadow:{type:"object",scope:"layout",title:"Inner shadow",display:{type:"padding-controls",step:.1,decimal:!0,allowNegative:!0,nonNegativeSides:["right"],sideLetters:{top:"Y",left:"X",right:"B",bottom:"S"}}},innerBoxShadowColor:{type:"string",scope:"common",title:"Inner Shadow Default",titleByState:{default:"Inner Shadow Default",hover:"Inner Shadow Hover",active:"Inner Shadow Active"},display:{type:"palette-color-picker"}},stroke:{type:"number",scope:"layout",title:"Stroke Width",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"number",scope:"layout",title:"Blur",display:{type:"numeric-input"},min:0,max:100},backgroundColor:{type:"string",scope:"common",title:"BG Default",titleByState:{default:"BG Default",hover:"BG Hover",active:"BG Active"},display:{type:"palette-color-picker"}},textColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover",active:"Text Active"},display:{type:"palette-color-picker"}},borderColor:{type:"string",scope:"common",title:"Border Default",titleByState:{default:"Border Default",hover:"Border Hover",active:"Border Active"},display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover",active:"Icon Active"},display:{type:"palette-color-picker"}},stateOverrides:{type:"object",scope:"common"},hoverEffect:{type:"string",scope:"layout",title:"Hover effect",display:{type:"toggle-cycle",enum:["none","scale-up","lift","reveal","swipe","content-roll"]}},fontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},fontSettings:{...Lb.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},fontSize:{type:"number",scope:"layout",title:"Font size",display:{type:"font-size"}},lineHeight:{type:"number",scope:"layout",title:"Line height",display:{type:"line-height-input"}},letterSpacing:{type:"number",scope:"layout",title:"Letter spacing",display:{type:"letter-spacing-input"}},wordSpacing:{type:"number",scope:"layout",title:"Word spacing",display:{type:"word-spacing-input"}},textAppearance:{type:"object",scope:"layout",title:"Text appearance",display:{type:"text-appearance"}},minWidth:{type:"number",scope:"layout",title:"Min width",display:{type:"numeric-input"},min:0,max:9999},minHeight:{type:"number",scope:"layout",title:"Min height",display:{type:"numeric-input"},min:0,max:9999},width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input",visible:!1},min:0,max:9999},height:{type:"number",scope:"layout",title:"Height",display:{type:"numeric-input",visible:!1},min:0,max:9999}},defaults:{label:"Button",icon:"https://cdn.cntrl.site/projects/01JJKT02AWY2FGN2QJ7A173RNZ/articles-assets/01KY78A0YVT403B042HVWWTHBC.svg",boxShadowColor:"#000000",innerBoxShadowColor:"#000000",backgroundColor:"#2E12F0",textColor:"#ffffff",borderColor:"#ffffff",iconColor:"#ffffff",fontFamily:"Arial",fontSettings:{fontWeight:400,fontStyle:"normal"},blur:0,stateOverrides:{hover:{backgroundColor:"#3642EF"},active:{backgroundColor:"#475FFF"}}},layoutDefaults:{m:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/375,right:20/375,bottom:10/375,left:20/375},minWidth:0/375,minHeight:0/375,width:100/375,height:100/375,cornerRadius:20/375,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/375,gap:10/375,iconWidthC:16/375,fontSize:16/375,lineHeight:16/375,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},t:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/768,right:20/768,bottom:10/768,left:20/768},minWidth:0/768,minHeight:0/768,width:100/768,height:100/768,cornerRadius:20/768,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/768,gap:10/768,iconWidthC:16/768,fontSize:16/768,lineHeight:16/768,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},d:{type:"a",alignment:"center",alignA:"center",order:"text-icon",dimensions:!1,padding:{top:10/1440,right:20/1440,bottom:10/1440,left:20/1440},minWidth:0/1440,minHeight:0/1440,width:100/1440,height:100/1440,cornerRadius:20/1440,boxShadow:{top:0,left:0,right:0,bottom:0},innerBoxShadow:{top:0,left:0,right:0,bottom:0},stroke:0,blur:0,hoverEffect:"none",iconSize:16/1440,gap:10/1440,iconWidthC:16/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}},layout:["__componentName__","type","label","icon","alignment","order","gap","iconSize","iconWidthC","hoverEffect",{type:"row",title:"",items:["dimensions","padding"]},"cornerRadius","blur","boxShadow","boxShadowColor","innerBoxShadow","innerBoxShadowColor",{type:"row",title:"",items:["stroke","borderColor"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]}],displayRules:[{if:{name:"type",value:"a"},then:{name:"properties.icon.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignment.display.visible",value:!1}},{if:{name:"type",value:"a"},then:{name:"properties.alignA.display.visible",value:!0}},{if:{name:"type",value:"a"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"b"},then:{name:"properties.label.display.visible",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontFamily.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSettings.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.fontSize.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.lineHeight.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.letterSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.wordSpacing.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.textAppearance.display.enabled",value:!1}},{if:{name:"type",value:"b"},then:{name:"properties.iconSize.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.icon.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.order.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.iconWidthC.display.visible",value:!0}},{if:{name:"type",value:"c"},then:{name:"properties.gap.display.visible",value:!0}},{if:{name:"stroke",value:0},then:{name:"properties.borderColor.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minWidth.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.minHeight.display.visible",value:!1}},{if:{name:"dimensions",value:!0},then:{name:"properties.width.display.visible",value:!0}},{if:{name:"dimensions",value:!0},then:{name:"properties.height.display.visible",value:!0}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["label","icon","iconSize","alignA"]},{type:"row",title:"",items:["alignment","order"]},{type:"row",title:"",items:["gap","iconWidthC"]},{type:"row",title:"",items:["dimensions","padding"]},{type:"row",title:"",items:["minWidth","minHeight","width","height"]},{type:"row",title:"",items:["hoverEffect","cornerRadius"]},{type:"row",title:"",items:["blur"]},{type:"row",title:"",items:["boxShadow"]},{type:"row",title:"",items:["innerBoxShadow"]},{type:"row",title:"",items:["stroke"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__","fontFamily","fontSettings",{type:"row",title:"",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAppearance"]}],paletteBookmark:{items:[...Pb],panelIds:["general","typeStyle"],stateItems:{default:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],hover:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"],active:["textColor","backgroundColor","boxShadowColor","innerBoxShadowColor","borderColor","iconColor"]}},states:["default","hover","active"]},Rb={element:Cb,id:"simple-button",name:"Simple Button",category:"ui-elements",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/button-preview.png"},schema:Ib,sourceCode:Tb,assetsPaths:{content:[],parameters:[{path:"icon"}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"}]},fontRelations:{fontSettings:"fontFamily"}};function kb(e){return`
18639
18629
  .${e}-titles-row {
18640
18630
  position: relative;
18641
18631
  flex: 0 1 auto;
@@ -18833,7 +18823,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18833
18823
  pointer-events: auto;
18834
18824
  flex-shrink: 0;
18835
18825
  }
18836
- `}const Hn=500,Zo=650,wn="cubic-bezier(0.22, 1, 0.36, 1)",kb=72,Eb=50,Mb=1e4,Ab=650,Fb=500;function Nb(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ya(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function _b(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?cp(i,n):null}function Hb(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function od(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const Wb=.03;function dp(e){return e.width*Wb}const fs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Gr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function rd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Ob(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function Db(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function zb(e,t){if(Da(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function Bb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function jb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Da(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Fo(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=dp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Sa(e,t,n){const i=Fo(e,t,n);return{...i,left:2*i.left-e.left}}function Vb(e,t,n){const{left:i,width:o}=n,r=dp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function up(e,t,n,i){const o=Fo(e,"left",i),r=Fo(e,"right",i),l=Sa(e,"left",i),c=Sa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Gb(e,t,n,i){const{start:o,end:r}=up(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function Xb(e,t,n){const i=Fo(e,t,n),o=Sa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Da(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function qb({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Xr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Da(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Ub({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:v,resolveCloseSourceRect:m,onClose:g,onPrev:x,onNext:b}){const k=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[U,B]=s.useState(0),P=s.useRef(null),_=s.useRef(0),G=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),E=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),V=s.useRef(null),w=s.useRef(()=>{}),q=s.useRef(null),I=s.useRef(null),A=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,oe]=s.useState(fs),[N,le]=s.useState(0),[Q,be]=s.useState("opening"),[Pe,ye]=s.useState(0),[ce,Y]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Re,ge]=s.useState(null),[xe,Ce]=s.useState(null),[h,K]=s.useState(!1),[Z,ne]=s.useState(null),[de,z]=s.useState(!1),R=s.useRef(!1),[ee,te]=s.useState(!1),[me,X]=s.useState(!1),Ie=s.useRef(n),Se=s.useRef(void 0),J=t[n],He=J?Da(J):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((H,Le)=>t.length<=1?null:t[(H+Le+t.length)%t.length]??null,[t]),Ge=tt?or(u,p,-1):et(n,-1),ve=tt?or(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Re!==null?or(u,Re,-1):xe!==null?et(xe,-1):null:null,Be=fe===1&&We?tt&&Re!==null?or(u,Re,1):xe!==null?et(xe,1):null:null,Ze=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=Be&&Be.url!==(ve==null?void 0:ve.url)?Be:null,Ne=Ge&&qe?(()=>{const H=tt?od(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return H&&H.url!==Ge.url?H:null})():null,Ue=ve&&qe?(()=>{const H=tt?od(u,p,1):t.length>2?et((n+1)%t.length,1):null;return H&&H.url!==ve.url?H:null})():null,Je=Ze??Ne,st=$e??Ue,it=s.useCallback((H,Le,je)=>{if(!H||!Le||!je)return;const Fe=W.current,ft=Fe.get(H);(ft==null?void 0:ft.width)===Le&&(ft==null?void 0:ft.height)===je||(Fe.set(H,{width:Le,height:je}),B(Ht=>Ht+1))},[]),Oe=s.useCallback(H=>{if(!(H!=null&&H.url))return null;const Le=W.current.get(H.url);return Db(f.current,Le)},[U,N]),Ae=s.useCallback(()=>{if(!J)return;const H=Oe(J);if(H){ae(H);return}const Le=f.current;Le&&ae(rd(Le))},[J,Oe]),gt=s.useCallback(H=>{if(tt){const Le=u.length;ge((p+H+Le)%Le),Ce(null);return}t.length>1&&(Ce((n+H+t.length)%t.length),ge(null))},[tt,u.length,p,t.length,n]),ze=s.useCallback(H=>{E.current=H,pe(H)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Xe=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),ze(!1)},Zo+32)},[De,ze]),ct=s.useCallback(()=>{const H=k.current;if(!H){oe({left:0,top:0,width:typeof window<"u"?window.innerWidth:fs.width,height:typeof window<"u"?window.innerHeight:fs.height});return}const Le=H.getBoundingClientRect();oe({left:Le.left,top:Le.top,width:Le.width,height:Le.height})},[]),he=s.useCallback((H,Le)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const je=Oe(H);if(!je)return;const{x:Fe,y:ft}=Gb(je,Le,fe,O);return`translate(${Fe}px, ${ft}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Ee=s.useCallback(()=>{const H=C.current;C.current=null,De(),ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,G.current=0,$.current="none",H===-1?x():H===1&&b()},[De,ze,x,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Ee()},Zo+32)},[De,Ee]),pt=s.useCallback(()=>{De(),C.current=null,ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,G.current=0,$.current="none"},[De,ze]),Ve=s.useCallback(H=>{if(!(!qe||!ie)){if(E.current){if(C.current===H){V.current=H,Ee();return}pt()}De(),gt(H),C.current=H,we(H),ze(!0),nt()}},[qe,ie,Ee,pt,De,gt,ze,nt]);w.current=Ve;const vt=s.useCallback(()=>{q.current=null,j.current=!1,I.current!==null&&(window.clearInterval(I.current),I.current=null),A.current!==null&&(window.clearTimeout(A.current),A.current=null)},[]),Rt=s.useCallback(H=>{I.current!==null&&window.clearInterval(I.current);const Le=j.current?Fb:Ab;I.current=window.setInterval(()=>{w.current(H)},Le)},[]),At=s.useCallback(H=>{q.current!==H&&(vt(),q.current=H,j.current=!1,w.current(H),Rt(H),A.current=window.setTimeout(()=>{A.current=null,q.current===H&&(j.current=!0,Rt(H))},Mb))},[vt,Rt]),wt=s.useCallback(()=>{const H=f.current;if(!H)return;const Le=J==null?void 0:J.url,je=Le?W.current.get(Le):void 0;if(je!=null&&je.width&&(je!=null&&je.height)){ae(Gs(H,je.width,je.height));return}const Fe=S.current;if(Fe&&Le&&(Fe.src===Le||Fe.currentSrc===Le)){const{width:Ht,height:mt}=Ob(Fe);if(Ht&&mt){it(Le,Ht,mt),ae(Gs(H,Ht,mt));return}}const ft=rd(H);!ft.width||!ft.height||ae(ft)},[J==null?void 0:J.url,it]),Vt=s.useCallback(H=>{if(S.current=H,!!H){if(H instanceof HTMLVideoElement){H.readyState>=1&&H.videoWidth>0&&wt();return}H.complete&&H.naturalWidth>0&&wt()}},[wt]),jt=s.useCallback(()=>{ct(),wt(),le(H=>H+1)},[ct,wt]);s.useEffect(()=>{jt();const H=f.current,Le=k.current,je=new ResizeObserver(()=>jt());return H&&je.observe(H),Le&&je.observe(Le),window.addEventListener("resize",jt),()=>{je.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const H=S.current;if(H){if(H instanceof HTMLImageElement&&H.complete&&H.naturalWidth>0){wt();return}H instanceof HTMLVideoElement&&H.readyState>=1&&H.videoWidth>0&&wt()}},[J==null?void 0:J.url,n,wt]),s.useEffect(()=>{Ae()},[Ae,U]),s.useEffect(()=>{const H=new Set,Le=[],je=Fe=>{!(Fe!=null&&Fe.url)||H.has(Fe.url)||(H.add(Fe.url),Le.push(Fe))};t.forEach(je),u.forEach(Fe=>Fe.items.forEach(je)),Le.forEach(Fe=>{W.current.has(Fe.url)||zb(Fe,it)})},[t,u,it]),s.useEffect(()=>{if(Q!=="opening"||!ie)return;if(!v){be("open");return}K(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),be("open")})});return()=>cancelAnimationFrame(H)},[Q,ie,v]),s.useEffect(()=>{if(Q!=="closing")return;const H=setTimeout(()=>g(),Hn);return()=>clearTimeout(H)},[Q,g]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Ie.current===n&&Se.current===(J==null?void 0:J.url)||(De(),C.current=null,we(null),ge(null),Ce(null),ye(0),Y(0),ze(!1),X(!1),te(!1),_.current=0,G.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Ae(),Ie.current=n,Se.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ze,De,Ae]),s.useLayoutEffect(()=>{const H=V.current;H!==null&&(V.current=null,requestAnimationFrame(()=>{w.current(H)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(Q==="opening"){R.current=!1,z(!1);return}if(Q!=="open"||R.current)return;if(!Ge&&!ve){R.current=!0;return}z(!1);const H=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),R.current=!0})});return()=>cancelAnimationFrame(H)},[Q,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(Q!=="open")return;const H=()=>{const mt=Lt=>{Lt.stopPropagation(),Lt.preventDefault(),document.removeEventListener("click",mt,!0)};document.addEventListener("click",mt,!0)},Le=mt=>{const Lt=mt<0?1:-1;De(),gt(Lt),C.current=Lt,we(Lt),ze(!0),nt()},je=mt=>{if(Math.abs(mt)>Eb&&qe){Le(mt);return}C.current=null,we(null),ge(null),Ce(null),ze(!0),Y(0),Xe()},Fe=mt=>{if(mt.touches.length!==1||E.current)return;const Lt=mt.touches[0];D.current=!0,P.current={x:Lt.clientX,y:Lt.clientY},$.current="none",G.current=0,L.current=!1},ft=mt=>{if(!P.current||mt.touches.length!==1||E.current)return;const Lt=mt.touches[0],Ut=Lt.clientX-P.current.x,Dt=Lt.clientY-P.current.y;if($.current==="none"){if(Math.abs(Ut)<10&&Math.abs(Dt)<10)return;if(Math.abs(Ut)>Math.abs(Dt)){if(!qe)return;$.current="horizontal"}else if(Dt>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),G.current=Ut,Y(Ut),mt.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),_.current=Dt,ye(Dt),mt.preventDefault())},Ht=()=>{if(!P.current)return;const mt=$.current,Lt=L.current;if(Lt&&mt==="horizontal")je(G.current),H();else if(Lt&&mt==="vertical"){const Ut=_.current;if(ot&&Ut>kb){const Dt=window.innerHeight;_.current=Dt,X(!0),ye(Dt),be("closing")}else _.current=0,ye(0);H()}else mt==="horizontal"&&Math.abs(G.current)>0&&(je(G.current),H());P.current=null,$.current="none",G.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Fe,{passive:!0}),document.addEventListener("touchmove",ft,{passive:!1}),document.addEventListener("touchend",Ht),document.addEventListener("touchcancel",Ht),()=>{document.removeEventListener("touchstart",Fe),document.removeEventListener("touchmove",ft),document.removeEventListener("touchend",Ht),document.removeEventListener("touchcancel",Ht)}},[Q,qe,ze,Xe,De,ot,nt,gt]);const Kt=s.useCallback(()=>{const H=(m==null?void 0:m())??v??null;H&&ie&&(ne(H),K(!0)),be("closing")},[m,v,ie]);s.useEffect(()=>{const H=Fe=>{if(Fe.key==="Escape"){if(r&&c||Q==="closing")return;vt(),Kt();return}if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight"||Q!=="open"||!qe)return;Fe.preventDefault();const ft=Fe.key==="ArrowLeft"?-1:1;Fe.repeat&&q.current===ft||At(ft)},Le=Fe=>{if(Fe.key!=="ArrowLeft"&&Fe.key!=="ArrowRight")return;const ft=Fe.key==="ArrowLeft"?-1:1;q.current===ft&&vt()},je=()=>{vt()};return window.addEventListener("keydown",H),window.addEventListener("keyup",Le),window.addEventListener("blur",je),()=>{window.removeEventListener("keydown",H),window.removeEventListener("keyup",Le),window.removeEventListener("blur",je),vt()}},[Q,r,c,Kt,qe,At,vt]),s.useEffect(()=>{Q!=="open"&&vt()},[Q,vt]);const Yt=()=>{Q==="closing"||l||Kt()},kt=Q==="open",Bt=Q==="closing",rn=Pe>0?Math.max(0,1-Pe/500):1,xt=Pe>0?Math.max(.35,1-Pe/500):1,yt=s.useCallback(H=>{if(!(H.propertyName!=="transform"||!E.current)){if(C.current!==null){Ee();return}De(),ze(!1)}},[De,ze,Ee]),Me=Q==="closing"?Z??v:v,Qe=Me&&ie&&(Q==="opening"||Bt)?Nb(Me,ie):void 0,rt=We&&J?he(J,"center"):Pe>0?`translateY(${Pe}px)`:Qe,dt=ie?Gr(ie,O):null,Pt=!!(Me&&ie),St=Pt&&(Q==="closing"||Q==="open"&&h),ht={position:"absolute",top:dt==null?void 0:dt.top,left:dt==null?void 0:dt.left,width:dt==null?void 0:dt.width,height:dt==null?void 0:dt.height,objectFit:"contain",transformOrigin:"top left",transform:rt,opacity:Pe>0?xt:Pt?1:Q==="opening"||Bt?0:1,transition:ee&&!se?"none":se?`transform ${Zo}ms ${wn}`:me?`transform ${Hn}ms ${wn}, opacity ${Hn}ms ${wn}`:St?`transform ${Hn}ms ${wn}`:Q==="opening"||Bt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:He&&kt&&!We?"auto":"none",touchAction:He&&kt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Wt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:kt&&!We?"auto":"none"},Tt=(H,Le,je="adjacent")=>{const Fe=Oe(H);if(!Fe)return{display:"none"};const ft=je==="far"?Le==="left"?"far-left":"far-right":Le==="left"?"left-adjacent":"right-adjacent",{start:Ht}=fe!==null?up(Fe,ft,fe,O):{start:je==="far"?Sa(Fe,Le,O):Fo(Fe,Le,O)},mt=Gr(Ht,O),Lt=he(H,ft),Ut=!We&&je==="adjacent"&&kt&&!de?Xb(Fe,Le,O):null,Dt=je==="far"&&We&&fe===(Le==="left"?-1:1),an=ee&&!se?!1:se,ln=je==="adjacent"&&kt&&de&&!We;return{position:"absolute",top:mt.top,left:mt.left,width:mt.width,height:mt.height,objectFit:"contain",transform:Lt??(Ut?`translate(${Ut.x}px, ${Ut.y}px)`:void 0),opacity:je==="far"?kt&&Dt?1:0:kt?1:0,transition:an?je==="far"?`transform ${Zo}ms ${wn}`:`transform ${Zo}ms ${wn}, opacity ${Hn}ms ${wn}`:ln?`transform ${Hn}ms ${wn}`:Q==="opening"||Bt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:"none",zIndex:1}},Ot=(H,Le)=>{const je=Oe(H);return je?Vb(Fo(je,Le,O),Le,O):null},Gt=H=>Le=>{if(!l){if(D.current){D.current=!1;return}Le.stopPropagation(),Ve(H)}},Mt=Ge?Ot(Ge,"left"):null,_t=ve?Ot(ve,"right"):null,Ft=Mt?Gr(Mt,O):null,ut=_t?Gr(_t,O):null;return a.jsxs("div",{ref:k,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:Yt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:kt?rn:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:kt?1:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"},children:a.jsx(Xu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Yt})})]}),kt&&Je&&a.jsx(Xr,{media:Je,style:Tt(Je,"left","far"),onMeasure:it,onTransitionEnd:yt},`far-prev-${Je.url}`),kt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Xr,{media:Ge,style:Tt(Ge,"left"),onMeasure:it,onTransitionEnd:yt},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(-1)})]}),kt&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Xr,{media:ve,style:Tt(ve,"right"),onMeasure:it,onTransitionEnd:yt},`next-${ve.url}`),ut&&a.jsx("div",{style:{position:"absolute",top:ut.top,left:ut.left,width:ut.width,height:ut.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Gt(1)})]}),kt&&st&&a.jsx(Xr,{media:st,style:Tt(st,"right","far"),onMeasure:it,onTransitionEnd:yt},`far-next-${st.url}`),ie&&J&&(He?a.jsx(qb,{src:J.url,phase:Q,onMediaElement:Vt,wrapperStyle:ht,videoStyle:Wt,onLoadedMetadata:wt,onTransitionEnd:yt},`${n}-${J.url}`):a.jsx("img",{ref:Vt,src:J.url,alt:J.name,onLoad:wt,onTransitionEnd:yt,style:ht},`${n}-${J.url}`))]})}const Kb=20,Yb=.18;function Zb(e){return`
18826
+ `}const Hn=500,Zo=650,wn="cubic-bezier(0.22, 1, 0.36, 1)",Eb=72,Mb=50,Ab=1e4,Fb=650,Nb=500;function _b(e,t){const n=e.width/t.width,i=e.height/t.height,o=e.left-t.left,r=e.top-t.top;return`translate(${o}px, ${r}px) scale(${n}, ${i})`}function cp(e,t){if(t==="contain"&&e instanceof HTMLImageElement){const i=ya(e);return{left:i.x,top:i.y,width:i.width,height:i.height}}const n=e.getBoundingClientRect();return{left:n.left,top:n.top,width:n.width,height:n.height}}function Hb(e,t,n){const i=e.querySelector(`[data-waterfall-index="${t}"]`);return i instanceof HTMLElement?cp(i,n):null}function Wb(e){return e.reduce((t,n,i)=>{var o;return(o=n.image)!=null&&o.url&&t.push({gridIndex:i,items:[n.image],entry:{title1:n.title??"",title2:n.subtitle??"",title3:n.caption??""}}),t},[])}function or(e,t,n){var o;if(e.length<=1)return null;const i=(t+n+e.length)%e.length;return((o=e[i])==null?void 0:o.items[0])??null}function od(e,t,n){if(e.length<=2)return null;const i=(t+n+e.length)%e.length;return or(e,i,n)}const Ob=.03;function dp(e){return e.width*Ob}const fs={left:0,top:0,width:typeof window<"u"?window.innerWidth:1440,height:typeof window<"u"?window.innerHeight:900};function Gr(e,t){return{left:e.left-t.left,top:e.top-t.top,width:e.width,height:e.height}}function rd(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function Db(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}function Gs(e,t,n){const i=e.getBoundingClientRect(),o=i.width,r=i.height,l=t/n,c=o/r;if(l>c){const u=o/l;return{width:o,height:u,left:i.left,top:i.top+(r-u)/2}}const d=r*l;return{width:d,height:r,left:i.left+(o-d)/2,top:i.top}}function zb(e,t){return!e||!(t!=null&&t.width)||!(t!=null&&t.height)?null:Gs(e,t.width,t.height)}function Bb(e,t){if(Da(e)){const i=document.createElement("video"),o=()=>{i.videoWidth>0&&i.videoHeight>0&&t(e.url,i.videoWidth,i.videoHeight),i.removeEventListener("loadedmetadata",o)};i.addEventListener("loadedmetadata",o),i.preload="auto",i.src=e.url,i.load();return}const n=new Image;n.onload=()=>{n.naturalWidth>0&&n.naturalHeight>0&&t(e.url,n.naturalWidth,n.naturalHeight)},n.src=e.url}function jb(e){const t=new Set,n=[];for(const i of e){const o=i.image;!(o!=null&&o.url)||t.has(o.url)||(t.add(o.url),n.push(o))}return n}function Vb({mediaList:e}){return e.length===0?null:a.jsx("div",{"aria-hidden":!0,style:{position:"absolute",width:0,height:0,overflow:"hidden",opacity:0,pointerEvents:"none"},children:e.map(t=>Da(t)?a.jsx("video",{src:t.url,preload:"auto",muted:!0,playsInline:!0},t.url):a.jsx("img",{src:t.url,alt:""},t.url))})}function Ao(e,t,n){const{width:i,height:o,top:r}=e,{left:l,width:c}=n,d=dp(n);return t==="left"?{left:l+d-i,top:r,width:i,height:o}:{left:l+c-d,top:r,width:i,height:o}}function Sa(e,t,n){const i=Ao(e,t,n);return{...i,left:2*i.left-e.left}}function Gb(e,t,n){const{left:i,width:o}=n,r=dp(n);return t==="left"?{left:i,top:e.top,width:r,height:e.height}:{left:i+o-r,top:e.top,width:r,height:e.height}}function up(e,t,n,i){const o=Ao(e,"left",i),r=Ao(e,"right",i),l=Sa(e,"left",i),c=Sa(e,"right",i);if(n===1)switch(t){case"center":return{start:e,end:o};case"right-adjacent":return{start:r,end:e};case"left-adjacent":return{start:o,end:l};case"far-right":return{start:c,end:r};default:return{start:e,end:e}}switch(t){case"center":return{start:e,end:r};case"left-adjacent":return{start:o,end:e};case"right-adjacent":return{start:r,end:c};case"far-left":return{start:l,end:o};default:return{start:e,end:e}}}function Xb(e,t,n,i){const{start:o,end:r}=up(e,t,n,i);return{x:r.left-o.left,y:r.top-o.top}}function qb(e,t,n){const i=Ao(e,t,n),o=Sa(e,t,n);return{x:o.left-i.left,y:o.top-i.top}}function Da(e){return e.type==="video"?!0:/\.(mp4|webm|ogg|mov)(\?|#|$)/i.test(e.url)}function Ub({src:e,phase:t,onMediaElement:n,wrapperStyle:i,videoStyle:o,onLoadedMetadata:r,onTransitionEnd:l}){const c=s.useRef(null);return s.useEffect(()=>{const d=c.current;return n==null||n(d??null),()=>{d==null||d.pause(),n==null||n(null)}},[e,n]),a.jsx("div",{style:i,onTransitionEnd:l,children:a.jsx("video",{ref:c,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:r,onClick:d=>d.stopPropagation(),style:o},e)})}function Xr({media:e,style:t,onTransitionEnd:n,onMeasure:i}){return Da(e)?a.jsx("video",{src:e.url,muted:!0,playsInline:!0,preload:"auto",style:t,onLoadedMetadata:o=>{const r=o.currentTarget;r.videoWidth>0&&r.videoHeight>0&&(i==null||i(e.url,r.videoWidth,r.videoHeight))},onTransitionEnd:n}):a.jsx("img",{src:e.url,alt:e.name,style:t,onLoad:o=>{const r=o.currentTarget;r.naturalWidth>0&&r.naturalHeight>0&&(i==null||i(e.url,r.naturalWidth,r.naturalHeight))},onTransitionEnd:n})}function Kb({prefix:e,items:t,index:n,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,canNavigate:d,lightboxEntries:u,entryIdx:p,layoutId:y,sourceRect:x,resolveCloseSourceRect:m,onClose:g,onPrev:v,onNext:b}){const M=s.useRef(null),f=s.useRef(null),S=s.useRef(null),W=s.useRef(new Map),[U,B]=s.useState(0),P=s.useRef(null),H=s.useRef(0),V=s.useRef(0),$=s.useRef("none"),L=s.useRef(!1),D=s.useRef(!1),A=s.useRef(!1),T=s.useRef(null),C=s.useRef(null),X=s.useRef(null),w=s.useRef(()=>{}),q=s.useRef(null),k=s.useRef(null),N=s.useRef(null),j=s.useRef(!1),[ie,ae]=s.useState(null),[O,oe]=s.useState(fs),[_,le]=s.useState(0),[Q,be]=s.useState("opening"),[Le,ye]=s.useState(0),[ce,Y]=s.useState(0),[se,pe]=s.useState(!1),[fe,we]=s.useState(null),[Re,ge]=s.useState(null),[xe,Ce]=s.useState(null),[h,K]=s.useState(!1),[Z,ne]=s.useState(null),[de,z]=s.useState(!1),I=s.useRef(!1),[ee,te]=s.useState(!1),[me,G]=s.useState(!1),Ie=s.useRef(n),Se=s.useRef(void 0),J=t[n],He=J?Da(J):!1,We=ce!==0||se,ot=!l&&(!r||!!c),qe=d&&!l,tt=u.length>1,et=s.useCallback((E,Pe)=>t.length<=1?null:t[(E+Pe+t.length)%t.length]??null,[t]),Ge=tt?or(u,p,-1):et(n,-1),ve=tt?or(u,p,1):et(n,1),_e=fe===-1&&We?tt&&Re!==null?or(u,Re,-1):xe!==null?et(xe,-1):null:null,je=fe===1&&We?tt&&Re!==null?or(u,Re,1):xe!==null?et(xe,1):null:null,Ze=_e&&_e.url!==(Ge==null?void 0:Ge.url)?_e:null,$e=je&&je.url!==(ve==null?void 0:ve.url)?je:null,Ne=Ge&&qe?(()=>{const E=tt?od(u,p,-1):t.length>2?et((n-1+t.length)%t.length,-1):null;return E&&E.url!==Ge.url?E:null})():null,Ue=ve&&qe?(()=>{const E=tt?od(u,p,1):t.length>2?et((n+1)%t.length,1):null;return E&&E.url!==ve.url?E:null})():null,Je=Ze??Ne,st=$e??Ue,it=s.useCallback((E,Pe,Be)=>{if(!E||!Pe||!Be)return;const Ee=W.current,ct=Ee.get(E);(ct==null?void 0:ct.width)===Pe&&(ct==null?void 0:ct.height)===Be||(Ee.set(E,{width:Pe,height:Be}),B(Wt=>Wt+1))},[]),Oe=s.useCallback(E=>{if(!(E!=null&&E.url))return null;const Pe=W.current.get(E.url);return zb(f.current,Pe)},[U,_]),Fe=s.useCallback(()=>{if(!J)return;const E=Oe(J);if(E){ae(E);return}const Pe=f.current;Pe&&ae(rd(Pe))},[J,Oe]),ut=s.useCallback(E=>{if(tt){const Pe=u.length;ge((p+E+Pe)%Pe),Ce(null);return}t.length>1&&(Ce((n+E+t.length)%t.length),ge(null))},[tt,u.length,p,t.length,n]),ze=s.useCallback(E=>{A.current=E,pe(E)},[]),De=s.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null)},[]),Xe=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{De(),ze(!1)},Zo+32)},[De,ze]),pt=s.useCallback(()=>{const E=M.current;if(!E){oe({left:0,top:0,width:typeof window<"u"?window.innerWidth:fs.width,height:typeof window<"u"?window.innerHeight:fs.height});return}const Pe=E.getBoundingClientRect();oe({left:Pe.left,top:Pe.top,width:Pe.width,height:Pe.height})},[]),he=s.useCallback((E,Pe)=>{if(We){if(ee&&!se)return`translate(${ce}px, 0px)`;if(se&&fe!==null){const Be=Oe(E);if(!Be)return;const{x:Ee,y:ct}=Xb(Be,Pe,fe,O);return`translate(${Ee}px, ${ct}px)`}if(se)return"translate(0px, 0px)"}},[We,ee,se,ce,fe,O,Oe]),Me=s.useCallback(()=>{const E=C.current;C.current=null,De(),ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,V.current=0,$.current="none",E===-1?v():E===1&&b()},[De,ze,v,b]),nt=s.useCallback(()=>{De(),T.current=window.setTimeout(()=>{C.current!==null&&Me()},Zo+32)},[De,Me]),gt=s.useCallback(()=>{De(),C.current=null,ze(!1),we(null),ge(null),Ce(null),Y(0),te(!1),L.current=!1,V.current=0,$.current="none"},[De,ze]),Ve=s.useCallback(E=>{if(!(!qe||!ie)){if(A.current){if(C.current===E){X.current=E,Me();return}gt()}De(),ut(E),C.current=E,we(E),ze(!0),nt()}},[qe,ie,Me,gt,De,ut,ze,nt]);w.current=Ve;const yt=s.useCallback(()=>{q.current=null,j.current=!1,k.current!==null&&(window.clearInterval(k.current),k.current=null),N.current!==null&&(window.clearTimeout(N.current),N.current=null)},[]),It=s.useCallback(E=>{k.current!==null&&window.clearInterval(k.current);const Pe=j.current?Nb:Fb;k.current=window.setInterval(()=>{w.current(E)},Pe)},[]),At=s.useCallback(E=>{q.current!==E&&(yt(),q.current=E,j.current=!1,w.current(E),It(E),N.current=window.setTimeout(()=>{N.current=null,q.current===E&&(j.current=!0,It(E))},Ab))},[yt,It]),St=s.useCallback(()=>{const E=f.current;if(!E)return;const Pe=J==null?void 0:J.url,Be=Pe?W.current.get(Pe):void 0;if(Be!=null&&Be.width&&(Be!=null&&Be.height)){ae(Gs(E,Be.width,Be.height));return}const Ee=S.current;if(Ee&&Pe&&(Ee.src===Pe||Ee.currentSrc===Pe)){const{width:Wt,height:ht}=Db(Ee);if(Wt&&ht){it(Pe,Wt,ht),ae(Gs(E,Wt,ht));return}}const ct=rd(E);!ct.width||!ct.height||ae(ct)},[J==null?void 0:J.url,it]),Vt=s.useCallback(E=>{if(S.current=E,!!E){if(E instanceof HTMLVideoElement){E.readyState>=1&&E.videoWidth>0&&St();return}E.complete&&E.naturalWidth>0&&St()}},[St]),jt=s.useCallback(()=>{pt(),St(),le(E=>E+1)},[pt,St]);s.useEffect(()=>{jt();const E=f.current,Pe=M.current,Be=new ResizeObserver(()=>jt());return E&&Be.observe(E),Pe&&Be.observe(Pe),window.addEventListener("resize",jt),()=>{Be.disconnect(),window.removeEventListener("resize",jt)}},[jt,n,y]),s.useLayoutEffect(()=>{if(!J)return;const E=S.current;if(E){if(E instanceof HTMLImageElement&&E.complete&&E.naturalWidth>0){St();return}E instanceof HTMLVideoElement&&E.readyState>=1&&E.videoWidth>0&&St()}},[J==null?void 0:J.url,n,St]),s.useEffect(()=>{Fe()},[Fe,U]),s.useEffect(()=>{const E=new Set,Pe=[],Be=Ee=>{!(Ee!=null&&Ee.url)||E.has(Ee.url)||(E.add(Ee.url),Pe.push(Ee))};t.forEach(Be),u.forEach(Ee=>Ee.items.forEach(Be)),Pe.forEach(Ee=>{W.current.has(Ee.url)||Bb(Ee,it)})},[t,u,it]),s.useEffect(()=>{if(Q!=="opening"||!ie)return;if(!x){be("open");return}K(!1);const E=requestAnimationFrame(()=>{requestAnimationFrame(()=>{K(!0),be("open")})});return()=>cancelAnimationFrame(E)},[Q,ie,x]),s.useEffect(()=>{if(Q!=="closing")return;const E=setTimeout(()=>g(),Hn);return()=>clearTimeout(E)},[Q,g]),s.useEffect(()=>()=>{De()},[De]),s.useLayoutEffect(()=>{Ie.current===n&&Se.current===(J==null?void 0:J.url)||(De(),C.current=null,we(null),ge(null),Ce(null),ye(0),Y(0),ze(!1),G(!1),te(!1),H.current=0,V.current=0,$.current="none",L.current=!1,P.current=null,D.current=!1,S.current=null,Fe(),Ie.current=n,Se.current=J==null?void 0:J.url)},[n,J==null?void 0:J.url,ze,De,Fe]),s.useLayoutEffect(()=>{const E=X.current;E!==null&&(X.current=null,requestAnimationFrame(()=>{w.current(E)}))},[n,p,J==null?void 0:J.url]),s.useLayoutEffect(()=>{if(Q==="opening"){I.current=!1,z(!1);return}if(Q!=="open"||I.current)return;if(!Ge&&!ve){I.current=!0;return}z(!1);const E=requestAnimationFrame(()=>{requestAnimationFrame(()=>{z(!0),I.current=!0})});return()=>cancelAnimationFrame(E)},[Q,Ge==null?void 0:Ge.url,ve==null?void 0:ve.url]),s.useEffect(()=>{if(Q!=="open")return;const E=()=>{const ht=Tt=>{Tt.stopPropagation(),Tt.preventDefault(),document.removeEventListener("click",ht,!0)};document.addEventListener("click",ht,!0)},Pe=ht=>{const Tt=ht<0?1:-1;De(),ut(Tt),C.current=Tt,we(Tt),ze(!0),nt()},Be=ht=>{if(Math.abs(ht)>Mb&&qe){Pe(ht);return}C.current=null,we(null),ge(null),Ce(null),ze(!0),Y(0),Xe()},Ee=ht=>{if(ht.touches.length!==1||A.current)return;const Tt=ht.touches[0];D.current=!0,P.current={x:Tt.clientX,y:Tt.clientY},$.current="none",V.current=0,L.current=!1},ct=ht=>{if(!P.current||ht.touches.length!==1||A.current)return;const Tt=ht.touches[0],qt=Tt.clientX-P.current.x,Ot=Tt.clientY-P.current.y;if($.current==="none"){if(Math.abs(qt)<10&&Math.abs(Ot)<10)return;if(Math.abs(qt)>Math.abs(Ot)){if(!qe)return;$.current="horizontal"}else if(Ot>0){if(!ot)return;$.current="vertical"}else return}if($.current==="horizontal"){L.current=!0,te(!0),V.current=qt,Y(qt),ht.preventDefault();return}$.current==="vertical"&&(L.current=!0,te(!0),H.current=Ot,ye(Ot),ht.preventDefault())},Wt=()=>{if(!P.current)return;const ht=$.current,Tt=L.current;if(Tt&&ht==="horizontal")Be(V.current),E();else if(Tt&&ht==="vertical"){const qt=H.current;if(ot&&qt>Eb){const Ot=window.innerHeight;H.current=Ot,G(!0),ye(Ot),be("closing")}else H.current=0,ye(0);E()}else ht==="horizontal"&&Math.abs(V.current)>0&&(Be(V.current),E());P.current=null,$.current="none",V.current=0,L.current=!1,te(!1)};return document.addEventListener("touchstart",Ee,{passive:!0}),document.addEventListener("touchmove",ct,{passive:!1}),document.addEventListener("touchend",Wt),document.addEventListener("touchcancel",Wt),()=>{document.removeEventListener("touchstart",Ee),document.removeEventListener("touchmove",ct),document.removeEventListener("touchend",Wt),document.removeEventListener("touchcancel",Wt)}},[Q,qe,ze,Xe,De,ot,nt,ut]);const Ut=s.useCallback(()=>{const E=(m==null?void 0:m())??x??null;E&&ie&&(ne(E),K(!0)),be("closing")},[m,x,ie]);s.useEffect(()=>{const E=Ee=>{if(Ee.key==="Escape"){if(r&&c||Q==="closing")return;yt(),Ut();return}if(Ee.key!=="ArrowLeft"&&Ee.key!=="ArrowRight"||Q!=="open"||!qe)return;Ee.preventDefault();const ct=Ee.key==="ArrowLeft"?-1:1;Ee.repeat&&q.current===ct||At(ct)},Pe=Ee=>{if(Ee.key!=="ArrowLeft"&&Ee.key!=="ArrowRight")return;const ct=Ee.key==="ArrowLeft"?-1:1;q.current===ct&&yt()},Be=()=>{yt()};return window.addEventListener("keydown",E),window.addEventListener("keyup",Pe),window.addEventListener("blur",Be),()=>{window.removeEventListener("keydown",E),window.removeEventListener("keyup",Pe),window.removeEventListener("blur",Be),yt()}},[Q,r,c,Ut,qe,At,yt]),s.useEffect(()=>{Q!=="open"&&yt()},[Q,yt]);const Kt=()=>{Q==="closing"||l||Ut()},Rt=Q==="open",zt=Q==="closing",rn=Le>0?Math.max(0,1-Le/500):1,vt=Le>0?Math.max(.35,1-Le/500):1,ft=s.useCallback(E=>{if(!(E.propertyName!=="transform"||!A.current)){if(C.current!==null){Me();return}De(),ze(!1)}},[De,ze,Me]),Ae=Q==="closing"?Z??x:x,Qe=Ae&&ie&&(Q==="opening"||zt)?_b(Ae,ie):void 0,at=We&&J?he(J,"center"):Le>0?`translateY(${Le}px)`:Qe,mt=ie?Gr(ie,O):null,Lt=!!(Ae&&ie),bt=Lt&&(Q==="closing"||Q==="open"&&h),kt={position:"absolute",top:mt==null?void 0:mt.top,left:mt==null?void 0:mt.left,width:mt==null?void 0:mt.width,height:mt==null?void 0:mt.height,objectFit:"contain",transformOrigin:"top left",transform:at,opacity:Le>0?vt:Lt?1:Q==="opening"||zt?0:1,transition:ee&&!se?"none":se?`transform ${Zo}ms ${wn}`:me?`transform ${Hn}ms ${wn}, opacity ${Hn}ms ${wn}`:bt?`transform ${Hn}ms ${wn}`:Q==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:He&&Rt&&!We?"auto":"none",touchAction:He&&Rt?"none":void 0,zIndex:1,overflow:He?"hidden":void 0},Bt={width:"100%",height:"100%",display:"block",objectFit:"contain",pointerEvents:Rt&&!We?"auto":"none"},lt=(E,Pe,Be="adjacent")=>{const Ee=Oe(E);if(!Ee)return{display:"none"};const ct=Be==="far"?Pe==="left"?"far-left":"far-right":Pe==="left"?"left-adjacent":"right-adjacent",{start:Wt}=fe!==null?up(Ee,ct,fe,O):{start:Be==="far"?Sa(Ee,Pe,O):Ao(Ee,Pe,O)},ht=Gr(Wt,O),Tt=he(E,ct),qt=!We&&Be==="adjacent"&&Rt&&!de?qb(Ee,Pe,O):null,Ot=Be==="far"&&We&&fe===(Pe==="left"?-1:1),an=ee&&!se?!1:se,ln=Be==="adjacent"&&Rt&&de&&!We;return{position:"absolute",top:ht.top,left:ht.left,width:ht.width,height:ht.height,objectFit:"contain",transform:Tt??(qt?`translate(${qt.x}px, ${qt.y}px)`:void 0),opacity:Be==="far"?Rt&&Ot?1:0:Rt?1:0,transition:an?Be==="far"?`transform ${Zo}ms ${wn}`:`transform ${Zo}ms ${wn}, opacity ${Hn}ms ${wn}`:ln?`transform ${Hn}ms ${wn}`:Q==="opening"||zt?`opacity ${Hn}ms ${wn}`:"none",pointerEvents:"none",zIndex:1}},Ht=(E,Pe)=>{const Be=Oe(E);return Be?Gb(Ao(Be,Pe,O),Pe,O):null},Yt=E=>Pe=>{if(!l){if(D.current){D.current=!1;return}Pe.stopPropagation(),Ve(E)}},Mt=Ge?Ht(Ge,"left"):null,Nt=ve?Ht(ve,"right"):null,Ft=Mt?Gr(Mt,O):null,$t=Nt?Gr(Nt,O):null;return a.jsxs("div",{ref:M,className:[`${e}-lightbox`,r?`${e}-lightbox-editor`:"",l?`${e}-lightbox-edit-mode`:""].filter(Boolean).join(" "),style:{touchAction:Q==="open"?"none":void 0},onClick:Kt,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:o.backgroundColor??"#FFFFFF",opacity:Rt?rn:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"}}),a.jsxs("div",{className:`${e}-lightbox-dismiss-area`,children:[a.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:f,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{height:"10%"}})]}),a.jsx("div",{style:{position:"absolute",inset:0,opacity:Rt?1:0,transition:ee?"none":`opacity ${Hn}ms ${wn}`,pointerEvents:"none"},children:a.jsx(Xu,{prefix:e,entry:i,settings:o,isEditor:r,isEditMode:l,isPreviewMode:c,onClose:Kt})})]}),Rt&&Je&&a.jsx(Xr,{media:Je,style:lt(Je,"left","far"),onMeasure:it,onTransitionEnd:ft},`far-prev-${Je.url}`),Rt&&Ge&&a.jsxs(a.Fragment,{children:[a.jsx(Xr,{media:Ge,style:lt(Ge,"left"),onMeasure:it,onTransitionEnd:ft},`prev-${Ge.url}`),Ft&&a.jsx("div",{style:{position:"absolute",top:Ft.top,left:Ft.left,width:Ft.width,height:Ft.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Yt(-1)})]}),Rt&&ve&&a.jsxs(a.Fragment,{children:[a.jsx(Xr,{media:ve,style:lt(ve,"right"),onMeasure:it,onTransitionEnd:ft},`next-${ve.url}`),$t&&a.jsx("div",{style:{position:"absolute",top:$t.top,left:$t.left,width:$t.width,height:$t.height,cursor:l||ee?"default":"pointer",pointerEvents:l||ee?"none":"auto",zIndex:3},onClick:Yt(1)})]}),Rt&&st&&a.jsx(Xr,{media:st,style:lt(st,"right","far"),onMeasure:it,onTransitionEnd:ft},`far-next-${st.url}`),ie&&J&&(He?a.jsx(Ub,{src:J.url,phase:Q,onMediaElement:Vt,wrapperStyle:kt,videoStyle:Bt,onLoadedMetadata:St,onTransitionEnd:ft},`${n}-${J.url}`):a.jsx("img",{ref:Vt,src:J.url,alt:J.name,onLoad:St,onTransitionEnd:ft,style:kt},`${n}-${J.url}`))]})}const Yb=20,Zb=.18;function Jb(e){return`
18837
18827
  .${e}-wrapper {
18838
18828
  box-sizing: border-box;
18839
18829
  max-width: 100%;
@@ -18920,8 +18910,8 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
18920
18910
  z-index: 2;
18921
18911
  pointer-events: auto;
18922
18912
  }
18923
- ${Rb(e)}
18924
- `}function Jb(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function Qb(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function eS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:F.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:F.scalingValue(i*Yb,n??!1),[`--${t}-image-aspect`]:Jb(e)}}function tS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function nS(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function iS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?cp(c,o):void 0)}}function oS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>Zb(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,v=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=F.scalingValue(v,n??!1),g=`max(${m}, ${Kb}px)`,{objectFitMode:x,imageStyle:b}=nS(e),k=tS(e,n),f=s.useRef(null),[S,W]=s.useState(!1),[U,B]=s.useState([]),[P,_]=s.useState(0),[G,$]=s.useState(0),[L,D]=s.useState(null),[E,T]=s.useState({title1:"",title2:"",title3:""}),C=(!n||i)&&!S,V=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},w=V.sizeType??"none",q=C&&w!=="none"?`${c}-item-image-hover-${w}`:void 0,I=(V.value??120)/100,A=s.useCallback(ce=>{!ce||w!=="scale"||(ce.style.transformOrigin=ef(ce))},[w]),j=s.useCallback(ce=>{if(ce){if(x==="contain"){const Y=Qb(ce);if(Y){const se=ce.closest(`.${c}-item-image`);se instanceof HTMLElement&&se.style.setProperty(`--${c}-item-media-aspect`,String(Y))}}A(ce)}},[c,A,x]),ie={width:F.scalingValue(y,n??!1),...k,...eS(e,c,n),[`--${c}-image-hover-scale`]:String(I)},ae=(()=>{const ce={},Y=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return Y&&(ce["--cntrl-article-width"]=Y),ce})(),O=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),oe=s.useMemo(()=>Hb(u),[u]),N=s.useMemo(()=>Bb(u),[u]),le=(ce,Y)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const se=oe.findIndex(fe=>fe.gridIndex===ce);if(se<0)return;const pe=oe[se];$(se),B(pe.items),_(0),T(pe.entry),D(Y??null),W(!0)},Q=s.useCallback(()=>{W(!1),D(null)},[]),be=s.useCallback(()=>{const ce=oe[G];return!ce||!f.current?L:_b(f.current,ce.gridIndex,x)??L},[oe,G,L,x]),Pe=s.useCallback(ce=>{if(oe.length>1){const Y=oe.length,se=(G+ce+Y)%Y,pe=oe[se];$(se),B(pe.items),_(0),T(pe.entry);return}_(Y=>(Y+ce+U.length)%U.length)},[oe,G,U.length]),ye=oe.length>1||U.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[S]),s.useEffect(()=>{!n||o||i||W(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&W(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(jb,{mediaList:N}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:ie,children:u.map((ce,Y)=>{var fe,we;const se=!!((fe=ce.image)!=null&&fe.url),pe=iS(!!O,se,Y,c,x,le);return a.jsxs("div",{className:`${c}-item`,children:[ce.title?a.jsx("span",{className:`${c}-item-title`,onClick:pe,style:pe?{cursor:"pointer"}:void 0,children:ce.title}):null,(we=ce.image)!=null&&we.url?a.jsx("span",{className:[`${c}-item-image`,x==="contain"?`${c}-item-image-fit`:void 0,q].filter(Boolean).join(" "),children:ce.image.type==="video"?a.jsx("video",{ref:j,src:ce.image.url,"data-waterfall-index":Y,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:pe,onLoadedData:Re=>j(Re.currentTarget)}):a.jsx("img",{ref:j,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":Y,style:b,onClick:pe,onLoad:Re=>j(Re.currentTarget)})}):null,Y<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!S&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:g,height:"100%"}})})]},Y)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:ae,"data-selection":"none",children:a.jsx(Ub,{prefix:c,items:U,index:P,entry:E,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:oe,entryIdx:G,layoutId:r,sourceRect:L,resolveCloseSourceRect:be,onClose:Q,onPrev:()=>Pe(-1),onNext:()=>Pe(1)})}),ce)})()]})}const rS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18913
+ ${kb(e)}
18914
+ `}function Qb(e){const{imageDisplay:t}=e??{},n=(t==null?void 0:t.ratioValue)??"1:1",i=(t==null?void 0:t.reversed)??!1,[o,r]=n.split(":").map(Number),l=i?r:o,c=i?o:r;return c>0?l/c:1}function eS(e){const t=e instanceof HTMLVideoElement?e.videoWidth:e.naturalWidth,n=e instanceof HTMLVideoElement?e.videoHeight:e.naturalHeight;return!t||!n?null:t/n}function tS(e,t,n){const i=(e==null?void 0:e.titleFontSize)??.07,o=(e==null?void 0:e.titleLineHeight)??i;return{[`--${t}-line-height`]:R.scalingValue(o,n??!1),[`--${t}-image-inline-gap`]:R.scalingValue(i*Zb,n??!1),[`--${t}-image-aspect`]:Qb(e)}}function nS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.07,lineHeight:e==null?void 0:e.titleLineHeight,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function iS(e){var o;const t=((o=e==null?void 0:e.imageDisplay)==null?void 0:o.display)==="cover",n=((e==null?void 0:e.lightbox)??"on")==="on",i={objectFit:t?"cover":"contain",pointerEvents:"auto",...n?{cursor:"pointer"}:null};return{objectFitMode:t?"cover":"contain",imageStyle:i}}function oS(e,t,n,i,o,r){if(!(!e||!t))return l=>{var d;const c=((d=l.currentTarget.closest(`.${i}-item`))==null?void 0:d.querySelector(`[data-waterfall-index="${n}"]`))??(l.currentTarget instanceof HTMLImageElement||l.currentTarget instanceof HTMLVideoElement?l.currentTarget:null);r(n,c?cp(c,o):void 0)}}function rS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,layoutId:r,portalId:l}){const{prefix:c}=R.useScopedStyles(),d=s.useMemo(()=>Jb(c),[c]),u=t??[],p=(e==null?void 0:e.type)??"a",y=typeof(e==null?void 0:e.wrapperWidth)=="number"?e.wrapperWidth:1,x=typeof(e==null?void 0:e.horizontalGap)=="number"?e.horizontalGap:0,m=R.scalingValue(x,n??!1),g=`max(${m}, ${Yb}px)`,{objectFitMode:v,imageStyle:b}=iS(e),M=nS(e,n),f=s.useRef(null),[S,W]=s.useState(!1),[U,B]=s.useState([]),[P,H]=s.useState(0),[V,$]=s.useState(0),[L,D]=s.useState(null),[A,T]=s.useState({title1:"",title2:"",title3:""}),C=(!n||i)&&!S,X=(e==null?void 0:e.imageHoverEffect)??{sizeType:"none",value:120},w=X.sizeType??"none",q=C&&w!=="none"?`${c}-item-image-hover-${w}`:void 0,k=(X.value??120)/100,N=s.useCallback(ce=>{!ce||w!=="scale"||(ce.style.transformOrigin=ef(ce))},[w]),j=s.useCallback(ce=>{if(ce){if(v==="contain"){const Y=eS(ce);if(Y){const se=ce.closest(`.${c}-item-image`);se instanceof HTMLElement&&se.style.setProperty(`--${c}-item-media-aspect`,String(Y))}}N(ce)}},[c,N,v]),ie={width:R.scalingValue(y,n??!1),...M,...tS(e,c,n),[`--${c}-image-hover-scale`]:String(k)},ae=(()=>{const ce={},Y=f.current?getComputedStyle(f.current).getPropertyValue("--cntrl-article-width").trim():"";return Y&&(ce["--cntrl-article-width"]=Y),ce})(),O=((e==null?void 0:e.lightbox)??"on")==="on"&&(!n||i||o),oe=s.useMemo(()=>Wb(u),[u]),_=s.useMemo(()=>jb(u),[u]),le=(ce,Y)=>{if(((e==null?void 0:e.lightbox)??"on")==="off"||n&&!o&&!i)return;const se=oe.findIndex(fe=>fe.gridIndex===ce);if(se<0)return;const pe=oe[se];$(se),B(pe.items),H(0),T(pe.entry),D(Y??null),W(!0)},Q=s.useCallback(()=>{W(!1),D(null)},[]),be=s.useCallback(()=>{const ce=oe[V];return!ce||!f.current?L:Hb(f.current,ce.gridIndex,v)??L},[oe,V,L,v]),Le=s.useCallback(ce=>{if(oe.length>1){const Y=oe.length,se=(V+ce+Y)%Y,pe=oe[se];$(se),B(pe.items),H(0),T(pe.entry);return}H(Y=>(Y+ce+U.length)%U.length)},[oe,V,U.length]),ye=oe.length>1||U.length>1;return s.useEffect(()=>{if(!S||typeof document>"u")return;const ce=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ce}},[S]),s.useEffect(()=>{!n||o||i||W(!1)},[n,o,i]),s.useEffect(()=>{((e==null?void 0:e.lightbox)??"on")==="off"&&W(!1)},[e==null?void 0:e.lightbox]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx(Vb,{mediaList:_}),a.jsx("div",{ref:f,className:`${c}-wrapper ${c}-type-${p}`,style:ie,children:u.map((ce,Y)=>{var fe,we;const se=!!((fe=ce.image)!=null&&fe.url),pe=oS(!!O,se,Y,c,v,le);return a.jsxs("div",{className:`${c}-item`,children:[ce.title?a.jsx("span",{className:`${c}-item-title`,onClick:pe,style:pe?{cursor:"pointer"}:void 0,children:ce.title}):null,(we=ce.image)!=null&&we.url?a.jsx("span",{className:[`${c}-item-image`,v==="contain"?`${c}-item-image-fit`:void 0,q].filter(Boolean).join(" "),children:ce.image.type==="video"?a.jsx("video",{ref:j,src:ce.image.url,"data-waterfall-index":Y,style:b,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,onClick:pe,onLoadedData:Re=>j(Re.currentTarget)}):a.jsx("img",{ref:j,src:ce.image.url,alt:ce.image.name??"","data-waterfall-index":Y,style:b,onClick:pe,onLoad:Re=>j(Re.currentTarget)})}):null,Y<u.length-1&&a.jsx("div",{className:`${c}-item-gap-host`,style:{width:m},children:o&&!S&&a.jsx("div",{"data-controls":"horizontalGap","data-controls-axis":"x","data-controls-min":"0",className:`${c}-item-gap-control`,style:{left:"50%",transform:"translateX(-50%)",width:g,height:"100%"}})})]},Y)})}),S&&((e==null?void 0:e.lightbox)??"on")==="on"&&typeof document<"u"&&e&&(()=>{const ce=(l?document.getElementById(l):null)??document.body;return Gn.createPortal(a.jsx("div",{style:ae,"data-selection":"none",children:a.jsx(Kb,{prefix:c,items:U,index:P,entry:A,settings:e,isEditor:n,isEditMode:o,isPreviewMode:i,canNavigate:ye,lightboxEntries:oe,entryIdx:V,layoutId:r,sourceRect:L,resolveCloseSourceRect:be,onClose:Q,onPrev:()=>Le(-1),onNext:()=>Le(1)})}),ce)})()]})}const aS=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
18925
18915
  import type React from 'react';
18926
18916
  import { createPortal } from 'react-dom';
18927
18917
  import { CommonComponentProps } from '../props';
@@ -19435,7 +19425,7 @@ export function Waterfall({
19435
19425
  </>
19436
19426
  );
19437
19427
  }
19438
- `,aS="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),yi={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 sS(e){const t={};return t[bt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSettings")]={...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[bt(e,"fontSize")]={...yi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[bt(e,"lineHeight")]={...yi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[bt(e,"letterSpacing")]={...yi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[bt(e,"wordSpacing")]={...yi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[bt(e,"textAlign")]={...yi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[bt(e,"textAppearance")]={...yi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const No=Li.filter(e=>e!=="count"),lS=No.reduce((e,t)=>({...e,...sS(t)}),{}),cS=No.reduce((e,t)=>({...e,[bt(t,"fontFamily")]:"Arial",[bt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[bt(t,"letterSpacing")]:0,[bt(t,"wordSpacing")]:0,[bt(t,"textAlign")]:"left",[bt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return No.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[bt(n,"fontSize")]=i),o!==void 0&&(t[bt(n,"lineHeight")]=o),t},{})}const dS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(No.map(e=>[kl[e],El(e)]))},qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},uS=[{title:"Salton Sea from Above",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],pS={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!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"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",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"]}},required:["image"]},default:uS},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},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"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...lS},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:aS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...cS},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ys({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ys({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ys({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[dS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},mS={element:oS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...No.map(e=>({path:`${bt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...No.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${bt(t,"fontFamily")}`}),{})},schema:pS,sourceCode:rS},So=500,pp="cubic-bezier(0.25, 1, 0.5, 1)",gS=300,hS=5,fS=.15,yS=.4,vS=100,ro=100,ad={color:"#000000",hover:"#cccccc"},Jo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},xS={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},vs={offset:{x:0,y:0},linkColor:"#cccccc"},sd={sizeType:"drag",value:3},bS="left";function SS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:bS,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function ao(e,t,n){return`${e}: ${F.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function wS(e,t,n,i){if(!i)return{position:rr(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function $S(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function CS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,y)=>{n.style.transform=`translate(${p}px, ${y}px)`;const v=n.getBoundingClientRect();return{x:v.left,y:v.top}},o=i(0,0),r=i(ro,0),l=i(0,ro);e.removeChild(n);const c={x:(r.x-o.x)/ro,y:(r.y-o.y)/ro},d={x:(l.x-o.x)/ro,y:(l.y-o.y)/ro},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function TS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function LS(e,t){return`
19428
+ `,sS="data:image/svg+xml,"+encodeURIComponent('<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.959 0.40332L0.402635 15.9597" stroke="#000000" stroke-width="1.14"/><path d="M15.959 15.9594L0.402635 0.403002" stroke="#000000" stroke-width="1.14"/></svg>'),yi={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 lS(e){const t={};return t[xt(e,"fontFamily")]={type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},t[xt(e,"fontSettings")]={...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0}},t[xt(e,"fontSize")]={...yi.fontSize,scope:"layout",title:"",display:{type:"font-size"}},t[xt(e,"lineHeight")]={...yi.lineHeight,scope:"layout",title:"",display:{type:"line-height-input"}},t[xt(e,"letterSpacing")]={...yi.letterSpacing,scope:"layout",title:"",display:{type:"letter-spacing-input"}},t[xt(e,"wordSpacing")]={...yi.wordSpacing,scope:"layout",title:"",display:{type:"word-spacing-input"}},t[xt(e,"textAlign")]={...yi.textAlign,scope:"layout",title:"",display:{type:"vertical-text-aligh-options"}},t[xt(e,"textAppearance")]={...yi.textAppearance,scope:"layout",title:"",display:{type:"text-appearance",useTabDesign:!0}},t}const Fo=Li.filter(e=>e!=="count"),cS=Fo.reduce((e,t)=>({...e,...lS(t)}),{}),dS=Fo.reduce((e,t)=>({...e,[xt(t,"fontFamily")]:"Arial",[xt(t,"fontSettings")]:{fontWeight:400,fontStyle:"normal"},[xt(t,"letterSpacing")]:0,[xt(t,"wordSpacing")]:0,[xt(t,"textAlign")]:"left",[xt(t,"textAppearance")]:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}}),{});function ys(e){return Fo.reduce((t,n)=>{const i=e[`${n}FontSize`],o=e[`${n}LineHeight`];return i!==void 0&&(t[xt(n,"fontSize")]=i),o!==void 0&&(t[xt(n,"lineHeight")]=o),t},{})}const uS={type:"tab",id:"journalTextStyle",tabs:Object.fromEntries(Fo.map(e=>[kl[e],El(e)]))},qr={subtitle:"NASA",caption:"Apollo 9 Mission, 1969"},pS=[{title:"Salton Sea from Above",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",objectFit:"cover"}},{title:"Lunar Module Pilot",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",objectFit:"cover"}},{title:"CSM and Lunar Module LM",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",objectFit:"cover"}},{title:"David R. Scott During EVA",...qr,image:{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",objectFit:"cover"}}],mS={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},subtitle:{type:"string",label:"Subtitle",contentKey:"subtitle",placeholder:"Add Subtitle...",display:{type:"text-input"}},caption:{type:"string",label:"Caption",placeholder:"Add Caption...",display:{type:"text-input"}},image:{type:"object",label:"Image",contentKey:"gallery",display:{isObjectFitEditable:!1,defaultObjectFit:"cover",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"]}},required:["image"]},default:pS},settings:{sizing:"auto auto",properties:{type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},imageHoverEffect:{type:"object",scope:"common",title:"Hover",display:{type:"toggle-cycle-numeric-input",enum:["none","scale","saturate"],inputs:{none:"none",scale:"single",saturate:"none"},defaultValue:120,showDash:!1},min:0,max:9999,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},horizontalGap:{type:"number",scope:"layout",title:"Gutter",min:0,display:{type:"range-control"}},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"}},titleColor:{type:"string",scope:"common",title:"Title Default",display:{type:"palette-color-picker"}},title1Color:{type:"string",scope:"common",title:"Title Lightbox",display:{type:"palette-color-picker"}},title2Color:{type:"string",scope:"common",title:"Subtitle Lightbox",display:{type:"palette-color-picker"}},title3Color:{type:"string",scope:"common",title:"Caption Lightbox",display:{type:"palette-color-picker"}},contentMarginTop:{type:"number",scope:"layout",title:"Content margin top",min:0,display:{type:"range-control"}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",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"}},iconMarginRight:{type:"number",scope:"layout",title:"Icon margin right",min:0,display:{type:"range-control"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...yi.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},...cS},defaults:{type:"a",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightbox:"on",imageHoverEffect:{sizeType:"none",value:120,min:100,max:200},titleColor:"#000000",title1Color:"#000000",title2Color:"#000000",title3Color:"#000000",backgroundColor:"#FFFFFF",closeIcon:sS,closeIconColor:"#000000",closeIconHoverColor:"#999999",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},...dS},layoutDefaults:{d:{wrapperWidth:1,horizontalGap:.006944,titleHeaderLayout:"desktop",title1Width:.35,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.01,closeIconMaxWidth:.0125,iconMarginRight:.01,titleFontSize:.0625,titleLineHeight:.05555,titleLetterSpacing:-34722e-8,...ys({title1FontSize:.0098,title1LineHeight:.0098,title2FontSize:.0098,title2LineHeight:.0098,title3FontSize:.0098,title3LineHeight:.0098})},m:{wrapperWidth:1,horizontalGap:.026666,titleHeaderLayout:"mobile",title1Width:.4,title2Width:.464864,title3Width:.3,title1MarginLeft:.04,title2MarginLeft:.04,title3MarginLeft:.08,titleRowMarginBottom:.08,contentMarginTop:.081,closeIconMaxWidth:.081,iconMarginRight:.05405,titleFontSize:.16,titleLineHeight:.13333,...ys({title1FontSize:.04864,title1LineHeight:.056756,title2FontSize:.04864,title2LineHeight:.056756,title3FontSize:.04864,title3LineHeight:.056756})},t:{wrapperWidth:1,horizontalGap:.01302,titleHeaderLayout:"desktop",title1Width:.3,title2Width:.248,title3Width:.1,title1MarginLeft:.01,title2MarginLeft:.1,title3MarginLeft:.1,titleRowMarginBottom:0,contentMarginTop:.026,closeIconMaxWidth:.03906,iconMarginRight:.026,titleFontSize:.07,titleLineHeight:.07,...ys({title1FontSize:.02083,title1LineHeight:.02734,title2FontSize:.02083,title2LineHeight:.02734,title3FontSize:.02083,title3LineHeight:.02734})}},layout:["__componentName__","type","wrapperWidth","imageDisplay","lightbox","imageHoverEffect","horizontalGap","title1Width","title2Width","title3Width","title2MarginLeft","title3MarginLeft","titleHeaderLayout","titleRowMarginBottom","title1MarginLeft","contentMarginTop","closeIconMaxWidth","iconMarginRight","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",title:"",items:["wrapperWidth","lightbox"]},{type:"row",title:"Image",items:["imageDisplay","imageHoverEffect"]},{type:"row",title:"Close icon",items:["closeIcon","closeIconMaxWidth"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleTextAppearance"]},{type:"group",title:"Lightbox",items:[uS]}]}],paletteBookmark:{items:["titleColor","title1Color","title2Color","title3Color","backgroundColor","closeIconColor","closeIconHoverColor"],panelIds:["general","imageSettings","typeStyle"]}},gS={element:rS,id:"waterfall",name:"Waterfall",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/waterfall.png"},version:1,defaultSize:{d:{width:720,height:540}},assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},...Fo.map(e=>({path:`${xt(e,"fontFamily")}`}))]},fontRelations:{titleFontSettings:"titleFontFamily",...Fo.reduce((e,t)=>({...e,[`${t}FontSettings`]:`${xt(t,"fontFamily")}`}),{})},schema:mS,sourceCode:aS},bo=500,pp="cubic-bezier(0.25, 1, 0.5, 1)",hS=300,fS=5,yS=.15,vS=.4,xS=100,oo=100,ad={color:"#000000",hover:"#cccccc"},Jo={offset:{x:0,y:0},colors:{pagination:"#cccccc",inactive:"#cccccc",background:"#000000"}},bS={s:{paddingY:5,paddingActive:5,borderRadius:9,dot:4,activeDot:8,gapInactive:9,inset:5},m:{paddingY:7,paddingActive:7,borderRadius:17,dot:8,activeDot:20,gapInactive:22,inset:7},l:{paddingY:10,paddingActive:10,borderRadius:29,dot:20,activeDot:38,gapInactive:26,inset:10}},vs={offset:{x:0,y:0},linkColor:"#cccccc"},sd={sizeType:"drag",value:3},SS="left";function wS(e,t){var i,o;const n={fontSettings:{fontFamily:(e==null?void 0:e.titleFontFamily)??"Arial",fontWeight:((i=e==null?void 0:e.titleFontSettings)==null?void 0:i.fontWeight)??400,fontStyle:((o=e==null?void 0:e.titleFontSettings)==null?void 0:o.fontStyle)??"normal"},fontSize:(e==null?void 0:e.titleFontSize)??.02,lineHeight:(e==null?void 0:e.titleLineHeight)??.02,letterSpacing:(e==null?void 0:e.titleLetterSpacing)??0,wordSpacing:(e==null?void 0:e.titleWordSpacing)??0,textAppearance:e==null?void 0:e.titleTextAppearance,textAlign:SS,color:(e==null?void 0:e.titleColor)??"#000000"};return Qt(n,t)}function ro(e,t,n){return`${e}: ${R.scalingValue(t/1440,n)};`}function rr(e,t){return t<=0?0:(e%t+t)%t}function $S(e,t,n,i){if(!i)return{position:rr(e+t,n),hitBoundary:!1};const o=e+t;return o>=0&&o<=n+1?{position:o,hitBoundary:!1}:{position:t>0?n+1:0,hitBoundary:!0}}function CS(e,t){const n=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);return t?n.m41:n.m42}function TS(e,t){const n=document.createElement("div");n.className=t,n.setAttribute("aria-hidden","true"),e.appendChild(n);const i=(p,y)=>{n.style.transform=`translate(${p}px, ${y}px)`;const x=n.getBoundingClientRect();return{x:x.left,y:x.top}},o=i(0,0),r=i(oo,0),l=i(0,oo);e.removeChild(n);const c={x:(r.x-o.x)/oo,y:(r.y-o.y)/oo},d={x:(l.x-o.x)/oo,y:(l.y-o.y)/oo},u=c.x*d.y-d.x*c.y;return{ex:c,ey:d,det:u}}function LS(e,t,n){const{ex:i,ey:o,det:r}=e;return{x:(t*o.y-n*o.x)/r,y:(i.x*n-i.y*t)/r}}function PS(e,t){return`
19439
19429
  .${e}-wrapper {
19440
19430
  position: relative;
19441
19431
  width: 100%;
@@ -19507,7 +19497,7 @@ export function Waterfall({
19507
19497
  top: 0;
19508
19498
  left: 0;
19509
19499
  opacity: 0;
19510
- transition: opacity ${So}ms ${pp};
19500
+ transition: opacity ${bo}ms ${pp};
19511
19501
  }
19512
19502
  .${e}-list-fade .${e}-slide.${e}-is-active {
19513
19503
  opacity: 1;
@@ -19534,29 +19524,29 @@ export function Waterfall({
19534
19524
  top: 50%;
19535
19525
  z-index: 1;
19536
19526
  padding: 0;
19537
- ${ao("width",30,t)}
19538
- ${ao("height",30,t)}
19527
+ ${ro("width",30,t)}
19528
+ ${ro("height",30,t)}
19539
19529
  transition: opacity 0.15s ease-in-out;
19540
19530
  }
19541
19531
  .${e}-arrow-prev {
19542
- ${ao("left",-20,t)}
19532
+ ${ro("left",-20,t)}
19543
19533
  transform: translate3d(-50%, -50%, 0);
19544
19534
  }
19545
19535
  .${e}-arrow-next {
19546
19536
  left: unset;
19547
- ${ao("right",-20,t)}
19537
+ ${ro("right",-20,t)}
19548
19538
  transform: translate3d(50%, -50%, 0);
19549
19539
  }
19550
19540
  .${e}-arrow-prev-vertical {
19551
19541
  left: 50%;
19552
- ${ao("top",-20,t)}
19542
+ ${ro("top",-20,t)}
19553
19543
  transform: translate3d(-50%, -50%, 0);
19554
19544
  }
19555
19545
  .${e}-arrow-next-vertical {
19556
19546
  left: 50%;
19557
19547
  right: unset;
19558
19548
  top: unset;
19559
- ${ao("bottom",-20,t)}
19549
+ ${ro("bottom",-20,t)}
19560
19550
  transform: translate3d(-50%, 50%, 0);
19561
19551
  }
19562
19552
  .${e}-arrow-hidden {
@@ -19692,10 +19682,10 @@ export function Waterfall({
19692
19682
  object-fit: cover;
19693
19683
  }
19694
19684
  .${e}-transition-reveal .${e}-slide.${e}-is-active .${e}-slider-image {
19695
- animation: ${e}-reveal-horizontal ${So}ms ease;
19685
+ animation: ${e}-reveal-horizontal ${bo}ms ease;
19696
19686
  }
19697
19687
  .${e}-transition-reveal-vertical .${e}-slide.${e}-is-active .${e}-slider-image {
19698
- animation: ${e}-reveal-vertical ${So}ms ease;
19688
+ animation: ${e}-reveal-vertical ${bo}ms ease;
19699
19689
  }
19700
19690
  @keyframes ${e}-reveal-horizontal {
19701
19691
  from { clip-path: inset(0 100% 0 0); }
@@ -19705,7 +19695,7 @@ export function Waterfall({
19705
19695
  from { clip-path: inset(100% 0 0 0); }
19706
19696
  to { clip-path: inset(0 0 0 0); }
19707
19697
  }
19708
- `}function PS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=F.useScopedStyles(),l=SS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??sd,p=u.sizeType??"drag",y=u.value??sd.value,v=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",g=(e==null?void 0:e.nav)??"classic",x=(e==null?void 0:e.navSize)??"m",b=xS[x],k=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ve=>F.scalingValue(ve*k,n),S=(e==null?void 0:e.show)??"always",W=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,P=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,_=(e==null?void 0:e.controlsColor)??ad.color,G=(e==null?void 0:e.controlsHoverColor)??ad.hover,$=(e==null?void 0:e.navColor)??Jo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Jo.colors.pagination,D=(e==null?void 0:e.navBackgroundColor)??Jo.colors.background,E=(e==null?void 0:e.linkColor)??vs.linkColor,T=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,C=v==="horizontal",V=p==="click",w=p==="drag",q=p==="auto"&&(!n||!!i),I=!n,A=m==="slide",j=g==="classic",ie=S!=="never"&&U>0,ae=S==="on hover",O=F.scalingValue(U,n),oe={width:O,height:O,maxWidth:O},N=A&&d>1,[le,Q]=s.useState(0),[be,Pe]=s.useState(N?1:0),[ye,ce]=s.useState(!1),[Y,se]=s.useState(!1),[pe,fe]=s.useState(!1),[we,Re]=s.useState(0),[ge,xe]=s.useState(!1),[Ce,h]=s.useState(!1),K=s.useRef(!1),Z=s.useRef(be);Z.current=be;const ne=s.useRef(null),de=s.useRef(0),z=s.useRef(null),R=s.useRef(null),ee=s.useRef(null),te=s.useRef(null),me=s.useCallback(ve=>{K.current=ve,ce(ve)},[]),X=s.useCallback(ve=>{if(d<2||ve===0)return;const _e=ve>0?1:-1,Be=Math.abs(ve);if(xe(!0),me(!0),!A){Q(st=>rr(st+ve,d));return}let Ze=Z.current;const $e=N&&(Ze===0||Ze===d+1),Ne=$e?le+1:null;$e&&(Ze=le+1);let Ue=Be;for(;Ue>0;){const st=wS(Ze,_e,d,N);if(Ze=st.position,Ue-=1,st.hitBoundary){de.current=Ue*_e;break}}const Je=Be-Ue;if(Je>0&&Q(st=>rr(st+Je*_e,d)),Z.current=Ze,Ne!==null){if(Z.current=Ne,Ze===Ne){se(!0),Pe(Ze);return}ne.current=Ze,se(!0),Pe(Ne);return}se(!1),Pe(Ze)},[le,d,N,A,me]),Ie=s.useCallback(ve=>{X(ve)},[X]),Se=s.useCallback(ve=>{if(d<2)return;const _e=rr(ve,d);if(!(_e===le&&!K.current)&&(xe(!0),me(!0),Q(_e),A)){const Be=_e+(N?1:0);ne.current=null,de.current=0,Z.current=Be,se(!1),Pe(Be)}},[le,d,N,A,me]);s.useEffect(()=>{if(!ye)return;const ve=window.setTimeout(()=>{if(N&&(be===0||be===d+1)){ne.current=null,se(!0),Pe(le+1);return}me(!1)},So);return()=>window.clearTimeout(ve)},[le,d,N,ye,me,be]),s.useEffect(()=>{if(!Y)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const Be=ne.current;ne.current=null;const Ze=de.current;if(de.current=0,se(!1),Be!==null){Z.current=Be,Pe(Be);return}if(Ze!==0){X(Ze);return}me(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[X,me,Y]);const J=`${N}:${d}`,He=s.useRef(J);s.useEffect(()=>{if(He.current===J)return;He.current=J;const ve=d>0?Math.min(le,d-1):0;ee.current=null,te.current=null,fe(!1),Re(0),Q(ve),se(!0),Pe(ve+(N?1:0))},[le,d,N,J]),s.useEffect(()=>{if(!ge)return;const ve=window.setTimeout(()=>xe(!1),gS);return()=>window.clearTimeout(ve)},[ge,le]),s.useEffect(()=>{if(!q||d<2)return;const ve=Math.max(y,.1)*1e3,_e=window.setInterval(()=>{I&&Ce||Ie(1)},ve);return()=>window.clearInterval(_e)},[y,d,Ie,q,Ce,I]);const We=s.useCallback(ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;ee.current=null,te.current=null;const Be=z.current;if(Be!=null&&Be.hasPointerCapture(ve.pointerId)&&Be.releasePointerCapture(ve.pointerId),!_e.isActive){A&&Re(0);return}const $e=!(ve.timeStamp-_e.lastTime>vS)&&Math.abs(_e.velocity)>yS,Ne=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*fS;if(fe(!1),!$e&&!Ne){Re(0);return}const Ue=Ne?_e.offset-_e.baseOffset:_e.velocity;let Je=1;Ne&&_e.size>0&&(Je=Math.max(1,Math.round(Math.abs(Ue)/_e.size))),Re(0),X(Ue<0?Je:-Je)},[X,A]);s.useEffect(()=>{const ve=_e=>{te.current===null||_e.pointerId!==te.current||We(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[We]);const ot=ve=>{const _e=z.current;if(!w||d<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ne.current=null,de.current=0,K.current&&me(!1);let Be=0;const Ze=R.current;if(A&&Ze){const $e=C?Ze.offsetWidth:Ze.offsetHeight;if($e>0){const Ne=$S(Ze,C);let Ue=Z.current;N&&(Ue===0||Ue===d+1)?(Ue=le+1,Z.current=Ue,se(!0),Pe(Ue),Be=0):Be=Ne+Ue*$e,Re(Be)}}_e.setPointerCapture(ve.pointerId),te.current=ve.pointerId,ee.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:CS(_e,`${r}-axis-probe`),size:C?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:Be,offset:Be,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){We(ve);return}const Be=ve.clientX-_e.startClientX,Ze=ve.clientY-_e.startClientY,$e=_e.axes?TS(_e.axes,Be,Ze):{x:Be,y:Ze},Ne=C?$e.x:$e.y,Ue=C?$e.y:$e.x,Je=_e.baseOffset+Ne;if(!_e.isActive){if(Math.max(Math.abs(Ne),Math.abs(Ue))<hS)return;if(Math.abs(Ue)>Math.abs(Ne)){const it=z.current;it!=null&&it.hasPointerCapture(_e.pointerId)&&it.releasePointerCapture(_e.pointerId),ee.current=null,te.current=null,A&&Re(0);return}_e.isActive=!0,fe(!0)}const st=ve.timeStamp-_e.lastTime;st>0&&(_e.velocity=(Je-_e.offset)/st,_e.lastTime=ve.timeStamp),_e.offset=Je,A&&Re(Je)},tt=ve=>{We(ve)},et=C?`translate3d(calc(${-be*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${we}px), 0)`,Ge=N?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:LS(r,n)}}),a.jsxs("div",{className:Ct(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!C}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:z,className:Ct(`${r}-track`,{[`${r}-track-draggable`]:w,[`${r}-track-draggable-vertical`]:w&&!C}),onPointerDown:ot,onPointerMove:qe,onPointerUp:tt,onPointerCancel:tt,onLostPointerCapture:ve=>{te.current===ve.pointerId&&We(ve)},children:a.jsx("div",{ref:R,className:Ct(`${r}-list`,{[`${r}-list-slide`]:A,[`${r}-list-slide-vertical`]:A&&!C,[`${r}-list-fade`]:!A}),style:A?{transform:et,transition:pe||Y?"none":`transform ${So}ms ${pp}`}:void 0,children:Ge.map((ve,_e)=>{const Be=N?rr(_e-1,d):_e,$e=N&&(_e===0||_e===d+1)?`clone-${_e===0?"start":"end"}`:`slide-${Be}`;return a.jsx("div",{className:Ct(`${r}-slide`,{[`${r}-is-active`]:!A&&Be===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Ct(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},$e)})})}),ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-prev`]:C,[`${r}-arrow-prev-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":G,...oe},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Ie(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${F.scalingValue(B,n)}, ${F.scalingValue(P*(C?1:-1),n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(mn,{url:W,fill:_,hoverFill:G,className:Ct(`${r}-arrow-img`,`${r}-mirror`),style:oe}),!W&&a.jsx(ld,{color:_,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-next`]:C,[`${r}-arrow-next-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:_,"--arrow-hover-color":G,...oe},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Ie(1)},style:{transform:`translate(${F.scalingValue(B*(C?-1:1),n)}, ${F.scalingValue(P,n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(mn,{url:W,fill:_,hoverFill:G,className:`${r}-arrow-img`,style:oe}),!W&&a.jsx(ld,{color:_,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),V&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ie(1)}),j&&a.jsx("div",{className:Ct(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:C,[`${r}-pagination-inside-left`]:!C}),style:C?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Ct(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!C,[`${r}-animate-dots`]:ge}),style:{backgroundColor:D,gap:f(b.gapInactive-b.activeDot+b.dot),...C?{height:f(b.activeDot+b.paddingY*2),paddingTop:f(b.paddingY),paddingBottom:f(b.paddingY),paddingLeft:f(b.paddingActive),paddingRight:f(b.paddingActive)}:{width:f(b.activeDot+b.paddingY*2),paddingLeft:f(b.paddingY),paddingRight:f(b.paddingY),paddingTop:f(b.paddingActive),paddingBottom:f(b.paddingActive)},borderRadius:f(b.borderRadius),transform:`translate(${F.scalingValue(Jo.offset.x,n)}, ${F.scalingValue(Jo.offset.y,n)})`},children:c.map((ve,_e)=>{const Be=_e===le,Ze=Be?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>Se(_e),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:Be?L:$,width:f(Ze)}})},_e)})},`${x}-${v}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:F.scalingValue(T,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,_e)=>a.jsx("div",{className:Ct(`${r}-caption-text`,{[`${r}-with-pointer-events`]:_e===le&&n,[`${r}-active`]:_e===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(So/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":E,"--link-hover-color":E,position:"relative",top:F.scalingValue(vs.offset.y,n),left:F.scalingValue(vs.offset.x,n)},children:a.jsx(Ki,{content:ve.imageCaption})})},_e))})]})]})]})}function ld({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const IS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19698
+ `}function IS({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o}){const{prefix:r}=R.useScopedStyles(),l=wS(e,n),c=t??[],d=c.length,u=(e==null?void 0:e.trigger)??sd,p=u.sizeType??"drag",y=u.value??sd.value,x=(e==null?void 0:e.direction)??"horizontal",m=(e==null?void 0:e.transition)??"slide",g=(e==null?void 0:e.nav)??"classic",v=(e==null?void 0:e.navSize)??"m",b=bS[v],M=typeof(e==null?void 0:e.navUnit)=="number"?e.navUnit:1/1440,f=ve=>R.scalingValue(ve*M,n),S=(e==null?void 0:e.show)??"always",W=(e==null?void 0:e.controls)??null,U=typeof(e==null?void 0:e.controlsMaxWidth)=="number"?e.controlsMaxWidth:65/1440,B=typeof(e==null?void 0:e.paddingX)=="number"?e.paddingX:0,P=typeof(e==null?void 0:e.paddingY)=="number"?e.paddingY:0,H=(e==null?void 0:e.controlsColor)??ad.color,V=(e==null?void 0:e.controlsHoverColor)??ad.hover,$=(e==null?void 0:e.navColor)??Jo.colors.inactive,L=(e==null?void 0:e.navPaginationColor)??Jo.colors.pagination,D=(e==null?void 0:e.navBackgroundColor)??Jo.colors.background,A=(e==null?void 0:e.linkColor)??vs.linkColor,T=typeof(e==null?void 0:e.captionMarginTop)=="number"?e.captionMarginTop:0,C=x==="horizontal",X=p==="click",w=p==="drag",q=p==="auto"&&(!n||!!i),k=!n,N=m==="slide",j=g==="classic",ie=S!=="never"&&U>0,ae=S==="on hover",O=R.scalingValue(U,n),oe={width:O,height:O,maxWidth:O},_=N&&d>1,[le,Q]=s.useState(0),[be,Le]=s.useState(_?1:0),[ye,ce]=s.useState(!1),[Y,se]=s.useState(!1),[pe,fe]=s.useState(!1),[we,Re]=s.useState(0),[ge,xe]=s.useState(!1),[Ce,h]=s.useState(!1),K=s.useRef(!1),Z=s.useRef(be);Z.current=be;const ne=s.useRef(null),de=s.useRef(0),z=s.useRef(null),I=s.useRef(null),ee=s.useRef(null),te=s.useRef(null),me=s.useCallback(ve=>{K.current=ve,ce(ve)},[]),G=s.useCallback(ve=>{if(d<2||ve===0)return;const _e=ve>0?1:-1,je=Math.abs(ve);if(xe(!0),me(!0),!N){Q(st=>rr(st+ve,d));return}let Ze=Z.current;const $e=_&&(Ze===0||Ze===d+1),Ne=$e?le+1:null;$e&&(Ze=le+1);let Ue=je;for(;Ue>0;){const st=$S(Ze,_e,d,_);if(Ze=st.position,Ue-=1,st.hitBoundary){de.current=Ue*_e;break}}const Je=je-Ue;if(Je>0&&Q(st=>rr(st+Je*_e,d)),Z.current=Ze,Ne!==null){if(Z.current=Ne,Ze===Ne){se(!0),Le(Ze);return}ne.current=Ze,se(!0),Le(Ne);return}se(!1),Le(Ze)},[le,d,_,N,me]),Ie=s.useCallback(ve=>{G(ve)},[G]),Se=s.useCallback(ve=>{if(d<2)return;const _e=rr(ve,d);if(!(_e===le&&!K.current)&&(xe(!0),me(!0),Q(_e),N)){const je=_e+(_?1:0);ne.current=null,de.current=0,Z.current=je,se(!1),Le(je)}},[le,d,_,N,me]);s.useEffect(()=>{if(!ye)return;const ve=window.setTimeout(()=>{if(_&&(be===0||be===d+1)){ne.current=null,se(!0),Le(le+1);return}me(!1)},bo);return()=>window.clearTimeout(ve)},[le,d,_,ye,me,be]),s.useEffect(()=>{if(!Y)return;let ve=0;const _e=requestAnimationFrame(()=>{ve=requestAnimationFrame(()=>{const je=ne.current;ne.current=null;const Ze=de.current;if(de.current=0,se(!1),je!==null){Z.current=je,Le(je);return}if(Ze!==0){G(Ze);return}me(!1)})});return()=>{cancelAnimationFrame(_e),cancelAnimationFrame(ve)}},[G,me,Y]);const J=`${_}:${d}`,He=s.useRef(J);s.useEffect(()=>{if(He.current===J)return;He.current=J;const ve=d>0?Math.min(le,d-1):0;ee.current=null,te.current=null,fe(!1),Re(0),Q(ve),se(!0),Le(ve+(_?1:0))},[le,d,_,J]),s.useEffect(()=>{if(!ge)return;const ve=window.setTimeout(()=>xe(!1),hS);return()=>window.clearTimeout(ve)},[ge,le]),s.useEffect(()=>{if(!q||d<2)return;const ve=Math.max(y,.1)*1e3,_e=window.setInterval(()=>{k&&Ce||Ie(1)},ve);return()=>window.clearInterval(_e)},[y,d,Ie,q,Ce,k]);const We=s.useCallback(ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;ee.current=null,te.current=null;const je=z.current;if(je!=null&&je.hasPointerCapture(ve.pointerId)&&je.releasePointerCapture(ve.pointerId),!_e.isActive){N&&Re(0);return}const $e=!(ve.timeStamp-_e.lastTime>xS)&&Math.abs(_e.velocity)>vS,Ne=_e.size>0&&Math.abs(_e.offset-_e.baseOffset)>_e.size*yS;if(fe(!1),!$e&&!Ne){Re(0);return}const Ue=Ne?_e.offset-_e.baseOffset:_e.velocity;let Je=1;Ne&&_e.size>0&&(Je=Math.max(1,Math.round(Math.abs(Ue)/_e.size))),Re(0),G(Ue<0?Je:-Je)},[G,N]);s.useEffect(()=>{const ve=_e=>{te.current===null||_e.pointerId!==te.current||We(_e)};return window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),()=>{window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve)}},[We]);const ot=ve=>{const _e=z.current;if(!w||d<2||!_e||ve.pointerType==="mouse"&&ve.button!==0)return;ne.current=null,de.current=0,K.current&&me(!1);let je=0;const Ze=I.current;if(N&&Ze){const $e=C?Ze.offsetWidth:Ze.offsetHeight;if($e>0){const Ne=CS(Ze,C);let Ue=Z.current;_&&(Ue===0||Ue===d+1)?(Ue=le+1,Z.current=Ue,se(!0),Le(Ue),je=0):je=Ne+Ue*$e,Re(je)}}_e.setPointerCapture(ve.pointerId),te.current=ve.pointerId,ee.current={pointerId:ve.pointerId,startClientX:ve.clientX,startClientY:ve.clientY,axes:TS(_e,`${r}-axis-probe`),size:C?_e.offsetWidth:_e.offsetHeight,isActive:!1,baseOffset:je,offset:je,lastTime:ve.timeStamp,velocity:0}},qe=ve=>{const _e=ee.current;if(!_e||_e.pointerId!==ve.pointerId)return;if(ve.pointerType==="mouse"&&ve.buttons===0){We(ve);return}const je=ve.clientX-_e.startClientX,Ze=ve.clientY-_e.startClientY,$e=_e.axes?LS(_e.axes,je,Ze):{x:je,y:Ze},Ne=C?$e.x:$e.y,Ue=C?$e.y:$e.x,Je=_e.baseOffset+Ne;if(!_e.isActive){if(Math.max(Math.abs(Ne),Math.abs(Ue))<fS)return;if(Math.abs(Ue)>Math.abs(Ne)){const it=z.current;it!=null&&it.hasPointerCapture(_e.pointerId)&&it.releasePointerCapture(_e.pointerId),ee.current=null,te.current=null,N&&Re(0);return}_e.isActive=!0,fe(!0)}const st=ve.timeStamp-_e.lastTime;st>0&&(_e.velocity=(Je-_e.offset)/st,_e.lastTime=ve.timeStamp),_e.offset=Je,N&&Re(Je)},tt=ve=>{We(ve)},et=C?`translate3d(calc(${-be*100}% + ${we}px), 0, 0)`:`translate3d(0, calc(${-be*100}% + ${we}px), 0)`,Ge=_?[c[d-1],...c,c[0]]:c;return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:PS(r,n)}}),a.jsxs("div",{className:Ct(`${r}-wrapper`,{[`${r}-transition-reveal`]:m==="reveal",[`${r}-transition-reveal-vertical`]:m==="reveal"&&!C}),onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[a.jsxs("div",{className:`${r}-slider-inner`,style:{backgroundColor:"transparent"},children:[a.jsx("div",{ref:z,className:Ct(`${r}-track`,{[`${r}-track-draggable`]:w,[`${r}-track-draggable-vertical`]:w&&!C}),onPointerDown:ot,onPointerMove:qe,onPointerUp:tt,onPointerCancel:tt,onLostPointerCapture:ve=>{te.current===ve.pointerId&&We(ve)},children:a.jsx("div",{ref:I,className:Ct(`${r}-list`,{[`${r}-list-slide`]:N,[`${r}-list-slide-vertical`]:N&&!C,[`${r}-list-fade`]:!N}),style:N?{transform:et,transition:pe||Y?"none":`transform ${bo}ms ${pp}`}:void 0,children:Ge.map((ve,_e)=>{const je=_?rr(_e-1,d):_e,$e=_&&(_e===0||_e===d+1)?`clone-${_e===0?"start":"end"}`:`slide-${je}`;return a.jsx("div",{className:Ct(`${r}-slide`,{[`${r}-is-active`]:!N&&je===le}),children:a.jsx("div",{className:`${r}-slider-item`,children:a.jsx("div",{className:`${r}-img-wrapper`,children:a.jsx("img",{className:Ct(`${r}-slider-image`,{[`${r}-contain`]:ve.image.objectFit==="contain",[`${r}-cover`]:ve.image.objectFit==="cover"}),src:ve.image.url,alt:ve.image.name??"",draggable:!1})})})},$e)})})}),ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-prev`]:C,[`${r}-arrow-prev-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:H,"--arrow-hover-color":V,...oe},children:a.jsxs("button",{onClick:ve=>{ve.stopPropagation(),Ie(-1)},className:`${r}-arrow-inner`,style:{transform:`translate(${R.scalingValue(B,n)}, ${R.scalingValue(P*(C?1:-1),n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(mn,{url:W,fill:H,hoverFill:V,className:Ct(`${r}-arrow-img`,`${r}-mirror`),style:oe}),!W&&a.jsx(ld,{color:H,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`,`${r}-mirror`)})]})}),a.jsx("div",{className:Ct(`${r}-arrow`,{[`${r}-arrow-next`]:C,[`${r}-arrow-next-vertical`]:!C,[`${r}-hover-arrow`]:ae}),style:{color:H,"--arrow-hover-color":V,...oe},children:a.jsxs("button",{className:`${r}-arrow-inner`,onClick:ve=>{ve.stopPropagation(),Ie(1)},style:{transform:`translate(${R.scalingValue(B*(C?-1:1),n)}, ${R.scalingValue(P,n)}) rotate(${C?"0deg":"90deg"})`},children:[W&&a.jsx(mn,{url:W,fill:H,hoverFill:V,className:`${r}-arrow-img`,style:oe}),!W&&a.jsx(ld,{color:H,className:Ct(`${r}-arrow-icon`,`${r}-arrow-img`)})]})})]}),X&&a.jsx("div",{className:`${r}-click-overlay`,onClick:()=>Ie(1)}),j&&a.jsx("div",{className:Ct(`${r}-pagination`,{[`${r}-pagination-inside-bottom`]:C,[`${r}-pagination-inside-left`]:!C}),style:C?{bottom:f(b.inset)}:{left:f(b.inset)},children:a.jsx("div",{className:Ct(`${r}-pagination-inner`,{[`${r}-pagination-vertical`]:!C,[`${r}-animate-dots`]:ge}),style:{backgroundColor:D,gap:f(b.gapInactive-b.activeDot+b.dot),...C?{height:f(b.activeDot+b.paddingY*2),paddingTop:f(b.paddingY),paddingBottom:f(b.paddingY),paddingLeft:f(b.paddingActive),paddingRight:f(b.paddingActive)}:{width:f(b.activeDot+b.paddingY*2),paddingLeft:f(b.paddingY),paddingRight:f(b.paddingY),paddingTop:f(b.paddingActive),paddingBottom:f(b.paddingActive)},borderRadius:f(b.borderRadius),transform:`translate(${R.scalingValue(Jo.offset.x,n)}, ${R.scalingValue(Jo.offset.y,n)})`},children:c.map((ve,_e)=>{const je=_e===le,Ze=je?b.activeDot:b.dot;return a.jsx("button",{onClick:()=>Se(_e),className:`${r}-pagination-item`,style:{width:f(b.activeDot)},children:a.jsx("div",{className:`${r}-dot`,style:{backgroundColor:je?L:$,width:f(Ze)}})},_e)})},`${v}-${x}`)})]}),a.jsxs("div",{className:`${r}-caption-block`,children:[a.jsx("div",{"data-controls":o?"captionMarginTop":void 0,className:o?`${r}-control`:void 0,style:{height:R.scalingValue(T,n)}}),a.jsx("div",{className:`${r}-caption-text-wrapper`,children:c.map((ve,_e)=>a.jsx("div",{className:Ct(`${r}-caption-text`,{[`${r}-with-pointer-events`]:_e===le&&n,[`${r}-active`]:_e===le}),style:{...l,width:"max-content",transitionDuration:`${Math.round(bo/2)}ms`},children:a.jsx("div",{className:`${r}-caption-text-inner`,style:{"--link-color":A,"--link-hover-color":A,position:"relative",top:R.scalingValue(vs.offset.y,n),left:R.scalingValue(vs.offset.x,n)},children:a.jsx(Ki,{content:ve.imageCaption})})},_e))})]})]})]})}function ld({color:e,className:t}){return a.jsx("svg",{viewBox:"0 0 10 18",className:t,children:a.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:a.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:e,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}const RS=`import React, { useCallback, useEffect, useRef, useState } from 'react';
19709
19699
  import cn from 'classnames';
19710
19700
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
19711
19701
  import { scalingValue } from '../utils/scalingValue';
@@ -20886,14 +20876,14 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
20886
20876
  </svg>
20887
20877
  );
20888
20878
  }
20889
- `,RS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},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/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},kS={element:PS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:RS,sourceCode:IS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},po=300/1440,ES=8/1440,Jn=.004;function MS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function xs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function bs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:F.scalingValue((r-t)/2,i)}}function AS(e){return`
20879
+ `,kS={type:"object",version:1,settings:{sizing:"manual",properties:{trigger:{type:"object",scope:"common",title:"Trigger",display:{type:"toggle-cycle-numeric-input",enum:["click","drag","auto"],inputs:{click:"none",drag:"none",auto:"single"},defaultValue:3,showDash:!1},min:1,max:5,properties:{sizeType:{type:"string"},value:{type:"number"},min:{type:"number"},max:{type:"number"}}},direction:{type:"string",scope:"common",title:"Direction",display:{type:"toggle-cycle",enum:["horizontal","vertical"]}},transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["slide","fade in","reveal"]}},nav:{type:"string",scope:"common",title:"Nav",display:{type:"toggle-cycle",enum:["classic","no"]}},navSize:{type:"string",scope:"layout",title:"Nav Size",display:{type:"toggle-cycle",enum:["s","m","l"]}},navUnit:{type:"number",scope:"layout",title:"",display:{type:"numeric-input",visible:!1},min:0,max:1},controls:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},controlsMaxWidth:{type:"number",scope:"layout",title:"Max Width",display:{type:"numeric-input"},min:0,max:9999},show:{type:"string",scope:"common",title:"Show",display:{type:"toggle-cycle",enum:["always","on hover","never"]}},paddingX:{type:"number",scope:"layout",title:"Padding X",display:{type:"numeric-input"},min:-9999,max:9999},paddingY:{type:"number",scope:"layout",title:"Padding Y",display:{type:"numeric-input"},min:-9999,max:9999},controlsColor:{type:"string",scope:"common",title:"Controls Default",display:{type:"palette-color-picker"}},controlsHoverColor:{type:"string",scope:"common",title:"Controls Hover",display:{type:"palette-color-picker"}},navColor:{type:"string",scope:"common",title:"Dot Nav",display:{type:"palette-color-picker"}},navPaginationColor:{type:"string",scope:"common",title:"Active Nav",display:{type:"palette-color-picker"}},navBackgroundColor:{type:"string",scope:"common",title:"BG Nav",display:{type:"palette-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"palette-color-picker"}},titleColor:{type:"string",scope:"common",title:"Text Default",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{type:"object",scope:"common",title:"",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},titleFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},titleLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},titleLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},titleWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},titleTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},captionMarginTop:{type:"number",scope:"layout",title:"Caption margin top",min:0,max:100,display:{type:"range-control"}}},defaults:{trigger:{sizeType:"drag",value:3,min:1,max:5},direction:"horizontal",transition:"slide",nav:"classic",controls:null,show:"always",controlsColor:"#000000",controlsHoverColor:"#3F3F3F",navColor:"#A4A4A4",navPaginationColor:"#FFFFFF",navBackgroundColor:"#000000",linkColor:"#2E12F0",titleColor:"#000000",titleFontFamily:"Arial",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{controlsMaxWidth:30/1440,paddingX:0,paddingY:0,captionMarginTop:10/1440,titleFontSize:16/1440,titleLineHeight:16/1440,navSize:"m",navUnit:1/1440},t:{controlsMaxWidth:30/768,paddingX:-10/768,paddingY:0,captionMarginTop:10/768,titleFontSize:16/768,titleLineHeight:16/768,navSize:"m",navUnit:1/768},m:{controlsMaxWidth:30/375,paddingX:-14/375,paddingY:0,captionMarginTop:10/375,titleFontSize:16/375,titleLineHeight:16/375,navSize:"m",navUnit:1/375}},displayRules:[{if:{name:"show",value:"never"},then:{name:"properties.controlsColor.display.visible",value:!1}},{if:{name:"show",value:"never"},then:{name:"properties.controlsHoverColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navPaginationColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navBackgroundColor.display.visible",value:!1}},{if:{name:"nav",value:"no"},then:{name:"properties.navSize.display.visible",value:!1}}],layout:["__componentName__","trigger","direction","transition","nav","navSize","controls","controlsMaxWidth","show","paddingX","paddingY","captionMarginTop","titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",title:"",items:["trigger","direction"]},{type:"row",title:"",items:["transition","nav"]},{type:"row",title:"",items:["navSize"]},{type:"group",title:"Controls",items:[{type:"row",title:"",items:["controls","controlsMaxWidth"]},{type:"row",title:"",items:["paddingX","paddingY"]},{type:"row",title:"",items:["show"]}]}]},{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"]}]}],paletteBookmark:{items:["controlsColor","controlsHoverColor","navPaginationColor","navColor","navBackgroundColor","titleColor","linkColor"],panelIds:["general","typeStyle"]},content:{type:"array",settings:{allowsCollection:!0,addItemFromFileExplorer:!0},items:{type:"object",properties:{image:{type:"object",label:"Image",contentKey:"gallery",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",contentKey:"title",display:{type:"rich-text"}}},required:["image"]},default:[{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Earth-orbital mission"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Salton Sea from Above"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module Pilot"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Lunar Module 3 porch"}]}]},{image:{objectFit:"cover",url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg"},imageCaption:[{type:"paragraph",children:[{text:"Command Module"}]}]}]}},ES={element:IS,id:"slider-2-0",name:"Slider 2.0",category:"galleries",version:1,defaultSize:{d:{width:400,height:400},t:{width:400,height:400},m:{width:300,height:300}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Slider.mp4"},schema:kS,sourceCode:RS,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[{path:"controls"}]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily"}},uo=300/1440,MS=8/1440,Jn=.004;function AS(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function xs(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function bs(e,t,n,i,o="title-leading-gap"){const r=e??.01;return t===void 0||t>=r?{}:{[`--${n}-${o}`]:R.scalingValue((r-t)/2,i)}}function FS(e){return`
20890
20880
  .${e}-wrapper {
20891
20881
  box-sizing: border-box;
20892
20882
  display: flex;
20893
20883
  flex-direction: column;
20894
20884
  position: relative;
20895
20885
  width: 100%;
20896
- min-height: ${MS(48)};
20886
+ min-height: ${AS(48)};
20897
20887
  }
20898
20888
  .${e}-single-title-layer {
20899
20889
  position: absolute;
@@ -21126,7 +21116,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
21126
21116
  width: var(--cntrl-article-width, 100vw) !important;
21127
21117
  height: var(--cntrl-viewport-height, 100vh) !important;
21128
21118
  }
21129
- `}const mp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function FS(e){return e in mp}function NS(e){if(e&&FS(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Dl(e){return mp[e]}const _S="rgba(28,31,34,0.9)",Yn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",HS=72,WS=50,OS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},DS=[];function zS(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function BS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function jS(e){const[t]=e.media;return t!=null&&t.url?t:null}function VS(e){if(!Array.isArray(e)||e.length===0)return[];if(zS(e)){const t=[];for(const n of e){const i=BS(n);if(!i)continue;const o=jS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xs(e){return e.type==="video"}function GS(e){e.pause(),e.removeAttribute("src"),e.load()}function Ur(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function XS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const qS=1140/1440;function US(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function KS(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function YS(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function ZS({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{GS(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}function JS({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const y=i==="cover",v=s.useRef(null),m=s.useRef(null),g=s.useRef(null),x=s.useRef(0),b=s.useRef(0),k=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(!1),U=s.useRef(null),[B,P]=s.useState(null),[_,G]=s.useState("opening"),[$,L]=s.useState(0),[D,E]=s.useState(0),[T,C]=s.useState(!1),[V,w]=s.useState(!1),[q,I]=s.useState(!1),A=s.useRef(n),j=t[n],ie=j?Xs(j):!1,ae=D!==0||T,O=s.useCallback(ge=>{W.current=ge,C(ge)},[]),oe=s.useCallback(()=>{U.current!==null&&(window.clearTimeout(U.current),U.current=null)},[]),N=s.useCallback(()=>{oe(),U.current=window.setTimeout(()=>{oe(),O(!1)},Yn+32)},[oe,O]),le=s.useCallback(()=>{const ge=v.current,xe=m.current;if(!ge)return;const Ce=ge.getBoundingClientRect(),h=Ce.width,K=Ce.height;if(!h||!K)return;if(i==="cover"){P({width:h,height:K,left:Ce.left,top:Ce.top});return}if(!xe){P(Ur(ge));return}const{width:Z,height:ne}=XS(xe);if(!Z||!ne){P(Ur(ge));return}const de=Z/ne,z=h/K;if(de>z){const R=h/de;P({width:h,height:R,left:Ce.left,top:Ce.top+(K-R)/2})}else{const R=K*de;P({width:R,height:K,left:Ce.left+(h-R)/2,top:Ce.top})}},[i]);s.useEffect(()=>{le();const ge=v.current;if(!ge)return;const xe=new ResizeObserver(()=>le());return xe.observe(ge),()=>xe.disconnect()},[le,n]),s.useEffect(()=>{_==="opening"&&B&&G("open")},[_,B]),s.useEffect(()=>{if(_!=="closing")return;const ge=setTimeout(()=>r(),Yn);return()=>clearTimeout(ge)},[_,r]),s.useEffect(()=>()=>{oe()},[oe]),s.useLayoutEffect(()=>{if(A.current===n)return;oe(),L(0),E(0),O(!1),I(!1),w(!1),x.current=0,b.current=0,k.current="none",f.current=!1,g.current=null,S.current=!1;const ge=v.current;ge&&P(Ur(ge)),A.current=n},[n,O,oe]),s.useEffect(()=>{if(_!=="open")return;let ge=null;const xe=()=>{ge&&(document.removeEventListener("click",ge,!0),ge=null)},Ce=()=>{xe(),ge=z=>{z.stopPropagation(),z.preventDefault(),xe()},document.addEventListener("click",ge,!0)},h=z=>{oe(),W.current=!1,C(!1),E(0),w(!1),f.current=!1,b.current=0,k.current="none";const R=v.current;R&&P(Ur(R)),z<0?c():l()},K=z=>{if(Math.abs(z)>WS&&t.length>1){h(z);return}O(!0),E(0),N()},Z=z=>{if(z.touches.length!==1||W.current)return;const R=z.touches[0];S.current=!0,g.current={x:R.clientX,y:R.clientY},k.current="none",b.current=0,f.current=!1},ne=z=>{if(!g.current||z.touches.length!==1||W.current)return;const R=z.touches[0],ee=R.clientX-g.current.x,te=R.clientY-g.current.y;if(k.current==="none"){if(Math.abs(ee)<10&&Math.abs(te)<10)return;if(Math.abs(ee)>Math.abs(te)){if(t.length<=1)return;k.current="horizontal"}else if(te>0)k.current="vertical";else return}if(k.current==="horizontal"){f.current=!0,w(!0),b.current=ee,E(ee),z.preventDefault();return}k.current==="vertical"&&(f.current=!0,w(!0),x.current=te,L(te),z.preventDefault())},de=()=>{if(!g.current)return;const z=k.current,R=f.current;if(R&&z==="horizontal")K(b.current),Ce();else if(R&&z==="vertical")if(x.current>HS){const te=window.innerHeight;x.current=te,I(!0),L(te),G("closing")}else x.current=0,L(0),Ce();else z==="horizontal"&&Math.abs(b.current)>0&&(K(b.current),Ce());g.current=null,k.current="none",b.current=0,f.current=!1,w(!1)};return document.addEventListener("touchstart",Z,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",de),document.addEventListener("touchcancel",de),()=>{document.removeEventListener("touchstart",Z),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),xe()}},[_,t.length,c,l,O,N,oe]),s.useEffect(()=>{const ge=xe=>{xe.key==="Escape"&&(xe.preventDefault(),xe.stopPropagation(),_!=="closing"&&G("closing"))};return window.addEventListener("keydown",ge,!0),()=>window.removeEventListener("keydown",ge,!0)},[_]);const Q=()=>{_!=="closing"&&G("closing")},be=_==="open",Pe=_==="closing",ye=$>0?Math.max(0,1-$/500):1,ce=$>0?Math.max(.35,1-$/500):1,Y=ge=>{if(ge.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const xe=ge.currentTarget.getBoundingClientRect(),Ce=ge.clientY-xe.top,h=Math.min(52,xe.height*.2);if(!(Ce>xe.height-h)){if(ge.clientX-xe.left<xe.width/2){l();return}c()}},se=ge=>{if(t.length<=1)return;const xe=ge.currentTarget.getBoundingClientRect(),Ce=ge.clientX-xe.left,h=ge.clientY-xe.top,K=Math.min(52,xe.height*.2);if(h>xe.height-K){ge.currentTarget.style.cursor="default";return}ge.currentTarget.style.cursor=Ce<xe.width/2?"w-resize":"e-resize"},pe=s.useCallback(ge=>{ge.propertyName!=="transform"||!W.current||(oe(),O(!1))},[oe,O]),fe=ae?`translateX(${D}px)`:$>0?`translateY(${$}px)`:void 0,we={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:fe,opacity:$>0?ce:_==="opening"||Pe?0:1,transition:V&&!T?"none":T?`transform ${Yn}ms ${Oi}`:q?`transform ${Yn}ms ${Oi}, opacity ${Yn}ms ${Oi}`:_==="opening"||Pe?`opacity ${Yn}ms ${Oi}`:"none",pointerEvents:ie&&be&&!ae?"auto":"none",touchAction:ie&&be?"none":void 0,zIndex:9998},Re=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:_==="open"?"none":void 0},onClick:Q,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?ye:0,transition:V?"none":`opacity ${Yn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:v,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Yn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:v,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Yn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),B&&j&&(ie?a.jsx(ZS,{src:j.url,phase:_,mediaRef:m,mediaStyle:we,onLoadedMetadata:le,onClick:Y,onMouseMove:se,onTransitionEnd:pe},`${n}-${j.url}`):a.jsx("img",{ref:m,src:j.url,alt:j.name,onLoad:le,onTransitionEnd:pe,style:we},`${n}-${j.url}`)),be&&Re&&t.length>1&&!ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Re,left:B.left,cursor:"w-resize",pointerEvents:ae?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),l()}}),a.jsx("div",{style:{...Re,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:ae?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),c()}})]})]})}function cd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Xs(t)?"video":"image"}`,v=r.display==="cover",m=KS(r),g=_=>F.scalingValue(_,l??!1),x=n??po,b=o?{width:"100%",maxWidth:"100%"}:{width:g(x),maxWidth:"100%"},k=i?{borderRadius:g(i)}:{},f={...b,...v?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...k},S={...v?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":g(x)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...v?{}:k},U={className:y,style:S,onClick:p?_=>{_.stopPropagation(),p()}:void 0},B=Math.max(c,Jn),P=Xs(t)?a.jsx("video",{...U,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...U,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[v?a.jsx("div",{style:f,children:P}):P,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:g(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:g(B)}})]})}function QS({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,v=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&v&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&v&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function ew(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Kr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function dd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ss({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:v=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:g=!1,topPaddingControl:x,bottomPaddingControl:b}){const k=s.useRef(null),[f,S]=s.useState(0),W=t??"",U=n??"",B=U.length>0,{horizontal:P,vertical:_}=Dl(i),G=_==="center"||_==="bottom",$=_==="bottom";s.useLayoutEffect(()=>{if(!G)return;const T=k.current;if(!T||typeof ResizeObserver>"u")return;const C=()=>S(T.offsetHeight);C();const V=new ResizeObserver(C);return V.observe(T),()=>V.disconnect()},[W,U,G]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:W}),D=B?a.jsx("span",{className:u,style:p,children:U}):null,E=B?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...g?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:T=>{k.current=T,o(T)},className:[r,`${e}-title-h-${P}`,`${e}-title-v-${_}`].join(" "),style:{...G?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[x,a.jsx("div",{className:v?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:$?a.jsxs(a.Fragment,{children:[D,E,L]}):a.jsxs(a.Fragment,{children:[L,E,D]})})}),b]})})}const ud=45;function pd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function tw(e){const t=pd(e,"--cntrl-viewport-height",window.innerHeight),n=pd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function nw(e,t,n){const{vertical:i}=Dl(t),{top:o,height:r,centerY:l}=tw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function iw(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=nw(u,n,d);return Math.exp(-(p*p)/(2*ud*ud))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function ow(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(iw(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function md(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function rw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var dt,Pt;const{prefix:l}=F.useScopedStyles(),c=s.useMemo(()=>AS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??po,v=(e==null?void 0:e.titleWidth)??qS,m=US(e==null?void 0:e.imageDisplay),g=(e==null?void 0:e.cornerRadius)??ES,x=NS(e==null?void 0:e.position),{horizontal:b,vertical:k}=Dl(x),f=(e==null?void 0:e.titleTopPadding)??0,S=(e==null?void 0:e.titleBottomPadding)??0,W=(e==null?void 0:e.titleLeftPadding)??0,U=(e==null?void 0:e.titleRightPadding)??0,B=(e==null?void 0:e.titleDescriptionPadding)??0,P=ew(e==null?void 0:e.transition),_=(e==null?void 0:e.lightbox)??"on",G=p==="b",$=P==="fade"||P==="retype",{setTitleRef:L,dominantIndex:D}=ow(d.length,$,x),E=((dt=d[D])==null?void 0:dt.title)??"",T=((Pt=d[D])==null?void 0:Pt.description)??"",C=md(E,P==="retype"),V=md(T,P==="retype"),w=P==="fade"||P==="retype",q=P==="retype"?C:E,I=P==="retype"?V:T,A=G?void 0:{width:F.scalingValue(y,n??!1)},j=_==="on"&&(!n||i||o),ie=o??!1,ae=(e==null?void 0:e.galleryPaddingRight)??0,O=(e==null?void 0:e.galleryPaddingLeft)??0,oe=(e==null?void 0:e.galleryPaddingBetween)??0,N=St=>F.scalingValue(St,n??!1),Q={width:N(v)},be=p==="a"?ae:O,Pe=G?{width:"100%"}:{width:`calc(100% - ${N(y)} - ${N(be)})`,...p==="c"?{marginLeft:"auto"}:{}},ye=Math.max(ae,Jn),ce=Math.max(O,Jn),Y=Math.max(oe,Jn),se=Math.max(f,Jn),pe=Math.max(S,Jn),fe=Math.max(W,Jn),we=Math.max(U,Jn),Re=Math.max(B,Jn),ge=Math.max(0,(u??1)-(y??po)),xe=p==="a"?Math.max(0,(u??1)-(y??po)-ae):p==="c"?Math.max(0,(u??1)-(y??po)-O):p==="b"?u??1:1,Ce=ie&&k==="top",h=ie&&k==="bottom",K=ie&&b==="left",Z=ie&&b==="right",ne=d.length>1,de=G?void 0:N((p==="c"?O:ae)+(y??po)),z=p==="c"&&de?{left:de}:void 0,R=p==="a"&&de?{right:de}:void 0,ee=G?{left:0,width:"100%"}:p==="a"?{right:N(ae),width:N(y)}:{left:N(O),width:N(y)},{titleColor:te,titleFontFamily:me,titleFontSettings:X,titleFontSize:Ie,titleLineHeight:Se,titleLetterSpacing:J,titleWordSpacing:He,titleAlign:We,titleTextAppearance:ot,descriptionColor:qe,descriptionFontFamily:tt,descriptionFontSettings:et,descriptionFontSize:Ge,descriptionLineHeight:ve,descriptionLetterSpacing:_e,descriptionWordSpacing:Be,descriptionAlign:Ze,descriptionTextAppearance:$e,lightboxCounterColor:Ne,lightboxCounterFontFamily:Ue,lightboxCounterFontSettings:Je,lightboxCounterFontSize:st,lightboxCounterLineHeight:it,lightboxCounterLetterSpacing:Oe,lightboxCounterWordSpacing:Ae,lightboxCounterTextAppearance:gt}=e??{},ze={fontSettings:{fontFamily:me,fontWeight:(X==null?void 0:X.fontWeight)??400,fontStyle:(X==null?void 0:X.fontStyle)??"normal"},fontSize:Ie??.01,lineHeight:Se,letterSpacing:J??0,wordSpacing:He??0,textAlign:We??"left",textAppearance:ot,color:te??"#000000"},Xe=dn(Qt(ze,n)),ct=Q,he={...bs(Ie,Se,l,n),...bs(Ge,ve,l,n,"description-leading-gap")},Ee=xs(Ie,Se,`${l}-title`,`${l}-text-tight-leading`),nt={fontSettings:{fontFamily:tt,fontWeight:(et==null?void 0:et.fontWeight)??400,fontStyle:(et==null?void 0:et.fontStyle)??"normal"},fontSize:Ge??.01,lineHeight:ve,letterSpacing:_e??0,wordSpacing:Be??0,textAlign:Ze??"left",textAppearance:$e,color:qe??"#000000"},pt=dn(Qt(nt,n)),Ve=xs(Ge,ve,`${l}-description-text`,`${l}-description-tight-leading`),vt=N(ie?Re:B),Rt={fontSettings:{fontFamily:Ue,fontWeight:(Je==null?void 0:Je.fontWeight)??400,fontStyle:(Je==null?void 0:Je.fontStyle)??"normal"},fontSize:st??.01,lineHeight:it,letterSpacing:Oe??0,wordSpacing:Ae??0,textAppearance:gt,color:Ne??"#DEDDDD"},wt={...dn(Qt(Rt,n)),...bs(st,it,l,n)},Vt=xs(st,it,`${l}-lightbox-counter`,`${l}-text-tight-leading`),jt=F.buildColorVars(l,{titleColor:te??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:Ne??"#DEDDDD"},OS,DS),Kt=s.useRef(null),[Yt,kt]=s.useState(!1),[Bt,rn]=s.useState([]),[xt,yt]=s.useState(0),Me=s.useCallback((St,ht)=>{j&&(rn(St),yt(ht),kt(!0))},[j]),Qe=s.useCallback(()=>{kt(!1)},[]),rt=s.useMemo(()=>{const St={...jt},ht=Kt.current?getComputedStyle(Kt.current).getPropertyValue("--cntrl-article-width").trim():"";return ht&&(St["--cntrl-article-width"]=ht),St},[jt,Yt]);return s.useEffect(()=>{if(!Yt||_!=="on"||typeof document>"u")return;const St=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=St}},[Yt,_]),s.useEffect(()=>{!n||o||i||kt(!1)},[n,o,i]),s.useEffect(()=>{_==="off"&&kt(!1)},[_]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:jt,children:a.jsxs("div",{ref:Kt,className:`${l}-wrapper`,style:{width:F.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:k==="top"?N(f):void 0,[`--${l}-title-bottom-padding`]:k==="bottom"?N(S):void 0,[`--${l}-title-left-padding`]:b==="left"?N(W):void 0,[`--${l}-title-right-padding`]:b==="right"?N(U):void 0},children:[w&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ss,{P:l,title:q,description:I,position:x,titleRef:()=>{},titleClassName:`${Ee} ${l}-single-title`,titleContainerStyle:{...he,...Pe},titleTextBoxStyle:ct,titleStyle:Xe,descriptionClassName:Ve,descriptionStyle:pt,descriptionPadding:vt,showTextBoxOutline:ie,showDescriptionPaddingControl:ie,topPaddingControl:Ce?Kr({P:l,controlKey:"titleTopPadding",scaled:N,height:se,paired:!1,side:"top"}):void 0,bottomPaddingControl:h?Kr({P:l,controlKey:"titleBottomPadding",scaled:N,height:pe,paired:!1,side:"bottom"}):void 0})}),d.map((St,ht)=>{const Wt=VS(St.gallery),Tt=ht<d.length-1,Ot=Wt.filter(Mt=>Mt.lightboxMedia).map(Mt=>Mt.lightboxMedia),Gt={P:l,position:x,titleRef:L(ht),titleClassName:Ee,titleContainerStyle:he,titleTextBoxStyle:w?{maxWidth:"100%"}:ct,titleStyle:Xe,descriptionClassName:Ve,descriptionStyle:pt,descriptionPadding:vt,showTextBoxOutline:ie&&!w,showDescriptionPaddingControl:ie&&!w,descriptionPaddingPaired:ne,topPaddingControl:Ce&&!w?Kr({P:l,controlKey:"titleTopPadding",scaled:N,height:se,paired:ne,side:"top"}):void 0,bottomPaddingControl:h&&!w?Kr({P:l,controlKey:"titleBottomPadding",scaled:N,height:pe,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":ht,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:Tt?N(oe):void 0},children:[K&&dd({P:l,controlKey:"titleLeftPadding",scaled:N,width:fe,maxFraction:xe,side:"left",paired:ne,anchorStyle:z}),Z&&dd({P:l,controlKey:"titleRightPadding",scaled:N,width:we,maxFraction:xe,side:"right",paired:ne,anchorStyle:R}),ie&&Tt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:N(Y),...ee}}),G?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Wt.map(({displayMedia:Mt,lightboxMedia:_t},Ft)=>{const ut=_t?Ot.findIndex(H=>H.url===_t.url):-1;return a.jsx(cd,{P:l,media:Mt,imgWidth:y||void 0,cornerRadius:g||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:Ft<Wt.length-1,showControls:ie,onMediaClick:j&&ut>=0?()=>Me(Ot,ut):void 0},`${Mt.url}-${Ft}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ss,{...Gt,title:w?"":St.title,description:w?"":St.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ss,{...Gt,title:w?"":St.title,description:w?"":St.description}),Wt.length>0&&a.jsx(QS,{P:l,layoutType:p,galleryWidthStyle:A,galleryPaddingRight:ae,galleryPaddingLeft:O,galleryPaddingRightWidth:ye,galleryPaddingLeftWidth:ce,galleryPaddingMaxFraction:ge,showControls:ie,scaled:N,children:Wt.map(({displayMedia:Mt,lightboxMedia:_t},Ft)=>{const ut=_t?Ot.findIndex(H=>H.url===_t.url):-1;return a.jsx(cd,{P:l,media:Mt,cornerRadius:g||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:Ft<Wt.length-1,showControls:ie,onMediaClick:j&&ut>=0?()=>Me(Ot,ut):void 0},`${Mt.url}-${Ft}`)})})]})]},ht)})]})}),Yt&&_==="on"&&typeof document<"u"&&e&&(()=>{const St=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx("div",{style:rt,"data-selection":"none",children:a.jsx(JS,{prefix:l,items:Bt,index:xt,imageDisplay:YS(e.lightboxImageDisplay),isEditor:n,onClose:Qe,onPrev:()=>yt(ht=>(ht-1+Bt.length)%Bt.length),onNext:()=>yt(ht=>(ht+1)%Bt.length),counterClassName:Vt,counterStyle:wt,backgroundColor:e.backgroundColor??_S})}),St)})()]})}const aw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21119
+ `}const mp={"left-top":{horizontal:"left",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-right":{horizontal:"right",vertical:"top"},"left-center":{horizontal:"left",vertical:"center"},center:{horizontal:"center",vertical:"center"},"right-center":{horizontal:"right",vertical:"center"},"left-bottom":{horizontal:"left",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"right-bottom":{horizontal:"right",vertical:"bottom"}};function NS(e){return e in mp}function _S(e){if(e&&NS(e))return e;switch(e){case"center-top":return"top-center";case"right-top":return"top-right";case"top-left":return"left-top";case"center-bottom":return"bottom-center";case"bottom-left":return"left-bottom";case"bottom-right":return"right-bottom";case"center-center":return"center";case"left":return"left-center";case"right":return"right-center";case"top":return"left-top";default:return"center"}}function Dl(e){return mp[e]}const HS="rgba(28,31,34,0.9)",Yn=500,Oi="cubic-bezier(0.22, 1, 0.36, 1)",WS=72,OS=50,DS={titleColor:"title-color",descriptionColor:"description-color",lightboxCounterColor:"lightbox-counter-color"},zS=[];function BS(e){if(!Array.isArray(e)||e.length===0)return!1;const t=e[0];return t!==null&&typeof t=="object"&&"media"in t&&Array.isArray(t.media)}function jS(e){const[t,n]=e.media;return n!=null&&n.url?n:t!=null&&t.url?t:null}function VS(e){const[t]=e.media;return t!=null&&t.url?t:null}function GS(e){if(!Array.isArray(e)||e.length===0)return[];if(BS(e)){const t=[];for(const n of e){const i=jS(n);if(!i)continue;const o=VS(n);t.push({displayMedia:i,lightboxMedia:o!=null&&o.url?o:null})}return t}return e.filter(t=>t==null?void 0:t.url).map(t=>({displayMedia:t,lightboxMedia:t}))}function Xs(e){return e.type==="video"}function XS(e){e.pause(),e.removeAttribute("src"),e.load()}function Ur(e){const t=e.getBoundingClientRect();return{width:t.width,height:t.height,left:t.left,top:t.top}}function qS(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:{width:e.naturalWidth,height:e.naturalHeight}}const US=1140/1440;function KS(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function YS(e){const t=e.ratioValue??"1:1",n=e.reversed??!1,[i,o]=t.split(":").map(Number);return`${n?o:i} / ${n?i:o}`}function ZS(e){return typeof e=="string"?e==="cover"?"cover":"fit":(e==null?void 0:e.display)==="cover"?"cover":"fit"}function JS({src:e,phase:t,mediaRef:n,mediaStyle:i,onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c}){return s.useEffect(()=>{const d=n.current;if(d)return()=>{XS(d)}},[e,n]),a.jsx("video",{ref:n,src:e,controls:t==="open",playsInline:!0,preload:"auto",onLoadedMetadata:o,onClick:r,onMouseMove:l,onTransitionEnd:c,style:i})}function QS({prefix:e,items:t,index:n,imageDisplay:i,isEditor:o,onClose:r,onPrev:l,onNext:c,counterClassName:d,counterStyle:u,backgroundColor:p}){const y=i==="cover",x=s.useRef(null),m=s.useRef(null),g=s.useRef(null),v=s.useRef(0),b=s.useRef(0),M=s.useRef("none"),f=s.useRef(!1),S=s.useRef(!1),W=s.useRef(!1),U=s.useRef(null),[B,P]=s.useState(null),[H,V]=s.useState("opening"),[$,L]=s.useState(0),[D,A]=s.useState(0),[T,C]=s.useState(!1),[X,w]=s.useState(!1),[q,k]=s.useState(!1),N=s.useRef(n),j=t[n],ie=j?Xs(j):!1,ae=D!==0||T,O=s.useCallback(ge=>{W.current=ge,C(ge)},[]),oe=s.useCallback(()=>{U.current!==null&&(window.clearTimeout(U.current),U.current=null)},[]),_=s.useCallback(()=>{oe(),U.current=window.setTimeout(()=>{oe(),O(!1)},Yn+32)},[oe,O]),le=s.useCallback(()=>{const ge=x.current,xe=m.current;if(!ge)return;const Ce=ge.getBoundingClientRect(),h=Ce.width,K=Ce.height;if(!h||!K)return;if(i==="cover"){P({width:h,height:K,left:Ce.left,top:Ce.top});return}if(!xe){P(Ur(ge));return}const{width:Z,height:ne}=qS(xe);if(!Z||!ne){P(Ur(ge));return}const de=Z/ne,z=h/K;if(de>z){const I=h/de;P({width:h,height:I,left:Ce.left,top:Ce.top+(K-I)/2})}else{const I=K*de;P({width:I,height:K,left:Ce.left+(h-I)/2,top:Ce.top})}},[i]);s.useEffect(()=>{le();const ge=x.current;if(!ge)return;const xe=new ResizeObserver(()=>le());return xe.observe(ge),()=>xe.disconnect()},[le,n]),s.useEffect(()=>{H==="opening"&&B&&V("open")},[H,B]),s.useEffect(()=>{if(H!=="closing")return;const ge=setTimeout(()=>r(),Yn);return()=>clearTimeout(ge)},[H,r]),s.useEffect(()=>()=>{oe()},[oe]),s.useLayoutEffect(()=>{if(N.current===n)return;oe(),L(0),A(0),O(!1),k(!1),w(!1),v.current=0,b.current=0,M.current="none",f.current=!1,g.current=null,S.current=!1;const ge=x.current;ge&&P(Ur(ge)),N.current=n},[n,O,oe]),s.useEffect(()=>{if(H!=="open")return;let ge=null;const xe=()=>{ge&&(document.removeEventListener("click",ge,!0),ge=null)},Ce=()=>{xe(),ge=z=>{z.stopPropagation(),z.preventDefault(),xe()},document.addEventListener("click",ge,!0)},h=z=>{oe(),W.current=!1,C(!1),A(0),w(!1),f.current=!1,b.current=0,M.current="none";const I=x.current;I&&P(Ur(I)),z<0?c():l()},K=z=>{if(Math.abs(z)>OS&&t.length>1){h(z);return}O(!0),A(0),_()},Z=z=>{if(z.touches.length!==1||W.current)return;const I=z.touches[0];S.current=!0,g.current={x:I.clientX,y:I.clientY},M.current="none",b.current=0,f.current=!1},ne=z=>{if(!g.current||z.touches.length!==1||W.current)return;const I=z.touches[0],ee=I.clientX-g.current.x,te=I.clientY-g.current.y;if(M.current==="none"){if(Math.abs(ee)<10&&Math.abs(te)<10)return;if(Math.abs(ee)>Math.abs(te)){if(t.length<=1)return;M.current="horizontal"}else if(te>0)M.current="vertical";else return}if(M.current==="horizontal"){f.current=!0,w(!0),b.current=ee,A(ee),z.preventDefault();return}M.current==="vertical"&&(f.current=!0,w(!0),v.current=te,L(te),z.preventDefault())},de=()=>{if(!g.current)return;const z=M.current,I=f.current;if(I&&z==="horizontal")K(b.current),Ce();else if(I&&z==="vertical")if(v.current>WS){const te=window.innerHeight;v.current=te,k(!0),L(te),V("closing")}else v.current=0,L(0),Ce();else z==="horizontal"&&Math.abs(b.current)>0&&(K(b.current),Ce());g.current=null,M.current="none",b.current=0,f.current=!1,w(!1)};return document.addEventListener("touchstart",Z,{passive:!0}),document.addEventListener("touchmove",ne,{passive:!1}),document.addEventListener("touchend",de),document.addEventListener("touchcancel",de),()=>{document.removeEventListener("touchstart",Z),document.removeEventListener("touchmove",ne),document.removeEventListener("touchend",de),document.removeEventListener("touchcancel",de),xe()}},[H,t.length,c,l,O,_,oe]),s.useEffect(()=>{const ge=xe=>{xe.key==="Escape"&&(xe.preventDefault(),xe.stopPropagation(),H!=="closing"&&V("closing"))};return window.addEventListener("keydown",ge,!0),()=>window.removeEventListener("keydown",ge,!0)},[H]);const Q=()=>{H!=="closing"&&V("closing")},be=H==="open",Le=H==="closing",ye=$>0?Math.max(0,1-$/500):1,ce=$>0?Math.max(.35,1-$/500):1,Y=ge=>{if(ge.stopPropagation(),S.current){S.current=!1;return}if(t.length<=1)return;const xe=ge.currentTarget.getBoundingClientRect(),Ce=ge.clientY-xe.top,h=Math.min(52,xe.height*.2);if(!(Ce>xe.height-h)){if(ge.clientX-xe.left<xe.width/2){l();return}c()}},se=ge=>{if(t.length<=1)return;const xe=ge.currentTarget.getBoundingClientRect(),Ce=ge.clientX-xe.left,h=ge.clientY-xe.top,K=Math.min(52,xe.height*.2);if(h>xe.height-K){ge.currentTarget.style.cursor="default";return}ge.currentTarget.style.cursor=Ce<xe.width/2?"w-resize":"e-resize"},pe=s.useCallback(ge=>{ge.propertyName!=="transform"||!W.current||(oe(),O(!1))},[oe,O]),fe=ae?`translateX(${D}px)`:$>0?`translateY(${$}px)`:void 0,we={position:"fixed",top:B==null?void 0:B.top,left:B==null?void 0:B.left,width:B==null?void 0:B.width,height:B==null?void 0:B.height,objectFit:i==="cover"?"cover":"contain",transform:fe,opacity:$>0?ce:H==="opening"||Le?0:1,transition:X&&!T?"none":T?`transform ${Yn}ms ${Oi}`:q?`transform ${Yn}ms ${Oi}, opacity ${Yn}ms ${Oi}`:H==="opening"||Le?`opacity ${Yn}ms ${Oi}`:"none",pointerEvents:ie&&be&&!ae?"auto":"none",touchAction:ie&&be?"none":void 0,zIndex:9998},Re=B?{position:"fixed",top:B.top,height:B.height,width:B.width/2,zIndex:9999}:null;return a.jsxs("div",{className:[`${e}-lightbox`,o?`${e}-lightbox-editor`:""].filter(Boolean).join(" "),style:{touchAction:H==="open"?"none":void 0},onClick:Q,children:[a.jsx("div",{style:{position:"absolute",inset:0,background:p,opacity:be?ye:0,transition:X?"none":`opacity ${Yn}ms ${Oi}`,pointerEvents:"none"}}),a.jsx("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:y?a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:x,style:{position:"absolute",inset:0}}),a.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Yn}ms ${Oi}`,pointerEvents:"none",zIndex:9999},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{height:"10%"}}),a.jsx("div",{style:{width:"70%",height:"80%",display:"flex",justifyContent:"center",alignItems:"center"},children:a.jsx("div",{ref:x,style:{width:"100%",height:"100%"}})}),a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"10%",opacity:be?1:0,transition:`opacity ${Yn}ms ${Oi}`},children:t.length>1&&a.jsxs("p",{className:d,style:u,children:[n+1," / ",t.length]})})]})}),B&&j&&(ie?a.jsx(JS,{src:j.url,phase:H,mediaRef:m,mediaStyle:we,onLoadedMetadata:le,onClick:Y,onMouseMove:se,onTransitionEnd:pe},`${n}-${j.url}`):a.jsx("img",{ref:m,src:j.url,alt:j.name,onLoad:le,onTransitionEnd:pe,style:we},`${n}-${j.url}`)),be&&Re&&t.length>1&&!ie&&a.jsxs(a.Fragment,{children:[a.jsx("div",{style:{...Re,left:B.left,cursor:"w-resize",pointerEvents:ae?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),l()}}),a.jsx("div",{style:{...Re,left:B.left+B.width/2,cursor:"e-resize",pointerEvents:ae?"none":"auto"},onClick:ge=>{if(S.current){S.current=!1;return}ge.stopPropagation(),c()}})]})]})}function cd({P:e,media:t,imgWidth:n,cornerRadius:i,fillGalleryWidth:o,imageDisplay:r,isEditor:l,galleryPaddingBetween:c=0,showPaddingAfter:d=!1,showControls:u=!1,onMediaClick:p}){const y=`${e}-gallery-${Xs(t)?"video":"image"}`,x=r.display==="cover",m=YS(r),g=H=>R.scalingValue(H,l??!1),v=n??uo,b=o?{width:"100%",maxWidth:"100%"}:{width:g(v),maxWidth:"100%"},M=i?{borderRadius:g(i)}:{},f={...b,...x?{aspectRatio:m,height:"auto",overflow:"hidden"}:{},...M},S={...x?{display:"block",width:"100%",height:"100%",objectFit:"cover",maxWidth:"100%"}:{display:"block",maxWidth:"100%",height:"auto",width:o?"100%":g(v)},...p?{cursor:"pointer",pointerEvents:"auto"}:{},...x?{}:M},U={className:y,style:S,onClick:p?H=>{H.stopPropagation(),p()}:void 0},B=Math.max(c,Jn),P=Xs(t)?a.jsx("video",{...U,src:t.url,muted:!0,autoPlay:!0,loop:!0,playsInline:!0}):a.jsx("img",{...U,src:t.url,alt:t.name??""});return a.jsxs("div",{className:`${e}-gallery-item`,children:[x?a.jsx("div",{style:f,children:P}):P,d&&c>0&&a.jsx("div",{className:`${e}-padding-handle`,style:{height:g(c)},"aria-hidden":"true"}),u&&d&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:g(B)}})]})}function ew({P:e,layoutType:t,galleryWidthStyle:n,galleryPaddingRight:i,galleryPaddingLeft:o,galleryPaddingRightWidth:r,galleryPaddingLeftWidth:l,galleryPaddingMaxFraction:c,showControls:d,scaled:u,children:p}){const y=t==="a"?i:t==="c"?o:0,x=y>0||d;return a.jsxs("div",{className:`${e}-gallery-controls`,children:[t==="c"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="c"&&a.jsx("div",{"data-controls":"galleryPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:u(l),height:"100%"}}),a.jsx("div",{className:`${e}-gallery`,style:n,children:p}),t==="a"&&x&&a.jsx("div",{className:`${e}-gallery-edge-spacer`,style:{width:u(y)},"aria-hidden":"true"}),d&&t==="a"&&a.jsx("div",{"data-controls":"galleryPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,right:0,width:u(r),height:"100%"}})]})}function tw(e){switch(e){case"fade":case"retype":case"scroll":return e;case"default":return"scroll";default:return"scroll"}}function Kr({P:e,controlKey:t,scaled:n,height:i,paired:o,side:r}){return a.jsx("div",{"data-controls":t,...o?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{...r==="top"?{top:0}:{bottom:0},left:0,width:"100%",height:n(i)}})}function dd({P:e,controlKey:t,scaled:n,width:i,maxFraction:o,side:r,paired:l,anchorStyle:c}){return a.jsx("div",{"data-controls":t,...l?{"data-controls-paired":""}:{},"data-controls-axis":"x","data-controls-variant":"column-padding",...r==="right"?{"data-controls-reverse":""}:{},"data-controls-min":"0","data-controls-max-fraction":String(o),className:`${e}-control-anchor`,style:{top:0,...r==="left"?{left:0}:{right:0},width:n(i),height:"100%",...c}})}function Ss({P:e,title:t,description:n,position:i,titleRef:o,titleClassName:r,titleContainerStyle:l,titleTextBoxStyle:c,titleStyle:d,descriptionClassName:u,descriptionStyle:p,descriptionPadding:y,showTextBoxOutline:x=!1,showDescriptionPaddingControl:m=!1,descriptionPaddingPaired:g=!1,topPaddingControl:v,bottomPaddingControl:b}){const M=s.useRef(null),[f,S]=s.useState(0),W=t??"",U=n??"",B=U.length>0,{horizontal:P,vertical:H}=Dl(i),V=H==="center"||H==="bottom",$=H==="bottom";s.useLayoutEffect(()=>{if(!V)return;const T=M.current;if(!T||typeof ResizeObserver>"u")return;const C=()=>S(T.offsetHeight);C();const X=new ResizeObserver(C);return X.observe(T),()=>X.disconnect()},[W,U,V]);const L=a.jsx("span",{className:`${e}-title-text`,style:d,children:W}),D=B?a.jsx("span",{className:u,style:p,children:U}):null,A=B?a.jsx("div",{className:`${e}-title-texts-gap`,style:{height:y},children:m&&a.jsx("div",{"data-controls":"titleDescriptionPadding",...g?{"data-controls-paired":""}:{},"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:"100%"}})}):null;return a.jsx("div",{ref:T=>{M.current=T,o(T)},className:[r,`${e}-title-h-${P}`,`${e}-title-v-${H}`].join(" "),style:{...V?{[`--${e}-title-height`]:`${f}px`}:{},...l},children:a.jsxs("div",{className:`${e}-title-text-stack`,style:c,children:[v,a.jsx("div",{className:x?`${e}-title-text-inner`:`${e}-title-text-inner-hidden`,style:{width:"100%"},children:a.jsx("div",{className:`${e}-title-texts`,children:$?a.jsxs(a.Fragment,{children:[D,A,L]}):a.jsxs(a.Fragment,{children:[L,A,D]})})}),b]})})}const ud=45;function pd(e,t,n){let i=e;for(;i;){const o=getComputedStyle(i).getPropertyValue(t).trim();if(o){const r=parseFloat(o);if(!Number.isNaN(r))return r}i=i.parentElement}return n}function nw(e){const t=pd(e,"--cntrl-viewport-height",window.innerHeight),n=pd(e,"--cntrl-article-top",0);return{top:n,height:t,centerY:n+t/2}}function iw(e,t,n){const{vertical:i}=Dl(t),{top:o,height:r,centerY:l}=nw(n);if(i==="top"){const d=n&&parseFloat(getComputedStyle(n).top)||o;return Math.abs(e.top-d)}if(i==="bottom")return Math.abs(e.bottom-(o+r));const c=e.top+e.height/2;return Math.abs(c-l)}function ow(e,t,n){const i=Array.from({length:t},(l,c)=>{const d=e.current[c];if(!d)return 0;const u=d.getBoundingClientRect(),p=iw(u,n,d);return Math.exp(-(p*p)/(2*ud*ud))});let o=0,r=-1;return i.forEach((l,c)=>{l>r&&(r=l,o=c)}),{opacities:i,dominantIndex:o}}function rw(e,t,n){const i=s.useRef([]),[{opacities:o,dominantIndex:r},l]=s.useState(()=>({opacities:Array.from({length:e},(d,u)=>u===0?1:0),dominantIndex:0}));return s.useLayoutEffect(()=>{if(!t||e===0){l({opacities:Array.from({length:e},()=>1),dominantIndex:0});return}let d=0;const u=()=>{l(ow(i,e,n))},p=()=>{d||(d=window.requestAnimationFrame(()=>{d=0,u()}))};return u(),window.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p,{passive:!0}),()=>{d&&window.cancelAnimationFrame(d),window.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[t,e,n]),{setTitleRef:d=>u=>{i.current[d]=u},opacities:o,dominantIndex:r}}function md(e,t){const[n,i]=s.useState(e),o=s.useRef(e);return s.useEffect(()=>{if(!t){o.current=e,i(e);return}const r=Array.from(o.current),l=Array.from(e),c=Math.max(r.length,l.length);if(c===0||o.current===e)return;let d=0;const u=window.setInterval(()=>{d+=1;const p=[...l.slice(0,d),...r.slice(d)].join("");o.current=p,i(p),d>=c&&window.clearInterval(u)},70);return()=>window.clearInterval(u)},[t,e]),n}function aw({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,portalId:r}){var mt,Lt;const{prefix:l}=R.useScopedStyles(),c=s.useMemo(()=>FS(l),[l]),d=t??[],u=(e==null?void 0:e.wrapperWidth)??1,p=(e==null?void 0:e.type)??"a",y=(e==null?void 0:e.imgWidth)??uo,x=(e==null?void 0:e.titleWidth)??US,m=KS(e==null?void 0:e.imageDisplay),g=(e==null?void 0:e.cornerRadius)??MS,v=_S(e==null?void 0:e.position),{horizontal:b,vertical:M}=Dl(v),f=(e==null?void 0:e.titleTopPadding)??0,S=(e==null?void 0:e.titleBottomPadding)??0,W=(e==null?void 0:e.titleLeftPadding)??0,U=(e==null?void 0:e.titleRightPadding)??0,B=(e==null?void 0:e.titleDescriptionPadding)??0,P=tw(e==null?void 0:e.transition),H=(e==null?void 0:e.lightbox)??"on",V=p==="b",$=P==="fade"||P==="retype",{setTitleRef:L,dominantIndex:D}=rw(d.length,$,v),A=((mt=d[D])==null?void 0:mt.title)??"",T=((Lt=d[D])==null?void 0:Lt.description)??"",C=md(A,P==="retype"),X=md(T,P==="retype"),w=P==="fade"||P==="retype",q=P==="retype"?C:A,k=P==="retype"?X:T,N=V?void 0:{width:R.scalingValue(y,n??!1)},j=H==="on"&&(!n||i||o),ie=o??!1,ae=(e==null?void 0:e.galleryPaddingRight)??0,O=(e==null?void 0:e.galleryPaddingLeft)??0,oe=(e==null?void 0:e.galleryPaddingBetween)??0,_=bt=>R.scalingValue(bt,n??!1),Q={width:_(x)},be=p==="a"?ae:O,Le=V?{width:"100%"}:{width:`calc(100% - ${_(y)} - ${_(be)})`,...p==="c"?{marginLeft:"auto"}:{}},ye=Math.max(ae,Jn),ce=Math.max(O,Jn),Y=Math.max(oe,Jn),se=Math.max(f,Jn),pe=Math.max(S,Jn),fe=Math.max(W,Jn),we=Math.max(U,Jn),Re=Math.max(B,Jn),ge=Math.max(0,(u??1)-(y??uo)),xe=p==="a"?Math.max(0,(u??1)-(y??uo)-ae):p==="c"?Math.max(0,(u??1)-(y??uo)-O):p==="b"?u??1:1,Ce=ie&&M==="top",h=ie&&M==="bottom",K=ie&&b==="left",Z=ie&&b==="right",ne=d.length>1,de=V?void 0:_((p==="c"?O:ae)+(y??uo)),z=p==="c"&&de?{left:de}:void 0,I=p==="a"&&de?{right:de}:void 0,ee=V?{left:0,width:"100%"}:p==="a"?{right:_(ae),width:_(y)}:{left:_(O),width:_(y)},{titleColor:te,titleFontFamily:me,titleFontSettings:G,titleFontSize:Ie,titleLineHeight:Se,titleLetterSpacing:J,titleWordSpacing:He,titleAlign:We,titleTextAppearance:ot,descriptionColor:qe,descriptionFontFamily:tt,descriptionFontSettings:et,descriptionFontSize:Ge,descriptionLineHeight:ve,descriptionLetterSpacing:_e,descriptionWordSpacing:je,descriptionAlign:Ze,descriptionTextAppearance:$e,lightboxCounterColor:Ne,lightboxCounterFontFamily:Ue,lightboxCounterFontSettings:Je,lightboxCounterFontSize:st,lightboxCounterLineHeight:it,lightboxCounterLetterSpacing:Oe,lightboxCounterWordSpacing:Fe,lightboxCounterTextAppearance:ut}=e??{},ze={fontSettings:{fontFamily:me,fontWeight:(G==null?void 0:G.fontWeight)??400,fontStyle:(G==null?void 0:G.fontStyle)??"normal"},fontSize:Ie??.01,lineHeight:Se,letterSpacing:J??0,wordSpacing:He??0,textAlign:We??"left",textAppearance:ot,color:te??"#000000"},Xe=dn(Qt(ze,n)),pt=Q,he={...bs(Ie,Se,l,n),...bs(Ge,ve,l,n,"description-leading-gap")},Me=xs(Ie,Se,`${l}-title`,`${l}-text-tight-leading`),nt={fontSettings:{fontFamily:tt,fontWeight:(et==null?void 0:et.fontWeight)??400,fontStyle:(et==null?void 0:et.fontStyle)??"normal"},fontSize:Ge??.01,lineHeight:ve,letterSpacing:_e??0,wordSpacing:je??0,textAlign:Ze??"left",textAppearance:$e,color:qe??"#000000"},gt=dn(Qt(nt,n)),Ve=xs(Ge,ve,`${l}-description-text`,`${l}-description-tight-leading`),yt=_(ie?Re:B),It={fontSettings:{fontFamily:Ue,fontWeight:(Je==null?void 0:Je.fontWeight)??400,fontStyle:(Je==null?void 0:Je.fontStyle)??"normal"},fontSize:st??.01,lineHeight:it,letterSpacing:Oe??0,wordSpacing:Fe??0,textAppearance:ut,color:Ne??"#DEDDDD"},St={...dn(Qt(It,n)),...bs(st,it,l,n)},Vt=xs(st,it,`${l}-lightbox-counter`,`${l}-text-tight-leading`),jt=R.buildColorVars(l,{titleColor:te??"#000000",descriptionColor:qe??"#000000",lightboxCounterColor:Ne??"#DEDDDD"},DS,zS),Ut=s.useRef(null),[Kt,Rt]=s.useState(!1),[zt,rn]=s.useState([]),[vt,ft]=s.useState(0),Ae=s.useCallback((bt,kt)=>{j&&(rn(bt),ft(kt),Rt(!0))},[j]),Qe=s.useCallback(()=>{Rt(!1)},[]),at=s.useMemo(()=>{const bt={...jt},kt=Ut.current?getComputedStyle(Ut.current).getPropertyValue("--cntrl-article-width").trim():"";return kt&&(bt["--cntrl-article-width"]=kt),bt},[jt,Kt]);return s.useEffect(()=>{if(!Kt||H!=="on"||typeof document>"u")return;const bt=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=bt}},[Kt,H]),s.useEffect(()=>{!n||o||i||Rt(!1)},[n,o,i]),s.useEffect(()=>{H==="off"&&Rt(!1)},[H]),a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}),a.jsx("div",{style:jt,children:a.jsxs("div",{ref:Ut,className:`${l}-wrapper`,style:{width:R.scalingValue(u,n??!1),[`--${l}-title-top-padding`]:M==="top"?_(f):void 0,[`--${l}-title-bottom-padding`]:M==="bottom"?_(S):void 0,[`--${l}-title-left-padding`]:b==="left"?_(W):void 0,[`--${l}-title-right-padding`]:b==="right"?_(U):void 0},children:[w&&a.jsx("div",{className:`${l}-single-title-layer`,children:a.jsx(Ss,{P:l,title:q,description:k,position:v,titleRef:()=>{},titleClassName:`${Me} ${l}-single-title`,titleContainerStyle:{...he,...Le},titleTextBoxStyle:pt,titleStyle:Xe,descriptionClassName:Ve,descriptionStyle:gt,descriptionPadding:yt,showTextBoxOutline:ie,showDescriptionPaddingControl:ie,topPaddingControl:Ce?Kr({P:l,controlKey:"titleTopPadding",scaled:_,height:se,paired:!1,side:"top"}):void 0,bottomPaddingControl:h?Kr({P:l,controlKey:"titleBottomPadding",scaled:_,height:pe,paired:!1,side:"bottom"}):void 0})}),d.map((bt,kt)=>{const Bt=GS(bt.gallery),lt=kt<d.length-1,Ht=Bt.filter(Mt=>Mt.lightboxMedia).map(Mt=>Mt.lightboxMedia),Yt={P:l,position:v,titleRef:L(kt),titleClassName:Me,titleContainerStyle:he,titleTextBoxStyle:w?{maxWidth:"100%"}:pt,titleStyle:Xe,descriptionClassName:Ve,descriptionStyle:gt,descriptionPadding:yt,showTextBoxOutline:ie&&!w,showDescriptionPaddingControl:ie&&!w,descriptionPaddingPaired:ne,topPaddingControl:Ce&&!w?Kr({P:l,controlKey:"titleTopPadding",scaled:_,height:se,paired:ne,side:"top"}):void 0,bottomPaddingControl:h&&!w?Kr({P:l,controlKey:"titleBottomPadding",scaled:_,height:pe,paired:ne,side:"bottom"}):void 0};return a.jsxs("div",{"data-item-index":kt,className:`${l}-item ${l}-item-${p}`,style:{paddingBottom:lt?_(oe):void 0},children:[K&&dd({P:l,controlKey:"titleLeftPadding",scaled:_,width:fe,maxFraction:xe,side:"left",paired:ne,anchorStyle:z}),Z&&dd({P:l,controlKey:"titleRightPadding",scaled:_,width:we,maxFraction:xe,side:"right",paired:ne,anchorStyle:I}),ie&&lt&&a.jsx("div",{"data-controls":"galleryPaddingBetween","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0",className:`${l}-control-anchor`,style:{bottom:0,height:_(Y),...ee}}),V?a.jsxs("div",{className:`${l}-gallery`,children:[a.jsx("div",{className:`${l}-gallery-media`,children:Bt.map(({displayMedia:Mt,lightboxMedia:Nt},Ft)=>{const $t=Nt?Ht.findIndex(E=>E.url===Nt.url):-1;return a.jsx(cd,{P:l,media:Mt,imgWidth:y||void 0,cornerRadius:g||void 0,imageDisplay:m,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:Ft<Bt.length-1,showControls:ie,onMediaClick:j&&$t>=0?()=>Ae(Ht,$t):void 0},`${Mt.url}-${Ft}`)})}),a.jsx("div",{className:`${l}-title-layer`,children:a.jsx(Ss,{...Yt,title:w?"":bt.title,description:w?"":bt.description})})]}):a.jsxs(a.Fragment,{children:[a.jsx(Ss,{...Yt,title:w?"":bt.title,description:w?"":bt.description}),Bt.length>0&&a.jsx(ew,{P:l,layoutType:p,galleryWidthStyle:N,galleryPaddingRight:ae,galleryPaddingLeft:O,galleryPaddingRightWidth:ye,galleryPaddingLeftWidth:ce,galleryPaddingMaxFraction:ge,showControls:ie,scaled:_,children:Bt.map(({displayMedia:Mt,lightboxMedia:Nt},Ft)=>{const $t=Nt?Ht.findIndex(E=>E.url===Nt.url):-1;return a.jsx(cd,{P:l,media:Mt,cornerRadius:g||void 0,fillGalleryWidth:!0,imageDisplay:m,isEditor:n,galleryPaddingBetween:oe,showPaddingAfter:Ft<Bt.length-1,showControls:ie,onMediaClick:j&&$t>=0?()=>Ae(Ht,$t):void 0},`${Mt.url}-${Ft}`)})})]})]},kt)})]})}),Kt&&H==="on"&&typeof document<"u"&&e&&(()=>{const bt=(r?document.getElementById(r):null)??document.body;return Gn.createPortal(a.jsx("div",{style:at,"data-selection":"none",children:a.jsx(QS,{prefix:l,items:zt,index:vt,imageDisplay:ZS(e.lightboxImageDisplay),isEditor:n,onClose:Qe,onPrev:()=>ft(kt=>(kt-1+zt.length)%zt.length),onNext:()=>ft(kt=>(kt+1)%zt.length),counterClassName:Vt,counterStyle:St,backgroundColor:e.backgroundColor??HS})}),bt)})()]})}const sw=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
21130
21120
  import { createPortal } from 'react-dom';
21131
21121
  import type React from 'react';
21132
21122
  import { CommonComponentProps } from '../props';
@@ -23424,7 +23414,7 @@ export function Mercury({
23424
23414
  </>
23425
23415
  );
23426
23416
  }
23427
- `;function hi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Qo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},sw={type:"object",version:1,content:{type:"array",settings:{addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},galleryPaddingRight:hi("Gallery Padding Right"),galleryPaddingLeft:hi("Gallery Padding Left"),galleryPaddingBetween:hi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:hi("Title Top Padding"),titleBottomPadding:hi("Title Bottom Padding"),titleLeftPadding:hi("Title Left Padding"),titleRightPadding:hi("Title Right Padding"),titleDescriptionPadding:hi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Qo.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"}},titleAlign:{...Qo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Qo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Qo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Qo.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:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},lw={element:rw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:sw,sourceCode:aw,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},cw=10,dw=400,uw=1,pw=1120/1440,mw=140/1440,gw=550/1440,hw=13,fw=4,yw=38/100,vw=28/100,gp=2.8,xw=.9,hp=.22,bw=.5,Sw=1,ww=1.5,$w=0,Cw=.85;function Tw(e){return`
23417
+ `;function hi(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Qo={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}},textAlign:{type:"string",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}}},lw={type:"object",version:1,content:{type:"array",settings:{allowsCollection:!0,addItemWithoutImage:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{title:{type:"string",label:"Title",contentKey:"title",placeholder:"Add Title...",display:{type:"text-input"}},description:{type:"string",label:"Description",contentKey:"subtitle",placeholder:"Add Description...",display:{type:"text-input"}},gallery:{type:"array",label:"Gallery",contentKey:"gallery",display:{type:"media-pair-list-input"},items:{type:"object",properties:{media:{type:"array",items:{type:"object",properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]},objectFit:{type:"string",enum:["cover","contain"]}}}}}}}},required:["gallery"]},default:[{title:"AX-2 Space Suit",description:"Pressure garment and life support",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Earth-orbital mission",description:"Hasselblad documentation series",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-1.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-2.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-3.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-4.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-5.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-6.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]},{title:"Salton Sea from Above",description:"Aerial survey, California",gallery:[{media:[{url:"https://cdn.cntrl.site/component-assets/Component-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-7.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-8.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-9.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-10.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-11.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]},{media:[{url:"https://cdn.cntrl.site/component-assets/Mercury-default-12.jpg",name:"",objectFit:"cover"},{url:"",name:"",objectFit:"cover"}]}]}]},settings:{sizing:"auto auto",properties:{wrapperWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},type:{type:"string",scope:"layout",title:"",display:{type:"radio-group"},enum:["a","b","c"]},imgWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},titleWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},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"}}},galleryPaddingRight:hi("Gallery Padding Right"),galleryPaddingLeft:hi("Gallery Padding Left"),galleryPaddingBetween:hi("Gallery Padding Between"),cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left-top","top-center","top-right","left-center","center","right-center","left-bottom","bottom-center","right-bottom"]}},titleTopPadding:hi("Title Top Padding"),titleBottomPadding:hi("Title Bottom Padding"),titleLeftPadding:hi("Title Left Padding"),titleRightPadding:hi("Title Right Padding"),titleDescriptionPadding:hi("Title Description Padding"),transition:{type:"string",scope:"common",title:"Transition",display:{type:"toggle-cycle",enum:["fade","retype","scroll"]}},titleColor:{type:"string",scope:"common",title:"Title",display:{type:"palette-color-picker"}},titleFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},titleFontSettings:{...Qo.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"}},titleAlign:{...Qo.textAlign,scope:"layout",title:"Align"},titleTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},descriptionColor:{type:"string",scope:"common",title:"Description",display:{type:"palette-color-picker"}},descriptionFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},descriptionFontSettings:{...Qo.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},descriptionFontSize:{type:"number",scope:"layout",title:"Input Font Size",display:{type:"font-size"}},descriptionLineHeight:{type:"number",scope:"layout",title:"Input Line Height",display:{type:"line-height-input"}},descriptionLetterSpacing:{type:"number",scope:"layout",title:"Input Letter Spacing",display:{type:"letter-spacing-input"}},descriptionWordSpacing:{type:"number",scope:"layout",title:"Input Word Spacing",display:{type:"word-spacing-input"}},descriptionAlign:{...Qo.textAlign,scope:"layout",title:"Align"},descriptionTextAppearance:{type:"object",scope:"layout",title:"Input Text Appearance",display:{type:"text-appearance"}},lightbox:{type:"boolean",scope:"common",title:"Lightbox",display:{type:"toggle-cycle",enum:["on","off"]}},lightboxImageDisplay:{type:"string",scope:"common",title:"Display",display:{type:"toggle-cycle",enum:["fit","cover"]}},backgroundColor:{type:"string",scope:"common",title:"BG Lightbox",display:{type:"settings-color-picker"}},lightboxCounterColor:{type:"string",scope:"common",title:"Counter Lightbox",display:{type:"palette-color-picker"}},lightboxCounterFontFamily:{type:"string",scope:"common",title:"Font family",display:{type:"font-family-select"}},lightboxCounterFontSettings:{...Qo.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:{type:"a",position:"left-center",transition:"scroll",titleColor:"#000000",titleFontFamily:"Goudy Bookletter 1911",titleFontSettings:{fontWeight:400,fontStyle:"normal"},titleLetterSpacing:0,titleWordSpacing:0,titleAlign:"center",titleTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},descriptionColor:"#000000",descriptionFontFamily:"Goudy Bookletter 1911",descriptionFontSettings:{fontWeight:400,fontStyle:"normal"},descriptionLetterSpacing:0,descriptionWordSpacing:0,descriptionAlign:"center",descriptionTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"},lightbox:"on",imageDisplay:{display:"fit",ratioValue:"2:3",reversed:!1},lightboxImageDisplay:"fit",backgroundColor:"rgba(28,31,34,0.9)",lightboxCounterColor:"#DEDDDD",lightboxCounterFontFamily:"Goudy Bookletter 1911",lightboxCounterFontSettings:{fontWeight:400,fontStyle:"normal"},lightboxCounterLetterSpacing:0,lightboxCounterWordSpacing:0,lightboxCounterTextAppearance:{textTransform:"none",textDecoration:"none",fontVariant:"normal"}},layoutDefaults:{d:{defaultPaddingTop:30/1440,wrapperWidth:1,imgWidth:600/1440,titleWidth:400/1440,galleryPaddingRight:30/1440,galleryPaddingLeft:30/1440,galleryPaddingBetween:30/1440,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:10/1440,cornerRadius:4/1440,position:"center",titleFontSize:73/1440,titleLineHeight:66/1440,descriptionFontSize:20/1440,descriptionLineHeight:24/1440,lightboxCounterFontSize:.01,lightboxCounterLineHeight:.01},m:{defaultPaddingTop:10/375,wrapperWidth:1,imgWidth:170/375,titleWidth:150/375,galleryPaddingRight:10/375,galleryPaddingLeft:10/375,galleryPaddingBetween:10/375,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:10/375,titleRightPadding:10/375,titleDescriptionPadding:8/375,cornerRadius:8/375,position:"left-center",titleFontSize:30/375,titleLineHeight:25/375,descriptionFontSize:14/375,descriptionLineHeight:18/375,lightboxCounterFontSize:14/375,lightboxCounterLineHeight:14/375},t:{defaultPaddingTop:20/768,wrapperWidth:1,imgWidth:300/768,titleWidth:320/768,galleryPaddingRight:20/768,galleryPaddingLeft:20/768,galleryPaddingBetween:20/768,titleTopPadding:0,titleBottomPadding:0,titleLeftPadding:0,titleRightPadding:0,titleDescriptionPadding:8/768,cornerRadius:8/768,position:"center",titleFontSize:58/768,titleLineHeight:48/768,descriptionFontSize:16/768,descriptionLineHeight:20/768,lightboxCounterFontSize:8/768,lightboxCounterLineHeight:8/768}},displayRules:[{if:{name:"lightbox",value:"off"},then:{name:"properties.lightboxImageDisplay.display.enabled",value:!1}}],layout:["__componentName__","type","wrapperWidth","imgWidth","titleWidth","imageDisplay","cornerRadius","position","transition","lightbox","lightboxImageDisplay"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","type",{type:"row",items:["wrapperWidth","imgWidth"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",title:"Title",items:["position","transition"]},"titleWidth",{type:"row",title:"Lightbox",items:["lightbox","lightboxImageDisplay"]},{type:"row",items:["backgroundColor"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:[{type:"group",title:"Title",items:["titleFontFamily","titleFontSettings",{type:"row",items:["titleFontSize","titleLineHeight","titleLetterSpacing","titleWordSpacing"]},"titleAlign","titleTextAppearance"]},{type:"group",title:"Description",items:["descriptionFontFamily","descriptionFontSettings",{type:"row",items:["descriptionFontSize","descriptionLineHeight","descriptionLetterSpacing","descriptionWordSpacing"]},"descriptionAlign","descriptionTextAppearance"]},{type:"group",title:"Lightbox Counter",items:["lightboxCounterFontFamily","lightboxCounterFontSettings",{type:"row",items:["lightboxCounterFontSize","lightboxCounterLineHeight","lightboxCounterLetterSpacing","lightboxCounterWordSpacing"]},"lightboxCounterTextAppearance"]}]}],paletteBookmark:{items:["titleColor","descriptionColor","backgroundColor","lightboxCounterColor"],panelIds:["general","typeStyle"]}},cw={element:aw,id:"mercury",name:"Mercury",category:"lists",layoutMode:"structured",version:1,defaultSize:{d:{width:720,height:540}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Mercury.mp4"},schema:lw,sourceCode:sw,assetsPaths:{content:[{path:"gallery.media.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[{path:"titleFontFamily"},{path:"descriptionFontFamily"},{path:"lightboxCounterFontFamily"}]},fontRelations:{titleFontSettings:"titleFontFamily",descriptionFontSettings:"descriptionFontFamily",lightboxCounterFontSettings:"lightboxCounterFontFamily"}},dw=10,uw=400,pw=1,mw=1120/1440,gw=140/1440,hw=550/1440,fw=13,yw=4,vw=38/100,xw=28/100,gp=2.8,bw=.9,hp=.22,Sw=.5,ww=1,$w=1.5,Cw=0,Tw=.85;function Lw(e){return`
23428
23418
  .${e}-wrapper {
23429
23419
  position: relative;
23430
23420
  box-sizing: border-box;
@@ -23466,7 +23456,7 @@ export function Mercury({
23466
23456
  object-fit: cover;
23467
23457
  object-position: center;
23468
23458
  }
23469
- `}function fp(e){return Number(e.toFixed(4))}function gd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function ws(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Lw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Pw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Iw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function yp(e,t){return(1-e)/(1-e*Math.cos(t))}function Rw(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*yp(e,i)))}return t||1}function kw(e,t){return e?1:1+hp*(.35+t)}function Ew(e,t,n,i){const o=t*kw(n,i);return Math.max(0,(e-o)/2)}function Mw(e,t,n){const i=yp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Aw(e,t,n){return e/2+t*n}function Fw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${fp(n)})`}function Nw(e){return Math.round(e*1e3)}function vp(e,t,n){const i=Math.cos(e),o=Math.cos(Cw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return fp(t+(n-t)*r)}function _w(e){return vp(e,bw,Sw)}function Hw(e){return vp(e,ww,$w)}function Ww(e,t){if(!t)return"none";const n=Hw(e);return n<=0?"none":`blur(${n}px)`}function hd(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=Mw(e.depthFactor,e.spreadFactor,n),r=Aw(e.width,e.orbitRadius,i);return{transform:Fw(e.scaled,r,o),zIndex:Nw(o),opacity:_w(n),filter:Ww(n,e.blurEnabled)}}function xp(e,t){return(e%t+t)%t}function Ow(e,t){return zl(e,t)/t}function zl(e,t){return xp(e,t)}function Dw(e,t){return Math.floor(e/t)}function zw(e,t,n,i){return Dw(e,t)*n+zl(e,t)*i}function fd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ua(e){const t=e%1;return t<0?t+1:t}function Bw(e,t,n){const i=t/gp,o=n==="left"?-e*i:e*i;return ua(o)}function jw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=F.useScopedStyles(),r=s.useRef(null),l=ws((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),pw),c=ws(e==null?void 0:e.imageWidth,mw),d=ws(e==null?void 0:e.turnHeight,gw),u=gd(e==null?void 0:e.itemsPerTurn,hw,3,40),p=gd(e==null?void 0:e.turns,fw,1,30),y=Math.min(xw,Math.max(0,yw)),v=Math.min(1,Math.max(0,vw)),m=Math.max(0,(e==null?void 0:e.speed)??gp),g=(e==null?void 0:e.direction)==="left"?"left":"right",x=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,k=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>Lw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=f.display==="cover",W=N=>F.scalingValue(N,n??!1),U=s.useMemo(()=>Rw(y),[y]),B=s.useMemo(()=>Ew(l,c,S,v),[l,c,S,v]),P=s.useMemo(()=>Tw(o),[o]),_=s.useMemo(()=>({scaled:N=>F.scalingValue(N,n??!1),width:l,orbitRadius:B,depthFactor:y,spreadFactor:U,blurEnabled:k}),[n,l,B,y,U,k]),G=s.useRef([]),$=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(N=>{var le;return!!((le=N.image)!=null&&le.url)}),[t]),D=d/u,E=c*Pw(f),T=Math.min(dw,p*u),C=uw*u,V=T+C*2,q=Math.max(0,p-1)*d+(u-1)*D,I=m>0,A=x==="scroll"&&I,j=x==="autoplay"&&I&&(n?!!i:!0),ie=j?360/(m*cw):0,ae=L.length===0?0:V,O=s.useMemo(()=>Array.from({length:ae},(N,le)=>Ow(le-C,u)),[ae,C,u]);s.useEffect(()=>{if(!j&&!A)return;const N=r.current;if(!N)return;const le=pe=>{$.current=pe,O.forEach((fe,we)=>{const Re=G.current[we];if(!Re)return;const ge=hd(_,ua(fe+pe));Re.style.transform=ge.transform,Re.style.zIndex=String(ge.zIndex),Re.style.opacity=String(ge.opacity),Re.style.filter=ge.filter})};if(A){const pe=N.ownerDocument.defaultView??window,fe=()=>{const Re=N.getBoundingClientRect(),ge=pe.innerHeight||N.ownerDocument.documentElement.clientHeight,xe=ge+Re.height;if(xe<=0)return;const Ce=Math.min(1,Math.max(0,(ge-Re.top)/xe));le(Bw(Ce,m,g))};fe(),pe.addEventListener("scroll",fe,{passive:!0,capture:!0}),pe.addEventListener("resize",fe);const we=new ResizeObserver(fe);return we.observe(N),()=>{pe.removeEventListener("scroll",fe,{capture:!0}),pe.removeEventListener("resize",fe),we.disconnect()}}const Q=g==="left"?-1:1;let be=null,Pe=null;const ye=pe=>{if(Pe!==null){const fe=(pe-Pe)/1e3/ie*Q;$.current=ua($.current+fe)}Pe=pe,le($.current),be=requestAnimationFrame(ye)},ce=()=>{be===null&&(Pe=null,be=requestAnimationFrame(ye))},Y=()=>{be!==null&&cancelAnimationFrame(be),be=null},se=new IntersectionObserver(([pe])=>{pe!=null&&pe.isIntersecting?ce():Y()});return se.observe(N),()=>{Y(),se.disconnect()}},[j,A,O,_,ie,m,g]);const oe=j||A?$.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:W(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:W(l),height:W(q)},children:Array.from({length:V},(N,le)=>{const Q=le-C,Pe=L[xp(Q,L.length)].image,ye=zl(Q,u),ce=O[le],Y=zw(Q,u,d,D),se=v===0?0:(fd(ye+7.3)-.5)*v*D,pe=S?1:1+(fd(ye+3.1)-.5)*2*hp*(.35+v),fe=c*pe,we={"--helix-base-w":W(fe),...S?{"--helix-base-h":W(E)}:{}},Re={top:W(Y+se),...we,...hd(_,ua(ce+oe))},ge=b>0?{borderRadius:W(b)}:{},xe=S?{...ge,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:ge,Ce=Iw(Pe)?a.jsx("video",{className:`${o}-media`,style:xe,src:Pe.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:xe,src:Pe.url,alt:Pe.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:h=>{G.current[le]=h},className:S?`${o}-item ${o}-item-cover`:`${o}-item`,style:Re,children:S?a.jsx("div",{className:`${o}-cover`,style:ge,children:Ce}):Ce},`${p}-${u}-${Q}`)})})]})}const Vw=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23459
+ `}function fp(e){return Number(e.toFixed(4))}function gd(e,t,n,i){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,Math.round(r))):t}function ws(e,t,n=0,i=9999){const r=(typeof e=="string"?Number(e):e)??t;return Number.isFinite(r)?Math.min(i,Math.max(n,r)):t}function Pw(e){return typeof e=="string"?{display:e.toLowerCase()==="cover"?"cover":"fit",ratioValue:"2:3",reversed:!1}:{display:(typeof(e==null?void 0:e.display)=="string"?e.display.toLowerCase():"")==="cover"?"cover":"fit",ratioValue:(e==null?void 0:e.ratioValue)??"2:3",reversed:(e==null?void 0:e.reversed)??!1}}function Iw(e){const[t,n]=e.ratioValue.split(":").map(Number),i=e.reversed?n:t;return(e.reversed?t:n)/i}function Rw(e){return e.type==="video"?!0:e.type==="image"?!1:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.name??"")||/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e.url??"")}function yp(e,t){return(1-e)/(1-e*Math.cos(t))}function kw(e){let t=0;for(let n=0;n<360;n+=1){const i=n*Math.PI/180;t=Math.max(t,Math.abs(Math.sin(i)*yp(e,i)))}return t||1}function Ew(e,t){return e?1:1+hp*(.35+t)}function Mw(e,t,n,i){const o=t*Ew(n,i);return Math.max(0,(e-o)/2)}function Aw(e,t,n){const i=yp(e,n);return{offset:Math.sin(n)*i/t,scale:i}}function Fw(e,t,n){return e/2+t*n}function Nw(e,t,n){return`translate(calc(${e(t)} - var(--helix-base-w) / 2), -50%) scale(${fp(n)})`}function _w(e){return Math.round(e*1e3)}function vp(e,t,n){const i=Math.cos(e),o=Math.cos(Tw*Math.PI/2);if(i>=o)return n;const r=(i+1)/(o+1);return fp(t+(n-t)*r)}function Hw(e){return vp(e,Sw,ww)}function Ww(e){return vp(e,$w,Cw)}function Ow(e,t){if(!t)return"none";const n=Ww(e);return n<=0?"none":`blur(${n}px)`}function hd(e,t){const n=t*Math.PI*2,{offset:i,scale:o}=Aw(e.depthFactor,e.spreadFactor,n),r=Fw(e.width,e.orbitRadius,i);return{transform:Nw(e.scaled,r,o),zIndex:_w(o),opacity:Hw(n),filter:Ow(n,e.blurEnabled)}}function xp(e,t){return(e%t+t)%t}function Dw(e,t){return zl(e,t)/t}function zl(e,t){return xp(e,t)}function zw(e,t){return Math.floor(e/t)}function Bw(e,t,n,i){return zw(e,t)*n+zl(e,t)*i}function fd(e){const t=Math.sin(e*12.9898)*43758.5453;return t-Math.floor(t)}function ua(e){const t=e%1;return t<0?t+1:t}function jw(e,t,n){const i=t/gp,o=n==="left"?-e*i:e*i;return ua(o)}function Vw({settings:e,content:t,isEditor:n,isPreviewMode:i}){const{prefix:o}=R.useScopedStyles(),r=s.useRef(null),l=ws((e==null?void 0:e.width)??(e==null?void 0:e.spread)??(e==null?void 0:e.wrapperWidth),mw),c=ws(e==null?void 0:e.imageWidth,gw),d=ws(e==null?void 0:e.turnHeight,hw),u=gd(e==null?void 0:e.itemsPerTurn,fw,3,40),p=gd(e==null?void 0:e.turns,yw,1,30),y=Math.min(bw,Math.max(0,vw)),x=Math.min(1,Math.max(0,xw)),m=Math.max(0,(e==null?void 0:e.speed)??gp),g=(e==null?void 0:e.direction)==="left"?"left":"right",v=(e==null?void 0:e.playback)==="scroll"?"scroll":"autoplay",b=(e==null?void 0:e.cornerRadius)??0,M=(e==null?void 0:e.blur)!=="off",f=s.useMemo(()=>Pw(e==null?void 0:e.imageDisplay),[e==null?void 0:e.imageDisplay]),S=f.display==="cover",W=_=>R.scalingValue(_,n??!1),U=s.useMemo(()=>kw(y),[y]),B=s.useMemo(()=>Mw(l,c,S,x),[l,c,S,x]),P=s.useMemo(()=>Lw(o),[o]),H=s.useMemo(()=>({scaled:_=>R.scalingValue(_,n??!1),width:l,orbitRadius:B,depthFactor:y,spreadFactor:U,blurEnabled:M}),[n,l,B,y,U,M]),V=s.useRef([]),$=s.useRef(0),L=s.useMemo(()=>(t??[]).filter(_=>{var le;return!!((le=_.image)!=null&&le.url)}),[t]),D=d/u,A=c*Iw(f),T=Math.min(uw,p*u),C=pw*u,X=T+C*2,q=Math.max(0,p-1)*d+(u-1)*D,k=m>0,N=v==="scroll"&&k,j=v==="autoplay"&&k&&(n?!!i:!0),ie=j?360/(m*dw):0,ae=L.length===0?0:X,O=s.useMemo(()=>Array.from({length:ae},(_,le)=>Dw(le-C,u)),[ae,C,u]);s.useEffect(()=>{if(!j&&!N)return;const _=r.current;if(!_)return;const le=pe=>{$.current=pe,O.forEach((fe,we)=>{const Re=V.current[we];if(!Re)return;const ge=hd(H,ua(fe+pe));Re.style.transform=ge.transform,Re.style.zIndex=String(ge.zIndex),Re.style.opacity=String(ge.opacity),Re.style.filter=ge.filter})};if(N){const pe=_.ownerDocument.defaultView??window,fe=()=>{const Re=_.getBoundingClientRect(),ge=pe.innerHeight||_.ownerDocument.documentElement.clientHeight,xe=ge+Re.height;if(xe<=0)return;const Ce=Math.min(1,Math.max(0,(ge-Re.top)/xe));le(jw(Ce,m,g))};fe(),pe.addEventListener("scroll",fe,{passive:!0,capture:!0}),pe.addEventListener("resize",fe);const we=new ResizeObserver(fe);return we.observe(_),()=>{pe.removeEventListener("scroll",fe,{capture:!0}),pe.removeEventListener("resize",fe),we.disconnect()}}const Q=g==="left"?-1:1;let be=null,Le=null;const ye=pe=>{if(Le!==null){const fe=(pe-Le)/1e3/ie*Q;$.current=ua($.current+fe)}Le=pe,le($.current),be=requestAnimationFrame(ye)},ce=()=>{be===null&&(Le=null,be=requestAnimationFrame(ye))},Y=()=>{be!==null&&cancelAnimationFrame(be),be=null},se=new IntersectionObserver(([pe])=>{pe!=null&&pe.isIntersecting?ce():Y()});return se.observe(_),()=>{Y(),se.disconnect()}},[j,N,O,H,ie,m,g]);const oe=j||N?$.current:0;return L.length===0?a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{className:`${o}-wrapper`,style:{width:W(l)}})]}):a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("div",{ref:r,className:`${o}-wrapper`,style:{width:W(l),height:W(q)},children:Array.from({length:X},(_,le)=>{const Q=le-C,Le=L[xp(Q,L.length)].image,ye=zl(Q,u),ce=O[le],Y=Bw(Q,u,d,D),se=x===0?0:(fd(ye+7.3)-.5)*x*D,pe=S?1:1+(fd(ye+3.1)-.5)*2*hp*(.35+x),fe=c*pe,we={"--helix-base-w":W(fe),...S?{"--helix-base-h":W(A)}:{}},Re={top:W(Y+se),...we,...hd(H,ua(ce+oe))},ge=b>0?{borderRadius:W(b)}:{},xe=S?{...ge,width:"100%",height:"100%",objectFit:"cover",objectPosition:"center"}:ge,Ce=Rw(Le)?a.jsx("video",{className:`${o}-media`,style:xe,src:Le.url,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):a.jsx("img",{className:`${o}-media`,style:xe,src:Le.url,alt:Le.name??"",loading:"lazy",decoding:"async"});return a.jsx("div",{ref:h=>{V.current[le]=h},className:S?`${o}-item ${o}-item-cover`:`${o}-item`,style:Re,children:S?a.jsx("div",{className:`${o}-cover`,style:ge,children:Ce}):Ce},`${p}-${u}-${Q}`)})})]})}const Gw=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
23470
23460
  import { CommonComponentProps } from '../props';
23471
23461
  import { scalingValue } from '../utils/scalingValue';
23472
23462
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -24026,7 +24016,7 @@ export function Helix({
24026
24016
  </>
24027
24017
  );
24028
24018
  }
24029
- `,Gw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],Xw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:Gw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},qw={element:jw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:Xw,sourceCode:Vw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},$n=300,nn=300,Uw=8/1440,go=.004,Kw=50,Yw=1440,ji=Kw/Yw;function Zw(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function Jw(e){return e==="center"||e==="right"?e:"left"}function Qw(e){return e==="left"||e==="right"?e:"center"}function e$(e,t,n){const i=F.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function t$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function bp(e,t){const n=(t$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function n$(e,t,n){switch(bp(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function i$(e,t){switch(bp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function o$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function r$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):o$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function yd(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Sp(e){const t=e.link;if(t&&typeof t=="object"){const i=yd(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=yd(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function qs(e,t){const n=e.label||"Link",i=Sp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=r$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const xi=24,vi=xi*.125,wp=xi*.125,$s=(xi-(3*vi+2*wp))/2,vd=vi+wp;function a$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${xi} ${xi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:$s,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:$s+vd,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:$s+2*vd,width:xi,height:vi,rx:vi/2})]})}function s$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function l$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:F.scalingValue((o-t)/2,i)}}const $p=.004;let er;function c$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function d$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=c$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function xd(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=d$(o);i(u=>Math.abs(u-d)<$p?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function bd(e){if(!(Math.abs(e)<$p))return`translateY(${e}em)`}function Sd(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function wd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function $d(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function Cd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...dn(Qt(i,n)),...l$(t.fontSize,t.lineHeight,e,n)},className:s$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Td(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Ld(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Cp(e){const n=Math.max(ji,e.fontSize??ji),{start:i,end:o}=Ld(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Ld(e.textPaddingLeft,e.textPaddingRight,1,ji);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function u$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function p$(e){return e.position?u$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function m$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const g$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Tp(e){var o,r;const t=e,n={};for(const[l,c]of g$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Pd(e){var o,r,l,c,d,u,p,y,v,m,g,x,b,k,f,S;e=Tp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const W=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;W!==void 0&&(n.openLinkColor=W)}if(e.compactIconColor===void 0){const W=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;W!==void 0&&(n.compactIconColor=W)}if(e.compactLinkColor===void 0){const W=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;W!==void 0&&(n.compactLinkColor=W)}if(e.compactLogoColor===void 0){const W=((m=(v=e.stateOverrides)==null?void 0:v.compact)==null?void 0:m.logoColor)??e.logoColor;W!==void 0&&(n.compactLogoColor=W)}if(e.openLogoColor===void 0){const W=((x=(g=e.stateOverrides)==null?void 0:g.open)==null?void 0:x.logoColor)??e.logoColor;W!==void 0&&(n.openLogoColor=W)}if(e.compactBackgroundColor===void 0){const W=((k=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:k.backgroundColor)??((S=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:S.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;W!==void 0&&(n.compactBackgroundColor=W)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(W,U)=>{if(e[W]!==void 0)return;const B=e[U];B!==void 0&&(n[W]=B)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function h$(e,t){const n=Cp({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function f$(e,t){return{paddingLeft:F.scalingValue(e.effectivePaddingLeft,t),paddingRight:F.scalingValue(e.effectivePaddingRight,t),paddingTop:F.scalingValue(e.effectivePaddingTop,t),paddingBottom:F.scalingValue(e.effectivePaddingBottom,t)}}function y$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,go),l=Math.max(t.effectivePaddingBottom,go),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,go),p=Math.max(t.effectivePaddingRight,go),y=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),v=Math.max(0,t.panelSize-t.effectivePaddingLeft-ji);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(v),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const v$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},x$=["hover","open"],b$={top:"flex-start",center:"center",bottom:"flex-end"},S$={left:"flex-start",center:"center",right:"flex-end"};function w$(e){return`
24019
+ `,Xw=["https://cdn.cntrl.site/component-assets/Helix-default-1.png","https://cdn.cntrl.site/component-assets/Helix-default-2.png","https://cdn.cntrl.site/component-assets/Helix-default-3.png","https://cdn.cntrl.site/component-assets/Helix-default-4.png","https://cdn.cntrl.site/component-assets/Helix-default-5.png"],qw={type:"object",version:1,content:{type:"array",settings:{addItemFromFileExplorer:!0,deleteImageDeletesEntry:!0,allowsVideo:!0},display:{type:"array"},items:{type:"object",properties:{image:{type:"object",label:"Image",display:{isObjectFitEditable:!1,type:"media-input"},properties:{url:{type:"string"},name:{type:"string"},type:{type:"string",enum:["image","video"]}}}}},default:Xw.map(e=>({image:{url:e,name:""}}))},settings:{sizing:"auto auto",properties:{width:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},imageWidth:{type:"number",scope:"layout",title:"Img width",display:{type:"numeric-input"},min:0,max:9999},turnHeight:{type:"number",scope:"layout",title:"Turn height",display:{type:"numeric-input"},min:0,max:9999},itemsPerTurn:{type:"number",scope:"common",title:"Per turn",display:{type:"common-numeric-input"},min:3,max:40},turns:{type:"number",scope:"common",title:"Turns",display:{type:"common-numeric-input"},min:1,max:30},speed:{type:"number",scope:"layout",title:"Speed",display:{type:"speed-control"},min:0,max:7},direction:{type:"string",scope:"common",title:"Direction",display:{type:"direction-control"},enum:["left","right"]},playback:{type:"string",scope:"common",title:"Playback",display:{type:"toggle-cycle",enum:["autoplay","scroll"]}},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"}}},cornerRadius:{type:"number",scope:"layout",title:"Corner radius",display:{type:"numeric-input"},min:0,max:9999},blur:{type:"string",scope:"common",title:"Blur",display:{type:"toggle-cycle",enum:["on","off"]}}},defaults:{itemsPerTurn:14,turns:3,direction:"right",playback:"autoplay",blur:"off",imageDisplay:{display:"cover",ratioValue:"2:3",reversed:!1}},layoutDefaults:{d:{defaultPaddingTop:30/1440,width:800/1440,imageWidth:160/1440,turnHeight:380/1440,speed:2.2,cornerRadius:0},m:{defaultPaddingTop:10/375,width:320/375,imageWidth:75/375,turnHeight:310/375,speed:2.8,cornerRadius:0},t:{defaultPaddingTop:20/768,width:620/768,imageWidth:100/768,turnHeight:280/768,speed:2.8,cornerRadius:0}},layout:["__componentName__","width","imageWidth","turnHeight","itemsPerTurn","turns","playback","speed","direction","imageDisplay","cornerRadius","blur"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__",{type:"row",items:["direction","speed"]},{type:"row",items:["width"]},{type:"row",items:["imageWidth","turnHeight"]},{type:"row",items:["cornerRadius","imageDisplay"]},{type:"row",items:["itemsPerTurn","turns"]},{type:"row",items:["playback","blur"]}]}]},Uw={element:Vw,id:"helix",name:"Helix",category:"lists",layoutMode:"structured",preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Helix.mp4"},version:1,defaultSize:{d:{width:720,height:540}},schema:qw,sourceCode:Gw,assetsPaths:{content:[{path:"image.url",placeholderEnabled:!0}],parameters:[]},fontSettingsPaths:{content:[],parameters:[]}},$n=300,nn=300,Kw=8/1440,mo=.004,Yw=50,Zw=1440,ji=Yw/Zw;function Jw(e){if(e==="default"||e==="compact"||e==="open")return e;if(e==="onScroll")return"compact"}function Qw(e){return e==="center"||e==="right"?e:"left"}function e$(e){return e==="left"||e==="right"?e:"center"}function t$(e,t,n){const i=R.scalingValue(t,n);return e==="center"?`translateX(calc(-50% + ${i}))`:`translateX(${i})`}function n$(e,t){if(e&&typeof e=="object"){if(t&&typeof e[t]=="string")return e[t];for(const n in e)if(typeof e[n]=="string")return e[n];return}return e}function bp(e,t){const n=(n$(e,t)??"always").trim().toLowerCase().replace(/[_-]+/g," ");return n==="open only"||n==="openonly"?"open only":n==="open and compact"||n==="openandcompact"?"open and compact":n==="default and open"||n==="defaultandopen"?"default and open":n==="default and compact"||n==="defaultandcompact"?"default and compact":"always"}function i$(e,t,n){switch(bp(e.showIn,n)){case"open only":return!1;case"open and compact":return t==="compact";case"default and compact":return!0;case"default and open":return t==="default";default:return!0}}function o$(e,t){switch(bp(e.showIn,t)){case"default and compact":return!1;default:return!0}}function r$(e){return(e==null?void 0:e.find(t=>t.slug===""))??(e==null?void 0:e[0])}function a$(e,t){const n=e?t==null?void 0:t.find(i=>i.id===e):r$(t);return!e&&!n?"":n?n.slug===""?"/":`/${n.slug}`:e.startsWith("/")||e.startsWith("#")||/^[a-z][a-z\d+\-.]*:/i.test(e)?e:t?`/${e}`:e}function yd(e){const t=(e??"").toLowerCase();return t==="blank"||t==="_blank"||t.includes("new")}function Sp(e){const t=e.link;if(t&&typeof t=="object"){const i=yd(t.target)?"_blank":void 0;if(t.type==="url")return{type:"url",value:t.value??t.url??"",target:i};if(t.type==="anchor")return{type:"anchor",value:t.value??"",target:i};if(t.type==="page")return{type:"page",value:t.value??"",target:i,anchor:t.anchor};if(typeof t.url=="string")return{type:"url",value:t.url,target:i}}const n=yd(e.openIn)?"_blank":void 0;return e.mode==="url"?{type:"url",value:e.url??"",target:n}:{type:"page",value:e.page??"",target:n,anchor:e.anchor}}function qs(e,t){const n=e.label||"Link",i=Sp(e);if(i.type==="url")return{label:n,href:i.value,target:i.target};if(i.type==="anchor"){const c=i.value.replace(/^#/,"");return{label:n,href:c?`#${c}`:"",target:i.target}}const o=a$(i.value,t),r=(i.anchor??"").replace(/^#/,""),l=r?o?`${o}#${r}`:`#${r}`:o;return{label:n,href:l,target:i.target}}const xi=24,vi=xi*.125,wp=xi*.125,$s=(xi-(3*vi+2*wp))/2,vd=vi+wp;function s$({className:e,lineClassName:t}){return a.jsxs("svg",{className:e,viewBox:`0 0 ${xi} ${xi}`,"aria-hidden":"true",children:[a.jsx("rect",{className:`${t} ${t}-top`,x:"0",y:$s,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-mid`,x:"0",y:$s+vd,width:xi,height:vi,rx:vi/2}),a.jsx("rect",{className:`${t} ${t}-bot`,x:"0",y:$s+2*vd,width:xi,height:vi,rx:vi/2})]})}function l$(e,t,n,i){return t!==void 0&&t<(e??.01)?`${n} ${i}`:n}function c$(e,t,n,i){const o=e??.01;return t===void 0||t>=o?{}:{[`--${n}-text-leading-gap`]:R.scalingValue((o-t)/2,i)}}const $p=.004;let er;function d$(){return er!==void 0?er:typeof document>"u"?(er=null,null):(er=document.createElement("canvas").getContext("2d"),er)}function u$(e){const t=getComputedStyle(e),n=parseFloat(t.fontSize)||0;if(n<=0)return 0;const i=d$();if(!i)return 0;i.font=`${t.fontStyle} ${t.fontWeight} ${n}px ${t.fontFamily}`;const o=i.measureText("H"),r=o.actualBoundingBoxAscent>0?o.actualBoundingBoxAscent:0,l=Math.max(0,o.actualBoundingBoxDescent||0),c=o.fontBoundingBoxAscent||0,d=o.fontBoundingBoxDescent||0;return r<=0||c<=0&&d<=0?0:(d-l-(c-r))/2/n}function xd(e,t){const[n,i]=s.useState(0);return s.useLayoutEffect(()=>{const o=e.current;if(!o)return;const r=()=>{const d=u$(o);i(u=>Math.abs(u-d)<$p?u:d)};r();const l=document.fonts;l.ready.then(r).catch(()=>{}),l.addEventListener("loadingdone",r);const c=new ResizeObserver(r);return c.observe(o),()=>{l.removeEventListener("loadingdone",r),c.disconnect()}},[e,t]),n}function bd(e){if(!(Math.abs(e)<$p))return`translateY(${e}em)`}function Sd(e){var t,n;return[e.fontFamily??"",((t=e.fontSettings)==null?void 0:t.fontWeight)??400,((n=e.fontSettings)==null?void 0:n.fontStyle)??"normal",e.fontSize??"",e.lineHeight??""].join("\0")}function wd(e){return{fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontSize:e.fontSize,lineHeight:e.lineHeight,position:"absolute",top:0,left:0,visibility:"hidden",pointerEvents:"none",whiteSpace:"nowrap"}}function $d(e,t={}){return{fontFamily:e.fontFamily??t.fontFamily,fontSettings:e.fontSettings??t.fontSettings,fontSize:e.fontSize??t.fontSize,lineHeight:e.lineHeight??t.lineHeight,letterSpacing:e.letterSpacing??t.letterSpacing??0,wordSpacing:e.wordSpacing??t.wordSpacing??0,textAlign:e.textAlign??t.textAlign??"left",textAppearance:e.textAppearance??t.textAppearance}}function Cd(e,t,n){var o,r;const i={fontSettings:{fontFamily:t.fontFamily,fontWeight:((o=t.fontSettings)==null?void 0:o.fontWeight)??400,fontStyle:((r=t.fontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.fontSize??.01,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing??0,wordSpacing:t.wordSpacing??0,textAlign:t.textAlign,textAppearance:t.textAppearance,color:""};return{css:{...dn(Qt(i,n)),...c$(t.fontSize,t.lineHeight,e,n)},className:l$(t.fontSize,t.lineHeight,`${e}-link-text`,`${e}-text-tight-leading`)}}function Td(e){const t=e.split(/\r?\n/);return t.length===1?e:t.map((n,i)=>a.jsxs(s.Fragment,{children:[n,i<t.length-1?a.jsx("br",{}):null]},i))}function Ld(e,t,n,i){const o=Math.max(0,n-i),r=e+t;if(r<=o||r<=0)return{start:e,end:t};const l=o/r;return{start:e*l,end:t*l}}function Cp(e){const n=Math.max(ji,e.fontSize??ji),{start:i,end:o}=Ld(e.textPaddingTop,e.textPaddingBottom,1,n),{start:r,end:l}=Ld(e.textPaddingLeft,e.textPaddingRight,1,ji);return{effectivePaddingLeft:r,effectivePaddingRight:l,effectivePaddingTop:i,effectivePaddingBottom:o,panelSize:1}}function p$(e){if(e==="center"||e==="center-center")return{horizontalAlign:"center",verticalAlign:"center"};const[t,n]=e.split("-");return{horizontalAlign:t,verticalAlign:n}}function m$(e){return e.position?p$(e.position):{horizontalAlign:e.horizontalAlign??"left",verticalAlign:e.verticalAlign??"top"}}function g$(e,t){return e.textPaddingLeft!==t.textPaddingLeft||e.textPaddingRight!==t.textPaddingRight||e.textPaddingTop!==t.textPaddingTop||e.textPaddingBottom!==t.textPaddingBottom}const h$=[["onScrollIconColor","compactIconColor"],["onScrollLinkColor","compactLinkColor"],["onScrollLogoColor","compactLogoColor"],["onScrollBackgroundColor","compactBackgroundColor"],["onScrollPanelColor","compactBackgroundColor"],["onScrollLogoMaxWidth","compactLogoMaxWidth"],["onScrollLogoMaxHeight","compactLogoMaxHeight"],["onScrollLogoPosition","compactLogoPosition"],["onScrollPanelHeight","compactPanelHeight"],["onScrollIconSize","compactIconSize"],["onScrollNavTextWidth","compactNavTextWidth"],["onScrollNavGap","compactNavGap"],["onScrollNavPaddingLeft","compactNavPaddingLeft"],["onScrollNavPaddingRight","compactNavPaddingRight"],["onScrollFontFamily","compactFontFamily"],["onScrollFontSettings","compactFontSettings"],["onScrollFontSize","compactFontSize"],["onScrollLineHeight","compactLineHeight"],["onScrollLetterSpacing","compactLetterSpacing"],["onScrollWordSpacing","compactWordSpacing"],["onScrollTextAlign","compactTextAlign"],["onScrollTextAppearance","compactTextAppearance"]];function Tp(e){var o,r;const t=e,n={};for(const[l,c]of h$)e[c]!==void 0||t[l]===void 0||(n[c]=t[l]);const i=t.stateOverrides;return i&&(i.onScroll!==void 0||i["onScroll-hover"]!==void 0)&&(n.stateOverrides={...e.stateOverrides},i.onScroll!==void 0&&((o=e.stateOverrides)==null?void 0:o.compact)===void 0&&(n.stateOverrides.compact=i.onScroll),i["onScroll-hover"]!==void 0&&((r=e.stateOverrides)==null?void 0:r["compact-hover"])===void 0&&(n.stateOverrides["compact-hover"]=i["onScroll-hover"])),Object.keys(n).length===0?e:{...e,...n}}function Pd(e){var o,r,l,c,d,u,p,y,x,m,g,v,b,M,f,S;e=Tp(e);const t=e,n={};if(e.backgroundColor===void 0&&t.panelColor!==void 0&&(n.backgroundColor=t.panelColor),e.openFontFamily===void 0&&e.fontFamily!==void 0&&(n.openFontFamily=e.fontFamily),e.openFontSettings===void 0&&e.fontSettings!==void 0&&(n.openFontSettings=e.fontSettings),e.openFontSize===void 0&&e.fontSize!==void 0&&(n.openFontSize=e.fontSize),e.openLineHeight===void 0&&e.lineHeight!==void 0&&(n.openLineHeight=e.lineHeight),e.openLetterSpacing===void 0&&e.letterSpacing!==void 0&&(n.openLetterSpacing=e.letterSpacing),e.openWordSpacing===void 0&&e.wordSpacing!==void 0&&(n.openWordSpacing=e.wordSpacing),e.openTextAlign===void 0&&e.textAlign!==void 0&&(n.openTextAlign=e.textAlign),e.openTextAppearance===void 0&&e.textAppearance!==void 0&&(n.openTextAppearance=e.textAppearance),e.openLinkColor===void 0){const W=((r=(o=e.stateOverrides)==null?void 0:o.open)==null?void 0:r.openLinkColor)??((c=(l=e.stateOverrides)==null?void 0:l.open)==null?void 0:c.linkColor)??e.linkColor;W!==void 0&&(n.openLinkColor=W)}if(e.compactIconColor===void 0){const W=((u=(d=e.stateOverrides)==null?void 0:d.compact)==null?void 0:u.iconColor)??e.iconColor;W!==void 0&&(n.compactIconColor=W)}if(e.compactLinkColor===void 0){const W=((y=(p=e.stateOverrides)==null?void 0:p.compact)==null?void 0:y.linkColor)??e.linkColor;W!==void 0&&(n.compactLinkColor=W)}if(e.compactLogoColor===void 0){const W=((m=(x=e.stateOverrides)==null?void 0:x.compact)==null?void 0:m.logoColor)??e.logoColor;W!==void 0&&(n.compactLogoColor=W)}if(e.openLogoColor===void 0){const W=((v=(g=e.stateOverrides)==null?void 0:g.open)==null?void 0:v.logoColor)??e.logoColor;W!==void 0&&(n.openLogoColor=W)}if(e.compactBackgroundColor===void 0){const W=((M=(b=e.stateOverrides)==null?void 0:b.compact)==null?void 0:M.backgroundColor)??((S=(f=t.stateOverrides)==null?void 0:f.compact)==null?void 0:S.panelColor)??t.compactPanelColor??t.onScrollPanelColor??e.backgroundColor??n.backgroundColor;W!==void 0&&(n.compactBackgroundColor=W)}e.logoMaxHeight===void 0&&e.logoMaxWidth!==void 0&&(n.logoMaxHeight=e.logoMaxWidth),e.compactLogoMaxHeight===void 0&&e.compactLogoMaxWidth!==void 0&&(n.compactLogoMaxHeight=e.compactLogoMaxWidth);const i=(W,U)=>{if(e[W]!==void 0)return;const B=e[U];B!==void 0&&(n[W]=B)};return i("compactLogoMaxHeight","logoMaxHeight"),i("compactLogoPosition","logoPosition"),i("compactPanelHeight","panelHeight"),i("compactShowIcon","showIcon"),i("compactIconSize","iconSize"),i("compactNavTextWidth","navTextWidth"),i("compactNavTextPosition","navTextPosition"),i("compactNavTextOffset","navTextOffset"),i("compactNavGap","navGap"),i("compactNavPaddingLeft","navPaddingLeft"),i("compactNavPaddingRight","navPaddingRight"),i("compactFontFamily","fontFamily"),i("compactFontSettings","fontSettings"),i("compactFontSize","fontSize"),i("compactLineHeight","lineHeight"),i("compactLetterSpacing","letterSpacing"),i("compactWordSpacing","wordSpacing"),i("compactTextAlign","textAlign"),i("compactTextAppearance","textAppearance"),Object.keys(n).length===0?e:{...e,...n}}function f$(e,t){const n=Cp({textPaddingLeft:e.textPaddingLeft??0,textPaddingRight:e.textPaddingRight??0,textPaddingTop:e.textPaddingTop??0,textPaddingBottom:e.textPaddingBottom??0,fontSize:e.openFontSize??e.fontSize??t.openFontSize??t.fontSize}),i={};return(e.textPaddingLeft??0)!==n.effectivePaddingLeft&&(i.textPaddingLeft=n.effectivePaddingLeft),(e.textPaddingRight??0)!==n.effectivePaddingRight&&(i.textPaddingRight=n.effectivePaddingRight),(e.textPaddingTop??0)!==n.effectivePaddingTop&&(i.textPaddingTop=n.effectivePaddingTop),(e.textPaddingBottom??0)!==n.effectivePaddingBottom&&(i.textPaddingBottom=n.effectivePaddingBottom),Object.keys(i).length===0?e:{...e,...i}}function y$(e,t){return{paddingLeft:R.scalingValue(e.effectivePaddingLeft,t),paddingRight:R.scalingValue(e.effectivePaddingRight,t),paddingTop:R.scalingValue(e.effectivePaddingTop,t),paddingBottom:R.scalingValue(e.effectivePaddingBottom,t)}}function v$(e,t,n,i){const o=Math.max(ji,n??ji),r=Math.max(t.effectivePaddingTop,mo),l=Math.max(t.effectivePaddingBottom,mo),c=Math.max(0,t.panelSize-t.effectivePaddingBottom-o),d=Math.max(0,t.panelSize-t.effectivePaddingTop-o),u=Math.max(t.effectivePaddingLeft,mo),p=Math.max(t.effectivePaddingRight,mo),y=Math.max(0,t.panelSize-t.effectivePaddingRight-ji),x=Math.max(0,t.panelSize-t.effectivePaddingLeft-ji);return a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-controls":"textPaddingTop","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-max-fraction":String(c),className:`${e}-control-anchor`,style:{top:0,left:0,width:"100%",height:i(r)}}),a.jsx("div",{"data-controls":"textPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(d),className:`${e}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:i(l)}}),a.jsx("div",{"data-controls":"textPaddingLeft","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(y),className:`${e}-control-anchor`,style:{top:0,left:0,width:i(u),height:"100%"}}),a.jsx("div",{"data-controls":"textPaddingRight","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(x),className:`${e}-control-anchor`,style:{top:0,right:0,width:i(p),height:"100%"}})]})}const x$={iconColor:"icon-color",closeButtonColor:"close-button-color",linkColor:"link-color",openLinkColor:"menu-link-color",compactIconColor:"compact-icon-color",compactLinkColor:"compact-link-color",compactLogoColor:"compact-logo-color",compactBackgroundColor:"compact-background-color",openLogoColor:"open-logo-color",menuBackgroundColor:"menu-background-color",overlayColor:"overlay-color",backgroundColor:"background-color",logoColor:"logo-color"},b$=["hover","open"],S$={top:"flex-start",center:"center",bottom:"flex-end"},w$={left:"flex-start",center:"center",right:"flex-end"};function $$(e){return`
24030
24020
  .${e}-root {
24031
24021
  position: relative;
24032
24022
  display: block;
@@ -24686,7 +24676,7 @@ export function Helix({
24686
24676
  word-spacing ${nn}ms ease,
24687
24677
  padding ${nn}ms ease;
24688
24678
  }
24689
- `}function $$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function C$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function T$(e){const t=C$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function L$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function P$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Lp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function Id(e){const t=Lp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function I$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(v=>v()),u=e.currentTarget.getAttribute("href")??"",p=L$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const v=qs(r,l),m=Sp(r),g={mode:m.type==="url"?"url":"page",href:v.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:v.target};g.target==="_blank"?c(g):d(()=>c(g)),t();return}if(i){e.preventDefault(),d(()=>Id(p)),t();return}!y&&p&&P$(u)&&Lp(p)&&(e.preventDefault(),d(()=>Id(p))),t()}const R$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function k$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function E$(e){const t={},n=k$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of R$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Rd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function M$({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:v}){const{prefix:m}=F.useScopedStyles(),g=s.useRef(null),x=s.useRef(null),b=s.useRef(null),k=s.useRef(null),f=s.useRef(null),S=s.useRef(0),W=s.useRef(null),U=s.useRef(null),B=s.useRef(d),P=s.useMemo(()=>w$(m),[m]),[_,G]=s.useState(!1),[$,L]=s.useState(!1),[D,E]=s.useState(!1),T=Zw(r),C=s.useMemo(()=>new Set(c),[c]),V=It=>!!(It&&C.has(It)),q=!!(t&&!i&&T==="open"&&!V("open"))||!(t&&!i)&&_,I=!!(t&&!i),A=q&&!I;Wl(A),s.useEffect(()=>{if(!q||!I)return;const It=document.documentElement,Xt=It.style.overflow;return It.style.overflow="hidden",()=>{It.style.overflow=Xt}},[q,I]);const j=!V("compact")&&!V("onScroll"),ie=!t||!!i&&!n,ae=o&&o!=="default"?o:void 0,O=j&&T==="compact"?"compact":"default",[oe,N]=s.useState(O),[le,Q]=s.useState(!1),be=!n;O!==oe&&(N(O),be&&Q(!0));const Pe=Tp(e),{logo:ye,logoMaxHeight:ce=120/1440,logoPosition:Y="left",panelHeight:se=60/1440,backgroundColor:pe="#b3b3b3",logoColor:fe="#000000",position:we,horizontalAlign:Re,verticalAlign:ge,iconColor:xe="#000000",showIcon:Ce="on",iconSize:h=16/1440,linkColor:K="#000000",openLinkColor:Z="#000000",compactIconColor:ne="#000000",compactLinkColor:de="#000000",compactLogoColor:z="#000000",compactBackgroundColor:R="#ffffff",compactLogoMaxHeight:ee=120/1440,compactLogoPosition:te,compactPanelHeight:me=60/1440,compactShowIcon:X="on",compactIconSize:Ie=16/1440,compactNavTextWidth:Se,compactNavTextPosition:J,compactNavTextOffset:He,compactNavGap:We,compactNavPaddingLeft:ot=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:tt,compactFontSettings:et,compactFontSize:Ge,compactLineHeight:ve,compactLetterSpacing:_e=0,compactWordSpacing:Be=0,compactTextAlign:Ze="left",compactTextAppearance:$e,openLogoColor:Ne="#000000",menuBackgroundColor:Ue="#ffffff",overlayColor:Je="rgba(0, 0, 0, 0.45)",closeButtonColor:st="#000000",effect:it="fade",openPanelSize:Oe=100,textWidth:Ae=280/1440,navTextWidth:gt,navTextPosition:ze="center",navTextOffset:De=0,gap:Xe=0,navGap:ct,navPaddingLeft:he=10/1440,navPaddingRight:Ee=10/1440,textPaddingLeft:nt=10/1440,textPaddingRight:pt=10/1440,textPaddingTop:Ve=10/1440,textPaddingBottom:vt=10/1440,fontFamily:Rt,fontSettings:At,fontSize:wt,lineHeight:Vt,letterSpacing:jt=0,wordSpacing:Kt=0,textAlign:Yt="left",textAppearance:kt,openFontFamily:Bt,openFontSettings:rn,openFontSize:xt,openLineHeight:yt,openLetterSpacing:Me,openWordSpacing:Qe,openTextAlign:rt,openTextAppearance:dt,stateOverrides:Pt,link:St}=Pe,{horizontalAlign:ht,verticalAlign:Wt}=p$({position:we,horizontalAlign:Re,verticalAlign:ge}),Tt=O==="compact",Ot=Tt?ee:ce,Gt=Jw(Tt?te:Y),Mt=Tt?me:se,_t=Tt?Ie:h,Ft=Tt?Se:gt,ut=Qw(Tt?J:ze),H=(Tt?He:De)??0,Le=Tt?We:ct,je=Tt?ot:he,Fe=Tt?qe:Ee,ft=Ft??Ae,Ht=q||(Tt?X:Ce)!=="off",mt=F.buildColorVars(m,{iconColor:xe,closeButtonColor:st,linkColor:K,openLinkColor:Z,compactIconColor:ne,compactLinkColor:de,compactLogoColor:z,compactBackgroundColor:R,openLogoColor:Ne,menuBackgroundColor:Ue,overlayColor:Je,backgroundColor:pe,logoColor:fe},v$,x$,Pt),Lt=$d(Tt?{fontFamily:tt,fontSettings:et,fontSize:Ge,lineHeight:ve,letterSpacing:_e,wordSpacing:Be,textAlign:Ze,textAppearance:$e}:{fontFamily:Rt,fontSettings:At,fontSize:wt,lineHeight:Vt,letterSpacing:jt,wordSpacing:Kt,textAlign:Yt,textAppearance:kt}),Ut=$d({fontFamily:Bt,fontSettings:rn,fontSize:xt,lineHeight:yt,letterSpacing:Me,wordSpacing:Qe,textAlign:rt,textAppearance:dt},Lt),Dt=Cd(m,Lt,t),an=Cd(m,Ut,t),ln=xd(b,Sd(Lt)),qn=xd(k,Sd(Ut)),Un={...an.css,whiteSpace:"pre-wrap",transform:bd(qn)},Zi=an.className,hn=It=>F.scalingValue(It,t),Vo=Le??Xe,Go=Math.max(je,go),xn=Math.max(Fe,go),li=Math.max(0,1-_t),Ji=Math.max(0,1-_t),bn=n??!1,Kn=bn&&!q,Qi=s.useMemo(()=>Cp({textPaddingLeft:nt,textPaddingRight:pt,textPaddingTop:Ve,textPaddingBottom:vt,fontSize:Ut.fontSize}),[nt,pt,Ve,vt,Ut.fontSize]),eo=It=>{const Xt=a.jsx("span",{className:Zi,style:Un,children:Td(It)});return Rd(m,Xt,Ae,bn,hn)},Ye=it==="left"||it==="right"?{width:`${Oe}%`}:{height:`${Oe}%`},M={...f$(Qi,t),...Ye,alignItems:S$[ht],justifyContent:b$[Wt]},re=s.useRef(e),ue=s.useRef(d);s.useEffect(()=>{if(!y||!t){re.current=e,ue.current=d;return}if(ue.current!==d){re.current=e,ue.current=d;const Mi=Pd(e);Mi!==e&&y(Mi);return}const It=Pd(e),Xt=re.current,un=Xt!==e,fn=un?h$(It,Xt):It;re.current=e;const kn=It!==e,Nn=un&&m$(It,fn);!kn&&!Nn||y(fn)},[e,y,t,d]);const ke=F.scalingValue(_t,t),Ke={width:ke,height:ke,minWidth:ke,minHeight:ke,maxWidth:ke,maxHeight:ke},lt={...Dt.css,textDecoration:"none",transform:bd(ln)},Et=Dt.className,zt=(ye==null?void 0:ye.mode)!=="Off",en=(ye==null?void 0:ye.icon)??"",tn=T$(en),ci=hn(Math.min(Ot,Mt)),di=!!(zt&&en&&Gt==="right")?"left":"right",Xo=Array.isArray(St)?St:[],qo=[O!=="default"?`${m}-state-${O}`:"",q||T==="open"?`${m}-state-open`:"",ae&&ae!==O&&ae!==T?`${m}-state-${ae}`:""].filter(Boolean).join(" "),za=t&&!i?`${m}-editor`:"",Gl=ie?`${m}-interactive`:"",Hp=be&&(O!==oe||le)?`${m}-nav-state-anim`:"",Wp=q?`${m}-open`:"",Op=s.useMemo(()=>E$(g.current),[$,q,d]),Ba=()=>{G(!1)},ja=!t||i,Dp=It=>{if(A){U.current=It;return}It()};s.useEffect(()=>{if(q)return;const It=U.current;U.current=null,It==null||It()},[q]);const Xl=(It,Xt)=>{I$(It,Ba,{isEditor:t,isPreviewMode:i,item:Xt,pages:u,onLinkNavigate:p,runAfterClose:Dp})},zp=()=>{t&&!i||G(It=>!It)},Bp=It=>{It.pointerType==="touch"&&It.currentTarget.blur()},Er=()=>{W.current!==null&&(window.clearTimeout(W.current),W.current=null)};s.useEffect(()=>{if(!le)return;const It=window.setTimeout(()=>{Q(!1)},nn);return()=>window.clearTimeout(It)},[le,O]),s.useEffect(()=>{if(q){Er(),L(!0);return}return S.current+=1,E(!1),Er(),W.current=window.setTimeout(()=>{W.current=null,L(!1)},$n),Er},[q]),s.useLayoutEffect(()=>{B.current!==d&&(B.current=d,S.current+=1,Er(),G(!1),E(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var un;if(!$||!q)return;const It=S.current+1;S.current=It,E(!1),(un=x.current)==null||un.offsetHeight;const Xt=requestAnimationFrame(()=>{S.current===It&&E(!0)});return()=>{cancelAnimationFrame(Xt)}},[$,q]),s.useLayoutEffect(()=>{if(!A||!$)return;const It=f.current;if(!It)return;const Xt=getComputedStyle(It).backgroundColor;if(!Xt)return;const un=document.documentElement,{body:fn}=document,kn=un.style.backgroundColor,Nn=fn.style.backgroundColor;return un.style.backgroundColor=Xt,fn.style.backgroundColor=Xt,()=>{un.style.backgroundColor=kn,fn.style.backgroundColor=Nn}},[A,$,qo,Ue,Pt]),s.useEffect(()=>{v==null||v(q)},[q,v]),s.useEffect(()=>{if(!q)return;const It=Xt=>{Xt.key==="Escape"&&(t&&i||Ba())};return window.addEventListener("keydown",It),()=>window.removeEventListener("keydown",It)},[q,t,i]),s.useEffect(()=>{t&&!i&&T!=="open"&&G(!1)},[t,i,T]),s.useEffect(()=>{i&&G(!1)},[i]);const ql=bn&&q,jp=It=>Xo.filter(Xt=>i$(Xt,d)).map((Xt,un)=>{const{label:fn,href:kn,target:Nn}=qs(Xt,u),Mi=kn?a.jsx("a",{href:kn,target:Nn,rel:Nn==="_blank"?"noopener noreferrer":void 0,className:`${It} ${m}-has-href`,onClick:Va=>Xl(Va,Xt),children:eo(fn)}):a.jsx("span",{className:It,children:eo(fn)});return a.jsxs(s.Fragment,{children:[un>0&&a.jsx("div",{"data-controls":ql?"gap":void 0,"data-controls-axis":"y",className:ql?`${m}-gap-control`:void 0,style:{height:hn(Xe)}}),Mi]},un)}),Vp=$?a.jsxs("div",{ref:x,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${it}`,D?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Gl,qo].filter(Boolean).join(" "),style:{...mt,...Op},"aria-hidden":!D,children:[a.jsx("div",{className:[`${m}-backdrop`,ja?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:ja?Ba:void 0}),a.jsxs("nav",{className:[`${m}-panel`,ja?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:M,"aria-label":"Menu","data-lightbox-scrollable":"",children:[bn&&y$(m,Qi,Ut.fontSize,hn),jp(`${m}-link`)]}),A?a.jsx("div",{ref:f,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,Gp=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:zp,onPointerUp:Bp,"aria-expanded":q,"aria-label":q?"Close menu":"Open menu",children:a.jsx(a$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Mr=It=>{const Xt=It==="left",un=Xt?je:Fe,fn=Xt?Go:xn,kn=Xt?li:Ji,Nn=Tt?Xt?"compactNavPaddingLeft":"compactNavPaddingRight":Xt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Xt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:hn(un),flexShrink:0},children:Kn?a.jsx("div",{"data-controls":Nn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Xt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(kn),className:`${m}-control-anchor`,style:{top:0,[Xt?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},Xp=(It,Xt)=>{const{label:un,href:fn,target:kn}=qs(It,u),Nn=a.jsx("span",{className:Et,style:lt,children:Td(un)}),Mi=Rd(m,Nn,ft,Kn,hn),Va=fn?a.jsx("a",{href:fn,target:kn,rel:kn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Kp=>Xl(Kp,It),children:Mi}):a.jsx("span",{className:`${m}-nav-link`,children:Mi});return a.jsxs(s.Fragment,{children:[Xt>0&&a.jsx("div",{"data-controls":Kn?Tt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Kn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:hn(Vo),flexShrink:0}}),Va]},Xt)},qp={...mt,height:F.scalingValue(Mt,t),minHeight:F.scalingValue(Mt,t),[`--${m}-panel-height`]:F.scalingValue(Mt,t)},Up=l&&O==="default"&&T!=="open"&&!i?hn(se+Uw):"0px";return a.jsxs("div",{ref:g,className:`${m}-root ${qo} ${za} ${Gl} ${Hp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:Up,...mt},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("span",{ref:b,"aria-hidden":!0,style:wd(Dt.css),children:"H"}),a.jsx("span",{ref:k,"aria-hidden":!0,style:wd(an.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:qp,children:[zt&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Gt}`,children:[Gt==="left"?Mr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${tn?` ${m}-nav-logo-tinted`:""}`,style:{height:ci,...tn?{[`--${m}-logo-image`]:$$(en)}:{}},children:[a.jsx("img",{src:en,alt:"",className:`${m}-nav-logo-img`}),tn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Gt==="right"?Mr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${ut}`,style:{transform:e$(ut,H,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Xo.filter(It=>n$(It,O,d)).map((It,Xt)=>Xp(It,Xt))})})]})}),Vp,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${di}`,children:[di==="left"?Mr("left"):null,Ht?a.jsx("div",{className:`${m}-root ${Wp}`.trim(),style:Ke,children:Gp()}):null,di==="right"?Mr("right"):null]})]})}const A$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
24679
+ `}function C$(e){return`url("${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}")`}function T$(e){const t=e.trim().toLowerCase();return t.startsWith("data:image/svg+xml")||t.includes("image/svg+xml")?!0:t.includes(".svg")}function L$(e){const t=T$(e),[n,i]=s.useState(!1);return s.useEffect(()=>{if(t||!e.startsWith("blob:")){i(!1);return}let o=!1;return fetch(e).then(r=>r.blob()).then(async r=>{if(o)return;if(r.type.includes("svg")){i(!0);return}if(r.type.startsWith("image/")&&!r.type.includes("svg")){i(!1);return}const l=await r.text();o||i(/<svg[\s>]/i.test(l.trim()))}).catch(()=>{o||i(!1)}),()=>{o=!0}},[t,e]),t||n}function P$(e){const t=e.indexOf("#");if(t===-1)return"";try{return decodeURIComponent(e.slice(t+1))}catch{return e.slice(t+1)}}function I$(e){if(!e||e.startsWith("#"))return!0;try{return new URL(e,window.location.href).pathname===window.location.pathname}catch{return!1}}function Lp(e){if(!e)return null;const t=document.getElementById(e),n=document.querySelector(`[data-section-id="${CSS.escape(e)}"]`),i=t??n;return i instanceof HTMLElement?i:null}function Id(e){const t=Lp(e);return t?(t.scrollIntoView({behavior:"smooth",block:"start"}),!0):!1}function R$(e,t,n={}){const{isEditor:i,isPreviewMode:o,item:r,pages:l,onLinkNavigate:c}=n,d=n.runAfterClose??(x=>x()),u=e.currentTarget.getAttribute("href")??"",p=P$(u),y=e.currentTarget.target==="_blank";if(r&&c){e.preventDefault(),e.stopPropagation();const x=qs(r,l),m=Sp(r),g={mode:m.type==="url"?"url":"page",href:x.href||u,page:m.type==="page"?m.value:void 0,url:m.type==="url"?m.value:void 0,anchor:m.type==="anchor"?m.value.replace(/^#/,""):(m.anchor??"").replace(/^#/,""),target:x.target};g.target==="_blank"?c(g):d(()=>c(g)),t();return}if(i){e.preventDefault(),d(()=>Id(p)),t();return}!y&&p&&I$(u)&&Lp(p)&&(e.preventDefault(),d(()=>Id(p))),t()}const k$=["--cntrl-article-width","--cntrl-article-top","--cntrl-article-left","--cntrl-viewport-height"];function E$(e){let t=e;for(;t;){if(getComputedStyle(t).getPropertyValue("--cntrl-article-width").trim())return t;t=t.parentElement}return e}function M$(e){const t={},n=E$(e);if(!n)return t;const i=getComputedStyle(n);for(const o of k$){const r=i.getPropertyValue(o).trim();r&&(t[o]=r)}return t}function Rd(e,t,n,i,o){return a.jsx("span",{className:`${e}-link-text-box`,style:{width:o(n),maxWidth:"100%"},children:a.jsx("span",{className:i?`${e}-link-text-inner`:`${e}-link-text-inner-hidden`,style:{width:"100%"},children:t})})}function A$({settings:e,isEditor:t,isEditMode:n,isPreviewMode:i,activeEvent:o,currentState:r,isSwitchClone:l=!1,unavailableStates:c=[],layoutId:d,pages:u,onLinkNavigate:p,onUpdateSettings:y,onOpenChange:x}){const{prefix:m}=R.useScopedStyles(),g=s.useRef(null),v=s.useRef(null),b=s.useRef(null),M=s.useRef(null),f=s.useRef(null),S=s.useRef(0),W=s.useRef(null),U=s.useRef(null),B=s.useRef(d),P=s.useMemo(()=>$$(m),[m]),[H,V]=s.useState(!1),[$,L]=s.useState(!1),[D,A]=s.useState(!1),T=Jw(r),C=s.useMemo(()=>new Set(c),[c]),X=Pt=>!!(Pt&&C.has(Pt)),q=!!(t&&!i&&T==="open"&&!X("open"))||!(t&&!i)&&H,k=!!(t&&!i),N=q&&!k;Wl(N),s.useEffect(()=>{if(!q||!k)return;const Pt=document.documentElement,Gt=Pt.style.overflow;return Pt.style.overflow="hidden",()=>{Pt.style.overflow=Gt}},[q,k]);const j=!X("compact")&&!X("onScroll"),ie=!t||!!i&&!n,ae=o&&o!=="default"?o:void 0,O=j&&T==="compact"?"compact":"default",[oe,_]=s.useState(O),[le,Q]=s.useState(!1),be=!n;O!==oe&&(_(O),be&&Q(!0));const Le=Tp(e),{logo:ye,logoMaxHeight:ce=120/1440,logoPosition:Y="left",panelHeight:se=60/1440,backgroundColor:pe="#b3b3b3",logoColor:fe="#000000",position:we,horizontalAlign:Re,verticalAlign:ge,iconColor:xe="#000000",showIcon:Ce="on",iconSize:h=16/1440,linkColor:K="#000000",openLinkColor:Z="#000000",compactIconColor:ne="#000000",compactLinkColor:de="#000000",compactLogoColor:z="#000000",compactBackgroundColor:I="#ffffff",compactLogoMaxHeight:ee=120/1440,compactLogoPosition:te,compactPanelHeight:me=60/1440,compactShowIcon:G="on",compactIconSize:Ie=16/1440,compactNavTextWidth:Se,compactNavTextPosition:J,compactNavTextOffset:He,compactNavGap:We,compactNavPaddingLeft:ot=10/1440,compactNavPaddingRight:qe=10/1440,compactFontFamily:tt,compactFontSettings:et,compactFontSize:Ge,compactLineHeight:ve,compactLetterSpacing:_e=0,compactWordSpacing:je=0,compactTextAlign:Ze="left",compactTextAppearance:$e,openLogoColor:Ne="#000000",menuBackgroundColor:Ue="#ffffff",overlayColor:Je="rgba(0, 0, 0, 0.45)",closeButtonColor:st="#000000",effect:it="fade",openPanelSize:Oe=100,textWidth:Fe=280/1440,navTextWidth:ut,navTextPosition:ze="center",navTextOffset:De=0,gap:Xe=0,navGap:pt,navPaddingLeft:he=10/1440,navPaddingRight:Me=10/1440,textPaddingLeft:nt=10/1440,textPaddingRight:gt=10/1440,textPaddingTop:Ve=10/1440,textPaddingBottom:yt=10/1440,fontFamily:It,fontSettings:At,fontSize:St,lineHeight:Vt,letterSpacing:jt=0,wordSpacing:Ut=0,textAlign:Kt="left",textAppearance:Rt,openFontFamily:zt,openFontSettings:rn,openFontSize:vt,openLineHeight:ft,openLetterSpacing:Ae,openWordSpacing:Qe,openTextAlign:at,openTextAppearance:mt,stateOverrides:Lt,link:bt}=Le,{horizontalAlign:kt,verticalAlign:Bt}=m$({position:we,horizontalAlign:Re,verticalAlign:ge}),lt=O==="compact",Ht=lt?ee:ce,Yt=Qw(lt?te:Y),Mt=lt?me:se,Nt=lt?Ie:h,Ft=lt?Se:ut,$t=e$(lt?J:ze),E=(lt?He:De)??0,Pe=lt?We:pt,Be=lt?ot:he,Ee=lt?qe:Me,ct=Ft??Fe,Wt=q||(lt?G:Ce)!=="off",ht=R.buildColorVars(m,{iconColor:xe,closeButtonColor:st,linkColor:K,openLinkColor:Z,compactIconColor:ne,compactLinkColor:de,compactLogoColor:z,compactBackgroundColor:I,openLogoColor:Ne,menuBackgroundColor:Ue,overlayColor:Je,backgroundColor:pe,logoColor:fe},x$,b$,Lt),Tt=$d(lt?{fontFamily:tt,fontSettings:et,fontSize:Ge,lineHeight:ve,letterSpacing:_e,wordSpacing:je,textAlign:Ze,textAppearance:$e}:{fontFamily:It,fontSettings:At,fontSize:St,lineHeight:Vt,letterSpacing:jt,wordSpacing:Ut,textAlign:Kt,textAppearance:Rt}),qt=$d({fontFamily:zt,fontSettings:rn,fontSize:vt,lineHeight:ft,letterSpacing:Ae,wordSpacing:Qe,textAlign:at,textAppearance:mt},Tt),Ot=Cd(m,Tt,t),an=Cd(m,qt,t),ln=xd(b,Sd(Tt)),qn=xd(M,Sd(qt)),Un={...an.css,whiteSpace:"pre-wrap",transform:bd(qn)},Zi=an.className,hn=Pt=>R.scalingValue(Pt,t),jo=Pe??Xe,Vo=Math.max(Be,mo),xn=Math.max(Ee,mo),li=Math.max(0,1-Nt),Ji=Math.max(0,1-Nt),bn=n??!1,Kn=bn&&!q,Qi=s.useMemo(()=>Cp({textPaddingLeft:nt,textPaddingRight:gt,textPaddingTop:Ve,textPaddingBottom:yt,fontSize:qt.fontSize}),[nt,gt,Ve,yt,qt.fontSize]),eo=Pt=>{const Gt=a.jsx("span",{className:Zi,style:Un,children:Td(Pt)});return Rd(m,Gt,Fe,bn,hn)},Ye=it==="left"||it==="right"?{width:`${Oe}%`}:{height:`${Oe}%`},F={...y$(Qi,t),...Ye,alignItems:w$[kt],justifyContent:S$[Bt]},re=s.useRef(e),ue=s.useRef(d);s.useEffect(()=>{if(!y||!t){re.current=e,ue.current=d;return}if(ue.current!==d){re.current=e,ue.current=d;const Mi=Pd(e);Mi!==e&&y(Mi);return}const Pt=Pd(e),Gt=re.current,un=Gt!==e,fn=un?f$(Pt,Gt):Pt;re.current=e;const kn=Pt!==e,Nn=un&&g$(Pt,fn);!kn&&!Nn||y(fn)},[e,y,t,d]);const ke=R.scalingValue(Nt,t),Ke={width:ke,height:ke,minWidth:ke,minHeight:ke,maxWidth:ke,maxHeight:ke},dt={...Ot.css,textDecoration:"none",transform:bd(ln)},Et=Ot.className,Dt=(ye==null?void 0:ye.mode)!=="Off",en=(ye==null?void 0:ye.icon)??"",tn=L$(en),ci=hn(Math.min(Ht,Mt)),di=!!(Dt&&en&&Yt==="right")?"left":"right",Go=Array.isArray(bt)?bt:[],Xo=[O!=="default"?`${m}-state-${O}`:"",q||T==="open"?`${m}-state-open`:"",ae&&ae!==O&&ae!==T?`${m}-state-${ae}`:""].filter(Boolean).join(" "),za=t&&!i?`${m}-editor`:"",Gl=ie?`${m}-interactive`:"",Hp=be&&(O!==oe||le)?`${m}-nav-state-anim`:"",Wp=q?`${m}-open`:"",Op=s.useMemo(()=>M$(g.current),[$,q,d]),Ba=()=>{V(!1)},ja=!t||i,Dp=Pt=>{if(N){U.current=Pt;return}Pt()};s.useEffect(()=>{if(q)return;const Pt=U.current;U.current=null,Pt==null||Pt()},[q]);const Xl=(Pt,Gt)=>{R$(Pt,Ba,{isEditor:t,isPreviewMode:i,item:Gt,pages:u,onLinkNavigate:p,runAfterClose:Dp})},zp=()=>{t&&!i||V(Pt=>!Pt)},Bp=Pt=>{Pt.pointerType==="touch"&&Pt.currentTarget.blur()},Er=()=>{W.current!==null&&(window.clearTimeout(W.current),W.current=null)};s.useEffect(()=>{if(!le)return;const Pt=window.setTimeout(()=>{Q(!1)},nn);return()=>window.clearTimeout(Pt)},[le,O]),s.useEffect(()=>{if(q){Er(),L(!0);return}return S.current+=1,A(!1),Er(),W.current=window.setTimeout(()=>{W.current=null,L(!1)},$n),Er},[q]),s.useLayoutEffect(()=>{B.current!==d&&(B.current=d,S.current+=1,Er(),V(!1),A(!1),L(!1))},[d]),s.useLayoutEffect(()=>{var un;if(!$||!q)return;const Pt=S.current+1;S.current=Pt,A(!1),(un=v.current)==null||un.offsetHeight;const Gt=requestAnimationFrame(()=>{S.current===Pt&&A(!0)});return()=>{cancelAnimationFrame(Gt)}},[$,q]),s.useLayoutEffect(()=>{if(!N||!$)return;const Pt=f.current;if(!Pt)return;const Gt=getComputedStyle(Pt).backgroundColor;if(!Gt)return;const un=document.documentElement,{body:fn}=document,kn=un.style.backgroundColor,Nn=fn.style.backgroundColor;return un.style.backgroundColor=Gt,fn.style.backgroundColor=Gt,()=>{un.style.backgroundColor=kn,fn.style.backgroundColor=Nn}},[N,$,Xo,Ue,Lt]),s.useEffect(()=>{x==null||x(q)},[q,x]),s.useEffect(()=>{if(!q)return;const Pt=Gt=>{Gt.key==="Escape"&&(t&&i||Ba())};return window.addEventListener("keydown",Pt),()=>window.removeEventListener("keydown",Pt)},[q,t,i]),s.useEffect(()=>{t&&!i&&T!=="open"&&V(!1)},[t,i,T]),s.useEffect(()=>{i&&V(!1)},[i]);const ql=bn&&q,jp=Pt=>Go.filter(Gt=>o$(Gt,d)).map((Gt,un)=>{const{label:fn,href:kn,target:Nn}=qs(Gt,u),Mi=kn?a.jsx("a",{href:kn,target:Nn,rel:Nn==="_blank"?"noopener noreferrer":void 0,className:`${Pt} ${m}-has-href`,onClick:Va=>Xl(Va,Gt),children:eo(fn)}):a.jsx("span",{className:Pt,children:eo(fn)});return a.jsxs(s.Fragment,{children:[un>0&&a.jsx("div",{"data-controls":ql?"gap":void 0,"data-controls-axis":"y",className:ql?`${m}-gap-control`:void 0,style:{height:hn(Xe)}}),Mi]},un)}),Vp=$?a.jsxs("div",{ref:v,"data-selection":"none",className:[`${m}-lightbox`,`${m}-full-lightbox ${m}-effect-${it}`,D?`${m}-lightbox-active`:"",`${m}-lightbox-editor`,n?`${m}-lightbox-edit-mode`:"",Gl,Xo].filter(Boolean).join(" "),style:{...ht,...Op},"aria-hidden":!D,children:[a.jsx("div",{className:[`${m}-backdrop`,ja?`${m}-backdrop-clickable`:""].filter(Boolean).join(" "),"aria-hidden":"true",onClick:ja?Ba:void 0}),a.jsxs("nav",{className:[`${m}-panel`,ja?`${m}-panel-blocking`:""].filter(Boolean).join(" "),style:F,"aria-label":"Menu","data-lightbox-scrollable":"",children:[bn&&v$(m,Qi,qt.fontSize,hn),jp(`${m}-link`)]}),N?a.jsx("div",{ref:f,className:`${m}-safari-tint`,"aria-hidden":"true"}):null]}):null,Gp=()=>a.jsx("button",{type:"button",className:`${m}-toggle`,onClick:zp,onPointerUp:Bp,"aria-expanded":q,"aria-label":q?"Close menu":"Open menu",children:a.jsx(s$,{className:`${m}-icon`,lineClassName:`${m}-icon-line`})}),Mr=Pt=>{const Gt=Pt==="left",un=Gt?Be:Ee,fn=Gt?Vo:xn,kn=Gt?li:Ji,Nn=lt?Gt?"compactNavPaddingLeft":"compactNavPaddingRight":Gt?"navPaddingLeft":"navPaddingRight";return a.jsx("div",{className:Gt?`${m}-nav-padding-left`:`${m}-nav-padding-right`,style:{width:hn(un),flexShrink:0},children:Kn?a.jsx("div",{"data-controls":Nn,"data-controls-axis":"x","data-controls-variant":"column-padding",...Gt?{}:{"data-controls-reverse":""},"data-controls-min":"0","data-controls-max-fraction":String(kn),className:`${m}-control-anchor`,style:{top:0,[Gt?"left":"right"]:0,width:hn(fn),height:"100%"}}):null})},Xp=(Pt,Gt)=>{const{label:un,href:fn,target:kn}=qs(Pt,u),Nn=a.jsx("span",{className:Et,style:dt,children:Td(un)}),Mi=Rd(m,Nn,ct,Kn,hn),Va=fn?a.jsx("a",{href:fn,target:kn,rel:kn==="_blank"?"noopener noreferrer":void 0,className:`${m}-nav-link ${m}-has-href`,onClick:Kp=>Xl(Kp,Pt),children:Mi}):a.jsx("span",{className:`${m}-nav-link`,children:Mi});return a.jsxs(s.Fragment,{children:[Gt>0&&a.jsx("div",{"data-controls":Kn?lt?"compactNavGap":"navGap":void 0,"data-controls-axis":"x",className:Kn?`${m}-gap-control ${m}-nav-gap-control`:`${m}-nav-gap-control}`,style:{width:hn(jo),flexShrink:0}}),Va]},Gt)},qp={...ht,height:R.scalingValue(Mt,t),minHeight:R.scalingValue(Mt,t),[`--${m}-panel-height`]:R.scalingValue(Mt,t)},Up=l&&O==="default"&&T!=="open"&&!i?hn(se+Kw):"0px";return a.jsxs("div",{ref:g,className:`${m}-root ${Xo} ${za} ${Gl} ${Hp}`.trim(),style:{width:"100%",height:"100%",lineHeight:0,fontSize:0,marginTop:Up,...ht},children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:P}}),a.jsx("span",{ref:b,"aria-hidden":!0,style:wd(Ot.css),children:"H"}),a.jsx("span",{ref:M,"aria-hidden":!0,style:wd(an.css),children:"H"}),a.jsx("div",{className:`${m}-nav-slide`,children:a.jsxs("div",{className:`${m}-nav-bar`,style:qp,children:[Dt&&en?a.jsxs("div",{className:`${m}-nav-logo ${m}-nav-logo-${Yt}`,children:[Yt==="left"?Mr("left"):null,a.jsxs("div",{className:`${m}-nav-logo-inner${tn?` ${m}-nav-logo-tinted`:""}`,style:{height:ci,...tn?{[`--${m}-logo-image`]:C$(en)}:{}},children:[a.jsx("img",{src:en,alt:"",className:`${m}-nav-logo-img`}),tn?a.jsx("span",{className:`${m}-nav-logo-tint`,"aria-hidden":"true"}):null]}),Yt==="right"?Mr("right"):null]}):null,a.jsx("nav",{className:`${m}-nav-links ${m}-nav-links-${$t}`,style:{transform:t$($t,E,t)},"aria-label":"Navigation",children:a.jsx("div",{className:`${m}-nav-links-inner`,children:Go.filter(Pt=>i$(Pt,O,d)).map((Pt,Gt)=>Xp(Pt,Gt))})})]})}),Vp,a.jsxs("div",{className:`${m}-nav-toggle-wrap ${m}-nav-toggle-wrap-${di}`,children:[di==="left"?Mr("left"):null,Wt?a.jsx("div",{className:`${m}-root ${Wp}`.trim(),style:Ke,children:Gp()}):null,di==="right"?Mr("right"):null]})]})}const F$=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
24690
24680
  import { CommonComponentProps } from '../props';
24691
24681
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
24692
24682
  import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
@@ -27261,7 +27251,7 @@ export function Burger({
27261
27251
  </div>
27262
27252
  );
27263
27253
  }
27264
- `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},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 fi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Bl(e){return{[fi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[fi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[fi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[fi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[fi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[fi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[fi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[fi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const F$=Bl(""),N$=Bl("open"),_$=Bl("compact"),H$=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],W$=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],O$=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Zn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Cs={fontWeight:400,fontStyle:"normal"},Yr={d:"Always",t:"Open Only",m:"Open Only"},D$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],z$=["iconColor","logoColor","linkColor","backgroundColor"],B$={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...D$]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...F$,...N$,..._$},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:Yr},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:Yr},{link:{type:"page",value:"",target:"self"},label:"About",showIn:Yr},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:Yr}],logo:{mode:"On",icon:"https://cdn.cntrl.site/component-assets/hamburger-logo.svg"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Cs,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Cs,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Cs,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:Zn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Zn},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:Zn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Zn},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:Zn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Zn,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:H$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:W$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:O$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...z$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},j$={element:M$,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:B$,sourceCode:A$,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},kd=120,Ed=3,V$=.12,jl={x:0,y:0,width:100,height:100};function wo(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function wa(e){return e<0?0:e>1?1:e}function Md(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function G$(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,y=u.y*t.height;p<n&&(n=p),p>o&&(o=p),y<i&&(i=y),y>r&&(r=y)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function X$(e){return e.map(([t,n])=>({x:t,y:n}))}function Ts(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function q$(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=wa(n[o]),l=wa(n[o+1]);l>r&&i.push({x0:r,x1:l})}return U$(i)}function U$(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function K$(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function Y$(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function Z$(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function J$(e,t,n,i){let o=null;for(let r=0;r<Ed;r+=1){const l=wa(t+(n-t)*r/Math.max(1,Ed-1)),c=q$(e,l),d=i==="avoid"?Y$(c):c;if(o=o===null?d:K$(o,d),o.length===0)return[]}return o??[]}function Ad(e,t="stretch",n=jl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ii(i),c=wr(l);if(c.length)return t==="viewbox"?wo(c,n):Ts(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",y),u.appendChild(v);let m=0;try{m=v.getTotalLength()}catch{m=0}if(!m)continue;const g=[];for(let x=0;x<kd;x+=1){const b=v.getPointAtLength(x/kd*m);g.push({x:b.x,y:b.y})}p.push(g)}return p.length?t==="viewbox"?wo(p,n):Ts(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?wo([r],n):Ts([r])}const Vl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Us="0 0 100 100",$a=100,Ks=16,Q$=12,eC=16,Ls=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,tC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Fd=Math.PI/4,nC=8,iC=Math.PI/18,oC=8,ho=24,fo=[];function rC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Ps(e,t){return cn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function aC(e){const t=$i(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:cn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function sC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return cn(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Nd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Ps(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=Ii(c);d.length&&(l=n==="viewbox"?Ps(d,i):aC(d))}if(!l.length){const d=o!=="custom"?Vl[o]:void 0;d?l=Ps(Ii(d),jl):l=rC()}}return o==="circle"?sC(l,r):l}function _d(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":_o(cn(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function Ys(e){const t=e==="rectangle"||e==="custom"?void 0:Vl[e];return t?wo(wr(Ii(t)),jl):[X$([[0,0],[1,0],[1,1],[0,1]])]}function lC(e){const t=e.match(tC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Cn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Zs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function pn(e){return{x:e.x,y:e.y}}function cC(e){return{p:pn(e.p),in:e.in?pn(e.in):null,out:e.out?pn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(cC)}))}function cn(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Hd(e,t,n,i=n){return cn(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function dC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:pn(e),c2:pn(l),p:pn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),v=(e.x-l.x)/2,m=(e.y-l.y)/2,g=p*v+y*m,x=-y*v+p*m,b=g*g/(c*c)+x*x/(d*d);if(b>1){const q=Math.sqrt(b);c*=q,d*=q}const k=o===r?-1:1,f=c*c*x*x+d*d*g*g,S=Math.max(0,c*c*d*d-f),W=f===0?0:k*Math.sqrt(S/f),U=W*c*x/d,B=-W*d*g/c,P=p*U-y*B+(e.x+l.x)/2,_=y*U+p*B+(e.y+l.y)/2,G=Math.atan2((x-B)/d,(g-U)/c);let L=Math.atan2((-x-B)/d,(-g-U)/c)-G;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const D=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),E=L/D,T=4/3*Math.tan(E/4),C=(q,I)=>({x:P+p*c*q-y*d*I,y:_+y*c*q+p*d*I}),V=[];let w=G;for(let q=0;q<D;q+=1){const I=w+E,A=Math.cos(w),j=Math.sin(w),ie=Math.cos(I),ae=Math.sin(I);V.push({c1:C(A-T*j,j+T*A),c2:C(ie+T*ae,ae-T*ie),p:q===D-1?pn(l):C(ie,ae)}),w=I}return V}function Ii(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],g=i[i.length-1];Math.abs(m.p.x-g.p.x)<1e-6&&Math.abs(m.p.y-g.p.y)<1e-6&&(m.in=g.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,g)=>{i.push({p:m,in:Vn(g??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const g=i[i.length-1];g.out=Vn(m,g.p)};Ls.lastIndex=0;let v=Ls.exec(t);for(;v!==null;){const m=v[1],g=m.toUpperCase(),x=m!==g,b=lC(v[2]),k=f=>x?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(g==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(g==="M"){for(let f=0;f+1<b.length;f+=2){const S=k(f);f===0&&(u(),l=pn(S)),p(S)}c=null,d=null}else if(g==="L"){for(let f=0;f+1<b.length;f+=2)p(k(f));c=null,d=null}else if(g==="H"){for(const f of b)p({x:x?r.x+f:f,y:r.y});c=null,d=null}else if(g==="V"){for(const f of b)p({x:r.x,y:x?r.y+f:f});c=null,d=null}else if(g==="C"){for(let f=0;f+5<b.length;f+=6){const S=k(f),W=k(f+2),U=k(f+4);y(S),p(U,W),c=W}d=null}else if(g==="S"){for(let f=0;f+3<b.length;f+=4){const S=c?Zs(c,r):pn(r),W=k(f),U=k(f+2);y(S),p(U,W),c=W}d=null}else if(g==="Q")for(let f=0;f+3<b.length;f+=4){const S=k(f),W=k(f+2);y(Cn(r,S,2/3)),p(W,Cn(W,S,2/3)),d=S,c=null}else if(g==="T")for(let f=0;f+1<b.length;f+=2){const S=d?Zs(d,r):pn(r),W=k(f);y(Cn(r,S,2/3)),p(W,Cn(W,S,2/3)),d=S,c=null}else if(g==="A")for(let f=0;f+6<b.length;f+=7){const S=x?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const W of dC(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,S))y(W.c1),p(W.p,W.c2);c=null,d=null}v=Ls.exec(t)}return u(),n}function On(e){return`${Number(e.toFixed(2))}`}function Vn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Pp(e){return!!(Vn(e.in,e.p)||Vn(e.out,e.p))}function jo(e,t){return!Vn(e.out,e.p)&&!Vn(t.in,t.p)}function Wd(e,t){if(jo(e,t))return`L${On(t.p.x)},${On(t.p.y)}`;const n=Vn(e.out,e.p)??e.p,i=Vn(t.in,t.p)??t.p;return`C${On(n.x)},${On(n.y)} ${On(i.x)},${On(i.y)} ${On(t.p.x)},${On(t.p.y)}`}function _o(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${On(i.p.x)},${On(i.p.y)}`);let r=i;for(const l of o)t.push(Wd(r,l)),r=l;if(n.closed){const l=Wd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Ip(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function Js(e,t,n){if(jo(e,t))return Cn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function wr(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Ip(n)){if(jo(o.from,o.to)){i.push(pn(o.from.p));continue}for(let r=0;r<Ks;r+=1)i.push(Js(o.from,o.to,r/Ks))}n.closed||i.push(pn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function $i(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of wr(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function uC(e){const t=$i(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Rp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function kp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=Q$)return{closed:!0,nodes:t.map(r=>({p:pn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/eC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:pn(r),...Rp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Ep(e,t,n=1){if(!e.length)return!1;const i=$i(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function pC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:cn(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function mC(e,t){if(!e.length)return e;const n=$i(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return cn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Mp(e){const t={x:0,y:0,width:$a,height:$a},n=e!=="custom"?Vl[e]:void 0,i=n?cn(Ii(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):cn(kp(Ys("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=mC(i,t);return{shape:e,customPath:_o(o),pathFit:"viewbox",pathViewBox:Us}}function Zr(e,t){return t>0?Math.round(e/t)*t:e}function gC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=zn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function Od(e,t,n,i){var r;if(!t.length)return e;const o=zn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function hC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=Ap(i,r,c)}),i}function fC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=zn(e),d=c[t].nodes[n];if(d[i]=pn(o),r){const p=i==="in"?"out":"in";d[p]=Zs(o,d.p)}return c}function yC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=zn(e);return r[t].nodes[n][i]=null,r}function vC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=zn(e),d=c[t].nodes,u=n+1;if(jo(r,l))return d.splice(u,0,{p:Cn(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,v=Cn(r.p,p,i),m=Cn(p,y,i),g=Cn(y,l.p,i),x=Cn(v,m,i),b=Cn(m,g,i),k=Cn(x,b,i),f=(n+1)%o.nodes.length;return d[n].out=v,d[f].in=g,d.splice(u,0,{p:k,in:x,out:b}),{contours:c,nodeIndex:u}}function Ap(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(e);return o[t].nodes.splice(n,1),o}function Dd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=zn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Vn(l[u].out,l[u].p),v=!!Vn(l[p].in,l[p].p);if(Pp(c)||y||v)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Rp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function xC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function zd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Ip(i)){const l=jo(r.from,r.to)?1:Ks;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=xC(t,Js(r.from,r.to,d),Js(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function bC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Bd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function jd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function SC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function wC(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function Qs(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function $C(e,t){const n=Qs(e,t);return n?{kind:"align",a:{x:e.x-n.x*ho,y:e.y-n.y*ho},b:{x:t.x+n.x*ho,y:t.y+n.y*ho}}:{kind:"align",a:e,b:t}}function el(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Vd(e,t,n,i,o){if(e.axis===null)return $C(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return el(o(r)[t],t,i)}function CC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Vd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Vd(n,"y",l,i,o)),r}function TC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return Qs(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return Qs(i(p),r)}function LC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:fo};const v=Math.atan2(p,u),m=Math.round(v/Fd)*Fd;let g=o?m:null,x=!1;if(!o){const B=[];n&&B.push({angle:Math.atan2(n.y,n.x),smooth:!0}),B.push({angle:m,smooth:!1});for(const P of B){const _=wC(P.angle-v);if(!(Math.abs(_)>iC)&&!(Math.abs(Math.sin(_))*y>nC)){g=P.angle,x=P.smooth;break}}}const b=i!==null&&i>0&&Math.abs(y-i)<=oC;if(g===null&&!b)return{point:e,guides:fo};const k=g??v,f=b?i:y,S={x:Math.cos(k),y:Math.sin(k)},W=f+(g===null?0:ho),U=b?f:x?ho:0;return{point:l({x:c.x+S.x*f,y:c.y+S.y*f}),guides:[{kind:"angle",a:{x:c.x-S.x*U,y:c.y-S.y*U},b:{x:c.x+S.x*W,y:c.y+S.y*W}}]}}const tl=.1,nl=8,PC=4,Gd=10,Ca=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Fp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},il=(e,t)=>{const n=Ca(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Gd,y:n.y+o*Gd}},ol=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Vi=(e,t,n)=>{const i=ol(e,t)*n;return{width:t.width*i,height:t.height*i}},Dn=(e,t,n)=>(e-t)*n,yo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<PC?.5:wa(r)},IC=(e,t,n,i,o,r)=>{const l=Vi(e,n,r),c=e.x+Dn(e.width,l.width,i),d=e.y+Dn(e.height,l.height,o),u=ol(e,n),p=ol(t,n),y=Math.min(nl,Math.max(tl,p>0?r*(u/p):r)),v=Vi(t,n,y);return{focalX:yo(t.width,v.width,c-t.x,{clamp:!1}),focalY:yo(t.height,v.height,d-t.y,{clamp:!1}),scale:y}},Xd=1.08,Jr=14,Qr=8;function RC({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:v}){const m=s.useRef(null),g=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,x=s.useRef(null),b=s.useRef(null),k=s.useRef({focalX:d,focalY:u,scale:p});k.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var E;f&&((E=m.current)==null||E.focus({preventScroll:!0}))},[f]);const S=s.useCallback((E,T)=>{var V;const C=(V=m.current)==null?void 0:V.getBoundingClientRect();return!C||C.width<=0||C.height<=0?{x:0,y:0}:{x:(E-C.left)/C.width*t.width,y:(T-C.top)/C.height*t.height}},[t.width,t.height]),W=E=>{var C,V;if(!i)return;E.stopPropagation(),E.preventDefault(),(C=m.current)==null||C.focus({preventScroll:!0});const T=Vi(n,i,p);x.current={pointerId:E.pointerId,origin:S(E.clientX,E.clientY),startX:Dn(n.width,T.width,d),startY:Dn(n.height,T.height,u),width:T.width,height:T.height,moved:!1},(V=m.current)==null||V.setPointerCapture(E.pointerId)},U=(E,T)=>{var ie,ae;if(!i)return;E.stopPropagation(),E.preventDefault(),(ie=m.current)==null||ie.focus({preventScroll:!0});const C=Vi(n,i,p),V=Dn(n.width,C.width,d),w=Dn(n.height,C.height,u),q={minX:V,minY:w,maxX:V+C.width,maxY:w+C.height},I=Ca(q,Fp(T)),A=Ca(q,T),j=Math.hypot(A.x-I.x,A.y-I.y);!isFinite(j)||j<=0||(b.current={pointerId:E.pointerId,anchor:I,startDistance:j,startScale:p,startX:V,startY:w,moved:!1},(ae=m.current)==null||ae.setPointerCapture(E.pointerId))},B=E=>{if(!i)return;const T=b.current;if(T&&E.pointerId===T.pointerId){E.stopPropagation(),E.preventDefault();const V=S(E.clientX,E.clientY),w={x:V.x-n.x,y:V.y-n.y},q=Math.hypot(w.x-T.anchor.x,w.y-T.anchor.y),I=Math.min(nl,Math.max(tl,T.startScale*(q/T.startDistance)));if(!T.moved&&Math.abs(I-T.startScale)<1e-4)return;T.moved=!0;const A=I/T.startScale,j=T.anchor.x+(T.startX-T.anchor.x)*A,ie=T.anchor.y+(T.startY-T.anchor.y)*A,ae=Vi(n,i,I);y({focalX:yo(n.width,ae.width,j),focalY:yo(n.height,ae.height,ie),scale:I});return}const C=x.current;if(C&&E.pointerId===C.pointerId){E.stopPropagation(),E.preventDefault();const V=S(E.clientX,E.clientY),w=V.x-C.origin.x,q=V.y-C.origin.y;if(!C.moved&&w===0&&q===0)return;C.moved=!0,y({focalX:yo(n.width,C.width,C.startX+w),focalY:yo(n.height,C.height,C.startY+q),scale:p})}},P=E=>{var V,w;const T=x.current;if(T&&E.pointerId===T.pointerId){x.current=null,E.stopPropagation(),(V=m.current)!=null&&V.hasPointerCapture(T.pointerId)&&m.current.releasePointerCapture(T.pointerId),T.moved&&v(k.current);return}const C=b.current;C&&E.pointerId===C.pointerId&&(b.current=null,E.stopPropagation(),(w=m.current)!=null&&w.hasPointerCapture(C.pointerId)&&m.current.releasePointerCapture(C.pointerId),C.moved&&v(k.current))},_=E=>{if(E.key==="Escape"){E.stopPropagation(),c("none");return}if(E.key==="="||E.key==="+"||E.key==="-"||E.key==="_"){E.preventDefault(),E.stopPropagation();const T=E.key==="="||E.key==="+",C=Math.min(nl,Math.max(tl,p*(T?Xd:1/Xd))),V={focalX:d,focalY:u,scale:C};y(V),v(V)}},G=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const E=i??{width:n.width,height:n.height},T=Vi(n,E,p);return!(T.width>0)||!(T.height>0)?null:{x:n.x+Dn(n.width,T.width,d),y:n.y+Dn(n.height,T.height,u),width:T.width,height:T.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),D=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:_,onPointerMove:B,onPointerUp:P,onPointerCancel:P,onLostPointerCapture:P,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&L&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:g,maskUnits:"userSpaceOnUse",x:L.x,y:L.y,width:L.width,height:L.height,children:[a.jsx("rect",{x:L.x,y:L.y,width:L.width,height:L.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:L.x,y:L.y,width:L.width,height:L.height,preserveAspectRatio:"none",mask:`url(#${g})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:L.x,y:L.y,width:L.width,height:L.height})]}),f&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:W}),G.map(E=>{const T=il(D,E),C=E==="ne"||E==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:T.x-Qr/2,y:T.y-Qr/2,width:Qr,height:Qr}),a.jsx("rect",{className:`${e}-editor-scale-grab${C?` ${e}-editor-scale-grab-nesw`:""}`,x:T.x-Jr/2,y:T.y-Jr/2,width:Jr,height:Jr,onPointerDown:V=>U(V,E)})]},E)})]})]})}const rl=10,kC=rl*2,Wn=7,EC=4,so=9,MC=3.5,qd=1.08,AC=.05,ea=14,FC=1,ta=14,na=8;function NC({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const v=s.useRef(null),m=s.useRef(null),g=s.useRef(i);g.current=i;const x=s.useRef(null),b=s.useRef(null),k=s.useRef(null),f=s.useRef(null),[S,W]=s.useState([]),[U,B]=s.useState(fo),[P,_]=s.useState(null),G=s.useCallback(h=>{B(K=>SC(K,h)?K:h)},[]),$=c==="shape";s.useEffect(()=>{var h;$&&((h=v.current)==null||h.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||W(h=>h.length?[]:h)},[$]);const L=S.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const D=n.width>0?t.width/n.width:1,E=n.height>0?t.height/n.height:1,T=Math.min(D,E),C=r&&l?T:D,V=r&&l?T:E,w=r&&l?(t.width-n.width*T)/2:0,q=r&&l?(t.height-n.height*T)/2:0,I=s.useCallback(h=>r?{x:w+(h.x-n.x)*C,y:q+(h.y-n.y)*V}:{x:h.x-n.x,y:h.y-n.y},[r,n,C,V,w,q]),A=s.useCallback(h=>r?{x:n.x+(C>0?(h.x-w)/C:0),y:n.y+(V>0?(h.y-q)/V:0)}:{x:n.x+h.x,y:n.y+h.y},[r,n,C,V,w,q]),j=s.useMemo(()=>A({x:t.width/2,y:t.height/2}),[A,t.width,t.height]),ie=s.useCallback((h,K)=>{var ne;const Z=(ne=v.current)==null?void 0:ne.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const de=(h-Z.left)/Z.width*t.width,z=(K-Z.top)/Z.height*t.height;return{x:n.x+(C>0?(de-w)/C:0),y:n.y+(V>0?(z-q)/V:0)}}return{x:n.x+(h-Z.left),y:n.y+(K-Z.top)}},[r,n,t.width,t.height,C,V,w,q]),ae=s.useCallback((h,K)=>{var ne;const Z=(ne=v.current)==null?void 0:ne.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(h-Z.left)/Z.width*t.width,y:(K-Z.top)/Z.height*t.height}},[t.width,t.height]),O=s.useCallback((h,K)=>{const Z=l&&!(K!=null&&K.preserveShape)?pC(h,n,t,w,q,C,V):h;y(Z,K)},[y,l,n,t,w,q,C,V]),oe=s.useCallback(()=>{_(null)},[]),N=s.useCallback((h,K,Z)=>{if(!Z||x.current||b.current||k.current||f.current){oe();return}const ne=ae(h,K),de=cn(g.current,I);for(const X of de)for(const Ie of X.nodes)if(Math.hypot(Ie.p.x-ne.x,Ie.p.y-ne.y)<=so){oe();return}const z=zd(de,ne);if(!z||z.distance>rl){oe();return}const R=de[z.contour],ee=R==null?void 0:R.nodes[z.segment],te=R==null?void 0:R.nodes[(z.segment+1)%((R==null?void 0:R.nodes.length)??1)],me=!!(ee&&te&&!jo(ee,te));_(X=>X&&X.curved===me&&Math.hypot(X.point.x-z.point.x,X.point.y-z.point.y)<.25?X:{point:z.point,curved:me})},[ae,I,oe]),le=h=>{var We;const K=h.metaKey||h.ctrlKey,Z=k.current;if(Z&&h.pointerId===Z.pointerId){if(h.stopPropagation(),h.preventDefault(),Z.startDistance<=0)return;const ot=ie(h.clientX,h.clientY),qe=Math.hypot(ot.x-Z.origin.x,ot.y-Z.origin.y),tt=Math.max(AC,qe/Z.startDistance);if(!Z.moved&&Math.abs(tt-1)<1e-4)return;Z.moved=!0,p(Hd(Z.startContours,Z.origin,tt));return}const ne=b.current;if(ne&&h.pointerId===ne.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY),{bbox:qe}=ne,tt=qe.maxX-qe.minX,et=qe.maxY-qe.minY,Ge=ot.x-ne.origin.x,ve=ot.y-ne.origin.y;let _e=Ge,Be=ve;if(isFinite(tt)&&isFinite(et))if(r){let $e=n.x,Ne=n.x+n.width,Ue=n.y,Je=n.y+n.height;l&&(C>0&&($e=n.x+(0-w)/C,Ne=n.x+(t.width-w)/C),V>0&&(Ue=n.y+(0-q)/V,Je=n.y+(t.height-q)/V));const st=Math.min($e,Ne-tt),it=Math.max($e,Ne-tt),Oe=Math.min(Ue,Je-et),Ae=Math.max(Ue,Je-et),gt=Math.min(it,Math.max(st,qe.minX+Ge)),ze=Math.min(Ae,Math.max(Oe,qe.minY+ve));_e=gt-qe.minX,Be=ze-qe.minY}else{const $e=qe.minX-n.x,Ne=qe.minY-n.y,Ue=Math.min(0,t.width-tt),Je=Math.max(0,t.width-tt),st=Math.min(0,t.height-et),it=Math.max(0,t.height-et),Oe=Math.min(Je,Math.max(Ue,$e+Ge)),Ae=Math.min(it,Math.max(st,Ne+ve));_e=Oe-$e,Be=Ae-Ne}const Ze=[];if(!K&&isFinite(tt)&&isFinite(et)){const $e=I({x:qe.minX+tt/2+_e,y:qe.minY+et/2+Be}),Ne={x:t.width/2,y:t.height/2};Math.abs($e.x-Ne.x)<=ea&&(_e=j.x-qe.minX-tt/2,Ze.push(el(Ne.x,"x",t))),Math.abs($e.y-Ne.y)<=ea&&(Be=j.y-qe.minY-et/2,Ze.push(el(Ne.y,"y",t)))}if(!ne.moved&&_e===0&&Be===0)return;ne.moved=!0,G(Ze.length?Ze:fo),p(cn(ne.startContours,$e=>({x:$e.x+_e,y:$e.y+Be})),{carryImage:!0});return}const de=f.current;if(de&&h.pointerId===de.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY);let qe=ot.x-de.origin.x,tt=ot.y-de.origin.y;if(h.shiftKey&&(Math.abs(qe)>Math.abs(tt)?tt=0:qe=0),!de.moved&&qe===0&&tt===0)return;de.moved=!0,p(Od(de.startContours,de.selection,qe,tt));return}const z=x.current;if(!z||h.pointerId!==z.pointerId){N(h.clientX,h.clientY,S.length>0||$);return}oe(),h.stopPropagation(),h.preventDefault();const R=ie(h.clientX,h.clientY);if(z.kind==="anchor"){const ot={x:z.anchor.x+(R.x-z.origin.x),y:z.anchor.y+(R.y-z.origin.y)},qe=K?[]:bC(g.current,{contour:z.contour,node:z.node}),tt=K||!z.center?[]:[z.center],et=jd(Bd(qe,tt.map(_e=>_e.x),"x"),ot,"x",I,ea),Ge=jd(Bd(qe,tt.map(_e=>_e.y),"y"),ot,"y",I,ea),ve=K?ot:{x:(et==null?void 0:et.value)??Zr(ot.x,o),y:(Ge==null?void 0:Ge.value)??Zr(ot.y,o)};if(h.shiftKey&&(Math.abs(ve.x-z.anchor.x)>Math.abs(ve.y-z.anchor.y)?ve.y=z.anchor.y:ve.x=z.anchor.x),!z.moved&&ve.x===z.anchor.x&&ve.y===z.anchor.y)return;z.moved=!0,G(CC(ve,et,Ge,t,I)),p(gC(g.current,z.contour,z.node,ve));return}const ee=(We=g.current[z.contour])==null?void 0:We.nodes[z.node],te=z.mirror&&!h.altKey,me=te||K?null:z.kind==="in"?ee==null?void 0:ee.out:ee==null?void 0:ee.in,X=ee?I(ee.p):null,Ie=me?I(me):null,Se=ee&&(!K||h.shiftKey)?LC(R,ee.p,te||K?null:TC(g.current[z.contour],z.node,z.kind,I),X&&Ie?Math.hypot(Ie.x-X.x,Ie.y-X.y):null,h.shiftKey,I,A):{point:R,guides:fo},J=Se.guides.length?Se.point:K?R:{x:Zr(R.x,o),y:Zr(R.y,o)},He=z.kind==="in"?ee==null?void 0:ee.in:ee==null?void 0:ee.out;!z.moved&&He&&J.x===He.x&&J.y===He.y||(z.moved=!0,G(Se.guides),p(fC(g.current,z.contour,z.node,z.kind,J,te)))},Q=h=>{G(fo);const K=k.current;if(K&&h.pointerId===K.pointerId){k.current=null,h.stopPropagation();const me=v.current;me!=null&&me.hasPointerCapture(K.pointerId)&&me.releasePointerCapture(K.pointerId),K.moved&&O(g.current,{preserveShape:!0});return}const Z=b.current;if(Z&&h.pointerId===Z.pointerId){b.current=null,h.stopPropagation();const me=v.current;me!=null&&me.hasPointerCapture(Z.pointerId)&&me.releasePointerCapture(Z.pointerId),Z.moved?O(g.current,{preserveShape:!0}):W([]);return}const ne=f.current;if(ne&&h.pointerId===ne.pointerId){f.current=null,h.stopPropagation();const me=v.current;me!=null&&me.hasPointerCapture(ne.pointerId)&&me.releasePointerCapture(ne.pointerId),ne.moved&&O(g.current);return}const de=x.current;if(!de||h.pointerId!==de.pointerId)return;x.current=null,h.stopPropagation();const z=v.current;z!=null&&z.hasPointerCapture(de.pointerId)&&z.releasePointerCapture(de.pointerId);const R=Math.hypot(h.clientX-de.clientOrigin.x,h.clientY-de.clientOrigin.y);if(de.moved||R>EC){de.moved&&O(g.current);return}if(!de.toggleOnRelease||h.type!=="pointerup")return;const te=Dd(g.current,de.contour,de.node);te!==g.current&&(p(te),O(te))},be=h=>{h.stopPropagation()},Pe=h=>{var K,Z;h.stopPropagation(),h.preventDefault(),oe(),(K=v.current)==null||K.focus({preventScroll:!0}),b.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),bbox:$i(i),moved:!1},(Z=v.current)==null||Z.setPointerCapture(h.pointerId)},ye=(h,K)=>{var R,ee;h.stopPropagation(),h.preventDefault(),oe(),(R=v.current)==null||R.focus({preventScroll:!0}),W([]),d("shape");const Z=$i(i),ne=Ca(Z,Fp(K)),de=il(Z,K),z=Math.hypot(de.x-ne.x,de.y-ne.y);!isFinite(z)||z<=0||(k.current={pointerId:h.pointerId,corner:K,origin:ne,startDistance:z,startContours:zn(i),moved:!1},(ee=v.current)==null||ee.setPointerCapture(h.pointerId))},ce=(h,K,Z,ne)=>{var R,ee,te,me;h.stopPropagation(),h.preventDefault(),oe(),(R=v.current)==null||R.focus({preventScroll:!0});const de=(ee=i[Z])==null?void 0:ee.nodes[ne];if(!de)return;if(h.altKey){const X=K==="anchor"?Ap(i,Z,ne):yC(i,Z,ne,K);if(X===i)return;W(K==="anchor"?[]:[{contour:Z,node:ne}]),p(X),O(X);return}const z=h.metaKey||h.ctrlKey;if(K==="anchor"&&h.shiftKey&&!z){W(X=>X.some(Ie=>Ie.contour===Z&&Ie.node===ne)?X.filter(Ie=>!(Ie.contour===Z&&Ie.node===ne)):[...X,{contour:Z,node:ne}]);return}if(K==="anchor"&&!z&&S.length>1&&S.some(X=>X.contour===Z&&X.node===ne)){f.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),selection:S,moved:!1},(te=v.current)==null||te.setPointerCapture(h.pointerId);return}W([{contour:Z,node:ne}]),x.current={kind:K,contour:Z,node:ne,pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),clientOrigin:{x:h.clientX,y:h.clientY},anchor:de.p,center:uC(i),mirror:K!=="anchor"&&!!(de.in&&de.out),toggleOnRelease:z,moved:!1},(me=v.current)==null||me.setPointerCapture(h.pointerId)},Y=h=>{h.stopPropagation(),h.preventDefault(),oe();const K=cn(i,I),Z=zd(K,ae(h.clientX,h.clientY));if(!Z||Z.distance>rl)return;const{contours:ne,nodeIndex:de}=vC(i,Z.contour,Z.segment,Z.t);de<0||(W([{contour:Z.contour,node:de}]),p(ne),O(ne))},se=h=>{if(h.key==="="||h.key==="+"||h.key==="-"||h.key==="_"){h.preventDefault(),h.stopPropagation();const z=$i(i);if(!isFinite(z.minX)||!isFinite(z.maxX))return;const R={x:(z.minX+z.maxX)/2,y:(z.minY+z.maxY)/2},te=h.key==="="||h.key==="+"?qd:1/qd,me=Hd(i,R,te);p(me),O(me,{preserveShape:!0});return}if(h.key==="Escape"){h.stopPropagation(),W([]),d("none");return}if(!S.length)return;if(h.key==="Backspace"||h.key==="Delete"){h.preventDefault(),h.stopPropagation();const z=hC(i,S);if(z===i)return;W([]),p(z),O(z);return}const K=o>0?o:FC,Z=h.shiftKey?K*10:K,ne={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[h.key];if(!ne)return;h.preventDefault(),h.stopPropagation();const de=Od(i,S,ne[0],ne[1]);p(de),O(de)},pe=s.useMemo(()=>_o(cn(i,I)),[i,I]),fe=s.useMemo(()=>$i(i),[i]),we=I({x:fe.minX,y:fe.minY}),Re={width:I({x:fe.maxX,y:fe.minY}).x-we.x,height:I({x:fe.minX,y:fe.maxY}).y-we.y},ge=$&&S.length===0&&isFinite(fe.minX)&&isFinite(fe.maxX)&&fe.maxX>fe.minX&&fe.maxY>fe.minY,xe=S.length>0||$,Ce=xe;return a.jsxs("svg",{ref:v,className:`${e}-editor${xe?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:se,onPointerDown:()=>{var h;return(h=v.current)==null?void 0:h.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:oe,onPointerUp:Q,onPointerCancel:Q,onLostPointerCapture:Q,onContextMenu:h=>{h.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{W([]),d("none")},onClick:Y}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:pe}),Ce&&U.map((h,K)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${h.kind}`,x1:h.a.x,y1:h.a.y,x2:h.b.x,y2:h.b.y},`${h.kind}-${K}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:pe,fillRule:"evenodd",onPointerDown:Pe,onClick:Y}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:pe,style:{strokeWidth:kC},onClick:Y}),Ce&&P&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:P.point.x-Wn/2,y:P.point.y-Wn/2,width:Wn,height:Wn,rx:P.curved?Wn/2:0}),Ce&&i.map((h,K)=>h.nodes.map((Z,ne)=>{const de=S.some(R=>R.contour===K&&R.node===ne),z=I(Z.p);return a.jsxs("g",{children:[de&&S.length===1&&["in","out"].map(R=>{const ee=Z[R];if(!ee)return null;const te=I(ee);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:z.x,y1:z.y,x2:te.x,y2:te.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:te.x,cy:te.y,r:MC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:te.x,cy:te.y,r:so,onPointerDown:me=>ce(me,R,K,ne),onClick:be})]},R)}),a.jsx("rect",{className:`${e}-editor-anchor${de?` ${e}-editor-anchor-selected`:""}`,x:z.x-Wn/2,y:z.y-Wn/2,width:Wn,height:Wn,rx:Pp(Z)?Wn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:z.x-so,y:z.y-so,width:so*2,height:so*2,onPointerDown:R=>ce(R,"anchor",K,ne),onClick:be,onDoubleClick:R=>{R.stopPropagation(),R.preventDefault();const ee=Dd(i,K,ne);p(ee),O(ee)}})]},`${K}-${ne}`)})),ge&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:we.x,y:we.y,width:Re.width,height:Re.height}),["nw","ne","se","sw"].map(h=>{const K=I(il(fe,h)),Z=h==="ne"||h==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:K.x-na/2,y:K.y-na/2,width:na,height:na}),a.jsx("rect",{className:`${e}-editor-scale-grab${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:K.x-ta/2,y:K.y-ta/2,width:ta,height:ta,onPointerDown:ne=>ye(ne,h),onClick:be})]},h)})]})]})}const _C=4e3,HC=/^(?:https?:|mailto:|tel:)/i;function Np(e){return!!e&&typeof e=="object"&&e.type==="link"}function WC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!HC.test(t)))return t}function OC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Np(d)){o(d.children??[],WC(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Ud(e){return{...e.fontFamily&&{fontFamily:Do(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"}}}function DC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Np(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function zC(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const g=m.x*n,x=m.y*i;g<c&&(c=g),g>d&&(d=g),x<u&&(u=x),x>p&&(p=x)}const y=(c+d)/2,v=(u+p)/2;return l.map(m=>{const g=m.x*n,x=m.y*i,b=g-y,k=x-v,f=Math.sqrt(b*b+k*k);if(f<1e-6)return m;const W=Math.max(0,f+r*t)/f;return{x:(y+b*W)/n,y:(v+k*W)/i}})})}const Is=2,Rs=2;function BC(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<Is+Rs)return null;const c=Math.min(r.length-Rs,l.length-Rs);let d=-1;for(let u=c;u>=Is;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<Is?null:{fragmentText:`${l.slice(0,d)}-`,remainderText:l.slice(d),fragmentWidth:r[d-1]+o,remainderWidth:Math.max(0,e.width-r[d-1])}}function Kd(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,v=!!e.hyphenate,m=e.charWidths??[],g=e.hyphenWidth??0,x=e.lineHeight*l,b=e.spaceWidth*l,k=Math.max(0,e.shapeMargin??0),f=[],S=t.map((C,V)=>({token:C,originalIndex:V,width:n[V],kind:"whole"}));if(!S.length||c<=0||x<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const W=Math.max(1,b*.5),U=x*V$,B=zC(i,k,c,d,o);let P=0,_=0,G=0,$=S[0].token.para,L=0,D=0,E=null;for(;P<S.length&&G<_C;){const C=_+x>d;if(C&&!u)break;const V=S[P].token.para;if(V>$+1){_+=x*(V-$-1),$=V-1,G+=1;continue}let w=C?[{x0:0,x1:c}]:J$(B,(_+U)/d,(_+x-U)/d,o).map(I=>({x0:I.x0*c,x1:I.x1*c}));p>0&&y>0&&!C&&w.length&&(E===null&&(E=G,L=w[0].x0,D=_),G-E<y&&(w=Z$(w,{x0:L,x1:L+p})));const q=w.reduce((I,A)=>Math.max(I,A.x1-A.x0),0);for(const I of w){const A=I.x1-I.x0;if(A<W)continue;if(P>=S.length||S[P].token.para!==V)break;const j=P;let ie=0;for(;P<S.length&&S[P].token.para===V;){const ae=S[P],O=P===j,oe=ae.width*l,N=O?oe:b+oe;if(ie+N<=A){ie+=N,P+=1;continue}if(O&&A>=q-.5&&oe>c-.5){ie+=N,P+=1;continue}if(v){const Q=A-ie-(O?0:b),be=BC(ae,m,Q,l,g);if(be){const Pe={token:{...ae.token,text:be.fragmentText},originalIndex:ae.originalIndex,width:be.fragmentWidth,kind:"fragment"},ye={token:{...ae.token,text:be.remainderText},originalIndex:ae.originalIndex,width:be.remainderWidth,kind:"remainder"};S.splice(P,1,Pe,ye),ie+=(O?0:b)+be.fragmentWidth*l,P+=1}}break}if(P>j){const ae=P>=S.length||S[P].token.para!==V;f.push({top:_,left:I.x0,width:A,from:j,to:P,justify:r==="justify"&&!ae})}if(P>=S.length||S[P].token.para!==V)break}$=V,_+=x,G+=1}let T=0;if(P>0){const C=S[P-1];T=C.kind==="fragment"?C.originalIndex:C.originalIndex+1}return{segments:f,placed:T,height:f.length?_:0,capLeft:L,capTop:D,renderTokens:S.map(C=>C.token)}}const jC=.12,VC=2,GC=10,ks=.25,XC=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},qC=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,UC=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=XC(e);(!r||!qC(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Es=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function KC(){return typeof document>"u"?null:document.body}function YC({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:v,hyphenate:m,showOverflowIndicator:g,dropCapLines:x,dropCapSize:b,showGuides:k,typography:f,imageUrl:S,imageFocalX:W,imageFocalY:U,imageScale:B,imageCustomPath:P,pathDragActive:_,pathCarryImage:G,onCarryImageConsumed:$,pathEditor:L,imageEditor:D}){var Xe,ct;const E=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[T,C]=s.useState(null),V=s.useRef(null),[w,q]=s.useState({width:0,height:0}),[I,A]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState(0),[oe,N]=s.useState("none");s.useEffect(()=>{!L&&!D&&N("none")},[L,D]);const[le,Q]=s.useState(null);s.useEffect(()=>{if(!S||typeof Image>"u"){Q(null);return}let he=!1;const Ee=new Image;return Ee.onload=()=>{he||Q({width:Ee.naturalWidth,height:Ee.naturalHeight})},Ee.src=S,()=>{he=!0}},[S]);const be=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Pe=s.useMemo(()=>OC(be),[be]),ye=s.useMemo(()=>DC(be),[be]),ce=x>0&&b>1?((ct=(Xe=Pe[0])==null?void 0:Xe.text)==null?void 0:ct.charAt(0))??"":"",Y=(L==null?void 0:L.contours)??null,se=s.useMemo(()=>{let he=[];if(Y){const Ee=wr(Y);Ee.length&&(he=wo(Ee,r))}if(!he.length){const Ee=i.trim(),nt=Ee?Ad(Ee,o,r):null;nt&&nt.length?he=nt:he=Ys(n==="custom"?"rectangle":n)}return n==="circle"?Es(he,w):he},[Y,n,i,o,r,w.width,w.height]),pe=L==null?void 0:L.onConvert,fe=(L==null?void 0:L.needsConversion)??!1,we=s.useMemo(()=>{if(n==="circle")return!1;const he=Y??(i.trim()?Ii(i):null);return!!(he&&Ep(he,r))},[Y,i,r,n]),[Re,ge]=s.useState(null);nr(()=>{if(!we){Re&&ge(null);return}!Re&&w.width>0&&w.height>0&&ge({width:w.width,height:w.height})},[we,w.width,w.height,Re]);const xe=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return se;const he=Re??w,Ee=r.width/he.width,nt=r.height/he.height;return se.map(pt=>pt.map(Ve=>({x:Ve.x*Ee,y:Ve.y*nt})))},[se,we,Re,r.width,r.height,w.width,w.height]),Ce=s.useMemo(()=>{if(Y){const pt=wr(Y);if(pt.length){const Ve=wo(pt,r);return n==="circle"?Es(Ve,w):Ve}}const he=P.trim(),Ee=he?Ad(he,o,r):null,nt=Ee&&Ee.length?Ee:Ys(n==="custom"?"rectangle":n);return n==="circle"?Es(nt,w):nt},[Y,n,P,o,r,w.width,w.height]),h=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return Ce;const he=Re??w,Ee=r.width/he.width,nt=r.height/he.height;return Ce.map(pt=>pt.map(Ve=>({x:Ve.x*Ee,y:Ve.y*nt})))},[Ce,we,Re,r.width,r.height,w.width,w.height]),K=s.useRef(null),Z=s.useRef(!1);s.useEffect(()=>{if(!(!pe||w.width<=0||w.height<=0)){if(we){if(K.current===i)return;const he=Y??(i.trim()?Ii(i):null);if(!(he!=null&&he.length))return;const Ee=cn(he,nt=>({x:r.x+(nt.x-r.x)/w.width*r.width,y:r.y+(nt.y-r.y)/w.height*r.height}));K.current=_o(Ee),pe(Ee);return}!fe||!se.length||Z.current||(Z.current=!0,pe(cn(kp(se),he=>({x:he.x*$a,y:he.y*$a}))))}},[fe,we,pe,se,Y,i,r,w.width,w.height]);const ne=s.useCallback(()=>{const he=T;if(!he)return;const Ee=he.getBoundingClientRect(),nt=parseFloat(window.getComputedStyle(he).paddingTop)||0;A(Ve=>Math.abs(Ve-nt)<.5?Ve:nt);const pt={width:Ee.width,height:Ee.height};q(Ve=>Math.abs(Ve.width-pt.width)<.5&&Math.abs(Ve.height-pt.height)<.5?Ve:pt)},[T]);nr(()=>{const he=T;if(!he||typeof ResizeObserver>"u")return;ne();const Ee=new ResizeObserver(ne);return Ee.observe(he),()=>Ee.disconnect()},[T,ne]),nr(()=>{ne()},[v,ne]),s.useEffect(()=>{const he=typeof document<"u"?document.fonts:void 0;he!=null&&he.ready&&he.ready.then(()=>{O(Ee=>Ee+1)})},[]),nr(()=>{const he=V.current;if(!he)return;if(!Pe.length){ie(null);return}const Ee=[],nt=document.createDocumentFragment();for(const ut of Pe){const H=document.createElement("span");Object.assign(H.style,Ud(ut.leaf)),H.textContent=ut.text,nt.appendChild(H),Ee.push(H)}const pt=document.createElement("span");pt.textContent=" ",nt.appendChild(pt);const Ve=document.createElement("span");Ve.textContent="-",nt.appendChild(Ve);const vt=ce||"H",Rt=document.createElement("span");Rt.textContent=vt,Rt.style.lineHeight="1",nt.appendChild(Rt),he.replaceChildren(nt);const At=window.getComputedStyle(he),wt=parseFloat(At.fontSize)||16,Vt=parseFloat(At.lineHeight),jt=Number.isNaN(Vt)?wt*1.2:Vt,Kt=Math.max(jt,wt),Yt=document.createElement("span");Yt.textContent=vt,Yt.style.lineHeight=`${Kt}px`;const kt=document.createElement("span");kt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Yt.appendChild(kt),he.appendChild(Yt);const Bt=Yt.getBoundingClientRect().top,rn=kt.getBoundingClientRect().top,xt=Math.max(1,rn-Bt);Yt.remove();let yt=xt*.8;const Qe=document.createElement("canvas").getContext("2d"),rt=ut=>`${At.fontStyle} ${At.fontWeight} ${ut}px ${At.fontFamily}`;if(Qe){Qe.font=rt(wt);const ut=Qe.measureText(vt).actualBoundingBoxAscent;ut>0&&(yt=ut)}const dt=b>1?(b-1)*Kt+yt:yt;let Pt=wt*(dt/yt);if(Qe){Qe.font=rt(Pt);const ut=Qe.measureText(vt).actualBoundingBoxAscent;ut>0&&(Pt=Pt*(dt/ut))}Rt.style.fontSize=`${Pt}px`,Rt.style.lineHeight=`${Pt}px`;const St=document.createElement("span");St.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Rt.appendChild(St);const ht=Math.max(1,St.getBoundingClientRect().top-Rt.getBoundingClientRect().top);St.remove();const Tt=(b-1)*Kt+xt-ht,Ot=Ee.map(ut=>ut.getBoundingClientRect().width),Gt=pt.getBoundingClientRect().width,Mt=Ve.getBoundingClientRect().width,_t=ce?Rt.getBoundingClientRect().width:0,Ft=m?Ee.map(ut=>{const H=ut.firstChild;if(!(H instanceof Text)||H.data.length<4)return;const Le=document.createRange(),je=ut.getBoundingClientRect().left,Fe=[];for(let ft=1;ft<=H.data.length;ft+=1)Le.setStart(H,0),Le.setEnd(H,ft),Fe.push(Le.getBoundingClientRect().right-je);return Fe}):[];he.replaceChildren(),ie({widths:Ot,spaceWidth:Gt,dashWidth:Mt,charWidths:Ft,lineHeight:Kt,capWidth:_t,dropCapFontSize:Pt,dropCapTopAdjust:Tt})},[Pe,f,ce,x,b,ae,w.width,m]);const de=j&&ce?j.capWidth+j.lineHeight*jC:0,z=Math.max(x,Math.ceil(b)),R=s.useMemo(()=>{if(!j||!Pe.length||w.width<=0||w.height<=0||!u)return 1;const he=pt=>Kd({tokens:Pe,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:pt,allowOverflow:!1,capInset:de*pt,capLines:ce?z:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:I});if(he(1).placed>=Pe.length)return 1;if(he(ks).placed<Pe.length)return ks;let Ee=ks,nt=1;for(let pt=0;pt<GC;pt+=1){const Ve=(Ee+nt)/2;he(Ve).placed>=Pe.length?Ee=Ve:nt=Ve}return Ee},[j,Pe,w.width,w.height,xe,l,c,u,de,ce,z,m,I]);s.useEffect(()=>{y(R)},[R,y]);const ee=u?Math.min(p,R):1,te=s.useMemo(()=>!j||!Pe.length||w.width<=0||w.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Pe}:Kd({tokens:Pe,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:ee,allowOverflow:d,capInset:de*ee,capLines:ce?z:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:I}),[j,Pe,w.width,w.height,xe,l,c,ee,d,de,ce,z,m,I]),me=g&&Pe.length>0&&te.placed<Pe.length,X=j?j.dropCapFontSize*ee:0,Ie=j?j.dropCapTopAdjust*ee:0,Se=c==="justify"?"left":c,J=j?j.lineHeight*ee:0,He=te.segments.length?te.segments[te.segments.length-1]:null,We=He?{top:He.top+J,left:He.left+He.width/2}:{top:w.height,left:w.width/2},ot=!!(L&&Y&&w.width>0&&w.height>0),qe=!!D,tt=(ot||qe)&&w.width>0&&w.height>0,et=UC(T,tt),Ge=tt&&et?KC():null,ve=s.useRef(!1),_e=s.useCallback(he=>{ve.current=he},[]);s.useEffect(()=>{if(!ot&&!qe)return;const he=Ee=>{const nt=T;if(!nt)return;const pt=nt.getBoundingClientRect();Ee.clientX>=pt.left&&Ee.clientX<=pt.right&&Ee.clientY>=pt.top&&Ee.clientY<=pt.bottom&&(Ee.preventDefault(),Ee.stopPropagation(),N(vt=>vt==="shape"&&ve.current?vt:vt==="shape"&&qe?"image":ot?"shape":"image"))};return document.addEventListener("dblclick",he,!0),()=>document.removeEventListener("dblclick",he,!0)},[ot,qe,T]);const Be=s.useMemo(()=>S&&w.width>0&&w.height>0?G$(h,w):null,[S,h,w.width,w.height]),Ze=s.useRef(null),$e=(()=>{const he=Ze.current;return G||!D||!le||!Be||!he||P===he.customPath||he.shape!==n&&n!=="custom"?null:IC(he.bounds,Be,le,he.focalX,he.focalY,he.scale)})();nr(()=>{if(_||!D||!le||!Be)return;const he=Ze.current,Ee=!!(he&&P!==he.customPath);Ee&&$e&&D.onCommit($e),Ee&&G&&($==null||$()),Ze.current={rings:h,bounds:Be,focalX:($e==null?void 0:$e.focalX)??W,focalY:($e==null?void 0:$e.focalY)??U,scale:($e==null?void 0:$e.scale)??B,customPath:P,shape:n}},[_,G,P,n,h,Be,D,le,W,U,B,$e,$]);const Ne=Ze.current,Ue=!!(_&&!G&&Ne&&!$e),Je=Ue&&Ne?Ne.focalX:($e==null?void 0:$e.focalX)??W,st=Ue&&Ne?Ne.focalY:($e==null?void 0:$e.focalY)??U,it=Ue&&Ne?Ne.scale:($e==null?void 0:$e.scale)??B,Oe=Ue&&Ne?Ne.bounds:Be,Ae=s.useMemo(()=>{if(!(w.width>0)||!(w.height>0))return"";let he=Nd(i,Y,o,r,n,w);if(we){const Ee=Re??w,nt=r.width/Ee.width,pt=r.height/Ee.height;he=cn(he,Ve=>({x:Ve.x*nt,y:Ve.y*pt}))}return _d(he,w)||Md(xe,w)},[i,Y,o,r,n,w.width,w.height,we,Re,xe]),gt=s.useMemo(()=>{if(!S||!(w.width>0)||!(w.height>0))return"";let he=Nd(P,Y,o,r,n,w);if(we){const Ee=Re??w,nt=r.width/Ee.width,pt=r.height/Ee.height;he=cn(he,Ve=>({x:Ve.x*nt,y:Ve.y*pt}))}return _d(he,w)||Md(h,w)},[S,P,Y,o,r,n,w.width,w.height,we,Re,h]),ze=`${E}-clip`,De=s.useMemo(()=>{if(!Oe)return null;const he=le??{width:Oe.width,height:Oe.height},Ee=Vi(Oe,he,it);return{x:Dn(Oe.width,Ee.width,Je),y:Dn(Oe.height,Ee.height,st),width:Ee.width,height:Ee.height}},[Oe,le,Je,st,it]);return a.jsxs("div",{className:`${e}-column`,style:{padding:v},ref:C,children:[Ae?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:w.width,height:w.height},viewBox:`0 0 ${w.width} ${w.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Ae,fillRule:"evenodd"}),S&&gt&&Oe&&De?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:ze,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:gt,fillRule:"evenodd"})})}),a.jsx("image",{href:S,x:Oe.x+De.x,y:Oe.y+De.y,width:De.width,height:De.height,preserveAspectRatio:"none",clipPath:`url(#${ze})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:ee,top:0,left:0,width:w.width,height:w.height},children:[a.jsx("div",{className:`${e}-measure`,ref:V,style:f,"aria-hidden":!0}),te.segments.map((he,Ee)=>{const nt=te.renderTokens.slice(he.from,he.to),pt=Ee===0;return a.jsx("div",{className:`${e}-line${he.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${he.top}px`,left:`${he.left}px`,width:`${he.width}px`,textAlign:he.justify?void 0:Se},children:nt.map((Ve,vt)=>{const At=ce&&pt&&he.from===0&&vt===0?Ve.text.slice(1):Ve.text,wt=Ud(Ve.leaf),Vt=Ve.href?a.jsx("a",{className:`${e}-link`,href:Ve.href,target:Ve.target,rel:Ve.target?"noopener noreferrer":void 0,style:wt,children:At}):a.jsx("span",{style:wt,children:At});return a.jsxs("span",{children:[!he.justify&&vt>0?" ":null,Vt]},vt)})},`${he.from}-${he.to}-${Ee}`)}),k&&!Y&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:xe.map((he,Ee)=>a.jsx("polygon",{points:he.map(nt=>`${nt.x},${nt.y}`).join(" ")},Ee))})]}),ce&&j&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${te.capTop+Ie}px`,left:`${te.capLeft}px`,fontSize:`${X}px`,lineHeight:`${X}px`},children:ce}),Ge&&et&&(Y&&L||D)&&Gn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:et.top,left:et.left,width:et.width,height:et.height,zIndex:VC,pointerEvents:"none"},children:[Y&&L&&a.jsx(NC,{P:e,box:{width:et.width,height:et.height},viewBox:r,contours:Y,snap:L.snap,stretchToBox:!we,uniformStretch:n==="circle",stage:oe,onStageChange:N,onSelectionChange:_e,onChange:L.onChange,onCommit:L.onCommit}),D&&Oe&&a.jsx(RC,{P:e,box:{width:et.width,height:et.height},bounds:Oe,natural:le,imageUrl:S,maskPath:gt,stage:oe,onStageChange:N,focalX:Je,focalY:st,scale:it,onChange:D.onChange,onCommit:D.onCommit})]}),Ge),a.jsx("div",{className:`${e}-a11y`,children:ye.map((he,Ee)=>a.jsx("p",{children:he},Ee))}),me&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:We.top,left:We.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const _p=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],ZC={x:0,y:0,width:100,height:100},JC=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?ZC:{x:t[0],y:t[1],width:t[2],height:t[3]}},QC=e=>`
27254
+ `;function tr(e){return{type:"number",scope:"layout",title:e,min:0,max:100,display:{type:"range-control"}}}const Di={fontSettings:{type:"object",display:{type:"font-settings-weight",hideLabel:!0,useTabDesign:!0},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 fi(e,t){return e?`${e}${t.charAt(0).toUpperCase()}${t.slice(1)}`:t}function Bl(e){return{[fi(e,"fontFamily")]:{type:"string",scope:"common",title:"",display:{type:"font-family-select",hideLabel:!0,useTabDesign:!0}},[fi(e,"fontSettings")]:{...Di.fontSettings,scope:"common",title:""},[fi(e,"fontSize")]:{...Di.fontSize,scope:"layout",title:""},[fi(e,"lineHeight")]:{...Di.lineHeight,scope:"layout",title:""},[fi(e,"letterSpacing")]:{...Di.letterSpacing,scope:"layout",title:""},[fi(e,"wordSpacing")]:{...Di.wordSpacing,scope:"layout",title:""},[fi(e,"textAlign")]:{...Di.textAlign,scope:"layout",title:""},[fi(e,"textAppearance")]:{...Di.textAppearance,scope:"layout",title:""}}}const N$=Bl(""),_$=Bl("open"),H$=Bl("compact"),W$=["__componentName__",{type:"row",items:["panelHeight","navTextWidth"]},{type:"row",title:"",items:["navTextPosition","navTextOffset"]},{type:"row",title:"Logo",items:["logoMaxHeight","logoPosition"]},{type:"row",title:"Hamburger",items:["iconSize","showIcon"]},"fontFamily","fontSettings",{type:"row",items:["fontSize","lineHeight","letterSpacing","wordSpacing"]},"textAlign","textAppearance","navGap","navPaddingLeft","navPaddingRight"],O$=["__componentName__",{type:"row",items:["compactPanelHeight","compactNavTextWidth"]},{type:"row",title:"",items:["compactNavTextPosition","compactNavTextOffset"]},{type:"row",title:"Logo",items:["compactLogoMaxHeight","compactLogoPosition"]},{type:"row",title:"Hamburger",items:["compactIconSize","compactShowIcon"]},"compactFontFamily","compactFontSettings",{type:"row",items:["compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing"]},"compactTextAlign","compactTextAppearance","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight"],D$=["__componentName__",{type:"row",title:"Text",items:["textWidth","position"]},{type:"row",title:"Menu",items:["openPanelSize","effect"]},"openFontFamily","openFontSettings",{type:"row",items:["openFontSize","openLineHeight","openLetterSpacing","openWordSpacing"]},"openTextAlign","openTextAppearance"],Zn={textTransform:"none",textDecoration:"none",fontVariant:"normal"},Cs={fontWeight:400,fontStyle:"normal"},Yr={d:"Always",t:"Open Only",m:"Open Only"},z$=["left-top","center-top","right-top","left-center","center","right-center","left-bottom","center-bottom","right-bottom"],B$=["iconColor","logoColor","linkColor","backgroundColor"],j$={type:"object",version:1,settings:{sizing:"auto manual",properties:{link:{type:"array",scope:"common",display:{type:"page-url-link"},items:{type:"object",properties:{link:{type:"object",properties:{type:{type:"string",enum:["url","page","anchor"]},value:{type:"string",message:"Paste URL here..."},target:{type:"string",enum:["blank","self"]},anchor:{type:"string"}}},label:{type:"string"},showIn:{type:"string",scope:"layout",enum:["Always","Open Only","Open and Compact","Default and Open","Default and Compact"]}}}},logo:{type:"object",scope:"common",title:"Logo",display:{type:"button-icon-switch"},properties:{mode:{type:"string",enum:["On","Off"]},icon:{type:["string","null"],title:"Logo",display:{type:"settings-image-input"}}}},logoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},logoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactLogoPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},logoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{default:"Logo Default",hover:"Logo Hover"},display:{type:"palette-color-picker"}},panelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},backgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},iconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{default:"Icon Default",hover:"Icon Hover"},display:{type:"palette-color-picker"}},showIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},iconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},linkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{default:"Text Default",hover:"Text Hover"},display:{type:"palette-color-picker"}},compactShowIcon:{type:"string",scope:"layout",title:"Show",display:{type:"toggle-cycle",enum:["on","off"]}},compactIconColor:{type:"string",scope:"common",title:"Icon Default",titleByState:{compact:"Icon Default","compact-hover":"Icon Hover"},display:{type:"palette-color-picker"}},compactLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{compact:"Text Default","compact-hover":"Text Hover"},display:{type:"palette-color-picker"}},compactLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{compact:"Logo Default","compact-hover":"Logo Hover"},display:{type:"palette-color-picker"}},compactBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},openLinkColor:{type:"string",scope:"common",title:"Text Default",titleByState:{open:"Text Default","open-hover":"Text Hover"},display:{type:"palette-color-picker"}},openLogoColor:{type:"string",scope:"common",title:"Logo Default",titleByState:{open:"Logo Default","open-hover":"Logo Hover"},display:{type:"palette-color-picker"}},menuBackgroundColor:{type:"string",scope:"common",title:"BG Default",display:{type:"palette-color-picker"}},overlayColor:{type:"string",scope:"common",title:"Overlay Default",display:{type:"palette-color-picker"}},closeButtonColor:{type:"string",scope:"common",title:"Close Default",titleByState:{open:"Close Default","open-hover":"Close Hover"},display:{type:"palette-color-picker"}},effect:{type:"string",scope:"layout",title:"Effect",display:{type:"toggle-cycle",enum:["fade","left","top","right","bottom"]}},openPanelSize:{type:"number",scope:"layout",title:"Height",display:{type:"percentage-input"},min:0,max:100},textWidth:{type:"number",scope:"layout",title:"Width",display:{type:"numeric-input"},min:0,max:9999},navTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},navTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},navTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},position:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:[...z$]}},stateOverrides:{type:"object",scope:"common"},gap:tr("Gap"),navGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},navPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},textPaddingLeft:tr("Text padding left"),textPaddingRight:tr("Text padding right"),textPaddingTop:tr("Text padding top"),textPaddingBottom:tr("Text padding bottom"),compactLogoMaxHeight:{type:"number",scope:"layout",title:"Max Height",display:{type:"numeric-input"},min:0,max:9999},compactPanelHeight:{type:"number",scope:"layout",title:"Menu Height",display:{type:"numeric-input"},min:0,max:9999},compactIconSize:{type:"number",scope:"layout",title:"Size",display:{type:"numeric-input"},min:0,max:9999},compactNavTextWidth:{type:"number",scope:"layout",title:"Text width",display:{type:"numeric-input"},min:0,max:9999},compactNavTextPosition:{type:"string",scope:"layout",title:"Position",display:{type:"toggle-cycle",enum:["left","center","right"]}},compactNavTextOffset:{type:"number",scope:"layout",title:"Offset",display:{type:"numeric-input"},min:-9999,max:9999},compactNavGap:{type:"number",scope:"layout",title:"Nav gap",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingLeft:{type:"number",scope:"layout",title:"Nav padding left",min:0,max:100,display:{type:"range-control",visible:!1}},compactNavPaddingRight:{type:"number",scope:"layout",title:"Nav padding right",min:0,max:100,display:{type:"range-control",visible:!1}},...N$,..._$,...H$},defaults:{link:[{link:{type:"page",value:"",target:"self"},label:"Home",showIn:Yr},{link:{type:"page",value:"",target:"self"},label:"Works",showIn:Yr},{link:{type:"page",value:"",target:"self"},label:"About",showIn:Yr},{link:{type:"page",value:"",target:"self"},label:"Contact",showIn:Yr}],logo:{mode:"On",icon:"https://cdn.cntrl.site/component-assets/hamburger-logo.svg"},backgroundColor:"#ffffff",logoColor:"#000000",iconColor:"#000000",linkColor:"#000000",openLinkColor:"#000000",compactIconColor:"#000000",compactLinkColor:"#000000",compactLogoColor:"#000000",compactBackgroundColor:"#ffffff",openLogoColor:"#000000",menuBackgroundColor:"#ffffff",overlayColor:"rgba(0, 0, 0, 0.45)",closeButtonColor:"#000000",effect:"fade",showIcon:"on",compactShowIcon:"on",logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",compactNavTextPosition:"center",navTextOffset:0,compactNavTextOffset:0,position:"left-top",fontFamily:"Goudy Bookletter 1911",fontSettings:Cs,textAlign:"left",openFontFamily:"Goudy Bookletter 1911",openFontSettings:Cs,openTextAlign:"left",compactFontFamily:"Goudy Bookletter 1911",compactFontSettings:Cs,compactTextAlign:"left",stateOverrides:{hover:{linkColor:"#666666",iconColor:"#666666",logoColor:"#666666"},"open-hover":{closeButtonColor:"#666666"}}},displayRules:[{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoMaxHeight.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoPosition.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.logoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.compactLogoColor.display.visible",value:!1}},{if:{name:"logo.mode",value:"Off"},then:{name:"properties.openLogoColor.display.visible",value:!1}},{if:{name:"effect",value:"left"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"effect",value:"right"},then:{name:"properties.openPanelSize.title",value:"Width"}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconSize.display.visible",value:!1}},{if:{name:"showIcon",value:"off"},then:{name:"properties.iconColor.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconSize.display.visible",value:!1}},{if:{name:"compactShowIcon",value:"off"},then:{name:"properties.compactIconColor.display.visible",value:!1}}],layoutDefaults:{m:{position:"center",panelHeight:50/375,logoMaxHeight:30/375,logoPosition:"center",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:30/375,textWidth:240/375,openPanelSize:100,navTextWidth:120/375,gap:24/375,navGap:24/375,navPaddingLeft:20/375,navPaddingRight:20/375,textPaddingLeft:10/375,textPaddingRight:10/375,textPaddingTop:10/375,textPaddingBottom:10/375,fontSize:16/375,lineHeight:20/375,letterSpacing:0,wordSpacing:0,textAppearance:Zn,openFontSize:34/375,openLineHeight:20/375,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,openTextAlign:"center",compactPanelHeight:40/375,compactLogoMaxHeight:20/375,compactShowIcon:"on",compactIconSize:16/375,compactNavTextWidth:80/375,compactNavGap:24/375,compactNavPaddingLeft:20/375,compactNavPaddingRight:20/375,compactFontSize:16/375,compactLineHeight:20/375,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Zn},t:{textAlign:"center",position:"center",panelHeight:60/768,logoMaxHeight:30/768,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:16/768,textWidth:300/768,openPanelSize:100,navTextWidth:90/768,gap:32/768,navGap:32/768,navPaddingLeft:20/768,navPaddingRight:20/768,textPaddingLeft:10/768,textPaddingRight:10/768,textPaddingTop:10/768,textPaddingBottom:10/768,fontSize:18/768,lineHeight:20/768,letterSpacing:0,wordSpacing:0,textAppearance:Zn,openFontSize:75/768,openLineHeight:20/768,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,openTextAlign:"center",compactTextAlign:"center",compactPanelHeight:40/768,compactLogoMaxHeight:20/768,compactShowIcon:"on",compactIconSize:16/768,compactNavTextWidth:80/768,compactNavGap:32/768,compactNavPaddingLeft:20/768,compactNavPaddingRight:20/768,compactFontSize:16/768,compactLineHeight:20/768,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Zn},d:{position:"center",panelHeight:50/1440,logoMaxHeight:30/1440,logoPosition:"left",compactLogoPosition:"left",navTextPosition:"center",navTextOffset:0,compactNavTextPosition:"center",compactNavTextOffset:0,showIcon:"on",iconSize:20/1440,textWidth:300/1440,openPanelSize:100,navTextWidth:60/1440,gap:12/1440,navGap:64/1440,navPaddingLeft:10/1440,navPaddingRight:10/1440,textPaddingLeft:10/1440,textPaddingRight:10/1440,textPaddingTop:10/1440,textPaddingBottom:10/1440,fontSize:16/1440,lineHeight:16/1440,letterSpacing:0,wordSpacing:0,textAppearance:Zn,textAlign:"center",openFontSize:90/1440,openLineHeight:16/1440,openLetterSpacing:0,openWordSpacing:0,openTextAppearance:Zn,openTextAlign:"center",compactPanelHeight:30/1440,compactLogoMaxHeight:20/1440,compactShowIcon:"on",compactIconSize:20/1440,compactNavTextWidth:60/1440,compactNavGap:20/1440,compactNavPaddingLeft:10/1440,compactNavPaddingRight:10/1440,compactFontSize:16/1440,compactLineHeight:16/1440,compactLetterSpacing:0,compactWordSpacing:0,compactTextAppearance:Zn,compactTextAlign:"center"}},layout:["__componentName__","link","logo","logoMaxHeight","logoPosition","panelHeight","backgroundColor","logoColor","iconColor","showIcon","iconSize","linkColor","openLinkColor","compactShowIcon","compactIconColor","compactLinkColor","compactLogoColor","compactBackgroundColor","compactLogoMaxHeight","compactLogoPosition","compactPanelHeight","compactIconSize","compactNavTextWidth","compactNavTextPosition","compactNavTextOffset","compactNavGap","compactNavPaddingLeft","compactNavPaddingRight","compactFontFamily","compactFontSettings","compactFontSize","compactLineHeight","compactLetterSpacing","compactWordSpacing","compactTextAlign","compactTextAppearance","openLogoColor","menuBackgroundColor","overlayColor","closeButtonColor","effect","textWidth","navTextWidth","navTextPosition","navTextOffset","position","gap","navGap","navPaddingLeft","navPaddingRight","textPaddingLeft","textPaddingRight","textPaddingTop","textPaddingBottom","fontFamily","fontSettings","fontSize","lineHeight","letterSpacing","wordSpacing","textAlign","textAppearance","openFontFamily","openFontSettings","openFontSize","openLineHeight","openLetterSpacing","openWordSpacing","openTextAlign","openTextAppearance"]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:["__componentName__","logo"]},{id:"default",icon:"default",title:"Default",tooltip:"Default State",layout:W$},{id:"compact",icon:"compact",title:"Compact",tooltip:"Compact State",layout:O$,availableWhen:{navigationPosition:["switch"]}},{id:"open",icon:"open",title:"Open",tooltip:"Open State",layout:D$},{id:"links",icon:"content",title:"Links",tooltip:"Link Settings",layout:["__componentName__","link"]}],paletteBookmark:{items:[...B$],panelIds:["default","compact","open"],stateItems:{default:["iconColor","logoColor","linkColor","backgroundColor"],hover:["iconColor","logoColor","linkColor"],compact:["compactIconColor","compactLogoColor","compactLinkColor","compactBackgroundColor"],"compact-hover":["compactIconColor","compactLogoColor","compactLinkColor"],open:["closeButtonColor","openLogoColor","openLinkColor","menuBackgroundColor","overlayColor"],"open-hover":["closeButtonColor","openLogoColor","openLinkColor"]}},states:["default","hover"],statePanels:["default","compact","open"]},V$={element:A$,id:"basic-burger",name:"Basic Burger",category:"navigation",version:1,preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/Simple Burger.png"},layoutMode:"navigation",defaultSize:{d:{width:"100%",height:60/1440},t:{width:"100%",height:60/768},m:{width:"100%",height:56/375}},defaultNavigationPosition:{d:"switch",t:"switch",m:"stickyTop"},schema:j$,sourceCode:F$,assetsPaths:{content:[],parameters:[{path:"logo.icon",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"fontFamily"},{path:"openFontFamily"},{path:"compactFontFamily"}]},fontRelations:{fontSettings:"fontFamily",openFontSettings:"openFontFamily",compactFontSettings:"compactFontFamily"}},kd=120,Ed=3,G$=.12,jl={x:0,y:0,width:100,height:100};function So(e,t){return e.map(n=>n.map(i=>({x:(i.x-t.x)/t.width,y:(i.y-t.y)/t.height})))}function wa(e){return e<0?0:e>1?1:e}function Md(e,t){return e.filter(n=>n.length>0).map(n=>`M ${n.map(i=>`${i.x*t.width} ${i.y*t.height}`).join(" L ")} Z`).join(" ")}function X$(e,t){let n=1/0,i=1/0,o=-1/0,r=-1/0;for(const d of e)for(const u of d){const p=u.x*t.width,y=u.y*t.height;p<n&&(n=p),p>o&&(o=p),y<i&&(i=y),y>r&&(r=y)}const l=o-n,c=r-i;return!isFinite(l)||!isFinite(c)||l<=0||c<=0?null:{x:n,y:i,width:l,height:c}}function q$(e){return e.map(([t,n])=>({x:t,y:n}))}function Ts(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const c of e)for(const d of c)d.x<t&&(t=d.x),d.x>i&&(i=d.x),d.y<n&&(n=d.y),d.y>o&&(o=d.y);const r=i-t,l=o-n;return!isFinite(r)||!isFinite(l)||r<=0||l<=0?e:e.map(c=>c.map(d=>({x:(d.x-t)/r,y:(d.y-n)/l})))}function U$(e,t){const n=[];for(const o of e)for(let r=0;r<o.length;r+=1){const l=o[r],c=o[(r+1)%o.length];(l.y<=t&&c.y>t||c.y<=t&&l.y>t)&&n.push(l.x+(t-l.y)/(c.y-l.y)*(c.x-l.x))}n.sort((o,r)=>o-r);const i=[];for(let o=0;o+1<n.length;o+=2){const r=wa(n[o]),l=wa(n[o+1]);l>r&&i.push({x0:r,x1:l})}return K$(i)}function K$(e){if(e.length<2)return e;const t=[...e].sort((i,o)=>i.x0-o.x0),n=[t[0]];for(let i=1;i<t.length;i+=1){const o=n[n.length-1],r=t[i];r.x0<=o.x1?o.x1=Math.max(o.x1,r.x1):n.push({...r})}return n}function Y$(e,t){const n=[];let i=0,o=0;for(;i<e.length&&o<t.length;){const r=Math.max(e[i].x0,t[o].x0),l=Math.min(e[i].x1,t[o].x1);l>r&&n.push({x0:r,x1:l}),e[i].x1<t[o].x1?i+=1:o+=1}return n}function Z$(e){const t=[];let n=0;for(const i of e)i.x0>n&&t.push({x0:n,x1:i.x0}),n=Math.max(n,i.x1);return n<1&&t.push({x0:n,x1:1}),t}function J$(e,t){const n=[];for(const i of e){if(t.x1<=i.x0||t.x0>=i.x1){n.push(i);continue}t.x0>i.x0&&n.push({x0:i.x0,x1:t.x0}),t.x1<i.x1&&n.push({x0:t.x1,x1:i.x1})}return n}function Q$(e,t,n,i){let o=null;for(let r=0;r<Ed;r+=1){const l=wa(t+(n-t)*r/Math.max(1,Ed-1)),c=U$(e,l),d=i==="avoid"?Z$(c):c;if(o=o===null?d:Y$(o,d),o.length===0)return[]}return o??[]}function Ad(e,t="stretch",n=jl){const i=e.trim();if(!i)return null;if(/^[Mm]/.test(i)){const l=Ii(i),c=wr(l);if(c.length)return t==="viewbox"?So(c,n):Ts(c);if(typeof document>"u")return null;const d=i.split(/(?=[Mm])/).map(y=>y.trim()).filter(Boolean),u=document.createElementNS("http://www.w3.org/2000/svg","svg"),p=[];for(const y of d){const x=document.createElementNS("http://www.w3.org/2000/svg","path");x.setAttribute("d",y),u.appendChild(x);let m=0;try{m=x.getTotalLength()}catch{m=0}if(!m)continue;const g=[];for(let v=0;v<kd;v+=1){const b=x.getPointAtLength(v/kd*m);g.push({x:b.x,y:b.y})}p.push(g)}return p.length?t==="viewbox"?So(p,n):Ts(p):null}const o=i.split(/[\s,]+/).map(Number).filter(l=>!Number.isNaN(l));if(o.length<6)return null;const r=[];for(let l=0;l+1<o.length;l+=2)r.push({x:o[l],y:o[l+1]});return t==="viewbox"?So([r],n):Ts([r])}const Vl={bobbin:"M57.63,0 L57.63,37.24 L74.66,37.24 L74.66,56.07 L57.63,100 L33.84,100 L16.81,56.07 L16.81,37.24 L33.84,37.24 L33.84,0 Z",circle:"M50,0 C77.61,0 100,22.39 100,50 C100,77.61 77.61,100 50,100 C22.39,100 0,77.61 0,50 C0,22.39 22.39,0 50,0 Z",shield:"M0,0 L100,0 L100,50 L50,100 L0,50 Z",vase:"M25.37,0 L91.55,0 C91.55,0 74.8,25.14 83.07,50.03 C91.34,74.92 74.61,100 74.61,100 L8.43,100 C8.43,100 32.3,75.08 23.9,50 C15.5,24.92 25.37,0 25.37,0 Z",parallelogram:"M25.37,0 L91.55,0 L74.61,100 L8.43,100 Z",diamond:"M50,0 L80,50 L50,100 L20,50 Z"},Us="0 0 100 100",$a=100,Ks=16,eC=12,tC=16,Ls=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,nC=/[+-]?(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?/g,Fd=Math.PI/4,iC=8,oC=Math.PI/18,rC=8,go=24,ho=[];function aC(){return[{closed:!0,nodes:[{p:{x:0,y:0},in:null,out:null},{p:{x:1,y:0},in:null,out:null},{p:{x:1,y:1},in:null,out:null},{p:{x:0,y:1},in:null,out:null}]}]}function Ps(e,t){return cn(e,n=>({x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}))}function sC(e){const t=$i(e),n=t.maxX-t.minX,i=t.maxY-t.minY;return!isFinite(n)||!isFinite(i)||n<=0||i<=0?e:cn(e,o=>({x:(o.x-t.minX)/n,y:(o.y-t.minY)/i}))}function lC(e,t){if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return cn(e,r=>({x:(i+r.x*n)/t.width,y:(o+r.y*n)/t.height}))}function Nd(e,t,n,i,o,r){let l=[];if(t&&t.length)l=Ps(t,i);else{const c=e.trim();if(c&&/^[Mm]/.test(c)){const d=Ii(c);d.length&&(l=n==="viewbox"?Ps(d,i):sC(d))}if(!l.length){const d=o!=="custom"?Vl[o]:void 0;d?l=Ps(Ii(d),jl):l=aC()}}return o==="circle"?lC(l,r):l}function _d(e,t){return!(t.width>0)||!(t.height>0)||!e.length?"":No(cn(e,n=>({x:n.x*t.width,y:n.y*t.height})))}function Ys(e){const t=e==="rectangle"||e==="custom"?void 0:Vl[e];return t?So(wr(Ii(t)),jl):[q$([[0,0],[1,0],[1,1],[0,1]])]}function cC(e){const t=e.match(nC);return t?t.map(Number).filter(n=>!Number.isNaN(n)):[]}function Cn(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Zs(e,t){return{x:t.x*2-e.x,y:t.y*2-e.y}}function pn(e){return{x:e.x,y:e.y}}function dC(e){return{p:pn(e.p),in:e.in?pn(e.in):null,out:e.out?pn(e.out):null}}function zn(e){return e.map(t=>({closed:t.closed,nodes:t.nodes.map(dC)}))}function cn(e,t){return e.map(n=>({closed:n.closed,nodes:n.nodes.map(i=>({p:t(i.p),in:i.in?t(i.in):null,out:i.out?t(i.out):null}))}))}function Hd(e,t,n,i=n){return cn(e,o=>({x:t.x+(o.x-t.x)*n,y:t.y+(o.y-t.y)*i}))}function uC(e,t,n,i,o,r,l){let c=Math.abs(t),d=Math.abs(n);if(!c||!d||e.x===l.x&&e.y===l.y)return[{c1:pn(e),c2:pn(l),p:pn(l)}];const u=i*Math.PI/180,p=Math.cos(u),y=Math.sin(u),x=(e.x-l.x)/2,m=(e.y-l.y)/2,g=p*x+y*m,v=-y*x+p*m,b=g*g/(c*c)+v*v/(d*d);if(b>1){const q=Math.sqrt(b);c*=q,d*=q}const M=o===r?-1:1,f=c*c*v*v+d*d*g*g,S=Math.max(0,c*c*d*d-f),W=f===0?0:M*Math.sqrt(S/f),U=W*c*v/d,B=-W*d*g/c,P=p*U-y*B+(e.x+l.x)/2,H=y*U+p*B+(e.y+l.y)/2,V=Math.atan2((v-B)/d,(g-U)/c);let L=Math.atan2((-v-B)/d,(-g-U)/c)-V;!r&&L>0&&(L-=Math.PI*2),r&&L<0&&(L+=Math.PI*2);const D=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2))),A=L/D,T=4/3*Math.tan(A/4),C=(q,k)=>({x:P+p*c*q-y*d*k,y:H+y*c*q+p*d*k}),X=[];let w=V;for(let q=0;q<D;q+=1){const k=w+A,N=Math.cos(w),j=Math.sin(w),ie=Math.cos(k),ae=Math.sin(k);X.push({c1:C(N-T*j,j+T*N),c2:C(ie+T*ae,ae-T*ie),p:q===D-1?pn(l):C(ie,ae)}),w=k}return X}function Ii(e){const t=(e??"").trim();if(!t)return[];const n=[];let i=[],o=!1,r={x:0,y:0},l={x:0,y:0},c=null,d=null;const u=()=>{if(o&&i.length>2){const m=i[0],g=i[i.length-1];Math.abs(m.p.x-g.p.x)<1e-6&&Math.abs(m.p.y-g.p.y)<1e-6&&(m.in=g.in??m.in,i.pop())}i.length>1&&n.push({nodes:i,closed:o}),i=[],o=!1},p=(m,g)=>{i.push({p:m,in:Vn(g??null,m),out:null}),r=m},y=m=>{if(!i.length)return;const g=i[i.length-1];g.out=Vn(m,g.p)};Ls.lastIndex=0;let x=Ls.exec(t);for(;x!==null;){const m=x[1],g=m.toUpperCase(),v=m!==g,b=cC(x[2]),M=f=>v?{x:r.x+b[f],y:r.y+b[f+1]}:{x:b[f],y:b[f+1]};if(g==="Z")o=!0,u(),r=pn(l),c=null,d=null;else if(g==="M"){for(let f=0;f+1<b.length;f+=2){const S=M(f);f===0&&(u(),l=pn(S)),p(S)}c=null,d=null}else if(g==="L"){for(let f=0;f+1<b.length;f+=2)p(M(f));c=null,d=null}else if(g==="H"){for(const f of b)p({x:v?r.x+f:f,y:r.y});c=null,d=null}else if(g==="V"){for(const f of b)p({x:r.x,y:v?r.y+f:f});c=null,d=null}else if(g==="C"){for(let f=0;f+5<b.length;f+=6){const S=M(f),W=M(f+2),U=M(f+4);y(S),p(U,W),c=W}d=null}else if(g==="S"){for(let f=0;f+3<b.length;f+=4){const S=c?Zs(c,r):pn(r),W=M(f),U=M(f+2);y(S),p(U,W),c=W}d=null}else if(g==="Q")for(let f=0;f+3<b.length;f+=4){const S=M(f),W=M(f+2);y(Cn(r,S,2/3)),p(W,Cn(W,S,2/3)),d=S,c=null}else if(g==="T")for(let f=0;f+1<b.length;f+=2){const S=d?Zs(d,r):pn(r),W=M(f);y(Cn(r,S,2/3)),p(W,Cn(W,S,2/3)),d=S,c=null}else if(g==="A")for(let f=0;f+6<b.length;f+=7){const S=v?{x:r.x+b[f+5],y:r.y+b[f+6]}:{x:b[f+5],y:b[f+6]};for(const W of uC(r,b[f],b[f+1],b[f+2],b[f+3]!==0,b[f+4]!==0,S))y(W.c1),p(W.p,W.c2);c=null,d=null}x=Ls.exec(t)}return u(),n}function On(e){return`${Number(e.toFixed(2))}`}function Vn(e,t){return!e||Math.abs(e.x-t.x)<1e-6&&Math.abs(e.y-t.y)<1e-6?null:e}function Pp(e){return!!(Vn(e.in,e.p)||Vn(e.out,e.p))}function Bo(e,t){return!Vn(e.out,e.p)&&!Vn(t.in,t.p)}function Wd(e,t){if(Bo(e,t))return`L${On(t.p.x)},${On(t.p.y)}`;const n=Vn(e.out,e.p)??e.p,i=Vn(t.in,t.p)??t.p;return`C${On(n.x)},${On(n.y)} ${On(i.x)},${On(i.y)} ${On(t.p.x)},${On(t.p.y)}`}function No(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const[i,...o]=n.nodes;t.push(`M${On(i.p.x)},${On(i.p.y)}`);let r=i;for(const l of o)t.push(Wd(r,l)),r=l;if(n.closed){const l=Wd(r,i);l.charAt(0)==="C"&&t.push(l),t.push("Z")}}return t.join(" ")}function Ip(e){const t=[];for(let n=0;n+1<e.nodes.length;n+=1)t.push({from:e.nodes[n],to:e.nodes[n+1],index:n});if(e.closed&&e.nodes.length>2){const n=e.nodes.length-1;t.push({from:e.nodes[n],to:e.nodes[0],index:n})}return t}function Js(e,t,n){if(Bo(e,t))return Cn(e.p,t.p,n);const i=e.out??e.p,o=t.in??t.p,r=1-n,l=r*r*r,c=3*r*r*n,d=3*r*n*n,u=n*n*n;return{x:l*e.p.x+c*i.x+d*o.x+u*t.p.x,y:l*e.p.y+c*i.y+d*o.y+u*t.p.y}}function wr(e){const t=[];for(const n of e){if(n.nodes.length<2)continue;const i=[];for(const o of Ip(n)){if(Bo(o.from,o.to)){i.push(pn(o.from.p));continue}for(let r=0;r<Ks;r+=1)i.push(Js(o.from,o.to,r/Ks))}n.closed||i.push(pn(n.nodes[n.nodes.length-1].p)),i.length>2&&t.push(i)}return t}function $i(e){let t=1/0,n=1/0,i=-1/0,o=-1/0;for(const r of wr(e))for(const l of r)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<n&&(n=l.y),l.y>o&&(o=l.y);return{minX:t,minY:n,maxX:i,maxY:o}}function pC(e){const t=$i(e);return!isFinite(t.minX)||!isFinite(t.maxX)||!isFinite(t.minY)||!isFinite(t.maxY)?null:{x:(t.minX+t.maxX)/2,y:(t.minY+t.maxY)/2}}function Rp(e,t,n){const i={x:(n.x-e.x)/6,y:(n.y-e.y)/6};return{in:{x:t.x-i.x,y:t.y-i.y},out:{x:t.x+i.x,y:t.y+i.y}}}function kp(e){return e.filter(t=>t.length>2).map(t=>{if(t.length<=eC)return{closed:!0,nodes:t.map(r=>({p:pn(r),in:null,out:null}))};const n=Math.max(1,Math.round(t.length/tC)),i=[];for(let r=0;r<t.length;r+=n)i.push(t[r]);const o=i.length;return{closed:!0,nodes:i.map((r,l)=>({p:pn(r),...Rp(i[(l-1+o)%o],r,i[(l+1)%o])}))}})}function Ep(e,t,n=1){if(!e.length)return!1;const i=$i(e);if(!isFinite(i.minX)||!isFinite(i.maxX))return!1;const o=i.maxX-i.minX,r=i.maxY-i.minY;if(o<=t.width*2.5&&r<=t.height*2.5)return!1;const l=Math.max(n,t.width*.5),c=Math.max(n,t.height*.5);return i.minX<t.x-l||i.minY<t.y-c||i.maxX>t.x+t.width+l||i.maxY>t.y+t.height+c}function mC(e,t,n,i,o,r,l){const c=t.width>0?n.width/t.width:1,d=t.height>0?n.height/t.height:1;return!(r>0)||!(l>0)||!(c>0)||!(d>0)?e:cn(e,u=>{const p=i+(u.x-t.x)*r,y=o+(u.y-t.y)*l;return{x:t.x+p/c,y:t.y+y/d}})}function gC(e,t){if(!e.length)return e;const n=$i(e),i=n.maxX-n.minX,o=n.maxY-n.minY;if(!(i>0)||!(o>0)||n.minX>=t.x-1e-6&&n.minY>=t.y-1e-6&&n.maxX<=t.x+t.width+1e-6&&n.maxY<=t.y+t.height+1e-6)return e;const l=Math.min(t.width/i,t.height/o),c=t.x+(t.width-i*l)/2,d=t.y+(t.height-o*l)/2;return cn(e,u=>({x:c+(u.x-n.minX)*l,y:d+(u.y-n.minY)*l}))}function Mp(e){const t={x:0,y:0,width:$a,height:$a},n=e!=="custom"?Vl[e]:void 0,i=n?cn(Ii(n),r=>({x:r.x/100*t.width+t.x,y:r.y/100*t.height+t.y})):cn(kp(Ys("rectangle")),r=>({x:r.x*t.width+t.x,y:r.y*t.height+t.y})),o=gC(i,t);return{shape:e,customPath:No(o),pathFit:"viewbox",pathViewBox:Us}}function Zr(e,t){return t>0?Math.round(e/t)*t:e}function hC(e,t,n,i){var u;const o=(u=e[t])==null?void 0:u.nodes[n];if(!o)return e;const r=i.x-o.p.x,l=i.y-o.p.y,c=zn(e),d=c[t].nodes[n];return d.p={x:o.p.x+r,y:o.p.y+l},d.in&&(d.in={x:d.in.x+r,y:d.in.y+l}),d.out&&(d.out={x:d.out.x+r,y:d.out.y+l}),c}function Od(e,t,n,i){var r;if(!t.length)return e;const o=zn(e);for(const{contour:l,node:c}of t){const d=(r=o[l])==null?void 0:r.nodes[c];d&&(d.p={x:d.p.x+n,y:d.p.y+i},d.in&&(d.in={x:d.in.x+n,y:d.in.y+i}),d.out&&(d.out={x:d.out.x+n,y:d.out.y+i}))}return o}function fC(e,t){const n=new Map;for(const{contour:o,node:r}of t){const l=n.get(o)??[];l.push(r),n.set(o,l)}let i=e;return n.forEach((o,r)=>{const l=[...o].sort((c,d)=>d-c);for(const c of l)i=Ap(i,r,c)}),i}function yC(e,t,n,i,o,r){var u;if(!((u=e[t])==null?void 0:u.nodes[n]))return e;const c=zn(e),d=c[t].nodes[n];if(d[i]=pn(o),r){const p=i==="in"?"out":"in";d[p]=Zs(o,d.p)}return c}function vC(e,t,n,i){var l;const o=(l=e[t])==null?void 0:l.nodes[n];if(!o||!o[i])return e;const r=zn(e);return r[t].nodes[n][i]=null,r}function xC(e,t,n,i){const o=e[t];if(!o)return{contours:e,nodeIndex:-1};const r=o.nodes[n],l=o.nodes[(n+1)%o.nodes.length];if(!r||!l)return{contours:e,nodeIndex:-1};const c=zn(e),d=c[t].nodes,u=n+1;if(Bo(r,l))return d.splice(u,0,{p:Cn(r.p,l.p,i),in:null,out:null}),{contours:c,nodeIndex:u};const p=r.out??r.p,y=l.in??l.p,x=Cn(r.p,p,i),m=Cn(p,y,i),g=Cn(y,l.p,i),v=Cn(x,m,i),b=Cn(m,g,i),M=Cn(v,b,i),f=(n+1)%o.nodes.length;return d[n].out=x,d[f].in=g,d.splice(u,0,{p:M,in:v,out:b}),{contours:c,nodeIndex:u}}function Ap(e,t,n){const i=e[t];if(!i||i.nodes.length<=3)return e;const o=zn(e);return o[t].nodes.splice(n,1),o}function Dd(e,t,n){const i=e[t];if(!(i==null?void 0:i.nodes[n]))return e;const r=zn(e),l=r[t].nodes,c=l[n],d=l.length,u=(n-1+d)%d,p=(n+1)%d,y=!!Vn(l[u].out,l[u].p),x=!!Vn(l[p].in,l[p].p);if(Pp(c)||y||x)return c.in=null,c.out=null,l[u].out=null,l[p].in=null,r;const m=Rp(l[u].p,c.p,l[p].p);return c.in=m.in,c.out=m.out,r}function bC(e,t,n){const i=n.x-t.x,o=n.y-t.y,r=i*i+o*o,l=r===0?0:Math.max(0,Math.min(1,((e.x-t.x)*i+(e.y-t.y)*o)/r)),c={x:t.x+i*l,y:t.y+o*l};return{t:l,distance:Math.hypot(e.x-c.x,e.y-c.y),point:c}}function zd(e,t){let n=null;return e.forEach((i,o)=>{for(const r of Ip(i)){const l=Bo(r.from,r.to)?1:Ks;for(let c=0;c<l;c+=1){const d=c/l,u=(c+1)/l,p=bC(t,Js(r.from,r.to,d),Js(r.from,r.to,u));(!n||p.distance<n.distance)&&(n={contour:o,segment:r.index,t:d+(u-d)*p.t,distance:p.distance,point:p.point})}}}),n}function SC(e,t){const n=[];return e.forEach((i,o)=>{i.nodes.forEach((r,l)=>{o===t.contour&&l===t.node||n.push(r.p)})}),n}function Bd(e,t,n){const i=t.filter((r,l)=>isFinite(r)&&t.findIndex(c=>Math.abs(c-r)<1e-6)===l),o=i.map(r=>({value:r,axis:r,from:null}));for(const r of e)o.push({value:r[n],axis:null,from:r});for(const r of i)for(const l of e)o.push({value:r*2-l[n],axis:r,from:l});return o}function jd(e,t,n,i,o){const r=i(t)[n];let l=null,c=1/0;for(const d of e){const u=n==="x"?{x:d.value,y:t.y}:{x:t.x,y:d.value},p=Math.abs(i(u)[n]-r);p>o||l&&p>=c||(l=d,c=p)}return l}function wC(e,t){return e.length===t.length&&e.every((n,i)=>n.kind===t[i].kind&&n.a.x===t[i].a.x&&n.a.y===t[i].a.y&&n.b.x===t[i].b.x&&n.b.y===t[i].b.y)}function $C(e){const t=Math.PI*2;return((e+Math.PI)%t+t)%t-Math.PI}function Qs(e,t){const n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);return o<1e-6?null:{x:n/o,y:i/o}}function CC(e,t){const n=Qs(e,t);return n?{kind:"align",a:{x:e.x-n.x*go,y:e.y-n.y*go},b:{x:t.x+n.x*go,y:t.y+n.y*go}}:{kind:"align",a:e,b:t}}function el(e,t,n){return t==="x"?{kind:"center",a:{x:e,y:0},b:{x:e,y:n.height}}:{kind:"center",a:{x:0,y:e},b:{x:n.width,y:e}}}function Vd(e,t,n,i,o){if(e.axis===null)return CC(n,o(e.from??n));const r=t==="x"?{x:e.axis,y:0}:{x:0,y:e.axis};return el(o(r)[t],t,i)}function TC(e,t,n,i,o){const r=[],l=o(e);return t&&e.x===t.value&&r.push(Vd(t,"x",l,i,o)),n&&e.y===n.value&&r.push(Vd(n,"y",l,i,o)),r}function LC(e,t,n,i){const o=e==null?void 0:e.nodes[t];if(!e||!o)return null;const r=i(o.p),l=n==="in"?o.out:o.in;if(l)return Qs(i(l),r);const c=e.nodes.length,d=t+(n==="in"?1:-1);if(!e.closed&&(d<0||d>=c))return null;const u=e.nodes[(d+c)%c];if(!u)return null;const p=(n==="in"?u.in:u.out)??u.p;return Qs(i(p),r)}function PC(e,t,n,i,o,r,l){const c=r(t),d=r(e),u=d.x-c.x,p=d.y-c.y,y=Math.hypot(u,p);if(y<1e-6)return{point:e,guides:ho};const x=Math.atan2(p,u),m=Math.round(x/Fd)*Fd;let g=o?m:null,v=!1;if(!o){const B=[];n&&B.push({angle:Math.atan2(n.y,n.x),smooth:!0}),B.push({angle:m,smooth:!1});for(const P of B){const H=$C(P.angle-x);if(!(Math.abs(H)>oC)&&!(Math.abs(Math.sin(H))*y>iC)){g=P.angle,v=P.smooth;break}}}const b=i!==null&&i>0&&Math.abs(y-i)<=rC;if(g===null&&!b)return{point:e,guides:ho};const M=g??x,f=b?i:y,S={x:Math.cos(M),y:Math.sin(M)},W=f+(g===null?0:go),U=b?f:v?go:0;return{point:l({x:c.x+S.x*f,y:c.y+S.y*f}),guides:[{kind:"angle",a:{x:c.x-S.x*U,y:c.y-S.y*U},b:{x:c.x+S.x*W,y:c.y+S.y*W}}]}}const tl=.1,nl=8,IC=4,Gd=10,Ca=(e,t)=>{switch(t){case"nw":return{x:e.minX,y:e.minY};case"ne":return{x:e.maxX,y:e.minY};case"se":return{x:e.maxX,y:e.maxY};case"sw":return{x:e.minX,y:e.maxY}}},Fp=e=>{switch(e){case"nw":return"se";case"ne":return"sw";case"se":return"nw";case"sw":return"ne"}},il=(e,t)=>{const n=Ca(e,t),i=t==="nw"||t==="sw"?-1:1,o=t==="nw"||t==="ne"?-1:1;return{x:n.x+i*Gd,y:n.y+o*Gd}},ol=(e,t)=>!(t.width>0)||!(t.height>0)||!(e.width>0)||!(e.height>0)?1:Math.max(e.width/t.width,e.height/t.height),Vi=(e,t,n)=>{const i=ol(e,t)*n;return{width:t.width*i,height:t.height*i}},Dn=(e,t,n)=>(e-t)*n,fo=(e,t,n,i)=>{const o=e-t;if(Math.abs(o)<1e-6)return .5;const r=n/o;return(i==null?void 0:i.clamp)===!1?r:Math.abs(o)<IC?.5:wa(r)},RC=(e,t,n,i,o,r)=>{const l=Vi(e,n,r),c=e.x+Dn(e.width,l.width,i),d=e.y+Dn(e.height,l.height,o),u=ol(e,n),p=ol(t,n),y=Math.min(nl,Math.max(tl,p>0?r*(u/p):r)),x=Vi(t,n,y);return{focalX:fo(t.width,x.width,c-t.x,{clamp:!1}),focalY:fo(t.height,x.height,d-t.y,{clamp:!1}),scale:y}},Xd=1.08,Jr=14,Qr=8;function kC({P:e,box:t,bounds:n,natural:i,imageUrl:o,maskPath:r,stage:l,onStageChange:c,focalX:d,focalY:u,scale:p,onChange:y,onCommit:x}){const m=s.useRef(null),g=`pretext-image-ghost-${s.useId().replace(/:/g,"")}`,v=s.useRef(null),b=s.useRef(null),M=s.useRef({focalX:d,focalY:u,scale:p});M.current={focalX:d,focalY:u,scale:p};const f=l==="image";s.useEffect(()=>{var A;f&&((A=m.current)==null||A.focus({preventScroll:!0}))},[f]);const S=s.useCallback((A,T)=>{var X;const C=(X=m.current)==null?void 0:X.getBoundingClientRect();return!C||C.width<=0||C.height<=0?{x:0,y:0}:{x:(A-C.left)/C.width*t.width,y:(T-C.top)/C.height*t.height}},[t.width,t.height]),W=A=>{var C,X;if(!i)return;A.stopPropagation(),A.preventDefault(),(C=m.current)==null||C.focus({preventScroll:!0});const T=Vi(n,i,p);v.current={pointerId:A.pointerId,origin:S(A.clientX,A.clientY),startX:Dn(n.width,T.width,d),startY:Dn(n.height,T.height,u),width:T.width,height:T.height,moved:!1},(X=m.current)==null||X.setPointerCapture(A.pointerId)},U=(A,T)=>{var ie,ae;if(!i)return;A.stopPropagation(),A.preventDefault(),(ie=m.current)==null||ie.focus({preventScroll:!0});const C=Vi(n,i,p),X=Dn(n.width,C.width,d),w=Dn(n.height,C.height,u),q={minX:X,minY:w,maxX:X+C.width,maxY:w+C.height},k=Ca(q,Fp(T)),N=Ca(q,T),j=Math.hypot(N.x-k.x,N.y-k.y);!isFinite(j)||j<=0||(b.current={pointerId:A.pointerId,anchor:k,startDistance:j,startScale:p,startX:X,startY:w,moved:!1},(ae=m.current)==null||ae.setPointerCapture(A.pointerId))},B=A=>{if(!i)return;const T=b.current;if(T&&A.pointerId===T.pointerId){A.stopPropagation(),A.preventDefault();const X=S(A.clientX,A.clientY),w={x:X.x-n.x,y:X.y-n.y},q=Math.hypot(w.x-T.anchor.x,w.y-T.anchor.y),k=Math.min(nl,Math.max(tl,T.startScale*(q/T.startDistance)));if(!T.moved&&Math.abs(k-T.startScale)<1e-4)return;T.moved=!0;const N=k/T.startScale,j=T.anchor.x+(T.startX-T.anchor.x)*N,ie=T.anchor.y+(T.startY-T.anchor.y)*N,ae=Vi(n,i,k);y({focalX:fo(n.width,ae.width,j),focalY:fo(n.height,ae.height,ie),scale:k});return}const C=v.current;if(C&&A.pointerId===C.pointerId){A.stopPropagation(),A.preventDefault();const X=S(A.clientX,A.clientY),w=X.x-C.origin.x,q=X.y-C.origin.y;if(!C.moved&&w===0&&q===0)return;C.moved=!0,y({focalX:fo(n.width,C.width,C.startX+w),focalY:fo(n.height,C.height,C.startY+q),scale:p})}},P=A=>{var X,w;const T=v.current;if(T&&A.pointerId===T.pointerId){v.current=null,A.stopPropagation(),(X=m.current)!=null&&X.hasPointerCapture(T.pointerId)&&m.current.releasePointerCapture(T.pointerId),T.moved&&x(M.current);return}const C=b.current;C&&A.pointerId===C.pointerId&&(b.current=null,A.stopPropagation(),(w=m.current)!=null&&w.hasPointerCapture(C.pointerId)&&m.current.releasePointerCapture(C.pointerId),C.moved&&x(M.current))},H=A=>{if(A.key==="Escape"){A.stopPropagation(),c("none");return}if(A.key==="="||A.key==="+"||A.key==="-"||A.key==="_"){A.preventDefault(),A.stopPropagation();const T=A.key==="="||A.key==="+",C=Math.min(nl,Math.max(tl,p*(T?Xd:1/Xd))),X={focalX:d,focalY:u,scale:C};y(X),x(X)}},V=["nw","ne","se","sw"],$={minX:n.x,minY:n.y,maxX:n.x+n.width,maxY:n.y+n.height},L=s.useMemo(()=>{const A=i??{width:n.width,height:n.height},T=Vi(n,A,p);return!(T.width>0)||!(T.height>0)?null:{x:n.x+Dn(n.width,T.width,d),y:n.y+Dn(n.height,T.height,u),width:T.width,height:T.height}},[i,n.x,n.y,n.width,n.height,d,u,p]),D=L?{minX:L.x,minY:L.y,maxX:L.x+L.width,maxY:L.y+L.height}:$;return a.jsxs("svg",{ref:m,className:`${e}-editor${f?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:H,onPointerMove:B,onPointerUp:P,onPointerCancel:P,onLostPointerCapture:P,"data-pretext-image-editor":!0,children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>c("none")}),f&&o&&L&&r&&a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsxs("mask",{id:g,maskUnits:"userSpaceOnUse",x:L.x,y:L.y,width:L.width,height:L.height,children:[a.jsx("rect",{x:L.x,y:L.y,width:L.width,height:L.height,fill:"#FFFFFF"}),a.jsx("path",{d:r,fillRule:"evenodd",fill:"#000000"})]})}),a.jsx("image",{className:`${e}-editor-ghost`,href:o??void 0,x:L.x,y:L.y,width:L.width,height:L.height,preserveAspectRatio:"none",mask:`url(#${g})`}),a.jsx("rect",{className:`${e}-editor-image-bounds`,x:L.x,y:L.y,width:L.width,height:L.height})]}),f&&a.jsxs(a.Fragment,{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:n.x,y:n.y,width:n.width,height:n.height}),a.jsx("rect",{className:`${e}-editor-body`,x:n.x,y:n.y,width:n.width,height:n.height,onPointerDown:W}),V.map(A=>{const T=il(D,A),C=A==="ne"||A==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:T.x-Qr/2,y:T.y-Qr/2,width:Qr,height:Qr}),a.jsx("rect",{className:`${e}-editor-scale-grab${C?` ${e}-editor-scale-grab-nesw`:""}`,x:T.x-Jr/2,y:T.y-Jr/2,width:Jr,height:Jr,onPointerDown:X=>U(X,A)})]},A)})]})]})}const rl=10,EC=rl*2,Wn=7,MC=4,ao=9,AC=3.5,qd=1.08,FC=.05,ea=14,NC=1,ta=14,na=8;function _C({P:e,box:t,viewBox:n,contours:i,snap:o,stretchToBox:r,uniformStretch:l=!1,stage:c,onStageChange:d,onSelectionChange:u,onChange:p,onCommit:y}){const x=s.useRef(null),m=s.useRef(null),g=s.useRef(i);g.current=i;const v=s.useRef(null),b=s.useRef(null),M=s.useRef(null),f=s.useRef(null),[S,W]=s.useState([]),[U,B]=s.useState(ho),[P,H]=s.useState(null),V=s.useCallback(h=>{B(K=>wC(K,h)?K:h)},[]),$=c==="shape";s.useEffect(()=>{var h;$&&((h=x.current)==null||h.focus({preventScroll:!0}))},[$]),s.useEffect(()=>{$||W(h=>h.length?[]:h)},[$]);const L=S.length>0;s.useEffect(()=>{u==null||u(L)},[L,u]),s.useEffect(()=>()=>u==null?void 0:u(!1),[u]);const D=n.width>0?t.width/n.width:1,A=n.height>0?t.height/n.height:1,T=Math.min(D,A),C=r&&l?T:D,X=r&&l?T:A,w=r&&l?(t.width-n.width*T)/2:0,q=r&&l?(t.height-n.height*T)/2:0,k=s.useCallback(h=>r?{x:w+(h.x-n.x)*C,y:q+(h.y-n.y)*X}:{x:h.x-n.x,y:h.y-n.y},[r,n,C,X,w,q]),N=s.useCallback(h=>r?{x:n.x+(C>0?(h.x-w)/C:0),y:n.y+(X>0?(h.y-q)/X:0)}:{x:n.x+h.x,y:n.y+h.y},[r,n,C,X,w,q]),j=s.useMemo(()=>N({x:t.width/2,y:t.height/2}),[N,t.width,t.height]),ie=s.useCallback((h,K)=>{var ne;const Z=(ne=x.current)==null?void 0:ne.getBoundingClientRect();if(!Z||Z.width<=0||Z.height<=0)return{x:0,y:0};if(r){const de=(h-Z.left)/Z.width*t.width,z=(K-Z.top)/Z.height*t.height;return{x:n.x+(C>0?(de-w)/C:0),y:n.y+(X>0?(z-q)/X:0)}}return{x:n.x+(h-Z.left),y:n.y+(K-Z.top)}},[r,n,t.width,t.height,C,X,w,q]),ae=s.useCallback((h,K)=>{var ne;const Z=(ne=x.current)==null?void 0:ne.getBoundingClientRect();return!Z||Z.width<=0||Z.height<=0?{x:0,y:0}:{x:(h-Z.left)/Z.width*t.width,y:(K-Z.top)/Z.height*t.height}},[t.width,t.height]),O=s.useCallback((h,K)=>{const Z=l&&!(K!=null&&K.preserveShape)?mC(h,n,t,w,q,C,X):h;y(Z,K)},[y,l,n,t,w,q,C,X]),oe=s.useCallback(()=>{H(null)},[]),_=s.useCallback((h,K,Z)=>{if(!Z||v.current||b.current||M.current||f.current){oe();return}const ne=ae(h,K),de=cn(g.current,k);for(const G of de)for(const Ie of G.nodes)if(Math.hypot(Ie.p.x-ne.x,Ie.p.y-ne.y)<=ao){oe();return}const z=zd(de,ne);if(!z||z.distance>rl){oe();return}const I=de[z.contour],ee=I==null?void 0:I.nodes[z.segment],te=I==null?void 0:I.nodes[(z.segment+1)%((I==null?void 0:I.nodes.length)??1)],me=!!(ee&&te&&!Bo(ee,te));H(G=>G&&G.curved===me&&Math.hypot(G.point.x-z.point.x,G.point.y-z.point.y)<.25?G:{point:z.point,curved:me})},[ae,k,oe]),le=h=>{var We;const K=h.metaKey||h.ctrlKey,Z=M.current;if(Z&&h.pointerId===Z.pointerId){if(h.stopPropagation(),h.preventDefault(),Z.startDistance<=0)return;const ot=ie(h.clientX,h.clientY),qe=Math.hypot(ot.x-Z.origin.x,ot.y-Z.origin.y),tt=Math.max(FC,qe/Z.startDistance);if(!Z.moved&&Math.abs(tt-1)<1e-4)return;Z.moved=!0,p(Hd(Z.startContours,Z.origin,tt));return}const ne=b.current;if(ne&&h.pointerId===ne.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY),{bbox:qe}=ne,tt=qe.maxX-qe.minX,et=qe.maxY-qe.minY,Ge=ot.x-ne.origin.x,ve=ot.y-ne.origin.y;let _e=Ge,je=ve;if(isFinite(tt)&&isFinite(et))if(r){let $e=n.x,Ne=n.x+n.width,Ue=n.y,Je=n.y+n.height;l&&(C>0&&($e=n.x+(0-w)/C,Ne=n.x+(t.width-w)/C),X>0&&(Ue=n.y+(0-q)/X,Je=n.y+(t.height-q)/X));const st=Math.min($e,Ne-tt),it=Math.max($e,Ne-tt),Oe=Math.min(Ue,Je-et),Fe=Math.max(Ue,Je-et),ut=Math.min(it,Math.max(st,qe.minX+Ge)),ze=Math.min(Fe,Math.max(Oe,qe.minY+ve));_e=ut-qe.minX,je=ze-qe.minY}else{const $e=qe.minX-n.x,Ne=qe.minY-n.y,Ue=Math.min(0,t.width-tt),Je=Math.max(0,t.width-tt),st=Math.min(0,t.height-et),it=Math.max(0,t.height-et),Oe=Math.min(Je,Math.max(Ue,$e+Ge)),Fe=Math.min(it,Math.max(st,Ne+ve));_e=Oe-$e,je=Fe-Ne}const Ze=[];if(!K&&isFinite(tt)&&isFinite(et)){const $e=k({x:qe.minX+tt/2+_e,y:qe.minY+et/2+je}),Ne={x:t.width/2,y:t.height/2};Math.abs($e.x-Ne.x)<=ea&&(_e=j.x-qe.minX-tt/2,Ze.push(el(Ne.x,"x",t))),Math.abs($e.y-Ne.y)<=ea&&(je=j.y-qe.minY-et/2,Ze.push(el(Ne.y,"y",t)))}if(!ne.moved&&_e===0&&je===0)return;ne.moved=!0,V(Ze.length?Ze:ho),p(cn(ne.startContours,$e=>({x:$e.x+_e,y:$e.y+je})),{carryImage:!0});return}const de=f.current;if(de&&h.pointerId===de.pointerId){h.stopPropagation(),h.preventDefault();const ot=ie(h.clientX,h.clientY);let qe=ot.x-de.origin.x,tt=ot.y-de.origin.y;if(h.shiftKey&&(Math.abs(qe)>Math.abs(tt)?tt=0:qe=0),!de.moved&&qe===0&&tt===0)return;de.moved=!0,p(Od(de.startContours,de.selection,qe,tt));return}const z=v.current;if(!z||h.pointerId!==z.pointerId){_(h.clientX,h.clientY,S.length>0||$);return}oe(),h.stopPropagation(),h.preventDefault();const I=ie(h.clientX,h.clientY);if(z.kind==="anchor"){const ot={x:z.anchor.x+(I.x-z.origin.x),y:z.anchor.y+(I.y-z.origin.y)},qe=K?[]:SC(g.current,{contour:z.contour,node:z.node}),tt=K||!z.center?[]:[z.center],et=jd(Bd(qe,tt.map(_e=>_e.x),"x"),ot,"x",k,ea),Ge=jd(Bd(qe,tt.map(_e=>_e.y),"y"),ot,"y",k,ea),ve=K?ot:{x:(et==null?void 0:et.value)??Zr(ot.x,o),y:(Ge==null?void 0:Ge.value)??Zr(ot.y,o)};if(h.shiftKey&&(Math.abs(ve.x-z.anchor.x)>Math.abs(ve.y-z.anchor.y)?ve.y=z.anchor.y:ve.x=z.anchor.x),!z.moved&&ve.x===z.anchor.x&&ve.y===z.anchor.y)return;z.moved=!0,V(TC(ve,et,Ge,t,k)),p(hC(g.current,z.contour,z.node,ve));return}const ee=(We=g.current[z.contour])==null?void 0:We.nodes[z.node],te=z.mirror&&!h.altKey,me=te||K?null:z.kind==="in"?ee==null?void 0:ee.out:ee==null?void 0:ee.in,G=ee?k(ee.p):null,Ie=me?k(me):null,Se=ee&&(!K||h.shiftKey)?PC(I,ee.p,te||K?null:LC(g.current[z.contour],z.node,z.kind,k),G&&Ie?Math.hypot(Ie.x-G.x,Ie.y-G.y):null,h.shiftKey,k,N):{point:I,guides:ho},J=Se.guides.length?Se.point:K?I:{x:Zr(I.x,o),y:Zr(I.y,o)},He=z.kind==="in"?ee==null?void 0:ee.in:ee==null?void 0:ee.out;!z.moved&&He&&J.x===He.x&&J.y===He.y||(z.moved=!0,V(Se.guides),p(yC(g.current,z.contour,z.node,z.kind,J,te)))},Q=h=>{V(ho);const K=M.current;if(K&&h.pointerId===K.pointerId){M.current=null,h.stopPropagation();const me=x.current;me!=null&&me.hasPointerCapture(K.pointerId)&&me.releasePointerCapture(K.pointerId),K.moved&&O(g.current,{preserveShape:!0});return}const Z=b.current;if(Z&&h.pointerId===Z.pointerId){b.current=null,h.stopPropagation();const me=x.current;me!=null&&me.hasPointerCapture(Z.pointerId)&&me.releasePointerCapture(Z.pointerId),Z.moved?O(g.current,{preserveShape:!0}):W([]);return}const ne=f.current;if(ne&&h.pointerId===ne.pointerId){f.current=null,h.stopPropagation();const me=x.current;me!=null&&me.hasPointerCapture(ne.pointerId)&&me.releasePointerCapture(ne.pointerId),ne.moved&&O(g.current);return}const de=v.current;if(!de||h.pointerId!==de.pointerId)return;v.current=null,h.stopPropagation();const z=x.current;z!=null&&z.hasPointerCapture(de.pointerId)&&z.releasePointerCapture(de.pointerId);const I=Math.hypot(h.clientX-de.clientOrigin.x,h.clientY-de.clientOrigin.y);if(de.moved||I>MC){de.moved&&O(g.current);return}if(!de.toggleOnRelease||h.type!=="pointerup")return;const te=Dd(g.current,de.contour,de.node);te!==g.current&&(p(te),O(te))},be=h=>{h.stopPropagation()},Le=h=>{var K,Z;h.stopPropagation(),h.preventDefault(),oe(),(K=x.current)==null||K.focus({preventScroll:!0}),b.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),bbox:$i(i),moved:!1},(Z=x.current)==null||Z.setPointerCapture(h.pointerId)},ye=(h,K)=>{var I,ee;h.stopPropagation(),h.preventDefault(),oe(),(I=x.current)==null||I.focus({preventScroll:!0}),W([]),d("shape");const Z=$i(i),ne=Ca(Z,Fp(K)),de=il(Z,K),z=Math.hypot(de.x-ne.x,de.y-ne.y);!isFinite(z)||z<=0||(M.current={pointerId:h.pointerId,corner:K,origin:ne,startDistance:z,startContours:zn(i),moved:!1},(ee=x.current)==null||ee.setPointerCapture(h.pointerId))},ce=(h,K,Z,ne)=>{var I,ee,te,me;h.stopPropagation(),h.preventDefault(),oe(),(I=x.current)==null||I.focus({preventScroll:!0});const de=(ee=i[Z])==null?void 0:ee.nodes[ne];if(!de)return;if(h.altKey){const G=K==="anchor"?Ap(i,Z,ne):vC(i,Z,ne,K);if(G===i)return;W(K==="anchor"?[]:[{contour:Z,node:ne}]),p(G),O(G);return}const z=h.metaKey||h.ctrlKey;if(K==="anchor"&&h.shiftKey&&!z){W(G=>G.some(Ie=>Ie.contour===Z&&Ie.node===ne)?G.filter(Ie=>!(Ie.contour===Z&&Ie.node===ne)):[...G,{contour:Z,node:ne}]);return}if(K==="anchor"&&!z&&S.length>1&&S.some(G=>G.contour===Z&&G.node===ne)){f.current={pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),startContours:zn(i),selection:S,moved:!1},(te=x.current)==null||te.setPointerCapture(h.pointerId);return}W([{contour:Z,node:ne}]),v.current={kind:K,contour:Z,node:ne,pointerId:h.pointerId,origin:ie(h.clientX,h.clientY),clientOrigin:{x:h.clientX,y:h.clientY},anchor:de.p,center:pC(i),mirror:K!=="anchor"&&!!(de.in&&de.out),toggleOnRelease:z,moved:!1},(me=x.current)==null||me.setPointerCapture(h.pointerId)},Y=h=>{h.stopPropagation(),h.preventDefault(),oe();const K=cn(i,k),Z=zd(K,ae(h.clientX,h.clientY));if(!Z||Z.distance>rl)return;const{contours:ne,nodeIndex:de}=xC(i,Z.contour,Z.segment,Z.t);de<0||(W([{contour:Z.contour,node:de}]),p(ne),O(ne))},se=h=>{if(h.key==="="||h.key==="+"||h.key==="-"||h.key==="_"){h.preventDefault(),h.stopPropagation();const z=$i(i);if(!isFinite(z.minX)||!isFinite(z.maxX))return;const I={x:(z.minX+z.maxX)/2,y:(z.minY+z.maxY)/2},te=h.key==="="||h.key==="+"?qd:1/qd,me=Hd(i,I,te);p(me),O(me,{preserveShape:!0});return}if(h.key==="Escape"){h.stopPropagation(),W([]),d("none");return}if(!S.length)return;if(h.key==="Backspace"||h.key==="Delete"){h.preventDefault(),h.stopPropagation();const z=fC(i,S);if(z===i)return;W([]),p(z),O(z);return}const K=o>0?o:NC,Z=h.shiftKey?K*10:K,ne={ArrowLeft:[-Z,0],ArrowRight:[Z,0],ArrowUp:[0,-Z],ArrowDown:[0,Z]}[h.key];if(!ne)return;h.preventDefault(),h.stopPropagation();const de=Od(i,S,ne[0],ne[1]);p(de),O(de)},pe=s.useMemo(()=>No(cn(i,k)),[i,k]),fe=s.useMemo(()=>$i(i),[i]),we=k({x:fe.minX,y:fe.minY}),Re={width:k({x:fe.maxX,y:fe.minY}).x-we.x,height:k({x:fe.minX,y:fe.maxY}).y-we.y},ge=$&&S.length===0&&isFinite(fe.minX)&&isFinite(fe.maxX)&&fe.maxX>fe.minX&&fe.maxY>fe.minY,xe=S.length>0||$,Ce=xe;return a.jsxs("svg",{ref:x,className:`${e}-editor${xe?` ${e}-editor-armed`:""}`,width:t.width,height:t.height,viewBox:`0 0 ${t.width} ${t.height}`,tabIndex:0,onKeyDown:se,onPointerDown:()=>{var h;return(h=x.current)==null?void 0:h.focus({preventScroll:!0})},onPointerMove:le,onPointerLeave:oe,onPointerUp:Q,onPointerCancel:Q,onLostPointerCapture:Q,onContextMenu:h=>{h.preventDefault()},"data-pretext-path-editor":!0,"data-selection":"none",children:[a.jsx("rect",{className:`${e}-editor-surface`,width:t.width,height:t.height,onPointerDown:()=>{W([]),d("none")},onClick:Y}),Ce&&a.jsx("path",{className:`${e}-editor-outline`,d:pe}),Ce&&U.map((h,K)=>a.jsx("line",{className:`${e}-editor-snap ${e}-editor-snap-${h.kind}`,x1:h.a.x,y1:h.a.y,x2:h.b.x,y2:h.b.y},`${h.kind}-${K}`)),a.jsx("path",{ref:m,className:`${e}-editor-body`,d:pe,fillRule:"evenodd",onPointerDown:Le,onClick:Y}),Ce&&a.jsx("path",{className:`${e}-editor-hit`,d:pe,style:{strokeWidth:EC},onClick:Y}),Ce&&P&&a.jsx("rect",{className:`${e}-editor-add-preview`,x:P.point.x-Wn/2,y:P.point.y-Wn/2,width:Wn,height:Wn,rx:P.curved?Wn/2:0}),Ce&&i.map((h,K)=>h.nodes.map((Z,ne)=>{const de=S.some(I=>I.contour===K&&I.node===ne),z=k(Z.p);return a.jsxs("g",{children:[de&&S.length===1&&["in","out"].map(I=>{const ee=Z[I];if(!ee)return null;const te=k(ee);return a.jsxs("g",{children:[a.jsx("line",{className:`${e}-editor-handle-line`,x1:z.x,y1:z.y,x2:te.x,y2:te.y}),a.jsx("circle",{className:`${e}-editor-handle`,cx:te.x,cy:te.y,r:AC}),a.jsx("circle",{className:`${e}-editor-grab`,cx:te.x,cy:te.y,r:ao,onPointerDown:me=>ce(me,I,K,ne),onClick:be})]},I)}),a.jsx("rect",{className:`${e}-editor-anchor${de?` ${e}-editor-anchor-selected`:""}`,x:z.x-Wn/2,y:z.y-Wn/2,width:Wn,height:Wn,rx:Pp(Z)?Wn/2:0}),a.jsx("rect",{className:`${e}-editor-grab`,x:z.x-ao,y:z.y-ao,width:ao*2,height:ao*2,onPointerDown:I=>ce(I,"anchor",K,ne),onClick:be,onDoubleClick:I=>{I.stopPropagation(),I.preventDefault();const ee=Dd(i,K,ne);p(ee),O(ee)}})]},`${K}-${ne}`)})),ge&&a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-bbox`,x:we.x,y:we.y,width:Re.width,height:Re.height}),["nw","ne","se","sw"].map(h=>{const K=k(il(fe,h)),Z=h==="ne"||h==="sw";return a.jsxs("g",{children:[a.jsx("rect",{className:`${e}-editor-scale`,x:K.x-na/2,y:K.y-na/2,width:na,height:na}),a.jsx("rect",{className:`${e}-editor-scale-grab${Z?` ${e}-editor-scale-grab-nesw`:""}`,x:K.x-ta/2,y:K.y-ta/2,width:ta,height:ta,onPointerDown:ne=>ye(ne,h),onClick:be})]},h)})]})]})}const HC=4e3,WC=/^(?:https?:|mailto:|tel:)/i;function Np(e){return!!e&&typeof e=="object"&&e.type==="link"}function OC(e){if(!e)return;const t=e.replace(/\s+/g,"");if(!(/^[a-z][a-z0-9+.-]*:/i.test(t)&&!WC.test(t)))return t}function DC(e){const t=[];return e.forEach((n,i)=>{const o=(r,l,c)=>{for(const d of r){if(Np(d)){o(d.children??[],OC(d.value),d.target);continue}const u=d,p=(u==null?void 0:u.text)??"";if(p.trim())for(const y of p.split(/\s+/))y&&t.push({text:y,leaf:u,href:l,target:c,para:i})}};o((n==null?void 0:n.children)??[])}),t}function Ud(e){return{...e.fontFamily&&{fontFamily:Oo(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"}}}function zC(e){return e.map(t=>{const n=[],i=o=>{for(const r of o){if(Np(r)){i(r.children??[]);continue}n.push((r==null?void 0:r.text)??"")}};return i((t==null?void 0:t.children)??[]),n.join("")})}function BC(e,t,n,i,o){if(t<=0||!e.length||n<=0||i<=0)return e;const r=o==="avoid"?1:-1;return e.map(l=>{if(!l.length)return l;let c=1/0,d=-1/0,u=1/0,p=-1/0;for(const m of l){const g=m.x*n,v=m.y*i;g<c&&(c=g),g>d&&(d=g),v<u&&(u=v),v>p&&(p=v)}const y=(c+d)/2,x=(u+p)/2;return l.map(m=>{const g=m.x*n,v=m.y*i,b=g-y,M=v-x,f=Math.sqrt(b*b+M*M);if(f<1e-6)return m;const W=Math.max(0,f+r*t)/f;return{x:(y+b*W)/n,y:(x+M*W)/i}})})}const Is=2,Rs=2;function jC(e,t,n,i,o){if(e.kind!=="whole")return null;const r=t[e.originalIndex],l=e.token.text;if(!r||l.length<Is+Rs)return null;const c=Math.min(r.length-Rs,l.length-Rs);let d=-1;for(let u=c;u>=Is;u-=1)if(r[u-1]*i+o*i<=n){d=u;break}return d<Is?null:{fragmentText:`${l.slice(0,d)}-`,remainderText:l.slice(d),fragmentWidth:r[d-1]+o,remainderWidth:Math.max(0,e.width-r[d-1])}}function Kd(e){const{tokens:t,widths:n,rings:i,mode:o,align:r,scale:l,width:c,height:d,allowOverflow:u,capInset:p,capLines:y}=e,x=!!e.hyphenate,m=e.charWidths??[],g=e.hyphenWidth??0,v=e.lineHeight*l,b=e.spaceWidth*l,M=Math.max(0,e.shapeMargin??0),f=[],S=t.map((C,X)=>({token:C,originalIndex:X,width:n[X],kind:"whole"}));if(!S.length||c<=0||v<=0)return{segments:f,placed:0,height:0,capLeft:0,capTop:0,renderTokens:t};const W=Math.max(1,b*.5),U=v*G$,B=BC(i,M,c,d,o);let P=0,H=0,V=0,$=S[0].token.para,L=0,D=0,A=null;for(;P<S.length&&V<HC;){const C=H+v>d;if(C&&!u)break;const X=S[P].token.para;if(X>$+1){H+=v*(X-$-1),$=X-1,V+=1;continue}let w=C?[{x0:0,x1:c}]:Q$(B,(H+U)/d,(H+v-U)/d,o).map(k=>({x0:k.x0*c,x1:k.x1*c}));p>0&&y>0&&!C&&w.length&&(A===null&&(A=V,L=w[0].x0,D=H),V-A<y&&(w=J$(w,{x0:L,x1:L+p})));const q=w.reduce((k,N)=>Math.max(k,N.x1-N.x0),0);for(const k of w){const N=k.x1-k.x0;if(N<W)continue;if(P>=S.length||S[P].token.para!==X)break;const j=P;let ie=0;for(;P<S.length&&S[P].token.para===X;){const ae=S[P],O=P===j,oe=ae.width*l,_=O?oe:b+oe;if(ie+_<=N){ie+=_,P+=1;continue}if(O&&N>=q-.5&&oe>c-.5){ie+=_,P+=1;continue}if(x){const Q=N-ie-(O?0:b),be=jC(ae,m,Q,l,g);if(be){const Le={token:{...ae.token,text:be.fragmentText},originalIndex:ae.originalIndex,width:be.fragmentWidth,kind:"fragment"},ye={token:{...ae.token,text:be.remainderText},originalIndex:ae.originalIndex,width:be.remainderWidth,kind:"remainder"};S.splice(P,1,Le,ye),ie+=(O?0:b)+be.fragmentWidth*l,P+=1}}break}if(P>j){const ae=P>=S.length||S[P].token.para!==X;f.push({top:H,left:k.x0,width:N,from:j,to:P,justify:r==="justify"&&!ae})}if(P>=S.length||S[P].token.para!==X)break}$=X,H+=v,V+=1}let T=0;if(P>0){const C=S[P-1];T=C.kind==="fragment"?C.originalIndex:C.originalIndex+1}return{segments:f,placed:T,height:f.length?H:0,capLeft:L,capTop:D,renderTokens:S.map(C=>C.token)}}const VC=.12,GC=2,XC=10,ks=.25,qC=e=>{const t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}},UC=(e,t)=>Math.abs(e.top-t.top)<.5&&Math.abs(e.left-t.left)<.5&&Math.abs(e.width-t.width)<.5&&Math.abs(e.height-t.height)<.5,KC=(e,t)=>{const[n,i]=s.useState(null);return s.useEffect(()=>{if(!e||!t){i(null);return}let o=0,r=null;const l=()=>{const c=qC(e);(!r||!UC(r,c))&&(r=c,i(c)),o=requestAnimationFrame(l)};return l(),()=>cancelAnimationFrame(o)},[e,t]),n},Es=(e,t)=>{if(!(t.width>0)||!(t.height>0))return e;const n=Math.min(t.width,t.height),i=(t.width-n)/2,o=(t.height-n)/2;return e.map(r=>r.map(l=>({x:(i+l.x*n)/t.width,y:(o+l.y*n)/t.height})))},nr=typeof window>"u"?s.useEffect:s.useLayoutEffect;function YC(){return typeof document>"u"?null:document.body}function ZC({P:e,item:t,shape:n,customPath:i,pathFit:o,viewBox:r,mode:l,align:c,allowOverflow:d,fitEnabled:u,scale:p,onFitScale:y,padding:x,hyphenate:m,showOverflowIndicator:g,dropCapLines:v,dropCapSize:b,showGuides:M,typography:f,imageUrl:S,imageFocalX:W,imageFocalY:U,imageScale:B,imageCustomPath:P,pathDragActive:H,pathCarryImage:V,onCarryImageConsumed:$,pathEditor:L,imageEditor:D}){var Xe,pt;const A=`pretext-shape-image-${s.useId().replace(/:/g,"")}`,[T,C]=s.useState(null),X=s.useRef(null),[w,q]=s.useState({width:0,height:0}),[k,N]=s.useState(0),[j,ie]=s.useState(null),[ae,O]=s.useState(0),[oe,_]=s.useState("none");s.useEffect(()=>{!L&&!D&&_("none")},[L,D]);const[le,Q]=s.useState(null);s.useEffect(()=>{if(!S||typeof Image>"u"){Q(null);return}let he=!1;const Me=new Image;return Me.onload=()=>{he||Q({width:Me.naturalWidth,height:Me.naturalHeight})},Me.src=S,()=>{he=!0}},[S]);const be=s.useMemo(()=>Array.isArray(t==null?void 0:t.text)?t.text:[],[t]),Le=s.useMemo(()=>DC(be),[be]),ye=s.useMemo(()=>zC(be),[be]),ce=v>0&&b>1?((pt=(Xe=Le[0])==null?void 0:Xe.text)==null?void 0:pt.charAt(0))??"":"",Y=(L==null?void 0:L.contours)??null,se=s.useMemo(()=>{let he=[];if(Y){const Me=wr(Y);Me.length&&(he=So(Me,r))}if(!he.length){const Me=i.trim(),nt=Me?Ad(Me,o,r):null;nt&&nt.length?he=nt:he=Ys(n==="custom"?"rectangle":n)}return n==="circle"?Es(he,w):he},[Y,n,i,o,r,w.width,w.height]),pe=L==null?void 0:L.onConvert,fe=(L==null?void 0:L.needsConversion)??!1,we=s.useMemo(()=>{if(n==="circle")return!1;const he=Y??(i.trim()?Ii(i):null);return!!(he&&Ep(he,r))},[Y,i,r,n]),[Re,ge]=s.useState(null);nr(()=>{if(!we){Re&&ge(null);return}!Re&&w.width>0&&w.height>0&&ge({width:w.width,height:w.height})},[we,w.width,w.height,Re]);const xe=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return se;const he=Re??w,Me=r.width/he.width,nt=r.height/he.height;return se.map(gt=>gt.map(Ve=>({x:Ve.x*Me,y:Ve.y*nt})))},[se,we,Re,r.width,r.height,w.width,w.height]),Ce=s.useMemo(()=>{if(Y){const gt=wr(Y);if(gt.length){const Ve=So(gt,r);return n==="circle"?Es(Ve,w):Ve}}const he=P.trim(),Me=he?Ad(he,o,r):null,nt=Me&&Me.length?Me:Ys(n==="custom"?"rectangle":n);return n==="circle"?Es(nt,w):nt},[Y,n,P,o,r,w.width,w.height]),h=s.useMemo(()=>{if(!we||w.width<=0||w.height<=0)return Ce;const he=Re??w,Me=r.width/he.width,nt=r.height/he.height;return Ce.map(gt=>gt.map(Ve=>({x:Ve.x*Me,y:Ve.y*nt})))},[Ce,we,Re,r.width,r.height,w.width,w.height]),K=s.useRef(null),Z=s.useRef(!1);s.useEffect(()=>{if(!(!pe||w.width<=0||w.height<=0)){if(we){if(K.current===i)return;const he=Y??(i.trim()?Ii(i):null);if(!(he!=null&&he.length))return;const Me=cn(he,nt=>({x:r.x+(nt.x-r.x)/w.width*r.width,y:r.y+(nt.y-r.y)/w.height*r.height}));K.current=No(Me),pe(Me);return}!fe||!se.length||Z.current||(Z.current=!0,pe(cn(kp(se),he=>({x:he.x*$a,y:he.y*$a}))))}},[fe,we,pe,se,Y,i,r,w.width,w.height]);const ne=s.useCallback(()=>{const he=T;if(!he)return;const Me=he.getBoundingClientRect(),nt=parseFloat(window.getComputedStyle(he).paddingTop)||0;N(Ve=>Math.abs(Ve-nt)<.5?Ve:nt);const gt={width:Me.width,height:Me.height};q(Ve=>Math.abs(Ve.width-gt.width)<.5&&Math.abs(Ve.height-gt.height)<.5?Ve:gt)},[T]);nr(()=>{const he=T;if(!he||typeof ResizeObserver>"u")return;ne();const Me=new ResizeObserver(ne);return Me.observe(he),()=>Me.disconnect()},[T,ne]),nr(()=>{ne()},[x,ne]),s.useEffect(()=>{const he=typeof document<"u"?document.fonts:void 0;he!=null&&he.ready&&he.ready.then(()=>{O(Me=>Me+1)})},[]),nr(()=>{const he=X.current;if(!he)return;if(!Le.length){ie(null);return}const Me=[],nt=document.createDocumentFragment();for(const $t of Le){const E=document.createElement("span");Object.assign(E.style,Ud($t.leaf)),E.textContent=$t.text,nt.appendChild(E),Me.push(E)}const gt=document.createElement("span");gt.textContent=" ",nt.appendChild(gt);const Ve=document.createElement("span");Ve.textContent="-",nt.appendChild(Ve);const yt=ce||"H",It=document.createElement("span");It.textContent=yt,It.style.lineHeight="1",nt.appendChild(It),he.replaceChildren(nt);const At=window.getComputedStyle(he),St=parseFloat(At.fontSize)||16,Vt=parseFloat(At.lineHeight),jt=Number.isNaN(Vt)?St*1.2:Vt,Ut=Math.max(jt,St),Kt=document.createElement("span");Kt.textContent=yt,Kt.style.lineHeight=`${Ut}px`;const Rt=document.createElement("span");Rt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",Kt.appendChild(Rt),he.appendChild(Kt);const zt=Kt.getBoundingClientRect().top,rn=Rt.getBoundingClientRect().top,vt=Math.max(1,rn-zt);Kt.remove();let ft=vt*.8;const Qe=document.createElement("canvas").getContext("2d"),at=$t=>`${At.fontStyle} ${At.fontWeight} ${$t}px ${At.fontFamily}`;if(Qe){Qe.font=at(St);const $t=Qe.measureText(yt).actualBoundingBoxAscent;$t>0&&(ft=$t)}const mt=b>1?(b-1)*Ut+ft:ft;let Lt=St*(mt/ft);if(Qe){Qe.font=at(Lt);const $t=Qe.measureText(yt).actualBoundingBoxAscent;$t>0&&(Lt=Lt*(mt/$t))}It.style.fontSize=`${Lt}px`,It.style.lineHeight=`${Lt}px`;const bt=document.createElement("span");bt.style.cssText="display:inline-block;width:0;height:0;vertical-align:baseline",It.appendChild(bt);const kt=Math.max(1,bt.getBoundingClientRect().top-It.getBoundingClientRect().top);bt.remove();const lt=(b-1)*Ut+vt-kt,Ht=Me.map($t=>$t.getBoundingClientRect().width),Yt=gt.getBoundingClientRect().width,Mt=Ve.getBoundingClientRect().width,Nt=ce?It.getBoundingClientRect().width:0,Ft=m?Me.map($t=>{const E=$t.firstChild;if(!(E instanceof Text)||E.data.length<4)return;const Pe=document.createRange(),Be=$t.getBoundingClientRect().left,Ee=[];for(let ct=1;ct<=E.data.length;ct+=1)Pe.setStart(E,0),Pe.setEnd(E,ct),Ee.push(Pe.getBoundingClientRect().right-Be);return Ee}):[];he.replaceChildren(),ie({widths:Ht,spaceWidth:Yt,dashWidth:Mt,charWidths:Ft,lineHeight:Ut,capWidth:Nt,dropCapFontSize:Lt,dropCapTopAdjust:lt})},[Le,f,ce,v,b,ae,w.width,m]);const de=j&&ce?j.capWidth+j.lineHeight*VC:0,z=Math.max(v,Math.ceil(b)),I=s.useMemo(()=>{if(!j||!Le.length||w.width<=0||w.height<=0||!u)return 1;const he=gt=>Kd({tokens:Le,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:gt,allowOverflow:!1,capInset:de*gt,capLines:ce?z:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:k});if(he(1).placed>=Le.length)return 1;if(he(ks).placed<Le.length)return ks;let Me=ks,nt=1;for(let gt=0;gt<XC;gt+=1){const Ve=(Me+nt)/2;he(Ve).placed>=Le.length?Me=Ve:nt=Ve}return Me},[j,Le,w.width,w.height,xe,l,c,u,de,ce,z,m,k]);s.useEffect(()=>{y(I)},[I,y]);const ee=u?Math.min(p,I):1,te=s.useMemo(()=>!j||!Le.length||w.width<=0||w.height<=0?{segments:[],placed:0,height:0,capLeft:0,capTop:0,renderTokens:Le}:Kd({tokens:Le,widths:j.widths,spaceWidth:j.spaceWidth,lineHeight:j.lineHeight,width:w.width,height:w.height,rings:xe,mode:l,align:c,scale:ee,allowOverflow:d,capInset:de*ee,capLines:ce?z:0,hyphenate:m,charWidths:j.charWidths,hyphenWidth:j.dashWidth,shapeMargin:k}),[j,Le,w.width,w.height,xe,l,c,ee,d,de,ce,z,m,k]),me=g&&Le.length>0&&te.placed<Le.length,G=j?j.dropCapFontSize*ee:0,Ie=j?j.dropCapTopAdjust*ee:0,Se=c==="justify"?"left":c,J=j?j.lineHeight*ee:0,He=te.segments.length?te.segments[te.segments.length-1]:null,We=He?{top:He.top+J,left:He.left+He.width/2}:{top:w.height,left:w.width/2},ot=!!(L&&Y&&w.width>0&&w.height>0),qe=!!D,tt=(ot||qe)&&w.width>0&&w.height>0,et=KC(T,tt),Ge=tt&&et?YC():null,ve=s.useRef(!1),_e=s.useCallback(he=>{ve.current=he},[]);s.useEffect(()=>{if(!ot&&!qe)return;const he=Me=>{const nt=T;if(!nt)return;const gt=nt.getBoundingClientRect();Me.clientX>=gt.left&&Me.clientX<=gt.right&&Me.clientY>=gt.top&&Me.clientY<=gt.bottom&&(Me.preventDefault(),Me.stopPropagation(),_(yt=>yt==="shape"&&ve.current?yt:yt==="shape"&&qe?"image":ot?"shape":"image"))};return document.addEventListener("dblclick",he,!0),()=>document.removeEventListener("dblclick",he,!0)},[ot,qe,T]);const je=s.useMemo(()=>S&&w.width>0&&w.height>0?X$(h,w):null,[S,h,w.width,w.height]),Ze=s.useRef(null),$e=(()=>{const he=Ze.current;return V||!D||!le||!je||!he||P===he.customPath||he.shape!==n&&n!=="custom"?null:RC(he.bounds,je,le,he.focalX,he.focalY,he.scale)})();nr(()=>{if(H||!D||!le||!je)return;const he=Ze.current,Me=!!(he&&P!==he.customPath);Me&&$e&&D.onCommit($e),Me&&V&&($==null||$()),Ze.current={rings:h,bounds:je,focalX:($e==null?void 0:$e.focalX)??W,focalY:($e==null?void 0:$e.focalY)??U,scale:($e==null?void 0:$e.scale)??B,customPath:P,shape:n}},[H,V,P,n,h,je,D,le,W,U,B,$e,$]);const Ne=Ze.current,Ue=!!(H&&!V&&Ne&&!$e),Je=Ue&&Ne?Ne.focalX:($e==null?void 0:$e.focalX)??W,st=Ue&&Ne?Ne.focalY:($e==null?void 0:$e.focalY)??U,it=Ue&&Ne?Ne.scale:($e==null?void 0:$e.scale)??B,Oe=Ue&&Ne?Ne.bounds:je,Fe=s.useMemo(()=>{if(!(w.width>0)||!(w.height>0))return"";let he=Nd(i,Y,o,r,n,w);if(we){const Me=Re??w,nt=r.width/Me.width,gt=r.height/Me.height;he=cn(he,Ve=>({x:Ve.x*nt,y:Ve.y*gt}))}return _d(he,w)||Md(xe,w)},[i,Y,o,r,n,w.width,w.height,we,Re,xe]),ut=s.useMemo(()=>{if(!S||!(w.width>0)||!(w.height>0))return"";let he=Nd(P,Y,o,r,n,w);if(we){const Me=Re??w,nt=r.width/Me.width,gt=r.height/Me.height;he=cn(he,Ve=>({x:Ve.x*nt,y:Ve.y*gt}))}return _d(he,w)||Md(h,w)},[S,P,Y,o,r,n,w.width,w.height,we,Re,h]),ze=`${A}-clip`,De=s.useMemo(()=>{if(!Oe)return null;const he=le??{width:Oe.width,height:Oe.height},Me=Vi(Oe,he,it);return{x:Dn(Oe.width,Me.width,Je),y:Dn(Oe.height,Me.height,st),width:Me.width,height:Me.height}},[Oe,le,Je,st,it]);return a.jsxs("div",{className:`${e}-column`,style:{padding:x},ref:C,children:[Fe?a.jsxs("svg",{className:`${e}-shape-fill`,style:{top:0,left:0,width:w.width,height:w.height},viewBox:`0 0 ${w.width} ${w.height}`,preserveAspectRatio:"none","aria-hidden":!0,children:[a.jsx("path",{className:`${e}-shape-fill-path`,d:Fe,fillRule:"evenodd"}),S&&ut&&Oe&&De?a.jsxs(a.Fragment,{children:[a.jsx("defs",{children:a.jsx("clipPath",{id:ze,clipPathUnits:"userSpaceOnUse",children:a.jsx("path",{d:ut,fillRule:"evenodd"})})}),a.jsx("image",{href:S,x:Oe.x+De.x,y:Oe.y+De.y,width:De.width,height:De.height,preserveAspectRatio:"none",clipPath:`url(#${ze})`})]}):null]}):null,a.jsxs("div",{className:`${e}-flow${d?"":` ${e}-clip`}`,style:{...f,["--"+e+"-fit"]:ee,top:0,left:0,width:w.width,height:w.height},children:[a.jsx("div",{className:`${e}-measure`,ref:X,style:f,"aria-hidden":!0}),te.segments.map((he,Me)=>{const nt=te.renderTokens.slice(he.from,he.to),gt=Me===0;return a.jsx("div",{className:`${e}-line${he.justify?` ${e}-line-justify`:""}`,"aria-hidden":!0,style:{top:`${he.top}px`,left:`${he.left}px`,width:`${he.width}px`,textAlign:he.justify?void 0:Se},children:nt.map((Ve,yt)=>{const At=ce&&gt&&he.from===0&&yt===0?Ve.text.slice(1):Ve.text,St=Ud(Ve.leaf),Vt=Ve.href?a.jsx("a",{className:`${e}-link`,href:Ve.href,target:Ve.target,rel:Ve.target?"noopener noreferrer":void 0,style:St,children:At}):a.jsx("span",{style:St,children:At});return a.jsxs("span",{children:[!he.justify&&yt>0?" ":null,Vt]},yt)})},`${he.from}-${he.to}-${Me}`)}),M&&!Y&&a.jsx("svg",{className:`${e}-guides`,viewBox:"0 0 1 1",preserveAspectRatio:"none","aria-hidden":!0,children:xe.map((he,Me)=>a.jsx("polygon",{points:he.map(nt=>`${nt.x},${nt.y}`).join(" ")},Me))})]}),ce&&j&&a.jsx("div",{className:`${e}-drop-cap`,"aria-hidden":!0,style:{...f,top:`${te.capTop+Ie}px`,left:`${te.capLeft}px`,fontSize:`${G}px`,lineHeight:`${G}px`},children:ce}),Ge&&et&&(Y&&L||D)&&Gn.createPortal(a.jsxs("div",{"data-selection":"none",style:{position:"fixed",top:et.top,left:et.left,width:et.width,height:et.height,zIndex:GC,pointerEvents:"none"},children:[Y&&L&&a.jsx(_C,{P:e,box:{width:et.width,height:et.height},viewBox:r,contours:Y,snap:L.snap,stretchToBox:!we,uniformStretch:n==="circle",stage:oe,onStageChange:_,onSelectionChange:_e,onChange:L.onChange,onCommit:L.onCommit}),D&&Oe&&a.jsx(kC,{P:e,box:{width:et.width,height:et.height},bounds:Oe,natural:le,imageUrl:S,maskPath:ut,stage:oe,onStageChange:_,focalX:Je,focalY:st,scale:it,onChange:D.onChange,onCommit:D.onCommit})]}),Ge),a.jsx("div",{className:`${e}-a11y`,children:ye.map((he,Me)=>a.jsx("p",{children:he},Me))}),me&&a.jsxs("svg",{className:`${e}-overflow-icon`,width:"33",height:"24",viewBox:"0 0 33 24",style:{top:We.top,left:We.left},"aria-hidden":!0,children:[a.jsx("path",{d:"M12.8,4 L20.2,4 C24.68042,4 26.9206301,4 28.631924,4.87194781 C31.3123488,6.23769248 33,8.99168887 33,12 C33,15.0083111 31.3123488,17.7623075 28.631924,19.1280522 C26.9206301,20 24.68042,20 20.2,20 L12.8,20 C8.31957995,20 6.07936993,20 4.368076,19.1280522 C1.68765116,17.7623075 0,15.0083111 0,12 C0,8.99168887 1.68765116,6.23769248 4.368076,4.87194781 C6.07936993,4 8.31957995,4 12.8,4 Z",fill:"#FF4400"}),a.jsx("path",{transform:"translate(5, 0)",fill:"#FFFFFF",d:"M12,5.625 C12.3846269,5.625 12.7016304,5.91453014 12.7449542,6.28753416 L12.75,6.375 L12.75,11.25 L17.625,11.25 C18.0392136,11.25 18.375,11.5857864 18.375,12 C18.375,12.3846269 18.0854699,12.7016304 17.7124658,12.7449542 L17.625,12.75 L12.75,12.75 L12.75,17.625 C12.75,18.0392136 12.4142136,18.375 12,18.375 C11.6153731,18.375 11.2983696,18.0854699 11.2550458,17.7124658 L11.25,17.625 L11.25,12.75 L6.375,12.75 C5.96078644,12.75 5.625,12.4142136 5.625,12 C5.625,11.6153731 5.91453014,11.2983696 6.28753416,11.2550458 L6.375,11.25 L11.25,11.25 L11.25,6.375 C11.25,5.96078644 11.5857864,5.625 12,5.625 Z"})]})]})}const _p=["diamond","parallelogram","vase","circle","shield","bobbin","custom"],JC={x:0,y:0,width:100,height:100},QC=e=>{const t=(e??"").trim().split(/[\s,]+/).map(Number).filter(n=>!Number.isNaN(n));return t.length<4||t[2]<=0||t[3]<=0?JC:{x:t[0],y:t[1],width:t[2],height:t[3]}},eT=e=>`
27265
27255
  .${e}-wrapper {
27266
27256
  box-sizing: border-box;
27267
27257
  display: flex;
@@ -27490,7 +27480,7 @@ export function Burger({
27490
27480
  clip-path: inset(50%);
27491
27481
  white-space: nowrap;
27492
27482
  }
27493
- `,eT=1;function tT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=F.useScopedStyles(),d=s.useMemo(()=>QC(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),v=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",g=(e==null?void 0:e.pathFit)??"stretch",x=s.useMemo(()=>JC(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",k=(e==null?void 0:e.textAlign)??"left",f=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",W=((e==null?void 0:e.hyphenate)??"off")==="on",U=F.scalingValue((e==null?void 0:e.padding)??0,u),B=(e==null?void 0:e.dropCapSize)??eT,P=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??B)),_=u&&p&&!i,G=u&&!i,[$,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const z=()=>L(!0),R=()=>L(!1),ee=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],te=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const me of ee)window.addEventListener(me,z);for(const me of te)window.addEventListener(me,R);return()=>{for(const me of ee)window.removeEventListener(me,z);for(const me of te)window.removeEventListener(me,R)}},[u,p]);const D=u&&p&&!i&&typeof l=="function",E=!$,T=Math.max(0,(e==null?void 0:e.pathSnap)??0),C=s.useRef(e??{}),V=s.useRef(""),w=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(w!==V.current)V.current=w,C.current=e??{};else if(e){const{customPath:z,shape:R,pathFit:ee,pathViewBox:te,imageScale:me,imageFocalX:X,imageFocalY:Ie,image:Se,...J}=e,He=C.current;for(const We of Object.keys(J))if(He[We]!==J[We]){C.current={...He,...J};break}}const[q,I]=s.useState(null),[A,j]=s.useState(!1),[ie,ae]=s.useState(!1),O=s.useCallback(()=>ae(!1),[]),oe=C.current.shape??v,N=s.useMemo(()=>!q||q.serialized===m?m:q.serialized,[q,m]);s.useEffect(()=>{D||(j(!1),ae(!1))},[D]),s.useEffect(()=>{!q||A||q.serialized===m&&I(null)},[q,m,A]);const le=s.useMemo(()=>{if(!D)return null;if(q&&(q.base===m||q.serialized===m))return q.contours;const z=Ii(m);return z.length?z:null},[D,q,m]),Q=!!(g==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Us&&le&&(v==="circle"||!Ep(le,x))),be=s.useCallback((z,R,ee)=>{const te=_o(z);if(I(me=>({base:me&&(me.base===m||me.serialized===m)?me.base:m,serialized:te,contours:z})),R){const me=C.current,X=ee!=null&&ee.preserveShape?me.shape:"custom",Ie={...me,shape:X,customPath:te};C.current=Ie,l==null||l(Ie)}},[m,l]),Pe=s.useMemo(()=>D?{contours:Q?le:null,snap:T,needsConversion:!Q,onConvert:z=>{const R=_o(z);I({base:R,serialized:R,contours:z});const ee={...C.current,pathFit:"viewbox",pathViewBox:Us,customPath:R};C.current=ee,l==null||l(ee)},onChange:(z,R)=>{j(!0),ae(!!(R!=null&&R.carryImage)),be(z,!1)},onCommit:(z,R)=>{be(z,!0,R),j(!1)}}:null,[D,Q,le,T,l,be]),ye=b==="avoid"&&!!(e!=null&&e.image),ce=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[Y,se]=s.useState(null),pe=Y??ce,fe=s.useCallback(z=>se(z),[]),we=s.useCallback(z=>{se(z);const R={...C.current,imageFocalX:z.focalX,imageFocalY:z.focalY,imageScale:z.scale};C.current=R,l==null||l(R)},[l]);s.useEffect(()=>{Y&&Math.abs(Y.focalX-ce.focalX)<1e-9&&Math.abs(Y.focalY-ce.focalY)<1e-9&&Math.abs(Y.scale-ce.scale)<1e-9&&se(null)},[Y,ce]);const Re=s.useMemo(()=>!D||!ye?null:{onChange:fe,onCommit:we},[D,ye,fe,we]),[ge,xe]=s.useState(void 0),Ce=s.useRef(void 0),h=s.useCallback(z=>{const R=Ce.current;R!==void 0&&Math.abs(R-z)<.005||(Ce.current=z,xe(z))},[]),K=s.useMemo(()=>S&&typeof ge=="number"?ge:1,[ge,S]),Z=z=>`calc(${z} * var(--${c}-fit, 1))`,ne=s.useMemo(()=>{var ee,te,me,X,Ie;const z=(e==null?void 0:e.textFontSize)??.012,R=Math.max((e==null?void 0:e.textLineHeight)??z,z);return{fontFamily:Do(e==null?void 0:e.textFontFamily),fontWeight:(ee=e==null?void 0:e.textFontSettings)==null?void 0:ee.fontWeight,fontStyle:(te=e==null?void 0:e.textFontSettings)==null?void 0:te.fontStyle,fontSize:Z(F.scalingValue(z,u)),lineHeight:Z(F.scalingValue(R,u)),letterSpacing:Z(F.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Z(F.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(me=e==null?void 0:e.textTextAppearance)==null?void 0:me.textTransform,textDecoration:(X=e==null?void 0:e.textTextAppearance)==null?void 0:X.textDecoration,fontVariant:(Ie=e==null?void 0:e.textTextAppearance)==null?void 0:Ie.fontVariant}},[e,u,c]),de={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...de},children:a.jsx(YC,{P:c,item:y,shape:oe,customPath:m,pathFit:g,viewBox:x,mode:b,align:k,allowOverflow:f,fitEnabled:S,scale:K,onFitScale:h,padding:U,hyphenate:W,showOverflowIndicator:G,dropCapLines:P,dropCapSize:B,showGuides:(_||D)&&E,typography:ne,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:pe.focalX,imageFocalY:pe.focalY,imageScale:pe.scale,imageCustomPath:N,pathDragActive:A,pathCarryImage:ie,onCarryImageConsumed:O,pathEditor:E?Pe:null,imageEditor:E?Re:null})})]})}const nT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27483
+ `,tT=1;function nT({settings:e,content:t,isEditor:n,isPreviewMode:i,isEditMode:o,isSelected:r,onUpdateSettings:l}){const{prefix:c}=R.useScopedStyles(),d=s.useMemo(()=>eT(c),[c]),u=n??!1,p=!!r||!!o,y=s.useMemo(()=>Array.isArray(t)?t[0]??{}:{},[t]),x=(e==null?void 0:e.shape)??"custom",m=(e==null?void 0:e.customPath)??"",g=(e==null?void 0:e.pathFit)??"stretch",v=s.useMemo(()=>QC(e==null?void 0:e.pathViewBox),[e==null?void 0:e.pathViewBox]),b=(e==null?void 0:e.shapeMode)==="B"?"avoid":"contain",M=(e==null?void 0:e.textAlign)??"left",f=((e==null?void 0:e.overflowMode)??"clip")==="visible",S=((e==null?void 0:e.fitText)??"off")==="on",W=((e==null?void 0:e.hyphenate)??"off")==="on",U=R.scalingValue((e==null?void 0:e.padding)??0,u),B=(e==null?void 0:e.dropCapSize)??tT,P=Math.max(1,Math.round((e==null?void 0:e.dropCapLines)??B)),H=u&&p&&!i,V=u&&!i,[$,L]=s.useState(!1);s.useEffect(()=>{if(!u||!p){L(!1);return}const z=()=>L(!0),I=()=>L(!1),ee=["ArticleEditor.Item:drag-start","ArticleEditor.Selection:resize-start","ArticleEditor.Selection:move-start"],te=["ArticleEditor.Item:drag-end","ArticleEditor.Selection:resize-end","ArticleEditor.Selection:move-end"];for(const me of ee)window.addEventListener(me,z);for(const me of te)window.addEventListener(me,I);return()=>{for(const me of ee)window.removeEventListener(me,z);for(const me of te)window.removeEventListener(me,I)}},[u,p]);const D=u&&p&&!i&&typeof l=="function",A=!$,T=Math.max(0,(e==null?void 0:e.pathSnap)??0),C=s.useRef(e??{}),X=s.useRef(""),w=[e==null?void 0:e.customPath,e==null?void 0:e.shape,e==null?void 0:e.pathFit,e==null?void 0:e.pathViewBox,e==null?void 0:e.imageScale,e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.image].join("\0");if(w!==X.current)X.current=w,C.current=e??{};else if(e){const{customPath:z,shape:I,pathFit:ee,pathViewBox:te,imageScale:me,imageFocalX:G,imageFocalY:Ie,image:Se,...J}=e,He=C.current;for(const We of Object.keys(J))if(He[We]!==J[We]){C.current={...He,...J};break}}const[q,k]=s.useState(null),[N,j]=s.useState(!1),[ie,ae]=s.useState(!1),O=s.useCallback(()=>ae(!1),[]),oe=C.current.shape??x,_=s.useMemo(()=>!q||q.serialized===m?m:q.serialized,[q,m]);s.useEffect(()=>{D||(j(!1),ae(!1))},[D]),s.useEffect(()=>{!q||N||q.serialized===m&&k(null)},[q,m,N]);const le=s.useMemo(()=>{if(!D)return null;if(q&&(q.base===m||q.serialized===m))return q.contours;const z=Ii(m);return z.length?z:null},[D,q,m]),Q=!!(g==="viewbox"&&((e==null?void 0:e.pathViewBox)??"")===Us&&le&&(x==="circle"||!Ep(le,v))),be=s.useCallback((z,I,ee)=>{const te=No(z);if(k(me=>({base:me&&(me.base===m||me.serialized===m)?me.base:m,serialized:te,contours:z})),I){const me=C.current,G=ee!=null&&ee.preserveShape?me.shape:"custom",Ie={...me,shape:G,customPath:te};C.current=Ie,l==null||l(Ie)}},[m,l]),Le=s.useMemo(()=>D?{contours:Q?le:null,snap:T,needsConversion:!Q,onConvert:z=>{const I=No(z);k({base:I,serialized:I,contours:z});const ee={...C.current,pathFit:"viewbox",pathViewBox:Us,customPath:I};C.current=ee,l==null||l(ee)},onChange:(z,I)=>{j(!0),ae(!!(I!=null&&I.carryImage)),be(z,!1)},onCommit:(z,I)=>{be(z,!0,I),j(!1)}}:null,[D,Q,le,T,l,be]),ye=b==="avoid"&&!!(e!=null&&e.image),ce=s.useMemo(()=>({focalX:(e==null?void 0:e.imageFocalX)??.5,focalY:(e==null?void 0:e.imageFocalY)??.5,scale:(e==null?void 0:e.imageScale)??1}),[e==null?void 0:e.imageFocalX,e==null?void 0:e.imageFocalY,e==null?void 0:e.imageScale]),[Y,se]=s.useState(null),pe=Y??ce,fe=s.useCallback(z=>se(z),[]),we=s.useCallback(z=>{se(z);const I={...C.current,imageFocalX:z.focalX,imageFocalY:z.focalY,imageScale:z.scale};C.current=I,l==null||l(I)},[l]);s.useEffect(()=>{Y&&Math.abs(Y.focalX-ce.focalX)<1e-9&&Math.abs(Y.focalY-ce.focalY)<1e-9&&Math.abs(Y.scale-ce.scale)<1e-9&&se(null)},[Y,ce]);const Re=s.useMemo(()=>!D||!ye?null:{onChange:fe,onCommit:we},[D,ye,fe,we]),[ge,xe]=s.useState(void 0),Ce=s.useRef(void 0),h=s.useCallback(z=>{const I=Ce.current;I!==void 0&&Math.abs(I-z)<.005||(Ce.current=z,xe(z))},[]),K=s.useMemo(()=>S&&typeof ge=="number"?ge:1,[ge,S]),Z=z=>`calc(${z} * var(--${c}-fit, 1))`,ne=s.useMemo(()=>{var ee,te,me,G,Ie;const z=(e==null?void 0:e.textFontSize)??.012,I=Math.max((e==null?void 0:e.textLineHeight)??z,z);return{fontFamily:Oo(e==null?void 0:e.textFontFamily),fontWeight:(ee=e==null?void 0:e.textFontSettings)==null?void 0:ee.fontWeight,fontStyle:(te=e==null?void 0:e.textFontSettings)==null?void 0:te.fontStyle,fontSize:Z(R.scalingValue(z,u)),lineHeight:Z(R.scalingValue(I,u)),letterSpacing:Z(R.scalingValue((e==null?void 0:e.textLetterSpacing)??0,u)),wordSpacing:Z(R.scalingValue((e==null?void 0:e.textWordSpacing)??0,u)),textTransform:(me=e==null?void 0:e.textTextAppearance)==null?void 0:me.textTransform,textDecoration:(G=e==null?void 0:e.textTextAppearance)==null?void 0:G.textDecoration,fontVariant:(Ie=e==null?void 0:e.textTextAppearance)==null?void 0:Ie.fontVariant}},[e,u,c]),de={[`--${c}-text-color`]:(e==null?void 0:e.textColor)??"#000000",[`--${c}-link-color`]:(e==null?void 0:e.linkColor)??(e==null?void 0:e.textColor)??"#000000",[`--${c}-background-color`]:(e==null?void 0:e.backgroundColor)??"transparent"};return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:d}}),a.jsx("div",{className:`${c}-wrapper`,style:{...de},children:a.jsx(ZC,{P:c,item:y,shape:oe,customPath:m,pathFit:g,viewBox:v,mode:b,align:M,allowOverflow:f,fitEnabled:S,scale:K,onFitScale:h,padding:U,hyphenate:W,showOverflowIndicator:V,dropCapLines:P,dropCapSize:B,showGuides:(H||D)&&A,typography:ne,imageUrl:b==="avoid"?e==null?void 0:e.image:null,imageFocalX:pe.focalX,imageFocalY:pe.focalY,imageScale:pe.scale,imageCustomPath:_,pathDragActive:N,pathCarryImage:ie,onCarryImageConsumed:O,pathEditor:A?Le:null,imageEditor:A?Re:null})})]})}const iT=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
27494
27484
  import type React from 'react';
27495
27485
  import { CommonComponentProps } from '../props';
27496
27486
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -28317,4 +28307,4 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
28317
28307
  </>
28318
28308
  );
28319
28309
  }
28320
- `,Yd=[..._p],iT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},oT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Yd},enum:Yd},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words with a hyphen when they don’t fit on a line.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...iT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...Mp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"https://cdn.cntrl.site/component-assets/shapedType_img.jpg",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},rT={element:tT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||_p.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Mp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:oT,sourceCode:nT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},aT=[rh,ph,rb,rf,gf,Cf,jf,py,xy,Ly,Zy,Vv,U0,ix,Ox,Yx,yb,mS,Ib,kS,lw,qw,j$,rT];exports.getAvailableStatePanels=F.getAvailableStatePanels;exports.getUnavailableStates=F.getUnavailableStates;exports.isPanelAvailable=F.isPanelAvailable;exports.components=aT;exports.isSchemaV1=Yp;
28310
+ `,Yd=[..._p],oT={fontSettings:{type:"object",display:{type:"font-settings-weight"},properties:{fontWeight:{type:"number"},fontStyle:{type:"string"}}}},rT={type:"object",version:1,settings:{sizing:"manual",properties:{shape:{type:"string",scope:"layout",display:{type:"shape-select",isFilled:!0,enum:Yd},enum:Yd},customPath:{type:"string",scope:"layout",title:"Path",tooltip:"SVG path (M…) or a point list (0,0 100,0 50,100). Used when Shape is set to custom.",display:{type:"full-width-input",placeholder:"M0,0 C…"}},pathSnap:{type:"number",scope:"common",title:"Snap",tooltip:"Grid the points snap to while dragging, in path units (the path box is 100 x 100). 0 is off.",min:0,max:25,step:.5,display:{type:"numeric-input"}},pathFit:{type:"string",scope:"common",title:"Path fit",tooltip:"Stretch — the drawing fills the box. Viewbox — the drawing keeps its position in path coordinates (0–100).",display:{type:"toggle-cycle",enum:["stretch","viewbox"]}},shapeMode:{type:"string",scope:"common",title:"",tooltip:"A — text fills the path. B — text flows around the path.",display:{type:"radio-group"},enum:["A","B"]},fitText:{type:"string",scope:"common",title:"Fit text",tooltip:"Scales the type down until all text fits the path.",display:{type:"toggle-cycle",enum:["off","on"]}},hyphenate:{type:"string",scope:"common",title:"Hyphenate",tooltip:"Breaks long words with a hyphen when they don’t fit on a line.",display:{type:"toggle-cycle",enum:["off","on"]}},padding:{type:"number",scope:"layout",title:"Padding",tooltip:"Insets the shape and its text on all sides.",min:0,display:{type:"numeric-input"}},dropCapLines:{type:"number",scope:"common",title:"Drop cap lines",min:1,max:8,step:1,display:{type:"numeric-input"}},dropCapSize:{type:"number",scope:"common",title:"Drop cap size",tooltip:"Height of the drop cap, in lines of body text.",min:1,max:8,step:1,display:{type:"common-numeric-input"}},image:{type:["string","null"],scope:"common",title:"",display:{type:"settings-image-input"}},backgroundColor:{type:"string",scope:"common",title:"BG Shape",display:{type:"settings-color-picker"}},textFontFamily:{type:"string",scope:"common",title:"Font Family",display:{type:"font-family-select"}},textFontSettings:{...oT.fontSettings,scope:"common",title:"",display:{type:"font-settings-weight"}},textFontSize:{type:"number",scope:"layout",title:"Font Size",display:{type:"font-size"}},textLineHeight:{type:"number",scope:"layout",title:"Line Height",display:{type:"line-height-input"}},textLetterSpacing:{type:"number",scope:"layout",title:"Letter Spacing",display:{type:"letter-spacing-input"}},textWordSpacing:{type:"number",scope:"layout",title:"Word Spacing",display:{type:"word-spacing-input"}},textAlign:{type:"string",scope:"layout",title:"",enum:["left","center","right","justify"],display:{type:"vertical-text-aligh-options"}},textTextAppearance:{type:"object",scope:"layout",title:"Text Appearance",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"]}}},textColor:{type:"string",scope:"common",title:"Text Default",display:{type:"style-panel-color-picker"}},linkColor:{type:"string",scope:"common",title:"Link Default",display:{type:"style-panel-color-picker"}}},defaults:{...Mp("circle"),pathSnap:0,shapeMode:"A",fitText:"off",hyphenate:"off",dropCapLines:1,dropCapSize:1,image:"https://cdn.cntrl.site/component-assets/shapedType_img.jpg",backgroundColor:"rgba(0, 0, 0, 0)",textFontFamily:"Basteleur",textFontSettings:{fontWeight:400,fontStyle:"normal"},textAlign:"center",textTextAppearance:{textTransform:"uppercase",textDecoration:"none",fontVariant:"normal"},textColor:"#000000",linkColor:"#000000"},layoutDefaults:{m:{textFontSize:.037,textLineHeight:.048,textLetterSpacing:0,textWordSpacing:0,padding:0},t:{textFontSize:.018,textLineHeight:.024,textLetterSpacing:0,textWordSpacing:0,padding:0},d:{textFontSize:.032,textLineHeight:.0155,textLetterSpacing:-.001,textWordSpacing:0,padding:0}},layout:["__componentName__","shape","customPath","pathSnap","pathFit","shapeMode","fitText","hyphenate","padding","dropCapLines","dropCapSize","image"],displayRules:[{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.image.display.visible",value:!1}},{if:{name:"shapeMode",value:"B",isNotEqual:!0},then:{name:"properties.padding.display.visible",value:!1}},{if:{name:"shapeMode",value:"A"},then:{name:"properties.shape.display.isFilled",value:!0}},{if:{name:"shapeMode",value:"B"},then:{name:"properties.shape.display.isFilled",value:!1}}]},panels:[{id:"general",icon:"settings",title:"General",tooltip:"General Settings",layout:[{type:"row",items:["__componentName__"]},{type:"row",items:["shapeMode"]},{type:"row",title:"Shape",items:["shape"]},{type:"row",items:["dropCapSize","hyphenate"]},{type:"row",items:["padding","image"]}]},{id:"typeStyle",icon:"text-icon",title:"Type Style",tooltip:"Typography",layout:["__componentName__",{type:"group",title:"",items:["textFontFamily","textFontSettings",{type:"row",items:["textFontSize","textLineHeight","textLetterSpacing","textWordSpacing"]},"textAlign","textTextAppearance"]}]}],paletteBookmark:{items:["textColor","linkColor","backgroundColor"],panelIds:["general","typeStyle"]},content:{type:"array",max:1,settings:{addItemWithoutImage:!0,addItemFromFileExplorer:!1},display:{type:"array"},items:{type:"object",properties:{text:{label:"Text",placeholder:"Add Text...",display:{type:"rich-text"}}}},default:[{text:[{type:"paragraph",children:[{text:"Le loro superficie, excelso Duca, fra loro similmente possiamo dire al medesimo modo esser proportionali commo de lor massa corporea s'è dicto, cioè irrationali per la malitia de la figura pentagona che in lo duodecedron se interpone. Ma de l'altre possano a le volte essere rationali, commo quelle del tetracedron, cubo, octocedron, per essere triangole e quadrate e note in proportione con lo diametro de la loro sphera in la quale si formano, commo s'è veduto di sopra."}]}]}]}},aT={element:nT,id:"pretext",name:"Shaped Type",category:"typography",version:1,normalizeLayoutSettingsUpdate:(e,t)=>{const n=e.shape;return typeof n!="string"||n==="custom"||_p.indexOf(n)===-1||(t==null?void 0:t.shape)===n?e:{...e,...Mp(n)}},defaultSize:{d:{width:1420,height:640},t:{width:710,height:320},m:{width:355,height:160}},preview:{type:"image",url:"https://cdn.cntrl.site/component-assets/pretext.png"},schema:rT,sourceCode:iT,assetsPaths:{content:[],parameters:[{path:"image",placeholderEnabled:!0}]},fontSettingsPaths:{content:[],parameters:[{path:"textFontFamily"}]},fontRelations:{textFontSettings:"textFontFamily"}},sT=[rh,ph,ab,rf,gf,Cf,jf,py,xy,Ly,Zy,Vv,K0,ox,Dx,Zx,vb,gS,Rb,ES,cw,Uw,V$,aT];exports.getAvailableStatePanels=R.getAvailableStatePanels;exports.getUnavailableStates=R.getUnavailableStates;exports.isPanelAvailable=R.isPanelAvailable;exports.components=sT;exports.isSchemaV1=Yp;